0s autopkgtest [13:51:12]: starting date and time: 2025-03-15 13:51:12+0000 0s autopkgtest [13:51:12]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [13:51:12]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.yredxyk4/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 autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@bos03-arm64-43.secgroup --name adt-plucky-arm64-octave-statistics-20250315-135110-juju-7f2275-prod-proposed-migration-environment-15-3125edf7-fdda-4d31-b120-7ce2f1404de9 --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 188s autopkgtest [13:54:20]: testbed dpkg architecture: arm64 188s autopkgtest [13:54:20]: testbed apt version: 2.9.33 189s autopkgtest [13:54:21]: @@@@@@@@@@@@@@@@@@@@ test bed setup 189s autopkgtest [13:54:21]: testbed release detected to be: None 190s autopkgtest [13:54:22]: updating testbed package index (apt update) 190s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 190s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 191s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 191s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 191s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [101 kB] 191s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 191s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [404 kB] 191s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [78.2 kB] 191s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 c-n-f Metadata [1976 B] 191s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 c-n-f Metadata [116 B] 191s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [346 kB] 192s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 c-n-f Metadata [15.8 kB] 192s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [4948 B] 192s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 c-n-f Metadata [572 B] 192s Fetched 1094 kB in 2s (565 kB/s) 193s Reading package lists... 194s + lsb_release --codename --short 194s + RELEASE=plucky 194s + cat 194s + [ plucky != trusty ] 194s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::=--force-confnew dist-upgrade 194s Reading package lists... 194s Building dependency tree... 194s Reading state information... 195s Calculating upgrade... 195s Calculating upgrade... 195s The following packages will be upgraded: 195s python3-jinja2 strace 196s 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 196s Need to get 608 kB of archives. 196s After this operation, 11.3 kB of additional disk space will be used. 196s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 strace arm64 6.13+ds-1ubuntu1 [499 kB] 196s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 197s Fetched 608 kB in 1s (612 kB/s) 197s (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 ... 117701 files and directories currently installed.) 197s Preparing to unpack .../strace_6.13+ds-1ubuntu1_arm64.deb ... 197s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 197s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 197s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 197s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 198s Setting up strace (6.13+ds-1ubuntu1) ... 198s Processing triggers for man-db (2.13.0-1) ... 198s + rm /etc/apt/preferences.d/force-downgrade-to-release.pref 198s + /usr/lib/apt/apt-helper analyze-pattern ?true 198s + + sed s/\./\\./g 198s uname -r 198s + running_kernel_pattern=^linux-.*6\.14\.0-10-generic.* 198s + apt list ?obsolete 198s + tail -n+2 198s + cut -d/ -f1 198s + grep -v ^linux-.*6\.14\.0-10-generic.* 199s + obsolete_pkgs=linux-headers-6.11.0-8-generic 199s linux-headers-6.11.0-8 199s linux-image-6.11.0-8-generic 199s linux-modules-6.11.0-8-generic 199s linux-tools-6.11.0-8-generic 199s linux-tools-6.11.0-8 199s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y purge --autoremove linux-headers-6.11.0-8-generic linux-headers-6.11.0-8 linux-image-6.11.0-8-generic linux-modules-6.11.0-8-generic linux-tools-6.11.0-8-generic linux-tools-6.11.0-8 199s Reading package lists... 199s Building dependency tree... 199s Reading state information... 199s Solving dependencies... 200s The following packages will be REMOVED: 200s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 200s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 200s linux-image-6.11.0-8-generic* linux-modules-6.11.0-8-generic* 200s linux-tools-6.11.0-8* linux-tools-6.11.0-8-generic* 200s 0 upgraded, 0 newly installed, 11 to remove and 5 not upgraded. 200s After this operation, 267 MB disk space will be freed. 200s (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 ... 117701 files and directories currently installed.) 200s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 200s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 200s Removing libpython3.12t64:arm64 (3.12.9-1) ... 200s Removing libpython3.12-stdlib:arm64 (3.12.9-1) ... 200s Removing libnsl2:arm64 (1.3.0-3build3) ... 200s Removing libpython3.12-minimal:arm64 (3.12.9-1) ... 201s Removing libunwind8:arm64 (1.6.2-3.1) ... 201s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 201s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 203s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 203s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 203s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 203s /etc/kernel/postrm.d/initramfs-tools: 203s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 203s /etc/kernel/postrm.d/zz-flash-kernel: 203s flash-kernel: Kernel 6.11.0-8-generic has been removed. 203s flash-kernel: A higher version (6.14.0-10-generic) is still installed, no reflashing required. 204s /etc/kernel/postrm.d/zz-update-grub: 204s Sourcing file `/etc/default/grub' 204s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 204s Generating grub configuration file ... 204s Found linux image: /boot/vmlinuz-6.14.0-10-generic 204s Found initrd image: /boot/initrd.img-6.14.0-10-generic 204s Warning: os-prober will not be executed to detect other bootable partitions. 204s Systems on them will not be added to the GRUB boot configuration. 204s Check GRUB_DISABLE_OS_PROBER documentation entry. 204s Adding boot menu entry for UEFI Firmware Settings ... 204s done 204s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 205s Processing triggers for libc-bin (2.41-1ubuntu1) ... 205s (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 ... 81650 files and directories currently installed.) 205s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 205s Purging configuration files for libpython3.12-minimal:arm64 (3.12.9-1) ... 205s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 205s + grep -q trusty /etc/lsb-release 205s + [ ! -d /usr/share/doc/unattended-upgrades ] 205s + [ ! -d /usr/share/doc/lxd ] 205s + [ ! -d /usr/share/doc/lxd-client ] 205s + [ ! -d /usr/share/doc/snapd ] 205s + type iptables 205s + cat 205s + chmod 755 /etc/rc.local 205s + . /etc/rc.local 205s + iptables -w -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 205s + iptables -A OUTPUT -d 10.255.255.1/32 -p tcp -j DROP 205s + iptables -A OUTPUT -d 10.255.255.2/32 -p tcp -j DROP 205s + uname -m 205s + [ aarch64 = ppc64le ] 205s + [ -d /run/systemd/system ] 205s + systemd-detect-virt --quiet --vm 205s + mkdir -p /etc/systemd/system/systemd-random-seed.service.d/ 205s + cat 205s + grep -q lz4 /etc/initramfs-tools/initramfs.conf 205s + echo COMPRESS=lz4 205s autopkgtest [13:54:37]: upgrading testbed (apt dist-upgrade and autopurge) 205s Reading package lists... 206s Building dependency tree... 206s Reading state information... 206s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 206s Starting 2 pkgProblemResolver with broken count: 0 206s Done 207s Entering ResolveByKeep 207s 207s Calculating upgrade... 208s The following packages will be upgraded: 208s libc-bin libc-dev-bin libc6 libc6-dev locales 208s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 208s Need to get 9530 kB of archives. 208s After this operation, 0 B of additional disk space will be used. 208s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu2 [1750 kB] 210s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu2 [24.0 kB] 210s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu2 [2910 kB] 213s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu2 [600 kB] 213s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu2 [4246 kB] 218s Preconfiguring packages ... 218s Fetched 9530 kB in 10s (980 kB/s) 218s (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 ... 81647 files and directories currently installed.) 218s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_arm64.deb ... 218s Unpacking libc6-dev:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 218s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_arm64.deb ... 218s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 218s Preparing to unpack .../libc6_2.41-1ubuntu2_arm64.deb ... 219s Unpacking libc6:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 219s Setting up libc6:arm64 (2.41-1ubuntu2) ... 219s (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 ... 81647 files and directories currently installed.) 219s Preparing to unpack .../libc-bin_2.41-1ubuntu2_arm64.deb ... 219s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 219s Setting up libc-bin (2.41-1ubuntu2) ... 219s (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 ... 81647 files and directories currently installed.) 219s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 219s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 219s Setting up locales (2.41-1ubuntu2) ... 220s Generating locales (this might take a while)... 222s en_US.UTF-8... done 222s Generation complete. 222s Setting up libc-dev-bin (2.41-1ubuntu2) ... 222s Setting up libc6-dev:arm64 (2.41-1ubuntu2) ... 222s Processing triggers for man-db (2.13.0-1) ... 223s Processing triggers for systemd (257.3-1ubuntu3) ... 224s Reading package lists... 224s Building dependency tree... 224s Reading state information... 225s Starting pkgProblemResolver with broken count: 0 226s Starting 2 pkgProblemResolver with broken count: 0 226s Done 227s Solving dependencies... 228s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 228s autopkgtest [13:55:00]: rebooting testbed after setup commands that affected boot 254s autopkgtest [13:55:26]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 12 15:45:31 UTC 2025 259s autopkgtest [13:55:31]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 263s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (dsc) [2285 B] 263s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (tar) [1302 kB] 263s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (diff) [9744 B] 264s gpgv: Signature made Thu Feb 20 15:34:23 2025 UTC 264s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 264s gpgv: Can't check signature: No public key 264s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.3-2.dsc: no acceptable signature found 264s autopkgtest [13:55:36]: testing package octave-statistics version 1.7.3-2 267s autopkgtest [13:55:39]: build not needed 270s autopkgtest [13:55:42]: test command1: preparing testbed 270s Reading package lists... 271s Building dependency tree... 271s Reading state information... 271s Starting pkgProblemResolver with broken count: 0 272s Starting 2 pkgProblemResolver with broken count: 0 272s Done 273s The following NEW packages will be installed: 273s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 273s cpp-14 cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper debugedit 273s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 273s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 273s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-aarch64-linux-gnu 273s g++-aarch64-linux-gnu gcc gcc-14 gcc-14-aarch64-linux-gnu 273s gcc-aarch64-linux-gnu gettext gfortran gfortran-14 273s gfortran-14-aarch64-linux-gnu gfortran-aarch64-linux-gnu gnuplot-data 273s gnuplot-nox hdf5-helpers intltool-debian krb5-multidev libaec-dev libaec0 273s libalgorithm-c3-perl libaliased-perl libamd3 libaom3 libapp-cmd-perl 273s libappstream5 libapt-pkg-perl libarchive-zip-perl libarpack2t64 273s libarray-intspan-perl libasan8 libasound2-data libasound2t64 273s libavahi-client3 libavahi-common-data libavahi-common3 273s libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 273s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 273s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 273s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 273s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 273s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 273s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 273s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 273s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 273s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 273s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 273s libdata-validate-domain-perl libdata-validate-ip-perl 273s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 273s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 273s libdevel-stacktrace-perl libdouble-conversion3 libduktape207 273s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 273s libencode-locale-perl liberror-perl libevent-2.1-7t64 273s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 273s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 273s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 273s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 273s libfile-which-perl libflac12t64 libfltk-gl1.3t64 libfltk1.3t64 273s libfont-ttf-perl libfontconfig1 libfontenc1 libgbm1 libgcc-14-dev libgd3 273s libgetopt-long-descriptive-perl libgfortran-14-dev libgfortran5 libgl-dev 273s libgl1 libgl1-mesa-dri libgl2ps1.4 libglpk40 libglu1-mesa libglvnd0 273s libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl libgnutls-dane0t64 273s libgnutls-openssl27t64 libgnutls28-dev libgomp1 273s libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 libgraphite2-3 273s libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 libhdf5-cpp-310 273s libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 273s libhdf5-hl-fortran-310 libheif-plugin-aomdec libheif-plugin-libde265 273s libheif1 libhtml-form-perl libhtml-html5-entities-perl libhtml-parser-perl 273s libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl 273s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 273s libhttp-negotiate-perl libhwasan0 libhwy1t64 libice6 libidn2-dev 273s libimagequant0 libimport-into-perl libindirect-perl libinput-bin libinput10 273s libio-html-perl libio-interactive-perl libio-socket-ssl-perl 273s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 273s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 273s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 273s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 273s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 273s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 273s liblist-compare-perl liblist-moreutils-perl liblist-moreutils-xs-perl 273s liblist-someutils-perl liblist-utilsby-perl liblog-any-adapter-screen-perl 273s liblog-any-perl liblog-log4perl-perl liblsan0 libltdl7 liblua5.4-0 273s liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl 273s libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 273s libmodule-implementation-perl libmodule-pluggable-perl 273s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 273s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 273s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 273s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 273s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 273s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 273s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 273s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 273s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 273s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 273s libpath-iterator-rule-perl libpath-tiny-perl libpcre2-16-0 273s libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 libpkgconf3 273s libpod-constants-perl libpod-parser-perl libpod-pom-perl libportaudio2 273s libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 libqrupdate1 273s libqscintilla2-qt6-15 libqscintilla2-qt6-l10n libqt6core5compat6 273s libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 libqt6network6 273s libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 libqt6sql6 273s libqt6widgets6 libqt6xml6 libraqm0 libreadline-dev libregexp-common-perl 273s libregexp-pattern-license-perl libregexp-pattern-perl 273s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 273s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 273s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 273s libsoftware-license-perl libsoftware-licensemoreutils-perl 273s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 273s libstemmer0d libstrictures-perl libstring-copyright-perl 273s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 273s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 273s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 273s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 273s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 273s libtext-glob-perl libtext-levenshtein-damerau-perl 273s libtext-levenshteinxs-perl libtext-markdown-discount-perl 273s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 273s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 273s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 273s libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 libunbound8 273s libunicode-utf8-perl libunwind8 liburi-perl libvariable-magic-perl 273s libvorbis0a libvorbisenc2 libvulkan1 libwacom-common libwacom9 273s libwayland-client0 libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 273s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 273s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 273s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 273s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 273s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 273s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 273s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 273s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 273s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 273s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 273s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 273s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 273s octave-common octave-dev octave-io octave-statistics 273s octave-statistics-common patchutils perl-openssl-defaults pkgconf 273s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 273s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 273s xtrans-dev xvfb zlib1g-dev 273s 0 upgraded, 474 newly installed, 0 to remove and 0 not upgraded. 273s Need to get 184 MB of archives. 273s After this operation, 666 MB of additional disk space will be used. 273s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 libstemmer0d arm64 2.2.0-4build1 [160 kB] 274s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libappstream5 arm64 1.0.4-1 [239 kB] 274s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 appstream arm64 1.0.4-1 [72.3 kB] 274s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 m4 arm64 1.4.19-7 [244 kB] 274s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 autoconf all 2.72-3ubuntu1 [383 kB] 275s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 autotools-dev all 20220109.1 [44.9 kB] 275s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 automake all 1:1.17-3ubuntu1 [572 kB] 276s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 autopoint all 0.23.1-1 [619 kB] 276s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libcapture-tiny-perl all 0.50-1 [20.7 kB] 276s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libparams-util-perl arm64 1.102-3build1 [20.6 kB] 276s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-install-perl all 0.929-1 [9764 B] 276s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-optlist-perl all 0.114-1 [9708 B] 276s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libb-hooks-op-check-perl arm64 0.22-3build2 [9348 B] 276s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 276s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-callchecker-perl arm64 0.009-1build1 [14.0 kB] 276s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libparams-classify-perl arm64 0.015-2build6 [19.8 kB] 276s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 276s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 libtry-tiny-perl all 0.32-1 [21.2 kB] 276s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libmodule-implementation-perl all 0.09-2 [12.0 kB] 276s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libpackage-stash-perl all 0.40-1 [19.5 kB] 276s Get:21 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclass-load-perl all 0.25-2 [12.7 kB] 276s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-stringy-perl all 2.113-2 [45.3 kB] 277s Get:23 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparams-validate-perl arm64 1.31-2build4 [52.1 kB] 277s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-exporter-perl all 0.990-1 [49.0 kB] 277s Get:25 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 277s Get:26 http://ftpmaster.internal/ubuntu plucky/universe arm64 libio-tiecombine-perl all 1.005-3 [9464 B] 277s Get:27 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmodule-pluggable-perl all 5.2-5 [19.5 kB] 277s Get:28 http://ftpmaster.internal/ubuntu plucky/universe arm64 libstring-rewriteprefix-perl all 0.009-1 [6310 B] 277s Get:29 http://ftpmaster.internal/ubuntu plucky/universe arm64 libapp-cmd-perl all 0.337-2 [58.3 kB] 277s Get:30 http://ftpmaster.internal/ubuntu plucky/universe arm64 libboolean-perl all 0.46-3 [8430 B] 277s Get:31 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsub-uplevel-perl all 0.2800-3 [11.6 kB] 277s Get:32 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtest-exception-perl all 0.43-3 [13.4 kB] 277s Get:33 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 277s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-which-perl all 1.27-2 [12.5 kB] 277s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-homedir-perl all 1.006-2 [37.0 kB] 277s Get:36 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclone-choose-perl all 0.010-2 [7738 B] 277s Get:37 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhash-merge-perl all 0.302-1 [13.0 kB] 277s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libjson-perl all 4.10000-1 [81.9 kB] 277s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libexporter-tiny-perl all 1.006002-1 [36.8 kB] 277s Get:40 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblist-moreutils-xs-perl arm64 0.430-4build1 [39.9 kB] 277s Get:41 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblist-moreutils-perl all 0.430-2 [38.2 kB] 277s Get:42 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblog-log4perl-perl all 1.57-1 [345 kB] 278s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 libmouse-perl arm64 2.5.11-1build1 [133 kB] 278s Get:44 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 278s Get:45 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmousex-strictconstructor-perl all 0.02-3 [4582 B] 278s Get:46 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 278s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libpath-tiny-perl all 0.146-1 [47.5 kB] 278s Get:48 http://ftpmaster.internal/ubuntu plucky/universe arm64 libpod-pom-perl all 2.01-4 [61.3 kB] 278s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-common-perl all 2024080801-1 [162 kB] 278s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 libyaml-tiny-perl all 1.76-1 [24.2 kB] 278s Get:51 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-perl all 2.155-1 [356 kB] 279s Get:52 http://ftpmaster.internal/ubuntu plucky/universe arm64 libyaml-pp-perl all 0.39.0-1 [107 kB] 279s Get:53 http://ftpmaster.internal/ubuntu plucky/universe arm64 cme all 1.041-1 [65.4 kB] 279s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 libisl23 arm64 0.27-1 [676 kB] 280s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpc3 arm64 1.3.1-1build2 [56.8 kB] 280s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [10.6 MB] 291s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14 arm64 14.2.0-17ubuntu3 [1028 B] 291s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [5558 B] 291s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp arm64 4:14.2.0-1ubuntu1 [22.4 kB] 291s Get:60 http://ftpmaster.internal/ubuntu plucky/main arm64 libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 291s Get:61 http://ftpmaster.internal/ubuntu plucky/main arm64 libcc1-0 arm64 15-20250222-0ubuntu1 [44.2 kB] 291s Get:62 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 291s Get:63 http://ftpmaster.internal/ubuntu plucky/main arm64 libitm1 arm64 15-20250222-0ubuntu1 [28.0 kB] 292s Get:64 http://ftpmaster.internal/ubuntu plucky/main arm64 libasan8 arm64 15-20250222-0ubuntu1 [2924 kB] 295s Get:65 http://ftpmaster.internal/ubuntu plucky/main arm64 liblsan0 arm64 15-20250222-0ubuntu1 [1319 kB] 296s Get:66 http://ftpmaster.internal/ubuntu plucky/main arm64 libtsan2 arm64 15-20250222-0ubuntu1 [2694 kB] 298s Get:67 http://ftpmaster.internal/ubuntu plucky/main arm64 libubsan1 arm64 15-20250222-0ubuntu1 [1178 kB] 300s Get:68 http://ftpmaster.internal/ubuntu plucky/main arm64 libhwasan0 arm64 15-20250222-0ubuntu1 [1642 kB] 302s Get:69 http://ftpmaster.internal/ubuntu plucky/main arm64 libgcc-14-dev arm64 14.2.0-17ubuntu3 [2593 kB] 304s Get:70 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [20.9 MB] 327s Get:71 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14 arm64 14.2.0-17ubuntu3 [526 kB] 327s Get:72 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1200 B] 327s Get:73 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc arm64 4:14.2.0-1ubuntu1 [4998 B] 327s Get:74 http://ftpmaster.internal/ubuntu plucky/main arm64 libtool all 2.5.4-4 [168 kB] 328s Get:75 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-autoreconf all 20 [16.1 kB] 328s Get:76 http://ftpmaster.internal/ubuntu plucky/main arm64 libarchive-zip-perl all 1.68-1 [90.2 kB] 328s Get:77 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 328s Get:78 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-strip-nondeterminism all 1.14.1-2 [5064 B] 328s Get:79 http://ftpmaster.internal/ubuntu plucky/main arm64 debugedit arm64 1:5.1-2 [46.1 kB] 328s Get:80 http://ftpmaster.internal/ubuntu plucky/main arm64 dwz arm64 0.15-1build6 [113 kB] 328s Get:81 http://ftpmaster.internal/ubuntu plucky/main arm64 gettext arm64 0.23.1-1 [998 kB] 329s Get:82 http://ftpmaster.internal/ubuntu plucky/main arm64 intltool-debian all 0.35.0+20060710.6 [23.2 kB] 329s Get:83 http://ftpmaster.internal/ubuntu plucky/main arm64 po-debconf all 1.0.21+nmu1 [233 kB] 329s Get:84 http://ftpmaster.internal/ubuntu plucky/main arm64 debhelper all 13.24.1ubuntu2 [895 kB] 330s Get:85 http://ftpmaster.internal/ubuntu plucky/universe arm64 aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 331s Get:86 http://ftpmaster.internal/ubuntu plucky/universe arm64 gnuplot-data all 6.0.2+dfsg1-1 [75.4 kB] 331s Get:87 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 331s Get:88 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 332s Get:89 http://ftpmaster.internal/ubuntu plucky/universe arm64 fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 337s Get:90 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-2ubuntu1 [37.5 kB] 337s Get:91 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-2ubuntu1 [144 kB] 337s Get:92 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 337s Get:93 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 337s Get:94 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 337s Get:95 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 337s Get:96 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 338s Get:97 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 338s Get:98 http://ftpmaster.internal/ubuntu plucky/main arm64 libaom3 arm64 3.12.0-1 [1828 kB] 340s Get:99 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif-plugin-aomdec arm64 1.19.7-1 [11.4 kB] 340s Get:100 http://ftpmaster.internal/ubuntu plucky/main arm64 libde265-0 arm64 1.0.15-1build5 [146 kB] 340s Get:101 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif-plugin-libde265 arm64 1.19.7-1 [8890 B] 340s Get:102 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif1 arm64 1.19.7-1 [371 kB] 341s Get:103 http://ftpmaster.internal/ubuntu plucky/main arm64 libimagequant0 arm64 2.18.0-1build1 [37.1 kB] 341s Get:104 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 341s Get:105 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 341s Get:106 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 341s Get:107 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 342s Get:108 http://ftpmaster.internal/ubuntu plucky/main arm64 libraqm0 arm64 0.10.2-1 [14.9 kB] 342s Get:109 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 342s Get:110 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 342s Get:111 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 342s Get:112 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 343s Get:113 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 343s Get:114 http://ftpmaster.internal/ubuntu plucky/main arm64 libxpm4 arm64 1:3.5.17-1build2 [35.1 kB] 343s Get:115 http://ftpmaster.internal/ubuntu plucky/main arm64 libgd3 arm64 2.3.3-12ubuntu3 [122 kB] 343s Get:116 http://ftpmaster.internal/ubuntu plucky/main arm64 liblua5.4-0 arm64 5.4.7-1 [158 kB] 345s Get:117 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-2ubuntu1 [191 kB] 345s Get:118 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 345s Get:119 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 345s Get:120 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 345s Get:121 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.2-1 [237 kB] 345s Get:122 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.2-1 [49.5 kB] 345s Get:123 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.2-1 [27.6 kB] 345s Get:124 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebpmux3 arm64 1.5.0-0.1 [25.4 kB] 345s Get:125 http://ftpmaster.internal/ubuntu plucky/universe arm64 gnuplot-nox arm64 6.0.2+dfsg1-1 [980 kB] 345s Get:126 http://ftpmaster.internal/ubuntu plucky/universe arm64 dh-octave-autopkgtest all 1.8.0 [10.1 kB] 345s Get:127 http://ftpmaster.internal/ubuntu plucky/main arm64 libapt-pkg-perl arm64 0.1.41build1 [67.7 kB] 345s Get:128 http://ftpmaster.internal/ubuntu plucky/main arm64 libarray-intspan-perl all 2.004-2 [25.0 kB] 345s Get:129 http://ftpmaster.internal/ubuntu plucky/main arm64 libyaml-libyaml-perl arm64 0.903.0+ds-1 [30.4 kB] 345s Get:130 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 345s Get:131 http://ftpmaster.internal/ubuntu plucky/universe arm64 libexporter-lite-perl all 0.09-2 [9748 B] 345s Get:132 http://ftpmaster.internal/ubuntu plucky/main arm64 libencode-locale-perl all 1.05-3 [11.6 kB] 345s Get:133 http://ftpmaster.internal/ubuntu plucky/main arm64 libtimedate-perl all 2.3300-2 [34.0 kB] 345s Get:134 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-date-perl all 6.06-1 [10.2 kB] 345s Get:135 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-listing-perl all 6.16-1 [11.3 kB] 345s Get:136 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 346s Get:137 http://ftpmaster.internal/ubuntu plucky/main arm64 liburi-perl all 5.30-1 [94.4 kB] 346s Get:138 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-parser-perl arm64 3.83-1build1 [85.3 kB] 346s Get:139 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tree-perl all 5.07-3 [200 kB] 346s Get:140 http://ftpmaster.internal/ubuntu plucky/main arm64 libclone-perl arm64 0.47-1 [10.4 kB] 346s Get:141 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-html-perl all 1.004-3 [15.9 kB] 346s Get:142 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 346s Get:143 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 346s Get:144 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 346s Get:145 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 346s Get:146 http://ftpmaster.internal/ubuntu plucky/main arm64 perl-openssl-defaults arm64 7build3 [6628 B] 346s Get:147 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-ssleay-perl arm64 1.94-3 [307 kB] 346s Get:148 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-socket-ssl-perl all 2.089-1 [200 kB] 347s Get:149 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-http-perl all 6.23-1 [22.3 kB] 347s Get:150 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 347s Get:151 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 347s Get:152 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-perl all 6.78-1 [139 kB] 347s Get:153 http://ftpmaster.internal/ubuntu plucky/main arm64 liberror-perl all 0.17030-1 [23.5 kB] 347s Get:154 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparse-debcontrol-perl all 2.005-6 [20.4 kB] 347s Get:155 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-copyright-perl all 0.014-1 [14.5 kB] 347s Get:156 http://ftpmaster.internal/ubuntu plucky/universe arm64 libalgorithm-c3-perl all 0.11-2 [10.2 kB] 347s Get:157 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclass-c3-perl all 0.35-2 [18.4 kB] 347s Get:158 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmro-compat-perl all 0.15-2 [10.1 kB] 347s Get:159 http://ftpmaster.internal/ubuntu plucky/universe arm64 libdata-section-perl all 0.200008-1 [11.6 kB] 347s Get:160 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-template-perl all 1.61-1 [48.5 kB] 347s Get:161 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-license-perl all 0.104006-1 [117 kB] 347s Get:162 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 347s Get:163 http://ftpmaster.internal/ubuntu plucky/main arm64 libsort-versions-perl all 1.62-3 [7378 B] 347s Get:164 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-reform-perl all 1.20-5 [35.4 kB] 347s Get:165 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-autoformat-perl all 1.750000-2 [29.8 kB] 347s Get:166 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 347s Get:167 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtoml-tiny-perl all 0.19-1 [21.6 kB] 347s Get:168 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-inspector-perl all 1.36-3 [15.4 kB] 347s Get:169 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-sharedir-perl all 1.118-3 [14.0 kB] 347s Get:170 http://ftpmaster.internal/ubuntu plucky/main arm64 libindirect-perl arm64 0.39-2build5 [21.7 kB] 347s Get:171 http://ftpmaster.internal/ubuntu plucky/main arm64 libxs-parse-keyword-perl arm64 0.48-2 [61.4 kB] 348s Get:172 http://ftpmaster.internal/ubuntu plucky/main arm64 libxs-parse-sublike-perl arm64 0.37-1 [42.3 kB] 348s Get:173 http://ftpmaster.internal/ubuntu plucky/main arm64 libobject-pad-perl arm64 0.820-1 [127 kB] 348s Get:174 http://ftpmaster.internal/ubuntu plucky/main arm64 libsyntax-keyword-try-perl arm64 0.30-1 [24.2 kB] 348s Get:175 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-interactive-perl all 1.026-1 [10.8 kB] 348s Get:176 http://ftpmaster.internal/ubuntu plucky/main arm64 liblog-any-perl all 1.717-1 [73.2 kB] 348s Get:177 http://ftpmaster.internal/ubuntu plucky/main arm64 liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 348s Get:178 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 348s Get:179 http://ftpmaster.internal/ubuntu plucky/main arm64 libvariable-magic-perl arm64 0.64-1build1 [35.3 kB] 348s Get:180 http://ftpmaster.internal/ubuntu plucky/main arm64 libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 348s Get:181 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-identify-perl arm64 0.14-3build4 [9762 B] 348s Get:182 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-name-perl arm64 0.28-1 [10.5 kB] 348s Get:183 http://ftpmaster.internal/ubuntu plucky/main arm64 libnamespace-clean-perl all 0.27-2 [14.0 kB] 348s Get:184 http://ftpmaster.internal/ubuntu plucky/main arm64 libnumber-compare-perl all 0.03-3 [5974 B] 348s Get:185 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-glob-perl all 0.11-3 [6780 B] 348s Get:186 http://ftpmaster.internal/ubuntu plucky/main arm64 libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 348s Get:187 http://ftpmaster.internal/ubuntu plucky/main arm64 libpod-parser-perl all 1.67-1 [80.6 kB] 348s Get:188 http://ftpmaster.internal/ubuntu plucky/main arm64 libpod-constants-perl all 0.19-2 [16.3 kB] 348s Get:189 http://ftpmaster.internal/ubuntu plucky/main arm64 libset-intspan-perl all 1.19-3 [24.8 kB] 348s Get:190 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-copyright-perl all 0.003014-1 [20.5 kB] 348s Get:191 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-escape-perl all 2010.002-3 [16.1 kB] 348s Get:192 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 348s Get:193 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 348s Get:194 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 348s Get:195 http://ftpmaster.internal/ubuntu plucky/main arm64 licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 349s Get:196 http://ftpmaster.internal/ubuntu plucky/main arm64 diffstat arm64 1.67-1 [29.1 kB] 349s Get:197 http://ftpmaster.internal/ubuntu plucky/main arm64 libberkeleydb-perl arm64 0.66-1 [117 kB] 349s Get:198 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-xsaccessor-perl arm64 1.19-4build6 [32.8 kB] 349s Get:199 http://ftpmaster.internal/ubuntu plucky/main arm64 libconfig-tiny-perl all 2.30-1 [14.7 kB] 349s Get:200 http://ftpmaster.internal/ubuntu plucky/main arm64 libconst-fast-perl all 0.014-2 [8034 B] 349s Get:201 http://ftpmaster.internal/ubuntu plucky/main arm64 libcpanel-json-xs-perl arm64 4.39-1 [114 kB] 349s Get:202 http://ftpmaster.internal/ubuntu plucky/main arm64 libaliased-perl all 0.34-3 [12.8 kB] 349s Get:203 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-data-inheritable-perl all 0.10-1 [8038 B] 349s Get:204 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 349s Get:205 http://ftpmaster.internal/ubuntu plucky/main arm64 libexception-class-perl all 1.45-1 [28.6 kB] 349s Get:206 http://ftpmaster.internal/ubuntu plucky/main arm64 libiterator-perl all 0.03+ds1-2 [18.8 kB] 349s Get:207 http://ftpmaster.internal/ubuntu plucky/main arm64 libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 349s Get:208 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-dpath-perl all 0.60-1 [37.3 kB] 349s Get:209 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-domain-tld-perl all 1.75-4 [29.0 kB] 349s Get:210 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-domain-perl all 0.15-1 [10.4 kB] 349s Get:211 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 349s Get:212 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-netmask-perl all 2.0002-2 [24.8 kB] 350s Get:213 http://ftpmaster.internal/ubuntu plucky/main arm64 libnetaddr-ip-perl arm64 4.079+dfsg-2build5 [79.9 kB] 350s Get:214 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-ip-perl all 0.31-1 [17.2 kB] 350s Get:215 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-uri-perl all 0.07-3 [10.8 kB] 350s Get:216 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-size-perl arm64 0.84-1build1 [19.1 kB] 350s Get:217 http://ftpmaster.internal/ubuntu plucky/main arm64 libemail-address-xs-perl arm64 1.05-1build5 [29.0 kB] 350s Get:218 http://ftpmaster.internal/ubuntu plucky/main arm64 libipc-system-simple-perl all 1.30-2 [22.3 kB] 350s Get:219 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-basedir-perl all 0.09-2 [14.4 kB] 350s Get:220 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-find-rule-perl all 0.34-3 [24.4 kB] 350s Get:221 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-string-perl all 1.08-4 [11.1 kB] 350s Get:222 http://ftpmaster.internal/ubuntu plucky/main arm64 libfont-ttf-perl all 1.06-2 [323 kB] 350s Get:223 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 350s Get:224 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 350s Get:225 http://ftpmaster.internal/ubuntu plucky/main arm64 libipc-run3-perl all 0.049-1 [28.8 kB] 350s Get:226 http://ftpmaster.internal/ubuntu plucky/main arm64 libjson-maybexs-perl all 1.004008-1 [11.1 kB] 350s Get:227 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-compare-perl all 0.55-2 [62.9 kB] 351s Get:228 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-someutils-perl all 0.59-1 [30.4 kB] 351s Get:229 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-utilsby-perl all 0.12-2 [14.9 kB] 351s Get:230 http://ftpmaster.internal/ubuntu plucky/main arm64 libmldbm-perl all 2.05-4 [16.0 kB] 351s Get:231 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 351s Get:232 http://ftpmaster.internal/ubuntu plucky/main arm64 libimport-into-perl all 1.002005-2 [10.7 kB] 351s Get:233 http://ftpmaster.internal/ubuntu plucky/main arm64 librole-tiny-perl all 2.002004-1 [16.3 kB] 351s Get:234 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 351s Get:235 http://ftpmaster.internal/ubuntu plucky/main arm64 libmoo-perl all 2.005005-1 [47.4 kB] 351s Get:236 http://ftpmaster.internal/ubuntu plucky/main arm64 libstrictures-perl all 2.000006-1 [16.3 kB] 351s Get:237 http://ftpmaster.internal/ubuntu plucky/main arm64 libmoox-aliases-perl all 0.001006-2 [6796 B] 351s Get:238 http://ftpmaster.internal/ubuntu plucky/main arm64 libperlio-gzip-perl arm64 0.20-1build5 [14.6 kB] 351s Get:239 http://ftpmaster.internal/ubuntu plucky/main arm64 libperlio-utf8-strict-perl arm64 0.010-1build4 [11.1 kB] 351s Get:240 http://ftpmaster.internal/ubuntu plucky/main arm64 libproc-processtable-perl arm64 0.636-1build4 [35.5 kB] 351s Get:241 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-wildcards-perl all 1.05-3 [12.9 kB] 351s Get:242 http://ftpmaster.internal/ubuntu plucky/main arm64 libsereal-decoder-perl arm64 5.004+ds-1build4 [101 kB] 351s Get:243 http://ftpmaster.internal/ubuntu plucky/main arm64 libsereal-encoder-perl arm64 5.004+ds-1build4 [104 kB] 351s Get:244 http://ftpmaster.internal/ubuntu plucky/main arm64 libterm-readkey-perl arm64 2.38-2build5 [23.2 kB] 351s Get:245 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-levenshteinxs-perl arm64 0.03-5build5 [8052 B] 351s Get:246 http://ftpmaster.internal/ubuntu plucky/main arm64 libmarkdown2 arm64 2.2.7-2.1 [37.2 kB] 351s Get:247 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-markdown-discount-perl arm64 0.18-1 [12.4 kB] 351s Get:248 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-messagepack-perl arm64 1.02-1build5 [30.1 kB] 351s Get:249 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-xslate-perl arm64 3.5.9-2build1 [161 kB] 351s Get:250 http://ftpmaster.internal/ubuntu plucky/main arm64 libtime-duration-perl all 1.21-2 [12.3 kB] 351s Get:251 http://ftpmaster.internal/ubuntu plucky/main arm64 libtime-moment-perl arm64 0.44-2build5 [72.1 kB] 352s Get:252 http://ftpmaster.internal/ubuntu plucky/main arm64 libunicode-utf8-perl arm64 0.62-2build4 [17.9 kB] 352s Get:253 http://ftpmaster.internal/ubuntu plucky/main arm64 libcgi-pm-perl all 4.67-1 [185 kB] 352s Get:254 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-form-perl all 6.12-1 [31.1 kB] 352s Get:255 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-mechanize-perl all 2.19-1ubuntu1 [93.3 kB] 352s Get:256 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 352s Get:257 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-sax-base-perl all 1.09-3 [18.9 kB] 352s Get:258 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 352s Get:259 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-libxml-perl arm64 2.0207+dfsg+really+2.0134-5build1 [297 kB] 352s Get:260 http://ftpmaster.internal/ubuntu plucky/main arm64 lzip arm64 1.25-2 [83.5 kB] 353s Get:261 http://ftpmaster.internal/ubuntu plucky/main arm64 lzop arm64 1.04-2build3 [82.8 kB] 353s Get:262 http://ftpmaster.internal/ubuntu plucky/main arm64 patchutils arm64 0.4.2-1build3 [75.3 kB] 353s Get:263 http://ftpmaster.internal/ubuntu plucky/main arm64 t1utils arm64 1.41-4build3 [61.0 kB] 353s Get:264 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 353s Get:265 http://ftpmaster.internal/ubuntu plucky/main arm64 lintian all 2.121.1+nmu1ubuntu2 [1075 kB] 354s Get:266 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-dpkg-perl all 3.010 [176 kB] 355s Get:267 http://ftpmaster.internal/ubuntu plucky/main arm64 libconvert-binhex-perl all 1.125-3 [27.1 kB] 355s Get:268 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-smtp-ssl-perl all 1.04-2 [6218 B] 355s Get:269 http://ftpmaster.internal/ubuntu plucky/main arm64 libmailtools-perl all 2.22-1 [77.1 kB] 355s Get:270 http://ftpmaster.internal/ubuntu plucky/main arm64 libmime-tools-perl all 5.515-1 [187 kB] 355s Get:271 http://ftpmaster.internal/ubuntu plucky/main arm64 libsuitesparseconfig7 arm64 1:7.8.3+dfsg-3 [13.2 kB] 355s Get:272 http://ftpmaster.internal/ubuntu plucky/universe arm64 libamd3 arm64 1:7.8.3+dfsg-3 [26.1 kB] 355s Get:273 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 355s Get:274 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 15-20250222-0ubuntu1 [444 kB] 356s Get:275 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 359s Get:276 http://ftpmaster.internal/ubuntu plucky/universe arm64 libarpack2t64 arm64 3.9.1-4 [94.4 kB] 359s Get:277 http://ftpmaster.internal/ubuntu plucky/universe arm64 libccolamd3 arm64 1:7.8.3+dfsg-3 [25.5 kB] 359s Get:278 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcamd3 arm64 1:7.8.3+dfsg-3 [22.6 kB] 359s Get:279 http://ftpmaster.internal/ubuntu plucky/main arm64 libcolamd3 arm64 1:7.8.3+dfsg-3 [18.3 kB] 359s Get:280 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcholmod5 arm64 1:7.8.3+dfsg-3 [614 kB] 360s Get:281 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcxsparse4 arm64 1:7.8.3+dfsg-3 [68.7 kB] 360s Get:282 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-double3 arm64 3.3.10-2fakesync1build1 [392 kB] 360s Get:283 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-single3 arm64 3.3.10-2fakesync1build1 [604 kB] 361s Get:284 http://ftpmaster.internal/ubuntu plucky/main arm64 libxfixes3 arm64 1:6.0.0-2build1 [11.2 kB] 361s Get:285 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcursor1 arm64 1:1.2.3-1 [22.2 kB] 361s Get:286 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 361s Get:287 http://ftpmaster.internal/ubuntu plucky/main arm64 libxinerama1 arm64 2:1.1.4-3build1 [6394 B] 361s Get:288 http://ftpmaster.internal/ubuntu plucky/universe arm64 libfltk1.3t64 arm64 1.3.8-6.1build2 [597 kB] 362s Get:289 http://ftpmaster.internal/ubuntu plucky/main arm64 libglvnd0 arm64 1.7.0-1build1 [60.6 kB] 362s Get:290 http://ftpmaster.internal/ubuntu plucky/main arm64 libx11-xcb1 arm64 2:1.8.10-2 [8020 B] 362s Get:291 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-dri3-0 arm64 1.17.0-2 [7606 B] 362s Get:292 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-glx0 arm64 1.17.0-2 [25.5 kB] 362s Get:293 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-present0 arm64 1.17.0-2 [6224 B] 362s Get:294 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xfixes0 arm64 1.17.0-2 [10.6 kB] 362s Get:295 http://ftpmaster.internal/ubuntu plucky/main arm64 libxxf86vm1 arm64 1:1.1.4-1build4 [9130 B] 362s Get:296 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-randr0 arm64 1.17.0-2 [18.5 kB] 362s Get:297 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-sync1 arm64 1.17.0-2 [9688 B] 362s Get:298 http://ftpmaster.internal/ubuntu plucky/main arm64 libxshmfence1 arm64 1.3-1build5 [4938 B] 362s Get:299 http://ftpmaster.internal/ubuntu plucky/main arm64 mesa-libgallium arm64 25.0.1-2ubuntu1 [9450 kB] 374s Get:300 http://ftpmaster.internal/ubuntu plucky/main arm64 libwayland-server0 arm64 1.23.1-3 [36.1 kB] 374s Get:301 http://ftpmaster.internal/ubuntu plucky/main arm64 libgbm1 arm64 25.0.1-2ubuntu1 [33.7 kB] 374s Get:302 http://ftpmaster.internal/ubuntu plucky/main arm64 libvulkan1 arm64 1.4.304.0-1 [158 kB] 374s Get:303 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl1-mesa-dri arm64 25.0.1-2ubuntu1 [34.5 kB] 375s Get:304 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx-mesa0 arm64 25.0.1-2ubuntu1 [151 kB] 375s Get:305 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx0 arm64 1.7.0-1build1 [33.2 kB] 375s Get:306 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl1 arm64 1.7.0-1build1 [106 kB] 375s Get:307 http://ftpmaster.internal/ubuntu plucky/universe arm64 libfltk-gl1.3t64 arm64 1.3.8-6.1build2 [42.1 kB] 375s Get:308 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgl2ps1.4 arm64 1.4.2+dfsg1-2build1 [40.6 kB] 375s Get:309 http://ftpmaster.internal/ubuntu plucky/main arm64 libltdl7 arm64 2.5.4-4 [43.0 kB] 375s Get:310 http://ftpmaster.internal/ubuntu plucky/universe arm64 libglpk40 arm64 5.0-1build2 [337 kB] 376s Get:311 http://ftpmaster.internal/ubuntu plucky/main arm64 libopengl0 arm64 1.7.0-1build1 [35.1 kB] 376s Get:312 http://ftpmaster.internal/ubuntu plucky/main arm64 libglu1-mesa arm64 9.0.2-1.1build1 [139 kB] 376s Get:313 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhwy1t64 arm64 1.2.0-3ubuntu3 [605 kB] 376s Get:314 http://ftpmaster.internal/ubuntu plucky/main arm64 liblcms2-2 arm64 2.16-2 [170 kB] 377s Get:315 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjxl0.11 arm64 0.11.1-1 [937 kB] 378s Get:316 http://ftpmaster.internal/ubuntu plucky/main arm64 libwmflite-0.2-7 arm64 0.2.13-1.1build3 [68.6 kB] 378s Get:317 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgraphicsmagick-q16-3t64 arm64 1.4+really1.3.45+hg17689-1 [1229 kB] 379s Get:318 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgraphicsmagick++-q16-12t64 arm64 1.4+really1.3.45+hg17689-1 [112 kB] 379s Get:319 http://ftpmaster.internal/ubuntu plucky/universe arm64 libaec0 arm64 1.1.3-1 [22.0 kB] 379s Get:320 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsz2 arm64 1.1.3-1 [5254 B] 380s Get:321 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-310 arm64 1.14.5+repack-3 [1331 kB] 381s Get:322 http://ftpmaster.internal/ubuntu plucky/main arm64 libasound2-data all 1.2.13-1build1 [21.1 kB] 381s Get:323 http://ftpmaster.internal/ubuntu plucky/main arm64 libasound2t64 arm64 1.2.13-1build1 [390 kB] 382s Get:324 http://ftpmaster.internal/ubuntu plucky/main arm64 libopus0 arm64 1.5.2-2 [2891 kB] 385s Get:325 http://ftpmaster.internal/ubuntu plucky/main arm64 libsamplerate0 arm64 0.2.2-4build1 [1343 kB] 387s Get:326 http://ftpmaster.internal/ubuntu plucky/main arm64 libjack-jackd2-0 arm64 1.9.22~dfsg-4 [286 kB] 387s Get:327 http://ftpmaster.internal/ubuntu plucky/universe arm64 libportaudio2 arm64 19.6.0-1.2build3 [65.4 kB] 387s Get:328 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqhull-r8.0 arm64 2020.2-6build1 [189 kB] 387s Get:329 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqrupdate1 arm64 1.1.5-1 [38.6 kB] 387s Get:330 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 387s Get:331 http://ftpmaster.internal/ubuntu plucky/universe arm64 libb2-1 arm64 0.98.1-1.1build1 [17.1 kB] 387s Get:332 http://ftpmaster.internal/ubuntu plucky/universe arm64 libdouble-conversion3 arm64 3.3.1-1 [38.8 kB] 388s Get:333 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-16-0 arm64 10.45-1 [222 kB] 388s Get:334 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6core6t64 arm64 6.8.2+dfsg-5 [1942 kB] 390s Get:335 http://ftpmaster.internal/ubuntu plucky/main arm64 libwayland-client0 arm64 1.23.1-3 [27.0 kB] 390s Get:336 http://ftpmaster.internal/ubuntu plucky/main arm64 libegl-mesa0 arm64 25.0.1-2ubuntu1 [122 kB] 390s Get:337 http://ftpmaster.internal/ubuntu plucky/main arm64 libegl1 arm64 1.7.0-1build1 [29.5 kB] 390s Get:338 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 390s Get:339 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 390s Get:340 http://ftpmaster.internal/ubuntu plucky/main arm64 libmtdev1t64 arm64 1.1.7-1 [14.6 kB] 391s Get:341 http://ftpmaster.internal/ubuntu plucky/main arm64 libwacom-common all 2.14.0-1 [103 kB] 391s Get:342 http://ftpmaster.internal/ubuntu plucky/main arm64 libwacom9 arm64 2.14.0-1 [26.7 kB] 391s Get:343 http://ftpmaster.internal/ubuntu plucky/main arm64 libinput-bin arm64 1.27.1-1 [23.5 kB] 391s Get:344 http://ftpmaster.internal/ubuntu plucky/main arm64 libinput10 arm64 1.27.1-1 [136 kB] 393s Get:345 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmd4c0 arm64 0.5.2-2 [42.4 kB] 393s Get:346 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6dbus6 arm64 6.8.2+dfsg-5 [273 kB] 393s Get:347 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 393s Get:348 http://ftpmaster.internal/ubuntu plucky/universe arm64 libts0t64 arm64 1.22-1.1build1 [63.9 kB] 393s Get:349 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-util1 arm64 0.4.1-1 [10.9 kB] 393s Get:350 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-image0 arm64 0.4.0-2build1 [10.8 kB] 393s Get:351 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render-util0 arm64 0.3.10-1 [10.5 kB] 393s Get:352 http://ftpmaster.internal/ubuntu plucky/universe arm64 libxcb-cursor0 arm64 0.1.5-1 [10.6 kB] 393s Get:353 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-icccm4 arm64 0.4.2-1 [10.9 kB] 393s Get:354 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-keysyms1 arm64 0.4.1-1 [8802 B] 393s Get:355 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shape0 arm64 1.17.0-2 [6246 B] 393s Get:356 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xinput0 arm64 1.17.0-2 [34.2 kB] 393s Get:357 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xkb1 arm64 1.17.0-2 [32.5 kB] 393s Get:358 http://ftpmaster.internal/ubuntu plucky/main arm64 libxkbcommon-x11-0 arm64 1.7.0-2 [13.8 kB] 393s Get:359 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6gui6 arm64 6.8.2+dfsg-5 [3283 kB] 395s Get:360 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-common-data arm64 0.8-16ubuntu1 [30.9 kB] 395s Get:361 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-common3 arm64 0.8-16ubuntu1 [22.9 kB] 395s Get:362 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-client3 arm64 0.8-16ubuntu1 [26.9 kB] 395s Get:363 http://ftpmaster.internal/ubuntu plucky/main arm64 libcups2t64 arm64 2.4.11-0ubuntu2 [274 kB] 395s Get:364 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6widgets6 arm64 6.8.2+dfsg-5 [2789 kB] 399s Get:365 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6printsupport6 arm64 6.8.2+dfsg-5 [223 kB] 399s Get:366 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqscintilla2-qt6-15 arm64 2.14.1+dfsg-1build4 [1137 kB] 400s Get:367 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6core5compat6 arm64 6.8.2-3 [144 kB] 400s Get:368 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6sql6 arm64 6.8.2+dfsg-5 [143 kB] 401s Get:369 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6help6 arm64 6.8.2-3 [194 kB] 401s Get:370 http://ftpmaster.internal/ubuntu plucky/main arm64 libduktape207 arm64 2.7.0+tests-0ubuntu3 [144 kB] 401s Get:371 http://ftpmaster.internal/ubuntu plucky/main arm64 libproxy1v5 arm64 0.5.9-1 [27.2 kB] 401s Get:372 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6network6 arm64 6.8.2+dfsg-5 [847 kB] 402s Get:373 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6opengl6 arm64 6.8.2+dfsg-5 [432 kB] 403s Get:374 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6openglwidgets6 arm64 6.8.2+dfsg-5 [43.6 kB] 403s Get:375 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6xml6 arm64 6.8.2+dfsg-5 [82.2 kB] 403s Get:376 http://ftpmaster.internal/ubuntu plucky/main arm64 libogg0 arm64 1.3.5-3build1 [22.6 kB] 403s Get:377 http://ftpmaster.internal/ubuntu plucky/main arm64 libflac12t64 arm64 1.4.3+ds-4 [168 kB] 403s Get:378 http://ftpmaster.internal/ubuntu plucky/main arm64 libmp3lame0 arm64 3.100-6build1 [141 kB] 403s Get:379 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpg123-0t64 arm64 1.32.10-1 [173 kB] 403s Get:380 http://ftpmaster.internal/ubuntu plucky/main arm64 libvorbis0a arm64 1.3.7-2 [95.0 kB] 403s Get:381 http://ftpmaster.internal/ubuntu plucky/main arm64 libvorbisenc2 arm64 1.3.7-2 [80.0 kB] 403s Get:382 http://ftpmaster.internal/ubuntu plucky/main arm64 libsndfile1 arm64 1.2.2-2 [209 kB] 404s Get:383 http://ftpmaster.internal/ubuntu plucky/universe arm64 libspqr4 arm64 1:7.8.3+dfsg-3 [130 kB] 404s Get:384 http://ftpmaster.internal/ubuntu plucky/universe arm64 libumfpack6 arm64 1:7.8.3+dfsg-3 [249 kB] 405s Get:385 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-unidecode-perl all 1.30-3 [105 kB] 405s Get:386 http://ftpmaster.internal/ubuntu plucky/universe arm64 texinfo-lib arm64 7.1.1-1 [134 kB] 405s Get:387 http://ftpmaster.internal/ubuntu plucky/universe arm64 tex-common all 6.19 [29.8 kB] 405s Get:388 http://ftpmaster.internal/ubuntu plucky/universe arm64 texinfo all 7.1.1-1 [1272 kB] 406s Get:389 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-common all 9.4.0-1 [6087 kB] 413s Get:390 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave arm64 9.4.0-1 [9031 kB] 423s Get:391 http://ftpmaster.internal/ubuntu plucky/main arm64 libncurses-dev arm64 6.5+20250216-2 [389 kB] 423s Get:392 http://ftpmaster.internal/ubuntu plucky/main arm64 libreadline-dev arm64 8.2-6 [179 kB] 424s Get:393 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-fortran-310 arm64 1.14.5+repack-3 [109 kB] 424s Get:394 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-310 arm64 1.14.5+repack-3 [59.8 kB] 424s Get:395 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-fortran-310 arm64 1.14.5+repack-3 [31.8 kB] 424s Get:396 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-cpp-310 arm64 1.14.5+repack-3 [117 kB] 424s Get:397 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-cpp-310 arm64 1.14.5+repack-3 [11.6 kB] 424s Get:398 http://ftpmaster.internal/ubuntu plucky/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1ubuntu1 [894 kB] 425s Get:399 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8-dev arm64 2.1.5-3ubuntu2 [306 kB] 425s Get:400 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 425s Get:401 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 425s Get:402 http://ftpmaster.internal/ubuntu plucky/universe arm64 libaec-dev arm64 1.1.3-1 [19.3 kB] 425s Get:403 http://ftpmaster.internal/ubuntu plucky/main arm64 libbrotli-dev arm64 1.1.0-2build4 [359 kB] 426s Get:404 http://ftpmaster.internal/ubuntu plucky/main arm64 libidn2-dev arm64 2.3.7-2build2 [120 kB] 426s Get:405 http://ftpmaster.internal/ubuntu plucky/main arm64 comerr-dev arm64 2.1-1.47.2-1ubuntu1 [45.1 kB] 426s Get:406 http://ftpmaster.internal/ubuntu plucky/main arm64 libgssrpc4t64 arm64 1.21.3-4ubuntu2 [58.5 kB] 426s Get:407 http://ftpmaster.internal/ubuntu plucky/main arm64 libkadm5clnt-mit12 arm64 1.21.3-4ubuntu2 [40.3 kB] 426s Get:408 http://ftpmaster.internal/ubuntu plucky/main arm64 libkdb5-10t64 arm64 1.21.3-4ubuntu2 [40.9 kB] 426s Get:409 http://ftpmaster.internal/ubuntu plucky/main arm64 libkadm5srv-mit12 arm64 1.21.3-4ubuntu2 [53.8 kB] 426s Get:410 http://ftpmaster.internal/ubuntu plucky/main arm64 krb5-multidev arm64 1.21.3-4ubuntu2 [125 kB] 426s Get:411 http://ftpmaster.internal/ubuntu plucky/main arm64 libkrb5-dev arm64 1.21.3-4ubuntu2 [11.9 kB] 426s Get:412 http://ftpmaster.internal/ubuntu plucky/main arm64 libldap-dev arm64 2.6.9+dfsg-1~exp2ubuntu1 [318 kB] 427s Get:413 http://ftpmaster.internal/ubuntu plucky/main arm64 libpkgconf3 arm64 1.8.1-4 [31.4 kB] 427s Get:414 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf-bin arm64 1.8.1-4 [20.9 kB] 427s Get:415 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf arm64 1.8.1-4 [16.7 kB] 427s Get:416 http://ftpmaster.internal/ubuntu plucky/main arm64 libnghttp2-dev arm64 1.64.0-1 [120 kB] 427s Get:417 http://ftpmaster.internal/ubuntu plucky/main arm64 libpsl-dev arm64 0.21.2-1.1build1 [77.2 kB] 427s Get:418 http://ftpmaster.internal/ubuntu plucky/main arm64 libgmpxx4ldbl arm64 2:6.3.0+dfsg-3ubuntu1 [10.1 kB] 427s Get:419 http://ftpmaster.internal/ubuntu plucky/main arm64 libgmp-dev arm64 2:6.3.0+dfsg-3ubuntu1 [335 kB] 427s Get:420 http://ftpmaster.internal/ubuntu plucky/main arm64 libevent-2.1-7t64 arm64 2.1.12-stable-10 [140 kB] 427s Get:421 http://ftpmaster.internal/ubuntu plucky/main arm64 libunbound8 arm64 1.22.0-1ubuntu1 [437 kB] 428s Get:422 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls-dane0t64 arm64 3.8.9-2ubuntu2 [24.4 kB] 428s Get:423 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls-openssl27t64 arm64 3.8.9-2ubuntu2 [24.4 kB] 428s Get:424 http://ftpmaster.internal/ubuntu plucky/main arm64 libp11-kit-dev arm64 0.25.5-2ubuntu3 [23.5 kB] 428s Get:425 http://ftpmaster.internal/ubuntu plucky/main arm64 libtasn1-6-dev arm64 4.20.0-2 [91.1 kB] 428s Get:426 http://ftpmaster.internal/ubuntu plucky/main arm64 nettle-dev arm64 3.10.1-1 [1190 kB] 430s Get:427 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls28-dev arm64 3.8.9-2ubuntu2 [1143 kB] 431s Get:428 http://ftpmaster.internal/ubuntu plucky/main arm64 librtmp-dev arm64 2.4+20151223.gitfa8646d.1-2build7 [69.4 kB] 431s Get:429 http://ftpmaster.internal/ubuntu plucky/main arm64 libssl-dev arm64 3.4.1-1ubuntu1 [3287 kB] 435s Get:430 http://ftpmaster.internal/ubuntu plucky/main arm64 libssh2-1-dev arm64 1.11.1-1 [286 kB] 435s Get:431 http://ftpmaster.internal/ubuntu plucky/main arm64 libzstd-dev arm64 1.5.6+dfsg-2 [353 kB] 435s Get:432 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl4-openssl-dev arm64 8.12.1-3ubuntu1 [506 kB] 436s Get:433 http://ftpmaster.internal/ubuntu plucky/universe arm64 hdf5-helpers arm64 1.14.5+repack-3 [17.0 kB] 436s Get:434 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-dev arm64 1.14.5+repack-3 [3581 kB] 440s Get:435 http://ftpmaster.internal/ubuntu plucky/main arm64 xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 440s Get:436 http://ftpmaster.internal/ubuntu plucky/main arm64 x11proto-dev all 2024.1-1 [606 kB] 441s Get:437 http://ftpmaster.internal/ubuntu plucky/main arm64 libxau-dev arm64 1:1.0.11-1 [10.2 kB] 441s Get:438 http://ftpmaster.internal/ubuntu plucky/main arm64 libxdmcp-dev arm64 1:1.1.5-1 [26.4 kB] 441s Get:439 http://ftpmaster.internal/ubuntu plucky/main arm64 xtrans-dev all 1.4.0-1 [68.9 kB] 441s Get:440 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb1-dev arm64 1.17.0-2 [91.7 kB] 441s Get:441 http://ftpmaster.internal/ubuntu plucky/main arm64 libx11-dev arm64 2:1.8.10-2 [746 kB] 442s Get:442 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx-dev arm64 1.7.0-1build1 [14.2 kB] 442s Get:443 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl-dev arm64 1.7.0-1build1 [102 kB] 442s Get:444 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas-dev arm64 3.12.1-2 [126 kB] 442s Get:445 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack-dev arm64 3.12.1-2 [4439 kB] 447s Get:446 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-long3 arm64 3.3.10-2fakesync1build1 [653 kB] 448s Get:447 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-bin arm64 3.3.10-2fakesync1build1 [34.1 kB] 448s Get:448 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-dev arm64 3.3.10-2fakesync1build1 [1523 kB] 449s Get:449 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran-14-dev arm64 14.2.0-17ubuntu3 [498 kB] 450s Get:450 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [11.4 MB] 463s Get:451 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14 arm64 14.2.0-17ubuntu3 [13.6 kB] 463s Get:452 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1022 B] 463s Get:453 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran arm64 4:14.2.0-1ubuntu1 [1166 B] 463s Get:454 http://ftpmaster.internal/ubuntu plucky/main arm64 libstdc++-14-dev arm64 14.2.0-17ubuntu3 [2499 kB] 466s Get:455 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [12.1 MB] 478s Get:456 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14 arm64 14.2.0-17ubuntu3 [21.8 kB] 479s Get:457 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [956 B] 479s Get:458 http://ftpmaster.internal/ubuntu plucky/main arm64 g++ arm64 4:14.2.0-1ubuntu1 [1080 B] 479s Get:459 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-dev arm64 9.4.0-1 [459 kB] 479s Get:460 http://ftpmaster.internal/ubuntu plucky/universe arm64 dh-octave all 1.8.0 [19.7 kB] 479s Get:461 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontenc1 arm64 1:1.1.8-1build1 [13.9 kB] 479s Get:462 http://ftpmaster.internal/ubuntu plucky/main arm64 libunwind8 arm64 1.6.2-3.1 [53.5 kB] 479s Get:463 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 479s Get:464 http://ftpmaster.internal/ubuntu plucky/main arm64 libxmu6 arm64 2:1.1.3-3build2 [47.5 kB] 479s Get:465 http://ftpmaster.internal/ubuntu plucky/main arm64 libxaw7 arm64 2:1.0.16-1 [184 kB] 480s Get:466 http://ftpmaster.internal/ubuntu plucky/main arm64 libxfont2 arm64 1:2.0.6-1build1 [88.7 kB] 480s Get:467 http://ftpmaster.internal/ubuntu plucky/main arm64 libxkbfile1 arm64 1:1.1.0-1build4 [69.4 kB] 480s Get:468 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrandr2 arm64 2:1.5.4-1 [19.6 kB] 480s Get:469 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-io arm64 2.6.4-3build2 [222 kB] 480s Get:470 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-statistics-common all 1.7.3-2 [932 kB] 481s Get:471 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-statistics arm64 1.7.3-2 [165 kB] 481s Get:472 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-xkb-utils arm64 7.7+9 [165 kB] 482s Get:473 http://ftpmaster.internal/ubuntu plucky/main arm64 xserver-common all 2:21.1.16-1ubuntu1 [34.4 kB] 482s Get:474 http://ftpmaster.internal/ubuntu plucky/universe arm64 xvfb arm64 2:21.1.16-1ubuntu1 [870 kB] 484s Fetched 184 MB in 3min 30s (877 kB/s) 484s Selecting previously unselected package libstemmer0d:arm64. 484s (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 ... 81647 files and directories currently installed.) 484s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_arm64.deb ... 484s Unpacking libstemmer0d:arm64 (2.2.0-4build1) ... 484s Selecting previously unselected package libappstream5:arm64. 484s Preparing to unpack .../001-libappstream5_1.0.4-1_arm64.deb ... 484s Unpacking libappstream5:arm64 (1.0.4-1) ... 484s Selecting previously unselected package appstream. 484s Preparing to unpack .../002-appstream_1.0.4-1_arm64.deb ... 484s Unpacking appstream (1.0.4-1) ... 484s Selecting previously unselected package m4. 484s Preparing to unpack .../003-m4_1.4.19-7_arm64.deb ... 484s Unpacking m4 (1.4.19-7) ... 484s Selecting previously unselected package autoconf. 484s Preparing to unpack .../004-autoconf_2.72-3ubuntu1_all.deb ... 484s Unpacking autoconf (2.72-3ubuntu1) ... 484s Selecting previously unselected package autotools-dev. 484s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 484s Unpacking autotools-dev (20220109.1) ... 484s Selecting previously unselected package automake. 484s Preparing to unpack .../006-automake_1%3a1.17-3ubuntu1_all.deb ... 484s Unpacking automake (1:1.17-3ubuntu1) ... 484s Selecting previously unselected package autopoint. 484s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 484s Unpacking autopoint (0.23.1-1) ... 484s Selecting previously unselected package libcapture-tiny-perl. 484s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 484s Unpacking libcapture-tiny-perl (0.50-1) ... 484s Selecting previously unselected package libparams-util-perl. 484s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_arm64.deb ... 484s Unpacking libparams-util-perl (1.102-3build1) ... 484s Selecting previously unselected package libsub-install-perl. 484s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 484s Unpacking libsub-install-perl (0.929-1) ... 484s Selecting previously unselected package libdata-optlist-perl. 484s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 484s Unpacking libdata-optlist-perl (0.114-1) ... 485s Selecting previously unselected package libb-hooks-op-check-perl:arm64. 485s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_arm64.deb ... 485s Unpacking libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 485s Selecting previously unselected package libdynaloader-functions-perl. 485s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 485s Unpacking libdynaloader-functions-perl (0.004-1) ... 485s Selecting previously unselected package libdevel-callchecker-perl:arm64. 485s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_arm64.deb ... 485s Unpacking libdevel-callchecker-perl:arm64 (0.009-1build1) ... 485s Selecting previously unselected package libparams-classify-perl:arm64. 485s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_arm64.deb ... 485s Unpacking libparams-classify-perl:arm64 (0.015-2build6) ... 485s Selecting previously unselected package libmodule-runtime-perl. 485s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 485s Unpacking libmodule-runtime-perl (0.016-2) ... 485s Selecting previously unselected package libtry-tiny-perl. 485s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 485s Unpacking libtry-tiny-perl (0.32-1) ... 485s Selecting previously unselected package libmodule-implementation-perl. 485s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 485s Unpacking libmodule-implementation-perl (0.09-2) ... 485s Selecting previously unselected package libpackage-stash-perl. 485s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 485s Unpacking libpackage-stash-perl (0.40-1) ... 485s Selecting previously unselected package libclass-load-perl. 485s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 485s Unpacking libclass-load-perl (0.25-2) ... 485s Selecting previously unselected package libio-stringy-perl. 485s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 485s Unpacking libio-stringy-perl (2.113-2) ... 485s Selecting previously unselected package libparams-validate-perl:arm64. 485s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_arm64.deb ... 485s Unpacking libparams-validate-perl:arm64 (1.31-2build4) ... 485s Selecting previously unselected package libsub-exporter-perl. 485s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 485s Unpacking libsub-exporter-perl (0.990-1) ... 485s Selecting previously unselected package libgetopt-long-descriptive-perl. 485s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 485s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 485s Selecting previously unselected package libio-tiecombine-perl. 485s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 485s Unpacking libio-tiecombine-perl (1.005-3) ... 485s Selecting previously unselected package libmodule-pluggable-perl. 485s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 485s Unpacking libmodule-pluggable-perl (5.2-5) ... 485s Selecting previously unselected package libstring-rewriteprefix-perl. 485s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 485s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 485s Selecting previously unselected package libapp-cmd-perl. 485s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 485s Unpacking libapp-cmd-perl (0.337-2) ... 485s Selecting previously unselected package libboolean-perl. 485s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 485s Unpacking libboolean-perl (0.46-3) ... 485s Selecting previously unselected package libsub-uplevel-perl. 485s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 485s Unpacking libsub-uplevel-perl (0.2800-3) ... 485s Selecting previously unselected package libtest-exception-perl. 485s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 485s Unpacking libtest-exception-perl (0.43-3) ... 485s Selecting previously unselected package libcarp-assert-more-perl. 485s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 485s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 485s Selecting previously unselected package libfile-which-perl. 485s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 485s Unpacking libfile-which-perl (1.27-2) ... 485s Selecting previously unselected package libfile-homedir-perl. 485s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 485s Unpacking libfile-homedir-perl (1.006-2) ... 485s Selecting previously unselected package libclone-choose-perl. 485s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 485s Unpacking libclone-choose-perl (0.010-2) ... 485s Selecting previously unselected package libhash-merge-perl. 485s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 485s Unpacking libhash-merge-perl (0.302-1) ... 485s Selecting previously unselected package libjson-perl. 485s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 485s Unpacking libjson-perl (4.10000-1) ... 485s Selecting previously unselected package libexporter-tiny-perl. 485s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 485s Unpacking libexporter-tiny-perl (1.006002-1) ... 485s Selecting previously unselected package liblist-moreutils-xs-perl. 485s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_arm64.deb ... 485s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 485s Selecting previously unselected package liblist-moreutils-perl. 485s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 486s Unpacking liblist-moreutils-perl (0.430-2) ... 486s Selecting previously unselected package liblog-log4perl-perl. 486s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 486s Unpacking liblog-log4perl-perl (1.57-1) ... 486s Selecting previously unselected package libmouse-perl:arm64. 486s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_arm64.deb ... 486s Unpacking libmouse-perl:arm64 (2.5.11-1build1) ... 486s Selecting previously unselected package libmousex-nativetraits-perl. 486s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 486s Unpacking libmousex-nativetraits-perl (1.09-3) ... 486s Selecting previously unselected package libmousex-strictconstructor-perl. 486s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 486s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 486s Selecting previously unselected package libparse-recdescent-perl. 486s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 486s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 486s Selecting previously unselected package libpath-tiny-perl. 486s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 486s Unpacking libpath-tiny-perl (0.146-1) ... 486s Selecting previously unselected package libpod-pom-perl. 486s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 486s Unpacking libpod-pom-perl (2.01-4) ... 486s Selecting previously unselected package libregexp-common-perl. 486s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 486s Unpacking libregexp-common-perl (2024080801-1) ... 486s Selecting previously unselected package libyaml-tiny-perl. 486s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 486s Unpacking libyaml-tiny-perl (1.76-1) ... 486s Selecting previously unselected package libconfig-model-perl. 486s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 486s Unpacking libconfig-model-perl (2.155-1) ... 486s Selecting previously unselected package libyaml-pp-perl. 486s Preparing to unpack .../051-libyaml-pp-perl_0.39.0-1_all.deb ... 486s Unpacking libyaml-pp-perl (0.39.0-1) ... 486s Selecting previously unselected package cme. 486s Preparing to unpack .../052-cme_1.041-1_all.deb ... 486s Unpacking cme (1.041-1) ... 486s Selecting previously unselected package libisl23:arm64. 486s Preparing to unpack .../053-libisl23_0.27-1_arm64.deb ... 486s Unpacking libisl23:arm64 (0.27-1) ... 486s Selecting previously unselected package libmpc3:arm64. 486s Preparing to unpack .../054-libmpc3_1.3.1-1build2_arm64.deb ... 486s Unpacking libmpc3:arm64 (1.3.1-1build2) ... 486s Selecting previously unselected package cpp-14-aarch64-linux-gnu. 486s Preparing to unpack .../055-cpp-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 486s Unpacking cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 486s Selecting previously unselected package cpp-14. 486s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu3_arm64.deb ... 486s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 486s Selecting previously unselected package cpp-aarch64-linux-gnu. 486s Preparing to unpack .../057-cpp-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 486s Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 486s Selecting previously unselected package cpp. 486s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_arm64.deb ... 486s Unpacking cpp (4:14.2.0-1ubuntu1) ... 486s Selecting previously unselected package libdebhelper-perl. 486s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 486s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 486s Selecting previously unselected package libcc1-0:arm64. 487s Preparing to unpack .../060-libcc1-0_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libcc1-0:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libgomp1:arm64. 487s Preparing to unpack .../061-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libitm1:arm64. 487s Preparing to unpack .../062-libitm1_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libitm1:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libasan8:arm64. 487s Preparing to unpack .../063-libasan8_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libasan8:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package liblsan0:arm64. 487s Preparing to unpack .../064-liblsan0_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking liblsan0:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libtsan2:arm64. 487s Preparing to unpack .../065-libtsan2_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libtsan2:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libubsan1:arm64. 487s Preparing to unpack .../066-libubsan1_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libubsan1:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libhwasan0:arm64. 487s Preparing to unpack .../067-libhwasan0_15-20250222-0ubuntu1_arm64.deb ... 487s Unpacking libhwasan0:arm64 (15-20250222-0ubuntu1) ... 487s Selecting previously unselected package libgcc-14-dev:arm64. 487s Preparing to unpack .../068-libgcc-14-dev_14.2.0-17ubuntu3_arm64.deb ... 487s Unpacking libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 487s Selecting previously unselected package gcc-14-aarch64-linux-gnu. 487s Preparing to unpack .../069-gcc-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 487s Unpacking gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 488s Selecting previously unselected package gcc-14. 488s Preparing to unpack .../070-gcc-14_14.2.0-17ubuntu3_arm64.deb ... 488s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 488s Selecting previously unselected package gcc-aarch64-linux-gnu. 488s Preparing to unpack .../071-gcc-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 488s Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 488s Selecting previously unselected package gcc. 488s Preparing to unpack .../072-gcc_4%3a14.2.0-1ubuntu1_arm64.deb ... 488s Unpacking gcc (4:14.2.0-1ubuntu1) ... 488s Selecting previously unselected package libtool. 488s Preparing to unpack .../073-libtool_2.5.4-4_all.deb ... 488s Unpacking libtool (2.5.4-4) ... 488s Selecting previously unselected package dh-autoreconf. 488s Preparing to unpack .../074-dh-autoreconf_20_all.deb ... 488s Unpacking dh-autoreconf (20) ... 488s Selecting previously unselected package libarchive-zip-perl. 488s Preparing to unpack .../075-libarchive-zip-perl_1.68-1_all.deb ... 488s Unpacking libarchive-zip-perl (1.68-1) ... 488s Selecting previously unselected package libfile-stripnondeterminism-perl. 488s Preparing to unpack .../076-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 488s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 488s Selecting previously unselected package dh-strip-nondeterminism. 488s Preparing to unpack .../077-dh-strip-nondeterminism_1.14.1-2_all.deb ... 488s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 488s Selecting previously unselected package debugedit. 488s Preparing to unpack .../078-debugedit_1%3a5.1-2_arm64.deb ... 488s Unpacking debugedit (1:5.1-2) ... 488s Selecting previously unselected package dwz. 488s Preparing to unpack .../079-dwz_0.15-1build6_arm64.deb ... 488s Unpacking dwz (0.15-1build6) ... 488s Selecting previously unselected package gettext. 488s Preparing to unpack .../080-gettext_0.23.1-1_arm64.deb ... 488s Unpacking gettext (0.23.1-1) ... 488s Selecting previously unselected package intltool-debian. 488s Preparing to unpack .../081-intltool-debian_0.35.0+20060710.6_all.deb ... 488s Unpacking intltool-debian (0.35.0+20060710.6) ... 488s Selecting previously unselected package po-debconf. 488s Preparing to unpack .../082-po-debconf_1.0.21+nmu1_all.deb ... 488s Unpacking po-debconf (1.0.21+nmu1) ... 488s Selecting previously unselected package debhelper. 488s Preparing to unpack .../083-debhelper_13.24.1ubuntu2_all.deb ... 488s Unpacking debhelper (13.24.1ubuntu2) ... 488s Selecting previously unselected package aglfn. 488s Preparing to unpack .../084-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 488s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 488s Selecting previously unselected package gnuplot-data. 488s Preparing to unpack .../085-gnuplot-data_6.0.2+dfsg1-1_all.deb ... 488s Unpacking gnuplot-data (6.0.2+dfsg1-1) ... 488s Selecting previously unselected package fonts-dejavu-mono. 488s Preparing to unpack .../086-fonts-dejavu-mono_2.37-8_all.deb ... 488s Unpacking fonts-dejavu-mono (2.37-8) ... 488s Selecting previously unselected package fonts-dejavu-core. 488s Preparing to unpack .../087-fonts-dejavu-core_2.37-8_all.deb ... 488s Unpacking fonts-dejavu-core (2.37-8) ... 488s Selecting previously unselected package fonts-freefont-otf. 488s Preparing to unpack .../088-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 488s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 488s Selecting previously unselected package fontconfig-config. 488s Preparing to unpack .../089-fontconfig-config_2.15.0-2ubuntu1_arm64.deb ... 489s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 489s Selecting previously unselected package libfontconfig1:arm64. 489s Preparing to unpack .../090-libfontconfig1_2.15.0-2ubuntu1_arm64.deb ... 489s Unpacking libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 489s Selecting previously unselected package libpixman-1-0:arm64. 489s Preparing to unpack .../091-libpixman-1-0_0.44.0-3_arm64.deb ... 489s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 489s Selecting previously unselected package libxcb-render0:arm64. 489s Preparing to unpack .../092-libxcb-render0_1.17.0-2_arm64.deb ... 489s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 489s Selecting previously unselected package libxcb-shm0:arm64. 489s Preparing to unpack .../093-libxcb-shm0_1.17.0-2_arm64.deb ... 489s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 489s Selecting previously unselected package libxrender1:arm64. 489s Preparing to unpack .../094-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 489s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 489s Selecting previously unselected package libcairo2:arm64. 489s Preparing to unpack .../095-libcairo2_1.18.2-2_arm64.deb ... 489s Unpacking libcairo2:arm64 (1.18.2-2) ... 489s Selecting previously unselected package libsharpyuv0:arm64. 489s Preparing to unpack .../096-libsharpyuv0_1.5.0-0.1_arm64.deb ... 489s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 489s Selecting previously unselected package libaom3:arm64. 489s Preparing to unpack .../097-libaom3_3.12.0-1_arm64.deb ... 489s Unpacking libaom3:arm64 (3.12.0-1) ... 489s Selecting previously unselected package libheif-plugin-aomdec:arm64. 489s Preparing to unpack .../098-libheif-plugin-aomdec_1.19.7-1_arm64.deb ... 489s Unpacking libheif-plugin-aomdec:arm64 (1.19.7-1) ... 489s Selecting previously unselected package libde265-0:arm64. 489s Preparing to unpack .../099-libde265-0_1.0.15-1build5_arm64.deb ... 489s Unpacking libde265-0:arm64 (1.0.15-1build5) ... 489s Selecting previously unselected package libheif-plugin-libde265:arm64. 489s Preparing to unpack .../100-libheif-plugin-libde265_1.19.7-1_arm64.deb ... 489s Unpacking libheif-plugin-libde265:arm64 (1.19.7-1) ... 489s Selecting previously unselected package libheif1:arm64. 489s Preparing to unpack .../101-libheif1_1.19.7-1_arm64.deb ... 489s Unpacking libheif1:arm64 (1.19.7-1) ... 489s Selecting previously unselected package libimagequant0:arm64. 489s Preparing to unpack .../102-libimagequant0_2.18.0-1build1_arm64.deb ... 489s Unpacking libimagequant0:arm64 (2.18.0-1build1) ... 489s Selecting previously unselected package libjpeg-turbo8:arm64. 489s Preparing to unpack .../103-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 489s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 489s Selecting previously unselected package libjpeg8:arm64. 489s Preparing to unpack .../104-libjpeg8_8c-2ubuntu11_arm64.deb ... 489s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 489s Selecting previously unselected package libgraphite2-3:arm64. 489s Preparing to unpack .../105-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 489s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 489s Selecting previously unselected package libharfbuzz0b:arm64. 489s Preparing to unpack .../106-libharfbuzz0b_10.2.0-1_arm64.deb ... 489s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 489s Selecting previously unselected package libraqm0:arm64. 489s Preparing to unpack .../107-libraqm0_0.10.2-1_arm64.deb ... 489s Unpacking libraqm0:arm64 (0.10.2-1) ... 489s Selecting previously unselected package libdeflate0:arm64. 489s Preparing to unpack .../108-libdeflate0_1.23-1_arm64.deb ... 489s Unpacking libdeflate0:arm64 (1.23-1) ... 489s Selecting previously unselected package libjbig0:arm64. 489s Preparing to unpack .../109-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 489s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 489s Selecting previously unselected package liblerc4:arm64. 489s Preparing to unpack .../110-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 489s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 489s Selecting previously unselected package libwebp7:arm64. 489s Preparing to unpack .../111-libwebp7_1.5.0-0.1_arm64.deb ... 489s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 490s Selecting previously unselected package libtiff6:arm64. 490s Preparing to unpack .../112-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 490s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 490s Selecting previously unselected package libxpm4:arm64. 490s Preparing to unpack .../113-libxpm4_1%3a3.5.17-1build2_arm64.deb ... 490s Unpacking libxpm4:arm64 (1:3.5.17-1build2) ... 490s Selecting previously unselected package libgd3:arm64. 490s Preparing to unpack .../114-libgd3_2.3.3-12ubuntu3_arm64.deb ... 490s Unpacking libgd3:arm64 (2.3.3-12ubuntu3) ... 490s Selecting previously unselected package liblua5.4-0:arm64. 490s Preparing to unpack .../115-liblua5.4-0_5.4.7-1_arm64.deb ... 490s Unpacking liblua5.4-0:arm64 (5.4.7-1) ... 490s Selecting previously unselected package fontconfig. 490s Preparing to unpack .../116-fontconfig_2.15.0-2ubuntu1_arm64.deb ... 490s Unpacking fontconfig (2.15.0-2ubuntu1) ... 490s Selecting previously unselected package libthai-data. 490s Preparing to unpack .../117-libthai-data_0.1.29-2build1_all.deb ... 490s Unpacking libthai-data (0.1.29-2build1) ... 490s Selecting previously unselected package libdatrie1:arm64. 490s Preparing to unpack .../118-libdatrie1_0.2.13-3build1_arm64.deb ... 490s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 490s Selecting previously unselected package libthai0:arm64. 490s Preparing to unpack .../119-libthai0_0.1.29-2build1_arm64.deb ... 490s Unpacking libthai0:arm64 (0.1.29-2build1) ... 490s Selecting previously unselected package libpango-1.0-0:arm64. 490s Preparing to unpack .../120-libpango-1.0-0_1.56.2-1_arm64.deb ... 490s Unpacking libpango-1.0-0:arm64 (1.56.2-1) ... 490s Selecting previously unselected package libpangoft2-1.0-0:arm64. 490s Preparing to unpack .../121-libpangoft2-1.0-0_1.56.2-1_arm64.deb ... 490s Unpacking libpangoft2-1.0-0:arm64 (1.56.2-1) ... 490s Selecting previously unselected package libpangocairo-1.0-0:arm64. 490s Preparing to unpack .../122-libpangocairo-1.0-0_1.56.2-1_arm64.deb ... 490s Unpacking libpangocairo-1.0-0:arm64 (1.56.2-1) ... 490s Selecting previously unselected package libwebpmux3:arm64. 490s Preparing to unpack .../123-libwebpmux3_1.5.0-0.1_arm64.deb ... 490s Unpacking libwebpmux3:arm64 (1.5.0-0.1) ... 490s Selecting previously unselected package gnuplot-nox. 490s Preparing to unpack .../124-gnuplot-nox_6.0.2+dfsg1-1_arm64.deb ... 490s Unpacking gnuplot-nox (6.0.2+dfsg1-1) ... 490s Selecting previously unselected package dh-octave-autopkgtest. 490s Preparing to unpack .../125-dh-octave-autopkgtest_1.8.0_all.deb ... 490s Unpacking dh-octave-autopkgtest (1.8.0) ... 490s Selecting previously unselected package libapt-pkg-perl. 490s Preparing to unpack .../126-libapt-pkg-perl_0.1.41build1_arm64.deb ... 490s Unpacking libapt-pkg-perl (0.1.41build1) ... 490s Selecting previously unselected package libarray-intspan-perl. 490s Preparing to unpack .../127-libarray-intspan-perl_2.004-2_all.deb ... 490s Unpacking libarray-intspan-perl (2.004-2) ... 490s Selecting previously unselected package libyaml-libyaml-perl. 490s Preparing to unpack .../128-libyaml-libyaml-perl_0.903.0+ds-1_arm64.deb ... 490s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 490s Selecting previously unselected package libconfig-model-backend-yaml-perl. 490s Preparing to unpack .../129-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 490s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 490s Selecting previously unselected package libexporter-lite-perl. 490s Preparing to unpack .../130-libexporter-lite-perl_0.09-2_all.deb ... 490s Unpacking libexporter-lite-perl (0.09-2) ... 490s Selecting previously unselected package libencode-locale-perl. 490s Preparing to unpack .../131-libencode-locale-perl_1.05-3_all.deb ... 490s Unpacking libencode-locale-perl (1.05-3) ... 490s Selecting previously unselected package libtimedate-perl. 490s Preparing to unpack .../132-libtimedate-perl_2.3300-2_all.deb ... 490s Unpacking libtimedate-perl (2.3300-2) ... 490s Selecting previously unselected package libhttp-date-perl. 490s Preparing to unpack .../133-libhttp-date-perl_6.06-1_all.deb ... 490s Unpacking libhttp-date-perl (6.06-1) ... 490s Selecting previously unselected package libfile-listing-perl. 490s Preparing to unpack .../134-libfile-listing-perl_6.16-1_all.deb ... 490s Unpacking libfile-listing-perl (6.16-1) ... 490s Selecting previously unselected package libhtml-tagset-perl. 490s Preparing to unpack .../135-libhtml-tagset-perl_3.24-1_all.deb ... 490s Unpacking libhtml-tagset-perl (3.24-1) ... 490s Selecting previously unselected package liburi-perl. 490s Preparing to unpack .../136-liburi-perl_5.30-1_all.deb ... 490s Unpacking liburi-perl (5.30-1) ... 490s Selecting previously unselected package libhtml-parser-perl:arm64. 491s Preparing to unpack .../137-libhtml-parser-perl_3.83-1build1_arm64.deb ... 491s Unpacking libhtml-parser-perl:arm64 (3.83-1build1) ... 491s Selecting previously unselected package libhtml-tree-perl. 491s Preparing to unpack .../138-libhtml-tree-perl_5.07-3_all.deb ... 491s Unpacking libhtml-tree-perl (5.07-3) ... 491s Selecting previously unselected package libclone-perl:arm64. 491s Preparing to unpack .../139-libclone-perl_0.47-1_arm64.deb ... 491s Unpacking libclone-perl:arm64 (0.47-1) ... 491s Selecting previously unselected package libio-html-perl. 491s Preparing to unpack .../140-libio-html-perl_1.004-3_all.deb ... 491s Unpacking libio-html-perl (1.004-3) ... 491s Selecting previously unselected package liblwp-mediatypes-perl. 491s Preparing to unpack .../141-liblwp-mediatypes-perl_6.04-2_all.deb ... 491s Unpacking liblwp-mediatypes-perl (6.04-2) ... 491s Selecting previously unselected package libhttp-message-perl. 491s Preparing to unpack .../142-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 491s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 491s Selecting previously unselected package libhttp-cookies-perl. 491s Preparing to unpack .../143-libhttp-cookies-perl_6.11-1_all.deb ... 491s Unpacking libhttp-cookies-perl (6.11-1) ... 491s Selecting previously unselected package libhttp-negotiate-perl. 491s Preparing to unpack .../144-libhttp-negotiate-perl_6.01-2_all.deb ... 491s Unpacking libhttp-negotiate-perl (6.01-2) ... 491s Selecting previously unselected package perl-openssl-defaults:arm64. 491s Preparing to unpack .../145-perl-openssl-defaults_7build3_arm64.deb ... 491s Unpacking perl-openssl-defaults:arm64 (7build3) ... 491s Selecting previously unselected package libnet-ssleay-perl:arm64. 491s Preparing to unpack .../146-libnet-ssleay-perl_1.94-3_arm64.deb ... 491s Unpacking libnet-ssleay-perl:arm64 (1.94-3) ... 491s Selecting previously unselected package libio-socket-ssl-perl. 491s Preparing to unpack .../147-libio-socket-ssl-perl_2.089-1_all.deb ... 491s Unpacking libio-socket-ssl-perl (2.089-1) ... 491s Selecting previously unselected package libnet-http-perl. 491s Preparing to unpack .../148-libnet-http-perl_6.23-1_all.deb ... 491s Unpacking libnet-http-perl (6.23-1) ... 491s Selecting previously unselected package liblwp-protocol-https-perl. 491s Preparing to unpack .../149-liblwp-protocol-https-perl_6.14-1_all.deb ... 491s Unpacking liblwp-protocol-https-perl (6.14-1) ... 491s Selecting previously unselected package libwww-robotrules-perl. 491s Preparing to unpack .../150-libwww-robotrules-perl_6.02-1_all.deb ... 491s Unpacking libwww-robotrules-perl (6.02-1) ... 491s Selecting previously unselected package libwww-perl. 491s Preparing to unpack .../151-libwww-perl_6.78-1_all.deb ... 491s Unpacking libwww-perl (6.78-1) ... 491s Selecting previously unselected package liberror-perl. 491s Preparing to unpack .../152-liberror-perl_0.17030-1_all.deb ... 491s Unpacking liberror-perl (0.17030-1) ... 491s Selecting previously unselected package libparse-debcontrol-perl. 491s Preparing to unpack .../153-libparse-debcontrol-perl_2.005-6_all.deb ... 491s Unpacking libparse-debcontrol-perl (2.005-6) ... 491s Selecting previously unselected package libsoftware-copyright-perl. 491s Preparing to unpack .../154-libsoftware-copyright-perl_0.014-1_all.deb ... 491s Unpacking libsoftware-copyright-perl (0.014-1) ... 491s Selecting previously unselected package libalgorithm-c3-perl. 491s Preparing to unpack .../155-libalgorithm-c3-perl_0.11-2_all.deb ... 491s Unpacking libalgorithm-c3-perl (0.11-2) ... 491s Selecting previously unselected package libclass-c3-perl. 491s Preparing to unpack .../156-libclass-c3-perl_0.35-2_all.deb ... 491s Unpacking libclass-c3-perl (0.35-2) ... 491s Selecting previously unselected package libmro-compat-perl. 491s Preparing to unpack .../157-libmro-compat-perl_0.15-2_all.deb ... 491s Unpacking libmro-compat-perl (0.15-2) ... 491s Selecting previously unselected package libdata-section-perl. 491s Preparing to unpack .../158-libdata-section-perl_0.200008-1_all.deb ... 491s Unpacking libdata-section-perl (0.200008-1) ... 491s Selecting previously unselected package libtext-template-perl. 491s Preparing to unpack .../159-libtext-template-perl_1.61-1_all.deb ... 491s Unpacking libtext-template-perl (1.61-1) ... 491s Selecting previously unselected package libsoftware-license-perl. 491s Preparing to unpack .../160-libsoftware-license-perl_0.104006-1_all.deb ... 491s Unpacking libsoftware-license-perl (0.104006-1) ... 491s Selecting previously unselected package libsoftware-licensemoreutils-perl. 492s Preparing to unpack .../161-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 492s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 492s Selecting previously unselected package libsort-versions-perl. 492s Preparing to unpack .../162-libsort-versions-perl_1.62-3_all.deb ... 492s Unpacking libsort-versions-perl (1.62-3) ... 492s Selecting previously unselected package libtext-reform-perl. 492s Preparing to unpack .../163-libtext-reform-perl_1.20-5_all.deb ... 492s Unpacking libtext-reform-perl (1.20-5) ... 492s Selecting previously unselected package libtext-autoformat-perl. 492s Preparing to unpack .../164-libtext-autoformat-perl_1.750000-2_all.deb ... 492s Unpacking libtext-autoformat-perl (1.750000-2) ... 492s Selecting previously unselected package libtext-levenshtein-damerau-perl. 492s Preparing to unpack .../165-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 492s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 492s Selecting previously unselected package libtoml-tiny-perl. 492s Preparing to unpack .../166-libtoml-tiny-perl_0.19-1_all.deb ... 492s Unpacking libtoml-tiny-perl (0.19-1) ... 492s Selecting previously unselected package libclass-inspector-perl. 492s Preparing to unpack .../167-libclass-inspector-perl_1.36-3_all.deb ... 492s Unpacking libclass-inspector-perl (1.36-3) ... 492s Selecting previously unselected package libfile-sharedir-perl. 492s Preparing to unpack .../168-libfile-sharedir-perl_1.118-3_all.deb ... 492s Unpacking libfile-sharedir-perl (1.118-3) ... 492s Selecting previously unselected package libindirect-perl. 492s Preparing to unpack .../169-libindirect-perl_0.39-2build5_arm64.deb ... 492s Unpacking libindirect-perl (0.39-2build5) ... 492s Selecting previously unselected package libxs-parse-keyword-perl. 492s Preparing to unpack .../170-libxs-parse-keyword-perl_0.48-2_arm64.deb ... 492s Unpacking libxs-parse-keyword-perl (0.48-2) ... 492s Selecting previously unselected package libxs-parse-sublike-perl:arm64. 492s Preparing to unpack .../171-libxs-parse-sublike-perl_0.37-1_arm64.deb ... 492s Unpacking libxs-parse-sublike-perl:arm64 (0.37-1) ... 492s Selecting previously unselected package libobject-pad-perl. 492s Preparing to unpack .../172-libobject-pad-perl_0.820-1_arm64.deb ... 492s Unpacking libobject-pad-perl (0.820-1) ... 492s Selecting previously unselected package libsyntax-keyword-try-perl. 492s Preparing to unpack .../173-libsyntax-keyword-try-perl_0.30-1_arm64.deb ... 492s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 492s Selecting previously unselected package libio-interactive-perl. 492s Preparing to unpack .../174-libio-interactive-perl_1.026-1_all.deb ... 492s Unpacking libio-interactive-perl (1.026-1) ... 492s Selecting previously unselected package liblog-any-perl. 492s Preparing to unpack .../175-liblog-any-perl_1.717-1_all.deb ... 492s Unpacking liblog-any-perl (1.717-1) ... 492s Selecting previously unselected package liblog-any-adapter-screen-perl. 492s Preparing to unpack .../176-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 492s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 492s Selecting previously unselected package libsub-exporter-progressive-perl. 492s Preparing to unpack .../177-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 492s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 492s Selecting previously unselected package libvariable-magic-perl. 492s Preparing to unpack .../178-libvariable-magic-perl_0.64-1build1_arm64.deb ... 492s Unpacking libvariable-magic-perl (0.64-1build1) ... 492s Selecting previously unselected package libb-hooks-endofscope-perl. 492s Preparing to unpack .../179-libb-hooks-endofscope-perl_0.28-1_all.deb ... 492s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 492s Selecting previously unselected package libsub-identify-perl. 492s Preparing to unpack .../180-libsub-identify-perl_0.14-3build4_arm64.deb ... 492s Unpacking libsub-identify-perl (0.14-3build4) ... 492s Selecting previously unselected package libsub-name-perl:arm64. 492s Preparing to unpack .../181-libsub-name-perl_0.28-1_arm64.deb ... 492s Unpacking libsub-name-perl:arm64 (0.28-1) ... 492s Selecting previously unselected package libnamespace-clean-perl. 492s Preparing to unpack .../182-libnamespace-clean-perl_0.27-2_all.deb ... 492s Unpacking libnamespace-clean-perl (0.27-2) ... 492s Selecting previously unselected package libnumber-compare-perl. 492s Preparing to unpack .../183-libnumber-compare-perl_0.03-3_all.deb ... 492s Unpacking libnumber-compare-perl (0.03-3) ... 492s Selecting previously unselected package libtext-glob-perl. 492s Preparing to unpack .../184-libtext-glob-perl_0.11-3_all.deb ... 492s Unpacking libtext-glob-perl (0.11-3) ... 492s Selecting previously unselected package libpath-iterator-rule-perl. 492s Preparing to unpack .../185-libpath-iterator-rule-perl_1.015-2_all.deb ... 492s Unpacking libpath-iterator-rule-perl (1.015-2) ... 493s Selecting previously unselected package libpod-parser-perl. 493s Preparing to unpack .../186-libpod-parser-perl_1.67-1_all.deb ... 493s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 493s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 493s Unpacking libpod-parser-perl (1.67-1) ... 493s Selecting previously unselected package libpod-constants-perl. 493s Preparing to unpack .../187-libpod-constants-perl_0.19-2_all.deb ... 493s Unpacking libpod-constants-perl (0.19-2) ... 493s Selecting previously unselected package libset-intspan-perl. 493s Preparing to unpack .../188-libset-intspan-perl_1.19-3_all.deb ... 493s Unpacking libset-intspan-perl (1.19-3) ... 493s Selecting previously unselected package libstring-copyright-perl. 493s Preparing to unpack .../189-libstring-copyright-perl_0.003014-1_all.deb ... 493s Unpacking libstring-copyright-perl (0.003014-1) ... 493s Selecting previously unselected package libstring-escape-perl. 493s Preparing to unpack .../190-libstring-escape-perl_2010.002-3_all.deb ... 493s Unpacking libstring-escape-perl (2010.002-3) ... 493s Selecting previously unselected package libregexp-pattern-license-perl. 493s Preparing to unpack .../191-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 493s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 493s Selecting previously unselected package libregexp-pattern-perl. 493s Preparing to unpack .../192-libregexp-pattern-perl_0.2.14-2_all.deb ... 493s Unpacking libregexp-pattern-perl (0.2.14-2) ... 493s Selecting previously unselected package libstring-license-perl. 493s Preparing to unpack .../193-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 493s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 493s Selecting previously unselected package licensecheck. 493s Preparing to unpack .../194-licensecheck_3.3.9-1ubuntu1_all.deb ... 493s Unpacking licensecheck (3.3.9-1ubuntu1) ... 493s Selecting previously unselected package diffstat. 493s Preparing to unpack .../195-diffstat_1.67-1_arm64.deb ... 493s Unpacking diffstat (1.67-1) ... 493s Selecting previously unselected package libberkeleydb-perl:arm64. 493s Preparing to unpack .../196-libberkeleydb-perl_0.66-1_arm64.deb ... 493s Unpacking libberkeleydb-perl:arm64 (0.66-1) ... 493s Selecting previously unselected package libclass-xsaccessor-perl. 493s Preparing to unpack .../197-libclass-xsaccessor-perl_1.19-4build6_arm64.deb ... 493s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 493s Selecting previously unselected package libconfig-tiny-perl. 493s Preparing to unpack .../198-libconfig-tiny-perl_2.30-1_all.deb ... 493s Unpacking libconfig-tiny-perl (2.30-1) ... 493s Selecting previously unselected package libconst-fast-perl. 493s Preparing to unpack .../199-libconst-fast-perl_0.014-2_all.deb ... 493s Unpacking libconst-fast-perl (0.014-2) ... 493s Selecting previously unselected package libcpanel-json-xs-perl:arm64. 493s Preparing to unpack .../200-libcpanel-json-xs-perl_4.39-1_arm64.deb ... 493s Unpacking libcpanel-json-xs-perl:arm64 (4.39-1) ... 493s Selecting previously unselected package libaliased-perl. 493s Preparing to unpack .../201-libaliased-perl_0.34-3_all.deb ... 493s Unpacking libaliased-perl (0.34-3) ... 493s Selecting previously unselected package libclass-data-inheritable-perl. 493s Preparing to unpack .../202-libclass-data-inheritable-perl_0.10-1_all.deb ... 493s Unpacking libclass-data-inheritable-perl (0.10-1) ... 493s Selecting previously unselected package libdevel-stacktrace-perl. 493s Preparing to unpack .../203-libdevel-stacktrace-perl_2.0500-1_all.deb ... 493s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 493s Selecting previously unselected package libexception-class-perl. 493s Preparing to unpack .../204-libexception-class-perl_1.45-1_all.deb ... 493s Unpacking libexception-class-perl (1.45-1) ... 493s Selecting previously unselected package libiterator-perl. 493s Preparing to unpack .../205-libiterator-perl_0.03+ds1-2_all.deb ... 493s Unpacking libiterator-perl (0.03+ds1-2) ... 493s Selecting previously unselected package libiterator-util-perl. 493s Preparing to unpack .../206-libiterator-util-perl_0.02+ds1-2_all.deb ... 493s Unpacking libiterator-util-perl (0.02+ds1-2) ... 493s Selecting previously unselected package libdata-dpath-perl. 493s Preparing to unpack .../207-libdata-dpath-perl_0.60-1_all.deb ... 493s Unpacking libdata-dpath-perl (0.60-1) ... 493s Selecting previously unselected package libnet-domain-tld-perl. 493s Preparing to unpack .../208-libnet-domain-tld-perl_1.75-4_all.deb ... 493s Unpacking libnet-domain-tld-perl (1.75-4) ... 493s Selecting previously unselected package libdata-validate-domain-perl. 493s Preparing to unpack .../209-libdata-validate-domain-perl_0.15-1_all.deb ... 493s Unpacking libdata-validate-domain-perl (0.15-1) ... 493s Selecting previously unselected package libnet-ipv6addr-perl. 493s Preparing to unpack .../210-libnet-ipv6addr-perl_1.02-1_all.deb ... 493s Unpacking libnet-ipv6addr-perl (1.02-1) ... 493s Selecting previously unselected package libnet-netmask-perl. 493s Preparing to unpack .../211-libnet-netmask-perl_2.0002-2_all.deb ... 493s Unpacking libnet-netmask-perl (2.0002-2) ... 493s Selecting previously unselected package libnetaddr-ip-perl. 493s Preparing to unpack .../212-libnetaddr-ip-perl_4.079+dfsg-2build5_arm64.deb ... 493s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 494s Selecting previously unselected package libdata-validate-ip-perl. 494s Preparing to unpack .../213-libdata-validate-ip-perl_0.31-1_all.deb ... 494s Unpacking libdata-validate-ip-perl (0.31-1) ... 494s Selecting previously unselected package libdata-validate-uri-perl. 494s Preparing to unpack .../214-libdata-validate-uri-perl_0.07-3_all.deb ... 494s Unpacking libdata-validate-uri-perl (0.07-3) ... 494s Selecting previously unselected package libdevel-size-perl. 494s Preparing to unpack .../215-libdevel-size-perl_0.84-1build1_arm64.deb ... 494s Unpacking libdevel-size-perl (0.84-1build1) ... 494s Selecting previously unselected package libemail-address-xs-perl. 494s Preparing to unpack .../216-libemail-address-xs-perl_1.05-1build5_arm64.deb ... 494s Unpacking libemail-address-xs-perl (1.05-1build5) ... 494s Selecting previously unselected package libipc-system-simple-perl. 494s Preparing to unpack .../217-libipc-system-simple-perl_1.30-2_all.deb ... 494s Unpacking libipc-system-simple-perl (1.30-2) ... 494s Selecting previously unselected package libfile-basedir-perl. 494s Preparing to unpack .../218-libfile-basedir-perl_0.09-2_all.deb ... 494s Unpacking libfile-basedir-perl (0.09-2) ... 494s Selecting previously unselected package libfile-find-rule-perl. 494s Preparing to unpack .../219-libfile-find-rule-perl_0.34-3_all.deb ... 494s Unpacking libfile-find-rule-perl (0.34-3) ... 494s Selecting previously unselected package libio-string-perl. 494s Preparing to unpack .../220-libio-string-perl_1.08-4_all.deb ... 494s Unpacking libio-string-perl (1.08-4) ... 494s Selecting previously unselected package libfont-ttf-perl. 494s Preparing to unpack .../221-libfont-ttf-perl_1.06-2_all.deb ... 494s Unpacking libfont-ttf-perl (1.06-2) ... 494s Selecting previously unselected package libhtml-html5-entities-perl. 494s Preparing to unpack .../222-libhtml-html5-entities-perl_0.004-3_all.deb ... 494s Unpacking libhtml-html5-entities-perl (0.004-3) ... 494s Selecting previously unselected package libhtml-tokeparser-simple-perl. 494s Preparing to unpack .../223-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 494s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 494s Selecting previously unselected package libipc-run3-perl. 494s Preparing to unpack .../224-libipc-run3-perl_0.049-1_all.deb ... 494s Unpacking libipc-run3-perl (0.049-1) ... 494s Selecting previously unselected package libjson-maybexs-perl. 494s Preparing to unpack .../225-libjson-maybexs-perl_1.004008-1_all.deb ... 494s Unpacking libjson-maybexs-perl (1.004008-1) ... 494s Selecting previously unselected package liblist-compare-perl. 494s Preparing to unpack .../226-liblist-compare-perl_0.55-2_all.deb ... 494s Unpacking liblist-compare-perl (0.55-2) ... 494s Selecting previously unselected package liblist-someutils-perl. 494s Preparing to unpack .../227-liblist-someutils-perl_0.59-1_all.deb ... 494s Unpacking liblist-someutils-perl (0.59-1) ... 494s Selecting previously unselected package liblist-utilsby-perl. 494s Preparing to unpack .../228-liblist-utilsby-perl_0.12-2_all.deb ... 494s Unpacking liblist-utilsby-perl (0.12-2) ... 494s Selecting previously unselected package libmldbm-perl. 494s Preparing to unpack .../229-libmldbm-perl_2.05-4_all.deb ... 494s Unpacking libmldbm-perl (2.05-4) ... 494s Selecting previously unselected package libclass-method-modifiers-perl. 494s Preparing to unpack .../230-libclass-method-modifiers-perl_2.15-1_all.deb ... 494s Unpacking libclass-method-modifiers-perl (2.15-1) ... 494s Selecting previously unselected package libimport-into-perl. 494s Preparing to unpack .../231-libimport-into-perl_1.002005-2_all.deb ... 494s Unpacking libimport-into-perl (1.002005-2) ... 494s Selecting previously unselected package librole-tiny-perl. 494s Preparing to unpack .../232-librole-tiny-perl_2.002004-1_all.deb ... 494s Unpacking librole-tiny-perl (2.002004-1) ... 494s Selecting previously unselected package libsub-quote-perl. 494s Preparing to unpack .../233-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 494s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 494s Selecting previously unselected package libmoo-perl. 494s Preparing to unpack .../234-libmoo-perl_2.005005-1_all.deb ... 494s Unpacking libmoo-perl (2.005005-1) ... 494s Selecting previously unselected package libstrictures-perl. 494s Preparing to unpack .../235-libstrictures-perl_2.000006-1_all.deb ... 494s Unpacking libstrictures-perl (2.000006-1) ... 494s Selecting previously unselected package libmoox-aliases-perl. 494s Preparing to unpack .../236-libmoox-aliases-perl_0.001006-2_all.deb ... 494s Unpacking libmoox-aliases-perl (0.001006-2) ... 494s Selecting previously unselected package libperlio-gzip-perl. 494s Preparing to unpack .../237-libperlio-gzip-perl_0.20-1build5_arm64.deb ... 494s Unpacking libperlio-gzip-perl (0.20-1build5) ... 494s Selecting previously unselected package libperlio-utf8-strict-perl. 494s Preparing to unpack .../238-libperlio-utf8-strict-perl_0.010-1build4_arm64.deb ... 494s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 495s Selecting previously unselected package libproc-processtable-perl:arm64. 495s Preparing to unpack .../239-libproc-processtable-perl_0.636-1build4_arm64.deb ... 495s Unpacking libproc-processtable-perl:arm64 (0.636-1build4) ... 495s Selecting previously unselected package libregexp-wildcards-perl. 495s Preparing to unpack .../240-libregexp-wildcards-perl_1.05-3_all.deb ... 495s Unpacking libregexp-wildcards-perl (1.05-3) ... 495s Selecting previously unselected package libsereal-decoder-perl. 495s Preparing to unpack .../241-libsereal-decoder-perl_5.004+ds-1build4_arm64.deb ... 495s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 495s Selecting previously unselected package libsereal-encoder-perl. 495s Preparing to unpack .../242-libsereal-encoder-perl_5.004+ds-1build4_arm64.deb ... 495s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 495s Selecting previously unselected package libterm-readkey-perl. 495s Preparing to unpack .../243-libterm-readkey-perl_2.38-2build5_arm64.deb ... 495s Unpacking libterm-readkey-perl (2.38-2build5) ... 495s Selecting previously unselected package libtext-levenshteinxs-perl. 495s Preparing to unpack .../244-libtext-levenshteinxs-perl_0.03-5build5_arm64.deb ... 495s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 495s Selecting previously unselected package libmarkdown2:arm64. 495s Preparing to unpack .../245-libmarkdown2_2.2.7-2.1_arm64.deb ... 495s Unpacking libmarkdown2:arm64 (2.2.7-2.1) ... 495s Selecting previously unselected package libtext-markdown-discount-perl. 495s Preparing to unpack .../246-libtext-markdown-discount-perl_0.18-1_arm64.deb ... 495s Unpacking libtext-markdown-discount-perl (0.18-1) ... 495s Selecting previously unselected package libdata-messagepack-perl. 495s Preparing to unpack .../247-libdata-messagepack-perl_1.02-1build5_arm64.deb ... 495s Unpacking libdata-messagepack-perl (1.02-1build5) ... 495s Selecting previously unselected package libtext-xslate-perl:arm64. 495s Preparing to unpack .../248-libtext-xslate-perl_3.5.9-2build1_arm64.deb ... 495s Unpacking libtext-xslate-perl:arm64 (3.5.9-2build1) ... 495s Selecting previously unselected package libtime-duration-perl. 495s Preparing to unpack .../249-libtime-duration-perl_1.21-2_all.deb ... 495s Unpacking libtime-duration-perl (1.21-2) ... 495s Selecting previously unselected package libtime-moment-perl. 495s Preparing to unpack .../250-libtime-moment-perl_0.44-2build5_arm64.deb ... 495s Unpacking libtime-moment-perl (0.44-2build5) ... 495s Selecting previously unselected package libunicode-utf8-perl. 495s Preparing to unpack .../251-libunicode-utf8-perl_0.62-2build4_arm64.deb ... 495s Unpacking libunicode-utf8-perl (0.62-2build4) ... 495s Selecting previously unselected package libcgi-pm-perl. 495s Preparing to unpack .../252-libcgi-pm-perl_4.67-1_all.deb ... 495s Unpacking libcgi-pm-perl (4.67-1) ... 495s Selecting previously unselected package libhtml-form-perl. 495s Preparing to unpack .../253-libhtml-form-perl_6.12-1_all.deb ... 495s Unpacking libhtml-form-perl (6.12-1) ... 495s Selecting previously unselected package libwww-mechanize-perl. 495s Preparing to unpack .../254-libwww-mechanize-perl_2.19-1ubuntu1_all.deb ... 495s Unpacking libwww-mechanize-perl (2.19-1ubuntu1) ... 495s Selecting previously unselected package libxml-namespacesupport-perl. 495s Preparing to unpack .../255-libxml-namespacesupport-perl_1.12-2_all.deb ... 495s Unpacking libxml-namespacesupport-perl (1.12-2) ... 495s Selecting previously unselected package libxml-sax-base-perl. 495s Preparing to unpack .../256-libxml-sax-base-perl_1.09-3_all.deb ... 495s Unpacking libxml-sax-base-perl (1.09-3) ... 495s Selecting previously unselected package libxml-sax-perl. 495s Preparing to unpack .../257-libxml-sax-perl_1.02+dfsg-4_all.deb ... 495s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 495s Selecting previously unselected package libxml-libxml-perl. 495s Preparing to unpack .../258-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_arm64.deb ... 495s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 495s Selecting previously unselected package lzip. 495s Preparing to unpack .../259-lzip_1.25-2_arm64.deb ... 495s Unpacking lzip (1.25-2) ... 495s Selecting previously unselected package lzop. 495s Preparing to unpack .../260-lzop_1.04-2build3_arm64.deb ... 495s Unpacking lzop (1.04-2build3) ... 495s Selecting previously unselected package patchutils. 495s Preparing to unpack .../261-patchutils_0.4.2-1build3_arm64.deb ... 495s Unpacking patchutils (0.4.2-1build3) ... 495s Selecting previously unselected package t1utils. 495s Preparing to unpack .../262-t1utils_1.41-4build3_arm64.deb ... 495s Unpacking t1utils (1.41-4build3) ... 496s Selecting previously unselected package unzip. 496s Preparing to unpack .../263-unzip_6.0-28ubuntu6_arm64.deb ... 496s Unpacking unzip (6.0-28ubuntu6) ... 496s Selecting previously unselected package lintian. 496s Preparing to unpack .../264-lintian_2.121.1+nmu1ubuntu2_all.deb ... 496s Unpacking lintian (2.121.1+nmu1ubuntu2) ... 496s Selecting previously unselected package libconfig-model-dpkg-perl. 496s Preparing to unpack .../265-libconfig-model-dpkg-perl_3.010_all.deb ... 496s Unpacking libconfig-model-dpkg-perl (3.010) ... 496s Selecting previously unselected package libconvert-binhex-perl. 496s Preparing to unpack .../266-libconvert-binhex-perl_1.125-3_all.deb ... 496s Unpacking libconvert-binhex-perl (1.125-3) ... 496s Selecting previously unselected package libnet-smtp-ssl-perl. 496s Preparing to unpack .../267-libnet-smtp-ssl-perl_1.04-2_all.deb ... 496s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 496s Selecting previously unselected package libmailtools-perl. 496s Preparing to unpack .../268-libmailtools-perl_2.22-1_all.deb ... 496s Unpacking libmailtools-perl (2.22-1) ... 496s Selecting previously unselected package libmime-tools-perl. 496s Preparing to unpack .../269-libmime-tools-perl_5.515-1_all.deb ... 496s Unpacking libmime-tools-perl (5.515-1) ... 496s Selecting previously unselected package libsuitesparseconfig7:arm64. 496s Preparing to unpack .../270-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libsuitesparseconfig7:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libamd3:arm64. 496s Preparing to unpack .../271-libamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libamd3:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libblas3:arm64. 496s Preparing to unpack .../272-libblas3_3.12.1-2_arm64.deb ... 496s Unpacking libblas3:arm64 (3.12.1-2) ... 496s Selecting previously unselected package libgfortran5:arm64. 496s Preparing to unpack .../273-libgfortran5_15-20250222-0ubuntu1_arm64.deb ... 496s Unpacking libgfortran5:arm64 (15-20250222-0ubuntu1) ... 496s Selecting previously unselected package liblapack3:arm64. 496s Preparing to unpack .../274-liblapack3_3.12.1-2_arm64.deb ... 496s Unpacking liblapack3:arm64 (3.12.1-2) ... 496s Selecting previously unselected package libarpack2t64:arm64. 496s Preparing to unpack .../275-libarpack2t64_3.9.1-4_arm64.deb ... 496s Unpacking libarpack2t64:arm64 (3.9.1-4) ... 496s Selecting previously unselected package libccolamd3:arm64. 496s Preparing to unpack .../276-libccolamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libccolamd3:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libcamd3:arm64. 496s Preparing to unpack .../277-libcamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libcamd3:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libcolamd3:arm64. 496s Preparing to unpack .../278-libcolamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libcolamd3:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libcholmod5:arm64. 496s Preparing to unpack .../279-libcholmod5_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libcholmod5:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libcxsparse4:arm64. 496s Preparing to unpack .../280-libcxsparse4_1%3a7.8.3+dfsg-3_arm64.deb ... 496s Unpacking libcxsparse4:arm64 (1:7.8.3+dfsg-3) ... 496s Selecting previously unselected package libfftw3-double3:arm64. 497s Preparing to unpack .../281-libfftw3-double3_3.3.10-2fakesync1build1_arm64.deb ... 497s Unpacking libfftw3-double3:arm64 (3.3.10-2fakesync1build1) ... 497s Selecting previously unselected package libfftw3-single3:arm64. 497s Preparing to unpack .../282-libfftw3-single3_3.3.10-2fakesync1build1_arm64.deb ... 497s Unpacking libfftw3-single3:arm64 (3.3.10-2fakesync1build1) ... 497s Selecting previously unselected package libxfixes3:arm64. 497s Preparing to unpack .../283-libxfixes3_1%3a6.0.0-2build1_arm64.deb ... 497s Unpacking libxfixes3:arm64 (1:6.0.0-2build1) ... 497s Selecting previously unselected package libxcursor1:arm64. 497s Preparing to unpack .../284-libxcursor1_1%3a1.2.3-1_arm64.deb ... 497s Unpacking libxcursor1:arm64 (1:1.2.3-1) ... 497s Selecting previously unselected package libxft2:arm64. 497s Preparing to unpack .../285-libxft2_2.3.6-1build1_arm64.deb ... 497s Unpacking libxft2:arm64 (2.3.6-1build1) ... 497s Selecting previously unselected package libxinerama1:arm64. 497s Preparing to unpack .../286-libxinerama1_2%3a1.1.4-3build1_arm64.deb ... 497s Unpacking libxinerama1:arm64 (2:1.1.4-3build1) ... 497s Selecting previously unselected package libfltk1.3t64:arm64. 497s Preparing to unpack .../287-libfltk1.3t64_1.3.8-6.1build2_arm64.deb ... 497s Unpacking libfltk1.3t64:arm64 (1.3.8-6.1build2) ... 497s Selecting previously unselected package libglvnd0:arm64. 497s Preparing to unpack .../288-libglvnd0_1.7.0-1build1_arm64.deb ... 497s Unpacking libglvnd0:arm64 (1.7.0-1build1) ... 497s Selecting previously unselected package libx11-xcb1:arm64. 497s Preparing to unpack .../289-libx11-xcb1_2%3a1.8.10-2_arm64.deb ... 497s Unpacking libx11-xcb1:arm64 (2:1.8.10-2) ... 497s Selecting previously unselected package libxcb-dri3-0:arm64. 497s Preparing to unpack .../290-libxcb-dri3-0_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-dri3-0:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxcb-glx0:arm64. 497s Preparing to unpack .../291-libxcb-glx0_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-glx0:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxcb-present0:arm64. 497s Preparing to unpack .../292-libxcb-present0_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-present0:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxcb-xfixes0:arm64. 497s Preparing to unpack .../293-libxcb-xfixes0_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-xfixes0:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxxf86vm1:arm64. 497s Preparing to unpack .../294-libxxf86vm1_1%3a1.1.4-1build4_arm64.deb ... 497s Unpacking libxxf86vm1:arm64 (1:1.1.4-1build4) ... 497s Selecting previously unselected package libxcb-randr0:arm64. 497s Preparing to unpack .../295-libxcb-randr0_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-randr0:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxcb-sync1:arm64. 497s Preparing to unpack .../296-libxcb-sync1_1.17.0-2_arm64.deb ... 497s Unpacking libxcb-sync1:arm64 (1.17.0-2) ... 497s Selecting previously unselected package libxshmfence1:arm64. 497s Preparing to unpack .../297-libxshmfence1_1.3-1build5_arm64.deb ... 497s Unpacking libxshmfence1:arm64 (1.3-1build5) ... 497s Selecting previously unselected package mesa-libgallium:arm64. 497s Preparing to unpack .../298-mesa-libgallium_25.0.1-2ubuntu1_arm64.deb ... 497s Unpacking mesa-libgallium:arm64 (25.0.1-2ubuntu1) ... 498s Selecting previously unselected package libwayland-server0:arm64. 498s Preparing to unpack .../299-libwayland-server0_1.23.1-3_arm64.deb ... 498s Unpacking libwayland-server0:arm64 (1.23.1-3) ... 498s Selecting previously unselected package libgbm1:arm64. 498s Preparing to unpack .../300-libgbm1_25.0.1-2ubuntu1_arm64.deb ... 498s Unpacking libgbm1:arm64 (25.0.1-2ubuntu1) ... 498s Selecting previously unselected package libvulkan1:arm64. 498s Preparing to unpack .../301-libvulkan1_1.4.304.0-1_arm64.deb ... 498s Unpacking libvulkan1:arm64 (1.4.304.0-1) ... 498s Selecting previously unselected package libgl1-mesa-dri:arm64. 498s Preparing to unpack .../302-libgl1-mesa-dri_25.0.1-2ubuntu1_arm64.deb ... 498s Unpacking libgl1-mesa-dri:arm64 (25.0.1-2ubuntu1) ... 498s Selecting previously unselected package libglx-mesa0:arm64. 498s Preparing to unpack .../303-libglx-mesa0_25.0.1-2ubuntu1_arm64.deb ... 498s Unpacking libglx-mesa0:arm64 (25.0.1-2ubuntu1) ... 498s Selecting previously unselected package libglx0:arm64. 498s Preparing to unpack .../304-libglx0_1.7.0-1build1_arm64.deb ... 498s Unpacking libglx0:arm64 (1.7.0-1build1) ... 498s Selecting previously unselected package libgl1:arm64. 498s Preparing to unpack .../305-libgl1_1.7.0-1build1_arm64.deb ... 498s Unpacking libgl1:arm64 (1.7.0-1build1) ... 498s Selecting previously unselected package libfltk-gl1.3t64:arm64. 498s Preparing to unpack .../306-libfltk-gl1.3t64_1.3.8-6.1build2_arm64.deb ... 498s Unpacking libfltk-gl1.3t64:arm64 (1.3.8-6.1build2) ... 498s Selecting previously unselected package libgl2ps1.4. 498s Preparing to unpack .../307-libgl2ps1.4_1.4.2+dfsg1-2build1_arm64.deb ... 498s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 498s Selecting previously unselected package libltdl7:arm64. 498s Preparing to unpack .../308-libltdl7_2.5.4-4_arm64.deb ... 498s Unpacking libltdl7:arm64 (2.5.4-4) ... 498s Selecting previously unselected package libglpk40:arm64. 498s Preparing to unpack .../309-libglpk40_5.0-1build2_arm64.deb ... 498s Unpacking libglpk40:arm64 (5.0-1build2) ... 498s Selecting previously unselected package libopengl0:arm64. 498s Preparing to unpack .../310-libopengl0_1.7.0-1build1_arm64.deb ... 498s Unpacking libopengl0:arm64 (1.7.0-1build1) ... 498s Selecting previously unselected package libglu1-mesa:arm64. 498s Preparing to unpack .../311-libglu1-mesa_9.0.2-1.1build1_arm64.deb ... 498s Unpacking libglu1-mesa:arm64 (9.0.2-1.1build1) ... 498s Selecting previously unselected package libhwy1t64:arm64. 498s Preparing to unpack .../312-libhwy1t64_1.2.0-3ubuntu3_arm64.deb ... 498s Unpacking libhwy1t64:arm64 (1.2.0-3ubuntu3) ... 498s Selecting previously unselected package liblcms2-2:arm64. 498s Preparing to unpack .../313-liblcms2-2_2.16-2_arm64.deb ... 498s Unpacking liblcms2-2:arm64 (2.16-2) ... 498s Selecting previously unselected package libjxl0.11:arm64. 498s Preparing to unpack .../314-libjxl0.11_0.11.1-1_arm64.deb ... 498s Unpacking libjxl0.11:arm64 (0.11.1-1) ... 498s Selecting previously unselected package libwmflite-0.2-7:arm64. 498s Preparing to unpack .../315-libwmflite-0.2-7_0.2.13-1.1build3_arm64.deb ... 498s Unpacking libwmflite-0.2-7:arm64 (0.2.13-1.1build3) ... 498s Selecting previously unselected package libgraphicsmagick-q16-3t64. 498s Preparing to unpack .../316-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17689-1_arm64.deb ... 498s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 499s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 499s Preparing to unpack .../317-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17689-1_arm64.deb ... 499s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 499s Selecting previously unselected package libaec0:arm64. 499s Preparing to unpack .../318-libaec0_1.1.3-1_arm64.deb ... 499s Unpacking libaec0:arm64 (1.1.3-1) ... 499s Selecting previously unselected package libsz2:arm64. 499s Preparing to unpack .../319-libsz2_1.1.3-1_arm64.deb ... 499s Unpacking libsz2:arm64 (1.1.3-1) ... 499s Selecting previously unselected package libhdf5-310:arm64. 499s Preparing to unpack .../320-libhdf5-310_1.14.5+repack-3_arm64.deb ... 499s Unpacking libhdf5-310:arm64 (1.14.5+repack-3) ... 499s Selecting previously unselected package libasound2-data. 499s Preparing to unpack .../321-libasound2-data_1.2.13-1build1_all.deb ... 499s Unpacking libasound2-data (1.2.13-1build1) ... 499s Selecting previously unselected package libasound2t64:arm64. 499s Preparing to unpack .../322-libasound2t64_1.2.13-1build1_arm64.deb ... 499s Unpacking libasound2t64:arm64 (1.2.13-1build1) ... 499s Selecting previously unselected package libopus0:arm64. 499s Preparing to unpack .../323-libopus0_1.5.2-2_arm64.deb ... 499s Unpacking libopus0:arm64 (1.5.2-2) ... 499s Selecting previously unselected package libsamplerate0:arm64. 499s Preparing to unpack .../324-libsamplerate0_0.2.2-4build1_arm64.deb ... 499s Unpacking libsamplerate0:arm64 (0.2.2-4build1) ... 499s Selecting previously unselected package libjack-jackd2-0:arm64. 499s Preparing to unpack .../325-libjack-jackd2-0_1.9.22~dfsg-4_arm64.deb ... 499s Unpacking libjack-jackd2-0:arm64 (1.9.22~dfsg-4) ... 499s Selecting previously unselected package libportaudio2:arm64. 499s Preparing to unpack .../326-libportaudio2_19.6.0-1.2build3_arm64.deb ... 499s Unpacking libportaudio2:arm64 (19.6.0-1.2build3) ... 499s Selecting previously unselected package libqhull-r8.0:arm64. 499s Preparing to unpack .../327-libqhull-r8.0_2020.2-6build1_arm64.deb ... 499s Unpacking libqhull-r8.0:arm64 (2020.2-6build1) ... 499s Selecting previously unselected package libqrupdate1:arm64. 499s Preparing to unpack .../328-libqrupdate1_1.1.5-1_arm64.deb ... 499s Unpacking libqrupdate1:arm64 (1.1.5-1) ... 499s Selecting previously unselected package libqscintilla2-qt6-l10n. 499s Preparing to unpack .../329-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 499s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 499s Selecting previously unselected package libb2-1:arm64. 499s Preparing to unpack .../330-libb2-1_0.98.1-1.1build1_arm64.deb ... 499s Unpacking libb2-1:arm64 (0.98.1-1.1build1) ... 499s Selecting previously unselected package libdouble-conversion3:arm64. 499s Preparing to unpack .../331-libdouble-conversion3_3.3.1-1_arm64.deb ... 499s Unpacking libdouble-conversion3:arm64 (3.3.1-1) ... 499s Selecting previously unselected package libpcre2-16-0:arm64. 499s Preparing to unpack .../332-libpcre2-16-0_10.45-1_arm64.deb ... 499s Unpacking libpcre2-16-0:arm64 (10.45-1) ... 499s Selecting previously unselected package libqt6core6t64:arm64. 499s Preparing to unpack .../333-libqt6core6t64_6.8.2+dfsg-5_arm64.deb ... 499s Unpacking libqt6core6t64:arm64 (6.8.2+dfsg-5) ... 499s Selecting previously unselected package libwayland-client0:arm64. 499s Preparing to unpack .../334-libwayland-client0_1.23.1-3_arm64.deb ... 499s Unpacking libwayland-client0:arm64 (1.23.1-3) ... 499s Selecting previously unselected package libegl-mesa0:arm64. 499s Preparing to unpack .../335-libegl-mesa0_25.0.1-2ubuntu1_arm64.deb ... 499s Unpacking libegl-mesa0:arm64 (25.0.1-2ubuntu1) ... 499s Selecting previously unselected package libegl1:arm64. 499s Preparing to unpack .../336-libegl1_1.7.0-1build1_arm64.deb ... 499s Unpacking libegl1:arm64 (1.7.0-1build1) ... 499s Selecting previously unselected package x11-common. 499s Preparing to unpack .../337-x11-common_1%3a7.7+23ubuntu3_all.deb ... 499s Unpacking x11-common (1:7.7+23ubuntu3) ... 499s Selecting previously unselected package libice6:arm64. 500s Preparing to unpack .../338-libice6_2%3a1.1.1-1_arm64.deb ... 500s Unpacking libice6:arm64 (2:1.1.1-1) ... 500s Selecting previously unselected package libmtdev1t64:arm64. 500s Preparing to unpack .../339-libmtdev1t64_1.1.7-1_arm64.deb ... 500s Unpacking libmtdev1t64:arm64 (1.1.7-1) ... 500s Selecting previously unselected package libwacom-common. 500s Preparing to unpack .../340-libwacom-common_2.14.0-1_all.deb ... 500s Unpacking libwacom-common (2.14.0-1) ... 500s Selecting previously unselected package libwacom9:arm64. 500s Preparing to unpack .../341-libwacom9_2.14.0-1_arm64.deb ... 500s Unpacking libwacom9:arm64 (2.14.0-1) ... 500s Selecting previously unselected package libinput-bin. 500s Preparing to unpack .../342-libinput-bin_1.27.1-1_arm64.deb ... 500s Unpacking libinput-bin (1.27.1-1) ... 500s Selecting previously unselected package libinput10:arm64. 500s Preparing to unpack .../343-libinput10_1.27.1-1_arm64.deb ... 500s Unpacking libinput10:arm64 (1.27.1-1) ... 500s Selecting previously unselected package libmd4c0:arm64. 500s Preparing to unpack .../344-libmd4c0_0.5.2-2_arm64.deb ... 500s Unpacking libmd4c0:arm64 (0.5.2-2) ... 500s Selecting previously unselected package libqt6dbus6:arm64. 500s Preparing to unpack .../345-libqt6dbus6_6.8.2+dfsg-5_arm64.deb ... 500s Unpacking libqt6dbus6:arm64 (6.8.2+dfsg-5) ... 500s Selecting previously unselected package libsm6:arm64. 500s Preparing to unpack .../346-libsm6_2%3a1.2.4-1_arm64.deb ... 500s Unpacking libsm6:arm64 (2:1.2.4-1) ... 500s Selecting previously unselected package libts0t64:arm64. 500s Preparing to unpack .../347-libts0t64_1.22-1.1build1_arm64.deb ... 500s Unpacking libts0t64:arm64 (1.22-1.1build1) ... 500s Selecting previously unselected package libxcb-util1:arm64. 500s Preparing to unpack .../348-libxcb-util1_0.4.1-1_arm64.deb ... 500s Unpacking libxcb-util1:arm64 (0.4.1-1) ... 500s Selecting previously unselected package libxcb-image0:arm64. 500s Preparing to unpack .../349-libxcb-image0_0.4.0-2build1_arm64.deb ... 500s Unpacking libxcb-image0:arm64 (0.4.0-2build1) ... 500s Selecting previously unselected package libxcb-render-util0:arm64. 500s Preparing to unpack .../350-libxcb-render-util0_0.3.10-1_arm64.deb ... 500s Unpacking libxcb-render-util0:arm64 (0.3.10-1) ... 500s Selecting previously unselected package libxcb-cursor0:arm64. 500s Preparing to unpack .../351-libxcb-cursor0_0.1.5-1_arm64.deb ... 500s Unpacking libxcb-cursor0:arm64 (0.1.5-1) ... 500s Selecting previously unselected package libxcb-icccm4:arm64. 500s Preparing to unpack .../352-libxcb-icccm4_0.4.2-1_arm64.deb ... 500s Unpacking libxcb-icccm4:arm64 (0.4.2-1) ... 500s Selecting previously unselected package libxcb-keysyms1:arm64. 500s Preparing to unpack .../353-libxcb-keysyms1_0.4.1-1_arm64.deb ... 500s Unpacking libxcb-keysyms1:arm64 (0.4.1-1) ... 500s Selecting previously unselected package libxcb-shape0:arm64. 500s Preparing to unpack .../354-libxcb-shape0_1.17.0-2_arm64.deb ... 500s Unpacking libxcb-shape0:arm64 (1.17.0-2) ... 500s Selecting previously unselected package libxcb-xinput0:arm64. 500s Preparing to unpack .../355-libxcb-xinput0_1.17.0-2_arm64.deb ... 500s Unpacking libxcb-xinput0:arm64 (1.17.0-2) ... 500s Selecting previously unselected package libxcb-xkb1:arm64. 500s Preparing to unpack .../356-libxcb-xkb1_1.17.0-2_arm64.deb ... 500s Unpacking libxcb-xkb1:arm64 (1.17.0-2) ... 500s Selecting previously unselected package libxkbcommon-x11-0:arm64. 500s Preparing to unpack .../357-libxkbcommon-x11-0_1.7.0-2_arm64.deb ... 500s Unpacking libxkbcommon-x11-0:arm64 (1.7.0-2) ... 500s Selecting previously unselected package libqt6gui6:arm64. 500s Preparing to unpack .../358-libqt6gui6_6.8.2+dfsg-5_arm64.deb ... 500s Unpacking libqt6gui6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libavahi-common-data:arm64. 501s Preparing to unpack .../359-libavahi-common-data_0.8-16ubuntu1_arm64.deb ... 501s Unpacking libavahi-common-data:arm64 (0.8-16ubuntu1) ... 501s Selecting previously unselected package libavahi-common3:arm64. 501s Preparing to unpack .../360-libavahi-common3_0.8-16ubuntu1_arm64.deb ... 501s Unpacking libavahi-common3:arm64 (0.8-16ubuntu1) ... 501s Selecting previously unselected package libavahi-client3:arm64. 501s Preparing to unpack .../361-libavahi-client3_0.8-16ubuntu1_arm64.deb ... 501s Unpacking libavahi-client3:arm64 (0.8-16ubuntu1) ... 501s Selecting previously unselected package libcups2t64:arm64. 501s Preparing to unpack .../362-libcups2t64_2.4.11-0ubuntu2_arm64.deb ... 501s Unpacking libcups2t64:arm64 (2.4.11-0ubuntu2) ... 501s Selecting previously unselected package libqt6widgets6:arm64. 501s Preparing to unpack .../363-libqt6widgets6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6widgets6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqt6printsupport6:arm64. 501s Preparing to unpack .../364-libqt6printsupport6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6printsupport6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqscintilla2-qt6-15:arm64. 501s Preparing to unpack .../365-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_arm64.deb ... 501s Unpacking libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-1build4) ... 501s Selecting previously unselected package libqt6core5compat6:arm64. 501s Preparing to unpack .../366-libqt6core5compat6_6.8.2-3_arm64.deb ... 501s Unpacking libqt6core5compat6:arm64 (6.8.2-3) ... 501s Selecting previously unselected package libqt6sql6:arm64. 501s Preparing to unpack .../367-libqt6sql6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6sql6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqt6help6:arm64. 501s Preparing to unpack .../368-libqt6help6_6.8.2-3_arm64.deb ... 501s Unpacking libqt6help6:arm64 (6.8.2-3) ... 501s Selecting previously unselected package libduktape207:arm64. 501s Preparing to unpack .../369-libduktape207_2.7.0+tests-0ubuntu3_arm64.deb ... 501s Unpacking libduktape207:arm64 (2.7.0+tests-0ubuntu3) ... 501s Selecting previously unselected package libproxy1v5:arm64. 501s Preparing to unpack .../370-libproxy1v5_0.5.9-1_arm64.deb ... 501s Unpacking libproxy1v5:arm64 (0.5.9-1) ... 501s Selecting previously unselected package libqt6network6:arm64. 501s Preparing to unpack .../371-libqt6network6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6network6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqt6opengl6:arm64. 501s Preparing to unpack .../372-libqt6opengl6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6opengl6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqt6openglwidgets6:arm64. 501s Preparing to unpack .../373-libqt6openglwidgets6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6openglwidgets6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libqt6xml6:arm64. 501s Preparing to unpack .../374-libqt6xml6_6.8.2+dfsg-5_arm64.deb ... 501s Unpacking libqt6xml6:arm64 (6.8.2+dfsg-5) ... 501s Selecting previously unselected package libogg0:arm64. 501s Preparing to unpack .../375-libogg0_1.3.5-3build1_arm64.deb ... 501s Unpacking libogg0:arm64 (1.3.5-3build1) ... 501s Selecting previously unselected package libflac12t64:arm64. 502s Preparing to unpack .../376-libflac12t64_1.4.3+ds-4_arm64.deb ... 502s Unpacking libflac12t64:arm64 (1.4.3+ds-4) ... 502s Selecting previously unselected package libmp3lame0:arm64. 502s Preparing to unpack .../377-libmp3lame0_3.100-6build1_arm64.deb ... 502s Unpacking libmp3lame0:arm64 (3.100-6build1) ... 502s Selecting previously unselected package libmpg123-0t64:arm64. 502s Preparing to unpack .../378-libmpg123-0t64_1.32.10-1_arm64.deb ... 502s Unpacking libmpg123-0t64:arm64 (1.32.10-1) ... 502s Selecting previously unselected package libvorbis0a:arm64. 502s Preparing to unpack .../379-libvorbis0a_1.3.7-2_arm64.deb ... 502s Unpacking libvorbis0a:arm64 (1.3.7-2) ... 502s Selecting previously unselected package libvorbisenc2:arm64. 502s Preparing to unpack .../380-libvorbisenc2_1.3.7-2_arm64.deb ... 502s Unpacking libvorbisenc2:arm64 (1.3.7-2) ... 502s Selecting previously unselected package libsndfile1:arm64. 502s Preparing to unpack .../381-libsndfile1_1.2.2-2_arm64.deb ... 502s Unpacking libsndfile1:arm64 (1.2.2-2) ... 502s Selecting previously unselected package libspqr4:arm64. 502s Preparing to unpack .../382-libspqr4_1%3a7.8.3+dfsg-3_arm64.deb ... 502s Unpacking libspqr4:arm64 (1:7.8.3+dfsg-3) ... 502s Selecting previously unselected package libumfpack6:arm64. 502s Preparing to unpack .../383-libumfpack6_1%3a7.8.3+dfsg-3_arm64.deb ... 502s Unpacking libumfpack6:arm64 (1:7.8.3+dfsg-3) ... 502s Selecting previously unselected package libtext-unidecode-perl. 502s Preparing to unpack .../384-libtext-unidecode-perl_1.30-3_all.deb ... 502s Unpacking libtext-unidecode-perl (1.30-3) ... 502s Selecting previously unselected package texinfo-lib. 502s Preparing to unpack .../385-texinfo-lib_7.1.1-1_arm64.deb ... 502s Unpacking texinfo-lib (7.1.1-1) ... 502s Selecting previously unselected package tex-common. 502s Preparing to unpack .../386-tex-common_6.19_all.deb ... 502s Unpacking tex-common (6.19) ... 502s Selecting previously unselected package texinfo. 502s Preparing to unpack .../387-texinfo_7.1.1-1_all.deb ... 502s Unpacking texinfo (7.1.1-1) ... 502s Selecting previously unselected package octave-common. 502s Preparing to unpack .../388-octave-common_9.4.0-1_all.deb ... 502s Unpacking octave-common (9.4.0-1) ... 502s Selecting previously unselected package octave. 502s Preparing to unpack .../389-octave_9.4.0-1_arm64.deb ... 502s Unpacking octave (9.4.0-1) ... 502s Selecting previously unselected package libncurses-dev:arm64. 502s Preparing to unpack .../390-libncurses-dev_6.5+20250216-2_arm64.deb ... 502s Unpacking libncurses-dev:arm64 (6.5+20250216-2) ... 503s Selecting previously unselected package libreadline-dev:arm64. 503s Preparing to unpack .../391-libreadline-dev_8.2-6_arm64.deb ... 503s Unpacking libreadline-dev:arm64 (8.2-6) ... 503s Selecting previously unselected package libhdf5-fortran-310:arm64. 503s Preparing to unpack .../392-libhdf5-fortran-310_1.14.5+repack-3_arm64.deb ... 503s Unpacking libhdf5-fortran-310:arm64 (1.14.5+repack-3) ... 503s Selecting previously unselected package libhdf5-hl-310:arm64. 503s Preparing to unpack .../393-libhdf5-hl-310_1.14.5+repack-3_arm64.deb ... 503s Unpacking libhdf5-hl-310:arm64 (1.14.5+repack-3) ... 503s Selecting previously unselected package libhdf5-hl-fortran-310:arm64. 503s Preparing to unpack .../394-libhdf5-hl-fortran-310_1.14.5+repack-3_arm64.deb ... 503s Unpacking libhdf5-hl-fortran-310:arm64 (1.14.5+repack-3) ... 503s Selecting previously unselected package libhdf5-cpp-310:arm64. 503s Preparing to unpack .../395-libhdf5-cpp-310_1.14.5+repack-3_arm64.deb ... 503s Unpacking libhdf5-cpp-310:arm64 (1.14.5+repack-3) ... 503s Selecting previously unselected package libhdf5-hl-cpp-310:arm64. 503s Preparing to unpack .../396-libhdf5-hl-cpp-310_1.14.5+repack-3_arm64.deb ... 503s Unpacking libhdf5-hl-cpp-310:arm64 (1.14.5+repack-3) ... 503s Selecting previously unselected package zlib1g-dev:arm64. 503s Preparing to unpack .../397-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_arm64.deb ... 503s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 503s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 503s Preparing to unpack .../398-libjpeg-turbo8-dev_2.1.5-3ubuntu2_arm64.deb ... 503s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 503s Selecting previously unselected package libjpeg8-dev:arm64. 503s Preparing to unpack .../399-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 503s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 503s Selecting previously unselected package libjpeg-dev:arm64. 503s Preparing to unpack .../400-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 503s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 503s Selecting previously unselected package libaec-dev:arm64. 503s Preparing to unpack .../401-libaec-dev_1.1.3-1_arm64.deb ... 503s Unpacking libaec-dev:arm64 (1.1.3-1) ... 503s Selecting previously unselected package libbrotli-dev:arm64. 503s Preparing to unpack .../402-libbrotli-dev_1.1.0-2build4_arm64.deb ... 503s Unpacking libbrotli-dev:arm64 (1.1.0-2build4) ... 503s Selecting previously unselected package libidn2-dev:arm64. 503s Preparing to unpack .../403-libidn2-dev_2.3.7-2build2_arm64.deb ... 503s Unpacking libidn2-dev:arm64 (2.3.7-2build2) ... 503s Selecting previously unselected package comerr-dev:arm64. 503s Preparing to unpack .../404-comerr-dev_2.1-1.47.2-1ubuntu1_arm64.deb ... 503s Unpacking comerr-dev:arm64 (2.1-1.47.2-1ubuntu1) ... 503s Selecting previously unselected package libgssrpc4t64:arm64. 503s Preparing to unpack .../405-libgssrpc4t64_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking libgssrpc4t64:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package libkadm5clnt-mit12:arm64. 503s Preparing to unpack .../406-libkadm5clnt-mit12_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking libkadm5clnt-mit12:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package libkdb5-10t64:arm64. 503s Preparing to unpack .../407-libkdb5-10t64_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking libkdb5-10t64:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package libkadm5srv-mit12:arm64. 503s Preparing to unpack .../408-libkadm5srv-mit12_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking libkadm5srv-mit12:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package krb5-multidev:arm64. 503s Preparing to unpack .../409-krb5-multidev_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking krb5-multidev:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package libkrb5-dev:arm64. 503s Preparing to unpack .../410-libkrb5-dev_1.21.3-4ubuntu2_arm64.deb ... 503s Unpacking libkrb5-dev:arm64 (1.21.3-4ubuntu2) ... 503s Selecting previously unselected package libldap-dev:arm64. 503s Preparing to unpack .../411-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_arm64.deb ... 503s Unpacking libldap-dev:arm64 (2.6.9+dfsg-1~exp2ubuntu1) ... 504s Selecting previously unselected package libpkgconf3:arm64. 504s Preparing to unpack .../412-libpkgconf3_1.8.1-4_arm64.deb ... 504s Unpacking libpkgconf3:arm64 (1.8.1-4) ... 504s Selecting previously unselected package pkgconf-bin. 504s Preparing to unpack .../413-pkgconf-bin_1.8.1-4_arm64.deb ... 504s Unpacking pkgconf-bin (1.8.1-4) ... 504s Selecting previously unselected package pkgconf:arm64. 504s Preparing to unpack .../414-pkgconf_1.8.1-4_arm64.deb ... 504s Unpacking pkgconf:arm64 (1.8.1-4) ... 504s Selecting previously unselected package libnghttp2-dev:arm64. 504s Preparing to unpack .../415-libnghttp2-dev_1.64.0-1_arm64.deb ... 504s Unpacking libnghttp2-dev:arm64 (1.64.0-1) ... 504s Selecting previously unselected package libpsl-dev:arm64. 504s Preparing to unpack .../416-libpsl-dev_0.21.2-1.1build1_arm64.deb ... 504s Unpacking libpsl-dev:arm64 (0.21.2-1.1build1) ... 504s Selecting previously unselected package libgmpxx4ldbl:arm64. 504s Preparing to unpack .../417-libgmpxx4ldbl_2%3a6.3.0+dfsg-3ubuntu1_arm64.deb ... 504s Unpacking libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-3ubuntu1) ... 504s Selecting previously unselected package libgmp-dev:arm64. 504s Preparing to unpack .../418-libgmp-dev_2%3a6.3.0+dfsg-3ubuntu1_arm64.deb ... 504s Unpacking libgmp-dev:arm64 (2:6.3.0+dfsg-3ubuntu1) ... 504s Selecting previously unselected package libevent-2.1-7t64:arm64. 504s Preparing to unpack .../419-libevent-2.1-7t64_2.1.12-stable-10_arm64.deb ... 504s Unpacking libevent-2.1-7t64:arm64 (2.1.12-stable-10) ... 504s Selecting previously unselected package libunbound8:arm64. 504s Preparing to unpack .../420-libunbound8_1.22.0-1ubuntu1_arm64.deb ... 504s Unpacking libunbound8:arm64 (1.22.0-1ubuntu1) ... 504s Selecting previously unselected package libgnutls-dane0t64:arm64. 504s Preparing to unpack .../421-libgnutls-dane0t64_3.8.9-2ubuntu2_arm64.deb ... 504s Unpacking libgnutls-dane0t64:arm64 (3.8.9-2ubuntu2) ... 504s Selecting previously unselected package libgnutls-openssl27t64:arm64. 504s Preparing to unpack .../422-libgnutls-openssl27t64_3.8.9-2ubuntu2_arm64.deb ... 504s Unpacking libgnutls-openssl27t64:arm64 (3.8.9-2ubuntu2) ... 504s Selecting previously unselected package libp11-kit-dev:arm64. 504s Preparing to unpack .../423-libp11-kit-dev_0.25.5-2ubuntu3_arm64.deb ... 504s Unpacking libp11-kit-dev:arm64 (0.25.5-2ubuntu3) ... 504s Selecting previously unselected package libtasn1-6-dev:arm64. 504s Preparing to unpack .../424-libtasn1-6-dev_4.20.0-2_arm64.deb ... 504s Unpacking libtasn1-6-dev:arm64 (4.20.0-2) ... 504s Selecting previously unselected package nettle-dev:arm64. 504s Preparing to unpack .../425-nettle-dev_3.10.1-1_arm64.deb ... 504s Unpacking nettle-dev:arm64 (3.10.1-1) ... 504s Selecting previously unselected package libgnutls28-dev:arm64. 504s Preparing to unpack .../426-libgnutls28-dev_3.8.9-2ubuntu2_arm64.deb ... 504s Unpacking libgnutls28-dev:arm64 (3.8.9-2ubuntu2) ... 504s Selecting previously unselected package librtmp-dev:arm64. 504s Preparing to unpack .../427-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_arm64.deb ... 504s Unpacking librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-2build7) ... 504s Selecting previously unselected package libssl-dev:arm64. 504s Preparing to unpack .../428-libssl-dev_3.4.1-1ubuntu1_arm64.deb ... 504s Unpacking libssl-dev:arm64 (3.4.1-1ubuntu1) ... 505s Selecting previously unselected package libssh2-1-dev:arm64. 505s Preparing to unpack .../429-libssh2-1-dev_1.11.1-1_arm64.deb ... 505s Unpacking libssh2-1-dev:arm64 (1.11.1-1) ... 505s Selecting previously unselected package libzstd-dev:arm64. 505s Preparing to unpack .../430-libzstd-dev_1.5.6+dfsg-2_arm64.deb ... 505s Unpacking libzstd-dev:arm64 (1.5.6+dfsg-2) ... 505s Selecting previously unselected package libcurl4-openssl-dev:arm64. 505s Preparing to unpack .../431-libcurl4-openssl-dev_8.12.1-3ubuntu1_arm64.deb ... 505s Unpacking libcurl4-openssl-dev:arm64 (8.12.1-3ubuntu1) ... 505s Selecting previously unselected package hdf5-helpers. 505s Preparing to unpack .../432-hdf5-helpers_1.14.5+repack-3_arm64.deb ... 505s Unpacking hdf5-helpers (1.14.5+repack-3) ... 505s Selecting previously unselected package libhdf5-dev. 505s Preparing to unpack .../433-libhdf5-dev_1.14.5+repack-3_arm64.deb ... 505s Unpacking libhdf5-dev (1.14.5+repack-3) ... 505s Selecting previously unselected package xorg-sgml-doctools. 505s Preparing to unpack .../434-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 505s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 505s Selecting previously unselected package x11proto-dev. 505s Preparing to unpack .../435-x11proto-dev_2024.1-1_all.deb ... 505s Unpacking x11proto-dev (2024.1-1) ... 505s Selecting previously unselected package libxau-dev:arm64. 505s Preparing to unpack .../436-libxau-dev_1%3a1.0.11-1_arm64.deb ... 505s Unpacking libxau-dev:arm64 (1:1.0.11-1) ... 505s Selecting previously unselected package libxdmcp-dev:arm64. 505s Preparing to unpack .../437-libxdmcp-dev_1%3a1.1.5-1_arm64.deb ... 505s Unpacking libxdmcp-dev:arm64 (1:1.1.5-1) ... 505s Selecting previously unselected package xtrans-dev. 505s Preparing to unpack .../438-xtrans-dev_1.4.0-1_all.deb ... 505s Unpacking xtrans-dev (1.4.0-1) ... 505s Selecting previously unselected package libxcb1-dev:arm64. 505s Preparing to unpack .../439-libxcb1-dev_1.17.0-2_arm64.deb ... 505s Unpacking libxcb1-dev:arm64 (1.17.0-2) ... 505s Selecting previously unselected package libx11-dev:arm64. 505s Preparing to unpack .../440-libx11-dev_2%3a1.8.10-2_arm64.deb ... 505s Unpacking libx11-dev:arm64 (2:1.8.10-2) ... 505s Selecting previously unselected package libglx-dev:arm64. 505s Preparing to unpack .../441-libglx-dev_1.7.0-1build1_arm64.deb ... 505s Unpacking libglx-dev:arm64 (1.7.0-1build1) ... 505s Selecting previously unselected package libgl-dev:arm64. 505s Preparing to unpack .../442-libgl-dev_1.7.0-1build1_arm64.deb ... 505s Unpacking libgl-dev:arm64 (1.7.0-1build1) ... 505s Selecting previously unselected package libblas-dev:arm64. 505s Preparing to unpack .../443-libblas-dev_3.12.1-2_arm64.deb ... 505s Unpacking libblas-dev:arm64 (3.12.1-2) ... 505s Selecting previously unselected package liblapack-dev:arm64. 506s Preparing to unpack .../444-liblapack-dev_3.12.1-2_arm64.deb ... 506s Unpacking liblapack-dev:arm64 (3.12.1-2) ... 506s Selecting previously unselected package libfftw3-long3:arm64. 506s Preparing to unpack .../445-libfftw3-long3_3.3.10-2fakesync1build1_arm64.deb ... 506s Unpacking libfftw3-long3:arm64 (3.3.10-2fakesync1build1) ... 506s Selecting previously unselected package libfftw3-bin. 506s Preparing to unpack .../446-libfftw3-bin_3.3.10-2fakesync1build1_arm64.deb ... 506s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 506s Selecting previously unselected package libfftw3-dev:arm64. 506s Preparing to unpack .../447-libfftw3-dev_3.3.10-2fakesync1build1_arm64.deb ... 506s Unpacking libfftw3-dev:arm64 (3.3.10-2fakesync1build1) ... 506s Selecting previously unselected package libgfortran-14-dev:arm64. 506s Preparing to unpack .../448-libgfortran-14-dev_14.2.0-17ubuntu3_arm64.deb ... 506s Unpacking libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 506s Selecting previously unselected package gfortran-14-aarch64-linux-gnu. 506s Preparing to unpack .../449-gfortran-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 506s Unpacking gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 506s Selecting previously unselected package gfortran-14. 506s Preparing to unpack .../450-gfortran-14_14.2.0-17ubuntu3_arm64.deb ... 506s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 506s Selecting previously unselected package gfortran-aarch64-linux-gnu. 506s Preparing to unpack .../451-gfortran-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 506s Unpacking gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 506s Selecting previously unselected package gfortran. 506s Preparing to unpack .../452-gfortran_4%3a14.2.0-1ubuntu1_arm64.deb ... 506s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 506s Selecting previously unselected package libstdc++-14-dev:arm64. 506s Preparing to unpack .../453-libstdc++-14-dev_14.2.0-17ubuntu3_arm64.deb ... 506s Unpacking libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 507s Selecting previously unselected package g++-14-aarch64-linux-gnu. 507s Preparing to unpack .../454-g++-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 507s Unpacking g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 507s Selecting previously unselected package g++-14. 507s Preparing to unpack .../455-g++-14_14.2.0-17ubuntu3_arm64.deb ... 507s Unpacking g++-14 (14.2.0-17ubuntu3) ... 507s Selecting previously unselected package g++-aarch64-linux-gnu. 507s Preparing to unpack .../456-g++-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 507s Unpacking g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 507s Selecting previously unselected package g++. 507s Preparing to unpack .../457-g++_4%3a14.2.0-1ubuntu1_arm64.deb ... 507s Unpacking g++ (4:14.2.0-1ubuntu1) ... 507s Selecting previously unselected package octave-dev. 507s Preparing to unpack .../458-octave-dev_9.4.0-1_arm64.deb ... 507s Unpacking octave-dev (9.4.0-1) ... 507s Selecting previously unselected package dh-octave. 507s Preparing to unpack .../459-dh-octave_1.8.0_all.deb ... 507s Unpacking dh-octave (1.8.0) ... 507s Selecting previously unselected package libfontenc1:arm64. 507s Preparing to unpack .../460-libfontenc1_1%3a1.1.8-1build1_arm64.deb ... 507s Unpacking libfontenc1:arm64 (1:1.1.8-1build1) ... 507s Selecting previously unselected package libunwind8:arm64. 507s Preparing to unpack .../461-libunwind8_1.6.2-3.1_arm64.deb ... 507s Unpacking libunwind8:arm64 (1.6.2-3.1) ... 507s Selecting previously unselected package libxt6t64:arm64. 507s Preparing to unpack .../462-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 507s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 507s Selecting previously unselected package libxmu6:arm64. 507s Preparing to unpack .../463-libxmu6_2%3a1.1.3-3build2_arm64.deb ... 507s Unpacking libxmu6:arm64 (2:1.1.3-3build2) ... 507s Selecting previously unselected package libxaw7:arm64. 507s Preparing to unpack .../464-libxaw7_2%3a1.0.16-1_arm64.deb ... 507s Unpacking libxaw7:arm64 (2:1.0.16-1) ... 507s Selecting previously unselected package libxfont2:arm64. 508s Preparing to unpack .../465-libxfont2_1%3a2.0.6-1build1_arm64.deb ... 508s Unpacking libxfont2:arm64 (1:2.0.6-1build1) ... 508s Selecting previously unselected package libxkbfile1:arm64. 508s Preparing to unpack .../466-libxkbfile1_1%3a1.1.0-1build4_arm64.deb ... 508s Unpacking libxkbfile1:arm64 (1:1.1.0-1build4) ... 508s Selecting previously unselected package libxrandr2:arm64. 508s Preparing to unpack .../467-libxrandr2_2%3a1.5.4-1_arm64.deb ... 508s Unpacking libxrandr2:arm64 (2:1.5.4-1) ... 508s Selecting previously unselected package octave-io. 508s Preparing to unpack .../468-octave-io_2.6.4-3build2_arm64.deb ... 508s Unpacking octave-io (2.6.4-3build2) ... 508s Selecting previously unselected package octave-statistics-common. 508s Preparing to unpack .../469-octave-statistics-common_1.7.3-2_all.deb ... 508s Unpacking octave-statistics-common (1.7.3-2) ... 508s Selecting previously unselected package octave-statistics. 508s Preparing to unpack .../470-octave-statistics_1.7.3-2_arm64.deb ... 508s Unpacking octave-statistics (1.7.3-2) ... 508s Selecting previously unselected package x11-xkb-utils. 508s Preparing to unpack .../471-x11-xkb-utils_7.7+9_arm64.deb ... 508s Unpacking x11-xkb-utils (7.7+9) ... 508s Selecting previously unselected package xserver-common. 508s Preparing to unpack .../472-xserver-common_2%3a21.1.16-1ubuntu1_all.deb ... 508s Unpacking xserver-common (2:21.1.16-1ubuntu1) ... 508s Selecting previously unselected package xvfb. 508s Preparing to unpack .../473-xvfb_2%3a21.1.16-1ubuntu1_arm64.deb ... 508s Unpacking xvfb (2:21.1.16-1ubuntu1) ... 508s Setting up libapt-pkg-perl (0.1.41build1) ... 508s Setting up libhwy1t64:arm64 (1.2.0-3ubuntu3) ... 508s Setting up libmodule-pluggable-perl (5.2-5) ... 508s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 508s Setting up libstring-escape-perl (2010.002-3) ... 508s Setting up libgnutls-openssl27t64:arm64 (3.8.9-2ubuntu2) ... 508s Setting up libxcb-dri3-0:arm64 (1.17.0-2) ... 508s Setting up liblcms2-2:arm64 (2.16-2) ... 508s Setting up libberkeleydb-perl:arm64 (0.66-1) ... 508s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 508s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 508s Setting up libwayland-server0:arm64 (1.23.1-3) ... 508s Setting up libaom3:arm64 (3.12.0-1) ... 508s Setting up libx11-xcb1:arm64 (2:1.8.10-2) ... 508s Setting up libfile-which-perl (1.27-2) ... 508s Setting up libdouble-conversion3:arm64 (3.3.1-1) ... 508s Setting up libncurses-dev:arm64 (6.5+20250216-2) ... 508s Setting up libunicode-utf8-perl (0.62-2build4) ... 508s Setting up libset-intspan-perl (1.19-3) ... 508s Setting up libxcb-xfixes0:arm64 (1.17.0-2) ... 508s Setting up libogg0:arm64 (1.3.5-3build1) ... 508s Setting up libmouse-perl:arm64 (2.5.11-1build1) ... 508s Setting up libzstd-dev:arm64 (1.5.6+dfsg-2) ... 508s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 508s Setting up libpod-pom-perl (2.01-4) ... 508s Setting up libxpm4:arm64 (1:3.5.17-1build2) ... 508s Setting up hdf5-helpers (1.14.5+repack-3) ... 508s Setting up libwmflite-0.2-7:arm64 (0.2.13-1.1build3) ... 508s Setting up libregexp-pattern-perl (0.2.14-2) ... 508s Setting up libdata-messagepack-perl (1.02-1build5) ... 508s Setting up libclass-inspector-perl (1.36-3) ... 508s Setting up libxcb-xinput0:arm64 (1.17.0-2) ... 508s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 508s Setting up libdynaloader-functions-perl (0.004-1) ... 508s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 508s Setting up libtext-glob-perl (0.11-3) ... 508s Setting up libclass-method-modifiers-perl (2.15-1) ... 508s Setting up liblist-compare-perl (0.55-2) ... 508s Setting up libxcb-render0:arm64 (1.17.0-2) ... 508s Setting up libclone-perl:arm64 (0.47-1) ... 508s Setting up libarchive-zip-perl (1.68-1) ... 508s Setting up libsub-identify-perl (0.14-3build4) ... 508s Setting up libcpanel-json-xs-perl:arm64 (4.39-1) ... 508s Setting up libglvnd0:arm64 (1.7.0-1build1) ... 508s Setting up libio-stringy-perl (2.113-2) ... 508s Setting up libhtml-tagset-perl (3.24-1) ... 508s Setting up libts0t64:arm64 (1.22-1.1build1) ... 508s Setting up liblog-any-perl (1.717-1) ... 508s Setting up libyaml-pp-perl (0.39.0-1) ... 508s Setting up libxcb-glx0:arm64 (1.17.0-2) ... 508s Setting up libdevel-size-perl (0.84-1build1) ... 508s Setting up unzip (6.0-28ubuntu6) ... 508s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 508s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 508s Setting up libconvert-binhex-perl (1.125-3) ... 508s Setting up liblwp-mediatypes-perl (6.04-2) ... 508s Setting up libyaml-libyaml-perl (0.903.0+ds-1) ... 508s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 508s Setting up libio-interactive-perl (1.026-1) ... 508s Setting up libxcb-keysyms1:arm64 (0.4.1-1) ... 508s Setting up libxcb-shape0:arm64 (1.17.0-2) ... 508s Setting up x11-common (1:7.7+23ubuntu3) ... 508s Setting up libtry-tiny-perl (0.32-1) ... 508s Setting up libdeflate0:arm64 (1.23-1) ... 508s Setting up perl-openssl-defaults:arm64 (7build3) ... 508s Setting up libmldbm-perl (2.05-4) ... 508s Setting up libxml-namespacesupport-perl (1.12-2) ... 508s Setting up m4 (1.4.19-7) ... 508s Setting up libevent-2.1-7t64:arm64 (2.1.12-stable-10) ... 508s Setting up libclone-choose-perl (0.010-2) ... 508s Setting up libqhull-r8.0:arm64 (2020.2-6build1) ... 508s Setting up libxcb-render-util0:arm64 (0.3.10-1) ... 508s Setting up libtime-moment-perl (0.44-2build5) ... 508s Setting up libencode-locale-perl (1.05-3) ... 508s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 508s Setting up libxcb-icccm4:arm64 (0.4.2-1) ... 508s Setting up texinfo-lib (7.1.1-1) ... 508s Setting up libreadline-dev:arm64 (8.2-6) ... 508s Setting up libmpg123-0t64:arm64 (1.32.10-1) ... 508s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 508s Setting up libconfig-tiny-perl (2.30-1) ... 508s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 508s Setting up libunwind8:arm64 (1.6.2-3.1) ... 508s Setting up liblist-utilsby-perl (0.12-2) ... 508s Setting up libyaml-tiny-perl (1.76-1) ... 508s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 508s Setting up octave-common (9.4.0-1) ... 508s Setting up libregexp-common-perl (2024080801-1) ... 508s Setting up libpcre2-16-0:arm64 (10.45-1) ... 508s Setting up libaec0:arm64 (1.1.3-1) ... 508s Setting up libnet-netmask-perl (2.0002-2) ... 508s Setting up libopengl0:arm64 (1.7.0-1build1) ... 508s Setting up libsub-install-perl (0.929-1) ... 508s Setting up libxcb-util1:arm64 (0.4.1-1) ... 508s Setting up libpsl-dev:arm64 (0.21.2-1.1build1) ... 508s Setting up libxxf86vm1:arm64 (1:1.1.4-1build4) ... 508s Setting up libindirect-perl (0.39-2build5) ... 508s Setting up libxcb-xkb1:arm64 (1.17.0-2) ... 508s Setting up libxcb-image0:arm64 (0.4.0-2build1) ... 508s Setting up libnumber-compare-perl (0.03-3) ... 508s Setting up libxcb-present0:arm64 (1.17.0-2) ... 508s Setting up liberror-perl (0.17030-1) ... 508s Setting up libasound2-data (1.2.13-1build1) ... 508s Setting up patchutils (0.4.2-1build3) ... 508s Setting up tex-common (6.19) ... 509s update-language: texlive-base not installed and configured, doing nothing! 509s Setting up libjson-maybexs-perl (1.004008-1) ... 509s Setting up libxml-sax-base-perl (1.09-3) ... 509s Setting up libio-string-perl (1.08-4) ... 509s Setting up libboolean-perl (0.46-3) ... 509s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 509s Setting up xtrans-dev (1.4.0-1) ... 509s Setting up libfontenc1:arm64 (1:1.1.8-1build1) ... 509s Setting up autotools-dev (20220109.1) ... 509s Setting up libblas3:arm64 (3.12.1-2) ... 509s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 509s Setting up libclass-data-inheritable-perl (0.10-1) ... 509s Setting up libunbound8:arm64 (1.22.0-1ubuntu1) ... 509s Setting up libpkgconf3:arm64 (1.8.1-4) ... 509s Setting up libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-3ubuntu1) ... 509s Setting up libalgorithm-c3-perl (0.11-2) ... 509s Setting up libasound2t64:arm64 (1.2.13-1build1) ... 509s Setting up liblog-log4perl-perl (1.57-1) ... 509s Setting up libtext-reform-perl (1.20-5) ... 509s Setting up libgnutls-dane0t64:arm64 (3.8.9-2ubuntu2) ... 509s Setting up libfile-find-rule-perl (0.34-3) ... 509s Setting up libxfixes3:arm64 (1:6.0.0-2build1) ... 509s Setting up libxcb-sync1:arm64 (1.17.0-2) ... 509s Setting up libipc-system-simple-perl (1.30-2) ... 509s Setting up libio-tiecombine-perl (1.005-3) ... 509s Setting up libnet-domain-tld-perl (1.75-4) ... 509s Setting up libgssrpc4t64:arm64 (1.21.3-4ubuntu2) ... 509s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 509s Setting up libldap-dev:arm64 (2.6.9+dfsg-1~exp2ubuntu1) ... 509s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 509s Setting up libxcb-cursor0:arm64 (0.1.5-1) ... 509s Setting up lzip (1.25-2) ... 509s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 509s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 509s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 509s Setting up libavahi-common-data:arm64 (0.8-16ubuntu1) ... 509s Setting up libopus0:arm64 (1.5.2-2) ... 509s Setting up t1utils (1.41-4build3) ... 509s Setting up libxinerama1:arm64 (2:1.1.4-3build1) ... 509s Setting up diffstat (1.67-1) ... 509s Setting up libimagequant0:arm64 (2.18.0-1build1) ... 509s Setting up comerr-dev:arm64 (2.1-1.47.2-1ubuntu1) ... 509s Setting up libxkbcommon-x11-0:arm64 (1.7.0-2) ... 509s Setting up fonts-dejavu-mono (2.37-8) ... 509s Setting up libssl-dev:arm64 (3.4.1-1ubuntu1) ... 509s Setting up libmpc3:arm64 (1.3.1-1build2) ... 509s Setting up libvorbis0a:arm64 (1.3.7-2) ... 509s Setting up libvariable-magic-perl (0.64-1build1) ... 509s Setting up libio-html-perl (1.004-3) ... 509s Setting up libxrandr2:arm64 (2:1.5.4-1) ... 509s Setting up libtext-template-perl (1.61-1) ... 509s Setting up libpod-parser-perl (1.67-1) ... 509s Setting up autopoint (0.23.1-1) ... 509s Setting up libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 509s Setting up fonts-dejavu-core (2.37-8) ... 509s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 509s Setting up pkgconf-bin (1.8.1-4) ... 509s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 509s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 509s Setting up libltdl7:arm64 (2.5.4-4) ... 509s Setting up libidn2-dev:arm64 (2.3.7-2build2) ... 509s Setting up libfftw3-double3:arm64 (3.3.10-2fakesync1build1) ... 509s Setting up libparams-util-perl (1.102-3build1) ... 509s Setting up libgfortran5:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libvulkan1:arm64 (1.4.304.0-1) ... 509s Setting up libtime-duration-perl (1.21-2) ... 509s Setting up autoconf (2.72-3ubuntu1) ... 509s Setting up libtext-xslate-perl:arm64 (3.5.9-2build1) ... 509s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 509s Setting up libwebp7:arm64 (1.5.0-0.1) ... 509s Setting up libarray-intspan-perl (2.004-2) ... 509s Setting up libcapture-tiny-perl (0.50-1) ... 509s Setting up libtimedate-perl (2.3300-2) ... 509s Setting up libexporter-lite-perl (0.09-2) ... 509s Setting up libubsan1:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libsub-name-perl:arm64 (0.28-1) ... 509s Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 509s Setting up dwz (0.15-1build6) ... 509s Setting up libdata-validate-domain-perl (0.15-1) ... 509s Setting up libproc-processtable-perl:arm64 (0.636-1build4) ... 509s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 509s Setting up libmtdev1t64:arm64 (1.1.7-1) ... 509s Setting up libduktape207:arm64 (2.7.0+tests-0ubuntu3) ... 509s Setting up libxshmfence1:arm64 (1.3-1build5) ... 509s Setting up libhwasan0:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libxcb-randr0:arm64 (1.17.0-2) ... 509s Setting up libpath-tiny-perl (0.146-1) ... 509s Setting up libasan8:arm64 (15-20250222-0ubuntu1) ... 509s Setting up lzop (1.04-2build3) ... 509s Setting up libjson-perl (4.10000-1) ... 509s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 509s Setting up librole-tiny-perl (2.002004-1) ... 509s Setting up debugedit (1:5.1-2) ... 509s Setting up libipc-run3-perl (0.049-1) ... 509s Setting up libmd4c0:arm64 (0.5.2-2) ... 509s Setting up libregexp-wildcards-perl (1.05-3) ... 509s Setting up libmousex-strictconstructor-perl (0.02-3) ... 509s Setting up libfile-sharedir-perl (1.118-3) ... 509s Setting up libsub-uplevel-perl (0.2800-3) ... 509s Setting up libsuitesparseconfig7:arm64 (1:7.8.3+dfsg-3) ... 509s Setting up liblua5.4-0:arm64 (5.4.7-1) ... 509s Setting up libaliased-perl (0.34-3) ... 509s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 509s Setting up libthai-data (0.1.29-2build1) ... 509s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 509s Setting up libstrictures-perl (2.000006-1) ... 509s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 509s Setting up libdevel-stacktrace-perl (2.0500-1) ... 509s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 509s Setting up libtext-autoformat-perl (1.750000-2) ... 509s Setting up libglu1-mesa:arm64 (9.0.2-1.1build1) ... 509s Setting up libflac12t64:arm64 (1.4.3+ds-4) ... 509s Setting up libtoml-tiny-perl (0.19-1) ... 509s Setting up libstemmer0d:arm64 (2.2.0-4build1) ... 509s Setting up libxkbfile1:arm64 (1:1.1.0-1build4) ... 509s Setting up libsort-versions-perl (1.62-3) ... 509s Setting up libtsan2:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libexporter-tiny-perl (1.006002-1) ... 509s Setting up libterm-readkey-perl (2.38-2build5) ... 509s Setting up libisl23:arm64 (0.27-1) ... 509s Setting up libtext-unidecode-perl (1.30-3) ... 509s Setting up libde265-0:arm64 (1.0.15-1build5) ... 509s Setting up libfont-ttf-perl (1.06-2) ... 509s Setting up libfile-homedir-perl (1.006-2) ... 509s Setting up libsamplerate0:arm64 (0.2.2-4build1) ... 509s Setting up libtasn1-6-dev:arm64 (4.20.0-2) ... 509s Setting up libwebpmux3:arm64 (1.5.0-0.1) ... 509s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 509s Setting up libperlio-gzip-perl (0.20-1build5) ... 509s Setting up libjxl0.11:arm64 (0.11.1-1) ... 509s Setting up libxfont2:arm64 (1:2.0.6-1build1) ... 509s Setting up libhtml-html5-entities-perl (0.004-3) ... 509s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 509s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 509s Setting up libmarkdown2:arm64 (2.2.7-2.1) ... 509s Setting up libcc1-0:arm64 (15-20250222-0ubuntu1) ... 509s Setting up liburi-perl (5.30-1) ... 509s Setting up libnet-ipv6addr-perl (1.02-1) ... 509s Setting up libbrotli-dev:arm64 (1.1.0-2build4) ... 509s Setting up liblsan0:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libp11-kit-dev:arm64 (0.25.5-2ubuntu3) ... 509s Setting up libmp3lame0:arm64 (3.100-6build1) ... 509s Setting up libblas-dev:arm64 (3.12.1-2) ... 509s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 509s Setting up libsz2:arm64 (1.1.3-1) ... 509s Setting up libitm1:arm64 (15-20250222-0ubuntu1) ... 509s Setting up libvorbisenc2:arm64 (1.3.7-2) ... 509s Setting up libkadm5clnt-mit12:arm64 (1.21.3-4ubuntu2) ... 509s Setting up libdata-validate-ip-perl (0.31-1) ... 509s Setting up libwacom-common (2.14.0-1) ... 509s Setting up libmousex-nativetraits-perl (1.09-3) ... 509s Setting up libemail-address-xs-perl (1.05-1build5) ... 509s Setting up libwayland-client0:arm64 (1.23.1-3) ... 509s Setting up libnet-ssleay-perl:arm64 (1.94-3) ... 509s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 509s Setting up automake (1:1.17-3ubuntu1) ... 509s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 509s Setting up libb2-1:arm64 (0.98.1-1.1build1) ... 509s Setting up x11proto-dev (2024.1-1) ... 509s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 509s Setting up gnuplot-data (6.0.2+dfsg1-1) ... 509s Setting up libice6:arm64 (2:1.1.1-1) ... 509s Setting up libqt6core6t64:arm64 (6.8.2+dfsg-5) ... 509s Setting up libhttp-date-perl (6.06-1) ... 509s Setting up mesa-libgallium:arm64 (25.0.1-2ubuntu1) ... 509s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 509s Setting up liblapack3:arm64 (3.12.1-2) ... 509s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 509s Setting up libproxy1v5:arm64 (0.5.9-1) ... 509s Setting up libfile-basedir-perl (0.09-2) ... 509s Setting up gettext (0.23.1-1) ... 509s Setting up libarpack2t64:arm64 (3.9.1-4) ... 509s Setting up libfftw3-single3:arm64 (3.3.10-2fakesync1build1) ... 509s Setting up libgmp-dev:arm64 (2:6.3.0+dfsg-3ubuntu1) ... 509s Setting up libamd3:arm64 (1:7.8.3+dfsg-3) ... 509s Setting up libfile-listing-perl (6.16-1) ... 509s Setting up libxau-dev:arm64 (1:1.0.11-1) ... 509s Setting up nettle-dev:arm64 (3.10.1-1) ... 509s Setting up libkdb5-10t64:arm64 (1.21.3-4ubuntu2) ... 509s Setting up libgbm1:arm64 (25.0.1-2ubuntu1) ... 509s Setting up libcolamd3:arm64 (1:7.8.3+dfsg-3) ... 509s Setting up libwacom9:arm64 (2.14.0-1) ... 509s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 509s Setting up liblist-moreutils-perl (0.430-2) ... 509s Setting up libxcursor1:arm64 (1:1.2.3-1) ... 509s Setting up libpod-constants-perl (0.19-2) ... 509s Setting up libgl1-mesa-dri:arm64 (25.0.1-2ubuntu1) ... 509s Setting up libhash-merge-perl (0.302-1) ... 509s Setting up libsoftware-copyright-perl (0.014-1) ... 509s Setting up libaec-dev:arm64 (1.1.3-1) ... 509s Setting up libavahi-common3:arm64 (0.8-16ubuntu1) ... 509s Setting up libcxsparse4:arm64 (1:7.8.3+dfsg-3) ... 509s Setting up libfftw3-long3:arm64 (3.3.10-2fakesync1build1) ... 509s Setting up libnet-http-perl (6.23-1) ... 509s Setting up libpath-iterator-rule-perl (1.015-2) ... 509s Setting up libtext-markdown-discount-perl (0.18-1) ... 509s Setting up libappstream5:arm64 (1.0.4-1) ... 509s Setting up libexception-class-perl (1.45-1) ... 509s Setting up libclass-c3-perl (0.35-2) ... 509s Setting up libqrupdate1:arm64 (1.1.5-1) ... 509s Setting up libdevel-callchecker-perl:arm64 (0.009-1build1) ... 509s Setting up libxml-sax-perl (1.02+dfsg-4) ... 509s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 509s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 509s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 509s Setting up libcamd3:arm64 (1:7.8.3+dfsg-3) ... 509s Setting up pkgconf:arm64 (1.8.1-4) ... 509s Setting up libinput-bin (1.27.1-1) ... 509s Setting up libxs-parse-sublike-perl:arm64 (0.37-1) ... 509s Setting up intltool-debian (0.35.0+20060710.6) ... 509s Setting up libthai0:arm64 (0.1.29-2build1) ... 509s Setting up libxdmcp-dev:arm64 (1:1.1.5-1) ... 509s Setting up libegl-mesa0:arm64 (25.0.1-2ubuntu1) ... 509s Setting up libdata-validate-uri-perl (0.07-3) ... 509s Setting up libxs-parse-keyword-perl (0.48-2) ... 509s Setting up libtest-exception-perl (0.43-3) ... 509s Setting up appstream (1.0.4-1) ... 509s ✔ Metadata cache was updated successfully. 510s Setting up libqt6xml6:arm64 (6.8.2+dfsg-5) ... 510s Setting up libglpk40:arm64 (5.0-1build2) ... 510s Setting up libqt6sql6:arm64 (6.8.2+dfsg-5) ... 510s Setting up libstring-copyright-perl (0.003014-1) ... 510s Setting up libraqm0:arm64 (0.10.2-1) ... 510s Setting up liblapack-dev:arm64 (3.12.1-2) ... 510s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 510s Setting up libdata-optlist-perl (0.114-1) ... 510s Setting up libssh2-1-dev:arm64 (1.11.1-1) ... 510s Setting up libccolamd3:arm64 (1:7.8.3+dfsg-3) ... 510s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 510s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 510s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 510s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 510s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 510s Setting up dh-strip-nondeterminism (1.14.1-2) ... 510s Setting up libwww-robotrules-perl (6.02-1) ... 510s Setting up libsyntax-keyword-try-perl (0.30-1) ... 510s Setting up libjack-jackd2-0:arm64 (1.9.22~dfsg-4) ... 510s Setting up libhdf5-310:arm64 (1.14.5+repack-3) ... 510s Setting up cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 510s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 510s Setting up libhtml-parser-perl:arm64 (3.83-1build1) ... 510s Setting up libkadm5srv-mit12:arm64 (1.21.3-4ubuntu2) ... 510s Setting up libegl1:arm64 (1.7.0-1build1) ... 510s Setting up libqt6core5compat6:arm64 (6.8.2-3) ... 510s Setting up libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 510s Setting up libsndfile1:arm64 (1.2.2-2) ... 510s Setting up libmro-compat-perl (0.15-2) ... 510s Setting up libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 510s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 510s Setting up libhdf5-fortran-310:arm64 (1.14.5+repack-3) ... 510s Setting up libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 510s Setting up libsm6:arm64 (2:1.2.4-1) ... 510s Setting up libavahi-client3:arm64 (0.8-16ubuntu1) ... 510s Setting up libio-socket-ssl-perl (2.089-1) ... 510s Setting up libsub-exporter-perl (0.990-1) ... 510s Setting up libqt6dbus6:arm64 (6.8.2+dfsg-5) ... 510s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 510s Setting up libhtml-form-perl (6.12-1) ... 510s Setting up krb5-multidev:arm64 (1.21.3-4ubuntu2) ... 510s Setting up libhdf5-cpp-310:arm64 (1.14.5+repack-3) ... 510s Setting up libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 510s Setting up libiterator-perl (0.03+ds1-2) ... 510s Setting up libgnutls28-dev:arm64 (3.8.9-2ubuntu2) ... 510s Setting up libinput10:arm64 (1.27.1-1) ... 510s Setting up libnghttp2-dev:arm64 (1.64.0-1) ... 510s Setting up libhdf5-hl-310:arm64 (1.14.5+repack-3) ... 510s Setting up libportaudio2:arm64 (19.6.0-1.2build3) ... 510s Setting up libhttp-negotiate-perl (6.01-2) ... 510s Setting up fontconfig (2.15.0-2ubuntu1) ... 512s Regenerating fonts cache... done. 512s Setting up libcarp-assert-more-perl (2.8.0-1) ... 512s Setting up libcholmod5:arm64 (1:7.8.3+dfsg-3) ... 512s Setting up libxft2:arm64 (2.3.6-1build1) ... 512s Setting up libglx-mesa0:arm64 (25.0.1-2ubuntu1) ... 512s Setting up libxcb1-dev:arm64 (1.17.0-2) ... 512s Setting up libiterator-util-perl (0.02+ds1-2) ... 512s Setting up libglx0:arm64 (1.7.0-1build1) ... 512s Setting up libhttp-cookies-perl (6.11-1) ... 512s Setting up libspqr4:arm64 (1:7.8.3+dfsg-3) ... 512s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 512s Setting up po-debconf (1.0.21+nmu1) ... 512s Setting up libhtml-tree-perl (5.07-3) ... 512s Setting up libparams-classify-perl:arm64 (0.015-2build6) ... 512s Setting up libpango-1.0-0:arm64 (1.56.2-1) ... 512s Setting up libcgi-pm-perl (4.67-1) ... 512s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 512s Setting up libx11-dev:arm64 (2:1.8.10-2) ... 512s Setting up libcairo2:arm64 (1.18.2-2) ... 512s Setting up libobject-pad-perl (0.820-1) ... 512s Setting up libkrb5-dev:arm64 (1.21.3-4ubuntu2) ... 512s Setting up cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 512s Setting up libgl1:arm64 (1.7.0-1build1) ... 512s Setting up libqt6gui6:arm64 (6.8.2+dfsg-5) ... 512s Setting up libnet-smtp-ssl-perl (1.04-2) ... 512s Setting up libmodule-runtime-perl (0.016-2) ... 512s Setting up libmailtools-perl (2.22-1) ... 512s Setting up libconfig-model-perl (2.155-1) ... 512s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 512s Setting up librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-2build7) ... 512s Setting up texinfo (7.1.1-1) ... 512s Setting up cpp-14 (14.2.0-17ubuntu3) ... 512s Setting up libumfpack6:arm64 (1:7.8.3+dfsg-3) ... 512s Setting up libconst-fast-perl (0.014-2) ... 512s Setting up libqt6network6:arm64 (6.8.2+dfsg-5) ... 512s Setting up cpp (4:14.2.0-1ubuntu1) ... 512s Setting up libdata-section-perl (0.200008-1) ... 512s Setting up libglx-dev:arm64 (1.7.0-1build1) ... 512s Setting up gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 512s Setting up libpangoft2-1.0-0:arm64 (1.56.2-1) ... 512s Setting up libdata-dpath-perl (0.60-1) ... 512s Setting up libfltk1.3t64:arm64 (1.3.8-6.1build2) ... 512s Setting up libfftw3-dev:arm64 (3.3.10-2fakesync1build1) ... 512s Setting up libcups2t64:arm64 (2.4.11-0ubuntu2) ... 512s Setting up libgl-dev:arm64 (1.7.0-1build1) ... 512s Setting up libstring-rewriteprefix-perl (0.009-1) ... 512s Setting up libpangocairo-1.0-0:arm64 (1.56.2-1) ... 512s Setting up libhdf5-hl-cpp-310:arm64 (1.14.5+repack-3) ... 512s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 512s Setting up gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 512s Setting up libhdf5-hl-fortran-310:arm64 (1.14.5+repack-3) ... 512s Setting up libxmu6:arm64 (2:1.1.3-3build2) ... 512s Setting up g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 512s Setting up libmodule-implementation-perl (0.09-2) ... 512s Setting up libpackage-stash-perl (0.40-1) ... 512s Setting up libimport-into-perl (1.002005-2) ... 512s Setting up libmoo-perl (2.005005-1) ... 512s Setting up libqt6opengl6:arm64 (6.8.2+dfsg-5) ... 512s Setting up liblist-someutils-perl (0.59-1) ... 512s Setting up libxaw7:arm64 (2:1.0.16-1) ... 512s Setting up libmime-tools-perl (5.515-1) ... 512s Setting up libsoftware-license-perl (0.104006-1) ... 512s Setting up libclass-load-perl (0.25-2) ... 512s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 512s Setting up gcc-14 (14.2.0-17ubuntu3) ... 512s Setting up libqt6widgets6:arm64 (6.8.2+dfsg-5) ... 512s Setting up libfltk-gl1.3t64:arm64 (1.3.8-6.1build2) ... 512s Setting up libcurl4-openssl-dev:arm64 (8.12.1-3ubuntu1) ... 512s Setting up libhdf5-dev (1.14.5+repack-3) ... 512s update-alternatives: using /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 512s Setting up gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 512s Setting up g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 512s Setting up gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 512s Setting up g++-14 (14.2.0-17ubuntu3) ... 512s Setting up libmoox-aliases-perl (0.001006-2) ... 512s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 512s Setting up libparams-validate-perl:arm64 (1.31-2build4) ... 512s Setting up libqt6openglwidgets6:arm64 (6.8.2+dfsg-5) ... 512s Setting up libb-hooks-endofscope-perl (0.28-1) ... 512s Setting up libqt6printsupport6:arm64 (6.8.2+dfsg-5) ... 512s Setting up libtool (2.5.4-4) ... 512s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 512s Setting up x11-xkb-utils (7.7+9) ... 512s Setting up libqt6help6:arm64 (6.8.2-3) ... 512s Setting up libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-1build4) ... 512s Setting up gcc (4:14.2.0-1ubuntu1) ... 512s Setting up dh-autoreconf (20) ... 512s Setting up libnamespace-clean-perl (0.27-2) ... 512s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 512s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 512s Setting up g++ (4:14.2.0-1ubuntu1) ... 512s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 512s Setting up xserver-common (2:21.1.16-1ubuntu1) ... 512s Setting up licensecheck (3.3.9-1ubuntu1) ... 512s Setting up libapp-cmd-perl (0.337-2) ... 512s Setting up xvfb (2:21.1.16-1ubuntu1) ... 512s Setting up debhelper (13.24.1ubuntu2) ... 512s Setting up gfortran (4:14.2.0-1ubuntu1) ... 512s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 512s 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 512s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 512s 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 512s Setting up cme (1.041-1) ... 512s Setting up libheif-plugin-aomdec:arm64 (1.19.7-1) ... 512s Setting up libwww-perl (6.78-1) ... 512s Setting up libheif1:arm64 (1.19.7-1) ... 512s Setting up libparse-debcontrol-perl (2.005-6) ... 512s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 512s Setting up libwww-mechanize-perl (2.19-1ubuntu1) ... 512s Setting up libgd3:arm64 (2.3.3-12ubuntu3) ... 512s Setting up gnuplot-nox (6.0.2+dfsg1-1) ... 512s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 512s Setting up liblwp-protocol-https-perl (6.14-1) ... 512s Setting up libheif-plugin-libde265:arm64 (1.19.7-1) ... 512s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 512s Setting up lintian (2.121.1+nmu1ubuntu2) ... 512s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 512s Setting up libconfig-model-dpkg-perl (3.010) ... 512s Setting up dh-octave-autopkgtest (1.8.0) ... 512s Setting up octave (9.4.0-1) ... 512s Setting up octave-dev (9.4.0-1) ... 512s Setting up octave-io (2.6.4-3build2) ... 512s Setting up octave-statistics-common (1.7.3-2) ... 512s Setting up octave-statistics (1.7.3-2) ... 512s Setting up dh-octave (1.8.0) ... 512s Processing triggers for libc-bin (2.41-1ubuntu2) ... 512s Processing triggers for man-db (2.13.0-1) ... 514s Processing triggers for udev (257.3-1ubuntu3) ... 515s Processing triggers for install-info (7.1.1-1) ... 516s autopkgtest [13:59:48]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 516s autopkgtest [13:59:48]: test command1: [----------------------- 517s Checking package... 518s Run the unit tests... 518s Checking m files ... 518s [inst/nanmin.m] 518s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/nanmin.m 518s ***** demo 518s ## Find the column minimum values and their indices 518s ## for matrix data with missing values. 518s 518s x = magic (3); 518s x([1, 6:9]) = NaN 518s [y, ind] = nanmin (x) 518s ***** demo 518s ## Find the minimum of all the values in an array, ignoring missing values. 518s ## Create a 2-by-5-by-3 array x with some missing values. 518s 518s x = reshape (1:30, [2, 5, 3]); 518s x([10:12, 25]) = NaN 518s 518s ## Find the minimum of the elements of x. 518s 518s y = nanmin (x, [], 'all') 518s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 518s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 518s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 518s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 518s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 518s ***** shared x, y 518s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 518s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 518s y = x; 518s y(2,3,1) = 0.51; 518s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 518s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 518s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 518s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 518s ***** assert (nanmin (x, [], 'all'), -2.95) 518s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 518s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 518s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 518s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 518s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 518s ***** test 518s xx = repmat ([1:20;6:25], [5 2 6 3]); 518s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 518s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 518s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 518s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 518s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 518s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 518s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 518s ***** assert (nanmin (magic (3), [], 3), magic (3)) 518s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 518s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 518s ***** assert (nanmin (ones (2), 3), ones (2,2)) 518s ***** error <nanmin: VECDIM must contain non-repeating positive integers.> ... 518s nanmin (y, [], [1, 1, 2]) 518s ***** error <nanmin: a second output is not supported with this syntax.> ... 518s [v, idx] = nanmin(x, y, [1 2]) 518s 24 tests, 24 passed, 0 known failure, 0 skipped 518s [inst/combnk.m] 518s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/combnk.m 518s ***** demo 518s c = combnk (1:5, 2); 518s disp ("All pairs of integers between 1 and 5:"); 518s disp (c); 518s ***** test 518s c = combnk (1:3, 2); 518s assert (c, [1, 2; 1, 3; 2, 3]); 518s ***** test 518s c = combnk (1:3, 6); 518s assert (isempty (c)); 518s ***** test 518s c = combnk ({1, 2, 3}, 2); 518s assert (c, {1, 2; 1, 3; 2, 3}); 518s ***** test 518s c = combnk ("hello", 2); 518s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 518s 4 tests, 4 passed, 0 known failure, 0 skipped 518s [inst/mhsample.m] 518s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/mhsample.m 518s ***** demo 518s ## Define function to sample 518s d = 2; 518s mu = [-1; 2]; 518s rand ("seed", 5) # for reproducibility 518s Sigma = rand (d); 518s Sigma = (Sigma + Sigma'); 518s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 518s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 518s ## Inputs 518s start = ones (1, 2); 518s nsamples = 500; 518s sym = true; 518s K = 500; 518s m = 10; 518s rand ("seed", 8) # for reproducibility 518s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 518s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 518s "symmetric", sym, "burnin", K, "thin", m); 518s figure; 518s hold on; 518s plot (smpl(:, 1), smpl(:, 2), 'x'); 518s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 518s z = reshape (pdf ([x(:), y(:)]), size(x)); 518s mesh (x, y, z, "facecolor", "None"); 518s ## Using sample points to find the volume of half a sphere with radius of .5 518s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 518s int = mean (f (smpl) ./ pdf (smpl)); 518s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 518s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 518s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 518s printf ("Monte Carlo integral error estimate %f\n", errest); 518s printf ("The actual error %f\n", trueerr); 518s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 518s ***** demo 518s ## Integrate truncated normal distribution to find normilization constant 518s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 518s nsamples = 1e3; 518s rand ("seed", 5) # for reproducibility 518s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 518s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 518s "symmetric", true, "thin", 4); 518s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 518s x = linspace (-3, 3, 1000); 518s area(x, f(x)); 518s xlabel ('x'); 518s ylabel ('f(x)'); 518s int = mean (f (smpl) ./ pdf (smpl)); 518s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 518s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 518s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 518s printf ("Monte Carlo integral error estimate %f\n", errest); 518s printf ("The actual error %f\n", trueerr); 519s ***** test 519s nchain = 1e4; 519s start = rand (nchain, 1); 519s nsamples = 1e3; 519s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 519s proppdf = @(x, y) 1/3; 519s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 519s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 519s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 519s "burnin", 0); 519s assert (mean (mean (smpl, 1), 3), 1, .01); 519s assert (mean (var (smpl, 1), 3), 1, .01) 522s ***** error mhsample (); 522s ***** error mhsample (1); 523s ***** error mhsample (1, 1); 523s ***** error mhsample (1, 1, "pdf", @(x)x); 523s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 523s 6 tests, 6 passed, 0 known failure, 0 skipped 523s [inst/wblplot.m] 523s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/wblplot.m 523s ***** demo 523s x = [16 34 53 75 93 120]; 523s wblplot (x); 523s ***** demo 523s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 523s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 523s [h, p] = wblplot (x, c); 523s p 523s ***** demo 523s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 523s [h, p] = wblplot (x, [], [], 0.05); 523s p 523s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 523s ***** demo 523s x = [46 64 83 105 123 150 150]; 523s c = [0 0 0 0 0 0 1]; 523s f = [1 1 1 1 1 1 4]; 523s wblplot (x, c, f, 0.05); 523s ***** demo 523s x = [46 64 83 105 123 150 150]; 523s c = [0 0 0 0 0 0 1]; 523s f = [1 1 1 1 1 1 4]; 523s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 523s wblplot (x - 30.92, c, f, 0.05); 523s ***** test 523s hf = figure ("visible", "off"); 523s unwind_protect 523s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 523s [h, p] = wblplot (x, [], [], 0.05); 523s assert (numel (h), 4) 523s assert (p(1), 146.2545, 1E-4) 523s assert (p(2), 1.1973, 1E-4) 523s assert (p(3), 0.9999, 5E-5) 523s unwind_protect_cleanup 523s close (hf); 523s end_unwind_protect 523s warning: using the gnuplot graphics toolkit is discouraged 523s 523s The gnuplot graphics toolkit is not actively maintained and has a number 523s of limitations that are unlikely to be fixed. Communication with gnuplot 523s uses a one-directional pipe and limited information is passed back to the 523s Octave interpreter so most changes made interactively in the plot window 523s will not be reflected in the graphics properties managed by Octave. For 523s example, if the plot window is closed with a mouse click, Octave will not 523s be notified and will not update its internal list of open figure windows. 523s The qt toolkit is recommended instead. 524s 1 test, 1 passed, 0 known failure, 0 skipped 524s [inst/gmdistribution.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/gmdistribution.m 524s ***** test 524s mu = eye(2); 524s Sigma = eye(2); 524s GM = gmdistribution (mu, Sigma); 524s density = GM.pdf ([0 0; 1 1]); 524s assert (density(1) - density(2), 0, 1e-6); 524s 524s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 524s assert (idx, [1; 2]); 524s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 524s assert (nlogl - nlogl2, 0, 1e-6); 524s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 524s assert (P - P3, zeros (2), 1e-6); 524s [idx4,nlogl4] = cluster (GM, eye(2)); 524s assert (size (nlogl4), [1 1]); 524s idx5 = cluster (GM, eye(2)); 524s assert (idx - idx5, zeros (2,1)); 524s 524s D = GM.mahal ([1;0]); 524s assert (D - M(1,:), zeros (1,2), 1e-6); 524s 524s P = GM.posterior ([0 1]); 524s assert (P - P2(2,:), zeros (1,2), 1e-6); 524s 524s R = GM.random(20); 524s assert (size(R), [20, 2]); 524s 524s R = GM.random(); 524s assert (size(R), [1, 2]); 524s 1 test, 1 passed, 0 known failure, 0 skipped 524s [inst/ppplot.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ppplot.m 524s ***** test 524s hf = figure ("visible", "off"); 524s unwind_protect 524s 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]); 524s unwind_protect_cleanup 524s close (hf); 524s end_unwind_protect 524s ***** error ppplot () 524s ***** error <ppplot: X must be a numeric vector> ppplot (ones (2,2)) 524s ***** error <ppplot: X must be a numeric vector> ppplot (1, 2) 524s ***** error <ppplot: DIST must be a strin> ppplot ([1 2 3 4], 2) 524s 5 tests, 5 passed, 0 known failure, 0 skipped 524s [inst/vartest2.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/vartest2.m 524s ***** error<vartest2: too few input arguments.> vartest2 (); 524s ***** error<vartest2: too few input arguments.> vartest2 (ones (20,1)); 524s ***** error<vartest2: X and Y must be vectors or matrices or N-D arrays.> ... 524s vartest2 (rand (20,1), 5); 524s ***** error<vartest2: invalid value for alpha.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 524s ***** error<vartest2: invalid value for alpha.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 524s ***** error<vartest2: invalid value for alpha.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 524s ***** error<vartest2: invalid value for alpha.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 524s ***** error<vartest2: invalid value for tail.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 524s ***** error<vartest2: invalid value for tail.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 524s ***** error<vartest2: invalid value for operating dimension.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 524s ***** error<vartest2: invalid value for operating dimension.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 524s ***** error<vartest2: invalid name for optional arguments.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 524s ***** error<vartest2: optional arguments must be in name/value pairs.> ... 524s vartest2 (rand (20,1), rand (25,1)*2, "some"); 524s ***** test 524s load carsmall 524s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 524s assert (h, 0); 524s assert (pval, 0.6288022362718455, 1e-13); 524s assert (ci, [0.4139; 1.7193], 1e-4); 524s assert (stat.fstat, 0.8384, 1e-4); 524s assert (stat.df1, 30); 524s assert (stat.df2, 33); 524s 14 tests, 14 passed, 0 known failure, 0 skipped 524s [inst/datasample.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/datasample.m 524s ***** error datasample(); 524s ***** error datasample(1); 524s ***** error <data must be a vector or matrix> datasample({1, 2, 3}, 1); 524s ***** error <k must be a positive integer scalar> datasample([1 2], -1); 524s ***** error <k must be a positive integer scalar> datasample([1 2], 1.5); 524s ***** error <k must be a positive integer scalar> datasample([1 2], [1 1]); 524s ***** error <k must be a positive integer scalar> datasample([1 2], 'g', [1 1]); 524s ***** error <DIM must be a positive integer scalar> datasample([1 2], 1, -1); 524s ***** error <DIM must be a positive integer scalar> datasample([1 2], 1, 1.5); 524s ***** error <DIM must be a positive integer scalar> datasample([1 2], 1, [1 1]); 524s ***** error <Replace> datasample([1 2], 1, 1, "Replace", -2); 524s ***** error <weights must be defined> datasample([1 2], 1, 1, "Weights", "abc"); 524s ***** error <weights must be defined> datasample([1 2], 1, 1, "Weights", [1 -2 3]); 524s ***** error <weights must be defined> datasample([1 2], 1, 1, "Weights", ones (2)); 524s ***** error <weights must be equal> datasample([1 2], 1, 1, "Weights", [1 2 3]); 524s ***** test 524s dat = randn (10, 4); 524s assert (size (datasample (dat, 3, 1)), [3 4]); 524s ***** test 524s dat = randn (10, 4); 524s assert (size (datasample (dat, 3, 2)), [10 3]); 524s 17 tests, 17 passed, 0 known failure, 0 skipped 524s [inst/tabulate.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/tabulate.m 524s ***** demo 524s ## Generate a frequency table for a vector of data in a cell array 524s load patients 524s 524s ## Display the first seven entries of the Gender variable 524s gender = Gender(1:7) 524s 524s ## Compute the equency table that shows the number and 524s ## percentage of Male and Female patients 524s tabulate (Gender) 524s ***** demo 524s ## Create a frequency table for a vector of positive integers 524s load patients 524s 524s ## Display the first seven entries of the Gender variable 524s height = Height(1:7) 524s 524s ## Create a frequency table that shows, in its second and third columns, 524s ## the number and percentage of patients with a particular height. 524s table = tabulate (Height); 524s 524s ## Display the first and last seven entries of the frequency table 524s first = table(1:7,:) 524s 524s last = table(end-6:end,:) 524s ***** demo 524s ## Create a frequency table from a character array 524s load carsmall 524s 524s ## Tabulate the data in the Origin variable, which shows the 524s ## country of origin of each car in the data set 524s tabulate (Origin) 524s ***** demo 524s ## Create a frequency table from a numeric vector with NaN values 524s load carsmall 524s 524s ## The carsmall dataset contains measurements of 100 cars 524s total_cars = length (MPG) 524s ## For six cars, the MPG value is missing 524s missingMPG = length (MPG(isnan (MPG))) 524s 524s ## Create a frequency table using MPG 524s tabulate (MPG) 524s table = tabulate (MPG); 524s 524s ## Only 94 cars were used 524s valid_cars = sum (table(:,2)) 524s ***** test 524s load patients 524s table = tabulate (Gender); 524s assert (table{1,1}, "Male"); 524s assert (table{2,1}, "Female"); 524s assert (table{1,2}, 47); 524s assert (table{2,2}, 53); 524s ***** test 524s load patients 524s table = tabulate (Height); 524s assert (table(end-4,:), [68, 15, 15]); 524s assert (table(end-3,:), [69, 8, 8]); 524s assert (table(end-2,:), [70, 11, 11]); 524s assert (table(end-1,:), [71, 10, 10]); 524s assert (table(end,:), [72, 4, 4]); 524s ***** error<tabulate: X must be either a numeric vector> tabulate (ones (3)) 524s ***** error<tabulate: X must be either a numeric vector> tabulate ({1, 2, 3, 4}) 524s ***** error<tabulate: X must be either a numeric vector> ... 524s tabulate ({"a", "b"; "a", "c"}) 524s 5 tests, 5 passed, 0 known failure, 0 skipped 524s [inst/pcares.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/pcares.m 524s ***** demo 524s x = [ 7 26 6 60; 524s 1 29 15 52; 524s 11 56 8 20; 524s 11 31 8 47; 524s 7 52 6 33; 524s 11 55 9 22; 524s 3 71 17 6; 524s 1 31 22 44; 524s 2 54 18 22; 524s 21 47 4 26; 524s 1 40 23 34; 524s 11 66 9 12; 524s 10 68 8 12]; 524s 524s ## As we increase the number of principal components, the norm 524s ## of the residuals matrix will decrease 524s r1 = pcares (x,1); 524s n1 = norm (r1) 524s r2 = pcares (x,2); 524s n2 = norm (r2) 524s r3 = pcares (x,3); 524s n3 = norm (r3) 524s r4 = pcares (x,4); 524s n4 = norm (r4) 524s ***** test 524s load hald 524s r1 = pcares (ingredients,1); 524s r2 = pcares (ingredients,2); 524s r3 = pcares (ingredients,3); 524s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 524s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 524s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 524s ***** error<pcares: too few input arguments.> pcares (ones (20, 3)) 524s ***** error<pcares: NDIM must be less than or equal to the column of X.> ... 524s pcares (ones (30, 2), 3) 524s 3 tests, 3 passed, 0 known failure, 0 skipped 524s [inst/ztest.m] 524s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ztest.m 524s ***** error<ztest: too few input arguments.> ztest (); 524s ***** error<ztest: invalid value for standard deviation.> ... 524s ztest ([1, 2, 3, 4], 2, -0.5); 524s ***** error<ztest: invalid VALUE for alpha.> ... 524s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 524s ***** error<ztest: invalid VALUE for alpha.> ... 524s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 525s ***** error<ztest: invalid VALUE for alpha.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 525s ***** error<ztest: invalid VALUE for tail.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 525s ***** error<ztest: invalid VALUE for tail.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 525s ***** error<ztest: invalid VALUE for operating dimension.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 525s ***** error<ztest: invalid VALUE for operating dimension.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 525s ***** error<ztest: invalid NAME for optional arguments.> ... 525s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 525s ***** test 525s load carsmall 525s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 525s assert (h, 0); 525s assert (pval, 1, 1e-14); 525s assert (ci, [22.094; 25.343], 1e-3); 525s ***** test 525s load carsmall 525s [h, pval, ci] = ztest (MPG, 26, 8); 525s assert (h, 1); 525s assert (pval, 0.00568359158544743, 1e-14); 525s assert (ci, [22.101; 25.335], 1e-3); 525s ***** test 525s load carsmall 525s [h, pval, ci] = ztest (MPG, 26, 4); 525s assert (h, 1); 525s assert (pval, 3.184168011941316e-08, 1e-14); 525s assert (ci, [22.909; 24.527], 1e-3); 525s 13 tests, 13 passed, 0 known failure, 0 skipped 525s [inst/rangesearch.m] 525s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/rangesearch.m 525s ***** demo 525s ## Generate 1000 random 2D points from each of five distinct multivariate 525s ## normal distributions that form five separate classes 525s N = 1000; 525s d = 10; 525s randn ("seed", 5); 525s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 525s randn ("seed", 6); 525s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 525s randn ("seed", 7); 525s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 525s randn ("seed", 8); 525s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 525s randn ("seed", 8); 525s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 525s X = [X1; X2; X3; X4; X5]; 525s 525s ## For each point in X, find the points in X that are within a radius d 525s ## away from the points in X. 525s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 525s 525s ## Select the first point in X (corresponding to the first class) and find 525s ## its nearest neighbors within the radius d. Display these points in 525s ## one color and the remaining points in a different color. 525s x = X(1,:); 525s nearestPoints = X (Idx{1},:); 525s nonNearestIdx = true (size (X, 1), 1); 525s nonNearestIdx(Idx{1}) = false; 525s 525s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 525s hold on 525s scatter (nearestPoints(:,1),nearestPoints(:,2)) 525s scatter (x(1), x(2), "black", "filled") 525s hold off 525s 525s ## Select the last point in X (corresponding to the fifth class) and find 525s ## its nearest neighbors within the radius d. Display these points in 525s ## one color and the remaining points in a different color. 525s x = X(end,:); 525s nearestPoints = X (Idx{1},:); 525s nonNearestIdx = true (size (X, 1), 1); 525s nonNearestIdx(Idx{1}) = false; 525s 525s figure 525s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 525s hold on 525s scatter (nearestPoints(:,1),nearestPoints(:,2)) 525s scatter (x(1), x(2), "black", "filled") 525s hold off 525s ***** shared x, y, X, Y 525s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 525s y = [2, 3, 4; 1, 4, 3]; 525s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 525s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 525s ***** test 525s [idx, D] = rangesearch (x, y, 4); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 525s assert (idx, {[1, 2, 4]; [1, 4]}); 525s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 525s "SortIndices", false); 525s assert (idx, {[1, 2, 4]; [1, 4]}); 525s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 525s ***** test 525s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 525s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 525s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 525s "NSMethod", "exhaustive"); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 525s "NSMethod", "exhaustive"); 525s assert (idx, {[1, 4, 2]; [1, 4]}); 525s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 525s "NSMethod", "exhaustive", "SortIndices", false); 525s assert (idx, {[1, 2, 4]; [1, 4]}); 525s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (X, Y, 4); 525s assert (idx, {[1, 2]; [1, 2, 3]}); 525s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (X, Y, 2); 525s assert (idx, {[1]; [1, 2]}); 525s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 525s ***** test 525s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 525s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 525s assert (idx, {[1, 2]; [1, 2, 3]}); 525s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 525s assert (idx, {[1, 2]; [1, 2, 3]}); 525s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 525s ***** test 525s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 525s "NSMethod", "exhaustive"); 525s assert (idx, {[1, 2]; [1, 2, 3]}); 525s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 525s ***** error<rangesearch: too few input arguments.> rangesearch (1) 525s ***** error<rangesearch: number of columns in X and Y must match.> ... 525s rangesearch (ones (4, 5), ones (4)) 525s ***** error<rangesearch: invalid NAME in optional pairs of arguments.> ... 525s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 525s ***** error<rangesearch: only a single distance parameter can be defined.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 525s ***** error<rangesearch: invalid value of Minkowski Exponent.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 525s ***** error<rangesearch: invalid value in Scale or the size of Scale.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 525s ***** error<rangesearch: invalid value in Cov, Cov can only be given for mahalanobis distance.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 525s ***** error<rangesearch: invalid value in Cov, Cov can only be given for mahalanobis distance.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 525s ***** error<rangesearch: invalid value of bucketsize.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 525s ***** error<rangesearch: 'kdtree' cannot be used with the given distance metric.> ... 525s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 525s 31 tests, 31 passed, 0 known failure, 0 skipped 525s [inst/pcacov.m] 525s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/pcacov.m 525s ***** demo 525s x = [ 7 26 6 60; 525s 1 29 15 52; 525s 11 56 8 20; 525s 11 31 8 47; 525s 7 52 6 33; 525s 11 55 9 22; 525s 3 71 17 6; 525s 1 31 22 44; 525s 2 54 18 22; 525s 21 47 4 26; 525s 1 40 23 34; 525s 11 66 9 12; 525s 10 68 8 12 525s ]; 525s Kxx = cov (x); 525s [coeff, latent, explained] = pcacov (Kxx) 525s ***** test 525s load hald 525s Kxx = cov (ingredients); 525s [coeff,latent,explained] = pcacov(Kxx); 525s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 525s -0.6785, -0.0200, -0.5440, 0.4933; ... 525s 0.0290, 0.7553, 0.4036, 0.5156; ... 525s 0.7309, -0.1085, -0.4684, 0.4844]; 525s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 525s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 525s assert (coeff, c_out, 1e-4); 525s assert (latent, l_out, 1e-4); 525s assert (explained, e_out, 1e-4); 525s ***** error<pcacov: K must be a square matrix.> pcacov (ones (2,3)) 525s ***** error<pcacov: K must be a square matrix.> pcacov (ones (3,3,3)) 525s 3 tests, 3 passed, 0 known failure, 0 skipped 525s [inst/jackknife.m] 525s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/jackknife.m 525s ***** demo 525s for k = 1:1000 525s rand ("seed", k); # for reproducibility 525s x = rand (10, 1); 525s s(k) = std (x); 525s jackstat = jackknife (@std, x); 525s j(k) = 10 * std (x) - 9 * mean (jackstat); 525s endfor 525s figure(); 525s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 525s ***** demo 525s for k = 1:1000 525s randn ("seed", k); # for reproducibility 525s x = randn (1, 50); 525s rand ("seed", k); # for reproducibility 525s y = rand (1, 50); 525s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 525s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 525s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 525s endfor 525s t = (j - sqrt (1 / 12)) ./ sqrt (v); 525s figure(); 525s plot (sort (tcdf (t, 49)), ... 525s "-;Almost linear mapping indicates good fit with t-distribution.;") 525s ***** test 525s ##Example from Quenouille, Table 1 525s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 525s jackstat = jackknife ( @(x) 1/mean(x), d ); 525s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 525s 1 test, 1 passed, 0 known failure, 0 skipped 525s [inst/fitcgam.m] 525s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitcgam.m 525s ***** demo 525s ## Train a GAM classifier for binary classification 525s ## using specific data and plot the decision boundaries. 525s 525s ## Define specific data 525s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 525s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 525s Y = [0; 0; 0; 0; 0; ... 525s 1; 1; 1; 1; 1]; 525s 525s ## Train the GAM model 525s obj = fitcgam (X, Y, "Interactions", "all"); 525s 525s ## Create a grid of values for prediction 525s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 525s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 525s [x1G, x2G] = meshgrid (x1, x2); 525s XGrid = [x1G(:), x2G(:)]; 525s pred = predict (obj, XGrid); 525s 525s ## Plot decision boundaries and data points 525s predNumeric = str2double (pred); 525s gidx = predNumeric > 0.5; 525s 525s figure 525s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 525s hold on 525s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 525s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 525s xlabel("Feature 1"); 525s ylabel("Feature 2"); 525s title("Generalized Additive Model (GAM) Decision Boundary"); 525s legend({"Class 1 Region", "Class 0 Region", ... 525s "Class 1 Samples", "Class 0 Samples"}, ... 525s "location", "northwest") 525s axis tight 525s hold off 525s ***** test 525s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 525s y = [0; 0; 1; 1]; 525s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 525s a = fitcgam (x, y, "PredictorNames", PredictorNames); 525s assert (class (a), "ClassificationGAM"); 525s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 525s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 525s assert (a.ClassNames, {'0'; '1'}) 525s assert (a.PredictorNames, PredictorNames) 525s assert (a.BaseModel.Intercept, 0) 526s ***** test 526s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 526s y = [1; 0; 1; 0; 1]; 526s a = fitcgam (x, y, "interactions", "all"); 526s assert (class (a), "ClassificationGAM"); 526s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 526s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 526s assert (a.ClassNames, {'1'; '0'}) 526s assert (a.PredictorNames, {'x1', 'x2'}) 526s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 528s ***** test 528s load fisheriris 528s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 528s X = meas(inds, :); 528s Y = species(inds, :)'; 528s Y = strcmp (Y, 'virginica')'; 528s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 528s assert (class (a), "ClassificationGAM"); 528s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 528s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 528s assert (a.ClassNames, {'0'; '1'}) 528s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 528s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 528s assert (a.ModelwInt.Intercept, 0) 533s ***** error<fitcgam: too few arguments.> fitcgam () 533s ***** error<fitcgam: too few arguments.> fitcgam (ones (4,1)) 533s ***** error<fitcgam: name-value arguments must be in pairs.> 533s fitcgam (ones (4,2), ones (4, 1), "K") 533s ***** error<fitcgam: number of rows in X and Y must be equal.> 533s fitcgam (ones (4,2), ones (3, 1)) 533s ***** error<fitcgam: number of rows in X and Y must be equal.> 533s fitcgam (ones (4,2), ones (3, 1), "K", 2) 533s 8 tests, 8 passed, 0 known failure, 0 skipped 533s [inst/dist_fit/nakalike.m] 533s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/nakalike.m 533s ***** test 533s nlogL = nakalike ([0.735504, 858.5], [1:50]); 533s assert (nlogL, 202.8689, 1e-4); 533s ***** test 533s nlogL = nakalike ([1.17404, 11], [1:5]); 533s assert (nlogL, 8.6976, 1e-4); 533s ***** test 533s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 533s assert (nlogL, 8.6976, 1e-4); 533s ***** test 533s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 533s assert (nlogL, 8.6976, 1e-4); 533s ***** error<nakalike: function called with too few input arguments.> nakalike (3.25) 533s ***** error<nakalike: X must be a vector.> nakalike ([5, 0.2], ones (2)) 533s ***** error<nakalike: PARAMS must be a two-element vector.> ... 533s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 533s ***** error<nakalike: X and CENSOR vector mismatch.> ... 533s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 533s ***** error<nakalike: X and FREQ vector mismatch.> ... 533s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 533s ***** error<nakalike: X and FREQ vector mismatch.> ... 533s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 533s ***** error<nakalike: FREQ must not contain negative values.> ... 533s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 533s 11 tests, 11 passed, 0 known failure, 0 skipped 533s [inst/dist_fit/gumbelfit.m] 533s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gumbelfit.m 533s ***** demo 533s ## Sample 3 populations from different Gumbel distibutions 533s rand ("seed", 1); # for reproducibility 533s r1 = gumbelrnd (2, 5, 400, 1); 533s rand ("seed", 11); # for reproducibility 533s r2 = gumbelrnd (-5, 3, 400, 1); 533s rand ("seed", 16); # for reproducibility 533s r3 = gumbelrnd (14, 8, 400, 1); 533s r = [r1, r2, r3]; 533s 533s ## Plot them normalized and fix their colors 533s hist (r, 25, 0.32); 533s h = findobj (gca, "Type", "patch"); 533s set (h(1), "facecolor", "c"); 533s set (h(2), "facecolor", "g"); 533s set (h(3), "facecolor", "r"); 533s ylim ([0, 0.28]) 533s xlim ([-11, 50]); 533s hold on 533s 533s ## Estimate their MU and BETA parameters 533s mu_betaA = gumbelfit (r(:,1)); 533s mu_betaB = gumbelfit (r(:,2)); 533s mu_betaC = gumbelfit (r(:,3)); 533s 533s ## Plot their estimated PDFs 533s x = [min(r(:)):max(r(:))]; 533s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 533s plot (x, y, "-pr"); 533s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 533s plot (x, y, "-sg"); 533s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 533s plot (x, y, "-^c"); 533s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 533s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 533s "Normalized HIST of sample 3 with μ=14 and β=8", ... 533s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 533s mu_betaA(1), mu_betaA(2)), ... 533s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 533s mu_betaB(1), mu_betaB(2)), ... 533s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 533s mu_betaC(1), mu_betaC(2))}) 533s title ("Three population samples from different Gumbel distibutions") 533s hold off 533s ***** test 533s x = 1:50; 533s [paramhat, paramci] = gumbelfit (x); 533s paramhat_out = [18.3188, 13.0509]; 533s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 533s assert (paramhat, paramhat_out, 1e-4); 533s assert (paramci, paramci_out, 1e-4); 533s ***** test 533s x = 1:50; 533s [paramhat, paramci] = gumbelfit (x, 0.01); 533s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 533s assert (paramci, paramci_out, 1e-4); 533s ***** error<gumbelfit: X must be a double-precision vector.> gumbelfit (ones (2,5)); 533s ***** error<gumbelfit: X must be a double-precision vector.> ... 533s gumbelfit (single (ones (1,5))); 533s ***** error<gumbelfit: X must NOT contain missing values> ... 533s gumbelfit ([1, 2, 3, 4, NaN]); 533s ***** error<gumbelfit: wrong value for ALPHA.> gumbelfit ([1, 2, 3, 4, 5], 1.2); 533s ***** error<gumbelfit: X and CENSOR vectors mismatch.> ... 533s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 533s ***** error<gumbelfit: X and FREQ vectors mismatch.> ... 533s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 533s ***** error<gamfit: FREQ must not contain negative values.> 533s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 533s ***** error<gumbelfit: 'options' 5th argument> ... 533s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 533s 10 tests, 10 passed, 0 known failure, 0 skipped 533s [inst/dist_fit/binolike.m] 533s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/binolike.m 533s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 533s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 533s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 533s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 533s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 533s ***** test 533s [nlogL, acov] = binolike ([3, 0.333], 3); 533s assert (acov(4), 0.0740, 1e-4) 533s ***** error<binolike: function called with too few input arguments.> binolike (3.25) 533s ***** error<binolike: X must be a vector.> binolike ([5, 0.2], ones (2)) 533s ***** error<binolike: PARAMS must be a two-element vector.> ... 533s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 533s ***** error<binolike: number of trials,> binolike ([1.5, 0.2], 1) 533s ***** error<binolike: number of trials,> binolike ([-1, 0.2], 1) 533s ***** error<binolike: number of trials,> binolike ([Inf, 0.2], 1) 533s ***** error<binolike: probability of success,> binolike ([5, 1.2], [3, 5]) 533s ***** error<binolike: probability of success,> binolike ([5, -0.2], [3, 5]) 533s ***** error<binolike: X and FREQ vectors mismatch.> ... 533s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 533s ***** error<binolike: FREQ must not contain negative values.> ... 533s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 533s ***** error<binolike: X cannot have negative values.> binolike ([5, 0.2], [-1, 3]) 533s ***** error<binolike: number of successes,> binolike ([5, 0.2], [3, 5, 7]) 533s 18 tests, 18 passed, 0 known failure, 0 skipped 533s [inst/dist_fit/loglfit.m] 533s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/loglfit.m 533s ***** demo 533s ## Sample 3 populations from different log-logistic distibutions 533s rand ("seed", 5) # for reproducibility 533s r1 = loglrnd (0, 1, 2000, 1); 533s rand ("seed", 2) # for reproducibility 533s r2 = loglrnd (0, 0.5, 2000, 1); 533s rand ("seed", 7) # for reproducibility 533s r3 = loglrnd (0, 0.125, 2000, 1); 533s r = [r1, r2, r3]; 533s 533s ## Plot them normalized and fix their colors 533s hist (r, [0.05:0.1:2.5], 10); 533s h = findobj (gca, "Type", "patch"); 533s set (h(1), "facecolor", "c"); 533s set (h(2), "facecolor", "g"); 533s set (h(3), "facecolor", "r"); 533s ylim ([0, 3.5]); 533s xlim ([0, 2.0]); 533s hold on 533s 533s ## Estimate their MU and LAMBDA parameters 533s a_bA = loglfit (r(:,1)); 533s a_bB = loglfit (r(:,2)); 533s a_bC = loglfit (r(:,3)); 533s 533s ## Plot their estimated PDFs 533s x = [0.01:0.1:2.01]; 533s y = loglpdf (x, a_bA(1), a_bA(2)); 533s plot (x, y, "-pr"); 533s y = loglpdf (x, a_bB(1), a_bB(2)); 533s plot (x, y, "-sg"); 533s y = loglpdf (x, a_bC(1), a_bC(2)); 533s plot (x, y, "-^c"); 533s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 533s "Normalized HIST of sample 2 with α=1 and β=2", ... 533s "Normalized HIST of sample 3 with α=1 and β=8", ... 533s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 533s a_bA(1), a_bA(2)), ... 533s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 533s a_bB(1), a_bB(2)), ... 533s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 533s a_bC(1), a_bC(2))}) 533s title ("Three population samples from different log-logistic distibutions") 533s hold off 533s ***** test 533s [paramhat, paramci] = loglfit ([1:50]); 533s paramhat_out = [3.09717, 0.468525]; 533s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 533s assert (paramhat, paramhat_out, 1e-5); 533s assert (paramci, paramci_out, 1e-5); 533s ***** test 533s paramhat = loglfit ([1:5]); 533s paramhat_out = [1.01124, 0.336449]; 533s assert (paramhat, paramhat_out, 1e-5); 533s ***** test 533s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 533s paramhat_out = [1.01124, 0.336449]; 533s assert (paramhat, paramhat_out, 1e-4); 533s ***** test 533s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 533s paramhat_out = loglfit ([1:5, 5]); 533s assert (paramhat, paramhat_out, 1e-4); 533s ***** error<loglfit: X must be a vector.> loglfit (ones (2,5)); 533s ***** error<loglfit: wrong value for ALPHA.> loglfit ([1, 2, 3, 4, 5], 1.2); 533s ***** error<loglfit: wrong value for ALPHA.> loglfit ([1, 2, 3, 4, 5], 0); 533s ***** error<loglfit: wrong value for ALPHA.> loglfit ([1, 2, 3, 4, 5], "alpha"); 533s ***** error<loglfit: X and CENSOR vectors mismatch.> ... 533s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 533s ***** error<loglfit: X and CENSOR vectors mismatch.> ... 533s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 533s ***** error<loglfit: X and FREQ vectors mismatch.> ... 533s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 533s ***** error<loglfit: X and FREQ vectors mismatch.> ... 533s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 533s ***** error<loglfit: 'options' 5th argument must be a structure> ... 533s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 533s 13 tests, 13 passed, 0 known failure, 0 skipped 533s [inst/dist_fit/gplike.m] 533s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gplike.m 533s ***** test 533s k = 0.8937; sigma = 1.3230; theta = 1; 533s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 533s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 533s [nlogL, acov] = gplike ([k, sigma, theta], x); 533s assert (nlogL, 21.736, 1e-3); 533s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 533s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 534s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 534s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 534s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 534s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 534s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 534s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 534s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 534s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 534s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 534s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 534s ***** error<gplike: function called with too few input arguments.> gplike () 534s ***** error<gplike: function called with too few input arguments.> gplike (1) 534s ***** error<gplike: X must be a vector.> gplike ([1, 2, 0], []) 534s ***** error<gplike: X must be a vector.> gplike ([1, 2, 0], ones (2)) 534s ***** error<gplike: PARAMS must be a three-element vector.> gplike (2, [1:10]) 534s ***** error<gplike: PARAMS must be a three-element vector.> gplike ([2, 3], [1:10]) 534s ***** error<gplike: X and FREQ vectors mismatch.> ... 534s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 534s ***** error<gplike: FREQ must not contain negative values.> ... 534s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 534s 20 tests, 20 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/gevfit_lmom.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gevfit_lmom.m 534s ***** xtest <31070> 534s data = 1:50; 534s [pfit, pci] = gevfit_lmom (data); 534s expected_p = [-0.28 15.01 20.22]'; 534s assert (pfit, expected_p, 0.1); 534s 1 test, 1 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/gamfit.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gamfit.m 534s ***** demo 534s ## Sample 3 populations from different Gamma distibutions 534s randg ("seed", 5); # for reproducibility 534s r1 = gamrnd (1, 2, 2000, 1); 534s randg ("seed", 2); # for reproducibility 534s r2 = gamrnd (2, 2, 2000, 1); 534s randg ("seed", 7); # for reproducibility 534s r3 = gamrnd (7.5, 1, 2000, 1); 534s r = [r1, r2, r3]; 534s 534s ## Plot them normalized and fix their colors 534s hist (r, 75, 4); 534s h = findobj (gca, "Type", "patch"); 534s set (h(1), "facecolor", "c"); 534s set (h(2), "facecolor", "g"); 534s set (h(3), "facecolor", "r"); 534s ylim ([0, 0.62]); 534s xlim ([0, 12]); 534s hold on 534s 534s ## Estimate their α and β parameters 534s a_bA = gamfit (r(:,1)); 534s a_bB = gamfit (r(:,2)); 534s a_bC = gamfit (r(:,3)); 534s 534s ## Plot their estimated PDFs 534s x = [0.01,0.1:0.2:18]; 534s y = gampdf (x, a_bA(1), a_bA(2)); 534s plot (x, y, "-pr"); 534s y = gampdf (x, a_bB(1), a_bB(2)); 534s plot (x, y, "-sg"); 534s y = gampdf (x, a_bC(1), a_bC(2)); 534s plot (x, y, "-^c"); 534s hold off 534s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 534s "Normalized HIST of sample 2 with α=2 and β=2", ... 534s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 534s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 534s a_bA(1), a_bA(2)), ... 534s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 534s a_bB(1), a_bB(2)), ... 534s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 534s a_bC(1), a_bC(2))}) 534s title ("Three population samples from different Gamma distibutions") 534s hold off 534s ***** shared x 534s 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]; 534s ***** test 534s [paramhat, paramci] = gamfit (x); 534s assert (paramhat, [3.4248, 0.9752], 1e-4); 534s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 534s ***** test 534s [paramhat, paramci] = gamfit (x, 0.01); 534s assert (paramhat, [3.4248, 0.9752], 1e-4); 534s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 534s ***** test 534s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 534s [paramhat, paramci] = gamfit (x, [], [], freq); 534s assert (paramhat, [3.3025, 1.0615], 1e-4); 534s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 534s ***** test 534s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 534s assert (paramhat, [4.4484, 0.9689], 1e-4); 534s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 534s ***** test 534s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 534s assert (paramhat, [4.4484, 0.9689], 1e-4); 534s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 534s ***** test 534s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 534s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 534s assert (paramhat, [4.7537, 0.9308], 1e-4); 534s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 534s ***** test 534s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 534s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 534s [paramhat, paramci] = gamfit (x, [], cens, freq); 534s assert (paramhat, [3.4736, 1.0847], 1e-4); 534s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 534s ***** test 534s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 534s assert (paramhat, [Inf, 0]); 534s assert (paramci, [Inf, 0; Inf, 0]); 534s ***** test 534s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 534s assert (paramhat, [NaN, NaN]); 534s assert (paramci, [NaN, NaN; NaN, NaN]); 534s ***** test 534s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 534s assert (paramhat, [Inf, 0]); 534s assert (paramci, [Inf, 0; Inf, 0]); 534s ***** assert (class (gamfit (single (x))), "single") 534s ***** error<gamfit: X must be a vector.> gamfit (ones (2)) 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, 1) 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, -1) 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, {0.05}) 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, "a") 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, i) 534s ***** error<gamfit: wrong value for ALPHA.> gamfit (x, [0.01 0.02]) 534s ***** error<gamfit: X and FREQ vectors mismatch.> 534s gamfit ([1 2 3], 0.05, [], [1 5]) 534s ***** error<gamfit: FREQ must not contain negative values.> 534s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 534s ***** error<gamfit: 'options' 5th argument must be a structure> ... 534s gamfit ([1:10], 0.05, [], [], 5) 534s ***** error<gamfit: X cannot contain negative values.> gamfit ([1 2 3 -4]) 534s ***** error<gamfit: X must contain positive values when censored.> ... 534s gamfit ([1 2 0], [], [1 0 0]) 534s 23 tests, 23 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/burrlike.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/burrlike.m 534s ***** error<burrlike: function called with too few input arguments.> burrlike (3.25) 534s ***** error<burrlike: X must be a vector.> burrlike ([1, 2, 3], ones (2)) 534s ***** error<burrlike: X cannot have negative values.> burrlike ([1, 2, 3], [-1, 3]) 534s ***** error<burrlike: PARAMS must be a three-element vector.> ... 534s burrlike ([1, 2], [1, 3, 5, 7]) 534s ***** error<burrlike: PARAMS must be a three-element vector.> ... 534s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 534s ***** error<burrlike: X and CENSOR vector mismatch.> ... 534s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 534s ***** error<burrlike: X and FREQ vector mismatch.> ... 534s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 534s ***** error<burrlike: X and FREQ vector mismatch.> ... 534s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 534s 8 tests, 8 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/nakafit.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/nakafit.m 534s ***** demo 534s ## Sample 3 populations from different Nakagami distibutions 534s randg ("seed", 5) # for reproducibility 534s r1 = nakarnd (0.5, 1, 2000, 1); 534s randg ("seed", 2) # for reproducibility 534s r2 = nakarnd (5, 1, 2000, 1); 534s randg ("seed", 7) # for reproducibility 534s r3 = nakarnd (2, 2, 2000, 1); 534s r = [r1, r2, r3]; 534s 534s ## Plot them normalized and fix their colors 534s hist (r, [0.05:0.1:3.5], 10); 534s h = findobj (gca, "Type", "patch"); 534s set (h(1), "facecolor", "c"); 534s set (h(2), "facecolor", "g"); 534s set (h(3), "facecolor", "r"); 534s ylim ([0, 2.5]); 534s xlim ([0, 3.0]); 534s hold on 534s 534s ## Estimate their MU and LAMBDA parameters 534s mu_omegaA = nakafit (r(:,1)); 534s mu_omegaB = nakafit (r(:,2)); 534s mu_omegaC = nakafit (r(:,3)); 534s 534s ## Plot their estimated PDFs 534s x = [0.01:0.1:3.01]; 534s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 534s plot (x, y, "-pr"); 534s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 534s plot (x, y, "-sg"); 534s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 534s plot (x, y, "-^c"); 534s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 534s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 534s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 534s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 534s mu_omegaA(1), mu_omegaA(2)), ... 534s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 534s mu_omegaB(1), mu_omegaB(2)), ... 534s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 534s mu_omegaC(1), mu_omegaC(2))}) 534s title ("Three population samples from different Nakagami distibutions") 534s hold off 534s ***** test 534s paramhat = nakafit ([1:50]); 534s paramhat_out = [0.7355, 858.5]; 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** test 534s paramhat = nakafit ([1:5]); 534s paramhat_out = [1.1740, 11]; 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** test 534s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 534s paramhat_out = [1.1740, 11]; 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** test 534s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 534s paramhat_out = nakafit ([1:5, 5]); 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** error<nakafit: X must be a vector.> nakafit (ones (2,5)); 534s ***** error<nakafit: wrong value for ALPHA.> nakafit ([1, 2, 3, 4, 5], 1.2); 534s ***** error<nakafit: wrong value for ALPHA.> nakafit ([1, 2, 3, 4, 5], 0); 534s ***** error<nakafit: wrong value for ALPHA.> nakafit ([1, 2, 3, 4, 5], "alpha"); 534s ***** error<nakafit: X and CENSOR vectors mismatch.> ... 534s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 534s ***** error<nakafit: X and CENSOR vectors mismatch.> ... 534s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 534s ***** error<nakafit: X and FREQ vectors mismatch.> ... 534s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 534s ***** error<nakafit: X and FREQ vectors mismatch.> ... 534s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 534s ***** error<nakafit: FREQ must not contain negative values.> ... 534s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 534s ***** error<nakafit: FREQ must contain integer values.> ... 534s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 534s ***** error<nakafit: 'options' 5th argument must be a structure> ... 534s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 534s 15 tests, 15 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/invgfit.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/invgfit.m 534s ***** demo 534s ## Sample 3 populations from different inverse Gaussian distibutions 534s rand ("seed", 5); randn ("seed", 5); # for reproducibility 534s r1 = invgrnd (1, 0.2, 2000, 1); 534s rand ("seed", 2); randn ("seed", 2); # for reproducibility 534s r2 = invgrnd (1, 3, 2000, 1); 534s rand ("seed", 7); randn ("seed", 7); # for reproducibility 534s r3 = invgrnd (3, 1, 2000, 1); 534s r = [r1, r2, r3]; 534s 534s ## Plot them normalized and fix their colors 534s hist (r, [0.1:0.1:3.2], 9); 534s h = findobj (gca, "Type", "patch"); 534s set (h(1), "facecolor", "c"); 534s set (h(2), "facecolor", "g"); 534s set (h(3), "facecolor", "r"); 534s ylim ([0, 3]); 534s xlim ([0, 3]); 534s hold on 534s 534s ## Estimate their MU and LAMBDA parameters 534s mu_lambdaA = invgfit (r(:,1)); 534s mu_lambdaB = invgfit (r(:,2)); 534s mu_lambdaC = invgfit (r(:,3)); 534s 534s ## Plot their estimated PDFs 534s x = [0:0.1:3]; 534s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 534s plot (x, y, "-pr"); 534s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 534s plot (x, y, "-sg"); 534s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 534s plot (x, y, "-^c"); 534s hold off 534s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 534s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 534s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 534s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 534s mu_lambdaA(1), mu_lambdaA(2)), ... 534s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 534s mu_lambdaB(1), mu_lambdaB(2)), ... 534s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 534s mu_lambdaC(1), mu_lambdaC(2))}) 534s title ("Three population samples from different inverse Gaussian distibutions") 534s hold off 534s ***** test 534s paramhat = invgfit ([1:50]); 534s paramhat_out = [25.5, 19.6973]; 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** test 534s paramhat = invgfit ([1:5]); 534s paramhat_out = [3, 8.1081]; 534s assert (paramhat, paramhat_out, 1e-4); 534s ***** error<invgfit: X must be a vector.> invgfit (ones (2,5)); 534s ***** error<invgfit: X must contain only positive values.> invgfit ([-1 2 3 4]); 534s ***** error<invgfit: wrong value for ALPHA.> invgfit ([1, 2, 3, 4, 5], 1.2); 534s ***** error<invgfit: wrong value for ALPHA.> invgfit ([1, 2, 3, 4, 5], 0); 534s ***** error<invgfit: wrong value for ALPHA.> invgfit ([1, 2, 3, 4, 5], "alpha"); 534s ***** error<invgfit: X and CENSOR vectors mismatch.> ... 534s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 534s ***** error<invgfit: X and CENSOR vectors mismatch.> ... 534s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 534s ***** error<invgfit: X and FREQ vectors mismatch.> ... 534s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 534s ***** error<invgfit: X and FREQ vectors mismatch.> ... 534s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 534s ***** error<invgfit: 'options' 5th argument must be a structure> ... 534s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 534s 12 tests, 12 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/gpfit.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gpfit.m 534s ***** demo 534s ## Sample 2 populations from different generalized Pareto distibutions 534s ## Assume location parameter θ is known 534s theta = 0; 534s rand ("seed", 5); # for reproducibility 534s r1 = gprnd (1, 2, theta, 20000, 1); 534s rand ("seed", 2); # for reproducibility 534s r2 = gprnd (3, 1, theta, 20000, 1); 534s r = [r1, r2]; 534s 534s ## Plot them normalized and fix their colors 534s hist (r, [0.1:0.2:100], 5); 534s h = findobj (gca, "Type", "patch"); 534s set (h(1), "facecolor", "r"); 534s set (h(2), "facecolor", "c"); 534s ylim ([0, 1]); 534s xlim ([0, 5]); 534s hold on 534s 534s ## Estimate their α and β parameters 534s k_sigmaA = gpfit (r(:,1), theta); 534s k_sigmaB = gpfit (r(:,2), theta); 534s 534s ## Plot their estimated PDFs 534s x = [0.01, 0.1:0.2:18]; 534s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 534s plot (x, y, "-pc"); 534s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 534s plot (x, y, "-sr"); 534s hold off 534s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 534s "Normalized HIST of sample 2 with k=2 and σ=2", ... 534s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 534s k_sigmaA(1), k_sigmaA(2)), ... 534s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 534s k_sigmaB(1), k_sigmaB(2))}) 534s title ("Three population samples from different generalized Pareto distibutions") 534s text (2, 0.7, "Known location parameter θ = 0") 534s hold off 534s ***** test 534s k = 0.8937; sigma = 1.3230; theta = 1; 534s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 534s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 534s [hat, ci] = gpfit (x, theta); 534s assert (hat, [k, sigma, theta], 1e-4); 534s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 534s ***** error<gpfit: function called with too few input arguments.> gpfit () 534s ***** error<gpfit: function called with too few input arguments.> gpfit (1) 534s ***** error<gpfit: X must be a vector of real values.> gpfit ([0.2, 0.5+i], 0); 534s ***** error<gpfit: X must be a vector of real values.> gpfit (ones (2,2) * 0.5, 0); 534s ***** error<gpfit: THETA must be a real scalar value.> ... 534s gpfit ([0.5, 1.2], [0, 1]); 534s ***** error<gpfit: THETA must be a real scalar value.> ... 534s gpfit ([0.5, 1.2], 5+i); 534s ***** error<gpfit: X cannot contain values less than THETA.> ... 534s gpfit ([1:5], 2); 534s ***** error<gpfit: wrong value for ALPHA.> gpfit ([0.01:0.1:0.99], 0, 1.2); 534s ***** error<gpfit: wrong value for ALPHA.> gpfit ([0.01:0.1:0.99], 0, i); 534s ***** error<gpfit: wrong value for ALPHA.> gpfit ([0.01:0.1:0.99], 0, -1); 534s ***** error<gpfit: wrong value for ALPHA.> gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 534s ***** error<gpfit: X and FREQ vectors mismatch.> 534s gpfit ([1 2 3], 0, [], [1 5]) 534s ***** error<gpfit: FREQ must not contain negative values.> 534s gpfit ([1 2 3], 0, [], [1 5 -1]) 534s ***** error<gpfit: 'options' 5th argument must be a structure> ... 534s gpfit ([1:10], 1, 0.05, [], 5) 534s 15 tests, 15 passed, 0 known failure, 0 skipped 534s [inst/dist_fit/normfit.m] 534s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/normfit.m 534s ***** demo 534s ## Sample 3 populations from 3 different normal distibutions 534s randn ("seed", 1); # for reproducibility 534s r1 = normrnd (2, 5, 5000, 1); 534s randn ("seed", 2); # for reproducibility 534s r2 = normrnd (5, 2, 5000, 1); 534s randn ("seed", 3); # for reproducibility 534s r3 = normrnd (9, 4, 5000, 1); 534s r = [r1, r2, r3]; 534s 534s ## Plot them normalized and fix their colors 534s hist (r, 15, 0.4); 534s h = findobj (gca, "Type", "patch"); 534s set (h(1), "facecolor", "c"); 534s set (h(2), "facecolor", "g"); 534s set (h(3), "facecolor", "r"); 534s hold on 534s 534s ## Estimate their mu and sigma parameters 534s [muhat, sigmahat] = normfit (r); 534s 534s ## Plot their estimated PDFs 534s x = [min(r(:)):max(r(:))]; 534s y = normpdf (x, muhat(1), sigmahat(1)); 534s plot (x, y, "-pr"); 534s y = normpdf (x, muhat(2), sigmahat(2)); 534s plot (x, y, "-sg"); 534s y = normpdf (x, muhat(3), sigmahat(3)); 534s plot (x, y, "-^c"); 534s ylim ([0, 0.5]) 534s xlim ([-20, 20]) 534s hold off 534s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 534s "Normalized HIST of sample 2 with mu=5, σ=2", ... 534s "Normalized HIST of sample 3 with mu=9, σ=4", ... 534s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 534s muhat(1), sigmahat(1)), ... 534s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 534s muhat(2), sigmahat(2)), ... 534s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 534s muhat(3), sigmahat(3))}, "location", "northwest") 534s title ("Three population samples from different normal distibutions") 534s hold off 534s ***** test 534s load lightbulb 534s idx = find (lightbulb(:,2) == 0); 534s censoring = lightbulb(idx,3) == 1; 534s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 534s assert (muHat, 9496.59586737857, 1e-11); 534s assert (sigmaHat, 3064.021012796456, 2e-12); 534s ***** test 534s randn ("seed", 234); 534s x = normrnd (3, 5, [1000, 1]); 534s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 534s assert (muCI(1) < 3); 534s assert (muCI(2) > 3); 534s assert (sigmaCI(1) < 5); 534s assert (sigmaCI(2) > 5); 535s ***** error<normfit: X must not be a multi-dimensional array.> ... 535s normfit (ones (3,3,3)) 535s ***** error<normfit: matrix data acceptable only under 2-arg syntax.> ... 535s normfit (ones (20,3), [], zeros (20,1)) 535s ***** error<normfit: wrong value for ALPHA.> normfit (ones (20,1), 0) 535s ***** error<normfit: wrong value for ALPHA.> normfit (ones (20,1), -0.3) 535s ***** error<normfit: wrong value for ALPHA.> normfit (ones (20,1), 1.2) 535s ***** error<normfit: wrong value for ALPHA.> normfit (ones (20,1), [0.05 0.1]) 535s ***** error<normfit: wrong value for ALPHA.> normfit (ones (20,1), 0.02+i) 535s ***** error<normfit: X and CENSOR vectors mismatch.> ... 535s normfit (ones (20,1), [], zeros(15,1)) 535s ***** error<normfit: X and FREQ vectors mismatch.> ... 535s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 535s ***** error<normfit: FREQ must not contain negative values.> ... 535s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 535s ***** error<normfit: > normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 535s 13 tests, 13 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/hnlike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/hnlike.m 535s ***** test 535s x = 1:20; 535s paramhat = hnfit (x, 0); 535s [nlogL, acov] = hnlike (paramhat, x); 535s assert (nlogL, 64.179177404891300, 1e-14); 535s ***** test 535s x = 1:20; 535s paramhat = hnfit (x, 0); 535s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 535s assert (nlogL, 64.179177404891300, 1e-14); 535s ***** error<hnlike: function called with too few input arguments.> ... 535s hnlike ([12, 15]); 535s ***** error<hnlike: wrong parameters length.> hnlike ([12, 15, 3], [1:50]); 535s ***** error<hnlike: wrong parameters length.> hnlike ([3], [1:50]); 535s ***** error<hnlike: X must be a vector of real values.> ... 535s hnlike ([0, 3], ones (2)); 535s ***** error<hnlike: X must be a vector of real values.> ... 535s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 535s ***** error<hnlike: X and FREQ vectors mismatch.> ... 535s hnlike ([1, 2], ones (10, 1), ones (8,1)) 535s ***** error<hnlike: FREQ must not contain negative values.> ... 535s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 535s 9 tests, 9 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/evfit.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/evfit.m 535s ***** demo 535s ## Sample 3 populations from different extreme value distibutions 535s rand ("seed", 1); # for reproducibility 535s r1 = evrnd (2, 5, 400, 1); 535s rand ("seed", 12); # for reproducibility 535s r2 = evrnd (-5, 3, 400, 1); 535s rand ("seed", 13); # for reproducibility 535s r3 = evrnd (14, 8, 400, 1); 535s r = [r1, r2, r3]; 535s 535s ## Plot them normalized and fix their colors 535s hist (r, 25, 0.4); 535s h = findobj (gca, "Type", "patch"); 535s set (h(1), "facecolor", "c"); 535s set (h(2), "facecolor", "g"); 535s set (h(3), "facecolor", "r"); 535s ylim ([0, 0.28]) 535s xlim ([-30, 30]); 535s hold on 535s 535s ## Estimate their MU and SIGMA parameters 535s mu_sigmaA = evfit (r(:,1)); 535s mu_sigmaB = evfit (r(:,2)); 535s mu_sigmaC = evfit (r(:,3)); 535s 535s ## Plot their estimated PDFs 535s x = [min(r(:)):max(r(:))]; 535s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 535s plot (x, y, "-pr"); 535s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 535s plot (x, y, "-sg"); 535s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 535s plot (x, y, "-^c"); 535s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 535s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 535s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 535s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 535s mu_sigmaA(1), mu_sigmaA(2)), ... 535s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 535s mu_sigmaB(1), mu_sigmaB(2)), ... 535s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 535s mu_sigmaC(1), mu_sigmaC(2))}) 535s title ("Three population samples from different extreme value distibutions") 535s hold off 535s ***** test 535s x = 1:50; 535s [paramhat, paramci] = evfit (x); 535s paramhat_out = [32.6811, 13.0509]; 535s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 535s assert (paramhat, paramhat_out, 1e-4); 535s assert (paramci, paramci_out, 1e-4); 535s ***** test 535s x = 1:50; 535s [paramhat, paramci] = evfit (x, 0.01); 535s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 535s assert (paramci, paramci_out, 1e-4); 535s ***** error<evfit: X must be a double-precision vector.> evfit (ones (2,5)); 535s ***** error<evfit: X must be a double-precision vector.> evfit (single (ones (1,5))); 535s ***** error<evfit: X must NOT contain missing values> evfit ([1, 2, 3, 4, NaN]); 535s ***** error<evfit: wrong value for ALPHA.> evfit ([1, 2, 3, 4, 5], 1.2); 535s ***** error<evfit: X and FREQ vectors mismatch.> 535s evfit ([1 2 3], 0.05, [], [1 5]) 535s ***** error<evfit: FREQ must not contain negative values.> 535s evfit ([1 2 3], 0.05, [], [1 5 -1]) 535s ***** error<evfit: 'options' 5th argument must be a structure> ... 535s evfit ([1:10], 0.05, [], [], 5) 535s 9 tests, 9 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/unidfit.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/unidfit.m 535s ***** demo 535s ## Sample 2 populations from different discrete uniform distibutions 535s rand ("seed", 1); # for reproducibility 535s r1 = unidrnd (5, 1000, 1); 535s rand ("seed", 2); # for reproducibility 535s r2 = unidrnd (9, 1000, 1); 535s r = [r1, r2]; 535s 535s ## Plot them normalized and fix their colors 535s hist (r, 0:0.5:20.5, 1); 535s h = findobj (gca, "Type", "patch"); 535s set (h(1), "facecolor", "c"); 535s set (h(2), "facecolor", "g"); 535s hold on 535s 535s ## Estimate their probability of success 535s NhatA = unidfit (r(:,1)); 535s NhatB = unidfit (r(:,2)); 535s 535s ## Plot their estimated PDFs 535s x = [0:10]; 535s y = unidpdf (x, NhatA); 535s plot (x, y, "-pg"); 535s y = unidpdf (x, NhatB); 535s plot (x, y, "-sc"); 535s xlim ([0, 10]) 535s ylim ([0, 0.4]) 535s legend ({"Normalized HIST of sample 1 with N=5", ... 535s "Normalized HIST of sample 2 with N=9", ... 535s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 535s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 535s title ("Two population samples from different discrete uniform distibutions") 535s hold off 535s ***** test 535s x = 0:5; 535s [Nhat, Nci] = unidfit (x); 535s assert (Nhat, 5); 535s assert (Nci, [5; 9]); 535s ***** test 535s x = 0:5; 535s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 535s assert (Nhat, 5); 535s assert (Nci, [5; 9]); 535s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 535s ***** error<unidfit: function called with too few input arguments.> unidfit () 535s ***** error<unidfit: X cannot have negative values.> unidfit (-1, [1 2 3 3]) 535s ***** error<unidfit: wrong value for ALPHA.> unidfit (1, 0) 535s ***** error<unidfit: wrong value for ALPHA.> unidfit (1, 1.2) 535s ***** error<unidfit: wrong value for ALPHA.> unidfit (1, [0.02 0.05]) 535s ***** error<unidfit: X and FREQ vector mismatch.> ... 535s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 535s ***** error<unidfit: X and FREQ vector mismatch.> ... 535s unidfit ([1.5, 0.2], [], [1, 1, 1]) 535s ***** error<unidfit: FREQ cannot have negative values.> ... 535s unidfit ([1.5, 0.2], [], [1, -1]) 535s 11 tests, 11 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/wbllike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/wbllike.m 535s ***** test 535s x = 1:50; 535s [nlogL, acov] = wbllike ([2.3, 1.2], x); 535s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 535s assert (nlogL, 945.9589180651594, 1e-12); 535s assert (acov, avar_out, 1e-4); 535s ***** test 535s x = 1:50; 535s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 535s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 535s assert (nlogL, 424.9879809704742, 6e-14); 535s assert (acov, avar_out, 1e-4); 535s ***** test 535s x = 1:50; 535s [nlogL, acov] = wbllike ([21, 15], x); 535s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 535s assert (nlogL, 1635190.328991511, 1e-8); 535s assert (acov, avar_out, 1e-8); 535s ***** error<wbllike: too few input arguments.> wbllike ([12, 15]); 535s ***** error<wbllike: wrong parameters length.> wbllike ([12, 15, 3], [1:50]); 535s ***** error<wbllike: X must be a vector.> wbllike ([12, 3], ones (10, 2)); 535s ***** error<wbllike: X and CENSOR> wbllike ([12, 15], [1:50], [1, 2, 3]); 535s ***** error<wbllike: X and FREQ> wbllike ([12, 15], [1:50], [], [1, 2, 3]); 535s ***** error<wbllike: FREQ cannot have negative values.> ... 535s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 535s 9 tests, 9 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/hnfit.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/hnfit.m 535s ***** demo 535s ## Sample 2 populations from different half-normal distibutions 535s rand ("seed", 1); # for reproducibility 535s r1 = hnrnd (0, 5, 5000, 1); 535s rand ("seed", 2); # for reproducibility 535s r2 = hnrnd (0, 2, 5000, 1); 535s r = [r1, r2]; 535s 535s ## Plot them normalized and fix their colors 535s hist (r, [0.5:20], 1); 535s h = findobj (gca, "Type", "patch"); 535s set (h(1), "facecolor", "c"); 535s set (h(2), "facecolor", "g"); 535s hold on 535s 535s ## Estimate their shape parameters 535s mu_sigmaA = hnfit (r(:,1), 0); 535s mu_sigmaB = hnfit (r(:,2), 0); 535s 535s ## Plot their estimated PDFs 535s x = [0:0.2:10]; 535s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 535s plot (x, y, "-pr"); 535s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 535s plot (x, y, "-sg"); 535s xlim ([0, 10]) 535s ylim ([0, 0.5]) 535s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 535s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 535s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 535s mu_sigmaA(1), mu_sigmaA(2)), ... 535s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 535s mu_sigmaB(1), mu_sigmaB(2))}) 535s title ("Two population samples from different half-normal distibutions") 535s hold off 535s ***** test 535s x = 1:20; 535s [paramhat, paramci] = hnfit (x, 0); 535s assert (paramhat, [0, 11.9791], 1e-4); 535s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 535s ***** test 535s x = 1:20; 535s [paramhat, paramci] = hnfit (x, 0, 0.01); 535s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 535s ***** error<hnfit: function called with too few input arguments.> hnfit () 535s ***** error<hnfit: function called with too few input arguments.> hnfit (1) 535s ***** error<hnfit: X must be a vector of real values.> hnfit ([0.2, 0.5+i], 0); 535s ***** error<hnfit: X must be a vector of real values.> hnfit (ones (2,2) * 0.5, 0); 535s ***** error<hnfit: MU must be a real scalar value.> ... 535s hnfit ([0.5, 1.2], [0, 1]); 535s ***** error<hnfit: MU must be a real scalar value.> ... 535s hnfit ([0.5, 1.2], 5+i); 535s ***** error<hnfit: X cannot contain values less than MU.> ... 535s hnfit ([1:5], 2); 535s ***** error<hnfit: wrong value for ALPHA.> hnfit ([0.01:0.1:0.99], 0, 1.2); 535s ***** error<hnfit: wrong value for ALPHA.> hnfit ([0.01:0.1:0.99], 0, i); 535s ***** error<hnfit: wrong value for ALPHA.> hnfit ([0.01:0.1:0.99], 0, -1); 535s ***** error<hnfit: wrong value for ALPHA.> hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 535s ***** error<hnfit: X and FREQ vectors mismatch.> 535s hnfit ([1 2 3], 0, [], [1 5]) 535s ***** error<hnfit: FREQ must not contain negative values.> 535s hnfit ([1 2 3], 0, [], [1 5 -1]) 535s 15 tests, 15 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/logllike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/logllike.m 535s ***** test 535s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 535s assert (nlogL, 211.2965, 1e-4); 535s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 535s ***** test 535s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 535s assert (nlogL, 9.2206, 1e-4); 535s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 535s ***** error<logllike: function called with too few input arguments.> logllike (3.25) 535s ***** error<logllike: X must be a vector.> logllike ([5, 0.2], ones (2)) 535s ***** error<logllike: PARAMS must be a two-element vector.> ... 535s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 535s ***** error<logllike: X and CENSOR vector mismatch.> ... 535s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 535s ***** error<logllike: X and FREQ vector mismatch.> ... 535s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 535s ***** error<logllike: X and FREQ vector mismatch.> ... 535s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 535s 8 tests, 8 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/bisalike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/bisalike.m 535s ***** test 535s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 535s assert (nlogL, 215.5905, 1e-4); 535s ***** test 535s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 535s assert (nlogL, 8.9950, 1e-4); 535s ***** error<bisalike: function called with too few input arguments.> bisalike (3.25) 535s ***** error<bisalike: X must be a vector.> bisalike ([5, 0.2], ones (2)) 535s ***** error<bisalike: X cannot have negative values.> bisalike ([5, 0.2], [-1, 3]) 535s ***** error<bisalike: PARAMS must be a two-element vector.> ... 535s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 535s ***** error<bisalike: X and CENSOR vector mismatch.> ... 535s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 535s ***** error<bisalike: X and FREQ vector mismatch.> ... 535s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 535s ***** error<bisalike: X and FREQ vector mismatch.> ... 535s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 535s 9 tests, 9 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/lognfit.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/lognfit.m 535s ***** demo 535s ## Sample 3 populations from 3 different log-normal distibutions 535s randn ("seed", 1); # for reproducibility 535s r1 = lognrnd (0, 0.25, 1000, 1); 535s randn ("seed", 2); # for reproducibility 535s r2 = lognrnd (0, 0.5, 1000, 1); 535s randn ("seed", 3); # for reproducibility 535s r3 = lognrnd (0, 1, 1000, 1); 535s r = [r1, r2, r3]; 535s 535s ## Plot them normalized and fix their colors 535s hist (r, 30, 2); 535s h = findobj (gca, "Type", "patch"); 535s set (h(1), "facecolor", "c"); 535s set (h(2), "facecolor", "g"); 535s set (h(3), "facecolor", "r"); 535s hold on 535s 535s ## Estimate their mu and sigma parameters 535s mu_sigmaA = lognfit (r(:,1)); 535s mu_sigmaB = lognfit (r(:,2)); 535s mu_sigmaC = lognfit (r(:,3)); 535s 535s ## Plot their estimated PDFs 535s x = [0:0.1:6]; 535s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 535s plot (x, y, "-pr"); 535s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 535s plot (x, y, "-sg"); 535s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 535s plot (x, y, "-^c"); 535s ylim ([0, 2]) 535s xlim ([0, 6]) 535s hold off 535s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 535s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 535s "Normalized HIST of sample 3 with mu=0, σ=1", ... 535s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 535s mu_sigmaA(1), mu_sigmaA(2)), ... 535s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 535s mu_sigmaB(1), mu_sigmaB(2)), ... 535s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 535s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 535s title ("Three population samples from different log-normal distibutions") 535s hold off 535s ***** test 535s randn ("seed", 1); 535s x = lognrnd (3, 5, [1000, 1]); 535s [paramhat, paramci] = lognfit (x, 0.01); 535s assert (paramci(1,1) < 3); 535s assert (paramci(1,2) > 3); 535s assert (paramci(2,1) < 5); 535s assert (paramci(2,2) > 5); 535s ***** error<lognfit: X must be a numeric vector of positive values.> ... 535s lognfit (ones (20,3)) 535s ***** error<lognfit: X must be a numeric vector of positive values.> ... 535s lognfit ({1, 2, 3, 4, 5}) 535s ***** error<lognfit: X must be a numeric vector of positive values.> ... 535s lognfit ([-1, 2, 3, 4, 5]) 535s ***** error<lognfit: wrong value for ALPHA.> lognfit (ones (20,1), 0) 535s ***** error<lognfit: wrong value for ALPHA.> lognfit (ones (20,1), -0.3) 535s ***** error<lognfit: wrong value for ALPHA.> lognfit (ones (20,1), 1.2) 535s ***** error<lognfit: wrong value for ALPHA.> lognfit (ones (20,1), [0.05, 0.1]) 535s ***** error<lognfit: wrong value for ALPHA.> lognfit (ones (20,1), 0.02+i) 535s ***** error<lognfit: X and CENSOR vectors mismatch.> ... 535s lognfit (ones (20,1), [], zeros(15,1)) 535s ***** error<lognfit: X and FREQ vectors mismatch.> ... 535s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 535s ***** error<lognfit: > lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 535s 12 tests, 12 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/lognlike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/lognlike.m 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = lognlike ([0, 0.25], x); 535s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 535s assert (nlogL, 3962.330333301793, 1e-10); 535s assert (avar, avar_out, 1e-7); 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 535s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 535s assert (nlogL, 2473.183051225747, 1e-10); 535s assert (avar, avar_out, 1e-7); 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = lognlike ([0, 0.5], x); 535s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 535s assert (nlogL, 1119.072424020455, 1e-12); 535s assert (avar, avar_out, 1e-6); 535s ***** test 535s x = 1:50; 535s censor = ones (1, 50); 535s censor([2, 4, 6, 8, 12, 14]) = 0; 535s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 535s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 535s assert (nlogL, 1091.746371145497, 1e-12); 535s assert (avar, avar_out, 1e-6); 535s ***** test 535s x = 1:50; 535s censor = ones (1, 50); 535s censor([2, 4, 6, 8, 12, 14]) = 0; 535s [nlogL, avar] = lognlike ([0, 1], x, censor); 535s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 535s assert (nlogL, 349.3969104144271, 1e-12); 535s assert (avar, avar_out, 1e-6); 535s ***** error<lognlike: function called with too few input arguments.> ... 535s lognlike ([12, 15]); 535s ***** error<lognlike: X must be a vector.> lognlike ([12, 15], ones (2)); 535s ***** error<lognlike: PARAMS must be a two-element vector.> ... 535s lognlike ([12, 15, 3], [1:50]); 535s ***** error<lognlike: X and CENSOR vectors mismatch.> ... 535s lognlike ([12, 15], [1:50], [1, 2, 3]); 535s ***** error<lognlike: X and FREQ vectors mismatch.> ... 535s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 535s 10 tests, 10 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/gumbellike.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gumbellike.m 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 535s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 535s assert (nlogL, 3.242264755689906e+17, 1e-14); 535s assert (avar, avar_out, 1e-3); 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 535s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 535s assert (nlogL, 481898704.0472211, 1e-6); 535s assert (avar, avar_out, 1e-3); 535s ***** test 535s x = 1:50; 535s [nlogL, avar] = gumbellike ([21, 15], x); 535s avar_out = [11.73913876598908, -5.9546128523121216; ... 535s -5.954612852312121, 3.708060045170236]; 535s assert (nlogL, 223.7612479380652, 1e-13); 535s assert (avar, avar_out, 1e-14); 535s ***** error<gumbellike: too few input arguments.> gumbellike ([12, 15]); 535s ***** error<gumbellike: wrong parameters length.> gumbellike ([12, 15, 3], [1:50]); 535s ***** error<gumbellike: X must be a vector.> gumbellike ([12, 3], ones (10, 2)); 535s ***** error<gumbellike: X and CENSOR> gumbellike ([12, 15], [1:50], [1, 2, 3]); 535s ***** error<gumbellike: X and FREQ> gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 535s 8 tests, 8 passed, 0 known failure, 0 skipped 535s [inst/dist_fit/burrfit.m] 535s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/burrfit.m 535s ***** demo 535s ## Sample 3 populations from different Burr type XII distibutions 535s rand ("seed", 4); # for reproducibility 535s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 535s rand ("seed", 2); # for reproducibility 535s r2 = burrrnd (1, 3, 1, 10000, 1); 535s rand ("seed", 9); # for reproducibility 535s r3 = burrrnd (0.5, 2, 3, 10000, 1); 535s r = [r1, r2, r3]; 535s 535s ## Plot them normalized and fix their colors 535s hist (r, [0.1:0.2:20], [18, 5, 3]); 535s h = findobj (gca, "Type", "patch"); 535s set (h(1), "facecolor", "c"); 535s set (h(2), "facecolor", "g"); 535s set (h(3), "facecolor", "r"); 535s ylim ([0, 3]); 535s xlim ([0, 5]); 535s hold on 535s 535s ## Estimate their α and β parameters 535s lambda_c_kA = burrfit (r(:,1)); 535s lambda_c_kB = burrfit (r(:,2)); 535s lambda_c_kC = burrfit (r(:,3)); 535s 535s ## Plot their estimated PDFs 535s x = [0.01:0.15:15]; 535s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 535s plot (x, y, "-pr"); 535s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 535s plot (x, y, "-sg"); 535s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 535s plot (x, y, "-^c"); 535s hold off 535s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 535s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 535s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 535s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 535s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 535s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 535s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 535s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 535s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 535s title ("Three population samples from different Burr type XII distibutions") 535s hold off 535s ***** test 535s l = 1; c = 2; k = 3; 535s r = burrrnd (l, c, k, 100000, 1); 535s lambda_c_kA = burrfit (r); 535s assert (lambda_c_kA(1), l, 0.2); 535s assert (lambda_c_kA(2), c, 0.2); 535s assert (lambda_c_kA(3), k, 0.3); 537s ***** test 537s l = 0.5; c = 1; k = 3; 537s r = burrrnd (l, c, k, 100000, 1); 537s lambda_c_kA = burrfit (r); 537s assert (lambda_c_kA(1), l, 0.2); 537s assert (lambda_c_kA(2), c, 0.2); 537s assert (lambda_c_kA(3), k, 0.3); 539s ***** test 539s l = 1; c = 3; k = 1; 539s r = burrrnd (l, c, k, 100000, 1); 539s lambda_c_kA = burrfit (r); 539s assert (lambda_c_kA(1), l, 0.2); 539s assert (lambda_c_kA(2), c, 0.2); 539s assert (lambda_c_kA(3), k, 0.3); 541s ***** test 541s l = 3; c = 2; k = 1; 541s r = burrrnd (l, c, k, 100000, 1); 541s lambda_c_kA = burrfit (r); 541s assert (lambda_c_kA(1), l, 0.2); 541s assert (lambda_c_kA(2), c, 0.2); 541s assert (lambda_c_kA(3), k, 0.3); 544s ***** test 544s l = 4; c = 2; k = 4; 544s r = burrrnd (l, c, k, 100000, 1); 544s lambda_c_kA = burrfit (r); 544s assert (lambda_c_kA(1), l, 0.2); 544s assert (lambda_c_kA(2), c, 0.2); 544s assert (lambda_c_kA(3), k, 0.3); 545s ***** error<burrfit: X must be a vector.> burrfit (ones (2,5)); 545s ***** error<burrfit: X must contain only positive values.> burrfit ([-1 2 3 4]); 545s ***** error<burrfit: wrong value for ALPHA.> burrfit ([1, 2, 3, 4, 5], 1.2); 545s ***** error<burrfit: wrong value for ALPHA.> burrfit ([1, 2, 3, 4, 5], 0); 545s ***** error<burrfit: wrong value for ALPHA.> burrfit ([1, 2, 3, 4, 5], "alpha"); 545s ***** error<burrfit: X and CENSOR vectors mismatch.> ... 545s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 545s ***** error<burrfit: X and CENSOR vectors mismatch.> ... 545s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 545s ***** error<burrfit: X and FREQ vectors mismatch.> 545s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 545s ***** error<burrfit: FREQ must not contain negative values.> 545s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 545s ***** error<burrfit: 'options' 5th argument must be a structure> ... 545s burrfit ([1:10], 0.05, [], [], 5) 546s 15 tests, 15 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/gamlike.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gamlike.m 546s ***** test 546s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 546s assert (nlogL, 19.4426, 1e-4); 546s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 546s ***** test 546s [nlogL, acov] = gamlike([2, 3], [5:45]); 546s assert (nlogL, 305.8070, 1e-4); 546s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 546s ***** test 546s [nlogL, acov] = gamlike([2, 13], [5:45]); 546s assert (nlogL, 163.2261, 1e-4); 546s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 546s ***** error<gamlike: function called with too few input arguments.> ... 546s gamlike ([12, 15]) 546s ***** error<gamlike: wrong parameters length.> gamlike ([12, 15, 3], [1:50]) 546s ***** error<gamlike: X must be a vector.> gamlike ([12, 3], ones (10, 2)) 546s ***** error<gamlike: X and CENSOR vectors mismatch.> ... 546s gamlike ([12, 15], [1:50], [1, 2, 3]) 546s ***** error<gamlike: X and FREQ vectors mismatch.> ... 546s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 546s 8 tests, 8 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/evlike.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/evlike.m 546s ***** test 546s x = 1:50; 546s [nlogL, acov] = evlike ([2.3, 1.2], x); 546s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 546s assert (nlogL, 3.242264755689906e+17, 1e-14); 546s assert (acov, avar_out, 1e-3); 546s ***** test 546s x = 1:50; 546s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 546s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 546s assert (nlogL, 481898704.0472211, 1e-6); 546s assert (acov, avar_out, 1e-3); 546s ***** test 546s x = 1:50; 546s [nlogL, acov] = evlike ([21, 15], x); 546s avar_out = [11.73913876598908, -5.9546128523121216; ... 546s -5.954612852312121, 3.708060045170236]; 546s assert (nlogL, 223.7612479380652, 1e-13); 546s assert (acov, avar_out, 1e-14); 546s ***** error<evlike: function called with too few input arguments.> evlike ([12, 15]) 546s ***** error<evlike: wrong parameters length.> evlike ([12, 15, 3], [1:50]) 546s ***** error<evlike: X must be a vector.> evlike ([12, 3], ones (10, 2)) 546s ***** error<evlike: X and CENSOR vectors mismatch.> ... 546s evlike ([12, 15], [1:50], [1, 2, 3]) 546s ***** error<evlike: X and FREQ vectors mismatch.> ... 546s evlike ([12, 15], [1:50], [], [1, 2, 3]) 546s 8 tests, 8 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/unifit.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/unifit.m 546s ***** demo 546s ## Sample 2 populations from different continuous uniform distibutions 546s rand ("seed", 5); # for reproducibility 546s r1 = unifrnd (2, 5, 2000, 1); 546s rand ("seed", 6); # for reproducibility 546s r2 = unifrnd (3, 9, 2000, 1); 546s r = [r1, r2]; 546s 546s ## Plot them normalized and fix their colors 546s hist (r, 0:0.5:10, 2); 546s h = findobj (gca, "Type", "patch"); 546s set (h(1), "facecolor", "c"); 546s set (h(2), "facecolor", "g"); 546s hold on 546s 546s ## Estimate their probability of success 546s a_bA = unifit (r(:,1)); 546s a_bB = unifit (r(:,2)); 546s 546s ## Plot their estimated PDFs 546s x = [0:10]; 546s y = unifpdf (x, a_bA(1), a_bA(2)); 546s plot (x, y, "-pg"); 546s y = unifpdf (x, a_bB(1), a_bB(2)); 546s plot (x, y, "-sc"); 546s xlim ([1, 10]) 546s ylim ([0, 0.5]) 546s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 546s "Normalized HIST of sample 2 with a=3 and b=9", ... 546s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 546s a_bA(1), a_bA(2)), ... 546s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 546s a_bB(1), a_bB(2))}) 546s title ("Two population samples from different continuous uniform distibutions") 546s hold off 546s ***** test 546s x = 0:5; 546s [paramhat, paramci] = unifit (x); 546s assert (paramhat, [0, 5]); 546s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 546s ***** test 546s x = 0:5; 546s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 546s assert (paramhat, [0, 5]); 546s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 546s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 546s ***** error<unifit: function called with too few input arguments.> unifit () 546s ***** error<unifit: X cannot have negative values.> unifit (-1, [1 2 3 3]) 546s ***** error<unifit: wrong value for ALPHA.> unifit (1, 0) 546s ***** error<unifit: wrong value for ALPHA.> unifit (1, 1.2) 546s ***** error<unifit: wrong value for ALPHA.> unifit (1, [0.02 0.05]) 546s ***** error<unifit: X and FREQ vector mismatch.> ... 546s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 546s ***** error<unifit: FREQ cannot have negative values.> ... 546s unifit ([1.5, 0.2], [], [1, -1]) 546s ***** error<unifit: X and FREQ vector mismatch.> ... 546s unifit ([1.5, 0.2], [], [1, 1, 1]) 546s 11 tests, 11 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/rayllike.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/rayllike.m 546s ***** test 546s x = [1 3 2 4 5 4 3 4]; 546s [nlogL, acov] = rayllike (3.25, x); 546s assert (nlogL, 14.7442, 1e-4) 546s ***** test 546s x = [1 2 3 4 5]; 546s f = [1 1 2 3 1]; 546s [nlogL, acov] = rayllike (3.25, x, [], f); 546s assert (nlogL, 14.7442, 1e-4) 546s ***** test 546s x = [1 2 3 4 5 6]; 546s f = [1 1 2 3 1 0]; 546s [nlogL, acov] = rayllike (3.25, x, [], f); 546s assert (nlogL, 14.7442, 1e-4) 546s ***** test 546s x = [1 2 3 4 5 6]; 546s c = [0 0 0 0 0 1]; 546s f = [1 1 2 3 1 0]; 546s [nlogL, acov] = rayllike (3.25, x, c, f); 546s assert (nlogL, 14.7442, 1e-4) 546s ***** error<rayllike: function called with too few input arguments.> rayllike (1) 546s ***** error<rayllike: SIGMA must be a positive scalar.> rayllike ([1 2 3], [1 2]) 546s ***** error<rayllike: X must be a vector of non-negative values.> ... 546s rayllike (3.25, ones (10, 2)) 546s ***** error<rayllike: X must be a vector of non-negative values.> ... 546s rayllike (3.25, [1 2 3 -4 5]) 546s ***** error<rayllike: X and CENSOR vectors mismatch.> ... 546s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 546s ***** error<rayllike: X and CENSOR vectors mismatch.> ... 546s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 546s ***** error<rayllike: X and FREQ vectors mismatch.> ... 546s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 546s ***** error<rayllike: X and FREQ vectors mismatch.> ... 546s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 546s ***** error<rayllike: FREQ must not contain negative values.> ... 546s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 546s 13 tests, 13 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/expfit.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/expfit.m 546s ***** demo 546s ## Sample 3 populations from 3 different exponential distibutions 546s rande ("seed", 1); # for reproducibility 546s r1 = exprnd (2, 4000, 1); 546s rande ("seed", 2); # for reproducibility 546s r2 = exprnd (5, 4000, 1); 546s rande ("seed", 3); # for reproducibility 546s r3 = exprnd (12, 4000, 1); 546s r = [r1, r2, r3]; 546s 546s ## Plot them normalized and fix their colors 546s hist (r, 48, 0.52); 546s h = findobj (gca, "Type", "patch"); 546s set (h(1), "facecolor", "c"); 546s set (h(2), "facecolor", "g"); 546s set (h(3), "facecolor", "r"); 546s hold on 546s 546s ## Estimate their mu parameter 546s muhat = expfit (r); 546s 546s ## Plot their estimated PDFs 546s x = [0:max(r(:))]; 546s y = exppdf (x, muhat(1)); 546s plot (x, y, "-pr"); 546s y = exppdf (x, muhat(2)); 546s plot (x, y, "-sg"); 546s y = exppdf (x, muhat(3)); 546s plot (x, y, "-^c"); 546s ylim ([0, 0.6]) 546s xlim ([0, 40]) 546s legend ({"Normalized HIST of sample 1 with μ=2", ... 546s "Normalized HIST of sample 2 with μ=5", ... 546s "Normalized HIST of sample 3 with μ=12", ... 546s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 546s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 546s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 546s title ("Three population samples from different exponential distibutions") 546s hold off 546s ***** assert (expfit (1), 1) 546s ***** assert (expfit (1:3), 2) 546s ***** assert (expfit ([1:3]'), 2) 546s ***** assert (expfit (1:3, []), 2) 546s ***** assert (expfit (1:3, [], [], []), 2) 546s ***** assert (expfit (magic (3)), [5 5 5]) 546s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 546s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 546s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 546s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 546s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 546s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 546s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 546s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 546s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 546s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 546s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 546s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 546s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 546s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 546s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 546s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 546s [1.75 4.75 7.75]) 546s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 546s [1.75 4.75 7.75]) 546s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 546s [3.5 19/3 31/3]) 546s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 546s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 546s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 546s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 546s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 546s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 546s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 546s 1000*eps) 546s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 546s [0.953017262058213; 7.337731146400207], 1000*eps) 546s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 546s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 546s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 546s 1000*eps) 546s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 546s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 546s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 546s 1000*eps) 546s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 546s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 546s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 546s 1000*eps) 546s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 546s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 546s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 546s 1000*eps) 546s ***** test 546s x = reshape (1:8, [4 2]); 546s x(4) = NaN; 546s [muhat,muci] = expfit (x); 546s assert ({muhat, muci}, {[NaN, 6.5], ... 546s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 546s ***** test 546s x = magic (3); 546s censor = [0 1 0; 0 1 0; 0 1 0]; 546s freq = [1 1 0; 1 1 0; 1 1 0]; 546s [muhat,muci] = expfit (x, [], censor, freq); 546s assert ({muhat, muci}, {[5 NaN NaN], ... 546s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 546s ***** error expfit () 546s ***** error expfit (1,2,3,4,5) 546s ***** error [a b censor] = expfit (1) 546s ***** error <ALPHA must be a scalar quantity> expfit (1, [1 2]) 546s ***** error <X cannot be negative> expfit ([-1 2 3 4 5]) 546s ***** error <CENSOR must be a numeric or logical array> expfit ([1:5], [], "test") 546s ***** error <FREQ must be a numeric or logical array> expfit ([1:5], [], [], "test") 546s ***** error <X and CENSOR vectors mismatch.> expfit ([1:5], [], [0 0 0 0]) 546s ***** error <X and FREQ vectors mismatch.> expfit ([1:5], [], [], [1 1 1 1]) 546s 47 tests, 47 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/betafit.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/betafit.m 546s ***** demo 546s ## Sample 2 populations from different Beta distibutions 546s randg ("seed", 1); # for reproducibility 546s r1 = betarnd (2, 5, 500, 1); 546s randg ("seed", 2); # for reproducibility 546s r2 = betarnd (2, 2, 500, 1); 546s r = [r1, r2]; 546s 546s ## Plot them normalized and fix their colors 546s hist (r, 12, 15); 546s h = findobj (gca, "Type", "patch"); 546s set (h(1), "facecolor", "c"); 546s set (h(2), "facecolor", "g"); 546s hold on 546s 546s ## Estimate their shape parameters 546s a_b_A = betafit (r(:,1)); 546s a_b_B = betafit (r(:,2)); 546s 546s ## Plot their estimated PDFs 546s x = [min(r(:)):0.01:max(r(:))]; 546s y = betapdf (x, a_b_A(1), a_b_A(2)); 546s plot (x, y, "-pr"); 546s y = betapdf (x, a_b_B(1), a_b_B(2)); 546s plot (x, y, "-sg"); 546s ylim ([0, 4]) 546s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 546s "Normalized HIST of sample 2 with α=2 and β=2", ... 546s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 546s a_b_A(1), a_b_A(2)), ... 546s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 546s a_b_B(1), a_b_B(2))}) 546s title ("Two population samples from different Beta distibutions") 546s hold off 546s ***** test 546s x = 0.01:0.02:0.99; 546s [paramhat, paramci] = betafit (x); 546s paramhat_out = [1.0199, 1.0199]; 546s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 546s assert (paramhat, paramhat_out, 1e-4); 546s assert (paramci, paramci_out, 1e-4); 546s ***** test 546s x = 0.01:0.02:0.99; 546s [paramhat, paramci] = betafit (x, 0.01); 546s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 546s assert (paramci, paramci_out, 1e-4); 546s ***** test 546s x = 0.00:0.02:1; 546s [paramhat, paramci] = betafit (x); 546s paramhat_out = [0.0875, 0.1913]; 546s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 546s assert (paramhat, paramhat_out, 1e-4); 546s assert (paramci, paramci_out, 1e-4); 546s ***** error<betafit: X must be a vector of real values.> betafit ([0.2, 0.5+i]); 546s ***** error<betafit: X must be a vector of real values.> betafit (ones (2,2) * 0.5); 546s ***** error<betafit: X must be in the range> betafit ([0.5, 1.2]); 546s ***** error<betafit: X must contain distinct values.> betafit ([0.1, 0.1]); 546s ***** error<betafit: wrong value for ALPHA.> betafit ([0.01:0.1:0.99], 1.2); 546s ***** error<betafit: X and FREQ vectors mismatch.> ... 546s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 546s ***** error<betafit: FREQ must not contain negative values.> ... 546s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 546s ***** error<betafit: FREQ must contain integer values.> ... 546s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 546s ***** error<betafit: 'options' argument must be a structure> ... 546s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 546s ***** error<betafit: 'options' argument must be a structure> ... 546s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 546s 13 tests, 13 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/poisslike.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/poisslike.m 546s ***** test 546s x = [1 3 2 4 5 4 3 4]; 546s [nlogL, avar] = poisslike (3.25, x); 546s assert (nlogL, 13.9533, 1e-4) 546s ***** test 546s x = [1 2 3 4 5]; 546s f = [1 1 2 3 1]; 546s [nlogL, avar] = poisslike (3.25, x, f); 546s assert (nlogL, 13.9533, 1e-4) 546s ***** error<poisslike: function called with too few input arguments.> poisslike (1) 546s ***** error<poisslike: LAMBDA must be a positive scalar.> poisslike ([1 2 3], [1 2]) 546s ***** error<poisslike: X must be a vector of non-negative values.> ... 546s poisslike (3.25, ones (10, 2)) 546s ***** error<poisslike: X must be a vector of non-negative values.> ... 546s poisslike (3.25, [1 2 3 -4 5]) 546s ***** error<poisslike: X and FREQ vectors mismatch.> ... 546s poisslike (3.25, ones (10, 1), ones (8,1)) 546s ***** error<poisslike: FREQ must not contain negative values.> ... 546s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 546s 8 tests, 8 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/geofit.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/geofit.m 546s ***** demo 546s ## Sample 2 populations from different geometric distibutions 546s rande ("seed", 1); # for reproducibility 546s r1 = geornd (0.15, 1000, 1); 546s rande ("seed", 2); # for reproducibility 546s r2 = geornd (0.5, 1000, 1); 546s r = [r1, r2]; 546s 546s ## Plot them normalized and fix their colors 546s hist (r, 0:0.5:20.5, 1); 546s h = findobj (gca, "Type", "patch"); 546s set (h(1), "facecolor", "c"); 546s set (h(2), "facecolor", "g"); 546s hold on 546s 546s ## Estimate their probability of success 546s pshatA = geofit (r(:,1)); 546s pshatB = geofit (r(:,2)); 546s 546s ## Plot their estimated PDFs 546s x = [0:15]; 546s y = geopdf (x, pshatA); 546s plot (x, y, "-pg"); 546s y = geopdf (x, pshatB); 546s plot (x, y, "-sc"); 546s xlim ([0, 15]) 546s ylim ([0, 0.6]) 546s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 546s "Normalized HIST of sample 2 with ps=0.50", ... 546s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 546s mean (pshatA)), ... 546s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 546s mean (pshatB))}) 546s title ("Two population samples from different geometric distibutions") 546s hold off 546s ***** test 546s x = 0:5; 546s [pshat, psci] = geofit (x); 546s assert (pshat, 0.2857, 1e-4); 546s assert (psci, [0.092499; 0.478929], 1e-5); 546s ***** test 546s x = 0:5; 546s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 546s assert (pshat, 0.2857, 1e-4); 546s assert (psci, [0.092499; 0.478929], 1e-5); 546s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 546s ***** error<geofit: function called with too few input arguments.> geofit () 546s ***** error<geofit: X cannot have negative values.> geofit (-1, [1 2 3 3]) 546s ***** error<geofit: wrong value for ALPHA.> geofit (1, 0) 546s ***** error<geofit: wrong value for ALPHA.> geofit (1, 1.2) 546s ***** error<geofit: wrong value for ALPHA.> geofit (1, [0.02 0.05]) 546s ***** error<geofit: X and FREQ vector mismatch.> ... 546s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 546s ***** error<geofit: X and FREQ vector mismatch.> ... 546s geofit ([1.5, 0.2], [], [1, 1, 1]) 546s 10 tests, 10 passed, 0 known failure, 0 skipped 546s [inst/dist_fit/tlsfit.m] 546s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/tlsfit.m 546s ***** demo 546s ## Sample 3 populations from 3 different location-scale T distibutions 546s randn ("seed", 1); # for reproducibility 546s randg ("seed", 2); # for reproducibility 546s r1 = tlsrnd (-4, 3, 1, 2000, 1); 546s randn ("seed", 3); # for reproducibility 546s randg ("seed", 4); # for reproducibility 546s r2 = tlsrnd (0, 3, 1, 2000, 1); 546s randn ("seed", 5); # for reproducibility 546s randg ("seed", 6); # for reproducibility 546s r3 = tlsrnd (5, 5, 4, 2000, 1); 546s r = [r1, r2, r3]; 546s 546s ## Plot them normalized and fix their colors 546s hist (r, [-21:21], [1, 1, 1]); 546s h = findobj (gca, "Type", "patch"); 546s set (h(1), "facecolor", "c"); 546s set (h(2), "facecolor", "g"); 546s set (h(3), "facecolor", "r"); 546s ylim ([0, 0.25]); 546s xlim ([-20, 20]); 546s hold on 546s 546s ## Estimate their lambda parameter 546s mu_sigma_nuA = tlsfit (r(:,1)); 546s mu_sigma_nuB = tlsfit (r(:,2)); 546s mu_sigma_nuC = tlsfit (r(:,3)); 546s 546s ## Plot their estimated PDFs 546s x = [-20:0.1:20]; 546s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 546s plot (x, y, "-pr"); 546s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 546s plot (x, y, "-sg"); 546s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 546s plot (x, y, "-^c"); 546s hold off 546s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 546s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 546s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 546s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 546s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 546s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 546s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 546s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 546s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 546s title ("Three population samples from different location-scale T distibutions") 546s hold off 546s ***** test 546s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 546s [paramhat, paramci] = tlsfit (x); 546s paramhat_out = [0.035893, 0.862711, 0.649261]; 546s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 546s assert (paramhat, paramhat_out, 1e-6); 546s assert (paramci, paramci_out, 1e-5); 546s ***** test 546s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 546s [paramhat, paramci] = tlsfit (x, 0.01); 546s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 546s assert (paramci, paramci_out, 1e-4); 547s ***** error<tlsfit: X must be a vector.> tlsfit (ones (2,5)); 547s ***** error<tlsfit: wrong value for ALPHA.> tlsfit ([1, 2, 3, 4, 5], 1.2); 547s ***** error<tlsfit: wrong value for ALPHA.> tlsfit ([1, 2, 3, 4, 5], 0); 547s ***** error<tlsfit: wrong value for ALPHA.> tlsfit ([1, 2, 3, 4, 5], "alpha"); 547s ***** error<tlsfit: X and CENSOR vectors mismatch.> ... 547s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 547s ***** error<tlsfit: X and CENSOR vectors mismatch.> ... 547s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 547s ***** error<tlsfit: X and FREQ vectors mismatch.> ... 547s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 547s ***** error<tlsfit: X and FREQ vectors mismatch.> ... 547s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 547s ***** error<tlsfit: FREQ cannot have negative values.> ... 547s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 547s ***** error<tlsfit: 'options' 5th argument must be a structure> ... 547s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 547s 12 tests, 12 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/bisafit.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/bisafit.m 547s ***** demo 547s ## Sample 3 populations from different Birnbaum-Saunders distibutions 547s rand ("seed", 5); # for reproducibility 547s r1 = bisarnd (1, 0.5, 2000, 1); 547s rand ("seed", 2); # for reproducibility 547s r2 = bisarnd (2, 0.3, 2000, 1); 547s rand ("seed", 7); # for reproducibility 547s r3 = bisarnd (4, 0.5, 2000, 1); 547s r = [r1, r2, r3]; 547s 547s ## Plot them normalized and fix their colors 547s hist (r, 80, 4.2); 547s h = findobj (gca, "Type", "patch"); 547s set (h(1), "facecolor", "c"); 547s set (h(2), "facecolor", "g"); 547s set (h(3), "facecolor", "r"); 547s ylim ([0, 1.1]); 547s xlim ([0, 8]); 547s hold on 547s 547s ## Estimate their α and β parameters 547s beta_gammaA = bisafit (r(:,1)); 547s beta_gammaB = bisafit (r(:,2)); 547s beta_gammaC = bisafit (r(:,3)); 547s 547s ## Plot their estimated PDFs 547s x = [0:0.1:8]; 547s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 547s plot (x, y, "-pr"); 547s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 547s plot (x, y, "-sg"); 547s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 547s plot (x, y, "-^c"); 547s hold off 547s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 547s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 547s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 547s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 547s beta_gammaA(1), beta_gammaA(2)), ... 547s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 547s beta_gammaB(1), beta_gammaB(2)), ... 547s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 547s beta_gammaC(1), beta_gammaC(2))}) 547s title ("Three population samples from different Birnbaum-Saunders distibutions") 547s hold off 547s ***** test 547s paramhat = bisafit ([1:50]); 547s paramhat_out = [16.2649, 1.0156]; 547s assert (paramhat, paramhat_out, 1e-4); 547s ***** test 547s paramhat = bisafit ([1:5]); 547s paramhat_out = [2.5585, 0.5839]; 547s assert (paramhat, paramhat_out, 1e-4); 547s ***** error<bisafit: X must be a vector.> bisafit (ones (2,5)); 547s ***** error<bisafit: X must contain only positive values.> bisafit ([-1 2 3 4]); 547s ***** error<bisafit: wrong value for ALPHA.> bisafit ([1, 2, 3, 4, 5], 1.2); 547s ***** error<bisafit: wrong value for ALPHA.> bisafit ([1, 2, 3, 4, 5], 0); 547s ***** error<bisafit: wrong value for ALPHA.> bisafit ([1, 2, 3, 4, 5], "alpha"); 547s ***** error<bisafit: X and CENSOR vectors mismatch.> ... 547s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 547s ***** error<bisafit: X and CENSOR vectors mismatch.> ... 547s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 547s ***** error<bisafit: X and FREQ vectors mismatch.> ... 547s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 547s ***** error<bisafit: X and FREQ vectors mismatch.> ... 547s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 547s ***** error<bisafit: 'options' 5th argument must be a structure> ... 547s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 547s 12 tests, 12 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/betalike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/betalike.m 547s ***** test 547s x = 0.01:0.02:0.99; 547s [nlogL, avar] = betalike ([2.3, 1.2], x); 547s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 547s assert (nlogL, 17.873477715879040, 3e-14); 547s assert (avar, avar_out, 1e-7); 547s ***** test 547s x = 0.01:0.02:0.99; 547s [nlogL, avar] = betalike ([1, 4], x); 547s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 547s assert (nlogL, 79.648061114839550, 1e-13); 547s assert (avar, avar_out, 1e-7); 547s ***** test 547s x = 0.00:0.02:1; 547s [nlogL, avar] = betalike ([1, 4], x); 547s avar_out = [0.00000801564765, 0.00000131397245; ... 547s 0.00000131397245, 0.00070827639442]; 547s assert (nlogL, 573.2008434477486, 1e-10); 547s assert (avar, avar_out, 1e-14); 547s ***** error<betalike: function called with too few input arguments.> ... 547s betalike ([12, 15]); 547s ***** error<betalike: wrong parameters length.> betalike ([12, 15, 3], [1:50]); 547s ***** error<betalike: X and FREQ vectors mismatch.> ... 547s betalike ([12, 15], ones (10, 1), ones (8,1)) 547s ***** error<betalike: FREQ must not contain negative values.> ... 547s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 547s ***** error<betalike: FREQ must contain integer values.> ... 547s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 547s 8 tests, 8 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/normlike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/normlike.m 547s ***** error<normlike: too few input arguments.> normlike ([12, 15]); 547s ***** error<normlike: X must be a vector.> normlike ([12, 15], ones (2)); 547s ***** error<normlike: PARAMS must be a two-element vector.> ... 547s normlike ([12, 15, 3], [1:50]); 547s ***** error<normlike: X and CENSOR vectors mismatch.> ... 547s normlike ([12, 15], [1:50], [1, 2, 3]); 547s ***** error<normlike: X and FREQ vectors mismatch.> ... 547s normlike ([12, 15], [1:50], [], [1, 2, 3]); 547s ***** error<normlike: FREQ must not contain negative values.> ... 547s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 547s ***** test 547s x = 1:50; 547s [nlogL, avar] = normlike ([2.3, 1.2], x); 547s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 547s assert (nlogL, 13014.95883783327, 1e-10); 547s assert (avar, avar_out, 1e-4); 547s ***** test 547s x = 1:50; 547s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 547s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 547s assert (nlogL, 2854.802587833265, 1e-10); 547s assert (avar, avar_out, 1e-4); 547s ***** test 547s x = 1:50; 547s [nlogL, avar] = normlike ([21, 15], x); 547s avar_out = [5.460474308300396, -1.600790513833993; ... 547s -1.600790513833993, 2.667984189723321]; 547s assert (nlogL, 206.738325604233, 1e-12); 547s assert (avar, avar_out, 1e-14); 547s ***** test 547s x = 1:50; 547s censor = ones (1, 50); 547s censor([2, 4, 6, 8, 12, 14]) = 0; 547s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 547s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 547s assert (nlogL, Inf); 547s assert (avar, [NaN, NaN; NaN, NaN]); 547s ***** test 547s x = 1:50; 547s censor = ones (1, 50); 547s censor([2, 4, 6, 8, 12, 14]) = 0; 547s [nlogL, avar] = normlike ([21, 15], x, censor); 547s avar_out = [24.4824488866131, -10.6649544179636; ... 547s -10.6649544179636, 6.22827849965737]; 547s assert (nlogL, 86.9254371829733, 1e-12); 547s assert (avar, avar_out, 8e-14); 547s 11 tests, 11 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/ricefit.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/ricefit.m 547s ***** demo 547s ## Sample 3 populations from different Gamma distibutions 547s randg ("seed", 5); # for reproducibility 547s randp ("seed", 6); 547s r1 = ricernd (1, 2, 3000, 1); 547s randg ("seed", 2); # for reproducibility 547s randp ("seed", 8); 547s r2 = ricernd (2, 4, 3000, 1); 547s randg ("seed", 7); # for reproducibility 547s randp ("seed", 9); 547s r3 = ricernd (7.5, 1, 3000, 1); 547s r = [r1, r2, r3]; 547s 547s ## Plot them normalized and fix their colors 547s hist (r, 75, 4); 547s h = findobj (gca, "Type", "patch"); 547s set (h(1), "facecolor", "c"); 547s set (h(2), "facecolor", "g"); 547s set (h(3), "facecolor", "r"); 547s ylim ([0, 0.7]); 547s xlim ([0, 12]); 547s hold on 547s 547s ## Estimate their α and β parameters 547s s_sigmaA = ricefit (r(:,1)); 547s s_sigmaB = ricefit (r(:,2)); 547s s_sigmaC = ricefit (r(:,3)); 547s 547s ## Plot their estimated PDFs 547s x = [0.01,0.1:0.2:18]; 547s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 547s plot (x, y, "-pr"); 547s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 547s plot (x, y, "-sg"); 547s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 547s plot (x, y, "-^c"); 547s hold off 547s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 547s "Normalized HIST of sample 2 with s=2 and σ=4", ... 547s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 547s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 547s s_sigmaA(1), s_sigmaA(2)), ... 547s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 547s s_sigmaB(1), s_sigmaB(2)), ... 547s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 547s s_sigmaC(1), s_sigmaC(2))}) 547s title ("Three population samples from different Rician distibutions") 547s hold off 547s ***** test 547s [paramhat, paramci] = ricefit ([1:50]); 547s assert (paramhat, [15.3057, 17.6668], 1e-4); 547s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 547s ***** test 547s [paramhat, paramci] = ricefit ([1:50], 0.01); 547s assert (paramhat, [15.3057, 17.6668], 1e-4); 547s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 547s ***** test 547s [paramhat, paramci] = ricefit ([1:5]); 547s assert (paramhat, [2.3123, 1.6812], 1e-4); 547s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 547s ***** test 547s [paramhat, paramci] = ricefit ([1:5], 0.01); 547s assert (paramhat, [2.3123, 1.6812], 1e-4); 547s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 547s ***** test 547s freq = [1 1 1 1 5]; 547s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 547s assert (paramhat, [3.5181, 1.5565], 1e-4); 547s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 547s ***** test 547s censor = [1 0 0 0 0]; 547s [paramhat, paramci] = ricefit ([1:5], [], censor); 547s assert (paramhat, [3.2978, 1.1527], 1e-4); 547s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 547s ***** assert (class (ricefit (single ([1:50]))), "single") 547s ***** error<ricefit: X must be a vector.> ricefit (ones (2)) 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], 1) 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], -1) 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], {0.05}) 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], "k") 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], i) 547s ***** error<ricefit: wrong value for ALPHA.> ricefit ([1:50], [0.01 0.02]) 547s ***** error<ricefit: X and CENSOR vectors mismatch.> ricefit ([1:50], [], [1 1]) 547s ***** error<ricefit: X and FREQ vectors mismatch.> ricefit ([1:50], [], [], [1 1]) 547s ***** error<ricefit: FREQ cannot have negative values.> ... 547s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 547s ***** error<ricefit: X must contain positive values.> ricefit ([1 2 3 -4]) 547s ***** error<ricefit: X must contain positive values.> ricefit ([1 2 0], [], [1 0 0]) 547s 19 tests, 19 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/logilike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/logilike.m 547s ***** test 547s nlogL = logilike ([25.5, 8.7725], [1:50]); 547s assert (nlogL, 206.6769, 1e-4); 547s ***** test 547s nlogL = logilike ([3, 0.8645], [1:5]); 547s assert (nlogL, 9.0699, 1e-4); 547s ***** error<logilike: function called with too few input arguments.> logilike (3.25) 547s ***** error<logilike: X must be a vector.> logilike ([5, 0.2], ones (2)) 547s ***** error<logilike: PARAMS must be a two-element vector.> ... 547s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 547s ***** error<logilike: X and CENSOR vector mismatch.> ... 547s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 547s ***** error<logilike: X and FREQ vector mismatch.> ... 547s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 547s ***** error<logilike: X and FREQ vector mismatch.> ... 547s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 547s 8 tests, 8 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/invglike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/invglike.m 547s ***** test 547s nlogL = invglike ([25.5, 19.6973], [1:50]); 547s assert (nlogL, 219.1516, 1e-4); 547s ***** test 547s nlogL = invglike ([3, 8.1081], [1:5]); 547s assert (nlogL, 9.0438, 1e-4); 547s ***** error<invglike: function called with too few input arguments.> invglike (3.25) 547s ***** error<invglike: X must be a vector.> invglike ([5, 0.2], ones (2)) 547s ***** error<invglike: X must have positive values.> invglike ([5, 0.2], [-1, 3]) 547s ***** error<invglike: PARAMS must be a two-element vector.> ... 547s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 547s ***** error<invglike: X and CENSOR vector mismatch.> ... 547s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 547s ***** error<invglike: X and FREQ vector mismatch.> ... 547s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 547s ***** error<invglike: X and FREQ vector mismatch.> ... 547s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 547s 9 tests, 9 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/tlslike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/tlslike.m 547s ***** test 547s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 547s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 547s acov_out = [0.2525, 0.0670, 0.0288; ... 547s 0.0670, 0.5724, 0.1786; ... 547s 0.0288, 0.1786, 0.1789]; 547s assert (nlogL, 17.9979636579, 1e-10); 547s assert (acov, acov_out, 1e-4); 547s ***** error<tlslike: too few input arguments.> tlslike ([12, 15, 1]); 547s ***** error<tlslike: wrong parameters length.> tlslike ([12, 15], [1:50]); 547s ***** error<tlslike: X must be a vector.> tlslike ([12, 3, 1], ones (10, 2)); 547s ***** error<tlslike: X and CENSOR> tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 547s ***** error<tlslike: X and FREQ> tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 547s ***** error<tlslike: FREQ cannot> tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 547s 7 tests, 7 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/explike.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/explike.m 547s ***** test 547s x = 12; 547s beta = 5; 547s [L, V] = explike (beta, x); 547s expected_L = 4.0094; 547s expected_V = 6.5789; 547s assert (L, expected_L, 0.001); 547s assert (V, expected_V, 0.001); 547s ***** test 547s x = 1:5; 547s beta = 2; 547s [L, V] = explike (beta, x); 547s expected_L = 10.9657; 547s expected_V = 0.4; 547s assert (L, expected_L, 0.001); 547s assert (V, expected_V, 0.001); 547s ***** error<explike: function called with too few input arguments.> explike () 547s ***** error<explike: function called with too few input arguments.> explike (2) 547s ***** error<explike: MU must be a scalar.> explike ([12, 3], [1:50]) 547s ***** error<explike: X must be a vector.> explike (3, ones (10, 2)) 547s ***** error<explike: X and CENSOR vectors mismatch.> ... 547s explike (3, [1:50], [1, 2, 3]) 547s ***** error<explike: X and FREQ vectors mismatch.> ... 547s explike (3, [1:50], [], [1, 2, 3]) 547s 8 tests, 8 passed, 0 known failure, 0 skipped 547s [inst/dist_fit/nbinfit.m] 547s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/nbinfit.m 547s ***** demo 547s ## Sample 2 populations from different negative binomial distibutions 547s randp ("seed", 5); randg ("seed", 5); # for reproducibility 547s r1 = nbinrnd (2, 0.15, 5000, 1); 547s randp ("seed", 8); randg ("seed", 8); # for reproducibility 547s r2 = nbinrnd (5, 0.2, 5000, 1); 547s r = [r1, r2]; 547s 547s ## Plot them normalized and fix their colors 547s hist (r, [0:51], 1); 547s h = findobj (gca, "Type", "patch"); 547s set (h(1), "facecolor", "c"); 547s set (h(2), "facecolor", "g"); 547s hold on 547s 547s ## Estimate their probability of success 547s r_psA = nbinfit (r(:,1)); 547s r_psB = nbinfit (r(:,2)); 547s 547s ## Plot their estimated PDFs 547s x = [0:40]; 547s y = nbinpdf (x, r_psA(1), r_psA(2)); 547s plot (x, y, "-pg"); 547s x = [min(r(:,2)):max(r(:,2))]; 547s y = nbinpdf (x, r_psB(1), r_psB(2)); 547s plot (x, y, "-sc"); 547s ylim ([0, 0.1]) 547s xlim ([0, 50]) 547s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 547s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 547s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 547s r_psA(1), r_psA(2)), ... 547s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 547s r_psB(1), r_psB(2))}) 547s title ("Two population samples from negative different binomial distibutions") 547s hold off 547s ***** test 547s [paramhat, paramci] = nbinfit ([1:50]); 547s assert (paramhat, [2.420857, 0.086704], 1e-6); 547s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 547s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 547s ***** test 547s [paramhat, paramci] = nbinfit ([1:20]); 547s assert (paramhat, [3.588233, 0.254697], 1e-6); 547s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 547s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 547s ***** test 547s [paramhat, paramci] = nbinfit ([1:10]); 547s assert (paramhat, [8.8067, 0.6156], 1e-4); 547s assert (paramci(:,1), [0; 30.7068], 1e-4); 547s assert (paramci(:,2), [0.0217; 1], 1e-4); 547s ***** test 547s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 547s assert (paramhat, [8.8067, 0.6156], 1e-4); 547s assert (paramci(:,1), [0; 30.7068], 1e-4); 547s assert (paramci(:,2), [0.0217; 1], 1e-4); 547s ***** test 547s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 547s assert (paramhat, [8.8067, 0.6156], 1e-4); 547s assert (paramci(:,1), [0; 30.7068], 1e-4); 547s assert (paramci(:,2), [0.0217; 1], 1e-4); 547s ***** error<nbinfit: X cannot have negative values.> nbinfit ([-1 2 3 3]) 547s ***** error<nbinfit: X must be a vector.> nbinfit (ones (2)) 547s ***** error<nbinfit: X must be a non-negative integer.> nbinfit ([1 2 1.2 3]) 548s ***** error<nbinfit: wrong value for ALPHA.> nbinfit ([1 2 3], 0) 548s ***** error<nbinfit: wrong value for ALPHA.> nbinfit ([1 2 3], 1.2) 548s ***** error<nbinfit: wrong value for ALPHA.> nbinfit ([1 2 3], [0.02 0.05]) 548s ***** error<nbinfit: X and FREQ vectors mismatch.> ... 548s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 548s ***** error<nbinfit: FREQ must not contain negative values.> ... 548s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 548s ***** error<nbinfit: FREQ must contain integer values.> ... 548s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 548s ***** error<nbinfit: 'options' argument must be a structure> ... 548s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 548s ***** error<nbinfit: 'options' argument must be a structure> ... 548s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 548s 16 tests, 16 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/logifit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/logifit.m 548s ***** demo 548s ## Sample 3 populations from different logistic distibutions 548s rand ("seed", 5) # for reproducibility 548s r1 = logirnd (2, 1, 2000, 1); 548s rand ("seed", 2) # for reproducibility 548s r2 = logirnd (5, 2, 2000, 1); 548s rand ("seed", 7) # for reproducibility 548s r3 = logirnd (9, 4, 2000, 1); 548s r = [r1, r2, r3]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, [-6:20], 1); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s set (h(3), "facecolor", "r"); 548s ylim ([0, 0.3]); 548s xlim ([-5, 20]); 548s hold on 548s 548s ## Estimate their MU and LAMBDA parameters 548s mu_sA = logifit (r(:,1)); 548s mu_sB = logifit (r(:,2)); 548s mu_sC = logifit (r(:,3)); 548s 548s ## Plot their estimated PDFs 548s x = [-5:0.5:20]; 548s y = logipdf (x, mu_sA(1), mu_sA(2)); 548s plot (x, y, "-pr"); 548s y = logipdf (x, mu_sB(1), mu_sB(2)); 548s plot (x, y, "-sg"); 548s y = logipdf (x, mu_sC(1), mu_sC(2)); 548s plot (x, y, "-^c"); 548s hold off 548s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 548s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 548s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 548s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 548s mu_sA(1), mu_sA(2)), ... 548s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 548s mu_sB(1), mu_sB(2)), ... 548s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 548s mu_sC(1), mu_sC(2))}) 548s title ("Three population samples from different logistic distibutions") 548s hold off 548s ***** test 548s paramhat = logifit ([1:50]); 548s paramhat_out = [25.5, 8.7724]; 548s assert (paramhat, paramhat_out, 1e-4); 548s ***** test 548s paramhat = logifit ([1:5]); 548s paramhat_out = [3, 0.8645]; 548s assert (paramhat, paramhat_out, 1e-4); 548s ***** test 548s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 548s paramhat_out = [3, 0.8645]; 548s assert (paramhat, paramhat_out, 1e-4); 548s ***** test 548s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 548s paramhat_out = logifit ([1:5, 5]); 548s assert (paramhat, paramhat_out, 1e-4); 548s ***** error<logifit: X must be a vector.> logifit (ones (2,5)); 548s ***** error<logifit: wrong value for ALPHA.> logifit ([1, 2, 3, 4, 5], 1.2); 548s ***** error<logifit: wrong value for ALPHA.> logifit ([1, 2, 3, 4, 5], 0); 548s ***** error<logifit: wrong value for ALPHA.> logifit ([1, 2, 3, 4, 5], "alpha"); 548s ***** error<logifit: X and CENSOR vectors mismatch.> ... 548s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 548s ***** error<logifit: X and CENSOR vectors mismatch.> ... 548s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 548s ***** error<logifit: X and FREQ vectors mismatch.> ... 548s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 548s ***** error<logifit: X and FREQ vectors mismatch.> ... 548s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 548s ***** error<logifit: 'options' 5th argument must be a structure> ... 548s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 548s 13 tests, 13 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/gevfit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gevfit.m 548s ***** demo 548s ## Sample 2 populations from 2 different exponential distibutions 548s rand ("seed", 1); # for reproducibility 548s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 548s rand ("seed", 2); # for reproducibility 548s r2 = gevrnd (0, 1, -4, 5000, 1); 548s r = [r1, r2]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, 50, 5); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s hold on 548s 548s ## Estimate their k, sigma, and mu parameters 548s k_sigma_muA = gevfit (r(:,1)); 548s k_sigma_muB = gevfit (r(:,2)); 548s 548s ## Plot their estimated PDFs 548s x = [-10:0.5:20]; 548s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 548s plot (x, y, "-pr"); 548s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 548s plot (x, y, "-sg"); 548s ylim ([0, 0.7]) 548s xlim ([-7, 5]) 548s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 548s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 548s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 548s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 548s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 548s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 548s title ("Two population samples from different exponential distibutions") 548s hold off 548s ***** test 548s x = 1:50; 548s [pfit, pci] = gevfit (x); 548s pfit_out = [-0.4407, 15.1923, 21.5309]; 548s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 548s assert (pfit, pfit_out, 1e-3); 548s assert (pci, pci_out, 1e-3); 548s ***** test 548s x = 1:2:50; 548s [pfit, pci] = gevfit (x); 548s pfit_out = [-0.4434, 15.2024, 21.0532]; 548s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 548s assert (pfit, pfit_out, 1e-3); 548s assert (pci, pci_out, 1e-3); 548s ***** error<gevfit: X must be a vector.> gevfit (ones (2,5)); 548s ***** error<gevfit: wrong value for ALPHA.> gevfit ([1, 2, 3, 4, 5], 1.2); 548s ***** error<gevfit: wrong value for ALPHA.> gevfit ([1, 2, 3, 4, 5], 0); 548s ***** error<gevfit: wrong value for ALPHA.> gevfit ([1, 2, 3, 4, 5], "alpha"); 548s ***** error<gevfit: X and FREQ vectors mismatch.> ... 548s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 548s ***** error<gevfit: FREQ must not contain negative values.> ... 548s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 548s ***** error<gevfit: FREQ must contain integer values.> ... 548s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 548s ***** error<gevfit: 'options' argument must be a structure> ... 548s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 548s ***** error<gevfit: 'options' argument must be a structure> ... 548s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 548s 11 tests, 11 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/ricelike.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/ricelike.m 548s ***** test 548s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 548s assert (nlogL, 204.5230311010569, 1e-12); 548s ***** test 548s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 548s assert (nlogL, 8.65562164930058, 1e-12); 548s ***** error<ricelike: function called with too few input arguments.> ricelike (3.25) 548s ***** error<ricelike: X must be a vector.> ricelike ([5, 0.2], ones (2)) 548s ***** error<ricelike: PARAMS must be a two-element vector.> ... 548s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 548s ***** error<ricelike: X and CENSOR vector mismatch.> ... 548s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 548s ***** error<ricelike: X and FREQ vector mismatch.> ... 548s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 548s ***** error<ricelike: X and FREQ vector mismatch.> ... 548s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 548s ***** error<ricelike: FREQ must not contain negative values.> ... 548s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 548s 9 tests, 9 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/binofit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/binofit.m 548s ***** demo 548s ## Sample 2 populations from different binomial distibutions 548s rand ("seed", 1); # for reproducibility 548s r1 = binornd (50, 0.15, 1000, 1); 548s rand ("seed", 2); # for reproducibility 548s r2 = binornd (100, 0.5, 1000, 1); 548s r = [r1, r2]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, 23, 0.35); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s hold on 548s 548s ## Estimate their probability of success 548s pshatA = binofit (r(:,1), 50); 548s pshatB = binofit (r(:,2), 100); 548s 548s ## Plot their estimated PDFs 548s x = [min(r(:,1)):max(r(:,1))]; 548s y = binopdf (x, 50, mean (pshatA)); 548s plot (x, y, "-pg"); 548s x = [min(r(:,2)):max(r(:,2))]; 548s y = binopdf (x, 100, mean (pshatB)); 548s plot (x, y, "-sc"); 548s ylim ([0, 0.2]) 548s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 548s "Normalized HIST of sample 2 with ps=0.50", ... 548s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 548s mean (pshatA)), ... 548s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 548s mean (pshatB))}) 548s title ("Two population samples from different binomial distibutions") 548s hold off 548s ***** test 548s x = 0:3; 548s [pshat, psci] = binofit (x, 3); 548s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 548s assert (psci(1,:), [0, 0.7076], 1e-4); 548s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 548s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 548s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 548s ***** error<binofit: function called with too few input arguments.> ... 548s binofit ([1 2 3 4]) 548s ***** error<binofit: X cannot have negative values.> ... 548s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 548s ***** error<binofit: X must be a vector.> binofit (ones(2), [1, 2, 3, 3]) 548s ***** error<binofit: N must be a non-negative integer.> ... 548s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 548s ***** error<binofit: N must be a scalar or the same size as X.> ... 548s binofit ([1, 4, 3, 2], [5, 5, 5]) 548s ***** error<binofit: N must be at least as large as X.> ... 548s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 548s ***** error<binofit: wrong value for ALPHA.> binofit ([1, 2, 1], 3, 1.2); 548s ***** error<binofit: wrong value for ALPHA.> binofit ([1, 2, 1], 3, 0); 548s ***** error<binofit: wrong value for ALPHA.> binofit ([1, 2, 1], 3, "alpha"); 548s 10 tests, 10 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/poissfit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/poissfit.m 548s ***** demo 548s ## Sample 3 populations from 3 different Poisson distibutions 548s randp ("seed", 2); # for reproducibility 548s r1 = poissrnd (1, 1000, 1); 548s randp ("seed", 2); # for reproducibility 548s r2 = poissrnd (4, 1000, 1); 548s randp ("seed", 3); # for reproducibility 548s r3 = poissrnd (10, 1000, 1); 548s r = [r1, r2, r3]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, [0:20], 1); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s set (h(3), "facecolor", "r"); 548s hold on 548s 548s ## Estimate their lambda parameter 548s lambdahat = poissfit (r); 548s 548s ## Plot their estimated PDFs 548s x = [0:20]; 548s y = poisspdf (x, lambdahat(1)); 548s plot (x, y, "-pr"); 548s y = poisspdf (x, lambdahat(2)); 548s plot (x, y, "-sg"); 548s y = poisspdf (x, lambdahat(3)); 548s plot (x, y, "-^c"); 548s xlim ([0, 20]) 548s ylim ([0, 0.4]) 548s legend ({"Normalized HIST of sample 1 with λ=1", ... 548s "Normalized HIST of sample 2 with λ=4", ... 548s "Normalized HIST of sample 3 with λ=10", ... 548s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 548s lambdahat(1)), ... 548s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 548s lambdahat(2)), ... 548s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 548s lambdahat(3))}) 548s title ("Three population samples from different Poisson distibutions") 548s hold off 548s ***** test 548s x = [1 3 2 4 5 4 3 4]; 548s [lhat, lci] = poissfit (x); 548s assert (lhat, 3.25) 548s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 548s ***** test 548s x = [1 3 2 4 5 4 3 4]; 548s [lhat, lci] = poissfit (x, 0.01); 548s assert (lhat, 3.25) 548s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 548s ***** test 548s x = [1 2 3 4 5]; 548s f = [1 1 2 3 1]; 548s [lhat, lci] = poissfit (x, [], f); 548s assert (lhat, 3.25) 548s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 548s ***** test 548s x = [1 2 3 4 5]; 548s f = [1 1 2 3 1]; 548s [lhat, lci] = poissfit (x, 0.01, f); 548s assert (lhat, 3.25) 548s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 548s ***** error<poissfit: X cannot have negative values.> poissfit ([1 2 -1 3]) 548s ***** error<poissfit: wrong value for ALPHA.> poissfit ([1 2 3], 0) 548s ***** error<poissfit: wrong value for ALPHA.> poissfit ([1 2 3], 1.2) 548s ***** error<poissfit: wrong value for ALPHA.> poissfit ([1 2 3], [0.02 0.05]) 548s ***** error<poissfit: X and FREQ vectors mismatch.> 548s poissfit ([1 2 3], [], [1 5]) 548s ***** error<poissfit: FREQ must not contain negative values.> 548s poissfit ([1 2 3], [], [1 5 -1]) 548s 10 tests, 10 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/gevlike.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/gevlike.m 548s ***** test 548s x = 1; 548s k = 0.2; 548s sigma = 0.3; 548s mu = 0.5; 548s [L, C] = gevlike ([k sigma mu], x); 548s expected_L = 0.75942; 548s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 548s assert (L, expected_L, 0.001); 548s assert (C, inv (expected_C), 0.001); 548s ***** test 548s x = 1; 548s k = 0; 548s sigma = 0.3; 548s mu = 0.5; 548s [L, C] = gevlike ([k sigma mu], x); 548s expected_L = 0.65157; 548s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 548s assert (L, expected_L, 0.001); 548s assert (C, inv (expected_C), 0.001); 548s ***** test 548s x = -5:-1; 548s k = -0.2; 548s sigma = 0.3; 548s mu = 0.5; 548s [L, C] = gevlike ([k sigma mu], x); 548s expected_L = 3786.4; 548s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 548s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 548s 8.7297e-05, 1.2034e-05, -0.0019125]; 548s assert (L, expected_L, -0.001); 548s assert (C, expected_C, -0.001); 548s ***** test 548s x = -5:0; 548s k = -0.2; 548s sigma = 0.3; 548s mu = 0.5; 548s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 548s expected_L = 3786.4; 548s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 548s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 548s 8.7297e-05, 1.2034e-05, -0.0019125]; 548s assert (L, expected_L, -0.001); 548s assert (C, expected_C, -0.001); 548s ***** error<gevlike: function called with too few input arguments.> gevlike (3.25) 548s ***** error<gevlike: X must be a vector.> gevlike ([1, 2, 3], ones (2)) 548s ***** error<gevlike: PARAMS must be a three-element vector.> ... 548s gevlike ([1, 2], [1, 3, 5, 7]) 548s ***** error<gevlike: PARAMS must be a three-element vector.> ... 548s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 548s ***** error<gevlike: X and FREQ vectors mismatch.> ... 548s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 548s ***** error<gevlike: FREQ must not contain negative values.> ... 548s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 548s ***** error<gevlike: FREQ must contain integer values.> ... 548s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 548s 11 tests, 11 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/raylfit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/raylfit.m 548s ***** demo 548s ## Sample 3 populations from 3 different Rayleigh distibutions 548s rand ("seed", 2); # for reproducibility 548s r1 = raylrnd (1, 1000, 1); 548s rand ("seed", 2); # for reproducibility 548s r2 = raylrnd (2, 1000, 1); 548s rand ("seed", 3); # for reproducibility 548s r3 = raylrnd (4, 1000, 1); 548s r = [r1, r2, r3]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, [0.5:0.5:10.5], 2); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s set (h(3), "facecolor", "r"); 548s hold on 548s 548s ## Estimate their lambda parameter 548s sigmaA = raylfit (r(:,1)); 548s sigmaB = raylfit (r(:,2)); 548s sigmaC = raylfit (r(:,3)); 548s 548s ## Plot their estimated PDFs 548s x = [0:0.1:10]; 548s y = raylpdf (x, sigmaA); 548s plot (x, y, "-pr"); 548s y = raylpdf (x, sigmaB); 548s plot (x, y, "-sg"); 548s y = raylpdf (x, sigmaC); 548s plot (x, y, "-^c"); 548s xlim ([0, 10]) 548s ylim ([0, 0.7]) 548s legend ({"Normalized HIST of sample 1 with σ=1", ... 548s "Normalized HIST of sample 2 with σ=2", ... 548s "Normalized HIST of sample 3 with σ=4", ... 548s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 548s sigmaA), ... 548s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 548s sigmaB), ... 548s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 548s sigmaC)}) 548s title ("Three population samples from different Rayleigh distibutions") 548s hold off 548s ***** test 548s x = [1 3 2 4 5 4 3 4]; 548s [shat, sci] = raylfit (x); 548s assert (shat, 2.4495, 1e-4) 548s assert (sci, [1.8243; 3.7279], 1e-4) 548s ***** test 548s x = [1 3 2 4 5 4 3 4]; 548s [shat, sci] = raylfit (x, 0.01); 548s assert (shat, 2.4495, 1e-4) 548s assert (sci, [1.6738; 4.3208], 1e-4) 548s ***** test 548s x = [1 2 3 4 5]; 548s f = [1 1 2 3 1]; 548s [shat, sci] = raylfit (x, [], [], f); 548s assert (shat, 2.4495, 1e-4) 548s assert (sci, [1.8243; 3.7279], 1e-4) 548s ***** test 548s x = [1 2 3 4 5]; 548s f = [1 1 2 3 1]; 548s [shat, sci] = raylfit (x, 0.01, [], f); 548s assert (shat, 2.4495, 1e-4) 548s assert (sci, [1.6738; 4.3208], 1e-4) 548s ***** test 548s x = [1 2 3 4 5 6]; 548s c = [0 0 0 0 0 1]; 548s f = [1 1 2 3 1 1]; 548s [shat, sci] = raylfit (x, 0.01, c, f); 548s assert (shat, 2.4495, 1e-4) 548s assert (sci, [1.6738; 4.3208], 1e-4) 548s ***** error<raylfit: X must be a vector.> raylfit (ones (2,5)); 548s ***** error<raylfit: X cannot have negative values.> raylfit ([1 2 -1 3]) 548s ***** error<raylfit: wrong value for ALPHA.> raylfit ([1 2 3], 0) 548s ***** error<raylfit: wrong value for ALPHA.> raylfit ([1 2 3], 1.2) 548s ***** error<raylfit: wrong value for ALPHA.> raylfit ([1 2 3], [0.02 0.05]) 548s ***** error<raylfit: X and CENSOR vectors mismatch.> ... 548s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 548s ***** error<raylfit: X and CENSOR vectors mismatch.> ... 548s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 548s ***** error<raylfit: X and FREQ vectors mismatch.> ... 548s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 548s ***** error<raylfit: X and FREQ vectors mismatch.> ... 548s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 548s ***** error<raylfit: X and FREQ vectors mismatch.> 548s raylfit ([1 2 3], [], [], [1 5]) 548s ***** error<raylfit: FREQ must not contain negative values.> 548s raylfit ([1 2 3], [], [], [1 5 -1]) 548s 16 tests, 16 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/wblfit.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/wblfit.m 548s ***** demo 548s ## Sample 3 populations from 3 different Weibull distibutions 548s rande ("seed", 1); # for reproducibility 548s r1 = wblrnd(2, 4, 2000, 1); 548s rande ("seed", 2); # for reproducibility 548s r2 = wblrnd(5, 2, 2000, 1); 548s rande ("seed", 5); # for reproducibility 548s r3 = wblrnd(1, 5, 2000, 1); 548s r = [r1, r2, r3]; 548s 548s ## Plot them normalized and fix their colors 548s hist (r, 30, [2.5 2.1 3.2]); 548s h = findobj (gca, "Type", "patch"); 548s set (h(1), "facecolor", "c"); 548s set (h(2), "facecolor", "g"); 548s set (h(3), "facecolor", "r"); 548s ylim ([0, 2]); 548s xlim ([0, 10]); 548s hold on 548s 548s ## Estimate their lambda parameter 548s lambda_kA = wblfit (r(:,1)); 548s lambda_kB = wblfit (r(:,2)); 548s lambda_kC = wblfit (r(:,3)); 548s 548s ## Plot their estimated PDFs 548s x = [0:0.1:15]; 548s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 548s plot (x, y, "-pr"); 548s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 548s plot (x, y, "-sg"); 548s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 548s plot (x, y, "-^c"); 548s hold off 548s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 548s "Normalized HIST of sample 2 with λ=5 and k=2", ... 548s "Normalized HIST of sample 3 with λ=1 and k=5", ... 548s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 548s lambda_kA(1), lambda_kA(2)), ... 548s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 548s lambda_kB(1), lambda_kB(2)), ... 548s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 548s lambda_kC(1), lambda_kC(2))}) 548s title ("Three population samples from different Weibull distibutions") 548s hold off 548s ***** test 548s x = 1:50; 548s [paramhat, paramci] = wblfit (x); 548s paramhat_out = [28.3636, 1.7130]; 548s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 548s assert (paramhat, paramhat_out, 1e-4); 548s assert (paramci, paramci_out, 1e-4); 548s ***** test 548s x = 1:50; 548s [paramhat, paramci] = wblfit (x, 0.01); 548s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 548s assert (paramci, paramci_out, 1e-4); 548s ***** error<wblfit: X must be a vector.> wblfit (ones (2,5)); 548s ***** error<wblfit: X must contain only positive values.> wblfit ([-1 2 3 4]); 548s ***** error<wblfit: wrong value for ALPHA.> wblfit ([1, 2, 3, 4, 5], 1.2); 548s ***** error<wblfit: wrong value for ALPHA.> wblfit ([1, 2, 3, 4, 5], 0); 548s ***** error<wblfit: wrong value for ALPHA.> wblfit ([1, 2, 3, 4, 5], "alpha"); 548s ***** error<wblfit: X and CENSOR vectors mismatch.> ... 548s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 548s ***** error<wblfit: X and CENSOR vectors mismatch.> ... 548s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 548s ***** error<wblfit: X and FREQ vectors mismatch.> ... 548s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 548s ***** error<wblfit: FREQ cannot have negative values.> ... 548s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 548s ***** error<wblfit: X and FREQ vectors mismatch.> ... 548s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 548s ***** error<wblfit: 'options' 5th argument must be a structure> ... 548s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 548s 13 tests, 13 passed, 0 known failure, 0 skipped 548s [inst/dist_fit/nbinlike.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fit/nbinlike.m 548s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 548s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 548s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 548s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 548s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 548s ***** error<nbinlike: function called with too few input arguments.> nbinlike (3.25) 548s ***** error<nbinlike: X must be a vector.> nbinlike ([5, 0.2], ones (2)) 548s ***** error<nbinlike: X cannot have negative values.> nbinlike ([5, 0.2], [-1, 3]) 548s ***** error<nbinlike: PARAMS must be a two-element vector.> ... 548s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 548s ***** error<nbinlike: number of successes,> nbinlike ([-5, 0.2], [1:15]) 548s ***** error<nbinlike: number of successes,> nbinlike ([0, 0.2], [1:15]) 548s ***** error<nbinlike: probability of success,> nbinlike ([5, 1.2], [3, 5]) 548s ***** error<nbinlike: probability of success,> nbinlike ([5, -0.2], [3, 5]) 548s ***** error<nbinlike: X and FREQ vectors mismatch.> ... 548s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 548s ***** error<nbinlike: FREQ must not contain negative values.> ... 548s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 548s ***** error<nbinlike: FREQ must contain integer values.> ... 548s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 548s 16 tests, 16 passed, 0 known failure, 0 skipped 548s [inst/cmdscale.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cmdscale.m 548s ***** shared m, n, X, D 548s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 548s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 548s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 548s 2 tests, 2 passed, 0 known failure, 0 skipped 548s [inst/geomean.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/geomean.m 548s ***** test 548s x = [0:10]; 548s y = [x;x+5;x+10]; 548s assert (geomean (x), 0); 548s m = [0 9.462942809849169 14.65658770861967]; 548s assert (geomean (y, 2), m', 4e-14); 548s assert (geomean (y, "all"), 0); 548s y(2,4) = NaN; 548s m(2) = 9.623207231679554; 548s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 548s assert (geomean (y', "omitnan"), m, 4e-14); 548s z = y + 20; 548s assert (geomean (z, "all"), NaN); 548s assert (geomean (z, "all", "includenan"), NaN); 548s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 548s m = [24.79790781765634 NaN 34.85638839503932]; 548s assert (geomean (z'), m, 4e-14); 548s assert (geomean (z', "includenan"), m, 4e-14); 548s m(2) = 30.02181156156319; 548s assert (geomean (z', "omitnan"), m, 4e-14); 548s assert (geomean (z, 2, "omitnan"), m', 4e-14); 548s ***** test 548s x = repmat ([1:20;6:25], [5 2 6 3]); 548s assert (size (geomean (x, [3 2])), [10 1 1 3]); 548s assert (size (geomean (x, [1 2])), [1 1 6 3]); 548s assert (size (geomean (x, [1 2 4])), [1 1 6]); 548s assert (size (geomean (x, [1 4 3])), [1 40]); 548s assert (size (geomean (x, [1 2 3 4])), [1 1]); 548s ***** test 548s x = repmat ([1:20;6:25], [5 2 6 3]); 548s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 548s assert (geomean (x, [3 2]), m, 4e-13); 548s x(2,5,6,3) = NaN; 548s m(2,3) = NaN; 548s assert (geomean (x, [3 2]), m, 4e-13); 548s m(2,3) = 14.3292729579901; 548s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 548s ***** error <geomean: X must contain real nonnegative values.> geomean ("char") 548s ***** error <geomean: X must contain real nonnegative values.> geomean ([1 -1 3]) 548s ***** error <geomean: DIM must be a positive integer scalar or vector.> ... 548s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 548s ***** error <geomean: DIM must be a positive integer scalar or vector.> ... 548s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 548s ***** error <geomean: VECDIM must contain non-repeating positive integers.> ... 548s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 548s 8 tests, 8 passed, 0 known failure, 0 skipped 548s [inst/fitrgam.m] 548s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitrgam.m 548s ***** demo 548s # Train a RegressionGAM Model for synthetic values 548s 548s f1 = @(x) cos (3 *x); 548s f2 = @(x) x .^ 3; 548s 548s # generate x1 and x2 for f1 and f2 548s x1 = 2 * rand (50, 1) - 1; 548s x2 = 2 * rand (50, 1) - 1; 548s 548s # calculate y 548s y = f1(x1) + f2(x2); 548s 548s # add noise 548s y = y + y .* 0.2 .* rand (50,1); 548s X = [x1, x2]; 548s 548s # create an object 548s a = fitrgam (X, y, "tol", 1e-3) 548s ***** test 548s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 548s y = [1; 2; 3; 4]; 548s a = fitrgam (x, y); 548s assert ({a.X, a.Y}, {x, y}) 548s assert ({a.BaseModel.Intercept}, {2.5000}) 548s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 548s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 548s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 548s assert ({a.Formula}, {[]}) 549s ***** test 549s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 549s y = [1; 2; 3; 4]; 549s pnames = {"A", "B", "C", "D"}; 549s formula = "Y ~ A + B + C + D + A:C"; 549s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 549s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 549s assert ({a.IntMatrix}, {intMat}) 549s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 549s assert ({a.Formula}, {formula}) 549s ***** error<fitrgam: too few arguments.> fitrgam () 549s ***** error<fitrgam: too few arguments.> fitrgam (ones(10,2)) 549s ***** error<fitrgam: Name-Value arguments must be in pairs.> 549s fitrgam (ones (4,2), ones (4, 1), "K") 549s ***** error<fitrgam: number of rows in X and Y must be equal.> 549s fitrgam (ones (4,2), ones (3, 1)) 549s ***** error<fitrgam: number of rows in X and Y must be equal.> 549s fitrgam (ones (4,2), ones (3, 1), "K", 2) 549s 7 tests, 7 passed, 0 known failure, 0 skipped 549s [inst/evalclusters.m] 549s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/evalclusters.m 549s ***** demo 549s load fisheriris; 549s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 549s plot (eva) 549s ***** error evalclusters () 549s ***** error evalclusters ([1 1;0 1]) 549s ***** error evalclusters ([1 1;0 1], "kmeans") 549s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 549s ***** error <unknown clustering*> evalclusters ([1 1;0 1], "xxx", "gap") 549s ***** error <invalid matrix*> evalclusters ([1 1;0 1], [1 2], "gap") 549s ***** error <invalid argument*> evalclusters ([1 1;0 1], 1.2, "gap") 549s ***** error <invalid criterion*> evalclusters ([1 1;0 1], [1; 2], 123) 549s ***** error <unknown criterion*> evalclusters ([1 1;0 1], [1; 2], "xxx") 549s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 549s ***** error <invalid parameter*> evalclusters ([1 1;0 1], [1; 2], "gap", 1) 549s ***** error <invalid property*> evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 549s ***** error <unknown property*> evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 549s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 549s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 549s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 549s ***** error <unknown distance*> evalclusters ([1 1;0 1], [1; 2], "gap", ... 549s "distance", "a") 549s ***** error <distance metric*> evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 549s "distance", "a") 549s ***** error <cluster prior*> evalclusters ([1 1;0 1], [1; 2], "gap", ... 549s "clusterpriors", "equal") 549s ***** error <invalid cluster prior*> evalclusters ([1 1;0 1], [1; 2], ... 549s "silhouette", "clusterpriors", "xxx") 549s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 549s ***** test 549s load fisheriris; 549s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 549s assert (isa (eva, "CalinskiHarabaszEvaluation")); 549s assert (eva.NumObservations, 150); 549s assert (eva.OptimalK, 3); 549s assert (eva.InspectedK, [1 2 3 4 5 6]); 549s 22 tests, 22 passed, 0 known failure, 0 skipped 549s [inst/x2fx.m] 549s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/x2fx.m 549s ***** test 549s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 549s D = x2fx(X,'quadratic'); 549s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 549s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 549s ***** test 549s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 549s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 549s D = x2fx(X,model); 549s assert (D(1,:) , [1, 1, 10, 10, 1]); 549s assert (D(2,:) , [1, 2, 20, 40, 4]); 549s assert (D(4,:) , [1, 4, 20, 80, 16]); 549s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 549s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 549s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 549s 5 tests, 5 passed, 0 known failure, 0 skipped 549s [inst/grp2idx.m] 549s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/grp2idx.m 549s ***** test 549s in = [true false false true]; 549s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 549s assert (nthargout (1:3, @grp2idx, in), out) 549s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 549s ***** test 549s assert (nthargout (1:3, @grp2idx, [false, true]), 549s {[1; 2] {"0"; "1"} [false; true]}); 549s assert (nthargout (1:3, @grp2idx, [true, false]), 549s {[1; 2] {"1"; "0"} [true; false]}); 550s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 550s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 550s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 550s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 550s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 550s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 550s [1; -3; -2; 2; -1; 3]}); 550s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 550s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 550s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 550s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 550s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 550s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 550s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 550s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 550s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 550s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 550s 10 tests, 10 passed, 0 known failure, 0 skipped 550s [inst/canoncorr.m] 550s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/canoncorr.m 550s ***** shared X,Y,A,B,r,U,V,k 550s k = 10; 550s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 550s [A,B,r,U,V,stats] = canoncorr (X,Y); 550s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 550s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 550s ***** assert (r, [0.99590 0.26754], 1E-5); 550s ***** assert (U, center(X) * A, 10*eps); 550s ***** assert (V, center(Y) * B, 10*eps); 550s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 550s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 550s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 550s ***** assert (r, ones(1, 5), 10*eps); 550s 8 tests, 8 passed, 0 known failure, 0 skipped 550s [inst/ecdf.m] 550s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ecdf.m 550s ***** demo 550s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 550s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 550s t = min (y, d); ## we observe the minimum of these times 550s censored = (y > d); ## we also observe whether the subject failed 550s 550s ## Calculate and plot the empirical cdf and confidence bounds 550s [f, x, flo, fup] = ecdf (t, "censoring", censored); 550s stairs (x, f); 550s hold on; 550s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 550s 550s ## Superimpose a plot of the known true cdf 550s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 550s hold off; 550s ***** demo 550s R = wblrnd (100, 2, 100, 1); 550s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 550s hold on 550s x = 1:1:250; 550s wblsurv = 1 - cdf ("weibull", x, 100, 2); 550s plot (x, wblsurv, "g-", "LineWidth", 2) 550s legend ("Empirical survivor function", "Lower confidence bound", ... 550s "Upper confidence bound", "Weibull survivor function", ... 550s "Location", "northeast"); 550s hold off 550s ***** error ecdf (); 550s ***** error ecdf (randi (15,2)); 550s ***** error ecdf ([3,2,4,3+2i,5]); 550s ***** error kstest ([2,3,4,5,6],"tail"); 550s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 550s ***** error kstest ([2,3,4,5,6],"function", ""); 550s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 550s ***** error kstest ([2,3,4,5,6],"tail", 0); 550s ***** error kstest ([2,3,4,5,6],"alpha", 0); 550s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 550s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 550s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 550s ***** test 550s hf = figure ("visible", "off"); 550s unwind_protect 550s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 550s [F, x, Flo, Fup] = ecdf (x); 550s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 550s assert (F, F_out, ones (10,1) * 1e-4); 550s x_out = [0 0 2 3 4 5 6 7 8 9]'; 550s assert (x, x_out); 550s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 550s assert (Flo, Flo_out, ones (10,1) * 1e-4); 550s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 550s assert (Fup, Fup_out, ones (10,1) * 1e-4); 550s unwind_protect_cleanup 550s close (hf); 550s end_unwind_protect 550s ***** test 550s hf = figure ("visible", "off"); 550s unwind_protect 550s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 550s ecdf (x); 550s unwind_protect_cleanup 550s close (hf); 550s end_unwind_protect 550s 14 tests, 14 passed, 0 known failure, 0 skipped 550s [inst/fillmissing.m] 550s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fillmissing.m 550s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 550s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 550s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 550s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 550s ***** test 550s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 550s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 550s assert (fillmissing (x, "constant", 99), y); 550s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 550s assert (fillmissing (x, "constant", [94:99]), y); 550s assert (fillmissing (x, "constant", [94:99]'), y); 550s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 550s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 550s assert (fillmissing (x, "constant", [94:99], 1), y); 550s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 550s assert (fillmissing (x, "constant", [96:99], 2), y); 550s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 550s assert (fillmissing (x, "constant", [94:99], 3), y); 550s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 550s assert (fillmissing (x, "constant", [88:99], 99), y); 550s ***** test 550s x = reshape ([1:24], 4, 3, 2); 550s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s y = x; 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 550s assert (fillmissing (x, "constant", [94:99], 1), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 550s assert (fillmissing (x, "constant", [92:99], 2), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 550s assert (fillmissing (x, "constant", [88:99], 3), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 550s assert (fillmissing (x, "constant", [76:99], 99), y); 550s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 550s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 550s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 550s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 550s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 550s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 550s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 550s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 550s ***** test 550s x = reshape ([1:24], 3, 4, 2); 550s y = x; 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 550s y([8]) = 99; 550s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 550s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 550s y = x; 550s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 550s y([6, 18, 20, 21]) = 99; 550s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 550s y(y == 99) = 88; 550s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 550s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 550s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 550s y([8]) = 94; 550s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 550s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 550s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 550s y = x; 550s y(isnan (y)) = 88; 550s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 550s y = x; 550s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 550s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 550s y = x; 550s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 550s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 550s y = x; 550s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 550s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 550s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 550s ***** test 550s x = reshape ([1:24],4,3,2); 550s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s y = x; 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 550s assert (fillmissing (x, "constant", [94:99], 1), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 550s assert (fillmissing (x, "constant", [92:99], 2), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 550s assert (fillmissing (x, "constant", [88:99], 3), y); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 550s assert (fillmissing (x, "constant", [76:99], 99), y); 550s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 550s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 550s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 550s ***** test 550s x = reshape ([1:24], 4, 3, 2); 550s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s y = x; 550s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 550s assert (fillmissing (x, "next", 1), y); 550s y = x; 550s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 550s assert (fillmissing (x, "next", 2), y); 550s y = x; 550s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 550s assert (fillmissing (x, "next", 3), y); 550s assert (fillmissing (x, "next", 99), x); 550s y = x; 550s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 550s assert (fillmissing (x, "previous", 1), y); 550s y = x; 550s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 550s assert (fillmissing (x, "previous", 2), y); 550s y = x; 550s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 550s assert (fillmissing (x, "previous", 3), y); 550s assert (fillmissing (x, "previous", 99), x); 550s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 550s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 550s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 550s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 550s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 550s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 550s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 550s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 550s ***** test 550s x = reshape ([1:24], 3, 4, 2); 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y = x; 550s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 550s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 550s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 550s y = x; 550s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 550s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 550s y = x; 550s y([16, 19, 21]) = [4, 7, 9]; 550s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 550s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 550s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 550s y = x; 550s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 550s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 550s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 550s y = x; 550s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 550s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 550s y = x; 550s y([2, 5]) = [14, 17]; 550s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 550s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 550s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 550s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 550s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 550s ***** test 550s x = reshape ([1:24], 4, 3, 2); 550s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s y = x; 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 550s assert (fillmissing (x, "nearest", 1), y); 550s y = x; 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 550s assert (fillmissing (x, "nearest", 2), y); 550s y = x; 550s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 550s assert (fillmissing (x, "nearest", 3), y); 550s assert (fillmissing (x, "nearest", 99), x); 550s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 550s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 550s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 550s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 550s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 550s ***** test 550s x = reshape ([1:24], 3, 4, 2); 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y = x; 550s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 550s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 550s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 550s y = x; 550s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 550s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 550s y = x; 550s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 550s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 550s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 550s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 550s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 550s ***** test 550s x = reshape ([1:24], 4, 3, 2); 550s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 550s y = reshape ([1:24], 4, 3, 2); 550s y([1, 9, 14, 19, 22, 23]) = NaN; 550s assert (fillmissing (x, "linear", 2), y); 550s y = reshape ([1:24], 4, 3, 2); 550s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 550s assert (fillmissing (x, "linear", 3), y); 550s assert (fillmissing (x, "linear", 99), x); 550s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 550s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 550s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 550s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 550s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 550s ***** test 550s x = reshape ([1:24], 3, 4, 2); 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y = x; 550s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 550s y(8) = 8; 550s assert (fillmissing (x, "linear", "endvalues", 0), y); 550s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 550s y = x; 550s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 550s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 550s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 550s y = x; 550s y(isnan(y)) = 0; 550s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 550s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 550s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 550s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 550s ***** test 550s x = reshape ([1:24], 3, 4, 2); 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y = x; 550s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 550s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 550s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 550s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 550s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 550s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 550s ***** test <60965> 550s x = reshape ([1:24], 3, 4, 2); 550s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 550s y = x; 550s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 550s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 550s !!!!! known bug: https://octave.org/testfailure/?60965 550s interp1: invalid METHOD 'makima' 550s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 550s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 550s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 550s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 550s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 550s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 550s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 550s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 550s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 550s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 550s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 550s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 550s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 550s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 551s ***** 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]) 551s ***** test 551s x = reshape ([1:24], 3, 4, 2); 551s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 551s y = x; 551s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 551s assert (fillmissing (x, "movmean", 3), y); 551s assert (fillmissing (x, "movmean", [1, 1]), y); 551s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 551s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 551s y = x; 551s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 551s assert (fillmissing (x, "movmean", 3, 2), y); 551s assert (fillmissing (x, "movmean", [1, 1], 2), y); 551s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 551s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 551s y([1, 18]) = NaN; 551s y(6) = 9; 551s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 551s y = x; 551s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 551s y(8) = 8; 551s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 551s y = x; 551s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 551s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 551s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 551s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 551s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 551s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 551s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 551s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 551s ***** 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]) 551s ***** test 551s x = reshape ([1:24], 3, 4, 2); 551s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 551s y = x; 551s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 551s assert (fillmissing (x, "movmedian", 3), y); 551s assert (fillmissing (x, "movmedian", [1, 1]), y); 551s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 551s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 551s y = x; 551s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 551s assert (fillmissing (x, "movmedian", 3, 2), y); 551s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 551s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 551s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 551s y([1,18]) = NaN; 551s y(6) = 9; 551s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 551s y = x; 551s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 551s y(8) = 8; 551s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 551s y = x; 551s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 551s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 551s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 551s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 551s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 551s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 551s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 551s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 551s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 551s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 551s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 551s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 551s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 551s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 551s ***** function A = testfcn (x, y, z) 551s if (isempty (y)) 551s A = z; 551s elseif (numel (y) == 1) 551s A = repelem (x(1), numel(z)); 551s else 551s A = interp1 (y, x, z, "linear", "extrap"); 551s endif 551s ***** endfunction 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 551s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 551s ***** 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] 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 551s ***** 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]' 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 551s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 551s ***** 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) 551s ***** 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] 551s ***** test 551s ***** function A = testfcn (x, y, z) 551s if (isempty (y)) 551s A = z; 551s elseif (numel (y) == 1) 551s A = repelem (x(1), numel(z)); 551s else 551s A = interp1 (y, x, z, "linear", "extrap"); 551s endif 551s ***** endfunction 551s x = reshape ([1:24], 3, 4, 2); 551s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 551s y = x; 551s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 551s assert (fillmissing (x, @testfcn, 3), y); 551s assert (fillmissing (x, @testfcn, [1, 1]), y); 551s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 551s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 551s y= x; 551s y(isnan (x)) = 99; 551s y(8) = 8; 551s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 551s y = x; 551s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 551s assert (fillmissing (x, @testfcn, 3, 2), y); 551s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 551s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 551s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 551s y(1) = NaN; 551s y([6, 18, 21]) = [9, 24, 24]; 551s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 551s y = x; 551s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 551s y(8) = 8; 551s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 551s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 551s y(8) = 99; 551s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 551s y([6, 18, 20, 21]) = 99; 551s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 551s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 551s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 551s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 551s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 551s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 551s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 551s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 551s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 551s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 551s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 551s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 551s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 551s ***** 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]) 551s ***** test 551s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 551s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 551s y = x; 551s y([4, 7, 12]) = 0; 551s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 551s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 551s y = x; 551s y([5, 7, 12]) = 0; 551s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 551s y = x; 551s y([4, 5, 7]) = 0; 551s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 551s ***** test 551s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 551s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 551s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 551s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 551s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 551s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 551s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 551s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 551s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 551s ***** test 551s x = [NaN, 2, 3]; 551s [~, idx] = fillmissing (x, "previous"); 551s assert (idx, logical ([0, 0, 0])); 551s [~, idx] = fillmissing (x, "movmean", 1); 551s assert (idx, logical ([0, 0, 0])); 551s x = [1:3; 4:6; 7:9]; 551s x([2, 4, 7, 9]) = NaN; 551s [~, idx] = fillmissing (x, "linear"); 551s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 551s [~, idx] = fillmissing (x, "movmean", 2); 551s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 551s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 551s assert (A, [1, 2, 3, 3, NaN]); 551s assert (idx, logical ([0, 0, 0, 1, 0])); 551s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 551s assert (A, [1, 2, 3, 3, NaN]); 551s assert (idx, logical ([0, 0, 0, 1, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 551s assert (A, [1, 2, 3, 3, NaN]); 551s assert (idx, logical ([0, 0, 0, 1, 0])); 551s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 551s assert (A, [1, 2, 1, 4, 1]); 551s assert (idx, logical ([0, 1, 0, 1, 0])); 551s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 551s assert (A, [1, NaN, 1, NaN, 1]); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 551s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 551s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 551s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 551s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 551s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 551s ***** test 551s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 551s assert (idx, logical ([0, 1, 1, 1, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 551s assert (A, [1, 2, 2, NaN, NaN]); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 551s assert (A, [1, 1, 1, 1, 1]); 551s assert (idx, logical ([0, 1, 0, 1, 1])); 551s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 551s assert (A, [1, NaN, 1, NaN, NaN]); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s ***** test 551s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 551s assert (A, [1, 3, 5]); 551s assert (idx, logical ([0, 1, 0])); 551s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 551s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 551s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 551s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 551s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 551s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 551s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 551s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 551s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 551s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 551s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 551s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 551s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 551s ***** test 551s [A, idx] = fillmissing (" a b c", "constant", " "); 551s assert (A, " a b c"); 551s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 551s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 551s assert (A, {"foo", "", "bar", ""}); 551s assert (idx, logical ([0, 0, 0, 0])); 551s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 551s assert (A, {"foo", "", "bar", ""}); 551s assert (idx, logical ([0, 0, 0, 0])); 551s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 551s assert (A, "afaoaoa"); 551s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 551s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 551s assert (A, " f o o "); 551s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 551s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 551s assert (A, {"a", "foo", "a"}); 551s assert (idx, logical ([1, 0, 1])); 551s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 551s assert (A, {"", "foo", ""}); 551s assert (idx, logical ([0, 0, 0])); 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 551s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 551s ***** 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])) 551s ***** 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])) 551s ***** test 551s x = logical ([1, 0, 1, 0, 1]); 551s [~, idx] = fillmissing (x, "constant", true); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([0, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 0])); 551s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 551s assert (idx, logical ([0, 0, 0, 0, 0])) 551s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])) 551s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([0, 0, 1, 0, 1])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 551s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 551s ***** 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])) 551s ***** 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])) 551s ***** test 551s x = int32 ([1, 2, 3, 4, 5]); 551s [~, idx] = fillmissing (x, "constant", 0); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 551s assert (idx, logical ([0, 0, 1, 0, 0])); 551s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([0, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 0])); 551s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 551s assert (idx, logical ([0, 0, 0, 0, 0])); 551s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([1, 0, 1, 0, 1])); 551s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 551s assert (idx, logical ([0, 0, 1, 0, 1])); 551s ***** test 551s [A, idx] = fillmissing ([struct, struct], "constant", 1); 551s assert (A, [struct, struct]) 551s assert (idx, [false, false]) 551s ***** error <Invalid call> fillmissing () 551s ***** error <Invalid call> fillmissing (1) 552s ***** error <Invalid call> fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 552s ***** error <second input must be a> fillmissing (1, 2) 552s ***** error <unknown fill method 'foo'> fillmissing (1, "foo") 552s ***** error <fill function must accept at least> fillmissing (1, @(x) x, 1) 552s ***** error <fill function must accept at least> fillmissing (1, @(x,y) x+y, 1) 552s ***** error <interpolation methods only valid for numeric> fillmissing ("a b c", "linear") 552s ***** error <interpolation methods only valid for numeric> fillmissing ({"a", "b"}, "linear") 552s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 552s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 552s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 552s ***** error <a numeric fill value cannot be emtpy> fillmissing (1, "constant", []) 552s ***** error <fill value must be the same data type> fillmissing (1, "constant", "a") 552s ***** error <fill value must be the same data type> fillmissing ("a", "constant", 1) 552s ***** error <fill value must be the same data type> fillmissing ("a", "constant", {"foo"}) 552s ***** error <fill value must be the same data type> fillmissing ({"foo"}, "constant", 1) 552s ***** error <moving window method must be followed by> fillmissing (1, "movmean") 552s ***** error <moving window method must be followed by> fillmissing (1, "movmedian") 552s ***** error <DIM must be a positive scalar> fillmissing (1, "constant", 1, 0) 552s ***** error <DIM must be a positive scalar> fillmissing (1, "constant", 1, -1) 552s ***** error <DIM must be a positive scalar> fillmissing (1, "constant", 1, [1, 2]) 552s ***** error <properties must be given as> fillmissing (1, "constant", 1, "samplepoints") 552s ***** error <properties must be given as> fillmissing (1, "constant", 1, "foo") 552s ***** error <properties must be given as> fillmissing (1, "constant", 1, 1, "foo") 552s ***** error <invalid parameter name specified> fillmissing (1, "constant", 1, 2, {1}, 4) 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 552s ***** error <SamplePoints must be a> fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 552s ***** error <EndValues method 'constant' only valid> fillmissing ("foo", "next", "endvalues", 1) 552s ***** error <invalid EndValues method 'foo'> fillmissing (1, "constant", 1, 1, "endvalues", "foo") 552s ***** error <EndValues must be a scalar or a 1 element array> fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 552s ***** error <EndValues must be a scalar or a 3 element array> fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 552s ***** error <EndValues must be a scalar or a 12 element array> fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 552s ***** error <EndValues must be numeric or a> fillmissing (1, "constant", 1, 1, "endvalues", {1}) 552s ***** error <invalid parameter name 'foo'> fillmissing (1, "constant", 1, 2, "foo", 4) 552s ***** error <MissingLocations option is not compatible with> fillmissing (struct, "constant", 1, "missinglocations", false) 552s ***** error <MissingLocations and MaxGap options> fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 552s ***** error <MissingLocations and MaxGap options> fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 552s ***** error <the 'replacevalues' option has not> fillmissing (1, "constant", 1, "replacevalues", true) 552s ***** error <the 'datavariables' option has not> fillmissing (1, "constant", 1, "datavariables", "Varname") 552s ***** error <MissingLocations must be a> fillmissing (1, "constant", 1, 2, "missinglocations", 1) 552s ***** error <MissingLocations must be a> fillmissing (1, "constant", 1, 2, "missinglocations", "a") 552s ***** error <MissingLocations must be a> fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 552s ***** error <MissingLocations cannot be used with method> fillmissing (true, "linear", "missinglocations", true) 552s ***** error <MissingLocations cannot be used with method> fillmissing (int8 (1), "linear", "missinglocations", true) 552s ***** error <MissingLocations cannot be used with EndValues method> fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 552s ***** error <MissingLocations cannot be used with EndValues method> fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 552s ***** error <MissingLocations cannot be used with EndValues method> fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 552s ***** error <MissingLocations cannot be used with EndValues method> fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 552s ***** error <MaxGap must be a positive numeric scalar> fillmissing (1, "constant", 1, 2, "maxgap", true) 552s ***** error <MaxGap must be a positive numeric scalar> fillmissing (1, "constant", 1, 2, "maxgap", "a") 552s ***** error <MaxGap must be a positive numeric scalar> fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 552s ***** error <MaxGap must be a positive numeric scalar> fillmissing (1, "constant", 1, 2, "maxgap", 0) 552s ***** error <MaxGap must be a positive numeric scalar> fillmissing (1, "constant", 1, 2, "maxgap", -1) 552s ***** error <fill value 'V' must be a scalar or a 1> fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 552s ***** error <fill value 'V' must be a scalar or a 1> fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 552s ***** error <fill value 'V' must be a scalar or a 1> fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 552s ***** error <fill value 'V' must be a scalar or a 1> fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 552s ***** error <fill value 'V' must be a scalar or a 6> fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 552s ***** error <fill value 'V' must be a scalar or a 8> fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 552s ***** error <fill value 'V' must be a scalar or a 12> fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 552s ***** error <fill function handle must be followed by> fillmissing (1, @(x,y,z) x+y+z) 552s ***** error <fill function return values must be the same size> fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 552s 380 tests, 379 passed, 0 known failure, 1 skipped 552s [inst/silhouette.m] 552s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/silhouette.m 552s ***** demo 552s load fisheriris; 552s X = meas(:,3:4); 552s cidcs = kmeans (X, 3, "Replicates", 5); 552s silhouette (X, cidcs); 552s y_labels(cidcs([1 51 101])) = unique (species); 552s set (gca, "yticklabel", y_labels); 552s title ("Fisher's iris data"); 552s ***** error silhouette (); 552s ***** error silhouette ([1 2; 1 1]); 552s ***** error <X .* doesn't match .* clust> silhouette ([1 2; 1 1], [1 2 3]'); 552s ***** error <invalid metric> silhouette ([1 2; 1 1], [1 2]', "xxx"); 552s 4 tests, 4 passed, 0 known failure, 0 skipped 552s [inst/fishertest.m] 552s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fishertest.m 552s ***** demo 552s ## A Fisher's exact test example 552s 552s x = [3, 1; 1, 3] 552s [h, p, stats] = fishertest(x) 552s ***** assert (fishertest ([3, 4; 5, 7]), false); 552s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 552s ***** test 552s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 552s assert (pval, 1, 1e-14); 552s assert (stats.OddsRatio, 1.05); 552s CI = [0.159222057151289, 6.92429189601808]; 552s assert (stats.ConfidenceInterval, CI, 1e-14) 552s ***** test 552s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 552s assert (pval, 0.08080808080808080, 1e-14); 552s assert (stats.OddsRatio, 0); 552s assert (stats.ConfidenceInterval, [-Inf, Inf]) 552s ***** error fishertest (); 552s ***** error fishertest (1, 2, 3, 4, 5, 6); 552s ***** error<fishertest: X must be a 2-dimensional matrix.> ... 552s fishertest (ones (2, 2, 2)); 552s ***** error<fishertest: X must contain only non-negative real integers.> ... 552s fishertest ([1, 2; -3, 4]); 552s ***** error<fishertest: X must contain only non-negative real integers.> ... 552s fishertest ([1, 2; 3, 4+i]); 552s ***** error<fishertest: X must contain only non-negative real integers.> ... 552s fishertest ([1, 2; 3, 4.2]); 552s ***** error<fishertest: X must contain only non-negative real integers.> ... 552s fishertest ([NaN, 2; 3, 4]); 552s ***** error<fishertest: X must contain only non-negative real integers.> ... 552s fishertest ([1, Inf; 3, 4]); 552s ***** error<fishertest: cannot handle large entries> ... 552s fishertest (ones (2) * 1e8); 552s ***** error<fishertest: invalid value for alpha.> ... 552s fishertest ([1, 2; 3, 4], "alpha", 0); 552s ***** error<fishertest: invalid value for alpha.> ... 552s fishertest ([1, 2; 3, 4], "alpha", 1.2); 552s ***** error<fishertest: invalid value for alpha.> ... 552s fishertest ([1, 2; 3, 4], "alpha", "val"); 552s ***** error<fishertest: invalid value for tail.> ... 552s fishertest ([1, 2; 3, 4], "tail", "val"); 552s ***** error<fishertest: invalid value for tail.> ... 552s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 552s ***** error<fishertest: invalid name for optional arguments.> ... 552s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 552s 19 tests, 19 passed, 0 known failure, 0 skipped 552s [inst/ttest2.m] 552s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ttest2.m 552s ***** test 552s a = 1:5; 552s b = 6:10; 552s b(5) = NaN; 552s [h,p,ci,stats] = ttest2 (a,b); 552s assert (h, 1); 552s assert (p, 0.002535996080258229, 1e-14); 552s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 552s assert (stats.tstat, -4.582575694955839, 1e-14); 552s assert (stats.df, 7); 552s assert (stats.sd, 1.4638501094228, 1e-13); 552s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 552s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 552s 3 tests, 3 passed, 0 known failure, 0 skipped 552s [inst/normplot.m] 552s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/normplot.m 552s ***** demo 552s h = normplot([1:20]); 552s ***** demo 552s h = normplot([1:20;5:2:44]'); 552s ***** demo 552s ax = newplot(); 552s h = normplot(ax, [1:20]); 552s ax = gca; 552s h = normplot(ax, [-10:10]); 552s set (ax, "xlim", [-11, 21]); 552s ***** error normplot (); 552s ***** error normplot (23); 552s ***** error normplot (23, [1:20]); 552s ***** error normplot (ones(3,4,5)); 552s ***** test 552s hf = figure ("visible", "off"); 552s unwind_protect 552s ax = newplot (hf); 552s h = normplot (ax, [1:20]); 552s ax = gca; 552s h = normplot(ax, [-10:10]); 552s set (ax, "xlim", [-11, 21]); 552s unwind_protect_cleanup 552s close (hf); 552s end_unwind_protect 552s ***** test 552s hf = figure ("visible", "off"); 552s unwind_protect 552s h = normplot([1:20;5:2:44]'); 552s unwind_protect_cleanup 552s close (hf); 552s end_unwind_protect 553s 6 tests, 6 passed, 0 known failure, 0 skipped 553s [inst/multcompare.m] 553s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/multcompare.m 553s ***** demo 553s 553s ## Demonstration using balanced one-way ANOVA from anova1 553s 553s x = ones (50, 4) .* [-2, 0, 1, 5]; 553s randn ("seed", 1); # for reproducibility 553s x = x + normrnd (0, 2, 50, 4); 553s groups = {"A", "B", "C", "D"}; 553s [p, tbl, stats] = anova1 (x, groups, "off"); 553s multcompare (stats); 553s ***** demo 553s 553s ## Demonstration using unbalanced one-way ANOVA example from anovan 553s 553s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 553s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 553s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 553s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 553s 25.694 ]'; 553s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 553s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 553s 553s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 553s "ControlGroup", 1, "display", "on") 553s 553s ***** demo 553s 553s ## Demonstration using factorial ANCOVA example from anovan 553s 553s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 553s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 553s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 553s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 553s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 553s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 553s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 553s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 553s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 553s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 553s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 553s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 553s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 553s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 553s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 553s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 553s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 553s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 553s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 553s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 553s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 553s 553s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 553s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 553s "sstype", "h", "display", "off", "contrasts", ... 553s {"simple","poly",""}); 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 553s "display", "on") 553s 553s ***** demo 553s 553s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 553s ## squares to account for heteroskedasticity. 553s 553s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 553s 2, 2, 2, 2, 2, 2, 2, 2, ... 553s 3, 3, 3, 3, 3, 3, 3, 3]'; 553s 553s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 553s 10, 25, 66, 43, 47, 56, 6, 39, ... 553s 11, 39, 26, 35, 25, 14, 24, 17]'; 553s 553s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 553s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 553s b = polyfit (fitted, abs (STATS.resid), 1); 553s v = polyval (b, fitted); # Variance as a function of the fitted values 553s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 553s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 553s ***** demo 553s 553s ## Demonstration of p-value adjustments to control the false discovery rate 553s ## Data from Westfall (1997) JASA. 92(437):299-306 553s 553s p = [.005708; .023544; .024193; .044895; ... 553s .048805; .221227; .395867; .693051; .775755]; 553s 553s padj = multcompare(p,'ctype','fdr') 553s ***** test 553s 553s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 553s 553s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 553s 553s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 553s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 553s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 553s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 553s 25.694 ]'; 553s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 553s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 553s 553s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 553s "display", "off"); 553s assert (C(1,6), 2.85812420217898e-05, 1e-09); 553s assert (C(2,6), 5.22936741204085e-07, 1e-09); 553s assert (C(3,6), 2.12794763209146e-08, 1e-09); 553s assert (C(4,6), 7.82091664406946e-15, 1e-09); 553s assert (C(5,6), 0.546591417210693, 1e-09); 553s assert (C(6,6), 0.0845897945254446, 1e-09); 553s assert (C(7,6), 9.47436557975328e-08, 1e-09); 553s assert (C(8,6), 0.188873478781067, 1e-09); 553s assert (C(9,6), 4.08974010364197e-08, 1e-09); 553s assert (C(10,6), 4.44427348175241e-06, 1e-09); 553s assert (M(1,1), 10, 1e-09); 553s assert (M(2,1), 18, 1e-09); 553s assert (M(3,1), 19, 1e-09); 553s assert (M(4,1), 21.0001428571429, 1e-09); 553s assert (M(5,1), 29.0001111111111, 1e-09); 553s assert (M(1,2), 1.0177537954095, 1e-09); 553s assert (M(2,2), 1.28736803631001, 1e-09); 553s assert (M(3,2), 1.0177537954095, 1e-09); 553s assert (M(4,2), 1.0880245732889, 1e-09); 553s assert (M(5,2), 0.959547480416536, 1e-09); 553s 553s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 553s "display", "off"); 553s assert (C(1,6), 4.08303457454140e-05, 1e-09); 553s assert (C(2,6), 1.04587348240817e-06, 1e-09); 553s assert (C(3,6), 1.06397381604573e-07, 1e-09); 553s assert (C(4,6), 7.82091664406946e-14, 1e-09); 553s assert (C(5,6), 5.46591417210693e-01, 1e-09); 553s assert (C(6,6), 1.05737243156806e-01, 1e-09); 553s assert (C(7,6), 2.36859139493832e-07, 1e-09); 553s assert (C(8,6), 2.09859420867852e-01, 1e-09); 553s assert (C(9,6), 1.36324670121399e-07, 1e-09); 553s assert (C(10,6), 7.40712246958735e-06, 1e-09); 553s 553s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 553s "display", "off"); 553s assert (C(1,6), 1.14324968087159e-04, 1e-09); 553s assert (C(2,6), 3.13762044722451e-06, 1e-09); 553s assert (C(3,6), 1.91515286888231e-07, 1e-09); 553s assert (C(4,6), 7.82091664406946e-14, 1e-09); 553s assert (C(5,6), 5.46591417210693e-01, 1e-09); 553s assert (C(6,6), 2.53769383576334e-01, 1e-09); 553s assert (C(7,6), 6.63205590582730e-07, 1e-09); 553s assert (C(8,6), 3.77746957562134e-01, 1e-09); 553s assert (C(9,6), 3.27179208291358e-07, 1e-09); 553s assert (C(10,6), 2.22213674087620e-05, 1e-09); 553s 553s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 553s "display", "off"); 553s assert (C(1,6), 1.14324968087159e-04, 1e-09); 553s assert (C(2,6), 3.13762044722451e-06, 1e-09); 553s assert (C(3,6), 1.91515286888231e-07, 1e-09); 553s assert (C(4,6), 7.82091664406946e-14, 1e-09); 553s assert (C(5,6), 5.46591417210693e-01, 1e-09); 553s assert (C(6,6), 2.53769383576334e-01, 1e-09); 553s assert (C(7,6), 6.63205590582730e-07, 1e-09); 553s assert (C(8,6), 3.77746957562134e-01, 1e-09); 553s assert (C(9,6), 3.27179208291358e-07, 1e-09); 553s assert (C(10,6), 2.22213674087620e-05, 1e-09); 553s 553s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 553s "display", "off"); 553s assert (C(1,6), 0.00108105386141085, 1e-09); 553s assert (C(2,6), 2.7779386789517e-05, 1e-09); 553s assert (C(3,6), 1.3599854038198e-06, 1e-09); 553s assert (C(4,6), 7.58830197867751e-13, 1e-09); 553s assert (C(5,6), 0.984039948220281, 1e-09); 553s assert (C(6,6), 0.539077018557706, 1e-09); 553s assert (C(7,6), 5.59475764460574e-06, 1e-09); 553s assert (C(8,6), 0.771173490574105, 1e-09); 553s assert (C(9,6), 2.52838425729905e-06, 1e-09); 553s assert (C(10,6), 0.000200719143889168, 1e-09); 553s 553s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 553s 553s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 553s "display", "off"); 553s assert (C(1,6), 2.85812420217898e-04, 1e-09); 553s assert (C(2,6), 5.22936741204085e-06, 1e-09); 553s assert (C(3,6), 2.12794763209146e-07, 1e-09); 553s assert (C(4,6), 7.82091664406946e-14, 1e-09); 553s assert (C(5,6), 1.00000000000000e+00, 1e-09); 553s assert (C(6,6), 8.45897945254446e-01, 1e-09); 553s assert (C(7,6), 9.47436557975328e-07, 1e-09); 553s assert (C(8,6), 1.00000000000000e+00, 1e-09); 553s assert (C(9,6), 4.08974010364197e-07, 1e-09); 553s assert (C(10,6), 4.44427348175241e-05, 1e-09); 553s 553s ## Test for anova1 ("equal")- comparison of results from Matlab 553s 553s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 553s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 2.85812420217898e-05, 1e-09); 553s assert (C(2,6), 5.22936741204085e-07, 1e-09); 553s assert (C(3,6), 2.12794763209146e-08, 1e-09); 553s assert (C(4,6), 7.82091664406946e-15, 1e-09); 553s assert (C(5,6), 0.546591417210693, 1e-09); 553s assert (C(6,6), 0.0845897945254446, 1e-09); 553s assert (C(7,6), 9.47436557975328e-08, 1e-09); 553s assert (C(8,6), 0.188873478781067, 1e-09); 553s assert (C(9,6), 4.08974010364197e-08, 1e-09); 553s assert (C(10,6), 4.44427348175241e-06, 1e-09); 553s assert (M(1,1), 10, 1e-09); 553s assert (M(2,1), 18, 1e-09); 553s assert (M(3,1), 19, 1e-09); 553s assert (M(4,1), 21.0001428571429, 1e-09); 553s assert (M(5,1), 29.0001111111111, 1e-09); 553s assert (M(1,2), 1.0177537954095, 1e-09); 553s assert (M(2,2), 1.28736803631001, 1e-09); 553s assert (M(3,2), 1.0177537954095, 1e-09); 553s assert (M(4,2), 1.0880245732889, 1e-09); 553s assert (M(5,2), 0.959547480416536, 1e-09); 553s 553s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 553s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 553s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 0.001247025266382, 1e-09); 553s assert (C(2,6), 0.000018037115146, 1e-09); 553s assert (C(3,6), 0.000002974595187, 1e-09); 553s assert (C(4,6), 0.000000000786046, 1e-09); 553s assert (C(5,6), 0.5693192886650109, 1e-09); 553s assert (C(6,6), 0.110501699029776, 1e-09); 553s assert (C(7,6), 0.000131226488700, 1e-09); 553s assert (C(8,6), 0.1912101409715992, 1e-09); 553s assert (C(9,6), 0.000005385256394, 1e-09); 553s assert (C(10,6), 0.000074089106171, 1e-09); 553s ***** test 553s 553s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 553s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 553s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 553s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 553s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 553s "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 1.49311100811177e-05, 1e-09); 553s assert (C(2,6), 2.20506904243535e-07, 1e-09); 553s assert (C(3,6), 0.00449897860490058, 1e-09); 553s assert (M(1,1), 6.25, 1e-09); 553s assert (M(2,1), 4.75, 1e-09); 553s assert (M(3,1), 4, 1e-09); 553s assert (M(1,2), 0.152145154862547, 1e-09); 553s assert (M(2,2), 0.152145154862547, 1e-09); 553s assert (M(3,2), 0.152145154862547, 1e-09); 553s ***** test 553s 553s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 553s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 553s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 553s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 553s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 553s "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 0.000020799832702, 1e-09); 553s assert (C(2,6), 0.000000035812410, 1e-09); 553s assert (C(3,6), 0.003038942449215, 1e-09); 553s ***** test 553s 553s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 553s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 553s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 553s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 553s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 553s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 553s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 553s "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 0.261031111511073, 1e-09); 553s assert (C(2,6), 0.065879755907745, 1e-09); 553s assert (C(3,6), 0.241874613529270, 1e-09); 553s ***** shared visibility_setting 553s visibility_setting = get (0, "DefaultFigureVisible"); 553s ***** test 553s set (0, "DefaultFigureVisible", "off"); 553s 553s ## Test for kruskalwallis - comparison with results from MATLAB 553s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 553s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 553s group = [1:3] .* ones (10,3); 553s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 553s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 0.000163089828959986, 1e-09); 553s assert (C(2,6), 0.630298044801257, 1e-09); 553s assert (C(3,6), 0.00100567660695682, 1e-09); 553s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 553s assert (C(1,6), 0.000489269486879958, 1e-09); 553s assert (C(2,6), 1, 1e-09); 553s assert (C(3,6), 0.00301702982087047, 1e-09); 553s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 553s assert (C(1,6), 0.000819054880289573, 1e-09); 553s assert (C(2,6), 0.890628039849261, 1e-09); 553s assert (C(3,6), 0.00447816059021654, 1e-09); 553s set (0, "DefaultFigureVisible", visibility_setting); 553s ***** test 553s set (0, "DefaultFigureVisible", "off"); 553s ## Test for friedman - comparison with results from MATLAB 553s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 553s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 553s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 553s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 0.227424558028569, 1e-09); 553s assert (C(2,6), 0.0327204848315735, 1e-09); 553s assert (C(3,6), 0.353160353315988, 1e-09); 553s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 553s assert (C(1,6), 0.682273674085708, 1e-09); 553s assert (C(2,6), 0.0981614544947206, 1e-09); 553s assert (C(3,6), 1, 1e-09); 553s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 553s assert (C(1,6), 0.482657360384373, 1e-09); 553s assert (C(2,6), 0.102266573027672, 1e-09); 553s assert (C(3,6), 0.649836502233148, 1e-09); 553s set (0, "DefaultFigureVisible", visibility_setting); 553s ***** test 553s set (0, "DefaultFigureVisible", "off"); 553s ## Test for fitlm - same comparisons as for first anovan example 553s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 553s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 553s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 553s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 553s 25.694 ]'; 553s 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]'; 553s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 553s "contrasts","simple"); 553s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 553s assert (C(1,6), 2.85812420217898e-05, 1e-09); 553s assert (C(2,6), 5.22936741204085e-07, 1e-09); 553s assert (C(3,6), 2.12794763209146e-08, 1e-09); 553s assert (C(4,6), 7.82091664406946e-15, 1e-09); 553s assert (C(5,6), 0.546591417210693, 1e-09); 553s assert (C(6,6), 0.0845897945254446, 1e-09); 553s assert (C(7,6), 9.47436557975328e-08, 1e-09); 553s assert (C(8,6), 0.188873478781067, 1e-09); 553s assert (C(9,6), 4.08974010364197e-08, 1e-09); 553s assert (C(10,6), 4.44427348175241e-06, 1e-09); 553s assert (M(1,1), 10, 1e-09); 553s assert (M(2,1), 18, 1e-09); 553s assert (M(3,1), 19, 1e-09); 553s assert (M(4,1), 21.0001428571429, 1e-09); 553s assert (M(5,1), 29.0001111111111, 1e-09); 553s assert (M(1,2), 1.0177537954095, 1e-09); 553s assert (M(2,2), 1.28736803631001, 1e-09); 553s assert (M(3,2), 1.0177537954095, 1e-09); 553s assert (M(4,2), 1.0880245732889, 1e-09); 553s assert (M(5,2), 0.959547480416536, 1e-09); 553s set (0, "DefaultFigureVisible", visibility_setting); 553s ***** test 553s ## Test p-value adjustments compared to R stats package function p.adjust 553s ## Data from Westfall (1997) JASA. 92(437):299-306 553s p = [.005708; .023544; .024193; .044895; ... 553s .048805; .221227; .395867; .693051; .775755]; 553s padj = multcompare (p); 553s assert (padj(1), 0.051372, 1e-06); 553s assert (padj(2), 0.188352, 1e-06); 553s assert (padj(3), 0.188352, 1e-06); 553s assert (padj(4), 0.269370, 1e-06); 553s assert (padj(5), 0.269370, 1e-06); 553s assert (padj(6), 0.884908, 1e-06); 553s assert (padj(7), 1.000000, 1e-06); 553s assert (padj(8), 1.000000, 1e-06); 553s assert (padj(9), 1.000000, 1e-06); 553s padj = multcompare(p,'ctype','holm'); 553s assert (padj(1), 0.051372, 1e-06); 553s assert (padj(2), 0.188352, 1e-06); 553s assert (padj(3), 0.188352, 1e-06); 553s assert (padj(4), 0.269370, 1e-06); 553s assert (padj(5), 0.269370, 1e-06); 553s assert (padj(6), 0.884908, 1e-06); 553s assert (padj(7), 1.000000, 1e-06); 553s assert (padj(8), 1.000000, 1e-06); 553s assert (padj(9), 1.000000, 1e-06); 553s padj = multcompare(p,'ctype','hochberg'); 553s assert (padj(1), 0.051372, 1e-06); 553s assert (padj(2), 0.169351, 1e-06); 553s assert (padj(3), 0.169351, 1e-06); 553s assert (padj(4), 0.244025, 1e-06); 553s assert (padj(5), 0.244025, 1e-06); 553s assert (padj(6), 0.775755, 1e-06); 553s assert (padj(7), 0.775755, 1e-06); 553s assert (padj(8), 0.775755, 1e-06); 553s assert (padj(9), 0.775755, 1e-06); 553s padj = multcompare(p,'ctype','fdr'); 553s assert (padj(1), 0.0513720, 1e-07); 553s assert (padj(2), 0.0725790, 1e-07); 553s assert (padj(3), 0.0725790, 1e-07); 553s assert (padj(4), 0.0878490, 1e-07); 553s assert (padj(5), 0.0878490, 1e-07); 553s assert (padj(6), 0.3318405, 1e-07); 553s assert (padj(7), 0.5089719, 1e-07); 553s assert (padj(8), 0.7757550, 1e-07); 553s assert (padj(9), 0.7757550, 1e-07); 553s 8 tests, 8 passed, 0 known failure, 0 skipped 553s [inst/bar3.m] 553s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/bar3.m 553s ***** demo 553s ## Ploting 5 bars in the same series. 553s 553s z = [50; 40; 30; 20; 10]; 553s bar3 (z); 553s ***** demo 553s ## Ploting 5 bars in different groups. 553s 553s z = [50, 40, 30, 20, 10]; 553s bar3 (z); 553s ***** demo 553s ## A 3D bar graph with each series corresponding to a column in z. 553s 553s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 553s bar3 (z); 553s ***** demo 553s ## Specify y-axis locations as tick names. y must be a column vector! 553s 553s y = [1950, 1960, 1970, 1980, 1990]'; 553s z = [16, 8, 4, 2, 1]'; 553s bar3 (y, z); 553s ***** demo 553s ## Plot 3 series as a grouped plot without any space between the grouped bars 553s 553s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 553s bar3 (z, 1, 'grouped'); 553s ***** demo 553s ## Plot a stacked style 3D bar graph 553s 553s z = [19, 30, 21, 30; 40, 16, 32, 12]; 553s b = bar3 (z, 0.5, 'stacked'); 553s ***** error <bar3: Z must be numeric.> bar3 ("A") 553s ***** error <bar3: Z must be numeric.> bar3 ({2,3,4,5}) 553s ***** error <bar3: inconsistent size in Y and Z input arguments.> ... 553s bar3 ([1,2,3]', ones (2)) 553s ***** error <bar3: WIDTH must be a scalar in the range> ... 553s bar3 ([1:5], 1.2) 553s ***** error <bar3: WIDTH must be a scalar in the range> ... 553s bar3 ([1:5]', ones (5), 1.2) 553s ***** error <bar3: numeric COLOR must be a 1x3 vector of an Nx3 matrix> ... 553s bar3 ([1:5]', ones (5), [0.8, 0.7]) 553s ***** error <bar3: missing value for optional argument 'width'.> ... 553s bar3 (ones (5), 'width') 553s ***** error <bar3: invalid value for optional argument 'width'.> ... 553s bar3 (ones (5), 'width', 1.2) 553s ***** error <bar3: invalid value for optional argument 'width'.> ... 553s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 553s ***** error <bar3: missing value for optional argument 'color'.> ... 553s bar3 (ones (5), 'color') 553s ***** error <bar3: numeric COLOR must be a 1x3 vector of an Nx3 matrix> ... 553s bar3 (ones (5), 'color', [0.8, 0.8]) 553s ***** error <bar3: invalid value for optional argument 'color'.> ... 553s bar3 (ones (5), 'color', "brown") 553s ***** error <bar3: invalid value for optional argument 'color'.> ... 553s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 553s ***** error <bar3: missing value for optional argument 'xlabel'.> ... 553s bar3 (ones (5), 'xlabel') 553s ***** error <bar3: invalid value for optional argument 'xlabel'.> ... 553s bar3 (ones (5), 'xlabel', 4) 553s ***** error <bar3: missing value for optional argument 'ylabel'.> ... 553s bar3 (ones (5), 'ylabel') 553s ***** error <bar3: invalid value for optional argument 'ylabel'.> ... 553s bar3 (ones (5), 'ylabel', 4) 553s ***** error <bar3: invalid optional argument.> bar3 (ones (5), 'this', 4) 553s ***** error <bar3: the elements in 'xlabel' must equal the columns in Z.> ... 553s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 553s ***** error <bar3: the elements in 'ylabel' must equal the rows in Z.> ... 553s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 553s 20 tests, 20 passed, 0 known failure, 0 skipped 553s [inst/optimalleaforder.m] 553s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/optimalleaforder.m 553s ***** demo 553s randn ("seed", 5) # for reproducibility 553s X = randn (10, 2); 553s D = pdist (X); 553s tree = linkage(D, 'average'); 553s optimalleaforder (tree, D, 'Transformation', 'linear') 553s ***** error optimalleaforder () 553s ***** error optimalleaforder (1) 553s ***** error <tree must be .*> optimalleaforder (ones (2, 2), 1) 553s ***** error <character inputs expected> optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 553s ***** error <D must be .*> optimalleaforder ([1 2 1], [1 2 3]) 553s ***** error <unknown property .*> optimalleaforder ([1 2 1], 1, "xxx", "xxx") 553s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 553s 7 tests, 7 passed, 0 known failure, 0 skipped 553s [inst/signrank.m] 553s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/signrank.m 553s ***** test 553s load gradespaired.mat 553s [p, h, stats] = signrank (gradespaired(:,1), ... 553s gradespaired(:,2), 'tail', 'left'); 553s assert (p, 0.0047, 1e-4); 553s assert (h, true); 553s assert (stats.zval, -2.5982, 1e-4); 553s assert (stats.signedrank, 2017.5); 553s ***** test 553s load ('gradespaired.mat'); 553s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 553s 'tail', 'left', 'method', 'exact'); 553s assert (p, 0.0045, 1e-4); 553s assert (h, true); 553s assert (stats.zval, NaN); 553s assert (stats.signedrank, 2017.5); 554s ***** test 554s load mileage 554s [p, h, stats] = signrank (mileage(:,2), 33); 554s assert (p, 0.0312, 1e-4); 554s assert (h, true); 554s assert (stats.zval, NaN); 554s assert (stats.signedrank, 21); 554s ***** test 554s load mileage 554s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 554s assert (p, 0.0156, 1e-4); 554s assert (h, true); 554s assert (stats.zval, NaN); 554s assert (stats.signedrank, 21); 554s ***** test 554s load mileage 554s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 554s 'alpha', 0.01, 'method', 'approximate'); 554s assert (p, 0.0180, 1e-4); 554s assert (h, false); 554s assert (stats.zval, 2.0966, 1e-4); 554s assert (stats.signedrank, 21); 554s ***** error <signrank: X must be a vector.> signrank (ones (2)) 554s ***** error <signrank: Y must be either a scalar of a vector.> ... 554s signrank ([1, 2, 3, 4], ones (2)) 554s ***** error <signrank: X and Y vectors have different lengths.> ... 554s signrank ([1, 2, 3, 4], [1, 2, 3]) 554s ***** error <signrank: optional arguments must be in pairs.> ... 554s signrank ([1, 2, 3, 4], [], 'tail') 554s ***** error <signrank: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 554s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 554s ***** error <signrank: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 554s signrank ([1, 2, 3, 4], [], 'alpha', 0) 554s ***** error <signrank: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 554s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 554s ***** error <signrank: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 554s signrank ([1, 2, 3, 4], [], 'alpha', "a") 554s ***** error <signrank: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 554s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 554s ***** error <signrank: 'tail' argument must be a character vector.> ... 554s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 554s ***** error <signrank: 'tail' argument must be a character vector.> ... 554s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 554s ***** error <signrank: 'tail' value must be either 'both', right' or 'left'.> ... 554s signrank ([1, 2, 3, 4], [], 'tail', "some") 554s ***** error <signrank: 'tail' value must be either 'both', right' or 'left'.> ... 554s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 554s ***** error <signrank: 'method' argument must be a character vector.> ... 554s signrank ([1, 2, 3, 4], [], 'method', 0.01) 554s ***** error <signrank: 'method' argument must be a character vector.> ... 554s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 554s ***** error <signrank: 'method' value must be either 'exact' or 'approximate'.> ... 554s signrank ([1, 2, 3, 4], [], 'method', "some") 554s ***** error <signrank: 'method' value must be either 'exact' or 'approximate'.> ... 554s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 554s 22 tests, 22 passed, 0 known failure, 0 skipped 554s [inst/fitcknn.m] 554s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitcknn.m 554s ***** demo 554s ## Train a k-nearest neighbor classifier for k = 10 554s ## and plot the decision boundaries. 554s 554s load fisheriris 554s idx = ! strcmp (species, "setosa"); 554s X = meas(idx,3:4); 554s Y = cast (strcmpi (species(idx), "virginica"), "double"); 554s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 554s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 554s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 554s [x1G, x2G] = meshgrid (x1, x2); 554s XGrid = [x1G(:), x2G(:)]; 554s pred = predict (obj, XGrid); 554s gidx = logical (str2num (cell2mat (pred))); 554s 554s figure 554s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 554s hold on 554s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 554s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 554s xlabel ("Petal length (cm)"); 554s ylabel ("Petal width (cm)"); 554s title ("5-Nearest Neighbor Classifier Decision Boundary"); 554s legend ({"Versicolor Region", "Virginica Region", ... 554s "Sampled Versicolor", "Sampled Virginica"}, ... 554s "location", "northwest") 554s axis tight 554s hold off 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "NSMethod", "exhaustive"); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s k = 10; 554s a = fitcknn (x, y, "NumNeighbors" ,k); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = ones (4, 11); 554s y = ["a"; "a"; "b"; "b"]; 554s k = 10; 554s a = fitcknn (x, y, "NumNeighbors" ,k); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s k = 10; 554s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s k = 10; 554s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s weights = ones (4,1); 554s a = fitcknn (x, y, "Standardize", 1); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.Standardize}, {true}) 554s assert ({a.Sigma}, {std(x, [], 1)}) 554s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s weights = ones (4,1); 554s a = fitcknn (x, y, "Standardize", false); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.Standardize}, {false}) 554s assert ({a.Sigma}, {[]}) 554s assert ({a.Mu}, {[]}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s s = ones (1, 3); 554s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.DistParameter}, {s}) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 554s assert (class (a), "ClassificationKNN"); 554s assert (a.DistParameter, 5) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 554s "NSMethod", "exhaustive"); 554s assert (class (a), "ClassificationKNN"); 554s assert (a.DistParameter, 5) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 554s assert (class (a), "ClassificationKNN"); 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 554s assert ({a.BucketSize}, {20}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "IncludeTies", true); 554s assert (class (a), "ClassificationKNN"); 554s assert (a.IncludeTies, true); 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y); 554s assert (class (a), "ClassificationKNN"); 554s assert (a.IncludeTies, false); 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Prior, [0.5; 0.5]) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s prior = [0.5; 0.5]; 554s a = fitcknn (x, y, "Prior", "empirical"); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Prior, prior) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "a"; "b"]; 554s prior = [0.75; 0.25]; 554s a = fitcknn (x, y, "Prior", "empirical"); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Prior, prior) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "a"; "b"]; 554s prior = [0.5; 0.5]; 554s a = fitcknn (x, y, "Prior", "uniform"); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Prior, prior) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s cost = eye (2); 554s a = fitcknn (x, y, "Cost", cost); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Cost, [1, 0; 0, 1]) 554s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s cost = eye (2); 554s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 554s assert (class (a), "ClassificationKNN") 554s assert (a.Cost, [1, 0; 0, 1]) 554s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 554s assert ({a.BucketSize}, {50}) 554s ***** test 554s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 554s y = ["a"; "a"; "b"; "b"]; 554s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 554s assert (class (a), "ClassificationPartitionedModel"); 554s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 554s assert (a.ModelParameters.NSMethod, "exhaustive") 554s assert (a.ModelParameters.Distance, "euclidean") 554s assert ({a.Trained{1}.BucketSize}, {50}) 554s ***** error<fitcknn: too few arguments.> fitcknn () 554s ***** error<fitcknn: too few arguments.> fitcknn (ones (4,1)) 554s ***** error<fitcknn: Name-Value arguments must be in pairs.> 554s fitcknn (ones (4,2), ones (4, 1), "K") 554s ***** error<fitcknn: number of rows in X and Y must be equal.> 554s fitcknn (ones (4,2), ones (3, 1)) 554s ***** error<fitcknn: number of rows in X and Y must be equal.> 554s fitcknn (ones (4,2), ones (3, 1), "K", 2) 554s ***** error <fitcknn: 'CrossVal' must be either 'off' or 'on'.> 554s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 554s ***** error <fitcknn: 'CrossVal' must be either 'off' or 'on'.> 554s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 554s ***** error <fitcknn: You can use only one cross-validation name-value pair argument> ... 554s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 554s 29 tests, 29 passed, 0 known failure, 0 skipped 554s [inst/glmval.m] 554s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/glmval.m 554s ***** demo 554s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 554s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 554s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 554s b = glmfit (x, [y n], "binomial", "Link", "probit"); 554s yfit = glmval (b, x, "probit", "Size", n); 554s plot (x, y./n, 'o', x, yfit ./ n, '-') 554s ***** error <glmval: too few input arguments.> glmval () 554s ***** error <glmval: too few input arguments.> glmval (1) 554s ***** error <glmval: too few input arguments.> glmval (1, 2) 554s ***** error <glmval: B must be a numeric vector of coefficient estimates.> ... 554s glmval ("asd", [1; 1; 1], 'probit') 554s ***** error <glmval: B must be a numeric vector of coefficient estimates.> ... 554s glmval ([], [1; 1; 1], 'probit') 554s ***** error <glmval: X must be a numeric matrix.> ... 554s glmval ([0.1; 0.3; 0.4], [], 'probit') 554s ***** error <glmval: X must be a numeric matrix.> ... 554s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 554s ***** error <glmval: structure with custom link functions must be a scalar.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 554s ***** error <glmval: structure with custom link functions requires the fields 'Link', 'Derivative', and 'Inverse'.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 554s ***** error <glmval: bad 'Link' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 554s ***** error <glmval: bad 'Link' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 554s ***** error <glmval: custom 'Link' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 554s ***** error <glmval: invalid custom 'Link' function.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 554s ***** error <glmval: bad 'Derivative' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 554s ***** error <glmval: bad 'Derivative' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 554s ***** error <glmval: custom 'Derivative' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 554s ***** error <glmval: invalid custom 'Derivative' function.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 554s ***** error <glmval: bad 'Inverse' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 554s ***** error <glmval: bad 'Inverse' function in custom link function structure.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 554s ***** error <glmval: custom 'Inverse' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 554s ***** error <glmval: invalid custom 'Inverse' function.> ... 554s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 554s ***** error <glmval: cell array with custom link functions must have three elements.> ... 554s glmval (rand (3,1), rand (5,2), {'log'}) 554s ***** error <glmval: cell array with custom link functions must have three elements.> ... 554s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 554s ***** error <glmval: cell array with custom link functions must have three elements.> ... 554s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 554s ***** error <glmval: bad 'Link' function in custom link function cell array.> ... 554s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 554s ***** error <glmval: custom 'Link' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 554s ***** error <glmval: invalid custom 'Link' function.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 554s ***** error <glmval: bad 'Derivative' function in custom link function cell array.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 554s ***** error <glmval: custom 'Derivative' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 554s ***** error <glmval: invalid custom 'Derivative' function.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 554s ***** error <glmval: bad 'Inverse' function in custom link function cell array.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 554s ***** error <glmval: custom 'Inverse' function must return an output of the same size as input.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 554s ***** error <glmval: invalid custom 'Inverse' function.> ... 554s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 554s ***** error <glmval: numeric input for custom link function must be a finite real scalar value.> ... 554s glmval (rand (3,1), rand (5,2), NaN) 554s ***** error <glmval: numeric input for custom link function must be a finite real scalar value.> ... 554s glmval (rand (3,1), rand (5,2), [1, 2]) 554s ***** error <glmval: numeric input for custom link function must be a finite real scalar value.> ... 554s glmval (rand (3,1), rand (5,2), [1i]) 554s ***** error <glmval: canonical link function name must be a character vector.> ... 554s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 554s ***** error <glmval: canonical link function 'somelinkfunction' is not supported.> ... 554s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 554s ***** error <glmval: invalid value for custom link function.> ... 554s glmval (rand (3,1), rand (5,2), true) 554s ***** error <glmval: invalid 'stats' structure.> ... 554s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 554s ***** error <glmval: Name-Value arguments must be in pairs.> ... 554s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 554s ***** error <glmval: 'Confidence' must be a scalar between 0 and 1.> ... 554s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 554s ***** error <glmval: 'Confidence' must be a scalar between 0 and 1.> ... 554s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 554s ***** error <glmval: 'Confidence' must be a scalar between 0 and 1.> ... 554s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 554s ***** error <glmval: 'Constant' should be either 'on' or 'off'.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 554s ***** error <glmval: 'Constant' should be either 'on' or 'off'.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 554s ***** error <glmval: 'Constant' should be either 'on' or 'off'.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 554s ***** error <glmval: 'Offset' must be a numeric vector of the same length as the rows in X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 554s ***** error <glmval: 'Offset' must be a numeric vector of the same length as the rows in X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 554s ***** error <glmval: 'simultaneous' must be a boolean scalar.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 554s ***** error <glmval: 'simultaneous' must be a boolean scalar.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 554s ***** error <glmval: 'size' must be a scalar or a vector with one value for each row of X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 554s ***** error <glmval: 'size' must be a scalar or a vector with one value for each row of X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 554s ***** error <glmval: 'size' must be a scalar or a vector with one value for each row of X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 554s ***** error <glmval: 'size' must be a scalar or a vector with one value for each row of X.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 554s ***** error <glmval: unknown parameter name.> ... 554s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 554s ***** error <glmval: cannot compute confidence intervals without STATS structure.> ... 554s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 554s 57 tests, 57 passed, 0 known failure, 0 skipped 554s [inst/knnsearch.m] 554s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/knnsearch.m 554s ***** demo 554s ## find 10 nearest neighbour of a point using different distance metrics 554s ## and compare the results by plotting 554s load fisheriris 554s X = meas(:,3:4); 554s Y = species; 554s point = [5, 1.45]; 554s 554s ## calculate 10 nearest-neighbours by minkowski distance 554s [id, d] = knnsearch (X, point, "K", 10); 554s 554s ## calculate 10 nearest-neighbours by minkowski distance 554s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 554s 554s ## calculate 10 nearest-neighbours by chebychev distance 554s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 554s 554s ## plotting the results 554s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 554s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 554s xlabel("Petal length (cm)"); 554s ylabel("Petal width (cm)"); 554s 554s line (point(1), point(2), "marker", "X", "color", "k", ... 554s "linewidth", 2, "displayname", "query point") 554s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 554s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 554s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 554s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 554s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 554s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 554s xlim ([4.5 5.5]); 554s ylim ([1 2]); 554s axis square; 554s ***** demo 554s ## knnsearch on iris dataset using kdtree method 554s load fisheriris 554s X = meas(:,3:4); 554s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 554s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 554s 554s ## new point to be predicted 554s point = [5 1.45]; 554s 554s line (point(1), point(2), "marker", "X", "color", "k", ... 554s "linewidth", 2, "displayname", "query point") 554s 554s ## knnsearch using kdtree method 554s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 554s 554s ## plotting predicted neighbours 554s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 554s "linestyle", "none", "markersize", 10, ... 554s "displayname", "nearest neighbour") 554s xlim ([4 6]) 554s ylim ([1 3]) 554s axis square 554s ## details of predicted labels 554s tabulate (species(idx)) 554s 554s ctr = point - d(end); 554s diameter = 2 * d(end); 554s ## Draw a circle around the 10 nearest neighbors. 554s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 554s 554s ## here only 8 neighbours are plotted instead of 10 since the dataset 554s ## contains duplicate values 554s ***** shared X, Y 554s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 554s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * sqrt (2)); 554s ***** test 554s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 554s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * sqrt (2)); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 554s assert (iscell (idx), true); 554s assert (iscell (D), true) 554s assert (idx {1}, [1]); 554s assert (idx {2}, [1, 2]); 554s assert (D{1}, ones (1, 1) * sqrt (2)); 554s assert (D{2}, ones (1, 2) * sqrt (2)); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 554s assert (idx, [1, 2; 1, 2]); 554s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * sqrt (2)); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 554s assert (idx, [1, 2; 1, 2]); 554s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 554s ***** test 554s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 554s yy = [2, 4; 2, 6]; 554s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 554s assert (idx, [3; 2]); 554s assert (D, [0; 3.162277660168377], 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * sqrt (2)); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 554s assert (idx, [1; 1]); 554s assert (D, [2; 2]); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 554s assert (idx, [1; 1]); 554s assert (D, [1; 1]); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 554s assert (idx, [2; 3]); 554s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 554s assert (idx, [1; 1]); 554s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 554s assert (idx, [1; 1]); 554s assert (D, [0.5; 0.5]); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 554s assert (idx, [1; 1]); 554s assert (D, [0.5; 0.5]); 554s ***** test 554s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 554s assert (idx, [1, 2; 1, 2]); 554s assert (D, [0.5, 1; 0.5, 0.5]); 554s ***** test 554s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 554s b = [1, 1]; 554s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 554s assert (iscell (idx), true); 554s assert (iscell (D), true) 554s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 554s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 554s ***** test 554s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 554s b = [1, 1]; 554s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 554s assert (iscell (idx), true); 554s assert (iscell (D), true) 554s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 554s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 554s ***** test 554s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 554s b = [1, 1]; 554s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 554s assert (iscell (idx), false); 554s assert (iscell (D), false) 554s assert (idx, [4, 2, 3, 6, 1]); 554s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 554s ***** test 554s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 554s b = [1, 1]; 554s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 554s assert (iscell (idx), false); 554s assert (iscell (D), false) 554s assert (idx, [4, 2, 3, 6, 1]); 554s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 554s ***** test 554s load fisheriris 554s a = meas; 554s b = min(meas); 554s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 554s assert (idx, [42, 9, 14, 39, 13]); 554s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 555s ***** test 555s load fisheriris 555s a = meas; 555s b = mean(meas); 555s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 555s assert (idx, [65, 83, 89, 72, 100]); 555s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 555s ***** test 555s load fisheriris 555s a = meas; 555s b = max(meas); 555s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 555s assert (idx, [118, 132, 110, 106, 136]); 555s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 555s 555s ***** test 555s load fisheriris 555s a = meas; 555s b = max(meas); 555s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 555s assert ( iscell (idx), true); 555s assert ( iscell (D), true); 555s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 555s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 555s ***** error<knnsearch: too few input arguments.> knnsearch (1) 555s ***** error<knnsearch: number of columns in X and Y must match.> ... 555s knnsearch (ones (4, 5), ones (4)) 555s ***** error<knnsearch: invalid NAME in optional pairs of arguments.> ... 555s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 555s ***** error<knnsearch: only a single distance parameter can be defined.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 555s ***** error<knnsearch: invalid value of K.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 555s ***** error<knnsearch: invalid value of Minkowski Exponent.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 555s ***** error<knnsearch: invalid value in Scale or the size of Scale.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 555s ***** error<knnsearch: invalid value in Cov, Cov can only be given for mahalanobis distance.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 555s ***** error<knnsearch: invalid value in Cov, Cov can only be given for mahalanobis distance.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 555s ***** error<knnsearch: invalid value of bucketsize.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 555s ***** error<knnsearch: 'kdtree' cannot be used with the given distance metric.> ... 555s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 555s 42 tests, 42 passed, 0 known failure, 0 skipped 555s [inst/hist3.m] 555s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hist3.m 555s ***** demo 555s X = [ 555s 1 1 555s 1 1 555s 1 10 555s 1 10 555s 5 5 555s 5 5 555s 5 5 555s 5 5 555s 5 5 555s 7 3 555s 7 3 555s 7 3 555s 10 10 555s 10 10]; 555s hist3 (X) 555s ***** test 555s N_exp = [ 0 0 0 5 20 555s 0 0 10 15 0 555s 0 15 10 0 0 555s 20 5 0 0 0]; 555s 555s n = 100; 555s x = [1:n]'; 555s y = [n:-1:1]'; 555s D = [x y]; 555s N = hist3 (D, [4 5]); 555s assert (N, N_exp); 555s ***** test 555s N_exp = [0 0 0 0 1 555s 0 0 0 0 1 555s 0 0 0 0 1 555s 1 1 1 1 93]; 555s 555s n = 100; 555s x = [1:n]'; 555s y = [n:-1:1]'; 555s D = [x y]; 555s C{1} = [1 1.7 3 4]; 555s C{2} = [1:5]; 555s N = hist3 (D, C); 555s assert (N, N_exp); 555s ***** test 555s D = [1 1; 3 1; 3 3; 3 1]; 555s [c, nn] = hist3 (D, {0:4, 0:4}); 555s exp_c = zeros (5); 555s exp_c([7 9 19]) = [1 2 1]; 555s assert (c, exp_c); 555s assert (nn, {0:4, 0:4}); 555s ***** test 555s for i = 10 555s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 555s endfor 555s ***** test 555s edge_1 = linspace (0, 10, 10); 555s edge_2 = linspace (0, 50, 10); 555s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 555s exp_c = zeros (10, 10); 555s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 555s assert (c, exp_c); 555s 555s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 555s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 555s ***** shared X 555s X = [ 555s 5 2 555s 5 3 555s 1 4 555s 5 3 555s 4 4 555s 1 2 555s 2 3 555s 3 3 555s 5 4 555s 5 3]; 555s ***** test 555s N = zeros (10); 555s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 555s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 555s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 555s ***** test 555s N = zeros (5, 7); 555s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 555s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 555s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 555s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 555s ***** test 555s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 555s C = {(2:5), (2.5:1:4.5)}; 555s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 555s ***** test 555s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 555s C = {(1.2:3.2), (0:5)}; 555s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 555s assert (nthargout ([1 2], @hist3, X, C), {N C}) 555s ***** test 555s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 555s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 555s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 555s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 555s assert (C, C_exp, eps*10^2) 555s ***** test 555s Xv = repmat ([1:10]', [1 2]); 555s 555s ## Test Centers 555s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 555s 555s N_exp = eye (6); 555s N_exp([1 end]) = 3; 555s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 555s 555s N_exp = zeros (8, 6); 555s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 555s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 555s 555s ## Test Edges 555s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 555s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 555s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 555s 555s N_exp = zeros (14); 555s N_exp(3:12, 3:12) = eye (10); 555s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 555s 555s ## Test for Nbins 555s assert (hist3 (Xv), eye (10)) 555s assert (hist3 (Xv, [10 10]), eye (10)) 555s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 555s assert (hist3 (Xv, [5 5]), eye (5) * 2) 555s 555s N_exp = zeros (7, 5); 555s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 555s assert (hist3 (Xv, [7 5]), N_exp) 555s ***** test # bug #51059 555s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 555s [c, nn] = hist3 (D, {0:4, 0:4}); 555s exp_c = zeros (5); 555s exp_c([7 9 19]) = [1 2 1]; 555s assert (c, exp_c) 555s assert (nn, {0:4, 0:4}) 555s ***** test 555s [c, nn] = hist3 ([1 8]); 555s exp_c = zeros (10, 10); 555s exp_c(6, 6) = 1; 555s exp_nn = {-4:5, 3:12}; 555s assert (c, exp_c) 555s assert (nn, exp_nn, eps) 555s 555s [c, nn] = hist3 ([1 8], [10 11]); 555s exp_c = zeros (10, 11); 555s exp_c(6, 6) = 1; 555s exp_nn = {-4:5, 3:13}; 555s assert (c, exp_c) 555s assert (nn, exp_nn, eps) 555s ***** test 555s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 555s exp_c = zeros (10, 10); 555s exp_c(2, 1) = 1; 555s exp_c(8, 10) = 1; 555s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 555s assert (c, exp_c) 555s assert (nn, exp_nn, eps*100) 555s ***** test 555s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 555s exp_c = zeros (10, 10); 555s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 555s assert (c, exp_c) 555s assert (nn, exp_nn, eps*100) 555s ***** test 555s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 555s exp_c = zeros (10, 10); 555s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 555s assert (c, exp_c) 555s assert (nn, exp_nn, eps*100) 555s 16 tests, 16 passed, 0 known failure, 0 skipped 555s [inst/anova1.m] 555s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/anova1.m 555s ***** demo 555s x = meshgrid (1:6); 555s randn ("seed", 15); # for reproducibility 555s x = x + normrnd (0, 1, 6, 6); 555s anova1 (x, [], 'off'); 555s ***** demo 555s x = meshgrid (1:6); 555s randn ("seed", 15); # for reproducibility 555s x = x + normrnd (0, 1, 6, 6); 555s [p, atab] = anova1(x); 555s ***** demo 555s x = ones (50, 4) .* [-2, 0, 1, 5]; 555s randn ("seed", 13); # for reproducibility 555s x = x + normrnd (0, 2, 50, 4); 555s groups = {"A", "B", "C", "D"}; 555s anova1 (x, groups); 555s ***** demo 555s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 555s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 555s anova1 (y(:), g(:), "on", "unequal"); 555s ***** test 555s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 555s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 555s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 555s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 555s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 555s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 555s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 555s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 555s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 555s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 555s group = [1:10] .* ones (10,10); 555s group = group(:); 555s [p, tbl] = anova1 (data, group, "off"); 555s assert (p, 0.022661, 1e-6); 555s assert (tbl{2,5}, 2.2969, 1e-4); 555s assert (tbl{2,3}, 9, 0); 555s assert (tbl{4,2}, 0.003903, 1e-6); 555s data = reshape (data, 10, 10); 555s [p, tbl, stats] = anova1 (data, [], "off"); 555s assert (p, 0.022661, 1e-6); 555s assert (tbl{2,5}, 2.2969, 1e-4); 555s assert (tbl{2,3}, 9, 0); 555s assert (tbl{4,2}, 0.003903, 1e-6); 555s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 555s N = 10 * ones (1, 10); 555s assert (stats.means, means, 1e-6); 555s assert (length (stats.gnames), 10, 0); 555s assert (stats.n, N, 0); 555s ***** test 555s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 555s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 555s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 555s assert (p, 0.00004163, 1e-6); 555s assert (tbl{2,5}, 22.573418, 1e-6); 555s assert (tbl{2,3}, 2, 0); 555s assert (tbl{3,3}, 14, 0); 555s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 555s assert (p, 0.00208877, 1e-8); 555s assert (tbl{2,5}, 15.523192, 1e-6); 555s assert (tbl{2,3}, 2, 0); 555s assert (tbl{2,4}, 7.5786897, 1e-6); 555s 2 tests, 2 passed, 0 known failure, 0 skipped 555s [inst/fullfact.m] 555s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fullfact.m 555s ***** demo 555s ## Full factorial design with 3 binary variables 555s fullfact (3) 555s ***** demo 555s ## Full factorial design with 3 ordinal variables 555s fullfact ([2, 3, 4]) 555s ***** error fullfact (); 555s ***** error fullfact (2, 5); 555s ***** error fullfact (2.5); 555s ***** error fullfact (0); 555s ***** error fullfact (-3); 555s ***** error fullfact (3+2i); 555s ***** error fullfact (Inf); 555s ***** error fullfact (NaN); 555s ***** error fullfact ([1, 2, -3]); 555s ***** error fullfact ([0, 1, 2]); 555s ***** error fullfact ([1, 2, NaN]); 555s ***** error fullfact ([1, 2, Inf]); 555s ***** test 555s A = fullfact (2); 555s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 555s ***** test 555s A = fullfact ([1, 2]); 555s assert (A, [1, 1; 1, 2]); 555s ***** test 555s A = fullfact ([1, 2, 4]); 555s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 555s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 555s assert (A, A_out); 555s 15 tests, 15 passed, 0 known failure, 0 skipped 555s [inst/regression_ftest.m] 555s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/regression_ftest.m 555s ***** error<Invalid call to regression_ftest. Correct usage> regression_ftest (); 556s ***** error<Invalid call to regression_ftest. Correct usage> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 556s ***** error<regression_ftest: Y must contain finite real numbers.> ... 556s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 556s ***** error<regression_ftest: Y must contain finite real numbers.> ... 556s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 556s ***** error<regression_ftest: Y must contain finite real numbers.> ... 556s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 556s ***** error<regression_ftest: X must contain finite real numbers.> ... 556s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 556s ***** error<regression_ftest: X must contain finite real numbers.> ... 556s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 556s ***** error<regression_ftest: X must contain finite real numbers.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 556s ***** error<regression_ftest: invalid value for alpha.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 556s ***** error<regression_ftest: invalid value for alpha.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 556s ***** error<regression_ftest: invalid value for alpha.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 556s ***** error<regression_ftest: invalid value for alpha.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 556s ***** error<regression_ftest: invalid Name argument.> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 556s ***** error<regression_ftest: Y must be a vector of length> ... 556s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 556s ***** error<regression_ftest: Y must be a vector of length> ... 556s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 556s ***** error<regression_ftest: reduced model, RM, must be a numeric vector or> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 556s ***** error<regression_ftest: reduced model, RM, must be a numeric vector or> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 556s ***** error<regression_ftest: reduced model, RM, must have smaller length than> ... 556s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 556s 18 tests, 18 passed, 0 known failure, 0 skipped 556s [inst/pdist2.m] 556s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/pdist2.m 556s ***** shared x, y, xx 556s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 556s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 556s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 556s ***** test 556s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 556s assert (pdist2 (x, y), d); 556s ***** test 556s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 556s 3.4641, 2.2361, 3.3166, 5.4772]; 556s i = [3, 1, 1, 1; 2, 3, 3, 2]; 556s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 556s 3.4641, 2.2361, 3.3166, 5.4772]; 556s i = [1, 2, 2, 3;2, 1, 1, 2]; 556s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s yy = [1 2 3;5 6 7;9 5 1]; 556s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 556s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 556s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 556s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s yy = [1 2 3;5 6 7;9 5 1]; 556s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 556s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 556s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s yy = [1 2 3;5 6 7;9 5 1]; 556s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 556s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 556s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 556s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 556s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 556s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 556s ***** test 556s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 556s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 556s i = [2, 2, 2; 3, 4, 4]; 556s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 556s i = [1, 1, 3; 4, 3, 1]; 556s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 556s assert ({D, I}, {d, i}, 1e-4); 556s ***** test 556s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 556s assert (pdist2 (x, y, "cityblock"), d); 556s ***** test 556s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 556s assert (pdist2 (x, y, "chebychev"), d); 556s ***** test 556s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 556s assert (pdist2 (x, y, "cosine"), d, 1e-4); 556s ***** test 556s yy = [1 2 3;5 6 7;9 5 1]; 556s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 556s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 556s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 556s assert ({D, I}, {d, i}, eps); 556s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 556s assert ({D, I}, {d, i}, eps); 556s ***** test 556s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 556s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 556s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 556s assert ({D, I}, {d, i}, eps); 556s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 556s assert ({D, I}, {d, i}, eps); 556s ***** test 556s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 556s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 556s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 556s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 556s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 556s assert ({D, I}, {d, i}); 556s ***** warning<pdist2: matrix is close to singular> ... 556s pdist2 (xx, xx, "mahalanobis"); 556s ***** error<pdist2: too few input arguments.> pdist2 (1) 556s ***** error<pdist2: X and Y must have equal number of columns.> ... 556s pdist2 (ones (4, 5), ones (4)) 556s ***** error<pdist2: X and Y must be 2 dimensional matrices.> ... 556s pdist2 (ones (4, 2, 3), ones (3, 2)) 556s ***** error<pdist2: missing value in optional name/value paired arguments.> ... 556s pdist2 (ones (3), ones (3), "euclidean", "Largest") 556s ***** error<pdist2: missing value in optional name/value paired arguments.> ... 556s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 556s ***** error<pdist2: invalid NAME in optional pairs of arguments.> ... 556s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 556s ***** error<pdist2: you can only use either Smallest or Largest.> ... 556s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 556s ***** error<pdist2: Smallest or Largest must be specified to compute second output.> ... 556s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 556s ***** error<pdist2: DistParameter for standardized euclidean must be a vector of> ... 556s pdist2 (ones (3), ones (3), "seuclidean", 3) 556s ***** error<pdist2: DistParameter for standardized euclidean must be a nonnegative> ... 556s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 556s ***** error<pdist2: DistParameter for mahalanobis distance must be a covariance> ... 556s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 556s ***** error<pdist2: covariance matrix for mahalanobis distance must be symmetric> ... 556s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 556s ***** error<pdist2: DistParameter for minkowski distance must be a positive scalar.> ... 556s pdist2 (ones (3), eye (3), "minkowski", 0) 556s ***** error<pdist2: DistParameter for minkowski distance must be a positive scalar.> ... 556s pdist2 (ones (3), eye (3), "minkowski", -5) 556s ***** error<pdist2: DistParameter for minkowski distance must be a positive scalar.> ... 556s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 556s ***** error<pdist2: invalid function handle for distance metric.> ... 556s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 556s ***** error<pdist2: custom distance function produces wrong output size.> ... 556s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 556s 33 tests, 33 passed, 0 known failure, 0 skipped 556s [inst/isoutlier.m] 556s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/isoutlier.m 556s ***** demo 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s TF = isoutlier (A, "mean") 556s ***** demo 556s ## Use a moving detection method to detect local outliers in a sine wave 556s 556s x = -2*pi:0.1:2*pi; 556s A = sin(x); 556s A(47) = 0; 556s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 556s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 556s plot (time, A) 556s hold on 556s plot (time(TF), A(TF), "x") 556s datetick ('x', 20, 'keepticks') 556s legend ("Original Data", "Outlier Data") 556s ***** demo 556s ## Locate an outlier in a vector of data and visualize the outlier 556s 556s x = 1:10; 556s A = [60 59 49 49 58 100 61 57 48 58]; 556s [TF, L, U, C] = isoutlier (A); 556s plot (x, A); 556s hold on 556s plot (x(TF), A(TF), "x"); 556s xlim ([1,10]); 556s line ([1,10], [L, L], "Linestyle", ":"); 556s text (1.1, L-2, "Lower Threshold"); 556s line ([1,10], [U, U], "Linestyle", ":"); 556s text (1.1, U-2, "Upper Threshold"); 556s line ([1,10], [C, C], "Linestyle", ":"); 556s text (1.1, C-3, "Center Value"); 556s legend ("Original Data", "Outlier Data"); 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 556s assert (isoutlier (A, "median"), ... 556s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "mean"); 556s assert (L, -109.2459044922864, 1e-12) 556s assert (U, 264.9792378256198, 1e-12) 556s assert (C, 77.8666666666666, 1e-12) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "median"); 556s assert (L, 50.104386688966386, 1e-12) 556s assert (U, 67.895613311033610, 1e-12) 556s assert (C, 59) 556s ***** test 556s A = magic(5) + diag(200*ones(1,5)); 556s T = logical (eye (5)); 556s assert (isoutlier (A, 2), T) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 556s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 556s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 556s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 556s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 556s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 556s assert (L, l, 1e-4) 556s assert (U, u, 1e-4) 556s assert (C, c) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 556s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 556s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 556s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 556s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 556s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 556s assert (L, l, 1e-4) 556s assert (U, u, 1e-4) 556s assert (C, c) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "movmean", 5); 556s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 556s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 556s 52.5979, 51.0627]; 556s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 556s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 556s 66.9373]; 556s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 556s 60.6, 59.8, 59.25, 59]; 556s assert (L, l, 1e-4) 556s assert (U, u, 1e-4) 556s assert (C, c, 1e-4) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 556s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 556s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 556s 52.5979, 51.0627]; 556s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 556s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 556s 66.9373]; 556s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 556s 60.6, 59.8, 59.25, 59]; 556s assert (L, l, 1e-4) 556s assert (U, u, 1e-4) 556s assert (C, c, 1e-4) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "gesd"); 556s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 34.235977035439944, 1e-12) 556s assert (U, 89.764022964560060, 1e-12) 556s assert (C, 62) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 556s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 31.489256770616173, 1e-12) 556s assert (U, 92.510743229383820, 1e-12) 556s assert (C, 62) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 556s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 23.976664158788935, 1e-12) 556s assert (U, 100.02333584121110, 1e-12) 556s assert (C, 62) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "grubbs"); 556s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 54.642809574646606, 1e-12) 556s assert (U, 63.511036579199555, 1e-12) 556s assert (C, 59.076923076923080, 1e-12) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 556s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 54.216083184201850, 1e-12) 556s assert (U, 63.937762969644310, 1e-12) 556s assert (C, 59.076923076923080, 1e-12) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 556s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 556s assert (L, 57) 556s assert (U, 100) 556s assert (C, 78.5) 556s ***** test 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 556s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 556s assert (L, 57.5) 556s assert (U, 62) 556s assert (C, 59.75) 556s ***** shared A 556s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", 0); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", []); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", [2 3 4]); 556s ***** error<isoutlier: WINDOW must be a positive integer> ... 556s isoutlier (A, "movmedian", 1.4); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", [0 1]); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", [2 -1]); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", {2 3}); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmedian", "char"); 556s 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", 0); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", []); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", [2 3 4]); 556s ***** error<isoutlier: WINDOW must be a positive integer> ... 556s isoutlier (A, "movmean", 1.4); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", [0 1]); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", [2 -1]); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", {2 3}); 556s ***** error<isoutlier: WINDOW must be a positive scalar> ... 556s isoutlier (A, "movmean", "char"); 556s 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [-1 90]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [10 -90]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [90]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [90 20]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [90 20]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", [10 20 90]); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", {10 90}); 556s ***** error<isoutlier: THRESHOLD must be a two-element> ... 556s isoutlier (A, "percentiles", "char"); 556s 556s ***** error<isoutlier: sample points must be a vector.> ... 556s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 556s ***** error<isoutlier: sample points must be a vector.> ... 556s isoutlier (A, "movmean", 5, "SamplePoints", 15); 556s ***** error<isoutlier: sample points must be unique.> ... 556s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 556s ***** error<isoutlier: sample points must be sorted.> ... 556s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 556s ***** error<isoutlier: sample points must have the same size> ... 556s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 556s 556s ***** error<isoutlier: threshold factor must be a nonnegative scalar.> ... 556s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 556s ***** error<isoutlier: threshold factor must be a nonnegative scalar.> ... 556s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 556s ***** error<isoutlier: threshold factor must must be in> ... 556s isoutlier (A, "gesd", "ThresholdFactor", 3); 556s ***** error<isoutlier: threshold factor must must be in> ... 556s isoutlier (A, "grubbs", "ThresholdFactor", 3); 556s 556s ***** error<isoutlier: maximum outlier count must be a positive integer scalar.> ... 556s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 556s ***** error<isoutlier: maximum outlier count must be a positive integer scalar.> ... 556s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 556s ***** error<isoutlier: maximum outlier count must be a positive integer scalar.> ... 556s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 556s ***** error<isoutlier: maximum outlier count must be a positive integer scalar.> ... 556s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 556s 556s ***** error<isoutlier: invalid input argument.> ... 556s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 556s ***** error<isoutlier: invalid input argument.> isoutlier (A, {1}); 556s ***** error<isoutlier: invalid input argument.> isoutlier (A, true); 556s ***** error<isoutlier: invalid input argument.> isoutlier (A, false); 556s ***** error<isoutlier: DIM must be a positive integer scalar.> isoutlier (A, 0); 556s ***** error<isoutlier: DIM must be a positive integer scalar.> isoutlier (A, [1 2]); 556s ***** error<isoutlier: DIM must be a positive integer scalar.> isoutlier (A, -2); 556s 59 tests, 59 passed, 0 known failure, 0 skipped 556s [inst/nanmax.m] 556s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/nanmax.m 556s ***** demo 556s ## Find the column maximum values and their indices 556s ## for matrix data with missing values. 556s 556s x = magic (3); 556s x([1, 6:9]) = NaN 556s [y, ind] = nanmax (x) 556s ***** demo 556s ## Find the maximum of all the values in an array, ignoring missing values. 556s ## Create a 2-by-5-by-3 array x with some missing values. 556s 556s x = reshape (1:30, [2, 5, 3]); 556s x([10:12, 25]) = NaN 556s 556s ## Find the maximum of the elements of x. 556s 556s y = nanmax (x, [], 'all') 556s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 556s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 556s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 556s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 556s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 556s ***** shared x, y 556s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 556s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 556s y = x; 556s y(2,3,1) = 0.51; 556s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 556s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 556s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 556s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 556s ***** assert (nanmax (x, [], 'all'), 6.77) 556s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 556s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 556s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 556s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 556s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 556s ***** test 556s xx = repmat ([1:20;6:25], [5 2 6 3]); 556s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 556s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 556s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 556s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 556s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 556s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 556s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 556s ***** assert (nanmax (magic (3), [], 3), magic (3)) 556s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 556s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 556s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 556s ***** error <nanmax: VECDIM must contain non-repeating positive integers.> ... 556s nanmax (y, [], [1, 1, 2]) 556s ***** error <nanmax: a second output is not supported with this syntax.> ... 556s [v, idx] = nanmax(x, y, [1 2]) 557s 24 tests, 24 passed, 0 known failure, 0 skipped 557s [inst/kruskalwallis.m] 557s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/kruskalwallis.m 557s ***** demo 557s x = meshgrid (1:6); 557s x = x + normrnd (0, 1, 6, 6); 557s kruskalwallis (x, [], 'off'); 557s ***** demo 557s x = meshgrid (1:6); 557s x = x + normrnd (0, 1, 6, 6); 557s [p, atab] = kruskalwallis(x); 557s ***** demo 557s x = ones (30, 4) .* [-2, 0, 1, 5]; 557s x = x + normrnd (0, 2, 30, 4); 557s group = {"A", "B", "C", "D"}; 557s kruskalwallis (x, group); 557s ***** test 557s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 557s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 557s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 557s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 557s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 557s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 557s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 557s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 557s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 557s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 557s group = [1:10] .* ones (10,10); 557s group = group(:); 557s [p, tbl] = kruskalwallis (data, group, "off"); 557s assert (p, 0.048229, 1e-6); 557s assert (tbl{2,5}, 17.03124, 1e-5); 557s assert (tbl{2,3}, 9, 0); 557s assert (tbl{4,2}, 82655.5, 1e-16); 557s data = reshape (data, 10, 10); 557s [p, tbl, stats] = kruskalwallis (data, [], "off"); 557s assert (p, 0.048229, 1e-6); 557s assert (tbl{2,5}, 17.03124, 1e-5); 557s assert (tbl{2,3}, 9, 0); 557s assert (tbl{4,2}, 82655.5, 1e-16); 557s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 557s N = 10 * ones (1, 10); 557s assert (stats.meanranks, means, 1e-6); 557s assert (length (stats.gnames), 10, 0); 557s assert (stats.n, N, 0); 557s 1 test, 1 passed, 0 known failure, 0 skipped 557s [inst/gscatter.m] 557s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/gscatter.m 557s ***** demo 557s load fisheriris; 557s X = meas(:,3:4); 557s cidcs = kmeans (X, 3, "Replicates", 5); 557s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 557s title ("Fisher's iris data"); 557s ***** shared visibility_setting 557s visibility_setting = get (0, "DefaultFigureVisible"); 557s ***** test 557s hf = figure ("visible", "off"); 557s unwind_protect 557s load fisheriris; 557s X = meas(:,3:4); 557s cidcs = kmeans (X, 3, "Replicates", 5); 557s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 557s title ("Fisher's iris data"); 557s unwind_protect_cleanup 557s close (hf); 557s end_unwind_protect 557s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 557s ***** error gscatter (); 557s ***** error gscatter ([1]); 557s ***** error gscatter ([1], [2]); 557s ***** error <x must be a numeric vector> gscatter ('abc', [1 2 3], [1]); 557s ***** error <x and y must have the same size> gscatter ([1 2 3], [1 2], [1]); 557s ***** error <y must be a numeric vector> gscatter ([1 2 3], 'abc', [1]); 557s ***** error <g must have the same size as x and y> gscatter ([1 2], [1 2], [1]); 557s ***** error <invalid dolegend> gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 557s 9 tests, 9 passed, 0 known failure, 0 skipped 557s [inst/cholcov.m] 557s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cholcov.m 557s ***** demo 557s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 557s T = cholcov (C1) 557s C2 = T'*T 557s ***** test 557s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 557s T = cholcov (C1); 557s assert (C1, T'*T, 1e-15 * ones (size (C1))); 557s 1 test, 1 passed, 0 known failure, 0 skipped 557s [inst/rmmissing.m] 557s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/rmmissing.m 557s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 557s ***** assert (rmmissing ('abcd f'), 'abcdf') 557s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 557s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 557s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 557s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 557s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 557s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 557s ***** test 557s x = [1:6]; 557s x([2,4]) = NaN; 557s [~, idx] = rmmissing (x); 557s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 557s assert (class(idx), 'logical'); 557s x = reshape (x, [2, 3]); 557s [~, idx] = rmmissing (x); 557s assert (idx, logical ([0; 1])); 557s assert (class(idx), 'logical'); 557s [~, idx] = rmmissing (x, 2); 557s assert (idx, logical ([1, 1, 0])); 557s assert (class(idx), 'logical'); 557s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 557s assert (idx, logical ([0; 1])); 557s assert (class(idx), 'logical'); 557s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 557s assert (idx, logical ([0, 0, 0])); 557s assert (class(idx), 'logical'); 557s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 557s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 557s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 557s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 557s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 557s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 557s ***** assert (rmmissing ([]), []) 557s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 557s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 557s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 557s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 557s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 557s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 557s ***** error <input dimension> rmmissing (ones (0,1,2)) 557s ***** error rmmissing () 557s ***** error <input dimension> rmmissing (ones(2,2,2)) 557s ***** error <must be either 1 or 2> rmmissing ([1 2; 3 4], 5) 557s ***** error <unknown parameter name> rmmissing ([1 2; 3 4], "XXX", 1) 557s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 557s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 557s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 557s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 557s 31 tests, 31 passed, 0 known failure, 0 skipped 557s [inst/glmfit.m] 557s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/glmfit.m 557s ***** demo 557s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 557s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 557s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 557s b = glmfit (x, [y n], "binomial", "Link", "probit"); 557s yfit = glmval (b, x, "probit", "Size", n); 557s plot (x, y./n, 'o', x, yfit ./ n, '-') 557s ***** demo 557s load fisheriris 557s X = meas (51:end, :); 557s y = strcmp ("versicolor", species(51:end)); 557s b = glmfit (X, y, "binomial", "link", "logit") 557s ***** test 557s load fisheriris; 557s X = meas(51:end,:); 557s y = strcmp ("versicolor", species(51:end)); 557s b = glmfit (X, y, "binomial", "link", "logit"); 557s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 557s ***** test 557s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 557s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 557s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 557s b_matlab = [-0.7631; 0.1113]; 557s dev_matlab = 0.0111; 557s assert (Bnew, b_matlab, 0.001); 557s assert (dev, dev_matlab, 0.001); 557s ***** test 557s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 557s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 557s p_input = 1; 557s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 557s b_matlab = [0.3813; 0.0950]; 557s dev_matlab = 0.0051; 557s assert (Bnew, b_matlab, 0.001); 557s assert (dev, dev_matlab, 0.001); 557s ***** error <glmfit: too few input arguments.> glmfit () 557s ***** error <glmfit: too few input arguments.> glmfit (1) 557s ***** error <glmfit: too few input arguments.> glmfit (1, 2) 557s ***** error <glmfit: Name-Value arguments must be in pairs.> ... 557s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 557s ***** error <glmfit: X must be a numeric matrix.> ... 557s glmfit ('abc', rand (6, 1), 'poisson') 557s ***** error <glmfit: X must be a numeric matrix.> ... 557s glmfit ([], rand (6, 1), 'poisson') 557s ***** error <glmfit: Y must be either a numeric matrix or a logical vector.> ... 557s glmfit (rand (5, 2), 'abc', 'poisson') 557s ***** error <glmfit: Y must be either a numeric matrix or a logical vector.> ... 557s glmfit (rand (5, 2), [], 'poisson') 557s ***** error <glmfit: X and Y must have the same number of observations.> ... 557s glmfit (rand (5, 2), rand (6, 1), 'poisson') 557s ***** error <glmfit: DISTRIBUTION must be a character vector.> ... 557s glmfit (rand (6, 2), rand (6, 1), 3) 557s ***** error <glmfit: DISTRIBUTION must be a character vector.> ... 557s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 557s ***** error <glmfit: for a 'binomial' distribution, Y must be an n-by-1 or n-by-2 matrix.> ... 557s glmfit (rand (5, 2), rand (5, 3), 'binomial') 557s ***** error <glmfit: n-by-2 matrix Y for 'binomial' distribution must be numeric.> ... 557s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 557s ***** error <glmfit: for distributions other than 'binomial', Y must be an n-by-1 column vector> ... 557s glmfit (rand (5, 2), rand (5, 2), 'normal') 557s ***** error <glmfit: unsupported distribution.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 557s ***** error <glmfit: 'B0' must be a numeric vector of the same size as Y.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 557s ***** error <glmfit: 'Constant' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 557s ***** error <glmfit: 'Constant' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 557s ***** error <glmfit: 'Constant' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 557s ***** error <glmfit: 'EstDisp' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 557s ***** error <glmfit: 'EstDisp' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 557s ***** error <glmfit: 'EstDisp' should be either 'on' or 'off'.> ... 557s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 557s ***** error <glmfit: structure with custom link functions must be a scalar.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 557s ***** error <glmfit: structure with custom link functions requires the fields 'Link', 'Derivative', and 'Inverse'.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 557s ***** error <glmfit: bad 'Link' function in custom link function structure.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 557s ***** error <glmfit: bad 'Link' function in custom link function structure.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 557s ***** error <glmfit: custom 'Link' function must return an output of the same size as input.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 557s ***** error <glmfit: invalid custom 'Link' function.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 557s ***** error <glmfit: bad 'Derivative' function in custom link function structure.> ... 557s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 558s ***** error <glmfit: bad 'Derivative' function in custom link function structure.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 558s ***** error <glmfit: custom 'Derivative' function must return an output of the same size as input.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 558s ***** error <glmfit: invalid custom 'Derivative' function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 558s ***** error <glmfit: bad 'Inverse' function in custom link function structure.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 558s ***** error <glmfit: bad 'Inverse' function in custom link function structure.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 558s ***** error <glmfit: custom 'Inverse' function must return an output of the same size as input.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 558s ***** error <glmfit: invalid custom 'Inverse' function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 558s ***** error <glmfit: cell array with custom link functions must have three elements.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 558s ***** error <glmfit: cell array with custom link functions must have three elements.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 558s ***** error <glmfit: cell array with custom link functions must have three elements.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 558s ***** error <glmfit: bad 'Link' function in custom link function cell array.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 558s ***** error <glmfit: custom 'Link' function must return an output of the same size as input.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 558s ***** error <glmfit: invalid custom 'Link' function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 558s ***** error <glmfit: bad 'Derivative' function in custom link function cell array.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 558s ***** error <glmfit: custom 'Derivative' function must return an output of the same size as input.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 558s ***** error <glmfit: invalid custom 'Derivative' function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 558s ***** error <glmfit: bad 'Inverse' function in custom link function cell array.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 558s ***** error <glmfit: custom 'Inverse' function must return an output of the same size as input.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 558s ***** error <glmfit: invalid custom 'Inverse' function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 558s ***** error <glmfit: numeric input for custom link function must be a finite real scalar value.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 558s ***** error <glmfit: numeric input for custom link function must be a finite real scalar value.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 558s ***** error <glmfit: numeric input for custom link function must be a finite real scalar value.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 558s ***** error <glmfit: canonical link function name must be a character vector.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 558s ***** error <glmfit: canonical link function 'somelinkfunction' is not supported.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 558s ***** error <glmfit: invalid value for custom link function.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 558s ***** error <glmfit: 'Options' must be a structure containing the fields 'MaxIter', and 'TolX'.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 558s ***** error <glmfit: 'Options' must be a structure containing the fields 'MaxIter', and 'TolX'.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 558s ***** error <glmfit: 'MaxIter' in 'Options' structure must be a positive integer.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 558s ***** error <glmfit: 'MaxIter' in 'Options' structure must be a positive integer.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 558s ***** error <glmfit: 'MaxIter' in 'Options' structure must be a positive integer.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 558s ***** error <glmfit: 'MaxIter' in 'Options' structure must be a positive integer.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 558s ***** error <glmfit: 'TolX' in 'Options' structure must be a positive scalar.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 558s ***** error <glmfit: 'TolX' in 'Options' structure must be a positive scalar.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 558s ***** error <glmfit: 'TolX' in 'Options' structure must be a positive scalar.> ... 558s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 558s ***** error <glmfit: 'Offset' must be a numeric vector of the same size as Y.> ... 558s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 558s ***** error <glmfit: 'Offset' must be a numeric vector of the same size as Y.> ... 558s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 558s ***** error <glmfit: 'Weights' must be a numeric vector of the same size as Y.> ... 558s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 558s ***** error <glmfit: 'Weights' must be a numeric vector of the same size as Y.> ... 558s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 558s 70 tests, 70 passed, 0 known failure, 0 skipped 558s [inst/boxplot.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/boxplot.m 558s ***** demo 558s axis ([0, 3]); 558s randn ("seed", 1); # for reproducibility 558s girls = randn (10, 1) * 5 + 140; 558s randn ("seed", 2); # for reproducibility 558s boys = randn (13, 1) * 8 + 135; 558s boxplot ({girls, boys}); 558s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 558s title ("Grade 3 heights"); 558s ***** demo 558s randn ("seed", 7); # for reproducibility 558s A = randn (10, 1) * 5 + 140; 558s randn ("seed", 8); # for reproducibility 558s B = randn (25, 1) * 8 + 135; 558s randn ("seed", 9); # for reproducibility 558s C = randn (20, 1) * 6 + 165; 558s data = [A; B; C]; 558s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 558s labels = {"Team A", "Team B", "Team C"}; 558s pos = [2, 1, 3]; 558s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 558s "OutlierTags", "on", "BoxStyle", "filled"); 558s title ("Example of Group splitting with paired vectors"); 558s ***** demo 558s randn ("seed", 1); # for reproducibility 558s data = randn (100, 9); 558s boxplot (data, "notch", "on", "boxstyle", "filled", ... 558s "colors", "ygcwkmb", "whisker", 1.2); 558s title ("Example of different colors specified with characters"); 558s ***** demo 558s randn ("seed", 5); # for reproducibility 558s data = randn (100, 13); 558s colors = [0.7 0.7 0.7; ... 558s 0.0 0.4 0.9; ... 558s 0.7 0.4 0.3; ... 558s 0.7 0.1 0.7; ... 558s 0.8 0.7 0.4; ... 558s 0.1 0.8 0.5; ... 558s 0.9 0.9 0.2]; 558s boxplot (data, "notch", "on", "boxstyle", "filled", ... 558s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 558s title ("Example of different colors specified as RGB values"); 558s ***** error <numerical array or cell array containing> boxplot ("a") 558s ***** error <data cells must contain> boxplot ({[1 2 3], "a"}) 558s ***** error <grouping vector may only be passed> boxplot ([1 2 3], 1, {2, 3}) 558s ***** error <grouping vector must be numerical> boxplot ([1 2 3], {"a", "b"}) 558s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 558s ***** error <illegal Notch value> boxplot ([1:10], "notch", i) 558s ***** error <illegal Notch value> boxplot ([1:10], "notch", {}) 558s ***** error <must be character> boxplot (1, "symbol", 1) 558s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 558s ***** error <illegal Orientation value> boxplot (1, "orientation", {}) 558s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 558s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 558s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 558s ***** error <illegal OutlierTags value> boxplot (3, "OutlierTags", {}) 558s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 558s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 558s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 558s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 558s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 558s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 558s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 558s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 558s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 558s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 558s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 558s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 558s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 558s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 558s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 558s ***** error <Sample_IDs must match the data> boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 558s ***** error <with the formalism> boxplot (rand (3, 3), [1 2]) 558s ***** test 558s hf = figure ("visible", "off"); 558s unwind_protect 558s [a, b] = boxplot (rand (10, 3)); 558s assert (size (a), [7, 3]); 558s assert (numel (b.box), 3); 558s assert (numel (b.whisker), 12); 558s assert (numel (b.median), 3); 558s unwind_protect_cleanup 558s close (hf); 558s end_unwind_protect 558s ***** test 558s hf = figure ("visible", "off"); 558s unwind_protect 558s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 558s assert (numel (b.box_fill), 3); 558s unwind_protect_cleanup 558s close (hf); 558s end_unwind_protect 558s ***** test 558s hf = figure ("visible", "off"); 558s unwind_protect 558s hold on 558s [a, b] = boxplot (rand (10, 3)); 558s assert (ishold, true); 558s unwind_protect_cleanup 558s close (hf); 558s end_unwind_protect 558s 34 tests, 34 passed, 0 known failure, 0 skipped 558s [inst/friedman.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/friedman.m 558s ***** demo 558s load popcorn; 558s friedman (popcorn, 3); 558s ***** demo 558s load popcorn; 558s [p, atab] = friedman (popcorn, 3, "off"); 558s disp (p); 558s ***** test 558s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 558s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 558s [p, atab] = friedman (popcorn, 3, "off"); 558s assert (p, 0.001028853354594794, 1e-14); 558s assert (atab{2,2}, 99.75, 1e-14); 558s assert (atab{2,3}, 2, 0); 558s assert (atab{2,4}, 49.875, 1e-14); 558s assert (atab{2,5}, 13.75862068965517, 1e-14); 558s assert (atab{2,6}, 0.001028853354594794, 1e-14); 558s assert (atab{3,2}, 0.08333333333333215, 1e-14); 558s assert (atab{3,4}, 0.04166666666666607, 1e-14); 558s assert (atab{4,3}, 12, 0); 558s ***** test 558s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 558s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 558s [p, atab, stats] = friedman (popcorn, 3, "off"); 558s assert (atab{5,2}, 116, 0); 558s assert (atab{5,3}, 17, 0); 558s assert (stats.source, "friedman"); 558s assert (stats.n, 2); 558s assert (stats.meanranks, [8, 4.75, 2.25], 0); 558s assert (stats.sigma, 2.692582403567252, 1e-14); 558s 2 tests, 2 passed, 0 known failure, 0 skipped 558s [inst/randsample.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/randsample.m 558s ***** test 558s n = 20; 558s k = 5; 558s x = randsample(n, k); 558s assert (size(x), [1 k]); 558s x = randsample(n, k, true); 558s assert (size(x), [1 k]); 558s x = randsample(n, k, false); 558s assert (size(x), [1 k]); 558s x = randsample(n, k, true, ones(n, 1)); 558s assert (size(x), [1 k]); 558s x = randsample(1:n, k); 558s assert (size(x), [1 k]); 558s x = randsample(1:n, k, true); 558s assert (size(x), [1 k]); 558s x = randsample(1:n, k, false); 558s assert (size(x), [1 k]); 558s x = randsample(1:n, k, true, ones(n, 1)); 558s assert (size(x), [1 k]); 558s x = randsample((1:n)', k); 558s assert (size(x), [k 1]); 558s x = randsample((1:n)', k, true); 558s assert (size(x), [k 1]); 558s x = randsample((1:n)', k, false); 558s assert (size(x), [k 1]); 558s x = randsample((1:n)', k, true, ones(n, 1)); 558s assert (size(x), [k 1]); 558s n = 10; 558s k = 100; 558s x = randsample(n, k, true, 1:n); 558s assert (size(x), [1 k]); 558s x = randsample((1:n)', k, true); 558s assert (size(x), [k 1]); 558s x = randsample(k, k, false, 1:k); 558s assert (size(x), [1 k]); 558s 1 test, 1 passed, 0 known failure, 0 skipped 558s [inst/runstest.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/runstest.m 558s ***** test 558s ## NIST beam deflection data 558s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 558s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 558s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 558s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 558s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 558s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 558s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 558s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 558s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 558s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 558s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 558s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 558s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 558s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 558s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 558s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 558s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 558s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 558s [h, p, stats] = runstest (data, median (data)); 558s expected_h = 1; 558s expected_p = 0.008562; 558s expected_z = 2.6229; 558s assert (h, expected_h); 558s assert (p, expected_p, 1E-6); 558s assert (stats.z, expected_z, 1E-4); 558s ***** shared x 558s x = [45, -60, 1.225, 55.4, -9 27]; 558s ***** test 558s [h, p, stats] = runstest (x); 558s assert (h, 0); 558s assert (p, 0.6, 1e-14); 558s assert (stats.nruns, 5); 558s assert (stats.n1, 3); 558s assert (stats.n0, 3); 558s assert (stats.z, 0.456435464587638, 1e-14); 558s ***** test 558s [h, p, stats] = runstest (x, [], "method", "approximate"); 558s assert (h, 0); 558s assert (p, 0.6481, 1e-4); 558s assert (stats.z, 0.456435464587638, 1e-14); 558s ***** test 558s [h, p, stats] = runstest (x, [], "tail", "left"); 558s assert (h, 0); 558s assert (p, 0.9, 1e-14); 558s assert (stats.z, 1.369306393762915, 1e-14); 558s ***** error<runstest: X must be a vector a scalar values.> runstest (ones (2,20)) 558s ***** error<runstest: X must be a vector a scalar values.> runstest (["asdasda"]) 558s ***** error<runstest: V must be either a scalar number or> ... 558s runstest ([2 3 4 3 2 3 4], "updown") 558s ***** error<runstest: invalid value for alpha.> ... 558s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 558s ***** error<runstest: invalid value for alpha.> ... 558s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 558s ***** error<runstest: invalid value for alpha.> ... 558s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 558s ***** error<runstest: invalid value for alpha.> ... 558s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 558s ***** error<runstest: invalid value for method.> ... 558s runstest ([2 3 4 3 2 3 4], [], "method", "some") 558s ***** error<runstest: invalid value for tail.> ... 558s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 558s ***** error<runstest: invalid optional argument.> ... 558s runstest ([2 3 4 3 2 3 4], [], "option", "some") 558s 14 tests, 14 passed, 0 known failure, 0 skipped 558s [inst/clusterdata.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/clusterdata.m 558s ***** demo 558s randn ("seed", 1) # for reproducibility 558s r1 = randn (10, 2) * 0.25 + 1; 558s randn ("seed", 5) # for reproducibility 558s r2 = randn (20, 2) * 0.5 - 1; 558s X = [r1; r2]; 558s 558s wnl = warning ("off", "Octave:linkage_savemem", "local"); 558s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 558s scatter (X(:,1), X(:,2), 36, T, "filled"); 558s ***** error<clusterdata: function called with too few input arguments.> ... 558s clusterdata () 558s ***** error<clusterdata: function called with too few input arguments.> ... 558s clusterdata (1) 558s ***** error <unknown property .*> clusterdata ([1 1], "Bogus", 1) 558s ***** error <specify .* 'MaxClust' or 'Cutoff' .*> clusterdata ([1 1], "Depth", 1) 558s 4 tests, 4 passed, 0 known failure, 0 skipped 558s [inst/Clustering/ClusterCriterion.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Clustering/ClusterCriterion.m 558s ***** error <ClusterCriterion: 'x' must be a numeric matrix> ... 558s ClusterCriterion ("1", "kmeans", [1:6]) 558s ***** error <ClusterCriterion: unknown clustering algorithm 'k'> ... 558s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 558s ***** error <ClusterCriterion: invalid matrix of clustering solutions> ... 558s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 558s ***** error <ClusterCriterion: invalid argument> ... 558s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 558s 4 tests, 4 passed, 0 known failure, 0 skipped 558s [inst/Clustering/GapEvaluation.m] 558s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Clustering/GapEvaluation.m 558s ***** test 558s load fisheriris 558s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 558s "referencedistribution", "uniform"); 558s assert (class (eva), "GapEvaluation"); 562s 1 test, 1 passed, 0 known failure, 0 skipped 562s [inst/Clustering/SilhouetteEvaluation.m] 562s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Clustering/SilhouetteEvaluation.m 562s ***** test 562s load fisheriris 562s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 562s assert (class (eva), "SilhouetteEvaluation"); 562s 1 test, 1 passed, 0 known failure, 0 skipped 562s [inst/Clustering/DaviesBouldinEvaluation.m] 562s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Clustering/DaviesBouldinEvaluation.m 562s ***** test 562s load fisheriris 562s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 562s assert (class (eva), "DaviesBouldinEvaluation"); 563s 1 test, 1 passed, 0 known failure, 0 skipped 563s [inst/Clustering/CalinskiHarabaszEvaluation.m] 563s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Clustering/CalinskiHarabaszEvaluation.m 563s ***** test 563s load fisheriris 563s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 563s assert (class (eva), "CalinskiHarabaszEvaluation"); 563s 1 test, 1 passed, 0 known failure, 0 skipped 563s [inst/stepwisefit.m] 563s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/stepwisefit.m 563s ***** test 563s % Sample data from Draper and Smith (n = 13, k = 4) 563s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 563s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 563s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 563s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 563s 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]'; 563s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 563s assert(X_use, [4 1]) 563s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 563s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 563s assert(X_use, [4 1]) 563s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 563s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 563s assert(X_use, [4 1]) 563s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 564s 1 test, 1 passed, 0 known failure, 0 skipped 564s [inst/ttest.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ttest.m 564s ***** test 564s x = 8:0.1:12; 564s [h, pval, ci] = ttest (x, 10); 564s assert (h, 0) 564s assert (pval, 1, 10*eps) 564s assert (ci, [9.6219 10.3781], 1E-5) 564s [h, pval, ci0] = ttest (x, 0); 564s assert (h, 1) 564s assert (pval, 0) 564s assert (ci0, ci, 2e-15) 564s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 564s assert (h, 0) 564s assert (pval, 0.5, 10*eps) 564s assert (ci, [9.68498 Inf], 1E-5) 564s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 564s ***** error ttest ([8:0.1:12], 10, "tail", 25); 564s 3 tests, 3 passed, 0 known failure, 0 skipped 564s [inst/mcnemar_test.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/mcnemar_test.m 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 564s assert (h, 1); 564s assert (pval, 3.8151e-06, 1e-10); 564s assert (chisq, 21.356, 1e-3); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 564s assert (h, 1); 564s assert (pval, 0.034690, 1e-6); 564s assert (isempty (chisq), true); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 564s assert (h, 0); 564s assert (pval, 0.034690, 1e-6); 564s assert (isempty (chisq), true); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 564s assert (h, 1); 564s assert (pval, 0.034690, 1e-6); 564s assert (isempty (chisq), true); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 564s assert (h, 1); 564s assert (pval, 0.033006, 1e-6); 564s assert (chisq, 4.5455, 1e-4); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 564s assert (h, 0); 564s assert (pval, 0.052479, 1e-6); 564s assert (isempty (chisq), true); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 564s assert (h, 0); 564s assert (pval, 0.055009, 1e-6); 564s assert (chisq, 3.6818, 1e-4); 564s ***** test 564s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 564s assert (h, 1); 564s assert (pval, 0.055009, 1e-6); 564s assert (chisq, 3.6818, 1e-4); 564s ***** error<mcnemar_test: too many input arguments.> mcnemar_test (59, 6, 16, 80) 564s ***** error<mcnemar_test: X must be a 2x2 matrix.> mcnemar_test (ones (3, 3)) 564s ***** error<mcnemar_test: all entries of X must be non-negative integers.> ... 564s mcnemar_test ([59,6;16,-80]) 564s ***** error<mcnemar_test: all entries of X must be non-negative integers.> ... 564s mcnemar_test ([59,6;16,4.5]) 564s ***** error<mcnemar_test: invalid 2nd input argument.> ... 564s mcnemar_test ([59,6;16,80], {""}) 564s ***** error<mcnemar_test: invalid value for ALPHA.> ... 564s mcnemar_test ([59,6;16,80], -0.2) 564s ***** error<mcnemar_test: invalid value for ALPHA.> ... 564s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 564s ***** error<mcnemar_test: invalid value for ALPHA.> ... 564s mcnemar_test ([59,6;16,80], 1) 564s ***** error<mcnemar_test: invalid value for TESTTYPE.> ... 564s mcnemar_test ([59,6;16,80], "") 564s 17 tests, 17 passed, 0 known failure, 0 skipped 564s [inst/hmmviterbi.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hmmviterbi.m 564s ***** test 564s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 564s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 564s transprob = [0.8, 0.2; 0.4, 0.6]; 564s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 564s vpath = hmmviterbi (sequence, transprob, outprob); 564s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 564s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 564s assert (vpath, expected); 564s ***** test 564s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 564s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 564s transprob = [0.8, 0.2; 0.4, 0.6]; 564s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 564s symbols = {"A", "B", "C"}; 564s statenames = {"One", "Two"}; 564s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 564s "statenames", statenames); 564s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 564s "One", "One", "One", "One", "One", "One", "One", "Two", ... 564s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 564s assert (vpath, expected); 564s 2 tests, 2 passed, 0 known failure, 0 skipped 564s [inst/sigma_pts.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/sigma_pts.m 564s ***** demo 564s K = [1 0.5; 0.5 1]; # covaraince matrix 564s # calculate and build associated ellipse 564s [R,S,~] = svd (K); 564s theta = atan2 (R(2,1), R(1,1)); 564s v = sqrt (diag (S)); 564s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 564s t = linspace (0, 2*pi, 100).'; 564s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 564s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 564s 564s figure(1); clf; hold on 564s # Plot ellipse and axes 564s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 564s plot (xe,ye,'-r'); 564s 564s col = 'rgb'; 564s l = [-1.8 -1 1.5]; 564s for li = 1:3 564s p = sigma_pts (2, [], K, l(li)); 564s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 564s p(1,1), p(1,2), ['o' col(li)]); 564s h(li) = tmp(1); 564s endfor 564s hold off 564s axis image 564s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 564s ***** test 564s p = sigma_pts (5); 564s assert (mean (p), zeros(1,5), sqrt(eps)); 564s assert (cov (p), eye(5), sqrt(eps)); 564s ***** test 564s m = randn(1, 5); 564s p = sigma_pts (5, m); 564s assert (mean (p), m, sqrt(eps)); 564s assert (cov (p), eye(5), sqrt(eps)); 564s ***** test 564s x = linspace (0,1,5); 564s K = exp (- (x.' - x).^2/ 0.5); 564s p = sigma_pts (5, [], K); 564s assert (mean (p), zeros(1,5), sqrt(eps)); 564s assert (cov (p), K, sqrt(eps)); 564s ***** error sigma_pts(2,1); 564s ***** error sigma_pts(2,[],1); 564s ***** error sigma_pts(2,1,1); 564s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 564s 7 tests, 7 passed, 0 known failure, 0 skipped 564s [inst/ztest2.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ztest2.m 564s ***** error ztest2 (); 564s ***** error ztest2 (1); 564s ***** error ztest2 (1, 2); 564s ***** error ztest2 (1, 2, 3); 564s ***** error<ztest2: optional arguments must be in NAME-VALUE pairs.> ... 564s ztest2 (1, 2, 3, 4, "alpha") 564s ***** error<ztest2: invalid VALUE for alpha.> ... 564s ztest2 (1, 2, 3, 4, "alpha", 0); 564s ***** error<ztest2: invalid VALUE for alpha.> ... 564s ztest2 (1, 2, 3, 4, "alpha", 1.2); 564s ***** error<ztest2: invalid VALUE for alpha.> ... 564s ztest2 (1, 2, 3, 4, "alpha", "val"); 564s ***** error<ztest2: invalid VALUE for tail.> ... 564s ztest2 (1, 2, 3, 4, "tail", "val"); 564s ***** error<ztest2: invalid VALUE for tail.> ... 564s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 564s ***** error<ztest2: invalid NAME for optional arguments.> ... 564s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 564s 11 tests, 11 passed, 0 known failure, 0 skipped 564s [inst/nansum.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/nansum.m 564s ***** assert (nansum ([2 4 NaN 7]), 13) 564s ***** assert (nansum ([2 4 NaN Inf]), Inf) 564s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 564s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 564s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 564s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 564s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 564s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 564s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 564s 9 tests, 9 passed, 0 known failure, 0 skipped 564s [inst/kstest.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/kstest.m 564s ***** demo 564s ## Use the stock return data set to test the null hypothesis that the data 564s ## come from a standard normal distribution against the alternative 564s ## hypothesis that the population CDF of the data is larger that the 564s ## standard normal CDF. 564s 564s load stockreturns; 564s x = stocks(:,2); 564s [h, p, k, c] = kstest (x, "Tail", "larger") 564s 564s ## Compute the empirical CDF and plot against the standard normal CDF 564s [f, x_values] = ecdf (x); 564s h1 = plot (x_values, f); 564s hold on; 564s h2 = plot (x_values, normcdf (x_values), 'r--'); 564s set (h1, "LineWidth", 2); 564s set (h2, "LineWidth", 2); 564s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 564s "Location", "southeast"); 564s title ("Empirical CDF of stock return data against standard normal CDF") 564s ***** error<kstest: too few inputs.> kstest () 564s ***** error<kstest: X must be a vector of real numbers.> kstest (ones (2, 4)) 564s ***** error<kstest: X must be a vector of real numbers.> kstest ([2, 3, 5, 3+3i]) 564s ***** error<kstest: unknown option 'opt'.> kstest ([2, 3, 4, 5, 6], "opt", 0.51) 564s ***** error<kstest: optional parameters must be in name/value pairs.> ... 564s kstest ([2, 3, 4, 5, 6], "tail") 564s ***** error<kstest: alpha must be a numeric scalar in the range> ... 564s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 564s ***** error<kstest: alpha must be a numeric scalar in the range> ... 564s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 564s ***** error<kstest: tail argument must be a string.> ... 564s kstest ([2, 3, 4, 5, 6], "tail", 0) 564s ***** error<kstest: tail value must be either 'both', right' or 'left'.> ... 564s kstest ([2,3,4,5,6], "tail", "whatever") 564s ***** error<kstest: invalid function handle.> ... 564s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 564s ***** error<kstest: 'somedist' is not a supported distribution.> ... 564s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 564s ***** error<kstest: 'CDF' must be a probability distribution object.> ... 564s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 564s ***** error<kstest: numerical CDF should have only 2 columns.> ... 564s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 564s ***** error<kstest: numerical CDF should have at least one row.> ... 564s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 564s ***** error<kstest: non-incrementing numerical CDF.> ... 564s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 564s ***** error<kstest: wrong duplicates in numerical CDF.> ... 564s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 564s ***** error<kstest: invalid value parsed as CDF optinonal argument.> ... 564s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 564s ***** test 564s load examgrades 564s [h, p] = kstest (grades(:,1)); 564s assert (h, true); 564s assert (p, 7.58603305206105e-107, 1e-14); 564s ***** test 564s load examgrades 564s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 564s assert (h, false); 564s assert (p, 0.5612, 1e-4); 564s ***** test 564s load examgrades 564s x = grades(:,1); 564s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 564s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 564s assert (h, true); 564s assert (p, 0.0021, 1e-4); 564s ***** test 564s load stockreturns 564s x = stocks(:,3); 564s [h,p,k,c] = kstest (x, "Tail", "larger"); 564s assert (h, true); 564s assert (p, 5.085438806199252e-05, 1e-14); 564s assert (k, 0.2197, 1e-4); 564s assert (c, 0.1207, 1e-4); 564s 21 tests, 21 passed, 0 known failure, 0 skipped 564s [inst/histfit.m] 564s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/histfit.m 564s ***** demo 564s histfit (randn (100, 1)) 564s ***** demo 564s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 564s ***** demo 564s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 564s ***** test 564s hf = figure ("visible", "off"); 564s unwind_protect 564s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 564s histfit (x); 564s unwind_protect_cleanup 564s close (hf); 564s end_unwind_protect 564s ***** test 564s hf = figure ("visible", "off"); 564s unwind_protect 564s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 564s histfit (x); 564s unwind_protect_cleanup 564s close (hf); 564s end_unwind_protect 564s ***** test 564s hf = figure ("visible", "off"); 564s unwind_protect 564s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 564s histfit (x, 3); 564s unwind_protect_cleanup 564s close (hf); 564s end_unwind_protect 564s ***** test 564s hf = figure ("visible", "off"); 564s unwind_protect 564s histfit (randn (100, 1)); 564s unwind_protect_cleanup 564s close (hf); 564s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s ax = gca (); 565s histfit (ax, randn (100, 1)); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s ax = gca (); 565s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s ax = gca (); 565s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** test 565s hf = figure ("visible", "off"); 565s unwind_protect 565s ax = axes ("parent", hf); 565s fail ("histfit (ax)", "histfit: too few input arguments."); 565s unwind_protect_cleanup 565s close (hf); 565s end_unwind_protect 565s ***** error<histfit: X must be a numeric vector of real numbers.> ... 565s histfit ('wer') 565s ***** error<histfit: no data in X.> histfit ([NaN, NaN, NaN]); 565s ***** error<histfit: NBINS must be a real scalar integer value.> ... 565s histfit (randn (100, 1), 5.6) 565s ***** error<histfit: DISTNAME must be a character vector.> ... 565s histfit (randn (100, 1), 8, 5) 565s ***** error<histfit: DISTNAME must be a character vector.> ... 565s histfit (randn (100, 1), 8, {'normal'}) 565s ***** error<histfit: 'Kernel' distribution is not supported yet.> ... 565s histfit (randn (100, 1), 8, 'Kernel') 565s ***** error<histfit: unrecognized distribution name.> ... 565s histfit (randn (100, 1), 8, 'ASDASDASD') 565s 17 tests, 17 passed, 0 known failure, 0 skipped 565s [inst/grpstats.m] 565s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/grpstats.m 565s ***** demo 565s load carsmall; 565s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 565s n = length(m); 565s errorbar((1:n)',m,p(:,2)-m); 565s set (gca, "xtick", 1:n, "xticklabel", g); 565s title ("95% prediction intervals for mean weight by year"); 565s ***** demo 565s load carsmall; 565s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 565s {"mean", "meanci", "gname"}, 0.05) 565s [c,r] = size (m); 565s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 565s set (gca, "xtick", 1:c, "xticklabel", g); 565s title ("95% prediction intervals for mean weight by year"); 565s ***** test 565s load carsmall 565s means = grpstats (Acceleration, Origin); 565s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 565s ***** test 565s load carsmall 565s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 565s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 565s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 565s ***** test 565s load carsmall 565s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 565s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 565s ***** test 565s load carsmall 565s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 565s {"mean", "meanci", "gname"}, 0.05); 565s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 565s [1e-14, 2e-14, 1e-14]'); 565s 4 tests, 4 passed, 0 known failure, 0 skipped 565s [inst/normalise_distribution.m] 565s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/normalise_distribution.m 565s ***** test 565s v = normalise_distribution ([1 2 3], [], 1); 565s assert (v, [0 0 0]) 565s ***** test 565s v = normalise_distribution ([1 2 3], [], 2); 565s assert (v, norminv ([1 3 5] / 6), 3 * eps) 565s ***** test 565s v = normalise_distribution ([1 2 3]', [], 2); 565s assert (v, [0 0 0]') 565s ***** test 565s v = normalise_distribution ([1 2 3]', [], 1); 565s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 565s ***** test 565s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 565s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 565s ***** test 565s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 565s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 565s ***** test 565s A = randn ( 10 ); 565s N = normalise_distribution (A, @normcdf); 565s assert (A, N, 10000 * eps) 565s ***** test 565s A = exprnd (1, 100); 565s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 565s assert (mean (vec (N)), 0, 0.1) 565s assert (std (vec (N)), 1, 0.1) 565s ***** test 565s A = rand (1000,1); 565s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 565s assert (mean (vec (N)), 0, 0.2) 565s assert (std (vec (N)), 1, 0.1) 565s ***** test 565s A = [rand(1000,1), randn(1000, 1)]; 565s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 565s assert (mean (N), [0, 0], 0.2) 565s assert (std (N), [1, 1], 0.1) 565s ***** test 565s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 565s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 565s assert (mean (N, 2), [0, 0, 0]', 0.2); 565s assert (std (N, [], 2), [1, 1, 1]', 0.1); 565s ***** xtest 565s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 565s N = normalise_distribution (A); 565s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 565s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 565s ***** test 565s ***** error normalise_distribution (zeros (3, 4), ... 565s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 565s 14 tests, 14 passed, 0 known failure, 0 skipped 565s [inst/cophenet.m] 565s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cophenet.m 565s ***** demo 565s randn ("seed", 5) # for reproducibility 565s X = randn (10,2); 565s y = pdist (X); 565s Z = linkage (y, "average"); 565s cophenet (Z, y) 565s ***** error<cophenet: function called with too few input arguments.> cophenet () 565s ***** error<cophenet: function called with too few input arguments.> cophenet (1) 565s ***** error<cophenet: Z must be a matrix as generated by the linkage function.> ... 565s cophenet (ones (2,2), 1) 565s ***** error<cophenet: Y must be a vector of euclidean distances.> ... 565s cophenet ([1 2 1], "a") 565s ***** error<cophenet: Y must be a vector of euclidean distances.> ... 565s cophenet ([1 2 1], [1 2]) 565s 5 tests, 5 passed, 0 known failure, 0 skipped 565s [inst/logit.m] 565s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/logit.m 565s ***** test 565s p = [0.01:0.01:0.99]; 565s assert (logit (p), log (p ./ (1-p)), 25*eps); 565s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 565s ***** error logit () 566s ***** error logit (1, 2) 566s 4 tests, 4 passed, 0 known failure, 0 skipped 566s [inst/fitcsvm.m] 566s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitcsvm.m 566s ***** demo 566s ## Use a subset of Fisher's iris data set 566s 566s load fisheriris 566s inds = ! strcmp (species, 'setosa'); 566s X = meas(inds, [3,4]); 566s Y = species(inds); 566s 566s ## Train a linear SVM classifier 566s SVMModel = fitcsvm (X, Y) 566s 566s ## Plot a scatter diagram of the data and circle the support vectors. 566s sv = SVMModel.SupportVectors; 566s figure 566s gscatter (X(:,1), X(:,2), Y) 566s hold on 566s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 566s legend ('versicolor', 'virginica', 'Support Vector') 566s hold off 566s ***** test 566s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 566s y = {"a"; "a"; "b"; "b"}; 566s a = fitcsvm (x, y); 566s assert (class (a), "ClassificationSVM"); 566s assert ({a.X, a.Y}, {x, y}) 566s assert (a.NumObservations, 4) 566s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 566s assert (a.ModelParameters.SVMtype, "c_svc") 566s assert (a.ClassNames, {"a"; "b"}) 566s ***** test 566s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 566s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 566s a = fitcsvm (x, y); 566s assert (class (a), "ClassificationSVM"); 566s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 566s assert (a.ModelParameters.BoxConstraint, 1) 566s assert (a.ModelParameters.KernelOffset, 0) 566s assert (a.ClassNames, [1; -1]) 566s ***** test 566s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 566s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 566s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 566s "KernelOffset", 2); 566s assert (class (a), "ClassificationSVM"); 566s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 566s assert (a.ModelParameters.BoxConstraint, 2) 566s assert (a.ModelParameters.KernelOffset, 2) 566s assert (isempty (a.Alpha), true) 566s assert (isempty (a.Beta), false) 566s ***** test 566s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 566s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 566s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 566s assert (class (a), "ClassificationSVM"); 566s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 566s assert (a.ModelParameters.PolynomialOrder, 3) 566s assert (isempty (a.Alpha), true) 566s assert (isempty (a.Beta), false) 566s ***** test 566s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 566s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 566s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 566s assert (class (a), "ClassificationSVM"); 566s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 566s assert (a.ModelParameters.PolynomialOrder, 3) 566s assert (isempty (a.Alpha), false) 566s assert (isempty (a.Beta), true) 566s ***** test 566s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 566s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 566s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 566s assert (class (a), "ClassificationPartitionedModel"); 566s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 566s assert (a.ModelParameters.PolynomialOrder, 3) 566s assert (isempty (a.Trained{1}.Alpha), false) 566s assert (isempty (a.Trained{1}.Beta), true) 566s ***** error<fitcsvm: too few arguments.> fitcsvm () 566s ***** error<fitcsvm: too few arguments.> fitcsvm (ones (4,1)) 566s ***** error<fitcsvm: Name-Value arguments must be in pairs.> 566s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 566s ***** error<fitcsvm: number of rows in X and Y must be equal.> 566s fitcsvm (ones (4,2), ones (3, 1)) 566s ***** error<fitcsvm: number of rows in X and Y must be equal.> 566s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 566s ***** error <fitcsvm: 'CrossVal' must be either 'off' or 'on'.> 566s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 566s ***** error <fitcsvm: 'CrossVal' must be either 'off' or 'on'.> 566s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 566s ***** error <fitcsvm: You can use only one cross-validation name-value pair argument> ... 566s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 566s 14 tests, 14 passed, 0 known failure, 0 skipped 566s [inst/pca.m] 566s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/pca.m 566s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 566s ***** test 566s x=[7 4 3 566s 4 1 8 566s 6 3 5 566s 8 6 1 566s 8 5 7 566s 7 2 9 566s 5 3 3 566s 9 5 8 566s 7 4 5 566s 8 2 2]; 566s R = corrcoef (x); 566s [V, lambda] = eig (R); 566s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 566s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 566s ***** 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 566s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 566s F = zscore(x)*B; 566s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 566s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 566s ***** test 566s x=[1,2,3;2,1,3]'; 566s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 566s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 566s m(:,1) = m(:,1)*sign(COEFF(1,1)); 566s m(:,2) = m(:,2)*sign(COEFF(1,2)); 566s ***** assert(COEFF,m(1:2,:),10*eps); 566s ***** assert(SCORE,-m,10*eps); 566s ***** assert(latent,[1.5;.5],10*eps); 566s ***** assert(tsquare,[4;4;4]/3,10*eps); 566s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 566s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 566s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 566s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 566s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 566s !!!!! known failure 566s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 566s 566s Location | Observed | Expected | Reason 566s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 566s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 566s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 566s ***** test 566s x=x'; 566s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 566s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 566s m(:,1) = m(:,1)*sign(COEFF(1,1)); 566s m(:,2) = m(:,2)*sign(COEFF(1,2)); 566s m(:,3) = m(:,3)*sign(COEFF(3,3)); 566s ***** assert(COEFF,m,10*eps); 566s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 566s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 566s ***** assert(latent,[1;0;0],10*eps); 566s ***** assert(tsquare,[0.5;0.5],10*eps) 566s ***** test 566s [COEFF,SCORE,latent,tsquare] = pca(x); 566s ***** assert(COEFF,m(:, 1),10*eps); 566s ***** assert(SCORE,-m(1:2,1),10*eps); 566s ***** assert(latent,[1],10*eps); 566s ***** assert(tsquare,[0.5;0.5],10*eps) 566s ***** error <invalid algorithm> pca([1 2; 3 4], "Algorithm", "xxx") 566s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 566s ***** error <must be a positive integer> pca([1 2; 3 4], "NumComponents", -4) 566s ***** error <invalid value for rows> pca([1 2; 3 4], "Rows", 1) 566s ***** error <weights must be> pca([1 2; 3 4], "Weights", [1 2 3]) 566s ***** error <weights must be> pca([1 2; 3 4], "Weights", [-1 2]) 566s ***** error <variable weights must be> pca([1 2; 3 4], "VariableWeights", [-1 2]) 566s ***** error <variable weights must be> pca([1 2; 3 4], "VariableWeights", "xxx") 566s ***** error <unknown property> pca([1 2; 3 4], "XXX", 1) 566s 32 tests, 31 passed, 1 known failure, 0 skipped 566s [inst/barttest.m] 566s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/barttest.m 566s ***** error<barttest: invalid number of input arguments.> barttest () 566s ***** error<barttest: NaN values in input are not allowed.> barttest ([2,NaN;3,4]) 566s ***** error<barttest: wrong value for alpha.> barttest (ones (30, 4), "alpha") 566s ***** error<barttest: wrong value for alpha.> barttest (ones (30, 4), 0) 566s ***** error<barttest: wrong value for alpha.> barttest (ones (30, 4), 1.2) 566s ***** error<barttest: wrong value for alpha.> barttest (ones (30, 4), [0.2, 0.05]) 566s ***** error<barttest: not enough data in X.> barttest (ones (30, 1)) 566s ***** error<barttest: not enough data in X.> barttest (ones (30, 1), 0.05) 566s ***** test 566s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 566s [ndim, pval, chisq] = barttest (x); 566s assert (ndim, 2); 566s assert (pval, 0); 566s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 566s ***** test 566s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 566s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 566s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 566s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 566s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 566s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 566s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 566s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 566s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 566s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 566s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 566s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 566s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 566s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 566s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 566s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 566s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 566s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 566s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 566s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 566s [ndim, pval, chisq] = barttest (x); 566s assert (ndim, 3); 566s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 566s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 566s assert (chisq, chisq_out, 1e-4); 566s 10 tests, 10 passed, 0 known failure, 0 skipped 566s [inst/anovan.m] 566s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/anovan.m 566s ***** demo 566s 566s # Two-sample unpaired test on independent samples (equivalent to Student's 566s # t-test). Note that the absolute value of t-statistic can be obtained by 566s # taking the square root of the reported F statistic. In this example, 566s # t = sqrt (1.44) = 1.20. 566s 566s score = [54 23 45 54 45 43 34 65 77 46 65]'; 566s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 566s "female" "female" "female"}'; 566s 566s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 566s ***** demo 566s 566s # Two-sample paired test on dependent or matched samples equivalent to a 566s # paired t-test. As for the first example, the t-statistic can be obtained by 566s # taking the square root of the reported F statistic. Note that the interaction 566s # between treatment x subject was dropped from the full model by assigning 566s # subject as a random factor ('). 566s 566s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 566s treatment = {"before" "after"; "before" "after"; "before" "after"; 566s "before" "after"; "before" "after"}'; 566s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 566s 566s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 566s "model", "full", "random", 2, "sstype", 2, ... 566s "varnames", {"treatment", "subject"}, ... 566s "display", "on"); 566s ***** demo 566s 566s # One-way ANOVA on the data from a study on the strength of structural beams, 566s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 566s 566s strength = [82 86 79 83 84 85 86 87 74 82 ... 566s 78 75 76 77 79 79 77 78 82 79]'; 566s alloy = {"st","st","st","st","st","st","st","st", ... 566s "al1","al1","al1","al1","al1","al1", ... 566s "al2","al2","al2","al2","al2","al2"}'; 566s 566s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 566s "varnames", "alloy"); 566s ***** demo 566s 566s # One-way repeated measures ANOVA on the data from a study on the number of 566s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 566s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 566s # between seconds x subject was dropped from the full model by assigning 566s # subject as a random factor ('). 566s 566s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 566s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 566s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 566s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 566s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 566s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 566s 566s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 566s "model", "full", "random", 2, "sstype", 2, ... 566s "display", "on", "varnames", {"seconds", "subject"}); 566s ***** demo 566s 566s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 566s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 566s # New York: MacMillan 566s 566s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 566s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 566s brands = {"Gourmet", "National", "Generic"; ... 566s "Gourmet", "National", "Generic"; ... 566s "Gourmet", "National", "Generic"; ... 566s "Gourmet", "National", "Generic"; ... 566s "Gourmet", "National", "Generic"; ... 566s "Gourmet", "National", "Generic"}; 566s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 566s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 566s 566s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 566s "display", "on", "model", "full", ... 566s "varnames", {"brands", "popper"}); 566s ***** demo 566s 566s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 566s # gender and having a college degree on salaries of company employees, 566s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 566s 566s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 566s 25 29 27 19 18 21 20 21 22 19]'; 566s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 566s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 566s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 566s 566s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 566s "sstype", 3, "display", "on", "varnames", ... 566s {"gender", "degree"}); 566s ***** demo 566s 566s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 566s # adding sugar and/or milk on the tendency of coffee to make people babble, 566s # in from Navarro (2019): 16.10 566s 566s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 566s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 566s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 566s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 566s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 566s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 566s 566s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 566s "sstype", 3, "display", "on", ... 566s "varnames", {"sugar", "milk"}); 566s ***** demo 566s 566s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 566s # of three different drugs, biofeedback and diet on patient blood pressure, 566s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 566s # * Missing values introduced to make the sample sizes unequal to test the 566s # calculation of different types of sums-of-squares 566s 566s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 566s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 566s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 566s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 566s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 566s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 566s 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; 566s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 566s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 566s 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; 566s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 566s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 566s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 566s 173 194 197 190 176 198 164 190 169 164 176 175; 566s 186 194 201 215 219 209 164 166 159 182 187 174 ... 566s 189 194 217 206 199 195 171 173 196 199 180 NaN; 566s 180 187 199 170 204 194 162 184 183 156 180 173 ... 566s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 566s 566s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 566s "model", "full", "sstype", 3, ... 566s "display", "on", ... 566s "varnames", {"drug", "feedback", "diet"}); 566s ***** demo 566s 566s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 566s # factor. The data is from a randomized block design study on the effects 566s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 566s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 566s # Note that all interactions involving block were dropped from the full model 566s # by assigning block as a random factor ('). 566s 566s measurement = [444 614 423 625 408 856 447 719 ... 566s 764 831 586 782 609 1002 606 766]'; 566s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 566s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 566s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 566s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 566s 566s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 566s "sstype", 2, "model", "full", "random", 3, ... 566s "display", "on", ... 566s "varnames", {"strain", "treatment", "block"}); 566s ***** demo 566s 566s # One-way ANCOVA on data from a study of the additive effects of species 566s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 566s # Text eveR 566s 566s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 566s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 566s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 566s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 566s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 566s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 566s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 566s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 566s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 566s 566s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 566s "continuous", 2, "sstype", "h", "display", "on", ... 566s "varnames", {"species", "temp"}); 566s ***** demo 566s 566s # Factorial ANCOVA on data from a study of the effects of treatment and 566s # exercise on stress reduction score after adjusting for age. Data from R 566s # datarium package). 566s 566s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 566s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 566s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 566s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 566s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 566s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 566s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 566s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 566s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 566s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 566s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 566s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 566s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 566s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 566s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 566s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 566s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 566s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 566s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 566s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 566s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 566s 566s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 566s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 566s "continuous", 3, "sstype", "h", "display", "on", ... 566s "varnames", {"treatment", "exercise", "age"}); 566s ***** demo 566s 566s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 566s # relating to the contrasts are shown in the table of model parameters, and 566s # can be retrieved from the STATS.coeffs output. 566s 566s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 566s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 566s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 566s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 566s 25.694 ]'; 566s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 566s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 566s C = [ 0.4001601 0.3333333 0.5 0.0 566s 0.4001601 0.3333333 -0.5 0.0 566s 0.4001601 -0.6666667 0.0 0.0 566s -0.6002401 0.0000000 0.0 0.5 566s -0.6002401 0.0000000 0.0 -0.5]; 566s 566s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 566s "alpha", 0.05, "display", "on"); 566s ***** demo 566s 566s # One-way ANOVA with the linear model fit by weighted least squares to 566s # account for heteroskedasticity. In this example, the variance appears 566s # proportional to the outcome, so weights have been estimated by initially 566s # fitting the model without weights and regressing the absolute residuals on 566s # the fitted values. Although this data could have been analysed by Welch's 566s # ANOVA test, the approach here can generalize to ANOVA models with more than 566s # one factor. 566s 566s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 566s 2, 2, 2, 2, 2, 2, 2, 2, ... 566s 3, 3, 3, 3, 3, 3, 3, 3]'; 566s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 566s 10, 25, 66, 43, 47, 56, 6, 39, ... 566s 11, 39, 26, 35, 25, 14, 24, 17]'; 566s 566s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 566s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 566s b = polyfit (fitted, abs (STATS.resid), 1); 566s v = polyval (b, fitted); # Variance as a function of the fitted values 566s figure("Name", "Regression of the absolute residuals on the fitted values"); 566s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 566s xlabel("Fitted values"); ylabel("Absolute residuals"); 566s 566s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 566s ***** test 566s score = [54 23 45 54 45 43 34 65 77 46 65]'; 566s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 566s 'female' 'female' 'female'}'; 566s 566s [P, T, STATS] = anovan (score,gender,'display','off'); 566s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 566s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 566s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 566s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 566s ***** test 566s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 566s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 566s 'before' 'after'; 'before' 'after'}'; 566s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 566s 566s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 566s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 566s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 566s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 566s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 566s ***** test 566s strength = [82 86 79 83 84 85 86 87 74 82 ... 566s 78 75 76 77 79 79 77 78 82 79]'; 566s alloy = {'st','st','st','st','st','st','st','st', ... 566s 'al1','al1','al1','al1','al1','al1', ... 566s 'al2','al2','al2','al2','al2','al2'}'; 566s 566s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 566s assert (P(1), 0.000152643638830491, 1e-09); 566s assert (ATAB{2,6}, 15.4, 1e-09); 566s ***** test 566s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 566s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 566s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 566s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 566s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 566s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 566s 566s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 566s assert (P(1), 1.51865926758752e-07, 1e-09); 566s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 566s assert (ATAB{3,2}, 942.533333333333, 1e-09); 566s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 566s ***** test 566s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 566s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 566s brands = {'Gourmet', 'National', 'Generic'; ... 566s 'Gourmet', 'National', 'Generic'; ... 566s 'Gourmet', 'National', 'Generic'; ... 566s 'Gourmet', 'National', 'Generic'; ... 566s 'Gourmet', 'National', 'Generic'; ... 566s 'Gourmet', 'National', 'Generic'}; 566s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 566s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 566s 566s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 566s assert (P(1), 7.67895738278171e-07, 1e-09); 566s assert (P(2), 0.000100373896304998, 1e-09); 566s assert (P(3), 0.746215396636649, 1e-09); 566s assert (ATAB{2,6}, 56.7, 1e-09); 566s assert (ATAB{3,6}, 32.4, 1e-09); 566s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 566s ***** test 566s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 566s 25 29 27 19 18 21 20 21 22 19]'; 566s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 566s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 566s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 566s 566s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 566s assert (P(1), 0.747462549227232, 1e-09); 566s assert (P(2), 1.03809316857694e-08, 1e-09); 566s assert (P(3), 0.523689833702691, 1e-09); 566s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 566s assert (ATAB{3,2}, 272.391841491841, 1e-09); 566s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 566s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 566s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 566s assert (P(1), 2.53445097305047e-08, 1e-09); 566s assert (P(2), 0.00388133678528749, 1e-09); 566s assert (P(3), 0.523689833702671, 1e-09); 566s assert (ATAB{2,2}, 242.227272727273, 1e-09); 566s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 566s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 566s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 566s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 566s assert (P(1), 0.00388133678528743, 1e-09); 566s assert (P(2), 1.03809316857694e-08, 1e-09); 566s assert (P(3), 0.523689833702691, 1e-09); 566s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 566s assert (ATAB{3,2}, 272.391841491841, 1e-09); 566s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 566s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 566s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 566s assert (P(1), 0.00442898146583742, 1e-09); 566s assert (P(2), 1.30634252053587e-08, 1e-09); 566s assert (P(3), 0.523689833702691, 1e-09); 566s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 566s assert (ATAB{3,2}, 264.335664335664, 1e-09); 566s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 566s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 566s ***** test 566s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 566s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 566s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 566s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 566s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 566s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 566s 566s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 566s assert (P(1), 0.0108632139833963, 1e-09); 566s assert (P(2), 0.0810606976703546, 1e-09); 566s assert (P(3), 0.00175433329935627, 1e-09); 566s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 566s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 566s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 566s assert (ATAB{5,2}, 3.1625, 1e-09); 566s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 566s assert (P(1), 0.0373333189297505, 1e-09); 566s assert (P(2), 0.017075098787169, 1e-09); 566s assert (P(3), 0.00175433329935627, 1e-09); 566s assert (ATAB{2,2}, 1.444, 1e-09); 566s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 566s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 566s assert (ATAB{5,2}, 3.1625, 1e-09); 566s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 566s assert (P(1), 0.017075098787169, 1e-09); 566s assert (P(2), 0.0810606976703546, 1e-09); 566s assert (P(3), 0.00175433329935627, 1e-09); 566s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 566s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 566s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 566s assert (ATAB{5,2}, 3.1625, 1e-09); 566s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 566s assert (P(1), 0.0454263063473954, 1e-09); 566s assert (P(2), 0.0746719907091438, 1e-09); 566s assert (P(3), 0.00175433329935627, 1e-09); 566s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 566s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 566s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 566s assert (ATAB{5,2}, 3.1625, 1e-09); 566s ***** test 566s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 566s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 566s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 566s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 566s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 566s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 566s 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; 566s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 566s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 566s 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; 566s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 566s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 566s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 566s 173 194 197 190 176 198 164 190 169 164 176 175; 566s 186 194 201 215 219 209 164 166 159 182 187 174 ... 566s 189 194 217 206 199 195 171 173 196 199 180 NaN; 566s 180 187 199 170 204 194 162 184 183 156 180 173 ... 566s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 566s 566s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 566s assert (P(1), 7.02561843825325e-05, 1e-09); 566s assert (P(2), 0.000425806013389362, 1e-09); 566s assert (P(3), 6.16780773446401e-07, 1e-09); 566s assert (P(4), 0.261347622678438, 1e-09); 566s assert (P(5), 0.0542278432357043, 1e-09); 566s assert (P(6), 0.590353225626655, 1e-09); 566s assert (P(7), 0.0861628249564267, 1e-09); 566s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 566s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 566s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 566s assert (ATAB{5,2}, 437.066007908781, 1e-09); 566s assert (ATAB{6,2}, 976.180770397332, 1e-09); 566s assert (ATAB{7,2}, 46.616653365254, 1e-09); 566s assert (ATAB{8,2}, 814.345251396648, 1e-09); 566s assert (ATAB{9,2}, 9065.8, 1e-09); 566s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 566s assert (P(1), 9.4879638470754e-05, 1e-09); 566s assert (P(2), 0.00124177666315809, 1e-09); 566s assert (P(3), 6.86162012732911e-07, 1e-09); 566s assert (P(4), 0.260856132341256, 1e-09); 566s assert (P(5), 0.0523758623892078, 1e-09); 566s assert (P(6), 0.590353225626655, 1e-09); 566s assert (P(7), 0.0861628249564267, 1e-09); 566s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 566s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 566s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 566s assert (ATAB{5,2}, 437.693674777847, 1e-09); 566s assert (ATAB{6,2}, 988.431929811402, 1e-09); 566s assert (ATAB{7,2}, 46.616653365254, 1e-09); 566s assert (ATAB{8,2}, 814.345251396648, 1e-09); 566s assert (ATAB{9,2}, 9065.8, 1e-09); 566s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 566s assert (P(1), 0.000106518678028207, 1e-09); 566s assert (P(2), 0.00125371366571508, 1e-09); 566s assert (P(3), 5.30813260778464e-07, 1e-09); 566s assert (P(4), 0.308353667232981, 1e-09); 566s assert (P(5), 0.0562901327343161, 1e-09); 566s assert (P(6), 0.599091042141092, 1e-09); 566s assert (P(7), 0.0861628249564267, 1e-09); 566s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 566s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 566s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 566s assert (ATAB{5,2}, 382.07709497207, 1e-09); 566s assert (ATAB{6,2}, 963.037988826813, 1e-09); 566s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 566s assert (ATAB{8,2}, 814.345251396648, 1e-09); 566s assert (ATAB{9,2}, 9065.8, 1e-09); 567s ***** test 567s measurement = [444 614 423 625 408 856 447 719 ... 567s 764 831 586 782 609 1002 606 766]'; 567s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 567s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 567s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 567s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 567s 567s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 567s assert (P(1), 0.0914352969909372, 1e-09); 567s assert (P(2), 5.04077373924908e-05, 1e-09); 567s assert (P(4), 0.0283196918836667, 1e-09); 567s assert (ATAB{2,2}, 286.132500000002, 1e-09); 567s assert (ATAB{3,2}, 2275.29, 1e-09); 567s assert (ATAB{4,2}, 1242.5625, 1e-09); 567s assert (ATAB{5,2}, 495.905000000001, 1e-09); 567s assert (ATAB{6,2}, 207.007499999999, 1e-09); 567s ***** test 567s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 567s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 567s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 567s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 567s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 567s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 567s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 567s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 567s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 567s 567s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 567s assert (P(1), 6.27153318786007e-14, 1e-09); 567s assert (P(2), 2.48773241196644e-25, 1e-09); 567s assert (ATAB{2,2}, 598.003953318404, 1e-09); 567s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 567s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 567s assert (ATAB{2,6}, 187.399388123951, 1e-09); 567s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 567s ***** test 567s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 567s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 567s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 567s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 567s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 567s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 567s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 567s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 567s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 567s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 567s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 567s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 567s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 567s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 567s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 567s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 567s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 567s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 567s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 567s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 567s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 567s 567s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 567s assert (P(5), 0.9245630968248468, 1e-09); 567s assert (P(6), 0.791115159521822, 1e-09); 567s assert (P(7), 0.9296668751457956, 1e-09); 567s [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'); 567s assert (P(1), 0.00158132928938933, 1e-09); 567s assert (P(2), 2.12537505039986e-07, 1e-09); 567s assert (P(3), 0.00390292555160047, 1e-09); 567s assert (P(4), 0.0164086580775543, 1e-09); 567s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 567s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 567s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 567s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 567s ***** test 567s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 567s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 567s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 567s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 567s 25.694 ]'; 567s 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]'; 567s C = [ 0.4001601 0.3333333 0.5 0.0 567s 0.4001601 0.3333333 -0.5 0.0 567s 0.4001601 -0.6666667 0.0 0.0 567s -0.6002401 0.0000000 0.0 0.5 567s -0.6002401 0.0000000 0.0 -0.5]; 567s 567s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 567s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 567s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 567s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 567s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 567s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 567s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 567s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 567s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 567s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 567s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 567s assert (STATS.coeffs(1,5), 40.161, 1e-03); 567s assert (STATS.coeffs(2,5), -9.624, 1e-03); 567s assert (STATS.coeffs(3,5), -3.825, 1e-03); 567s assert (STATS.coeffs(4,5), -4.875, 1e-03); 567s assert (STATS.coeffs(5,5), -5.515, 1e-03); 567s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 567s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 567s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 567s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 567s 12 tests, 12 passed, 0 known failure, 0 skipped 567s [inst/qrandn.m] 567s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/qrandn.m 567s ***** demo 567s z = qrandn (-5, 5e6); 567s [c x] = hist (z,linspace(-1.5,1.5,200),1); 567s figure(1) 567s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 567s 567s z = qrandn (-0.14286, 5e6); 567s [c x] = hist (z,linspace(-2,2,200),1); 567s figure(2) 567s plot(x,c,"r."); axis tight; axis([-2,2]); 567s 567s z = qrandn (2.75, 5e6); 567s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 567s figure(3) 567s semilogy(x,c,"r."); axis tight; axis([-100,100]); 567s 567s # --------- 567s # Figures from the reference paper. 567s ***** error<qrandn: the parameter q must be a scalar.> qrandn ([1 2], 1) 567s ***** error<qrandn: the parameter q must be lower than 3.> qrandn (4, 1) 567s ***** error<qrandn: the parameter q must be lower than 3.> qrandn (3, 1) 567s ***** error qrandn (2.5, 1, 2, 3) 567s ***** error qrandn (2.5) 567s ***** test 567s q = 1.5; 567s s = [2, 3]; 567s z = qrandn (q, s); 567s assert (isnumeric (z) && isequal (size (z), s)); 567s 6 tests, 6 passed, 0 known failure, 0 skipped 567s [inst/ff2n.m] 567s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ff2n.m 567s ***** error ff2n (); 567s ***** error ff2n (2, 5); 567s ***** error ff2n (2.5); 567s ***** error ff2n (0); 567s ***** error ff2n (-3); 567s ***** error ff2n (3+2i); 567s ***** error ff2n (Inf); 567s ***** error ff2n (NaN); 567s ***** test 567s A = ff2n (3); 567s assert (A, fullfact (3)); 567s ***** test 567s A = ff2n (8); 567s assert (A, fullfact (8)); 567s 10 tests, 10 passed, 0 known failure, 0 skipped 567s [inst/cdfplot.m] 567s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cdfplot.m 567s ***** demo 567s x = randn(100,1); 567s cdfplot (x); 567s ***** test 567s hf = figure ("visible", "off"); 567s unwind_protect 567s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 567s [hCDF, stats] = cdfplot (x); 567s assert (stats.min, 2); 567s assert (stats.max, 6); 567s assert (stats.median, 3.5); 567s assert (stats.std, 1.35400640077266, 1e-14); 567s unwind_protect_cleanup 567s close (hf); 567s end_unwind_protect 567s ***** test 567s hf = figure ("visible", "off"); 567s unwind_protect 567s x = randn(100,1); 567s cdfplot (x); 567s unwind_protect_cleanup 567s close (hf); 567s end_unwind_protect 567s ***** error cdfplot (); 567s ***** error cdfplot ([x',x']); 567s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 567s 5 tests, 5 passed, 0 known failure, 0 skipped 567s [inst/regress.m] 567s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/regress.m 567s ***** test 567s % Longley data from the NIST Statistical Reference Dataset 567s Z = [ 60323 83.0 234289 2356 1590 107608 1947 567s 61122 88.5 259426 2325 1456 108632 1948 567s 60171 88.2 258054 3682 1616 109773 1949 567s 61187 89.5 284599 3351 1650 110929 1950 567s 63221 96.2 328975 2099 3099 112075 1951 567s 63639 98.1 346999 1932 3594 113270 1952 567s 64989 99.0 365385 1870 3547 115094 1953 567s 63761 100.0 363112 3578 3350 116219 1954 567s 66019 101.2 397469 2904 3048 117388 1955 567s 67857 104.6 419180 2822 2857 118734 1956 567s 68169 108.4 442769 2936 2798 120445 1957 567s 66513 110.8 444546 4681 2637 121950 1958 567s 68655 112.6 482704 3813 2552 123366 1959 567s 69564 114.2 502601 3931 2514 125368 1960 567s 69331 115.7 518173 4806 2572 127852 1961 567s 70551 116.9 554894 4007 2827 130081 1962 ]; 567s % Results certified by NIST using 500 digit arithmetic 567s % b and standard error in b 567s V = [ -3482258.63459582 890420.383607373 567s 15.0618722713733 84.9149257747669 567s -0.358191792925910E-01 0.334910077722432E-01 567s -2.02022980381683 0.488399681651699 567s -1.03322686717359 0.214274163161675 567s -0.511041056535807E-01 0.226073200069370 567s 1829.15146461355 455.478499142212 ]; 567s Rsq = 0.995479004577296; 567s F = 330.285339234588; 567s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 567s alpha = 0.05; 567s [b, bint, r, rint, stats] = regress (y, X, alpha); 567s assert(b,V(:,1),4e-6); 567s assert(stats(1),Rsq,1e-12); 567s assert(stats(2),F,3e-8); 567s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 567s warning: matrix singular to machine precision, rcond = 3.50566e-20 567s warning: called from 567s regress at line 131 column 7 567s __test__ at line 33 column 28 567s test at line 682 column 11 567s /tmp/tmp.yyrYB2ouCU at line 1030 column 31 567s 567s 1 test, 1 passed, 0 known failure, 0 skipped 567s [inst/slicesample.m] 567s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/slicesample.m 567s ***** demo 567s ## Define function to sample 567s d = 2; 567s mu = [-1; 2]; 567s rand ("seed", 5) # for reproducibility 567s Sigma = rand (d); 567s Sigma = (Sigma + Sigma'); 567s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 567s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 567s 567s ## Inputs 567s start = ones (1,2); 567s nsamples = 500; 567s K = 500; 567s m = 10; 567s rande ("seed", 4); rand ("seed", 5) # for reproducibility 567s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 567s figure; 567s hold on; 567s plot (smpl(:,1), smpl(:,2), 'x'); 567s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 567s z = reshape (pdf ([x(:), y(:)]), size(x)); 567s mesh (x, y, z, "facecolor", "None"); 567s 567s ## Using sample points to find the volume of half a sphere with radius of .5 567s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 567s int = mean (f (smpl) ./ pdf (smpl)); 567s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 567s trueerr = abs (2/3*pi*.25^(3/2)-int); 567s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 567s fprintf ("Monte Carlo integral error estimate %f\n", errest); 567s fprintf ("The actual error %f\n", trueerr); 567s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 567s ***** demo 567s ## Integrate truncated normal distribution to find normilization constant 567s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 567s nsamples = 1e3; 567s rande ("seed", 4); rand ("seed", 5) # for reproducibility 567s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 567s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 567s x = linspace (-3, 3, 1000); 567s area (x, f(x)); 567s xlabel ("x"); 567s ylabel ("f(x)"); 567s int = mean (f (smpl) ./ pdf (smpl)); 567s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 567s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 567s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 567s fprintf("Monte Carlo integral error estimate %f\n", errest); 567s fprintf("The actual error %f\n", trueerr); 567s ***** test 567s start = 0.5; 567s nsamples = 1e3; 567s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 567s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 567s assert (mean (smpl, 1), 1, .15); 567s assert (var (smpl, 1), 1, .25); 568s ***** error slicesample (); 568s ***** error slicesample (1); 568s ***** error slicesample (1, 1); 568s 4 tests, 4 passed, 0 known failure, 0 skipped 568s [inst/hmmgenerate.m] 568s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hmmgenerate.m 568s ***** test 568s len = 25; 568s transprob = [0.8, 0.2; 0.4, 0.6]; 568s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 568s [sequence, states] = hmmgenerate (len, transprob, outprob); 568s assert (length (sequence), len); 568s assert (length (states), len); 568s assert (min (sequence) >= 1); 568s assert (max (sequence) <= columns (outprob)); 568s assert (min (states) >= 1); 568s assert (max (states) <= rows (transprob)); 568s ***** test 568s len = 25; 568s transprob = [0.8, 0.2; 0.4, 0.6]; 568s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 568s symbols = {"A", "B", "C"}; 568s statenames = {"One", "Two"}; 568s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 568s "symbols", symbols, "statenames", statenames); 568s assert (length (sequence), len); 568s assert (length (states), len); 568s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 568s strcmp (sequence, "C") == ones (1, len)); 568s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 568s 2 tests, 2 passed, 0 known failure, 0 skipped 568s [inst/dist_wrap/pdf.m] 568s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/pdf.m 568s ***** shared x 568s x = [1:5]; 568s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 568s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 568s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 568s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 568s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 568s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 568s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 568s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 568s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 568s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 568s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 568s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 568s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 568s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 568s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 568s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 568s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 568s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 568s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 568s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 568s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 568s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 568s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 568s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 568s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 568s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 568s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 568s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 568s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 568s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 568s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 568s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 568s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 568s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 568s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 568s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 568s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 568s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 568s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 568s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 568s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 568s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 568s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 568s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 568s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 568s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 568s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 568s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 568s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 568s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 568s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 568s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 568s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 568s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 568s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 568s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 568s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 568s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 568s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 568s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 568s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 568s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 568s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 568s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 568s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 568s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 568s ***** error<pdf: distribution NAME must a char string.> pdf (1) 568s ***** error<pdf: distribution NAME must a char string.> pdf ({"beta"}) 568s ***** error<pdf: X must be numeric.> pdf ("beta", {[1 2 3 4 5]}) 568s ***** error<pdf: X must be numeric.> pdf ("beta", "text") 568s ***** error<pdf: values in X must be real.> pdf ("beta", 1+i) 568s ***** error<pdf: distribution parameters must be numeric.> ... 568s pdf ("Beta", x, "a", 2) 568s ***** error<pdf: distribution parameters must be numeric.> ... 568s pdf ("Beta", x, 5, "") 568s ***** error<pdf: distribution parameters must be numeric.> ... 568s pdf ("Beta", x, 5, {2}) 568s ***** error<pdf: chi2 distribution requires 1 parameter.> pdf ("chi2", x) 568s ***** error<pdf: Beta distribution requires 2 parameters.> pdf ("Beta", x, 5) 568s ***** error<pdf: Burr distribution requires 3 parameters.> pdf ("Burr", x, 5) 568s ***** error<pdf: Burr distribution requires 3 parameters.> pdf ("Burr", x, 5, 2) 568s 86 tests, 86 passed, 0 known failure, 0 skipped 568s [inst/dist_wrap/random.m] 568s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/random.m 568s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 569s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 569s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 569s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 569s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 569s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 569s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 569s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 569s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 569s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 569s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 569s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 569s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 569s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 569s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 569s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 569s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 569s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 569s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 569s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 569s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 569s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 569s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 569s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 569s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 569s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 569s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 569s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 569s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 569s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 569s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 569s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 569s ***** error<random: distribution NAME must a char string.> random (1) 569s ***** error<random: distribution NAME must a char string.> random ({"beta"}) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", "a", 2) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", 5, "") 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", 5, {2}) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", "a", 2, 2, 10) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", 5, "", 2, 10) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", 5, {2}, 2, 10) 569s ***** error<random: distribution parameters must be numeric.> ... 569s random ("Beta", 5, "", 2, 10) 569s ***** error<random: chi2 distribution requires 1 parameter.> random ("chi2") 569s ***** error<random: Beta distribution requires 2 parameters.> random ("Beta", 5) 569s ***** error<random: Burr distribution requires 3 parameters.> random ("Burr", 5) 569s ***** error<random: Burr distribution requires 3 parameters.> random ("Burr", 5, 2) 569s 87 tests, 87 passed, 0 known failure, 0 skipped 569s [inst/dist_wrap/mle.m] 569s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/mle.m 569s ***** error <mle: X must be a numeric vector of real values.> mle (ones (2)) 569s ***** error <mle: X must be a numeric vector of real values.> mle ("text") 569s ***** error <mle: X must be a numeric vector of real values.> mle ([1, 2, 3, i, 5]) 569s ***** error <mle: optional arguments must be in NAME-VALUE pairs.> ... 569s mle ([1:50], "distribution") 569s ***** error <mle: 'censoring' argument must have the same size as the input data in X.> ... 569s mle ([1:50], "censoring", logical ([1,0,1,0])) 569s ***** error <mle: 'frequency' argument must have the same size as the input data in X.> ... 569s mle ([1:50], "frequency", [1,0,1,0]) 569s ***** error <mle: 'frequency' argument must contain non-negative integer values.> ... 569s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 569s ***** error <mle: 'frequency' argument must contain non-negative integer values.> ... 569s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 569s ***** error <mle: invalid value for 'alpha' argument.> mle ([1:50], "alpha", [0.05, 0.01]) 569s ***** error <mle: invalid value for 'alpha' argument.> mle ([1:50], "alpha", 1) 569s ***** error <mle: invalid value for 'alpha' argument.> mle ([1:50], "alpha", -1) 569s ***** error <mle: invalid value for 'alpha' argument.> mle ([1:50], "alpha", i) 569s ***** error <mle: 'ntrials' argument must be a positive integer scalar value.> ... 569s mle ([1:50], "ntrials", -1) 569s ***** error <mle: 'ntrials' argument must be a positive integer scalar value.> ... 569s mle ([1:50], "ntrials", [20, 50]) 569s ***** error <mle: 'ntrials' argument must be a positive integer scalar value.> ... 569s mle ([1:50], "ntrials", [20.3]) 569s ***** error <mle: 'ntrials' argument must be a positive integer scalar value.> ... 569s mle ([1:50], "ntrials", 3i) 569s ***** error <mle: 'options' argument must be a structure compatible for 'fminsearch'.> ... 569s mle ([1:50], "options", 4) 569s ***** error <mle: 'options' argument must be a structure compatible for 'fminsearch'.> ... 569s mle ([1:50], "options", struct ("x", 3)) 569s ***** error <mle: unknown parameter name.> mle ([1:50], "NAME", "value") 569s ***** error <mle: censoring is not supported for the Bernoulli distribution.> ... 569s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 569s ***** error <mle: invalid data for the Bernoulli distribution.> ... 569s mle ([1 2 1 0], "distribution", "bernoulli") 569s ***** error <mle: censoring is not supported for the Beta distribution.> ... 569s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Binomial distribution.> ... 569s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 569s ***** error <mle: 'Ntrials' parameter is required for the Binomial distribution.> ... 569s mle ([1 0 1 0], "distribution", "bino") 569s ***** error <mle: censoring is not supported for the Geometric distribution.> ... 569s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Generalized Extreme Value distribution.> ... 569s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Generalized Pareto distribution.> ... 569s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 569s ***** error <mle: invalid 'theta' location parameter for the Generalized Pareto distribution.> ... 569s mle ([1 0 -1 0], "distribution", "gp") 569s ***** error <mle: censoring is not supported for the Half Normal distribution.> ... 569s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 569s ***** error <mle: invalid 'mu' location parameter for the Half Normal distribution.> ... 569s mle ([1 0 -1 0], "distribution", "hn") 569s ***** error <mle: censoring is not supported for the Negative Binomial distribution.> ... 569s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Poisson distribution.> ... 569s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Discrete Uniform distribution.> ... 569s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 569s ***** error <mle: censoring is not supported for the Continuous Uniform distribution.> ... 569s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 569s ***** error <mle: unrecognized distribution name.> mle ([1:50], "distribution", "value") 569s ***** error <mle: censoring is not supported for the Continuous Uniform distribution.> ... 569s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 569s 36 tests, 36 passed, 0 known failure, 0 skipped 569s [inst/dist_wrap/cdf.m] 569s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/cdf.m 569s ***** shared x 569s x = [1:5]; 569s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 569s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 569s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 569s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 569s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 569s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 569s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 569s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 569s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 569s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 569s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 569s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 569s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 569s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 569s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 569s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 569s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 569s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 569s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 569s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 569s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 569s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 569s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 569s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 569s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 569s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 569s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 569s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 569s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 569s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 569s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 569s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 569s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 569s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 569s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 569s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 569s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 569s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 569s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 569s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 569s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 569s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 569s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 569s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 569s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 570s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 570s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 570s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 570s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 570s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 570s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 570s ***** error<cdf: distribution NAME must a char string.> cdf (1) 570s ***** error<cdf: distribution NAME must a char string.> cdf ({"beta"}) 570s ***** error<cdf: X must be numeric.> cdf ("beta", {[1 2 3 4 5]}) 570s ***** error<cdf: X must be numeric.> cdf ("beta", "text") 570s ***** error<cdf: values in X must be real.> cdf ("beta", 1+i) 570s ***** error<cdf: distribution parameters must be numeric.> ... 570s cdf ("Beta", x, "a", 2) 570s ***** error<cdf: distribution parameters must be numeric.> ... 570s cdf ("Beta", x, 5, "") 570s ***** error<cdf: distribution parameters must be numeric.> ... 570s cdf ("Beta", x, 5, {2}) 570s ***** error<cdf: chi2 distribution requires 1 parameter.> cdf ("chi2", x) 570s ***** error<cdf: Beta distribution requires 2 parameters.> cdf ("Beta", x, 5) 570s ***** error<cdf: Burr distribution requires 3 parameters.> cdf ("Burr", x, 5) 570s ***** error<cdf: Burr distribution requires 3 parameters.> cdf ("Burr", x, 5, 2) 570s 86 tests, 86 passed, 0 known failure, 0 skipped 570s [inst/dist_wrap/makedist.m] 570s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/makedist.m 570s ***** test 570s pd = makedist ("beta"); 570s assert (class (pd), "BetaDistribution"); 570s assert (pd.a, 1); 570s assert (pd.b, 1); 570s ***** test 570s pd = makedist ("beta", "a", 5); 570s assert (pd.a, 5); 570s assert (pd.b, 1); 570s ***** test 570s pd = makedist ("beta", "b", 5); 570s assert (pd.a, 1); 570s assert (pd.b, 5); 570s ***** test 570s pd = makedist ("beta", "a", 3, "b", 5); 570s assert (pd.a, 3); 570s assert (pd.b, 5); 570s ***** test 570s pd = makedist ("binomial"); 570s assert (class (pd), "BinomialDistribution"); 570s assert (pd.N, 1); 570s assert (pd.p, 0.5); 570s ***** test 570s pd = makedist ("binomial", "N", 5); 570s assert (pd.N, 5); 570s assert (pd.p, 0.5); 570s ***** test 570s pd = makedist ("binomial", "p", 0.2); 570s assert (pd.N, 1); 570s assert (pd.p, 0.2); 570s ***** test 570s pd = makedist ("binomial", "N", 3, "p", 0.3); 570s assert (pd.N, 3); 570s assert (pd.p, 0.3); 570s ***** test 570s pd = makedist ("birnbaumsaunders"); 570s assert (class (pd), "BirnbaumSaundersDistribution"); 570s assert (pd.beta, 1); 570s assert (pd.gamma, 1); 570s ***** test 570s pd = makedist ("birnbaumsaunders", "beta", 5); 570s assert (pd.beta, 5); 570s assert (pd.gamma, 1); 570s ***** test 570s pd = makedist ("birnbaumsaunders", "gamma", 5); 570s assert (pd.beta, 1); 570s assert (pd.gamma, 5); 570s ***** test 570s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 570s assert (pd.beta, 3); 570s assert (pd.gamma, 5); 570s ***** test 570s pd = makedist ("burr"); 570s assert (class (pd), "BurrDistribution"); 570s assert (pd.alpha, 1); 570s assert (pd.c, 1); 570s assert (pd.k, 1); 570s ***** test 570s pd = makedist ("burr", "k", 5); 570s assert (pd.alpha, 1); 570s assert (pd.c, 1); 570s assert (pd.k, 5); 570s ***** test 570s pd = makedist ("burr", "c", 5); 570s assert (pd.alpha, 1); 570s assert (pd.c, 5); 570s assert (pd.k, 1); 570s ***** test 570s pd = makedist ("burr", "alpha", 3, "c", 5); 570s assert (pd.alpha, 3); 570s assert (pd.c, 5); 570s assert (pd.k, 1); 570s ***** test 570s pd = makedist ("burr", "k", 3, "c", 5); 570s assert (pd.alpha, 1); 570s assert (pd.c, 5); 570s assert (pd.k, 3); 570s ***** test 570s pd = makedist ("exponential"); 570s assert (class (pd), "ExponentialDistribution"); 570s assert (pd.mu, 1); 570s ***** test 570s pd = makedist ("exponential", "mu", 5); 570s assert (pd.mu, 5); 570s ***** test 570s pd = makedist ("extremevalue"); 570s assert (class (pd), "ExtremeValueDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("extremevalue", "mu", 5); 570s assert (class (pd), "ExtremeValueDistribution"); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("ev", "sigma", 5); 570s assert (class (pd), "ExtremeValueDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("ev", "mu", -3, "sigma", 5); 570s assert (class (pd), "ExtremeValueDistribution"); 570s assert (pd.mu, -3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("gamma"); 570s assert (class (pd), "GammaDistribution"); 570s assert (pd.a, 1); 570s assert (pd.b, 1); 570s ***** test 570s pd = makedist ("gamma", "a", 5); 570s assert (pd.a, 5); 570s assert (pd.b, 1); 570s ***** test 570s pd = makedist ("gamma", "b", 5); 570s assert (pd.a, 1); 570s assert (pd.b, 5); 570s ***** test 570s pd = makedist ("gamma", "a", 3, "b", 5); 570s assert (pd.a, 3); 570s assert (pd.b, 5); 570s ***** test 570s pd = makedist ("GeneralizedExtremeValue"); 570s assert (class (pd), "GeneralizedExtremeValueDistribution"); 570s assert (pd.k, 0); 570s assert (pd.sigma, 1); 570s assert (pd.mu, 0); 570s ***** test 570s pd = makedist ("GeneralizedExtremeValue", "k", 5); 570s assert (pd.k, 5); 570s assert (pd.sigma, 1); 570s assert (pd.mu, 0); 570s ***** test 570s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 570s assert (pd.k, 0); 570s assert (pd.sigma, 5); 570s assert (pd.mu, 0); 570s ***** test 570s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 570s assert (pd.k, 3); 570s assert (pd.sigma, 5); 570s assert (pd.mu, 0); 570s ***** test 570s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 570s assert (pd.k, 0); 570s assert (pd.sigma, 5); 570s assert (pd.mu, 3); 570s ***** test 570s pd = makedist ("GeneralizedPareto"); 570s assert (class (pd), "GeneralizedParetoDistribution"); 570s assert (pd.k, 1); 570s assert (pd.sigma, 1); 570s assert (pd.theta, 1); 570s ***** test 570s pd = makedist ("GeneralizedPareto", "k", 5); 570s assert (pd.k, 5); 570s assert (pd.sigma, 1); 570s assert (pd.theta, 1); 570s ***** test 570s pd = makedist ("GeneralizedPareto", "sigma", 5); 570s assert (pd.k, 1); 570s assert (pd.sigma, 5); 570s assert (pd.theta, 1); 570s ***** test 570s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 570s assert (pd.k, 3); 570s assert (pd.sigma, 5); 570s assert (pd.theta, 1); 570s ***** test 570s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 570s assert (pd.k, 1); 570s assert (pd.sigma, 5); 570s assert (pd.theta, 3); 570s ***** test 570s pd = makedist ("HalfNormal"); 570s assert (class (pd), "HalfNormalDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("HalfNormal", "mu", 5); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("HalfNormal", "sigma", 5); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 570s assert (pd.mu, 3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("InverseGaussian"); 570s assert (class (pd), "InverseGaussianDistribution"); 570s assert (pd.mu, 1); 570s assert (pd.lambda, 1); 570s ***** test 570s pd = makedist ("InverseGaussian", "mu", 5); 570s assert (pd.mu, 5); 570s assert (pd.lambda, 1); 570s ***** test 570s pd = makedist ("InverseGaussian", "lambda", 5); 570s assert (pd.mu, 1); 570s assert (pd.lambda, 5); 570s ***** test 570s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 570s assert (pd.mu, 3); 570s assert (pd.lambda, 5); 570s ***** test 570s pd = makedist ("logistic"); 570s assert (class (pd), "LogisticDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("logistic", "mu", 5); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("logistic", "sigma", 5); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("logistic", "mu", 3, "sigma", 5); 570s assert (pd.mu, 3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("loglogistic"); 570s assert (class (pd), "LoglogisticDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("loglogistic", "mu", 5); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("loglogistic", "sigma", 5); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 570s assert (pd.mu, 3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("Lognormal"); 570s assert (class (pd), "LognormalDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Lognormal", "mu", 5); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Lognormal", "sigma", 5); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 570s assert (pd.mu, -3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("Loguniform"); 570s assert (class (pd), "LoguniformDistribution"); 570s assert (pd.Lower, 1); 570s assert (pd.Upper, 4); 570s ***** test 570s pd = makedist ("Loguniform", "Lower", 2); 570s assert (pd.Lower, 2); 570s assert (pd.Upper, 4); 570s ***** test 570s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 570s assert (pd.Lower, 1); 570s assert (pd.Upper, 3); 570s ***** test 570s pd = makedist ("Multinomial"); 570s assert (class (pd), "MultinomialDistribution"); 570s assert (pd.Probabilities, [0.5, 0.5]); 570s ***** test 570s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 570s assert (class (pd), "MultinomialDistribution"); 570s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 570s ***** test 570s pd = makedist ("Nakagami"); 570s assert (class (pd), "NakagamiDistribution"); 570s assert (pd.mu, 1); 570s assert (pd.omega, 1); 570s ***** test 570s pd = makedist ("Nakagami", "mu", 5); 570s assert (class (pd), "NakagamiDistribution"); 570s assert (pd.mu, 5); 570s assert (pd.omega, 1); 570s ***** test 570s pd = makedist ("Nakagami", "omega", 0.3); 570s assert (class (pd), "NakagamiDistribution"); 570s assert (pd.mu, 1); 570s assert (pd.omega, 0.3); 570s ***** test 570s pd = makedist ("NegativeBinomial"); 570s assert (class (pd), "NegativeBinomialDistribution"); 570s assert (pd.R, 1); 570s assert (pd.P, 0.5); 570s ***** test 570s pd = makedist ("NegativeBinomial", "R", 5); 570s assert (class (pd), "NegativeBinomialDistribution"); 570s assert (pd.R, 5); 570s assert (pd.P, 0.5); 570s ***** test 570s pd = makedist ("NegativeBinomial", "p", 0.3); 570s assert (class (pd), "NegativeBinomialDistribution"); 570s assert (pd.R, 1); 570s assert (pd.P, 0.3); 570s ***** test 570s pd = makedist ("Normal"); 570s assert (class (pd), "NormalDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Normal", "mu", 5); 570s assert (class (pd), "NormalDistribution"); 570s assert (pd.mu, 5); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Normal", "sigma", 5); 570s assert (class (pd), "NormalDistribution"); 570s assert (pd.mu, 0); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("Normal", "mu", -3, "sigma", 5); 570s assert (class (pd), "NormalDistribution"); 570s assert (pd.mu, -3); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("PiecewiseLinear"); 570s assert (class (pd), "PiecewiseLinearDistribution"); 570s assert (pd.x, [0; 1]); 570s assert (pd.Fx, [0; 1]); 570s ***** test 570s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 570s assert (pd.x, [0; 1; 2]); 570s assert (pd.Fx, [0; 0.5; 1]); 570s ***** test 570s pd = makedist ("Poisson"); 570s assert (class (pd), "PoissonDistribution"); 570s assert (pd.lambda, 1); 570s ***** test 570s pd = makedist ("Poisson", "lambda", 5); 570s assert (pd.lambda, 5); 570s ***** test 570s pd = makedist ("Rayleigh"); 570s assert (class (pd), "RayleighDistribution"); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Rayleigh", "sigma", 5); 570s assert (pd.sigma, 5); 570s ***** test 570s pd = makedist ("Rician"); 570s assert (class (pd), "RicianDistribution"); 570s assert (pd.s, 1); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Rician", "s", 3); 570s assert (pd.s, 3); 570s assert (pd.sigma, 1); 570s ***** test 570s pd = makedist ("Rician", "sigma", 3); 570s assert (pd.s, 1); 570s assert (pd.sigma, 3); 570s ***** test 570s pd = makedist ("Rician", "s", 2, "sigma", 3); 570s assert (pd.s, 2); 570s assert (pd.sigma, 3); 571s ***** warning 571s pd = makedist ("stable"); 571s assert (class (pd), "double"); 571s assert (isempty (pd), true); 571s ***** test 571s pd = makedist ("tlocationscale"); 571s assert (class (pd), "tLocationScaleDistribution"); 571s assert (pd.mu, 0); 571s assert (pd.sigma, 1); 571s assert (pd.nu, 5); 571s ***** test 571s pd = makedist ("tlocationscale", "mu", 5); 571s assert (pd.mu, 5); 571s assert (pd.sigma, 1); 571s assert (pd.nu, 5); 571s ***** test 571s pd = makedist ("tlocationscale", "sigma", 2); 571s assert (pd.mu, 0); 571s assert (pd.sigma, 2); 571s assert (pd.nu, 5); 571s ***** test 571s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 571s assert (pd.mu, 5); 571s assert (pd.sigma, 2); 571s assert (pd.nu, 5); 571s ***** test 571s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 571s assert (pd.mu, 0); 571s assert (pd.sigma, 2); 571s assert (pd.nu, 1); 571s ***** test 571s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 571s assert (pd.mu, -2); 571s assert (pd.sigma, 3); 571s assert (pd.nu, 1); 571s ***** test 571s pd = makedist ("Triangular"); 571s assert (class (pd), "TriangularDistribution"); 571s assert (pd.A, 0); 571s assert (pd.B, 0.5); 571s assert (pd.C, 1); 571s ***** test 571s pd = makedist ("Triangular", "A", -2); 571s assert (pd.A, -2); 571s assert (pd.B, 0.5); 571s assert (pd.C, 1); 571s ***** test 571s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 571s assert (pd.A, 0.5); 571s assert (pd.B, 0.9); 571s assert (pd.C, 1); 571s ***** test 571s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 571s assert (pd.A, 1); 571s assert (pd.B, 2); 571s assert (pd.C, 5); 571s ***** test 571s pd = makedist ("Uniform"); 571s assert (class (pd), "UniformDistribution"); 571s assert (pd.Lower, 0); 571s assert (pd.Upper, 1); 571s ***** test 571s pd = makedist ("Uniform", "Lower", -2); 571s assert (pd.Lower, -2); 571s assert (pd.Upper, 1); 571s ***** test 571s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 571s assert (pd.Lower, 1); 571s assert (pd.Upper, 3); 571s ***** test 571s pd = makedist ("Weibull"); 571s assert (class (pd), "WeibullDistribution"); 571s assert (pd.lambda, 1); 571s assert (pd.k, 1); 571s ***** test 571s pd = makedist ("Weibull", "lambda", 3); 571s assert (pd.lambda, 3); 571s assert (pd.k, 1); 571s ***** test 571s pd = makedist ("Weibull", "lambda", 3, "k", 2); 571s assert (pd.lambda, 3); 571s assert (pd.k, 2); 571s ***** error <makedist: DISTNAME must be a character vector.> makedist (1) 571s ***** error <makedist: DISTNAME must be a character vector.> makedist (["as";"sd"]) 571s ***** error <makedist: unrecognized distribution name.> makedist ("some") 571s ***** error <makedist: optional arguments must be in NAME-VALUE pairs.> ... 571s makedist ("Beta", "a") 571s ***** error <makedist: unknown parameter for 'Beta' distribution.> ... 571s makedist ("Beta", "a", 1, "Q", 23) 571s ***** error <makedist: unknown parameter for 'Binomial' distribution.> ... 571s makedist ("Binomial", "N", 1, "Q", 23) 571s ***** error <makedist: unknown parameter for 'BirnbaumSaunders' distribution.> ... 571s makedist ("BirnbaumSaunders", "N", 1) 571s ***** error <makedist: unknown parameter for 'Burr' distribution.> ... 571s makedist ("Burr", "lambda", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'ExtremeValue' distribution.> ... 571s makedist ("extremevalue", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Exponential' distribution.> ... 571s makedist ("exponential", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Gamma' distribution.> ... 571s makedist ("Gamma", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'GeneralizedExtremeValue' distribution.> ... 571s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'GeneralizedPareto' distribution.> ... 571s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'HalfNormal' distribution.> ... 571s makedist ("HalfNormal", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'InverseGaussian' distribution.> ... 571s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Logistic' distribution.> ... 571s makedist ("Logistic", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Loglogistic' distribution.> ... 571s makedist ("Loglogistic", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Lognormal' distribution.> ... 571s makedist ("Lognormal", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Loguniform' distribution.> ... 571s makedist ("Loguniform", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Multinomial' distribution.> ... 571s makedist ("Multinomial", "k", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Nakagami' distribution.> ... 571s makedist ("Nakagami", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'NegativeBinomial' distribution.> ... 571s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Normal' distribution.> ... 571s makedist ("Normal", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'PiecewiseLinear' distribution.> ... 571s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Poisson' distribution.> ... 571s makedist ("Poisson", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Rayleigh' distribution.> ... 571s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Rician' distribution.> ... 571s makedist ("Rician", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Stable' distribution.> ... 571s makedist ("Stable", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'tLocationScale' distribution.> ... 571s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Triangular' distribution.> ... 571s makedist ("Triangular", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Uniform' distribution.> ... 571s makedist ("Uniform", "mu", 1, "sdfs", 34) 571s ***** error <makedist: unknown parameter for 'Weibull' distribution.> ... 571s makedist ("Weibull", "mu", 1, "sdfs", 34) 571s 131 tests, 131 passed, 0 known failure, 0 skipped 571s [inst/dist_wrap/icdf.m] 571s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/icdf.m 571s ***** shared p 571s p = [0.05:0.05:0.5]; 571s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 571s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 571s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 571s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 571s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 571s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 571s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 571s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 571s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 571s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 571s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 571s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 571s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 571s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 571s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 571s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 571s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 571s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 571s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 571s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 571s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 571s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 571s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 571s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 571s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 571s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 571s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 571s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 571s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 571s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 571s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 571s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 571s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 571s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 571s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 571s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 571s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 571s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 571s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 571s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 571s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 571s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 571s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 571s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 571s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 571s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 571s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 571s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 571s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 572s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 572s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 572s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 573s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 573s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 573s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 573s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 573s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 573s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 573s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 573s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 574s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 574s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 574s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 574s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 574s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 574s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 574s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 574s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 574s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 574s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 574s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 579s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 584s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 584s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 584s ***** error<icdf: distribution NAME must a char string.> icdf (1) 584s ***** error<icdf: distribution NAME must a char string.> icdf ({"beta"}) 584s ***** error<icdf: P must be numeric.> icdf ("beta", {[1 2 3 4 5]}) 584s ***** error<icdf: P must be numeric.> icdf ("beta", "text") 584s ***** error<icdf: values in P must be real.> icdf ("beta", 1+i) 584s ***** error<icdf: distribution parameters must be numeric.> ... 584s icdf ("Beta", p, "a", 2) 584s ***** error<icdf: distribution parameters must be numeric.> ... 584s icdf ("Beta", p, 5, "") 584s ***** error<icdf: distribution parameters must be numeric.> ... 584s icdf ("Beta", p, 5, {2}) 584s ***** error<icdf: chi2 distribution requires 1 parameter.> icdf ("chi2", p) 584s ***** error<icdf: Beta distribution requires 2 parameters.> icdf ("Beta", p, 5) 584s ***** error<icdf: Burr distribution requires 3 parameters.> icdf ("Burr", p, 5) 584s ***** error<icdf: Burr distribution requires 3 parameters.> icdf ("Burr", p, 5, 2) 584s 86 tests, 86 passed, 0 known failure, 0 skipped 584s [inst/dist_wrap/fitdist.m] 584s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_wrap/fitdist.m 584s ***** test 584s x = betarnd (1, 1, 100, 1); 584s pd = fitdist (x, "Beta"); 584s [phat, pci] = betafit (x); 584s assert ([pd.a, pd.b], phat); 584s assert (paramci (pd), pci); 584s ***** test 584s x1 = betarnd (1, 1, 100, 1); 584s x2 = betarnd (5, 2, 100, 1); 584s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 584s [phat, pci] = betafit (x1); 584s assert ([pd(1).a, pd(1).b], phat); 584s assert (paramci (pd(1)), pci); 584s [phat, pci] = betafit (x2); 584s assert ([pd(2).a, pd(2).b], phat); 584s assert (paramci (pd(2)), pci); 584s ***** test 584s N = 1; 584s x = binornd (N, 0.5, 100, 1); 584s pd = fitdist (x, "binomial"); 584s [phat, pci] = binofit (sum (x), numel (x)); 584s assert ([pd.N, pd.p], [N, phat]); 584s assert (paramci (pd), pci); 584s ***** test 584s N = 3; 584s x = binornd (N, 0.4, 100, 1); 584s pd = fitdist (x, "binomial", "ntrials", N); 584s [phat, pci] = binofit (sum (x), numel (x) * N); 584s assert ([pd.N, pd.p], [N, phat]); 584s assert (paramci (pd), pci); 584s ***** test 584s N = 1; 584s x1 = binornd (N, 0.5, 100, 1); 584s x2 = binornd (N, 0.7, 100, 1); 584s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 584s [phat, pci] = binofit (sum (x1), numel (x1)); 584s assert ([pd(1).N, pd(1).p], [N, phat]); 584s assert (paramci (pd(1)), pci); 584s [phat, pci] = binofit (sum (x2), numel (x2)); 584s assert ([pd(2).N, pd(2).p], [N, phat]); 584s assert (paramci (pd(2)), pci); 584s ***** test 584s N = 5; 584s x1 = binornd (N, 0.5, 100, 1); 584s x2 = binornd (N, 0.8, 100, 1); 584s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 584s "By", [ones(100,1); 2*ones(100,1)]); 584s [phat, pci] = binofit (sum (x1), numel (x1) * N); 584s assert ([pd(1).N, pd(1).p], [N, phat]); 584s assert (paramci (pd(1)), pci); 584s [phat, pci] = binofit (sum (x2), numel (x2) * N); 584s assert ([pd(2).N, pd(2).p], [N, phat]); 584s assert (paramci (pd(2)), pci); 584s ***** test 584s x = bisarnd (1, 1, 100, 1); 584s pd = fitdist (x, "BirnbaumSaunders"); 584s [phat, pci] = bisafit (x); 584s assert ([pd.beta, pd.gamma], phat); 584s assert (paramci (pd), pci); 585s ***** test 585s x1 = bisarnd (1, 1, 100, 1); 585s x2 = bisarnd (5, 2, 100, 1); 585s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 585s [phat, pci] = bisafit (x1); 585s assert ([pd(1).beta, pd(1).gamma], phat); 585s assert (paramci (pd(1)), pci); 585s [phat, pci] = bisafit (x2); 585s assert ([pd(2).beta, pd(2).gamma], phat); 585s assert (paramci (pd(2)), pci); 585s ***** test 585s x = burrrnd (1, 2, 1, 100, 1); 585s pd = fitdist (x, "Burr"); 585s [phat, pci] = burrfit (x); 585s assert ([pd.alpha, pd.c, pd.k], phat); 585s assert (paramci (pd), pci); 585s ***** xtest 585s x1 = burrrnd (1, 2, 1, 100, 1); 585s x2 = burrrnd (1, 0.5, 2, 100, 1); 585s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 585s [phat, pci] = burrfit (x1); 585s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 585s assert (paramci (pd(1)), pci); 585s [phat, pci] = burrfit (x2); 585s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 585s assert (paramci (pd(2)), pci); 586s ***** test 586s x = exprnd (1, 100, 1); 586s pd = fitdist (x, "exponential"); 586s [muhat, muci] = expfit (x); 586s assert ([pd.mu], muhat); 586s assert (paramci (pd), muci); 586s ***** test 586s x1 = exprnd (1, 100, 1); 586s x2 = exprnd (5, 100, 1); 586s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 586s [muhat, muci] = expfit (x1); 586s assert ([pd(1).mu], muhat); 586s assert (paramci (pd(1)), muci); 586s [muhat, muci] = expfit (x2); 586s assert ([pd(2).mu], muhat); 586s assert (paramci (pd(2)), muci); 586s ***** test 586s x = evrnd (1, 1, 100, 1); 586s pd = fitdist (x, "ev"); 586s [phat, pci] = evfit (x); 586s assert ([pd.mu, pd.sigma], phat); 586s assert (paramci (pd), pci); 586s ***** test 586s x1 = evrnd (1, 1, 100, 1); 586s x2 = evrnd (5, 2, 100, 1); 586s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 586s [phat, pci] = evfit (x1); 586s assert ([pd(1).mu, pd(1).sigma], phat); 586s assert (paramci (pd(1)), pci); 586s [phat, pci] = evfit (x2); 586s assert ([pd(2).mu, pd(2).sigma], phat); 586s assert (paramci (pd(2)), pci); 586s ***** test 586s x = gamrnd (1, 1, 100, 1); 586s pd = fitdist (x, "Gamma"); 586s [phat, pci] = gamfit (x); 586s assert ([pd.a, pd.b], phat); 586s assert (paramci (pd), pci); 586s ***** test 586s x1 = gamrnd (1, 1, 100, 1); 586s x2 = gamrnd (5, 2, 100, 1); 586s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 586s [phat, pci] = gamfit (x1); 586s assert ([pd(1).a, pd(1).b], phat); 586s assert (paramci (pd(1)), pci); 586s [phat, pci] = gamfit (x2); 586s assert ([pd(2).a, pd(2).b], phat); 586s assert (paramci (pd(2)), pci); 586s ***** test 586s rand ("seed", 4); # for reproducibility 586s x = gevrnd (-0.5, 1, 2, 1000, 1); 586s pd = fitdist (x, "generalizedextremevalue"); 586s [phat, pci] = gevfit (x); 586s assert ([pd.k, pd.sigma, pd.mu], phat); 586s assert (paramci (pd), pci); 586s ***** test 586s rand ("seed", 5); # for reproducibility 586s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 586s rand ("seed", 9); # for reproducibility 586s x2 = gevrnd (0, 1, -4, 1000, 1); 586s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 586s [phat, pci] = gevfit (x1); 586s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 586s assert (paramci (pd(1)), pci); 586s [phat, pci] = gevfit (x2); 586s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 586s assert (paramci (pd(2)), pci); 587s ***** test 587s x = gprnd (1, 1, 1, 100, 1); 587s pd = fitdist (x, "GeneralizedPareto"); 587s [phat, pci] = gpfit (x, 1); 587s assert ([pd.k, pd.sigma, pd.theta], phat); 587s assert (paramci (pd), pci); 587s ***** test 587s x = gprnd (1, 1, 2, 100, 1); 587s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 587s [phat, pci] = gpfit (x, 2); 587s assert ([pd.k, pd.sigma, pd.theta], phat); 587s assert (paramci (pd), pci); 587s ***** test 587s x1 = gprnd (1, 1, 1, 100, 1); 587s x2 = gprnd (0, 2, 1, 100, 1); 587s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 587s [phat, pci] = gpfit (x1, 1); 587s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 587s assert (paramci (pd(1)), pci); 587s [phat, pci] = gpfit (x2, 1); 587s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 587s assert (paramci (pd(2)), pci); 587s ***** test 587s x1 = gprnd (3, 2, 2, 100, 1); 587s x2 = gprnd (2, 3, 2, 100, 1); 587s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 587s "By", [ones(100,1); 2*ones(100,1)]); 587s [phat, pci] = gpfit (x1, 2); 587s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 587s assert (paramci (pd(1)), pci); 587s [phat, pci] = gpfit (x2, 2); 587s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 587s assert (paramci (pd(2)), pci); 587s ***** test 587s x = hnrnd (0, 1, 100, 1); 587s pd = fitdist (x, "HalfNormal"); 587s [phat, pci] = hnfit (x, 0); 587s assert ([pd.mu, pd.sigma], phat); 587s assert (paramci (pd), pci); 587s ***** test 587s x = hnrnd (1, 1, 100, 1); 587s pd = fitdist (x, "HalfNormal", "mu", 1); 587s [phat, pci] = hnfit (x, 1); 587s assert ([pd.mu, pd.sigma], phat); 587s assert (paramci (pd), pci); 588s ***** test 588s x1 = hnrnd (0, 1, 100, 1); 588s x2 = hnrnd (0, 2, 100, 1); 588s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 588s [phat, pci] = hnfit (x1, 0); 588s assert ([pd(1).mu, pd(1).sigma], phat); 588s assert (paramci (pd(1)), pci); 588s [phat, pci] = hnfit (x2, 0); 588s assert ([pd(2).mu, pd(2).sigma], phat); 588s assert (paramci (pd(2)), pci); 588s ***** test 588s x1 = hnrnd (2, 1, 100, 1); 588s x2 = hnrnd (2, 2, 100, 1); 588s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 588s "By", [ones(100,1); 2*ones(100,1)]); 588s [phat, pci] = hnfit (x1, 2); 588s assert ([pd(1).mu, pd(1).sigma], phat); 588s assert (paramci (pd(1)), pci); 588s [phat, pci] = hnfit (x2, 2); 588s assert ([pd(2).mu, pd(2).sigma], phat); 588s assert (paramci (pd(2)), pci); 588s ***** test 588s x = invgrnd (1, 1, 100, 1); 588s pd = fitdist (x, "InverseGaussian"); 588s [phat, pci] = invgfit (x); 588s assert ([pd.mu, pd.lambda], phat); 588s assert (paramci (pd), pci); 588s ***** test 588s x1 = invgrnd (1, 1, 100, 1); 588s x2 = invgrnd (5, 2, 100, 1); 588s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 588s [phat, pci] = invgfit (x1); 588s assert ([pd(1).mu, pd(1).lambda], phat); 588s assert (paramci (pd(1)), pci); 588s [phat, pci] = invgfit (x2); 588s assert ([pd(2).mu, pd(2).lambda], phat); 588s assert (paramci (pd(2)), pci); 588s ***** test 588s x = logirnd (1, 1, 100, 1); 588s pd = fitdist (x, "logistic"); 588s [phat, pci] = logifit (x); 588s assert ([pd.mu, pd.sigma], phat); 588s assert (paramci (pd), pci); 588s ***** test 588s x1 = logirnd (1, 1, 100, 1); 588s x2 = logirnd (5, 2, 100, 1); 588s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 588s [phat, pci] = logifit (x1); 588s assert ([pd(1).mu, pd(1).sigma], phat); 588s assert (paramci (pd(1)), pci); 588s [phat, pci] = logifit (x2); 588s assert ([pd(2).mu, pd(2).sigma], phat); 588s assert (paramci (pd(2)), pci); 588s ***** test 588s x = loglrnd (1, 1, 100, 1); 588s pd = fitdist (x, "loglogistic"); 588s [phat, pci] = loglfit (x); 588s assert ([pd.mu, pd.sigma], phat); 588s assert (paramci (pd), pci); 589s ***** test 589s x1 = loglrnd (1, 1, 100, 1); 589s x2 = loglrnd (5, 2, 100, 1); 589s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 589s [phat, pci] = loglfit (x1); 589s assert ([pd(1).mu, pd(1).sigma], phat); 589s assert (paramci (pd(1)), pci); 589s [phat, pci] = loglfit (x2); 589s assert ([pd(2).mu, pd(2).sigma], phat); 589s assert (paramci (pd(2)), pci); 589s ***** test 589s x = lognrnd (1, 1, 100, 1); 589s pd = fitdist (x, "lognormal"); 589s [phat, pci] = lognfit (x); 589s assert ([pd.mu, pd.sigma], phat); 589s assert (paramci (pd), pci); 589s ***** test 589s x1 = lognrnd (1, 1, 100, 1); 589s x2 = lognrnd (5, 2, 100, 1); 589s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 589s [phat, pci] = lognfit (x1); 589s assert ([pd(1).mu, pd(1).sigma], phat); 589s assert (paramci (pd(1)), pci); 589s [phat, pci] = lognfit (x2); 589s assert ([pd(2).mu, pd(2).sigma], phat); 589s assert (paramci (pd(2)), pci); 589s ***** test 589s x = nakarnd (2, 0.5, 100, 1); 589s pd = fitdist (x, "Nakagami"); 589s [phat, pci] = nakafit (x); 589s assert ([pd.mu, pd.omega], phat); 589s assert (paramci (pd), pci); 589s ***** test 589s x1 = nakarnd (2, 0.5, 100, 1); 589s x2 = nakarnd (5, 0.8, 100, 1); 589s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 589s [phat, pci] = nakafit (x1); 589s assert ([pd(1).mu, pd(1).omega], phat); 589s assert (paramci (pd(1)), pci); 589s [phat, pci] = nakafit (x2); 589s assert ([pd(2).mu, pd(2).omega], phat); 589s assert (paramci (pd(2)), pci); 590s ***** test 590s randp ("seed", 123); 590s randg ("seed", 321); 590s x = nbinrnd (2, 0.5, 100, 1); 590s pd = fitdist (x, "negativebinomial"); 590s [phat, pci] = nbinfit (x); 590s assert ([pd.R, pd.P], phat); 590s assert (paramci (pd), pci); 590s ***** test 590s randp ("seed", 345); 590s randg ("seed", 543); 590s x1 = nbinrnd (2, 0.5, 100, 1); 590s randp ("seed", 432); 590s randg ("seed", 234); 590s x2 = nbinrnd (5, 0.8, 100, 1); 590s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 590s [phat, pci] = nbinfit (x1); 590s assert ([pd(1).R, pd(1).P], phat); 590s assert (paramci (pd(1)), pci); 590s [phat, pci] = nbinfit (x2); 590s assert ([pd(2).R, pd(2).P], phat); 590s assert (paramci (pd(2)), pci); 590s ***** test 590s x = normrnd (1, 1, 100, 1); 590s pd = fitdist (x, "normal"); 590s [muhat, sigmahat, muci, sigmaci] = normfit (x); 590s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 590s assert (paramci (pd), [muci, sigmaci]); 590s ***** test 590s x1 = normrnd (1, 1, 100, 1); 590s x2 = normrnd (5, 2, 100, 1); 590s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 590s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 590s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 590s assert (paramci (pd(1)), [muci, sigmaci]); 590s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 590s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 590s assert (paramci (pd(2)), [muci, sigmaci]); 590s ***** test 590s x = poissrnd (1, 100, 1); 590s pd = fitdist (x, "poisson"); 590s [phat, pci] = poissfit (x); 590s assert (pd.lambda, phat); 590s assert (paramci (pd), pci); 590s ***** test 590s x1 = poissrnd (1, 100, 1); 590s x2 = poissrnd (5, 100, 1); 590s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 590s [phat, pci] = poissfit (x1); 590s assert (pd(1).lambda, phat); 590s assert (paramci (pd(1)), pci); 590s [phat, pci] = poissfit (x2); 590s assert (pd(2).lambda, phat); 590s assert (paramci (pd(2)), pci); 591s ***** test 591s x = raylrnd (1, 100, 1); 591s pd = fitdist (x, "rayleigh"); 591s [phat, pci] = raylfit (x); 591s assert (pd.sigma, phat); 591s assert (paramci (pd), pci); 591s ***** test 591s x1 = raylrnd (1, 100, 1); 591s x2 = raylrnd (5, 100, 1); 591s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 591s [phat, pci] = raylfit (x1); 591s assert ( pd(1).sigma, phat); 591s assert (paramci (pd(1)), pci); 591s [phat, pci] = raylfit (x2); 591s assert (pd(2).sigma, phat); 591s assert (paramci (pd(2)), pci); 591s ***** test 591s x = ricernd (1, 1, 100, 1); 591s pd = fitdist (x, "rician"); 591s [phat, pci] = ricefit (x); 591s assert ([pd.s, pd.sigma], phat); 591s assert (paramci (pd), pci); 591s ***** test 591s x1 = ricernd (1, 1, 100, 1); 591s x2 = ricernd (5, 2, 100, 1); 591s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 591s [phat, pci] = ricefit (x1); 591s assert ([pd(1).s, pd(1).sigma], phat); 591s assert (paramci (pd(1)), pci); 591s [phat, pci] = ricefit (x2); 591s assert ([pd(2).s, pd(2).sigma], phat); 591s assert (paramci (pd(2)), pci); 591s ***** warning <fitdist: 'Stable' distribution not supported yet.> ... 591s fitdist ([1 2 3 4 5], "Stable"); 591s ***** test 591s x = tlsrnd (0, 1, 1, 100, 1); 591s pd = fitdist (x, "tlocationscale"); 591s [phat, pci] = tlsfit (x); 591s assert ([pd.mu, pd.sigma, pd.nu], phat); 591s assert (paramci (pd), pci); 591s ***** test 591s x1 = tlsrnd (0, 1, 1, 100, 1); 591s x2 = tlsrnd (5, 2, 1, 100, 1); 591s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 591s [phat, pci] = tlsfit (x1); 591s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 591s assert (paramci (pd(1)), pci); 591s [phat, pci] = tlsfit (x2); 591s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 591s assert (paramci (pd(2)), pci); 592s ***** test 592s x = [1 2 3 4 5]; 592s pd = fitdist (x, "weibull"); 592s [phat, pci] = wblfit (x); 592s assert ([pd.lambda, pd.k], phat); 592s assert (paramci (pd), pci); 592s ***** test 592s x = [1 2 3 4 5 6 7 8 9 10]; 592s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 592s [phat, pci] = wblfit (x(1:5)); 592s assert ([pd(1).lambda, pd(1).k], phat); 592s assert (paramci (pd(1)), pci); 592s [phat, pci] = wblfit (x(6:10)); 592s assert ([pd(2).lambda, pd(2).k], phat); 592s assert (paramci (pd(2)), pci); 592s ***** error <fitdist: DISTNAME is required.> fitdist (1) 592s ***** error <fitdist: DISTNAME must be a character vector.> fitdist (1, ["as";"sd"]) 592s ***** error <fitdist: unrecognized distribution name.> fitdist (1, "some") 592s ***** error <fitdist: X must be a numeric vector of real values.> ... 592s fitdist (ones (2), "normal") 592s ***** error <fitdist: X must be a numeric vector of real values.> ... 592s fitdist ([i, 2, 3], "normal") 592s ***** error <fitdist: X must be a numeric vector of real values.> ... 592s fitdist (["a", "s", "d"], "normal") 592s ***** error <fitdist: optional arguments must be in NAME-VALUE pairs.> ... 592s fitdist ([1, 2, 3], "normal", "By") 592s ***** error <fitdist: GROUPVAR argument must have the same size as the input data in X.> ... 592s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 592s ***** error <fitdist: 'censoring' argument must have the same size as the input data in X.> ... 592s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 592s ***** error <fitdist: 'frequency' argument must have the same size as the input data in X.> ... 592s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 592s ***** error <fitdist: 'frequency' argument must contain non-negative integer values.> ... 592s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 592s ***** error <fitdist: invalid value for 'alpha' argument.> ... 592s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 592s ***** error <fitdist: invalid value for 'alpha' argument.> ... 592s fitdist ([1, 2, 3], "normal", "alpha", i) 592s ***** error <fitdist: invalid value for 'alpha' argument.> ... 592s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 592s ***** error <fitdist: invalid value for 'alpha' argument.> ... 592s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 592s ***** error <fitdist: 'ntrials' argument must be a positive integer scalar value.> ... 592s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 592s ***** error <fitdist: 'ntrials' argument must be a positive integer scalar value.> ... 592s fitdist ([1, 2, 3], "normal", "ntrials", 0) 592s ***** error <fitdist: 'options' argument must be a structure compatible for 'fminsearch'.> ... 592s fitdist ([1, 2, 3], "normal", "options", 0) 592s ***** error <fitdist: 'options' argument must be a structure compatible for 'fminsearch'.> ... 592s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 592s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 592s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 592s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 592s ***** error <fitdist: unknown parameter name.> ... 592s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 592s ***** error <fitdist: must define GROUPVAR for more than one output arguments.> ... 592s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 592s ***** error <fitdist: invalid THETA value for generalized Pareto distribution.> ... 592s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 592s ***** error <fitdist: invalid MU value for half-normal distribution.> ... 592s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 592s 77 tests, 77 passed, 0 known failure, 0 skipped 592s [inst/fitcnet.m] 592s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitcnet.m 592s ***** demo 592s ## Train a Neural Network on the Fisher's Iris data set and display 592s ## a confusion chart with the classification results. 592s 592s load fisheriris 592s Mdl = fitcnet (meas, species); 592s pred_species = resubPredict (Mdl); 592s confusionchart (species, pred_species); 592s ***** test 592s load fisheriris 592s x = meas; 592s y = grp2idx (species); 592s Mdl = fitcnet (x, y, "IterationLimit", 50); 592s assert (class (Mdl), "ClassificationNeuralNetwork"); 592s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 592s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 592s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 592s ***** error<fitcnet: too few arguments.> fitcnet () 592s ***** error<fitcnet: too few arguments.> fitcnet (ones (4,1)) 592s ***** error<fitcnet: Name-Value arguments must be in pairs.> 592s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 592s ***** error<fitcnet: number of rows in X and Y must be equal.> 592s fitcnet (ones (4,2), ones (3, 1)) 592s ***** error<fitcnet: number of rows in X and Y must be equal.> 592s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 592s 6 tests, 6 passed, 0 known failure, 0 skipped 592s [inst/bar3h.m] 592s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/bar3h.m 592s ***** demo 592s ## Ploting 5 bars in the same series. 592s 592s y = [50; 40; 30; 20; 10]; 592s bar3h (y); 592s ***** demo 592s ## Ploting 5 bars in different groups. 592s 592s y = [50, 40, 30, 20, 10]; 592s bar3h (y); 592s ***** demo 592s ## A 3D bar graph with each series corresponding to a column in y. 592s 592s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 592s bar3h (y); 592s ***** demo 592s ## Specify z-axis locations as tick names. z must be a column vector! 592s 592s z = [1950, 1960, 1970, 1980, 1990]'; 592s y = [16, 8, 4, 2, 1]'; 592s bar3h (z, y); 592s ***** demo 592s ## Plot 3 series as a grouped plot without any space between the grouped bars 592s 592s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 592s bar3h (y, 1, 'grouped'); 592s ***** demo 592s ## Plot a stacked style 3D bar graph 592s 592s y = [19, 30, 21, 30; 40, 16, 32, 12]; 592s b = bar3h (y, 0.5, 'stacked'); 592s ***** error <bar3h: Z must be numeric.> bar3h ("A") 592s ***** error <bar3h: Z must be numeric.> bar3h ({2,3,4,5}) 592s ***** error <bar3h: inconsistent size in Y and Z input arguments.> ... 592s bar3h ([1,2,3]', ones (2)) 592s ***** error <bar3h: WIDTH must be a scalar in the range> ... 592s bar3h ([1:5], 1.2) 592s ***** error <bar3h: WIDTH must be a scalar in the range> ... 592s bar3h ([1:5]', ones (5), 1.2) 592s ***** error <bar3h: numeric COLOR must be a 1x3 vector of an Nx3 matrix> ... 592s bar3h ([1:5]', ones (5), [0.8, 0.7]) 592s ***** error <bar3h: missing value for optional argument 'width'.> ... 592s bar3h (ones (5), 'width') 592s ***** error <bar3h: invalid value for optional argument 'width'.> ... 592s bar3h (ones (5), 'width', 1.2) 592s ***** error <bar3h: invalid value for optional argument 'width'.> ... 592s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 592s ***** error <bar3h: missing value for optional argument 'color'.> ... 592s bar3h (ones (5), 'color') 592s ***** error <bar3h: numeric COLOR must be a 1x3 vector of an Nx3 matrix> ... 592s bar3h (ones (5), 'color', [0.8, 0.8]) 592s ***** error <bar3h: invalid value for optional argument 'color'.> ... 592s bar3h (ones (5), 'color', "brown") 592s ***** error <bar3h: invalid value for optional argument 'color'.> ... 592s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 592s ***** error <bar3h: missing value for optional argument 'xlabel'.> ... 592s bar3h (ones (5), 'xlabel') 592s ***** error <bar3h: invalid value for optional argument 'xlabel'.> ... 592s bar3h (ones (5), 'xlabel', 4) 592s ***** error <bar3h: missing value for optional argument 'zlabel'.> ... 592s bar3h (ones (5), 'zlabel') 592s ***** error <bar3h: invalid value for optional argument 'zlabel'.> ... 592s bar3h (ones (5), 'zlabel', 4) 592s ***** error <bar3h: invalid optional argument.> bar3h (ones (5), 'this', 4) 592s ***** error <bar3h: the elements in 'xlabel' must equal the columns in Z.> ... 592s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 592s ***** error <bar3h: the elements in 'zlabel' must equal the rows in Z.> ... 592s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 592s 20 tests, 20 passed, 0 known failure, 0 skipped 592s [inst/trimmean.m] 592s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/trimmean.m 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s out = trimmean (x, 10, [1, 2]); 592s assert (out(1,1,1), 10.3889, 1e-4); 592s assert (out(1,1,2), 29.6111, 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s out = trimmean (x, 10, 1); 592s assert (out(:,:,1), [-17.6, 8, 13, 18]); 592s assert (out(:,:,2), [23, 28, 33, 10.6]); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, 1); 592s assert (out(:,:,1), [-23, 8, 13, 18]); 592s assert (out(:,:,2), [23, 28, 33, 3.75]); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s out = trimmean (x, 10, 2); 592s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 592s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, 2); 592s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 592s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s out = trimmean (x, 10, [1, 2, 3]); 592s assert (out, trimmean (x, 10, "all")); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, [1, 2]); 592s assert (out(1,1,1), 10.7647, 1e-4); 592s assert (out(1,1,2), 29.1176, 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, [1, 3]); 592s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, [2, 3]); 592s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, [1, 2, 3]); 592s assert (out, trimmean (x, 10, "all")); 592s ***** test 592s x = reshape (1:40, [5, 4, 2]); 592s x([3, 37]) = -100; 592s x([4, 38]) = NaN; 592s out = trimmean (x, 10, [2, 3, 5]); 592s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 592s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 592s ***** assert (trimmean ([], 10), NaN) 592s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 592s ***** error<Invalid call to trimmean. Correct usage is:> trimmean (1) 592s ***** error<Invalid call to trimmean. Correct usage is:> trimmean (1,2,3,4,5) 592s ***** error<trimmean: invalid percent.> trimmean ([1 2 3 4], -10) 592s ***** error<trimmean: invalid percent.> trimmean ([1 2 3 4], 100) 592s ***** error<trimmean: invalid FLAG argument.> trimmean ([1 2 3 4], 10, "flag") 592s ***** error<trimmean: invalid FLAG argument.> trimmean ([1 2 3 4], 10, "flag", 1) 592s ***** error<trimmean: DIM must be a positive integer scalar or vector.> ... 592s trimmean ([1 2 3 4], 10, -1) 592s ***** error<trimmean: DIM must be a positive integer scalar or vector.> ... 592s trimmean ([1 2 3 4], 10, "floor", -1) 592s ***** error<trimmean: DIM must be a positive integer scalar or vector.> ... 592s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 592s ***** error<trimmean: VECDIM must contain non-repeating positive integers.> ... 592s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 592s 26 tests, 26 passed, 0 known failure, 0 skipped 592s [inst/pdist.m] 592s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/pdist.m 592s ***** shared xy, t, eucl, x 592s xy = [0 1; 0 2; 7 6; 5 6]; 592s t = 1e-3; 592s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 592s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 592s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 592s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 592s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 592s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 592s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 592s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 592s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 592s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 592s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 592s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 592s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 592s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 592s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 592s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 592s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 592s ***** assert (pdist (x, "euclidean"), ... 592s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 592s ***** assert (pdist (x, eucl), ... 592s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 593s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 593s ***** assert (pdist (x, "seuclidean"), ... 593s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 593s ***** warning<pdist: matrix is close to singular> ... 593s pdist (x, "mahalanobis"); 593s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 593s ***** assert (pdist (x, "minkowski"), ... 593s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 593s ***** assert (pdist (x, "minkowski", 3), ... 593s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 593s ***** assert (pdist (x, "cosine"), ... 593s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 593s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 593s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 593s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 593s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 593s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 593s 29 tests, 29 passed, 0 known failure, 0 skipped 593s [inst/logistic_regression.m] 593s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/logistic_regression.m 593s ***** test 593s # Output compared to following MATLAB commands 593s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 593s # P = mnrval(B,X) 593s X = [1.489381332449196, 1.1534152241851305; ... 593s 1.8110085304863965, 0.9449666896938425; ... 593s -0.04453299665130296, 0.34278203449678646; ... 593s -0.36616019468850347, 1.130254275908322; ... 593s 0.15339143291005095, -0.7921044310668951; ... 593s -1.6031878794469698, -1.8343471035233376; ... 593s -0.14349521143198166, -0.6762996896828459; ... 593s -0.4403818557740143, -0.7921044310668951; ... 593s -0.7372685001160434, -0.027793137932169563; ... 593s -0.11875465773681024, 0.5512305689880763]; 593s Y = [1,1,1,1,1,0,0,0,0,0]'; 593s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 593s ***** test 593s # Output compared to following MATLAB commands 593s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 593s load carbig 593s X = [Acceleration Displacement Horsepower Weight]; 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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, ... 593s 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]'; 593s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 593s assert (DEV, 433.197174495549, 1e-05); 593s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 593s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 593s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 593s assert (SLOPE(1), 0.104762463756714, 1e-05); 593s assert (SLOPE(2), 0.0103357623191891, 1e-05); 593s assert (SLOPE(3), 0.0645199313242276, 1e-05); 593s assert (SLOPE(4), 0.00166377028388103, 1e-05); 593s 2 tests, 2 passed, 0 known failure, 0 skipped 593s [inst/qqplot.m] 593s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/qqplot.m 593s ***** test 593s hf = figure ("visible", "off"); 593s unwind_protect 593s 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]); 593s unwind_protect_cleanup 593s close (hf); 593s end_unwind_protect 593s ***** error qqplot () 593s ***** error <qqplot: X must be a numeric vector> qqplot ({1}) 593s ***** error <qqplot: X must be a numeric vector> qqplot (ones (2,2)) 593s ***** error <qqplot: X must be a numeric vecto> qqplot (1, "foobar") 593s ***** error <qqplot: no inverse CDF found> qqplot ([1 2 3], "foobar") 593s 6 tests, 6 passed, 0 known failure, 0 skipped 593s [inst/standardizeMissing.m] 593s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/standardizeMissing.m 593s ***** assert (standardizeMissing (1, 1), NaN) 593s ***** assert (standardizeMissing (1, 0), 1) 593s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 593s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 593s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 593s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 593s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 593s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 593s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 593s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 593s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 593s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 593s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 593s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 593s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 593s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 593s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 593s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 593s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 593s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 593s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 593s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 593s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 593s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 593s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 593s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 593s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 593s ***** assert (standardizeMissing (single (1), true), single (NaN)) 593s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 593s ***** assert (standardizeMissing (true, true), true) 593s ***** assert (standardizeMissing (true, 1), true) 593s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 593s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 593s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 593s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 593s ***** error standardizeMissing (); 593s ***** error standardizeMissing (1); 593s ***** error standardizeMissing (1,2,3); 593s ***** error <only cells of strings> standardizeMissing ({'abc', 1}, 1); 593s ***** error <unsupported data type> standardizeMissing (struct ('a','b'), 1); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 593s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 593s 49 tests, 49 passed, 0 known failure, 0 skipped 593s [inst/loadmodel.m] 593s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/loadmodel.m 593s ***** error<loadmodel: too few arguments.> loadmodel () 593s ***** error<loadmodel: 'fisheriris.mat' does not contain a Classification or Regression object.> ... 593s loadmodel ("fisheriris.mat") 593s ***** error<loadmodel: 'ClassificationModel' is not supported.> ... 593s loadmodel ("fail_loadmodel.mdl") 593s ***** error<ClassificationKNN.load_model: invalid model in 'fail_load_model.mdl'.> ... 593s loadmodel ("fail_load_model.mdl") 593s 4 tests, 4 passed, 0 known failure, 0 skipped 593s [inst/correlation_test.m] 593s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/correlation_test.m 593s ***** error<Invalid call to correlation_test. Correct usage> correlation_test (); 593s ***** error<Invalid call to correlation_test. Correct usage> correlation_test (1); 594s ***** error<correlation_test: X must contain finite real numbers.> ... 594s correlation_test ([1 2 NaN]', [2 3 4]'); 594s ***** error<correlation_test: X must contain finite real numbers.> ... 594s correlation_test ([1 2 Inf]', [2 3 4]'); 594s ***** error<correlation_test: X must contain finite real numbers.> ... 594s correlation_test ([1 2 3+i]', [2 3 4]'); 594s ***** error<correlation_test: Y must contain finite real numbers.> ... 594s correlation_test ([1 2 3]', [2 3 NaN]'); 594s ***** error<correlation_test: Y must contain finite real numbers.> ... 594s correlation_test ([1 2 3]', [2 3 Inf]'); 594s ***** error<correlation_test: Y must contain finite real numbers.> ... 594s correlation_test ([1 2 3]', [3 4 3+i]'); 594s ***** error<correlation_test: X and Y must be vectors of equal length.> ... 594s correlation_test ([1 2 3]', [3 4 4 5]'); 594s ***** error<correlation_test: invalid value for alpha.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 594s ***** error<correlation_test: invalid value for alpha.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 594s ***** error<correlation_test: invalid value for alpha.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 594s ***** error<correlation_test: invalid value for alpha.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 594s ***** error<correlation_test: invalid Name argument.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 594s ***** error<correlation_test: invalid value for tail.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 594s ***** error<correlation_test: invalid value for tail.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 594s ***** error<correlation_test: invalid value for method.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 594s ***** error<correlation_test: invalid value for method.> ... 594s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 594s ***** test 594s x = [6 7 7 9 10 12 13 14 15 17]; 594s y = [19 22 27 25 30 28 30 29 25 32]; 594s [h, pval, stats] = correlation_test (x, y); 594s assert (stats.corrcoef, corr (x', y'), 1e-14); 594s assert (pval, 0.0223, 1e-4); 594s ***** test 594s x = [6 7 7 9 10 12 13 14 15 17]'; 594s y = [19 22 27 25 30 28 30 29 25 32]'; 594s [h, pval, stats] = correlation_test (x, y); 594s assert (stats.corrcoef, corr (x, y), 1e-14); 594s assert (pval, 0.0223, 1e-4); 594s 20 tests, 20 passed, 0 known failure, 0 skipped 594s [inst/mahal.m] 594s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/mahal.m 594s ***** error mahal () 594s ***** error mahal (1, 2, 3) 594s ***** error mahal ("A", "B") 594s ***** error <must be numeric> mahal ([1, 2], ["A", "B"]) 594s ***** error mahal (ones (2, 2, 2)) 594s ***** error <must be 2-D matrices> mahal (ones (2, 2), ones (2, 2, 2)) 594s ***** error <same number of columns> mahal (ones (2, 2), ones (2, 3)) 594s ***** test 594s X = [1 0; 0 1; 1 1; 0 0]; 594s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 594s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 594s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 594s 9 tests, 9 passed, 0 known failure, 0 skipped 594s [inst/levene_test.m] 594s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/levene_test.m 594s ***** error<levene_test: invalid number of input arguments.> levene_test () 594s ***** error<levene_test: invalid number of input arguments.> ... 594s levene_test (1, 2, 3, 4, 5); 594s ***** error<levene_test: wrong value for alpha.> levene_test (randn (50, 2), 0); 594s ***** error<levene_test: GROUP and X mismatch.> ... 594s levene_test (randn (50, 2), [1, 2, 3]); 594s ***** error<levene_test: GROUP and X mismatch.> ... 594s levene_test (randn (50, 1), ones (55, 1)); 594s ***** error<levene_test: invalid second input argument.> ... 594s levene_test (randn (50, 1), ones (50, 2)); 594s ***** error<levene_test: wrong value for alpha.> ... 594s levene_test (randn (50, 2), [], 1.2); 594s ***** error<levene_test: GROUP and X mismatch.> ... 594s levene_test (randn (50, 2), "some_string"); 594s ***** error<levene_test: invalid third input argument.> ... 594s levene_test (randn (50, 2), [], "alpha"); 594s ***** error<levene_test: wrong value for alpha.> ... 594s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 594s ***** error<levene_test: invalid third input argument.> ... 594s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 594s ***** error<levene_test: invalid option for TESTTYPE as 4th argument.> ... 594s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 594s ***** warning<levene_test: GROUP> ... 594s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades); 594s assert (h, 1); 594s assert (pval, 9.523239714592791e-07, 1e-14); 594s assert (W, 8.59529, 1e-5); 594s assert (df, [4, 595]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 594s assert (h, 1); 594s assert (pval, 9.523239714592791e-07, 1e-14); 594s assert (W, 8.59529, 1e-5); 594s assert (df, [4, 595]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades, [], "median"); 594s assert (h, 1); 594s assert (pval, 1.312093241723211e-06, 1e-14); 594s assert (W, 8.415969, 1e-6); 594s assert (df, [4, 595]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades(:,[1:3])); 594s assert (h, 1); 594s assert (pval, 0.004349390980463497, 1e-14); 594s assert (W, 5.52139, 1e-5); 594s assert (df, [2, 357]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 594s assert (h, 1); 594s assert (pval, 0.004355216763951453, 1e-14); 594s assert (W, 5.52001, 1e-5); 594s assert (df, [2, 357]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 594s assert (h, 0); 594s assert (pval, 0.1807494957440653, 2e-14); 594s assert (W, 1.80200, 1e-5); 594s assert (df, [1, 238]); 594s ***** test 594s load examgrades 594s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 594s assert (h, 0); 594s assert (pval, 0.1978225622063785, 2e-14); 594s assert (W, 1.66768, 1e-5); 594s assert (df, [1, 238]); 594s 20 tests, 20 passed, 0 known failure, 0 skipped 594s [inst/monotone_smooth.m] 594s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/monotone_smooth.m 594s ***** error<Invalid call to monotone_smooth. Correct usage is> ... 594s monotone_smooth (1) 594s ***** error<monotone_smooth: X must be a numeric vector.> ... 594s monotone_smooth ("char", 1) 594s ***** error<monotone_smooth: X must be a numeric vector.> ... 594s monotone_smooth ({1,2,3}, 1) 594s ***** error<monotone_smooth: X must be a numeric vector.> ... 594s monotone_smooth (ones(20,3), 1) 594s ***** error<monotone_smooth: Y must be a numeric vector.> ... 594s monotone_smooth (1, "char") 594s ***** error<monotone_smooth: Y must be a numeric vector.> ... 594s monotone_smooth (1, {1,2,3}) 594s ***** error<monotone_smooth: Y must be a numeric vector.> ... 594s monotone_smooth (1, ones(20,3)) 594s ***** error<monotone_smooth: H> monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 594s ***** error<monotone_smooth: H> monotone_smooth (ones (10,1), ones(10,1), {2}) 594s ***** error<monotone_smooth: H> monotone_smooth (ones (10,1), ones(10,1), "char") 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/plsregress.m] 594s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/plsregress.m 594s ***** demo 594s ## Perform Partial Least-Squares Regression 594s 594s ## Load the spectra data set and use the near infrared (NIR) spectral 594s ## intensities (NIR) as the predictor and the corresponding octave 594s ## ratings (octave) as the response. 594s load spectra 594s 594s ## Perform PLS regression with 10 components 594s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 594s 594s ## Plot the percentage of explained variance in the response variable 594s ## (PCTVAR) as a function of the number of components. 594s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 594s xlim ([1, 10]); 594s xlabel ("Number of PLS components"); 594s ylabel ("Percentage of Explained Variance in octane"); 594s title ("Explained Variance per PLS components"); 594s 594s ## Compute the fitted response and display the residuals. 594s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 594s residuals = octane - octane_fitted; 594s figure 594s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 594s xlabel ("Observations"); 594s ylabel ("Residuals"); 594s title ("Residuals in octane's fitted responce"); 594s ***** demo 594s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 594s 594s ## Load the spectra data set and use the near infrared (NIR) spectral 594s ## intensities (NIR) as the predictor and the corresponding octave 594s ## ratings (octave) as the response. Variables with a VIP score greater than 594s ## 1 are considered important for the projection of the PLS regression model. 594s load spectra 594s 594s ## Perform PLS regression with 10 components 594s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 594s plsregress (NIR, octane, 10); 594s 594s ## Calculate the normalized PLS weights 594s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 594s 594s ## Calculate the VIP scores for 10 components 594s nobs = size (xload, 1); 594s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 594s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 594s 594s ## Find variables with a VIP score greater than or equal to 1 594s VIPidx = find (VIPscore >= 1); 594s 594s ## Plot the VIP scores 594s scatter (1:length (VIPscore), VIPscore, "xb"); 594s hold on 594s scatter (VIPidx, VIPscore (VIPidx), "xr"); 594s plot ([1, length(VIPscore)], [1, 1], "--k"); 594s hold off 594s axis ("tight"); 594s xlabel ("Predictor Variables"); 594s ylabel ("VIP scores"); 594s title ("VIP scores for each predictror variable with 10 components"); 594s ***** test 594s load spectra 594s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 594s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 594s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 594s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 594s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 594s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 594s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 594s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 594s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 594s assert (xload(1,:), xload1_out, 1e-4); 594s assert (yload, yload_out, 1e-4); 594s assert (xscore(1,:), xscore1_out, 1e-4); 594s assert (yscore(1,:), yscore1_out, 1e-4); 594s ***** test 594s load spectra 594s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 594s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 594s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 594s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 594s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 594s assert (xload(1,:), xload1_out, 1e-4); 594s assert (yload, yload_out, 1e-4); 594s assert (xscore(1,:), xscore1_out, 1e-4); 594s assert (yscore(1,:), yscore1_out, 1e-4); 594s ***** error<plsregress: function called with too few input arguments.> 594s plsregress (1) 594s ***** error<plsregress: X and Y must be real matrices.> plsregress (1, "asd") 594s ***** error<plsregress: X and Y must be real matrices.> plsregress (1, {1,2,3}) 594s ***** error<plsregress: X and Y must be real matrices.> plsregress ("asd", 1) 594s ***** error<plsregress: X and Y must be real matrices.> plsregress ({1,2,3}, 1) 594s ***** error<plsregress: X and Y observations mismatch.> ... 594s plsregress (ones (20,3), ones (15,1)) 594s ***** error<plsregress: invalid value for NCOMP.> ... 594s plsregress (ones (20,3), ones (20,1), 0) 594s ***** error<plsregress: invalid value for NCOMP.> ... 594s plsregress (ones (20,3), ones (20,1), -5) 594s ***** error<plsregress: invalid value for NCOMP.> ... 594s plsregress (ones (20,3), ones (20,1), 3.2) 594s ***** error<plsregress: invalid value for NCOMP.> ... 594s plsregress (ones (20,3), ones (20,1), [2, 3]) 594s ***** error<plsregress: NCOMP exceeds maximum components for X.> ... 594s plsregress (ones (20,3), ones (20,1), 4) 594s ***** error<plsregress: invalid VALUE for 'cv' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 594s ***** error<plsregress: invalid VALUE for 'cv' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 594s ***** error<plsregress: invalid VALUE for 'cv' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 594s ***** error<plsregress: invalid VALUE for 'mcreps' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 594s ***** error<plsregress: invalid VALUE for 'mcreps' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 594s ***** error<plsregress: invalid VALUE for 'mcreps' optional argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 594s ***** error<plsregress: invalid NAME argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 594s ***** error<plsregress: invalid NAME argument.> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 594s ***** error<plsregress: 'mcreps' must be 1 when 'resubstitution' is specified> ... 594s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 594s ***** error<plsregress: 'mcreps' must be 1 when 'resubstitution' is specified> ... 594s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 594s ***** error<Invalid call to plsregress. Correct usage is:> plsregress (1, 2) 595s 24 tests, 24 passed, 0 known failure, 0 skipped 595s [inst/hotelling_t2test.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hotelling_t2test.m 595s ***** error<Invalid call to hotelling_t2test. Correct usage> hotelling_t2test (); 595s ***** error<hotelling_t2test: X must be a vector or a 2D matrix.> ... 595s hotelling_t2test (1); 595s ***** error<hotelling_t2test: X must be a vector or a 2D matrix.> ... 595s hotelling_t2test (ones(2,2,2)); 595s ***** error<hotelling_t2test: invalid value for alpha.> ... 595s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 595s ***** error<hotelling_t2test: invalid value for alpha.> ... 595s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 595s ***** error<hotelling_t2test: invalid value for alpha.> ... 595s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 595s ***** error<hotelling_t2test: invalid value for alpha.> ... 595s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 595s ***** error<hotelling_t2test: invalid Name argument.> ... 595s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 595s ***** error<hotelling_t2test: if X is a vector, M must be a scalar.> ... 595s hotelling_t2test (ones(20,1), [0, 0]); 595s ***** error<hotelling_t2test: X must have more rows than columns.> ... 595s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 595s ***** error<hotelling_t2test: if X is a matrix, M must be a vector of length> ... 595s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 595s ***** test 595s randn ("seed", 1); 595s x = randn (50000, 5); 595s [h, pval, stats] = hotelling_t2test (x); 595s assert (h, 0); 595s assert (stats.df1, 5); 595s assert (stats.df2, 49995); 595s ***** test 595s randn ("seed", 1); 595s x = randn (50000, 5); 595s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 595s assert (h, 1); 595s assert (stats.df1, 5); 595s assert (stats.df2, 49995); 595s 13 tests, 13 passed, 0 known failure, 0 skipped 595s [inst/manovacluster.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/manovacluster.m 595s ***** demo 595s load carbig 595s X = [MPG Acceleration Weight Displacement]; 595s [d, p, stats] = manova1 (X, Origin); 595s manovacluster (stats) 595s ***** test 595s hf = figure ("visible", "off"); 595s unwind_protect 595s load carbig 595s X = [MPG Acceleration Weight Displacement]; 595s [d, p, stats] = manova1 (X, Origin); 595s manovacluster (stats); 595s unwind_protect_cleanup 595s close (hf); 595s end_unwind_protect 595s ***** error manovacluster (stats, "some"); 595s 2 tests, 2 passed, 0 known failure, 0 skipped 595s [inst/mnrfit.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/mnrfit.m 595s ***** error<mnrfit: too few input arguments.> mnrfit (ones (50,1)) 595s ***** error<mnrfit: Predictors must be numeric.> ... 595s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 595s ***** error<mnrfit: Predictors must be a vector or a 2D matrix.> ... 595s mnrfit (ones (50, 4, 2), ones (50, 1)) 595s ***** error<mnrfit: Response must be a vector or a 2D matrix.> ... 595s mnrfit (ones (50, 4), ones (50, 1, 3)) 595s ***** error<mnrfit: Y must have the same number of rows as X.> ... 595s mnrfit (ones (50, 4), ones (45,1)) 595s ***** error<mnrfit: Response labels must be a character array, a cell vector> ... 595s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 595s ***** error<mnrfit: optional arguments must be in pairs.> ... 595s mnrfit (ones (5, 4), ones (5, 1), "model") 595s ***** error<mnrfit: Y must be a column vector when given as cellstr.> ... 595s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 595s ***** error<mnrfit: Y must contain only 1 and 0 when given as a 2D matrix.> ... 595s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 595s ***** error<mnrfit: Y must contain positive integer category numbers.> ... 595s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 595s ***** error<mnrfit: fitting more than 2 nominal responses not supported.> ... 595s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 595s ***** error<mnrfit: fitting hierarchical responses not supported.> ... 595s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 595s ***** error<mnrfit: model type not recognised.> ... 595s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 595s 13 tests, 13 passed, 0 known failure, 0 skipped 595s [inst/princomp.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/princomp.m 595s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 595s ***** test 595s x=[7 4 3 595s 4 1 8 595s 6 3 5 595s 8 6 1 595s 8 5 7 595s 7 2 9 595s 5 3 3 595s 9 5 8 595s 7 4 5 595s 8 2 2]; 595s R = corrcoef (x); 595s [V, lambda] = eig (R); 595s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 595s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 595s ## contribution of first 2 PCs to each original variable 595s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 595s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 595s F = zscore(x)*B; 595s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 595s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 595s ***** test 595s x=[1,2,3;2,1,3]'; 595s [COEFF,SCORE,latent,tsquare] = princomp(x); 595s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 595s m(:,1) = m(:,1)*sign(COEFF(1,1)); 595s m(:,2) = m(:,2)*sign(COEFF(1,2)); 595s ***** assert(COEFF,m(1:2,:),10*eps); 595s ***** assert(SCORE,-m,10*eps); 595s ***** assert(latent,[1.5;.5],10*eps); 595s ***** assert(tsquare,[4;4;4]/3,10*eps); 595s ***** test 595s x=x'; 595s [COEFF,SCORE,latent,tsquare] = princomp(x); 595s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 595s m(:,1) = m(:,1)*sign(COEFF(1,1)); 595s m(:,2) = m(:,2)*sign(COEFF(1,2)); 595s m(:,3) = m(:,3)*sign(COEFF(3,3)); 595s ***** assert(COEFF,m,10*eps); 595s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 595s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 595s ***** assert(latent,[1;0;0],10*eps); 595s ***** assert(tsquare,[0.5;0.5],10*eps) 595s ***** test 595s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 595s ***** assert(COEFF,m(:, 1),10*eps); 595s ***** assert(SCORE,-m(1:2,1),10*eps); 595s ***** assert(latent,[1],10*eps); 595s ***** assert(tsquare,[0.5;0.5],10*eps) 595s 19 tests, 19 passed, 0 known failure, 0 skipped 595s [inst/dist_fun/loglcdf.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/loglcdf.m 595s ***** demo 595s ## Plot various CDFs from the log-logistic distribution 595s x = 0:0.001:2; 595s p1 = loglcdf (x, log (1), 1/0.5); 595s p2 = loglcdf (x, log (1), 1); 595s p3 = loglcdf (x, log (1), 1/2); 595s p4 = loglcdf (x, log (1), 1/4); 595s p5 = loglcdf (x, log (1), 1/8); 595s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 595s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 595s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 595s grid on 595s title ("Log-logistic CDF") 595s xlabel ("values in x") 595s ylabel ("probability") 595s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 595s ***** shared out1, out2 595s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 595s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 595s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 595s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 595s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 595s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 595s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 595s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 595s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 595s ***** assert (class (loglcdf (1, single (2), 3)), "single") 595s ***** assert (class (loglcdf (1, 2, single (3))), "single") 595s ***** error<loglcdf: function called with too few input arguments.> loglcdf (1) 595s ***** error<loglcdf: function called with too few input arguments.> loglcdf (1, 2) 595s ***** error<loglcdf: invalid argument for upper tail.> ... 595s loglcdf (1, 2, 3, 4) 595s ***** error<loglcdf: invalid argument for upper tail.> ... 595s loglcdf (1, 2, 3, "uper") 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (1, ones (2), ones (3)) 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (1, ones (2), ones (3), "upper") 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (ones (2), 1, ones (3)) 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (ones (2), 1, ones (3), "upper") 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (ones (2), ones (3), 1) 595s ***** error<loglcdf: X, MU, and SIGMA must be of common size or scalars.> ... 595s loglcdf (ones (2), ones (3), 1, "upper") 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (i, 2, 3) 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (i, 2, 3, "upper") 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (1, i, 3) 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (1, i, 3, "upper") 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (1, 2, i) 595s ***** error<loglcdf: X, MU, and SIGMA must not be complex.> loglcdf (1, 2, i, "upper") 595s 25 tests, 25 passed, 0 known failure, 0 skipped 595s [inst/dist_fun/betapdf.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/betapdf.m 595s ***** demo 595s ## Plot various PDFs from the Beta distribution 595s x = 0.001:0.001:0.999; 595s y1 = betapdf (x, 0.5, 0.5); 595s y2 = betapdf (x, 5, 1); 595s y3 = betapdf (x, 1, 3); 595s y4 = betapdf (x, 2, 2); 595s y5 = betapdf (x, 2, 5); 595s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 595s grid on 595s ylim ([0, 2.5]) 595s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 595s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 595s title ("Beta PDF") 595s xlabel ("values in x") 595s ylabel ("density") 595s ***** shared x, y 595s x = [-1 0 0.5 1 2]; 595s y = [0 2 1 0 0]; 595s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 595s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 595s ***** assert (betapdf (x, ones (1, 5), 2), y) 595s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 595s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 595s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 595s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 595s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 595s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 595s ***** test 595s x = rand (10,1); 595s y = 1 ./ (pi * sqrt (x .* (1 - x))); 595s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 595s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 595s ***** error<betapdf: function called with too few input arguments.> betapdf () 595s ***** error<betapdf: function called with too few input arguments.> betapdf (1) 595s ***** error<betapdf: function called with too few input arguments.> betapdf (1,2) 595s ***** error<betapdf: function called with too many inputs> betapdf (1,2,3,4) 595s ***** error<betapdf: X, A, and B must be of common size or scalars.> ... 595s betapdf (ones (3), ones (2), ones (2)) 595s ***** error<betapdf: X, A, and B must be of common size or scalars.> ... 595s betapdf (ones (2), ones (3), ones (2)) 595s ***** error<betapdf: X, A, and B must be of common size or scalars.> ... 595s betapdf (ones (2), ones (2), ones (3)) 595s ***** error<betapdf: X, A, and B must not be complex.> betapdf (i, 2, 2) 595s ***** error<betapdf: X, A, and B must not be complex.> betapdf (2, i, 2) 595s ***** error<betapdf: X, A, and B must not be complex.> betapdf (2, 2, i) 595s 21 tests, 21 passed, 0 known failure, 0 skipped 595s [inst/dist_fun/logiinv.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logiinv.m 595s ***** demo 595s ## Plot various iCDFs from the logistic distribution 595s p = 0.001:0.001:0.999; 595s x1 = logiinv (p, 5, 2); 595s x2 = logiinv (p, 9, 3); 595s x3 = logiinv (p, 9, 4); 595s x4 = logiinv (p, 6, 2); 595s x5 = logiinv (p, 2, 1); 595s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 595s grid on 595s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 595s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 595s title ("Logistic iCDF") 595s xlabel ("probability") 595s ylabel ("x") 595s ***** test 595s p = [0.01:0.01:0.99]; 595s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 595s ***** shared p 595s p = [-1 0 0.5 1 2]; 595s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 595s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 595s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 595s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 595s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 595s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 595s ***** error<logiinv: function called with too few input arguments.> logiinv () 595s ***** error<logiinv: function called with too few input arguments.> logiinv (1) 595s ***** error<logiinv: function called with too few input arguments.> ... 595s logiinv (1, 2) 595s ***** error<logiinv: P, MU, and SIGMA must be of common size or scalars.> ... 595s logiinv (1, ones (2), ones (3)) 595s ***** error<logiinv: P, MU, and SIGMA must be of common size or scalars.> ... 595s logiinv (ones (2), 1, ones (3)) 595s ***** error<logiinv: P, MU, and SIGMA must be of common size or scalars.> ... 595s logiinv (ones (2), ones (3), 1) 595s ***** error<logiinv: P, MU, and SIGMA must not be complex.> logiinv (i, 2, 3) 595s ***** error<logiinv: P, MU, and SIGMA must not be complex.> logiinv (1, i, 3) 595s ***** error<logiinv: P, MU, and SIGMA must not be complex.> logiinv (1, 2, i) 595s 16 tests, 16 passed, 0 known failure, 0 skipped 595s [inst/dist_fun/gevinv.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gevinv.m 595s ***** demo 595s ## Plot various iCDFs from the generalized extreme value distribution 595s p = 0.001:0.001:0.999; 595s x1 = gevinv (p, 1, 1, 1); 595s x2 = gevinv (p, 0.5, 1, 1); 595s x3 = gevinv (p, 1, 1, 5); 595s x4 = gevinv (p, 1, 2, 5); 595s x5 = gevinv (p, 1, 5, 5); 595s x6 = gevinv (p, 1, 0.5, 5); 595s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 595s p, x4, "-c", p, x5, "-m", p, x6, "-k") 595s grid on 595s ylim ([-1, 10]) 595s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 595s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 595s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 595s "location", "northwest") 595s title ("Generalized extreme value iCDF") 595s xlabel ("probability") 595s ylabel ("values in x") 595s ***** test 595s p = 0.1:0.1:0.9; 595s k = 0; 595s sigma = 1; 595s mu = 0; 595s x = gevinv (p, k, sigma, mu); 595s c = gevcdf(x, k, sigma, mu); 595s assert (c, p, 0.001); 595s ***** test 595s p = 0.1:0.1:0.9; 595s k = 1; 595s sigma = 1; 595s mu = 0; 595s x = gevinv (p, k, sigma, mu); 595s c = gevcdf(x, k, sigma, mu); 595s assert (c, p, 0.001); 595s ***** test 595s p = 0.1:0.1:0.9; 595s k = 0.3; 595s sigma = 1; 595s mu = 0; 595s x = gevinv (p, k, sigma, mu); 595s c = gevcdf(x, k, sigma, mu); 595s assert (c, p, 0.001); 595s ***** error<gevinv: function called with too few input arguments.> gevinv () 595s ***** error<gevinv: function called with too few input arguments.> gevinv (1) 595s ***** error<gevinv: function called with too few input arguments.> gevinv (1, 2) 595s ***** error<gevinv: function called with too few input arguments.> gevinv (1, 2, 3) 595s ***** error<gevinv: P, K, SIGMA, and MU must be of common size or scalars.> ... 595s gevinv (ones (3), ones (2), ones(2), ones(2)) 595s ***** error<gevinv: P, K, SIGMA, and MU must be of common size or scalars.> ... 595s gevinv (ones (2), ones (3), ones(2), ones(2)) 595s ***** error<gevinv: P, K, SIGMA, and MU must be of common size or scalars.> ... 595s gevinv (ones (2), ones (2), ones(3), ones(2)) 595s ***** error<gevinv: P, K, SIGMA, and MU must be of common size or scalars.> ... 595s gevinv (ones (2), ones (2), ones(2), ones(3)) 595s ***** error<gevinv: P, K, SIGMA, and MU must not be complex.> gevinv (i, 2, 3, 4) 595s ***** error<gevinv: P, K, SIGMA, and MU must not be complex.> gevinv (1, i, 3, 4) 595s ***** error<gevinv: P, K, SIGMA, and MU must not be complex.> gevinv (1, 2, i, 4) 595s ***** error<gevinv: P, K, SIGMA, and MU must not be complex.> gevinv (1, 2, 3, i) 595s 15 tests, 15 passed, 0 known failure, 0 skipped 595s [inst/dist_fun/plinv.m] 595s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/plinv.m 595s ***** demo 595s ## Plot various iCDFs from the Piecewise linear distribution 595s p = 0.001:0.001:0.999; 595s x1 = [0, 1, 3, 4, 7, 10]; 595s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 595s x2 = [0, 2, 5, 6, 7, 8]; 595s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 595s data1 = plinv (p, x1, Fx1); 595s data2 = plinv (p, x2, Fx2); 595s plot (p, data1, "-b", p, data2, "-g") 595s grid on 595s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 595s title ("Piecewise linear iCDF") 595s xlabel ("probability") 595s ylabel ("values in data") 595s ***** test 595s p = 0:0.2:1; 595s data = plinv (p, [0, 1], [0, 1]); 595s assert (data, p); 595s ***** test 595s p = 0:0.2:1; 595s data = plinv (p, [0, 2], [0, 1]); 595s assert (data, 2 * p); 595s ***** test 595s p = 0:0.2:1; 595s data_out = 1:6; 595s data = plinv (p, [0, 1], [0, 0.5]); 595s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 595s ***** test 595s p = 0:0.2:1; 595s data_out = 1:6; 595s data = plinv (p, [0, 0.5], [0, 1]); 595s assert (data, [0:0.1:0.5]); 596s ***** error<plinv: function called with too few input arguments.> plinv () 596s ***** error<plinv: function called with too few input arguments.> plinv (1) 596s ***** error<plinv: function called with too few input arguments.> plinv (1, 2) 596s ***** error<plinv: X and FX must be vectors of equal size.> ... 596s plinv (1, [0, 1, 2], [0, 1]) 596s ***** error<plinv: X and FX must be at least two-elements long.> ... 596s plinv (1, [0], [1]) 596s ***** error<plinv: FX must be bounded in the range> ... 596s plinv (1, [0, 1, 2], [0, 1, 1.5]) 596s ***** error<plinv: FX must be bounded in the range> ... 596s plinv (1, [0, 1, 2], [0, i, 1]) 596s ***** error<plinv: P, X, and FX must not be complex.> ... 596s plinv (i, [0, 1, 2], [0, 0.5, 1]) 596s ***** error<plinv: P, X, and FX must not be complex.> ... 596s plinv (1, [0, i, 2], [0, 0.5, 1]) 596s ***** error<plinv: P, X, and FX must not be complex.> ... 596s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 596s 14 tests, 14 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/bisapdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bisapdf.m 596s ***** demo 596s ## Plot various PDFs from the Birnbaum-Saunders distribution 596s x = 0.01:0.01:4; 596s y1 = bisapdf (x, 1, 0.5); 596s y2 = bisapdf (x, 1, 1); 596s y3 = bisapdf (x, 1, 2); 596s y4 = bisapdf (x, 1, 5); 596s y5 = bisapdf (x, 1, 10); 596s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 596s grid on 596s ylim ([0, 1.5]) 596s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 596s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 596s title ("Birnbaum-Saunders PDF") 596s xlabel ("values in x") 596s ylabel ("density") 596s ***** demo 596s ## Plot various PDFs from the Birnbaum-Saunders distribution 596s x = 0.01:0.01:6; 596s y1 = bisapdf (x, 1, 0.3); 596s y2 = bisapdf (x, 2, 0.3); 596s y3 = bisapdf (x, 1, 0.5); 596s y4 = bisapdf (x, 3, 0.5); 596s y5 = bisapdf (x, 5, 0.5); 596s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 596s grid on 596s ylim ([0, 1.5]) 596s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 596s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 596s title ("Birnbaum-Saunders CDF") 596s xlabel ("values in x") 596s ylabel ("density") 596s ***** shared x, y 596s x = [-1, 0, 1, 2, Inf]; 596s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 596s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 596s ***** assert (bisapdf (x, 1, 1), y, eps) 596s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 596s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 596s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 596s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 596s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 596s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 596s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 596s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 596s ***** error<bisapdf: function called with too few input arguments.> bisapdf () 596s ***** error<bisapdf: function called with too few input arguments.> bisapdf (1) 596s ***** error<bisapdf: function called with too few input arguments.> bisapdf (1, 2) 596s ***** error<bisapdf: function called with too many inputs> bisapdf (1, 2, 3, 4) 596s ***** error<bisapdf: X, BETA, and GAMMA must be of common size or scalars.> ... 596s bisapdf (ones (3), ones (2), ones(2)) 596s ***** error<bisapdf: X, BETA, and GAMMA must be of common size or scalars.> ... 596s bisapdf (ones (2), ones (3), ones(2)) 596s ***** error<bisapdf: X, BETA, and GAMMA must be of common size or scalars.> ... 596s bisapdf (ones (2), ones (2), ones(3)) 596s ***** error<bisapdf: X, BETA, and GAMMA must not be complex.> bisapdf (i, 4, 3) 596s ***** error<bisapdf: X, BETA, and GAMMA must not be complex.> bisapdf (1, i, 3) 596s ***** error<bisapdf: X, BETA, and GAMMA must not be complex.> bisapdf (1, 4, i) 596s 20 tests, 20 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/cauchypdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/cauchypdf.m 596s ***** demo 596s ## Plot various PDFs from the Cauchy distribution 596s x = -5:0.01:5; 596s y1 = cauchypdf (x, 0, 0.5); 596s y2 = cauchypdf (x, 0, 1); 596s y3 = cauchypdf (x, 0, 2); 596s y4 = cauchypdf (x, -2, 1); 596s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 596s grid on 596s xlim ([-5, 5]) 596s ylim ([0, 0.7]) 596s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 596s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 596s title ("Cauchy PDF") 596s xlabel ("values in x") 596s ylabel ("density") 596s ***** shared x, y 596s x = [-1 0 0.5 1 2]; 596s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 596s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 596s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 596s ***** assert (cauchypdf (x, ones (1,5), 2), y) 596s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 596s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 596s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 596s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 596s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 596s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 596s ***** test 596s x = rand (10, 1); 596s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 596s ***** error<cauchypdf: function called with too few input arguments.> cauchypdf () 596s ***** error<cauchypdf: function called with too few input arguments.> cauchypdf (1) 596s ***** error<cauchypdf: function called with too few input arguments.> ... 596s cauchypdf (1, 2) 596s ***** error<cauchypdf: function called with too many inputs> cauchypdf (1, 2, 3, 4) 596s ***** error<cauchypdf: X, X0, and GAMMA must be of common size or scalars.> ... 596s cauchypdf (ones (3), ones (2), ones(2)) 596s ***** error<cauchypdf: X, X0, and GAMMA must be of common size or scalars.> ... 596s cauchypdf (ones (2), ones (3), ones(2)) 596s ***** error<cauchypdf: X, X0, and GAMMA must be of common size or scalars.> ... 596s cauchypdf (ones (2), ones (2), ones(3)) 596s ***** error<cauchypdf: X, X0, and GAMMA must not be complex.> cauchypdf (i, 4, 3) 596s ***** error<cauchypdf: X, X0, and GAMMA must not be complex.> cauchypdf (1, i, 3) 596s ***** error<cauchypdf: X, X0, and GAMMA must not be complex.> cauchypdf (1, 4, i) 596s 20 tests, 20 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/logncdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logncdf.m 596s ***** demo 596s ## Plot various CDFs from the log-normal distribution 596s x = 0:0.01:3; 596s p1 = logncdf (x, 0, 1); 596s p2 = logncdf (x, 0, 0.5); 596s p3 = logncdf (x, 0, 0.25); 596s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 596s grid on 596s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 596s "location", "southeast") 596s title ("Log-normal CDF") 596s xlabel ("values in x") 596s ylabel ("probability") 596s ***** shared x, y 596s x = [-1, 0, 1, e, Inf]; 596s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 596s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 596s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 596s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 596s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 596s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 596s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 596s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 596s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 596s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 596s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 596s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 596s ***** error<logncdf: invalid number of input arguments.> logncdf () 596s ***** error<logncdf: invalid number of input arguments.> logncdf (1,2,3,4,5,6,7) 596s ***** error<logncdf: invalid argument for upper tail.> logncdf (1, 2, 3, 4, "uper") 596s ***** error<logncdf: X, MU, and SIGMA must be of common size or scalars.> ... 596s logncdf (ones (3), ones (2), ones (2)) 596s ***** error<logncdf: invalid size of covariance matrix.> logncdf (2, 3, 4, [1, 2]) 596s ***** error<logncdf: covariance matrix is required for confidence bounds.> ... 596s [p, plo, pup] = logncdf (1, 2, 3) 596s ***** error<logncdf: invalid value for alpha.> [p, plo, pup] = ... 596s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 596s ***** error<logncdf: invalid value for alpha.> [p, plo, pup] = ... 596s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 596s ***** error<logncdf: invalid value for alpha.> [p, plo, pup] = ... 596s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 596s ***** error<logncdf: X, MU, and SIGMA must not be complex.> logncdf (i, 2, 2) 596s ***** error<logncdf: X, MU, and SIGMA must not be complex.> logncdf (2, i, 2) 596s ***** error<logncdf: X, MU, and SIGMA must not be complex.> logncdf (2, 2, i) 596s ***** error<logncdf: bad covariance matrix.> ... 596s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 596s 24 tests, 24 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/gppdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gppdf.m 596s ***** demo 596s ## Plot various PDFs from the generalized Pareto distribution 596s x = 0:0.001:5; 596s y1 = gppdf (x, 1, 1, 0); 596s y2 = gppdf (x, 5, 1, 0); 596s y3 = gppdf (x, 20, 1, 0); 596s y4 = gppdf (x, 1, 2, 0); 596s y5 = gppdf (x, 5, 2, 0); 596s y6 = gppdf (x, 20, 2, 0); 596s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 596s x, y4, "-c", x, y5, "-m", x, y6, "-k") 596s grid on 596s xlim ([0, 5]) 596s ylim ([0, 1]) 596s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 596s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 596s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 596s "location", "northeast") 596s title ("Generalized Pareto PDF") 596s xlabel ("values in x") 596s ylabel ("density") 596s ***** shared x, y1, y2, y3 596s x = [-Inf, -1, 0, 1/2, 1, Inf]; 596s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 596s y2 = [0, 0, 1, 4/9, 1/4, 0]; 596s y3 = [0, 0, 1, 1, 1, 0]; 596s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 596s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 596s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 596s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 596s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 596s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 596s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 596s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 596s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 596s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 596s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 596s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 596s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 596s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 596s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 596s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 596s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 596s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 596s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 596s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 596s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 596s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 596s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 596s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 596s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 596s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 596s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 596s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 596s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 596s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 596s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 596s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 596s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 596s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 596s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 596s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 596s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 596s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 596s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 596s ***** error<gpcdf: function called with too few input arguments.> gpcdf () 596s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1) 596s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1, 2) 596s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1, 2, 3) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 596s gpcdf (ones (3), ones (2), ones(2), ones(2)) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 596s gpcdf (ones (2), ones (3), ones(2), ones(2)) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 596s gpcdf (ones (2), ones (2), ones(3), ones(2)) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 596s gpcdf (ones (2), ones (2), ones(2), ones(3)) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (i, 2, 3, 4) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, i, 3, 4) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, 2, i, 4) 596s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, 2, 3, i) 596s 51 tests, 51 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/betarnd.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/betarnd.m 596s ***** assert (size (betarnd (2, 1/2)), [1 1]) 596s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 596s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 596s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 596s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 596s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 596s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 596s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 596s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 596s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 596s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 596s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 596s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 596s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 596s ***** assert (class (betarnd (1, 1)), "double") 596s ***** assert (class (betarnd (1, single (0))), "single") 596s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 596s ***** assert (class (betarnd (1, single (1), 2)), "single") 596s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 596s ***** assert (class (betarnd (single (1), 1, 2)), "single") 596s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 596s ***** error<betarnd: function called with too few input arguments.> betarnd () 596s ***** error<betarnd: function called with too few input arguments.> betarnd (1) 596s ***** error<betarnd: A and B must be of common size or scalars.> ... 596s betarnd (ones (3), ones (2)) 596s ***** error<betarnd: A and B must be of common size or scalars.> ... 596s betarnd (ones (2), ones (3)) 596s ***** error<betarnd: A and B must not be complex.> betarnd (i, 2) 596s ***** error<betarnd: A and B must not be complex.> betarnd (1, i) 596s ***** error<betarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s betarnd (1, 1/2, -1) 596s ***** error<betarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s betarnd (1, 1/2, 1.2) 596s ***** error<betarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s betarnd (1, 1/2, ones (2)) 596s ***** error<betarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s betarnd (1, 1/2, [2 -1 2]) 596s ***** error<betarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s betarnd (1, 1/2, [2 0 2.5]) 596s ***** error<betarnd: dimensions must be non-negative integers.> ... 596s betarnd (1, 1/2, 2, -1, 5) 596s ***** error<betarnd: dimensions must be non-negative integers.> ... 596s betarnd (1, 1/2, 2, 1.5, 5) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2, 1/2 * ones (2), 3) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2, 1/2 * ones (2), [3, 2]) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2, 1/2 * ones (2), 3, 2) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2 * ones (2), 1/2, 3) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2 * ones (2), 1/2, [3, 2]) 596s ***** error<betarnd: A and B must be scalars or of size SZ.> ... 596s betarnd (2 * ones (2), 1/2, 3, 2) 596s 40 tests, 40 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/binocdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/binocdf.m 596s ***** demo 596s ## Plot various CDFs from the binomial distribution 596s x = 0:40; 596s p1 = binocdf (x, 20, 0.5); 596s p2 = binocdf (x, 20, 0.7); 596s p3 = binocdf (x, 40, 0.5); 596s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 596s grid on 596s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 596s "n = 40, ps = 0.5"}, "location", "southeast") 596s title ("Binomial CDF") 596s xlabel ("values in x (number of successes)") 596s ylabel ("probability") 596s ***** shared x, p, p1 596s x = [-1 0 1 2 3]; 596s p = [0 1/4 3/4 1 1]; 596s p1 = 1 - p; 596s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 596s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 596s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 596s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 596s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 596s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 596s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 596s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 596s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 596s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 596s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 596s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 596s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 596s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 596s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 596s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 596s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 596s ***** error<binocdf: function called with too few input arguments.> binocdf () 596s ***** error<binocdf: function called with too few input arguments.> binocdf (1) 596s ***** error<binocdf: function called with too few input arguments.> binocdf (1, 2) 596s ***** error<binocdf: function called with too many inputs> binocdf (1, 2, 3, 4, 5) 596s ***** error<binocdf: invalid argument for upper tail.> binocdf (1, 2, 3, "tail") 596s ***** error<binocdf: invalid argument for upper tail.> binocdf (1, 2, 3, 4) 596s ***** error<binocdf: X, N, and PS must be of common size or scalars.> ... 596s binocdf (ones (3), ones (2), ones (2)) 596s ***** error<binocdf: X, N, and PS must be of common size or scalars.> ... 596s binocdf (ones (2), ones (3), ones (2)) 596s ***** error<binocdf: X, N, and PS must be of common size or scalars.> ... 596s binocdf (ones (2), ones (2), ones (3)) 596s ***** error<binocdf: X, N, and PS must not be complex.> binocdf (i, 2, 2) 596s ***** error<binocdf: X, N, and PS must not be complex.> binocdf (2, i, 2) 596s ***** error<binocdf: X, N, and PS must not be complex.> binocdf (2, 2, i) 596s 29 tests, 29 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/poissrnd.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/poissrnd.m 596s ***** assert (size (poissrnd (2)), [1, 1]) 596s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 596s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 596s ***** assert (size (poissrnd (1, 3)), [3, 3]) 596s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 596s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 596s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 596s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 596s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 596s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 596s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 596s ***** assert (poissrnd (0, 1, 1), 0) 596s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 596s ***** assert (class (poissrnd (2)), "double") 596s ***** assert (class (poissrnd (single (2))), "single") 596s ***** assert (class (poissrnd (single ([2 2]))), "single") 596s ***** error<poissrnd: function called with too few input arguments.> poissrnd () 596s ***** error<poissrnd: LAMBDA must not be complex.> poissrnd (i) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (1, -1) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (1, 1.2) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (1, ones (2)) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (1, [2 -1 2]) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (1, [2 0 2.5]) 596s ***** error<poissrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s poissrnd (ones (2), ones (2)) 596s ***** error<poissrnd: dimensions must be non-negative integers.> ... 596s poissrnd (1, 2, -1, 5) 596s ***** error<poissrnd: dimensions must be non-negative integers.> ... 596s poissrnd (1, 2, 1.5, 5) 596s ***** error<poissrnd: LAMBDA must be scalar or of size SZ.> poissrnd (ones (2,2), 3) 596s ***** error<poissrnd: LAMBDA must be scalar or of size SZ.> poissrnd (ones (2,2), [3, 2]) 596s ***** error<poissrnd: LAMBDA must be scalar or of size SZ.> poissrnd (ones (2,2), 2, 3) 596s 29 tests, 29 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/gumbelrnd.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gumbelrnd.m 596s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 596s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 596s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 596s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 596s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 596s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 596s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 596s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 596s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 596s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 596s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 596s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 596s ***** assert (class (gumbelrnd (1, 1)), "double") 596s ***** assert (class (gumbelrnd (1, single (1))), "single") 596s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 596s ***** assert (class (gumbelrnd (single (1), 1)), "single") 596s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 596s ***** error<gumbelrnd: function called with too few input arguments.> gumbelrnd () 596s ***** error<gumbelrnd: function called with too few input arguments.> gumbelrnd (1) 596s ***** error<gumbelrnd: MU and BETA must be of common size or scalars.> ... 596s gumbelrnd (ones (3), ones (2)) 596s ***** error<gumbelrnd: MU and BETA must be of common size or scalars.> ... 596s gumbelrnd (ones (2), ones (3)) 596s ***** error<gumbelrnd: MU and BETA must not be complex.> gumbelrnd (i, 2, 3) 596s ***** error<gumbelrnd: MU and BETA must not be complex.> gumbelrnd (1, i, 3) 596s ***** error<gumbelrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s gumbelrnd (1, 2, -1) 596s ***** error<gumbelrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s gumbelrnd (1, 2, 1.2) 596s ***** error<gumbelrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s gumbelrnd (1, 2, ones (2)) 596s ***** error<gumbelrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s gumbelrnd (1, 2, [2 -1 2]) 596s ***** error<gumbelrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s gumbelrnd (1, 2, [2 0 2.5]) 596s ***** error<gumbelrnd: dimensions must be non-negative integers.> ... 596s gumbelrnd (1, 2, 2, -1, 5) 596s ***** error<gumbelrnd: dimensions must be non-negative integers.> ... 596s gumbelrnd (1, 2, 2, 1.5, 5) 596s ***** error<gumbelrnd: MU and BETA must be scalars or of size SZ.> ... 596s gumbelrnd (2, ones (2), 3) 596s ***** error<gumbelrnd: MU and BETA must be scalars or of size SZ.> ... 596s gumbelrnd (2, ones (2), [3, 2]) 596s ***** error<gumbelrnd: MU and BETA must be scalars or of size SZ.> ... 596s gumbelrnd (2, ones (2), 3, 2) 596s 33 tests, 33 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/norminv.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/norminv.m 596s ***** demo 596s ## Plot various iCDFs from the normal distribution 596s p = 0.001:0.001:0.999; 596s x1 = norminv (p, 0, 0.5); 596s x2 = norminv (p, 0, 1); 596s x3 = norminv (p, 0, 2); 596s x4 = norminv (p, -2, 0.8); 596s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 596s grid on 596s ylim ([-5, 5]) 596s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 596s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 596s title ("Normal iCDF") 596s xlabel ("probability") 596s ylabel ("values in x") 596s ***** shared p 596s p = [-1 0 0.5 1 2]; 596s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 596s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 596s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 596s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 596s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 596s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 596s ***** assert (norminv (p), probit (p)) 596s ***** assert (norminv (0.31254), probit (0.31254)) 596s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 596s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 596s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 596s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 596s ***** error<norminv: function called with too few input arguments.> norminv () 596s ***** error<norminv: P, MU, and SIGMA must be of common size or scalars.> ... 596s norminv (ones (3), ones (2), ones (2)) 596s ***** error<norminv: P, MU, and SIGMA must be of common size or scalars.> ... 596s norminv (ones (2), ones (3), ones (2)) 596s ***** error<norminv: P, MU, and SIGMA must be of common size or scalars.> ... 596s norminv (ones (2), ones (2), ones (3)) 596s ***** error<norminv: P, MU, and SIGMA must not be complex.> norminv (i, 2, 2) 596s ***** error<norminv: P, MU, and SIGMA must not be complex.> norminv (2, i, 2) 596s ***** error<norminv: P, MU, and SIGMA must not be complex.> norminv (2, 2, i) 596s 19 tests, 19 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/geoinv.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/geoinv.m 596s ***** demo 596s ## Plot various iCDFs from the geometric distribution 596s p = 0.001:0.001:0.999; 596s x1 = geoinv (p, 0.2); 596s x2 = geoinv (p, 0.5); 596s x3 = geoinv (p, 0.7); 596s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 596s grid on 596s ylim ([0, 10]) 596s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 596s title ("Geometric iCDF") 596s xlabel ("probability") 596s ylabel ("values in x (number of failures)") 596s ***** shared p 596s p = [-1 0 0.75 1 2]; 596s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 596s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 596s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 596s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 596s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 596s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 596s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 596s ***** error<geoinv: function called with too few input arguments.> geoinv () 596s ***** error<geoinv: function called with too few input arguments.> geoinv (1) 596s ***** error<geoinv: P and PS must be of common size or scalars.> ... 596s geoinv (ones (3), ones (2)) 596s ***** error<geoinv: P and PS must be of common size or scalars.> ... 596s geoinv (ones (2), ones (3)) 596s ***** error<geoinv: P and PS must not be complex.> ... 596s geoinv (i, 2) 596s ***** error<geoinv: P and PS must not be complex.> ... 596s geoinv (2, i) 596s 13 tests, 13 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/nakarnd.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nakarnd.m 596s ***** assert (size (nakarnd (1, 1)), [1 1]) 596s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 596s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 596s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 596s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 596s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 596s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 596s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 596s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 596s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 596s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 596s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 596s ***** assert (class (nakarnd (1, 1)), "double") 596s ***** assert (class (nakarnd (1, single (1))), "single") 596s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 596s ***** assert (class (nakarnd (single (1), 1)), "single") 596s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 596s ***** error<nakarnd: function called with too few input arguments.> nakarnd () 596s ***** error<nakarnd: function called with too few input arguments.> nakarnd (1) 596s ***** error<nakarnd: MU and OMEGA must be of common size or scalars.> ... 596s nakarnd (ones (3), ones (2)) 596s ***** error<nakarnd: MU and OMEGA must be of common size or scalars.> ... 596s nakarnd (ones (2), ones (3)) 596s ***** error<nakarnd: MU and OMEGA must not be complex.> nakarnd (i, 2, 3) 596s ***** error<nakarnd: MU and OMEGA must not be complex.> nakarnd (1, i, 3) 596s ***** error<nakarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s nakarnd (1, 2, -1) 596s ***** error<nakarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s nakarnd (1, 2, 1.2) 596s ***** error<nakarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s nakarnd (1, 2, ones (2)) 596s ***** error<nakarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s nakarnd (1, 2, [2 -1 2]) 596s ***** error<nakarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 596s nakarnd (1, 2, [2 0 2.5]) 596s ***** error<nakarnd: dimensions must be non-negative integers.> ... 596s nakarnd (1, 2, 2, -1, 5) 596s ***** error<nakarnd: dimensions must be non-negative integers.> ... 596s nakarnd (1, 2, 2, 1.5, 5) 596s ***** error<nakarnd: MU and OMEGA must be scalars or of size SZ.> ... 596s nakarnd (2, ones (2), 3) 596s ***** error<nakarnd: MU and OMEGA must be scalars or of size SZ.> ... 596s nakarnd (2, ones (2), [3, 2]) 596s ***** error<nakarnd: MU and OMEGA must be scalars or of size SZ.> ... 596s nakarnd (2, ones (2), 3, 2) 596s 33 tests, 33 passed, 0 known failure, 0 skipped 596s [inst/dist_fun/hncdf.m] 596s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hncdf.m 596s ***** demo 596s ## Plot various CDFs from the half-normal distribution 596s x = 0:0.001:10; 596s p1 = hncdf (x, 0, 1); 596s p2 = hncdf (x, 0, 2); 596s p3 = hncdf (x, 0, 3); 596s p4 = hncdf (x, 0, 5); 596s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 596s grid on 596s xlim ([0, 10]) 596s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 596s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 596s title ("Half-normal CDF") 596s xlabel ("values in x") 596s ylabel ("probability") 596s ***** demo 596s ## Plot half-normal against normal cumulative distribution function 596s x = -5:0.001:5; 596s p1 = hncdf (x, 0, 1); 596s p2 = normcdf (x); 596s plot (x, p1, "-b", x, p2, "-g") 596s grid on 596s xlim ([-5, 5]) 596s legend ({"half-normal with μ = 0, σ = 1", ... 596s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 596s title ("Half-normal against standard normal CDF") 596s xlabel ("values in x") 596s ylabel ("probability") 596s ***** shared x, p1, p1u, y2, y2u, y3, y3u 596s x = [-Inf, -1, 0, 1/2, 1, Inf]; 596s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 596s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 596s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 596s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 596s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 596s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 596s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 596s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 596s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 596s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 596s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 596s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 596s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 596s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 596s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 596s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 596s ***** error<hncdf: function called with too few input arguments.> hncdf () 596s ***** error<hncdf: function called with too few input arguments.> hncdf (1) 596s ***** error<hncdf: function called with too few input arguments.> hncdf (1, 2) 596s ***** error<hncdf: invalid argument for upper tail.> hncdf (1, 2, 3, "tail") 596s ***** error<hncdf: invalid argument for upper tail.> hncdf (1, 2, 3, 5) 596s ***** error<hncdf: X, MU, and SIGMA must be of common size or scalars.> ... 596s hncdf (ones (3), ones (2), ones(2)) 596s ***** error<hncdf: X, MU, and SIGMA must be of common size or scalars.> ... 596s hncdf (ones (2), ones (3), ones(2)) 596s ***** error<hncdf: X, MU, and SIGMA must be of common size or scalars.> ... 596s hncdf (ones (2), ones (2), ones(3)) 596s ***** error<hncdf: X, MU, and SIGMA must not be complex.> hncdf (i, 2, 3) 597s ***** error<hncdf: X, MU, and SIGMA must not be complex.> hncdf (1, i, 3) 597s ***** error<hncdf: X, MU, and SIGMA must not be complex.> hncdf (1, 2, i) 597s 25 tests, 25 passed, 0 known failure, 0 skipped 597s [inst/dist_fun/mvtcdf.m] 597s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvtcdf.m 597s ***** demo 597s ## Compute the cdf of a multivariate Student's t distribution with 597s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 597s 597s rho = [1, 0.4; 0.4, 1]; 597s df = 2; 597s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 597s X = [X1(:), X2(:)]; 597s p = mvtcdf (X, rho, df); 597s surf (X1, X2, reshape (p, 25, 25)); 597s title ("Bivariate Student's t cummulative distribution function"); 597s ***** test 597s x = [1, 2]; 597s rho = [1, 0.5; 0.5, 1]; 597s df = 4; 597s a = [-1, 0]; 597s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 597s ***** test 597s x = [1, 2;2, 4;1, 5]; 597s rho = [1, 0.5; 0.5, 1]; 597s df = 4; 597s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 597s assert (mvtcdf(x, rho, df), p, 1e-14); 597s ***** test 597s x = [1, 2, 2, 4, 1, 5]; 597s rho = eye (6); 597s rho(rho == 0) = 0.5; 597s df = 4; 597s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 608s ***** error mvtcdf (1) 608s ***** error mvtcdf (1, 2) 608s ***** error<mvtcdf: correlation matrix RHO does not match dimensions in data.> ... 608s mvtcdf (1, [2, 3; 3, 2], 1) 608s ***** error<mvtcdf: correlation matrix RHO does not match dimensions in data.> ... 608s mvtcdf ([2, 3, 4], ones (2), 1) 608s ***** error<mvtcdf: X_LO and X_UP must be of the same size.> ... 608s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 608s ***** error<mvtcdf: correlation matrix RHO must be positive semi-definite.> ... 608s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 608s ***** error<mvtcdf: DF must be a scalar or a vector with the same samples as in> ... 608s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 608s 10 tests, 10 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/geopdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/geopdf.m 608s ***** demo 608s ## Plot various PDFs from the geometric distribution 608s x = 0:10; 608s y1 = geopdf (x, 0.2); 608s y2 = geopdf (x, 0.5); 608s y3 = geopdf (x, 0.7); 608s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 608s grid on 608s ylim ([0, 0.8]) 608s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 608s title ("Geometric PDF") 608s xlabel ("values in x (number of failures)") 608s ylabel ("density") 608s ***** shared x, y 608s x = [-1 0 1 Inf]; 608s y = [0, 1/2, 1/4, NaN]; 608s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 608s ***** assert (geopdf (x, 0.5), y) 608s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 608s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 608s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 608s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 608s ***** error geopdf () 608s ***** error geopdf (1) 608s ***** error geopdf (1,2,3) 608s ***** error geopdf (ones (3), ones (2)) 608s ***** error geopdf (ones (2), ones (3)) 608s ***** error geopdf (i, 2) 608s ***** error geopdf (2, i) 608s 13 tests, 13 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/logipdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logipdf.m 608s ***** demo 608s ## Plot various PDFs from the logistic distribution 608s x = -5:0.01:20; 608s y1 = logipdf (x, 5, 2); 608s y2 = logipdf (x, 9, 3); 608s y3 = logipdf (x, 9, 4); 608s y4 = logipdf (x, 6, 2); 608s y5 = logipdf (x, 2, 1); 608s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 608s grid on 608s ylim ([0, 0.3]) 608s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 608s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 608s title ("Logistic PDF") 608s xlabel ("values in x") 608s ylabel ("density") 608s ***** shared x, y 608s x = [-Inf -log(4) 0 log(4) Inf]; 608s y = [0, 0.16, 1/4, 0.16, 0]; 608s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 608s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 608s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 608s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 608s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 608s ***** error<logipdf: function called with too few input arguments.> logipdf () 608s ***** error<logipdf: function called with too few input arguments.> logipdf (1) 608s ***** error<logipdf: function called with too few input arguments.> ... 608s logipdf (1, 2) 608s ***** error<logipdf: X, MU, and SIGMA must be of common size or scalars.> ... 608s logipdf (1, ones (2), ones (3)) 608s ***** error<logipdf: X, MU, and SIGMA must be of common size or scalars.> ... 608s logipdf (ones (2), 1, ones (3)) 608s ***** error<logipdf: X, MU, and SIGMA must be of common size or scalars.> ... 608s logipdf (ones (2), ones (3), 1) 608s ***** error<logipdf: X, MU, and SIGMA must not be complex.> logipdf (i, 2, 3) 608s ***** error<logipdf: X, MU, and SIGMA must not be complex.> logipdf (1, i, 3) 608s ***** error<logipdf: X, MU, and SIGMA must not be complex.> logipdf (1, 2, i) 608s 14 tests, 14 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/copulapdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/copulapdf.m 608s ***** test 608s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 608s theta = [1; 2]; 608s y = copulapdf ("Clayton", x, theta); 608s expected_p = [0.9872; 0.7295]; 608s assert (y, expected_p, 0.001); 608s ***** test 608s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 608s y = copulapdf ("Gumbel", x, 2); 608s expected_p = [0.9468; 0.9468]; 608s assert (y, expected_p, 0.001); 608s ***** test 608s x = [0.2, 0.6; 0.2, 0.6]; 608s theta = [1; 2]; 608s y = copulapdf ("Frank", x, theta); 608s expected_p = [0.9378; 0.8678]; 608s assert (y, expected_p, 0.001); 608s ***** test 608s x = [0.2, 0.6; 0.2, 0.6]; 608s theta = [0.3; 0.7]; 608s y = copulapdf ("AMH", x, theta); 608s expected_p = [0.9540; 0.8577]; 608s assert (y, expected_p, 0.001); 608s 4 tests, 4 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/mnpdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mnpdf.m 608s ***** test 608s x = [1, 4, 2]; 608s pk = [0.2, 0.5, 0.3]; 608s y = mnpdf (x, pk); 608s assert (y, 0.11812, 0.001); 608s ***** test 608s x = [1, 4, 2; 1, 0, 9]; 608s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 608s y = mnpdf (x, pk); 608s assert (y, [0.11812; 0.13422], 0.001); 608s 2 tests, 2 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/nakainv.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nakainv.m 608s ***** demo 608s ## Plot various iCDFs from the Nakagami distribution 608s p = 0.001:0.001:0.999; 608s x1 = nakainv (p, 0.5, 1); 608s x2 = nakainv (p, 1, 1); 608s x3 = nakainv (p, 1, 2); 608s x4 = nakainv (p, 1, 3); 608s x5 = nakainv (p, 2, 1); 608s x6 = nakainv (p, 2, 2); 608s x7 = nakainv (p, 5, 1); 608s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 608s p, x5, "-k", p, x6, "-b", p, x7, "-c") 608s grid on 608s ylim ([0, 3]) 608s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 608s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 608s "μ = 5, ω = 1"}, "location", "northwest") 608s title ("Nakagami iCDF") 608s xlabel ("probability") 608s ylabel ("values in x") 608s ***** shared p, y 608s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 608s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 608s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 608s ***** assert (nakainv (p, 1, 1), y, eps) 608s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 608s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 608s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 608s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 608s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 608s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 608s ***** error<nakainv: function called with too few input arguments.> nakainv () 608s ***** error<nakainv: function called with too few input arguments.> nakainv (1) 608s ***** error<nakainv: function called with too few input arguments.> nakainv (1, 2) 608s ***** error<nakainv: P, MU, and OMEGA must be of common size or scalars.> ... 608s nakainv (ones (3), ones (2), ones(2)) 608s ***** error<nakainv: P, MU, and OMEGA must be of common size or scalars.> ... 608s nakainv (ones (2), ones (3), ones(2)) 608s ***** error<nakainv: P, MU, and OMEGA must be of common size or scalars.> ... 608s nakainv (ones (2), ones (2), ones(3)) 608s ***** error<nakainv: P, MU, and OMEGA must not be complex.> nakainv (i, 4, 3) 608s ***** error<nakainv: P, MU, and OMEGA must not be complex.> nakainv (1, i, 3) 608s ***** error<nakainv: P, MU, and OMEGA must not be complex.> nakainv (1, 4, i) 608s 17 tests, 17 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/mnrnd.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mnrnd.m 608s ***** test 608s n = 10; 608s pk = [0.2, 0.5, 0.3]; 608s r = mnrnd (n, pk); 608s assert (size (r), size (pk)); 608s assert (all (r >= 0)); 608s assert (all (round (r) == r)); 608s assert (sum (r) == n); 608s ***** test 608s n = 10 * ones (3, 1); 608s pk = [0.2, 0.5, 0.3]; 608s r = mnrnd (n, pk); 608s assert (size (r), [length(n), length(pk)]); 608s assert (all (r >= 0)); 608s assert (all (round (r) == r)); 608s assert (all (sum (r, 2) == n)); 608s ***** test 608s n = (1:2)'; 608s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 608s r = mnrnd (n, pk); 608s assert (size (r), size (pk)); 608s assert (all (r >= 0)); 608s assert (all (round (r) == r)); 608s assert (all (sum (r, 2) == n)); 608s 3 tests, 3 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/unidcdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unidcdf.m 608s ***** demo 608s ## Plot various CDFs from the discrete uniform distribution 608s x = 0:10; 608s p1 = unidcdf (x, 5); 608s p2 = unidcdf (x, 9); 608s plot (x, p1, "*b", x, p2, "*g") 608s grid on 608s xlim ([0, 10]) 608s ylim ([0, 1]) 608s legend ({"N = 5", "N = 9"}, "location", "southeast") 608s title ("Discrete uniform CDF") 608s xlabel ("values in x") 608s ylabel ("probability") 608s ***** shared x, y 608s x = [0 1 2.5 10 11]; 608s y = [0, 0.1 0.2 1.0 1.0]; 608s ***** assert (unidcdf (x, 10*ones (1,5)), y) 608s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 608s ***** assert (unidcdf (x, 10), y) 608s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 608s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 608s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 608s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 608s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 608s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 608s ***** error<unidcdf: function called with too few input arguments.> unidcdf () 608s ***** error<unidcdf: function called with too few input arguments.> unidcdf (1) 608s ***** error<unidcdf: invalid argument for upper tail.> unidcdf (1, 2, 3) 608s ***** error<unidcdf: invalid argument for upper tail.> unidcdf (1, 2, "tail") 608s ***** error<unidcdf: X and N must be of common size or scalars.> ... 608s unidcdf (ones (3), ones (2)) 608s ***** error<unidcdf: X and N must be of common size or scalars.> ... 608s unidcdf (ones (2), ones (3)) 608s ***** error<unidcdf: X and N must not be complex.> unidcdf (i, 2) 608s ***** error<unidcdf: X and N must not be complex.> unidcdf (2, i) 608s 17 tests, 17 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/cauchyinv.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/cauchyinv.m 608s ***** demo 608s ## Plot various iCDFs from the Cauchy distribution 608s p = 0.001:0.001:0.999; 608s x1 = cauchyinv (p, 0, 0.5); 608s x2 = cauchyinv (p, 0, 1); 608s x3 = cauchyinv (p, 0, 2); 608s x4 = cauchyinv (p, -2, 1); 608s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 608s grid on 608s ylim ([-5, 5]) 608s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 608s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 608s title ("Cauchy iCDF") 608s xlabel ("probability") 608s ylabel ("values in x") 608s ***** shared p 608s p = [-1 0 0.5 1 2]; 608s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 608s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 608s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 608s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 608s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 608s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 608s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 608s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 608s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 608s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 608s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 608s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 608s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 608s ***** error<cauchyinv: function called with too few input arguments.> cauchyinv () 608s ***** error<cauchyinv: function called with too few input arguments.> cauchyinv (1) 608s ***** error<cauchyinv: function called with too few input arguments.> ... 608s cauchyinv (1, 2) 608s ***** error<cauchyinv: function called with too many inputs> cauchyinv (1, 2, 3, 4) 608s ***** error<cauchyinv: P, X0, and GAMMA must be of common size or scalars.> ... 608s cauchyinv (ones (3), ones (2), ones(2)) 608s ***** error<cauchyinv: P, X0, and GAMMA must be of common size or scalars.> ... 608s cauchyinv (ones (2), ones (3), ones(2)) 608s ***** error<cauchyinv: P, X0, and GAMMA must be of common size or scalars.> ... 608s cauchyinv (ones (2), ones (2), ones(3)) 608s ***** error<cauchyinv: P, X0, and GAMMA must not be complex.> cauchyinv (i, 4, 3) 608s ***** error<cauchyinv: P, X0, and GAMMA must not be complex.> cauchyinv (1, i, 3) 608s ***** error<cauchyinv: P, X0, and GAMMA must not be complex.> cauchyinv (1, 4, i) 608s 20 tests, 20 passed, 0 known failure, 0 skipped 608s [inst/dist_fun/burrcdf.m] 608s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/burrcdf.m 608s ***** demo 608s ## Plot various CDFs from the Burr type XII distribution 608s x = 0.001:0.001:5; 608s p1 = burrcdf (x, 1, 1, 1); 608s p2 = burrcdf (x, 1, 1, 2); 608s p3 = burrcdf (x, 1, 1, 3); 608s p4 = burrcdf (x, 1, 2, 1); 608s p5 = burrcdf (x, 1, 3, 1); 608s p6 = burrcdf (x, 1, 0.5, 2); 608s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 608s x, p4, "-c", x, p5, "-m", x, p6, "-k") 608s grid on 608s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 608s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 608s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 608s "location", "southeast") 608s title ("Burr type XII CDF") 608s xlabel ("values in x") 609s ylabel ("probability") 609s ***** shared x, y 609s x = [-1, 0, 1, 2, Inf]; 609s y = [0, 0, 1/2, 2/3, 1]; 609s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 609s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 609s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 609s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 609s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 609s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 609s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 609s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 609s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 609s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 609s ***** error<burrcdf: function called with too few input arguments.> burrcdf () 609s ***** error<burrcdf: function called with too few input arguments.> burrcdf (1) 609s ***** error<burrcdf: function called with too few input arguments.> burrcdf (1, 2) 609s ***** error<burrcdf: function called with too few input arguments.> burrcdf (1, 2, 3) 609s ***** error<burrcdf: function called with too many inputs> ... 609s burrcdf (1, 2, 3, 4, 5, 6) 609s ***** error<burrcdf: invalid argument for upper tail.> burrcdf (1, 2, 3, 4, "tail") 609s ***** error<burrcdf: invalid argument for upper tail.> burrcdf (1, 2, 3, 4, 5) 609s ***** error<burrcdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 609s burrcdf (ones (3), ones (2), ones(2), ones(2)) 609s ***** error<burrcdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 609s burrcdf (ones (2), ones (3), ones(2), ones(2)) 609s ***** error<burrcdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 609s burrcdf (ones (2), ones (2), ones(3), ones(2)) 609s ***** error<burrcdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 609s burrcdf (ones (2), ones (2), ones(2), ones(3)) 609s ***** error<burrcdf: X, LAMBDA, C, and K must not be complex.> burrcdf (i, 2, 3, 4) 609s ***** error<burrcdf: X, LAMBDA, C, and K must not be complex.> burrcdf (1, i, 3, 4) 609s ***** error<burrcdf: X, LAMBDA, C, and K must not be complex.> burrcdf (1, 2, i, 4) 609s ***** error<burrcdf: X, LAMBDA, C, and K must not be complex.> burrcdf (1, 2, 3, i) 609s 25 tests, 25 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/triinv.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/triinv.m 609s ***** demo 609s ## Plot various iCDFs from the triangular distribution 609s p = 0.001:0.001:0.999; 609s x1 = triinv (p, 3, 6, 4); 609s x2 = triinv (p, 1, 5, 2); 609s x3 = triinv (p, 2, 9, 3); 609s x4 = triinv (p, 2, 9, 5); 609s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 609s grid on 609s ylim ([0, 10]) 609s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 609s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 609s "location", "northwest") 609s title ("Triangular CDF") 609s xlabel ("probability") 609s ylabel ("values in x") 609s ***** shared p, y 609s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 609s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 609s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 609s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 609s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 609s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 609s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 609s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 609s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 609s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 609s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 609s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 609s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 609s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 609s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 609s ***** error<triinv: function called with too few input arguments.> triinv () 609s ***** error<triinv: function called with too few input arguments.> triinv (1) 609s ***** error<triinv: function called with too few input arguments.> triinv (1, 2) 609s ***** error<triinv: function called with too few input arguments.> triinv (1, 2, 3) 609s ***** error<triinv: function called with too many inputs> ... 609s triinv (1, 2, 3, 4, 5) 609s ***** error<triinv: P, A, B, and C must be of common size or scalars.> ... 609s triinv (ones (3), ones (2), ones(2), ones(2)) 609s ***** error<triinv: P, A, B, and C must be of common size or scalars.> ... 609s triinv (ones (2), ones (3), ones(2), ones(2)) 609s ***** error<triinv: P, A, B, and C must be of common size or scalars.> ... 609s triinv (ones (2), ones (2), ones(3), ones(2)) 609s ***** error<triinv: P, A, B, and C must be of common size or scalars.> ... 609s triinv (ones (2), ones (2), ones(2), ones(3)) 609s ***** error<triinv: P, A, B, and C must not be complex.> triinv (i, 2, 3, 4) 609s ***** error<triinv: P, A, B, and C must not be complex.> triinv (1, i, 3, 4) 609s ***** error<triinv: P, A, B, and C must not be complex.> triinv (1, 2, i, 4) 609s ***** error<triinv: P, A, B, and C must not be complex.> triinv (1, 2, 3, i) 609s 26 tests, 26 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/ricecdf.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ricecdf.m 609s ***** demo 609s ## Plot various CDFs from the Rician distribution 609s x = 0:0.01:10; 609s p1 = ricecdf (x, 0, 1); 609s p2 = ricecdf (x, 0.5, 1); 609s p3 = ricecdf (x, 1, 1); 609s p4 = ricecdf (x, 2, 1); 609s p5 = ricecdf (x, 4, 1); 609s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 609s grid on 609s ylim ([0, 1]) 609s xlim ([0, 8]) 609s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 609s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 609s title ("Rician CDF") 609s xlabel ("values in x") 609s ylabel ("probability") 609s ***** demo 609s ## Plot various CDFs from the Rician distribution 609s x = 0:0.01:10; 609s p1 = ricecdf (x, 0, 0.5); 609s p2 = ricecdf (x, 0, 2); 609s p3 = ricecdf (x, 0, 3); 609s p4 = ricecdf (x, 2, 2); 609s p5 = ricecdf (x, 4, 2); 609s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 609s grid on 609s ylim ([0, 1]) 609s xlim ([0, 8]) 609s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 609s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 609s title ("Rician CDF") 609s xlabel ("values in x") 609s ylabel ("probability") 609s ***** test 609s x = 0:0.5:2.5; 609s s = 1:6; 609s p = ricecdf (x, s, 1); 609s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 609s assert (p, expected_p, 0.001); 609s ***** test 609s x = 0:0.5:2.5; 609s sigma = 1:6; 609s p = ricecdf (x, 1, sigma); 609s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 609s assert (p, expected_p, 0.001); 609s ***** test 609s x = 0:0.5:2.5; 609s p = ricecdf (x, 0, 1); 609s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 609s assert (p, expected_p, 0.001); 609s ***** test 609s x = 0:0.5:2.5; 609s p = ricecdf (x, 1, 1); 609s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 609s assert (p, expected_p, 0.001); 609s ***** shared x, p 609s x = [-1, 0, 1, 2, Inf]; 609s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 609s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 609s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 609s ***** error<ricecdf: function called with too few input arguments.> ricecdf () 609s ***** error<ricecdf: function called with too few input arguments.> ricecdf (1) 609s ***** error<ricecdf: function called with too few input arguments.> ricecdf (1, 2) 609s ***** error<ricecdf: invalid argument for upper tail.> ricecdf (1, 2, 3, "uper") 609s ***** error<ricecdf: invalid argument for upper tail.> ricecdf (1, 2, 3, 4) 609s ***** error<ricecdf: X, S, and SIGMA must be of common size or scalars.> ... 609s ricecdf (ones (3), ones (2), ones (2)) 609s ***** error<ricecdf: X, S, and SIGMA must be of common size or scalars.> ... 609s ricecdf (ones (2), ones (3), ones (2)) 609s ***** error<ricecdf: X, S, and SIGMA must be of common size or scalars.> ... 609s ricecdf (ones (2), ones (2), ones (3)) 609s ***** error<ricecdf: X, S, and SIGMA must not be complex.> ricecdf (i, 2, 3) 609s ***** error<ricecdf: X, S, and SIGMA must not be complex.> ricecdf (2, i, 3) 609s ***** error<ricecdf: X, S, and SIGMA must not be complex.> ricecdf (2, 2, i) 609s 17 tests, 17 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/nakapdf.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nakapdf.m 609s ***** demo 609s ## Plot various PDFs from the Nakagami distribution 609s x = 0:0.01:3; 609s y1 = nakapdf (x, 0.5, 1); 609s y2 = nakapdf (x, 1, 1); 609s y3 = nakapdf (x, 1, 2); 609s y4 = nakapdf (x, 1, 3); 609s y5 = nakapdf (x, 2, 1); 609s y6 = nakapdf (x, 2, 2); 609s y7 = nakapdf (x, 5, 1); 609s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 609s x, y5, "-k", x, y6, "-b", x, y7, "-c") 609s grid on 609s xlim ([0, 3]) 609s ylim ([0, 2]) 609s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 609s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 609s "μ = 5, ω = 1"}, "location", "northeast") 609s title ("Nakagami PDF") 609s xlabel ("values in x") 609s ylabel ("density") 609s ***** shared x, y 609s x = [-1, 0, 1, 2, Inf]; 609s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 609s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 609s ***** assert (nakapdf (x, 1, 1), y, eps) 609s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 609s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 609s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 609s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 609s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 609s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 609s ***** error<nakapdf: function called with too few input arguments.> nakapdf () 609s ***** error<nakapdf: function called with too few input arguments.> nakapdf (1) 609s ***** error<nakapdf: function called with too few input arguments.> nakapdf (1, 2) 609s ***** error<nakapdf: X, MU, and OMEGA must be of common size or scalars.> ... 609s nakapdf (ones (3), ones (2), ones(2)) 609s ***** error<nakapdf: X, MU, and OMEGA must be of common size or scalars.> ... 609s nakapdf (ones (2), ones (3), ones(2)) 609s ***** error<nakapdf: X, MU, and OMEGA must be of common size or scalars.> ... 609s nakapdf (ones (2), ones (2), ones(3)) 609s ***** error<nakapdf: X, MU, and OMEGA must not be complex.> nakapdf (i, 4, 3) 609s ***** error<nakapdf: X, MU, and OMEGA must not be complex.> nakapdf (1, i, 3) 609s ***** error<nakapdf: X, MU, and OMEGA must not be complex.> nakapdf (1, 4, i) 609s 17 tests, 17 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/raylrnd.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/raylrnd.m 609s ***** assert (size (raylrnd (2)), [1, 1]) 609s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 609s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 609s ***** assert (size (raylrnd (1, 3)), [3, 3]) 609s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 609s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 609s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 609s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 609s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 609s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 609s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 609s ***** assert (raylrnd (0, 1, 1), NaN) 609s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 609s ***** assert (class (raylrnd (2)), "double") 609s ***** assert (class (raylrnd (single (2))), "single") 609s ***** assert (class (raylrnd (single ([2 2]))), "single") 609s ***** error<raylrnd: function called with too few input arguments.> raylrnd () 609s ***** error<raylrnd: SIGMA must not be complex.> raylrnd (i) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (1, -1) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (1, 1.2) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (1, ones (2)) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (1, [2 -1 2]) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (1, [2 0 2.5]) 609s ***** error<raylrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 609s raylrnd (ones (2), ones (2)) 609s ***** error<raylrnd: dimensions must be non-negative integers.> ... 609s raylrnd (1, 2, -1, 5) 609s ***** error<raylrnd: dimensions must be non-negative integers.> ... 609s raylrnd (1, 2, 1.5, 5) 609s ***** error<raylrnd: SIGMA must be scalar or of size SZ.> raylrnd (ones (2,2), 3) 609s ***** error<raylrnd: SIGMA must be scalar or of size SZ.> raylrnd (ones (2,2), [3, 2]) 609s ***** error<raylrnd: SIGMA must be scalar or of size SZ.> raylrnd (ones (2,2), 2, 3) 609s 29 tests, 29 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/invginv.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/invginv.m 609s ***** demo 609s ## Plot various iCDFs from the inverse Gaussian distribution 609s p = 0.001:0.001:0.999; 609s x1 = invginv (p, 1, 0.2); 609s x2 = invginv (p, 1, 1); 609s x3 = invginv (p, 1, 3); 609s x4 = invginv (p, 3, 0.2); 609s x5 = invginv (p, 3, 1); 609s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 609s grid on 609s ylim ([0, 3]) 609s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 609s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 609s title ("Inverse Gaussian iCDF") 609s xlabel ("probability") 609s ylabel ("x") 609s ***** shared p, x 609s p = [0, 0.3829, 0.6827, 1]; 609s x = [0, 0.5207, 1.0376, Inf]; 609s ***** assert (invginv (p, 1, 1), x, 1e-4); 609s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 609s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 609s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 609s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 609s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 609s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 609s ***** error<invginv: function called with too few input arguments.> invginv (1) 609s ***** error<invginv: function called with too few input arguments.> invginv (1, 2) 609s ***** error<invginv: P, MU, and LAMBDA must be of common size or scalars.> ... 609s invginv (1, ones (2), ones (3)) 609s ***** error<invginv: P, MU, and LAMBDA must be of common size or scalars.> ... 609s invginv (ones (2), 1, ones (3)) 609s ***** error<invginv: P, MU, and LAMBDA must be of common size or scalars.> ... 609s invginv (ones (2), ones (3), 1) 609s ***** error<invginv: P, MU, and LAMBDA must not be complex.> invginv (i, 2, 3) 609s ***** error<invginv: P, MU, and LAMBDA must not be complex.> invginv (1, i, 3) 609s ***** error<invginv: P, MU, and LAMBDA must not be complex.> invginv (1, 2, i) 609s 15 tests, 15 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/wienrnd.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wienrnd.m 609s ***** error wienrnd (0) 609s ***** error wienrnd (1, 3, -50) 609s ***** error wienrnd (5, 0) 609s ***** error wienrnd (0.4, 3, 5) 609s ***** error wienrnd ([1 4], 3, 5) 609s 5 tests, 5 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/betainv.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/betainv.m 609s ***** demo 609s ## Plot various iCDFs from the Beta distribution 609s p = 0.001:0.001:0.999; 609s x1 = betainv (p, 0.5, 0.5); 609s x2 = betainv (p, 5, 1); 609s x3 = betainv (p, 1, 3); 609s x4 = betainv (p, 2, 2); 609s x5 = betainv (p, 2, 5); 609s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 609s grid on 609s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 609s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 609s title ("Beta iCDF") 609s xlabel ("probability") 609s ylabel ("values in x") 609s ***** shared p 609s p = [-1 0 0.75 1 2]; 609s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 609s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 609s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 609s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 609s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 609s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 609s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 609s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 609s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 609s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 609s ***** error<betainv: function called with too few input arguments.> betainv () 609s ***** error<betainv: function called with too few input arguments.> betainv (1) 609s ***** error<betainv: function called with too few input arguments.> betainv (1,2) 609s ***** error<betainv: function called with too many inputs> betainv (1,2,3,4) 609s ***** error<betainv: P, A, and B must be of common size or scalars.> ... 609s betainv (ones (3), ones (2), ones (2)) 609s ***** error<betainv: P, A, and B must be of common size or scalars.> ... 609s betainv (ones (2), ones (3), ones (2)) 609s ***** error<betainv: P, A, and B must be of common size or scalars.> ... 609s betainv (ones (2), ones (2), ones (3)) 609s ***** error<betainv: P, A, and B must not be complex.> betainv (i, 2, 2) 609s ***** error<betainv: P, A, and B must not be complex.> betainv (2, i, 2) 609s ***** error<betainv: P, A, and B must not be complex.> betainv (2, 2, i) 609s 20 tests, 20 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/nbinpdf.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nbinpdf.m 609s ***** demo 609s ## Plot various PDFs from the negative binomial distribution 609s x = 0:40; 609s y1 = nbinpdf (x, 2, 0.15); 609s y2 = nbinpdf (x, 5, 0.2); 609s y3 = nbinpdf (x, 4, 0.4); 609s y4 = nbinpdf (x, 10, 0.3); 609s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 609s grid on 609s xlim ([0, 40]) 609s ylim ([0, 0.12]) 609s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 609s "r = 10, ps = 0.3"}, "location", "northeast") 609s title ("Negative binomial PDF") 609s xlabel ("values in x (number of failures)") 609s ylabel ("density") 609s ***** shared x, y 609s x = [-1 0 1 2 Inf]; 609s y = [0 1/2 1/4 1/8 NaN]; 609s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 609s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 609s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 609s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 609s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 609s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 609s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 609s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 609s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 609s ***** error<nbinpdf: function called with too few input arguments.> nbinpdf () 609s ***** error<nbinpdf: function called with too few input arguments.> nbinpdf (1) 609s ***** error<nbinpdf: function called with too few input arguments.> nbinpdf (1, 2) 609s ***** error<nbinpdf: X, R, and PS must be of common size or scalars.> ... 609s nbinpdf (ones (3), ones (2), ones (2)) 609s ***** error<nbinpdf: X, R, and PS must be of common size or scalars.> ... 609s nbinpdf (ones (2), ones (3), ones (2)) 609s ***** error<nbinpdf: X, R, and PS must be of common size or scalars.> ... 609s nbinpdf (ones (2), ones (2), ones (3)) 609s ***** error<nbinpdf: X, R, and PS must not be complex.> nbinpdf (i, 2, 2) 609s ***** error<nbinpdf: X, R, and PS must not be complex.> nbinpdf (2, i, 2) 609s ***** error<nbinpdf: X, R, and PS must not be complex.> nbinpdf (2, 2, i) 609s 18 tests, 18 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/riceinv.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/riceinv.m 609s ***** demo 609s ## Plot various iCDFs from the Rician distribution 609s p = 0.001:0.001:0.999; 609s x1 = riceinv (p, 0, 1); 609s x2 = riceinv (p, 0.5, 1); 609s x3 = riceinv (p, 1, 1); 609s x4 = riceinv (p, 2, 1); 609s x5 = riceinv (p, 4, 1); 609s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 609s grid on 609s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 609s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 609s title ("Rician iCDF") 609s xlabel ("probability") 609s ylabel ("values in x") 609s ***** shared p 609s p = [-1 0 0.75 1 2]; 609s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 609s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 609s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 609s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 609s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 609s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 609s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 609s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 609s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 609s ***** assert (riceinv ([p, NaN], single (1), 2), ... 609s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 609s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 609s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 609s ***** error<riceinv: function called with too few input arguments.> riceinv () 609s ***** error<riceinv: function called with too few input arguments.> riceinv (1) 609s ***** error<riceinv: function called with too few input arguments.> riceinv (1,2) 609s ***** error<riceinv: function called with too many inputs> riceinv (1,2,3,4) 609s ***** error<riceinv: P, S, and B must be of common size or scalars.> ... 609s riceinv (ones (3), ones (2), ones (2)) 609s ***** error<riceinv: P, S, and B must be of common size or scalars.> ... 609s riceinv (ones (2), ones (3), ones (2)) 609s ***** error<riceinv: P, S, and B must be of common size or scalars.> ... 609s riceinv (ones (2), ones (2), ones (3)) 609s ***** error<riceinv: P, S, and B must not be complex.> riceinv (i, 2, 2) 609s ***** error<riceinv: P, S, and B must not be complex.> riceinv (2, i, 2) 609s ***** error<riceinv: P, S, and B must not be complex.> riceinv (2, 2, i) 609s 20 tests, 20 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/chi2cdf.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/chi2cdf.m 609s ***** demo 609s ## Plot various CDFs from the chi-squared distribution 609s x = 0:0.01:8; 609s p1 = chi2cdf (x, 1); 609s p2 = chi2cdf (x, 2); 609s p3 = chi2cdf (x, 3); 609s p4 = chi2cdf (x, 4); 609s p5 = chi2cdf (x, 6); 609s p6 = chi2cdf (x, 9); 609s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 609s x, p4, "-c", x, p5, "-m", x, p6, "-y") 609s grid on 609s xlim ([0, 8]) 609s legend ({"df = 1", "df = 2", "df = 3", ... 609s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 609s title ("Chi-squared CDF") 609s xlabel ("values in x") 609s ylabel ("probability") 609s ***** shared x, p, u 609s x = [-1, 0, 0.5, 1, 2]; 609s p = [0, (1 - exp (-x(2:end) / 2))]; 609s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 609s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 609s ***** assert (chi2cdf (x, 2), p, eps) 609s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 609s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 609s [p(1), 1, NaN, u(4:5)], eps) 609s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 609s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 609s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 609s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 609s ***** error<chi2cdf: function called with too few input arguments.> chi2cdf () 609s ***** error<chi2cdf: function called with too few input arguments.> chi2cdf (1) 609s ***** error<chi2cdf: function called with too many inputs> chi2cdf (1, 2, 3, 4) 609s ***** error<chi2cdf: invalid argument for upper tail.> chi2cdf (1, 2, 3) 609s ***** error<chi2cdf: invalid argument for upper tail.> chi2cdf (1, 2, "uper") 609s ***** error<chi2cdf: X and DF must be of common size or scalars.> ... 609s chi2cdf (ones (3), ones (2)) 609s ***** error<chi2cdf: X and DF must be of common size or scalars.> ... 609s chi2cdf (ones (2), ones (3)) 609s ***** error<chi2cdf: X and DF must not be complex.> chi2cdf (i, 2) 609s ***** error<chi2cdf: X and DF must not be complex.> chi2cdf (2, i) 609s 17 tests, 17 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/plpdf.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/plpdf.m 609s ***** demo 609s ## Plot various PDFs from the Piecewise linear distribution 609s data = 0:0.01:10; 609s x1 = [0, 1, 3, 4, 7, 10]; 609s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 609s x2 = [0, 2, 5, 6, 7, 8]; 609s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 609s y1 = plpdf (data, x1, Fx1); 609s y2 = plpdf (data, x2, Fx2); 609s plot (data, y1, "-b", data, y2, "g") 609s grid on 609s ylim ([0, 0.6]) 609s xlim ([0, 10]) 609s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 609s title ("Piecewise linear CDF") 609s xlabel ("values in data") 609s ylabel ("density") 609s ***** shared x, Fx 609s x = [0, 1, 3, 4, 7, 10]; 609s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 609s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 609s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 609s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 609s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 609s ***** assert (plpdf (8, x, Fx), 0.1, eps); 609s ***** error<plpdf: function called with too few input arguments.> plpdf () 609s ***** error<plpdf: function called with too few input arguments.> plpdf (1) 609s ***** error<plpdf: function called with too few input arguments.> plpdf (1, 2) 609s ***** error<plpdf: X and FX must be vectors of equal size.> ... 609s plpdf (1, [0, 1, 2], [0, 1]) 609s ***** error<plpdf: X and FX must be at least two-elements long.> ... 609s plpdf (1, [0], [1]) 609s ***** error<plpdf: FX must be bounded in the range> ... 609s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 609s ***** error<plpdf: FX must be bounded in the range> ... 609s plpdf (1, [0, 1, 2], [0, i, 1]) 609s ***** error<plpdf: DATA, X, and FX must not be complex.> ... 609s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 609s ***** error<plpdf: DATA, X, and FX must not be complex.> ... 609s plpdf (1, [0, i, 2], [0, 0.5, 1]) 609s ***** error<plpdf: DATA, X, and FX must not be complex.> ... 609s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 609s 15 tests, 15 passed, 0 known failure, 0 skipped 609s [inst/dist_fun/hnrnd.m] 609s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hnrnd.m 609s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 610s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 610s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 610s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 610s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 610s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 610s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 610s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 610s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 610s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 610s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 610s ***** test 610s r = hnrnd (1, [1, 0, -1]); 610s assert (r([2:3]), [NaN, NaN]) 610s ***** assert (class (hnrnd (1, 0)), "double") 610s ***** assert (class (hnrnd (1, single (0))), "single") 610s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 610s ***** assert (class (hnrnd (1, single (1))), "single") 610s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 610s ***** assert (class (hnrnd (single (1), 1)), "single") 610s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 610s ***** error<hnrnd: function called with too few input arguments.> hnrnd () 610s ***** error<hnrnd: function called with too few input arguments.> hnrnd (1) 610s ***** error<hnrnd: MU and SIGMA must be of common size or scalars.> ... 610s hnrnd (ones (3), ones (2)) 610s ***** error<hnrnd: MU and SIGMA must be of common size or scalars.> ... 610s hnrnd (ones (2), ones (3)) 610s ***** error<hnrnd: MU and SIGMA must not be complex.> hnrnd (i, 2, 3) 610s ***** error<hnrnd: MU and SIGMA must not be complex.> hnrnd (1, i, 3) 610s ***** error<hnrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 610s hnrnd (1, 2, -1) 610s ***** error<hnrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 610s hnrnd (1, 2, 1.2) 610s ***** error<hnrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 610s hnrnd (1, 2, ones (2)) 610s ***** error<hnrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 610s hnrnd (1, 2, [2 -1 2]) 610s ***** error<hnrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 610s hnrnd (1, 2, [2 0 2.5]) 610s ***** error<hnrnd: dimensions must be non-negative integers.> ... 610s hnrnd (1, 2, 2, -1, 5) 610s ***** error<hnrnd: dimensions must be non-negative integers.> ... 610s hnrnd (1, 2, 2, 1.5, 5) 610s ***** error<hnrnd: MU and SIGMA must be scalars or of size SZ.> ... 610s hnrnd (2, ones (2), 3) 610s ***** error<hnrnd: MU and SIGMA must be scalars or of size SZ.> ... 610s hnrnd (2, ones (2), [3, 2]) 610s ***** error<hnrnd: MU and SIGMA must be scalars or of size SZ.> ... 610s hnrnd (2, ones (2), 3, 2) 610s 35 tests, 35 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/raylinv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/raylinv.m 610s ***** demo 610s ## Plot various iCDFs from the Rayleigh distribution 610s p = 0.001:0.001:0.999; 610s x1 = raylinv (p, 0.5); 610s x2 = raylinv (p, 1); 610s x3 = raylinv (p, 2); 610s x4 = raylinv (p, 3); 610s x5 = raylinv (p, 4); 610s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 610s grid on 610s ylim ([0, 10]) 610s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 610s "σ = 3", "σ = 4"}, "location", "northwest") 610s title ("Rayleigh iCDF") 610s xlabel ("probability") 610s ylabel ("values in x") 610s ***** test 610s p = 0:0.1:0.5; 610s sigma = 1:6; 610s x = raylinv (p, sigma); 610s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 610s assert (x, expected_x, 0.001); 610s ***** test 610s p = 0:0.1:0.5; 610s x = raylinv (p, 0.5); 610s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 610s assert (x, expected_x, 0.001); 610s ***** error<raylinv: function called with too few input arguments.> raylinv () 610s ***** error<raylinv: function called with too few input arguments.> raylinv (1) 610s ***** error<raylinv: P and SIGMA must be of common size or scalars.> ... 610s raylinv (ones (3), ones (2)) 610s ***** error<raylinv: P and SIGMA must be of common size or scalars.> ... 610s raylinv (ones (2), ones (3)) 610s ***** error<raylinv: P and SIGMA must not be complex.> raylinv (i, 2) 610s ***** error<raylinv: P and SIGMA must not be complex.> raylinv (2, i) 610s 8 tests, 8 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/invgcdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/invgcdf.m 610s ***** demo 610s ## Plot various CDFs from the inverse Gaussian distribution 610s x = 0:0.001:3; 610s p1 = invgcdf (x, 1, 0.2); 610s p2 = invgcdf (x, 1, 1); 610s p3 = invgcdf (x, 1, 3); 610s p4 = invgcdf (x, 3, 0.2); 610s p5 = invgcdf (x, 3, 1); 610s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 610s grid on 610s xlim ([0, 3]) 610s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 610s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 610s title ("Inverse Gaussian CDF") 610s xlabel ("values in x") 610s ylabel ("probability") 610s ***** shared x, p1, p1u, y2, y2u, y3, y3u 610s x = [-Inf, -1, 0, 1/2, 1, Inf]; 610s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 610s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 610s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 610s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 610s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 610s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 610s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 610s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 610s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 610s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 610s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 610s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 610s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 610s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 610s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 610s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 610s ***** error<invgcdf: function called with too few input arguments.> invgcdf () 610s ***** error<invgcdf: function called with too few input arguments.> invgcdf (1) 610s ***** error<invgcdf: function called with too few input arguments.> invgcdf (1, 2) 610s ***** error<invgcdf: invalid argument for upper tail.> invgcdf (1, 2, 3, "tail") 610s ***** error<invgcdf: invalid argument for upper tail.> invgcdf (1, 2, 3, 5) 610s ***** error<invgcdf: X, MU, and LAMBDA must be of common size or scalars.> ... 610s invgcdf (ones (3), ones (2), ones(2)) 610s ***** error<invgcdf: X, MU, and LAMBDA must be of common size or scalars.> ... 610s invgcdf (ones (2), ones (3), ones(2)) 610s ***** error<invgcdf: X, MU, and LAMBDA must be of common size or scalars.> ... 610s invgcdf (ones (2), ones (2), ones(3)) 610s ***** error<invgcdf: X, MU, and LAMBDA must not be complex.> invgcdf (i, 2, 3) 610s ***** error<invgcdf: X, MU, and LAMBDA must not be complex.> invgcdf (1, i, 3) 610s ***** error<invgcdf: X, MU, and LAMBDA must not be complex.> invgcdf (1, 2, i) 610s 25 tests, 25 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/gumbelcdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gumbelcdf.m 610s ***** demo 610s ## Plot various CDFs from the Gumbel distribution 610s x = -5:0.01:20; 610s p1 = gumbelcdf (x, 0.5, 2); 610s p2 = gumbelcdf (x, 1.0, 2); 610s p3 = gumbelcdf (x, 1.5, 3); 610s p4 = gumbelcdf (x, 3.0, 4); 610s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 610s grid on 610s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 610s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 610s title ("Gumbel CDF") 610s xlabel ("values in x") 610s ylabel ("probability") 610s ***** shared x, y 610s x = [-Inf, 1, 2, Inf]; 610s y = [0, 0.3679, 0.6922, 1]; 610s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 610s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 610s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 610s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 610s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 610s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 610s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 610s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 610s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 610s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 610s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 610s ***** error<gumbelcdf: invalid number of input arguments.> gumbelcdf () 610s ***** error<gumbelcdf: invalid number of input arguments.> gumbelcdf (1,2,3,4,5,6,7) 610s ***** error<gumbelcdf: invalid argument for upper tail.> gumbelcdf (1, 2, 3, 4, "uper") 610s ***** error<gumbelcdf: X, MU, and BETA must be of common size or scalars.> ... 610s gumbelcdf (ones (3), ones (2), ones (2)) 610s ***** error<gumbelcdf: invalid size of covariance matrix.> gumbelcdf (2, 3, 4, [1, 2]) 610s ***** error<gumbelcdf: covariance matrix is required for confidence bounds.> ... 610s [p, plo, pup] = gumbelcdf (1, 2, 3) 610s ***** error<gumbelcdf: invalid value for alpha.> [p, plo, pup] = ... 610s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 610s ***** error<gumbelcdf: invalid value for alpha.> [p, plo, pup] = ... 610s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 610s ***** error<gumbelcdf: invalid value for alpha.> [p, plo, pup] = ... 610s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 610s ***** error<gumbelcdf: X, MU, and BETA must not be complex.> gumbelcdf (i, 2, 2) 610s ***** error<gumbelcdf: X, MU, and BETA must not be complex.> gumbelcdf (2, i, 2) 610s ***** error<gumbelcdf: X, MU, and BETA must not be complex.> gumbelcdf (2, 2, i) 610s ***** error<gumbelcdf: bad covariance matrix.> ... 610s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 610s 24 tests, 24 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/evcdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/evcdf.m 610s ***** demo 610s ## Plot various CDFs from the extreme value distribution 610s x = -10:0.01:10; 610s p1 = evcdf (x, 0.5, 2); 610s p2 = evcdf (x, 1.0, 2); 610s p3 = evcdf (x, 1.5, 3); 610s p4 = evcdf (x, 3.0, 4); 610s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 610s grid on 610s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 610s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 610s title ("Extreme value CDF") 610s xlabel ("values in x") 610s ylabel ("probability") 610s ***** shared x, y 610s x = [-Inf, 1, 2, Inf]; 610s y = [0, 0.6321, 0.9340, 1]; 610s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 610s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 610s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 610s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 610s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 610s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 610s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 610s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 610s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 610s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 610s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 610s ***** error<evcdf: invalid number of input arguments.> evcdf () 610s ***** error<evcdf: invalid number of input arguments.> evcdf (1,2,3,4,5,6,7) 610s ***** error<evcdf: invalid argument for upper tail.> evcdf (1, 2, 3, 4, "uper") 610s ***** error<evcdf: X, MU, and SIGMA must be of common size or scalars.> ... 610s evcdf (ones (3), ones (2), ones (2)) 610s ***** error<evcdf: invalid size of covariance matrix.> evcdf (2, 3, 4, [1, 2]) 610s ***** error<evcdf: covariance matrix is required for confidence bounds.> ... 610s [p, plo, pup] = evcdf (1, 2, 3) 610s ***** error<evcdf: invalid value for alpha.> [p, plo, pup] = ... 610s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 610s ***** error<evcdf: invalid value for alpha.> [p, plo, pup] = ... 610s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 610s ***** error<evcdf: invalid value for alpha.> [p, plo, pup] = ... 610s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 610s ***** error<evcdf: X, MU, and SIGMA must not be complex.> evcdf (i, 2, 2) 610s ***** error<evcdf: X, MU, and SIGMA must not be complex.> evcdf (2, i, 2) 610s ***** error<evcdf: X, MU, and SIGMA must not be complex.> evcdf (2, 2, i) 610s ***** error<evcdf: bad covariance matrix.> ... 610s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 610s 24 tests, 24 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/vmpdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/vmpdf.m 610s ***** demo 610s ## Plot various PDFs from the von Mises distribution 610s x1 = [-pi:0.1:pi]; 610s y1 = vmpdf (x1, 0, 0.5); 610s y2 = vmpdf (x1, 0, 1); 610s y3 = vmpdf (x1, 0, 2); 610s y4 = vmpdf (x1, 0, 4); 610s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 610s grid on 610s xlim ([-pi, pi]) 610s ylim ([0, 0.8]) 610s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 610s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 610s title ("Von Mises PDF") 610s xlabel ("values in x") 610s ylabel ("density") 610s ***** shared x, y0, y1 610s x = [-pi:pi/2:pi]; 610s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 610s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 610s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 610s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 610s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 610s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 610s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 610s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 610s ***** error<vmpdf: function called with too few input arguments.> vmpdf () 610s ***** error<vmpdf: function called with too few input arguments.> vmpdf (1) 610s ***** error<vmpdf: function called with too few input arguments.> vmpdf (1, 2) 610s ***** error<vmpdf: X, MU, and K must be of common size or scalars.> ... 610s vmpdf (ones (3), ones (2), ones (2)) 610s ***** error<vmpdf: X, MU, and K must be of common size or scalars.> ... 610s vmpdf (ones (2), ones (3), ones (2)) 610s ***** error<vmpdf: X, MU, and K must be of common size or scalars.> ... 610s vmpdf (ones (2), ones (2), ones (3)) 610s ***** error<vmpdf: X, MU, and K must not be complex.> vmpdf (i, 2, 2) 610s ***** error<vmpdf: X, MU, and K must not be complex.> vmpdf (2, i, 2) 610s ***** error<vmpdf: X, MU, and K must not be complex.> vmpdf (2, 2, i) 610s 15 tests, 15 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/hygeinv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hygeinv.m 610s ***** demo 610s ## Plot various iCDFs from the hypergeometric distribution 610s p = 0.001:0.001:0.999; 610s x1 = hygeinv (p, 500, 50, 100); 610s x2 = hygeinv (p, 500, 60, 200); 610s x3 = hygeinv (p, 500, 70, 300); 610s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 610s grid on 610s ylim ([0, 60]) 610s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 610s "m = 500, k = 70, n = 300"}, "location", "northwest") 610s title ("Hypergeometric iCDF") 610s xlabel ("probability") 610s ylabel ("values in p (number of successes)") 610s ***** shared p 610s p = [-1 0 0.5 1 2]; 610s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 610s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 610s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 610s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 610s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 610s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 610s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 610s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 610s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 610s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 610s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 610s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 610s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 610s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 610s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 610s ***** error<hygeinv: function called with too few input arguments.> hygeinv () 610s ***** error<hygeinv: function called with too few input arguments.> hygeinv (1) 610s ***** error<hygeinv: function called with too few input arguments.> hygeinv (1,2) 610s ***** error<hygeinv: function called with too few input arguments.> hygeinv (1,2,3) 610s ***** error<hygeinv: P, T, M, and N must be of common size or scalars.> ... 610s hygeinv (ones (2), ones (3), 1, 1) 610s ***** error<hygeinv: P, T, M, and N must be of common size or scalars.> ... 610s hygeinv (1, ones (2), ones (3), 1) 610s ***** error<hygeinv: P, T, M, and N must be of common size or scalars.> ... 610s hygeinv (1, 1, ones (2), ones (3)) 610s ***** error<hygeinv: P, T, M, and N must not be complex.> hygeinv (i, 2, 2, 2) 610s ***** error<hygeinv: P, T, M, and N must not be complex.> hygeinv (2, i, 2, 2) 610s ***** error<hygeinv: P, T, M, and N must not be complex.> hygeinv (2, 2, i, 2) 610s ***** error<hygeinv: P, T, M, and N must not be complex.> hygeinv (2, 2, 2, i) 610s 26 tests, 26 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/nbincdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nbincdf.m 610s ***** demo 610s ## Plot various CDFs from the negative binomial distribution 610s x = 0:50; 610s p1 = nbincdf (x, 2, 0.15); 610s p2 = nbincdf (x, 5, 0.2); 610s p3 = nbincdf (x, 4, 0.4); 610s p4 = nbincdf (x, 10, 0.3); 610s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 610s grid on 610s xlim ([0, 40]) 610s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 610s "r = 10, ps = 0.3"}, "location", "southeast") 610s title ("Negative binomial CDF") 610s xlabel ("values in x (number of failures)") 610s ylabel ("probability") 610s ***** shared x, y 610s x = [-1 0 1 2 Inf]; 610s y = [0 1/2 3/4 7/8 1]; 610s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 610s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 610s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 610s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 610s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 610s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 610s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 610s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 610s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 610s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 610s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 610s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 610s ***** error<nbincdf: function called with too few input arguments.> nbincdf () 610s ***** error<nbincdf: function called with too few input arguments.> nbincdf (1) 610s ***** error<nbincdf: function called with too few input arguments.> nbincdf (1, 2) 610s ***** error<nbincdf: invalid argument for upper tail.> nbincdf (1, 2, 3, 4) 610s ***** error<nbincdf: invalid argument for upper tail.> nbincdf (1, 2, 3, "some") 610s ***** error<nbincdf: X, R, and PS must be of common size or scalars.> ... 610s nbincdf (ones (3), ones (2), ones (2)) 610s ***** error<nbincdf: X, R, and PS must be of common size or scalars.> ... 610s nbincdf (ones (2), ones (3), ones (2)) 610s ***** error<nbincdf: X, R, and PS must be of common size or scalars.> ... 610s nbincdf (ones (2), ones (2), ones (3)) 610s ***** error<nbincdf: X, R, and PS must not be complex.> nbincdf (i, 2, 2) 610s ***** error<nbincdf: X, R, and PS must not be complex.> nbincdf (2, i, 2) 610s ***** error<nbincdf: X, R, and PS must not be complex.> nbincdf (2, 2, i) 610s 22 tests, 22 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/copularnd.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/copularnd.m 610s ***** test 610s theta = 0.5; 610s r = copularnd ("Gaussian", theta); 610s assert (size (r), [1, 2]); 610s assert (all ((r >= 0) & (r <= 1))); 610s ***** test 610s theta = 0.5; 610s df = 2; 610s r = copularnd ("t", theta, df); 610s assert (size (r), [1, 2]); 610s assert (all ((r >= 0) & (r <= 1))); 610s ***** test 610s theta = 0.5; 610s r = copularnd ("Clayton", theta); 610s assert (size (r), [1, 2]); 610s assert (all ((r >= 0) & (r <= 1))); 610s ***** test 610s theta = 0.5; 610s n = 2; 610s r = copularnd ("Clayton", theta, n); 610s assert (size (r), [n, 2]); 610s assert (all ((r >= 0) & (r <= 1))); 610s ***** test 610s theta = [1; 2]; 610s n = 2; 610s d = 3; 610s r = copularnd ("Clayton", theta, n, d); 610s assert (size (r), [n, d]); 610s assert (all ((r >= 0) & (r <= 1))); 610s 5 tests, 5 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/unifpdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unifpdf.m 610s ***** demo 610s ## Plot various PDFs from the continuous uniform distribution 610s x = 0:0.001:10; 610s y1 = unifpdf (x, 2, 5); 610s y2 = unifpdf (x, 3, 9); 610s plot (x, y1, "-b", x, y2, "-g") 610s grid on 610s xlim ([0, 10]) 610s ylim ([0, 0.4]) 610s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 610s title ("Continuous uniform PDF") 610s xlabel ("values in x") 610s ylabel ("density") 610s ***** shared x, y 610s x = [-1 0 0.5 1 2] + 1; 610s y = [0 1 1 1 0]; 610s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 610s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 610s ***** assert (unifpdf (x, ones (1,5), 2), y) 610s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 610s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 610s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 610s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 610s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 610s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 610s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 610s ***** error<unifpdf: function called with too few input arguments.> unifpdf () 610s ***** error<unifpdf: function called with too few input arguments.> unifpdf (1) 610s ***** error<unifpdf: function called with too few input arguments.> unifpdf (1, 2) 610s ***** error<unifpdf: X, A, and B must be of common size or scalars.> ... 610s unifpdf (ones (3), ones (2), ones (2)) 610s ***** error<unifpdf: X, A, and B must be of common size or scalars.> ... 610s unifpdf (ones (2), ones (3), ones (2)) 610s ***** error<unifpdf: X, A, and B must be of common size or scalars.> ... 610s unifpdf (ones (2), ones (2), ones (3)) 610s ***** error<unifpdf: X, A, and B must not be complex.> unifpdf (i, 2, 2) 610s ***** error<unifpdf: X, A, and B must not be complex.> unifpdf (2, i, 2) 610s ***** error<unifpdf: X, A, and B must not be complex.> unifpdf (2, 2, i) 610s 19 tests, 19 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/bisainv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bisainv.m 610s ***** demo 610s ## Plot various iCDFs from the Birnbaum-Saunders distribution 610s p = 0.001:0.001:0.999; 610s x1 = bisainv (p, 1, 0.5); 610s x2 = bisainv (p, 1, 1); 610s x3 = bisainv (p, 1, 2); 610s x4 = bisainv (p, 1, 5); 610s x5 = bisainv (p, 1, 10); 610s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 610s grid on 610s ylim ([0, 10]) 610s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 610s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 610s title ("Birnbaum-Saunders iCDF") 610s xlabel ("probability") 610s ylabel ("values in x") 610s ***** demo 610s ## Plot various iCDFs from the Birnbaum-Saunders distribution 610s p = 0.001:0.001:0.999; 610s x1 = bisainv (p, 1, 0.3); 610s x2 = bisainv (p, 2, 0.3); 610s x3 = bisainv (p, 1, 0.5); 610s x4 = bisainv (p, 3, 0.5); 610s x5 = bisainv (p, 5, 0.5); 610s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 610s grid on 610s ylim ([0, 10]) 610s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 610s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 610s title ("Birnbaum-Saunders iCDF") 610s xlabel ("probability") 610s ylabel ("values in x") 610s ***** shared p, y, f 610s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 610s p = [-1, 0, 1/4, 1/2, 1, 2]; 610s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 610s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 610s ***** assert (bisainv (p, 1, ones (1,6)), y) 610s ***** assert (bisainv (p, ones (1,6), 1), y) 610s ***** assert (bisainv (p, 1, 1), y) 610s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 610s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 610s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 610s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 610s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 610s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 610s ***** error<bisainv: function called with too few input arguments.> bisainv () 610s ***** error<bisainv: function called with too few input arguments.> bisainv (1) 610s ***** error<bisainv: function called with too few input arguments.> bisainv (1, 2) 610s ***** error<bisainv: function called with too many inputs> bisainv (1, 2, 3, 4) 610s ***** error<bisainv: P, BETA, and GAMMA must be of common size or scalars.> ... 610s bisainv (ones (3), ones (2), ones(2)) 610s ***** error<bisainv: P, BETA, and GAMMA must be of common size or scalars.> ... 610s bisainv (ones (2), ones (3), ones(2)) 610s ***** error<bisainv: P, BETA, and GAMMA must be of common size or scalars.> ... 610s bisainv (ones (2), ones (2), ones(3)) 610s ***** error<bisainv: P, BETA, and GAMMA must not be complex.> bisainv (i, 4, 3) 610s ***** error<bisainv: P, BETA, and GAMMA must not be complex.> bisainv (1, i, 3) 610s ***** error<bisainv: P, BETA, and GAMMA must not be complex.> bisainv (1, 4, i) 610s 20 tests, 20 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/ricepdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ricepdf.m 610s ***** demo 610s ## Plot various PDFs from the Rician distribution 610s x = 0:0.01:8; 610s y1 = ricepdf (x, 0, 1); 610s y2 = ricepdf (x, 0.5, 1); 610s y3 = ricepdf (x, 1, 1); 610s y4 = ricepdf (x, 2, 1); 610s y5 = ricepdf (x, 4, 1); 610s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 610s grid on 610s ylim ([0, 0.65]) 610s xlim ([0, 8]) 610s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 610s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 610s title ("Rician PDF") 610s xlabel ("values in x") 610s ylabel ("density") 610s ***** shared x, y 610s x = [-1 0 0.5 1 2]; 610s y = [0 0 0.1073 0.1978 0.2846]; 610s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 610s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 610s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 610s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 610s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 610s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 610s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 610s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 610s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 610s ***** error<ricepdf: function called with too few input arguments.> ricepdf () 610s ***** error<ricepdf: function called with too few input arguments.> ricepdf (1) 610s ***** error<ricepdf: function called with too few input arguments.> ricepdf (1,2) 610s ***** error<ricepdf: function called with too many inputs> ricepdf (1,2,3,4) 610s ***** error<ricepdf: X, S, and SIGMA must be of common size or scalars.> ... 610s ricepdf (ones (3), ones (2), ones (2)) 610s ***** error<ricepdf: X, S, and SIGMA must be of common size or scalars.> ... 610s ricepdf (ones (2), ones (3), ones (2)) 610s ***** error<ricepdf: X, S, and SIGMA must be of common size or scalars.> ... 610s ricepdf (ones (2), ones (2), ones (3)) 610s ***** error<ricepdf: X, S, and SIGMA must not be complex.> ricepdf (i, 2, 2) 610s ***** error<ricepdf: X, S, and SIGMA must not be complex.> ricepdf (2, i, 2) 610s ***** error<ricepdf: X, S, and SIGMA must not be complex.> ricepdf (2, 2, i) 610s 19 tests, 19 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/poissinv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/poissinv.m 610s ***** demo 610s ## Plot various iCDFs from the Poisson distribution 610s p = 0.001:0.001:0.999; 610s x1 = poissinv (p, 13); 610s x2 = poissinv (p, 4); 610s x3 = poissinv (p, 10); 610s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 610s grid on 610s ylim ([0, 20]) 610s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 610s title ("Poisson iCDF") 610s xlabel ("probability") 610s ylabel ("values in x (number of occurences)") 610s ***** shared p 610s p = [-1 0 0.5 1 2]; 610s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 610s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 610s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 610s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 610s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 610s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 610s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 610s ***** error<poissinv: function called with too few input arguments.> poissinv () 610s ***** error<poissinv: function called with too few input arguments.> poissinv (1) 610s ***** error<poissinv: P and LAMBDA must be of common size or scalars.> ... 610s poissinv (ones (3), ones (2)) 610s ***** error<poissinv: P and LAMBDA must be of common size or scalars.> ... 610s poissinv (ones (2), ones (3)) 610s ***** error<poissinv: P and LAMBDA must not be complex.> poissinv (i, 2) 610s ***** error<poissinv: P and LAMBDA must not be complex.> poissinv (2, i) 610s 13 tests, 13 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/normpdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/normpdf.m 610s ***** demo 610s ## Plot various PDFs from the normal distribution 610s x = -5:0.01:5; 610s y1 = normpdf (x, 0, 0.5); 610s y2 = normpdf (x, 0, 1); 610s y3 = normpdf (x, 0, 2); 610s y4 = normpdf (x, -2, 0.8); 610s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 610s grid on 610s xlim ([-5, 5]) 610s ylim ([0, 0.9]) 610s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 610s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 610s title ("Normal PDF") 610s xlabel ("values in x") 610s ylabel ("density") 610s ***** shared x, y 610s x = [-Inf, 1, 2, Inf]; 610s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 610s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 610s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 610s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 610s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 610s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 610s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 610s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 610s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 610s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 610s ***** error<normpdf: function called with too few input arguments.> normpdf () 610s ***** error<normpdf: X, MU, and SIGMA must be of common size or scalars.> ... 610s normpdf (ones (3), ones (2), ones (2)) 610s ***** error<normpdf: X, MU, and SIGMA must be of common size or scalars.> ... 610s normpdf (ones (2), ones (3), ones (2)) 610s ***** error<normpdf: X, MU, and SIGMA must be of common size or scalars.> ... 610s normpdf (ones (2), ones (2), ones (3)) 610s ***** error<normpdf: X, MU, and SIGMA must not be complex.> normpdf (i, 2, 2) 610s ***** error<normpdf: X, MU, and SIGMA must not be complex.> normpdf (2, i, 2) 610s ***** error<normpdf: X, MU, and SIGMA must not be complex.> normpdf (2, 2, i) 610s 16 tests, 16 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/raylcdf.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/raylcdf.m 610s ***** demo 610s ## Plot various CDFs from the Rayleigh distribution 610s x = 0:0.01:10; 610s p1 = raylcdf (x, 0.5); 610s p2 = raylcdf (x, 1); 610s p3 = raylcdf (x, 2); 610s p4 = raylcdf (x, 3); 610s p5 = raylcdf (x, 4); 610s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 610s grid on 610s ylim ([0, 1]) 610s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 610s "σ = 3", "σ = 4"}, "location", "southeast") 610s title ("Rayleigh CDF") 610s xlabel ("values in x") 610s ylabel ("probability") 610s ***** test 610s x = 0:0.5:2.5; 610s sigma = 1:6; 610s p = raylcdf (x, sigma); 610s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 610s assert (p, expected_p, 0.001); 610s ***** test 610s x = 0:0.5:2.5; 610s p = raylcdf (x, 0.5); 610s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 610s assert (p, expected_p, 0.001); 610s ***** shared x, p 610s x = [-1, 0, 1, 2, Inf]; 610s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 610s ***** assert (raylcdf (x, 1), p, 1e-14) 610s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 610s ***** error<raylcdf: function called with too few input arguments.> raylcdf () 610s ***** error<raylcdf: function called with too few input arguments.> raylcdf (1) 610s ***** error<raylcdf: invalid argument for upper tail.> raylcdf (1, 2, "uper") 610s ***** error<raylcdf: invalid argument for upper tail.> raylcdf (1, 2, 3) 610s ***** error<raylcdf: X and SIGMA must be of common size or scalars.> ... 610s raylcdf (ones (3), ones (2)) 610s ***** error<raylcdf: X and SIGMA must be of common size or scalars.> ... 610s raylcdf (ones (2), ones (3)) 610s ***** error<raylcdf: X and SIGMA must not be complex.> raylcdf (i, 2) 610s ***** error<raylcdf: X and SIGMA must not be complex.> raylcdf (2, i) 610s 12 tests, 12 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/gumbelinv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gumbelinv.m 610s ***** demo 610s ## Plot various iCDFs from the Gumbel distribution 610s p = 0.001:0.001:0.999; 610s x1 = gumbelinv (p, 0.5, 2); 610s x2 = gumbelinv (p, 1.0, 2); 610s x3 = gumbelinv (p, 1.5, 3); 610s x4 = gumbelinv (p, 3.0, 4); 610s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 610s grid on 610s ylim ([-5, 20]) 610s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 610s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 610s title ("Gumbel iCDF") 610s xlabel ("probability") 610s ylabel ("values in x") 610s ***** shared p, x 610s p = [0, 0.05, 0.5 0.95]; 610s x = [-Inf, -1.0972, 0.3665, 2.9702]; 610s ***** assert (gumbelinv (p), x, 1e-4) 610s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 610s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 610s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 610s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 610s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 610s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 610s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 610s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 610s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 610s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 610s p = [0.05, 0.5, 0.95]; 610s x = gumbelinv(p); 610s ***** assert (gumbelcdf(x), p, 1e-4) 610s ***** error<gumbelinv: invalid number of input arguments.> gumbelinv () 610s ***** error gumbelinv (1,2,3,4,5,6) 610s ***** error<gumbelinv: P, MU, and BETA must be of common size or scalars.> ... 610s gumbelinv (ones (3), ones (2), ones (2)) 610s ***** error<gumbelinv: invalid size of covariance matrix.> ... 610s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 610s ***** error<gumbelinv: covariance matrix is required for confidence bounds.> ... 610s [p, plo, pup] = gumbelinv (1, 2, 3) 610s ***** error<gumbelinv: invalid value for alpha.> [p, plo, pup] = ... 610s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 610s ***** error<gumbelinv: invalid value for alpha.> [p, plo, pup] = ... 610s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 610s ***** error<gumbelinv: P, MU, and BETA must not be complex.> gumbelinv (i, 2, 2) 610s ***** error<gumbelinv: P, MU, and BETA must not be complex.> gumbelinv (2, i, 2) 610s ***** error<gumbelinv: P, MU, and BETA must not be complex.> gumbelinv (2, 2, i) 610s ***** error<gumbelinv: bad covariance matrix.> ... 610s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 610s 23 tests, 23 passed, 0 known failure, 0 skipped 610s [inst/dist_fun/wblinv.m] 610s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wblinv.m 610s ***** demo 610s ## Plot various iCDFs from the Weibull distribution 610s p = 0.001:0.001:0.999; 610s x1 = wblinv (p, 1, 0.5); 610s x2 = wblinv (p, 1, 1); 610s x3 = wblinv (p, 1, 1.5); 610s x4 = wblinv (p, 1, 5); 610s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 610s ylim ([0, 2.5]) 610s grid on 610s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 610s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 610s title ("Weibull iCDF") 610s xlabel ("probability") 610s ylabel ("x") 610s ***** shared p 610s p = [-1 0 0.63212055882855778 1 2]; 610s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 610s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 610s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 611s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 611s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 611s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 611s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 611s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 611s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 611s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 611s ***** error<wblinv: invalid number of input arguments.> wblinv () 611s ***** error<wblinv: invalid number of input arguments.> wblinv (1,2,3,4) 611s ***** error<wblinv: P, LAMBDA, and K must be of common size or scalars.> ... 611s wblinv (ones (3), ones (2), ones (2)) 611s ***** error<wblinv: P, LAMBDA, and K must be of common size or scalars.> ... 611s wblinv (ones (2), ones (3), ones (2)) 611s ***** error<wblinv: P, LAMBDA, and K must be of common size or scalars.> ... 611s wblinv (ones (2), ones (2), ones (3)) 611s ***** error<wblinv: P, LAMBDA, and K must not be complex.> wblinv (i, 2, 2) 611s ***** error<wblinv: P, LAMBDA, and K must not be complex.> wblinv (2, i, 2) 611s ***** error<wblinv: P, LAMBDA, and K must not be complex.> wblinv (2, 2, i) 611s 18 tests, 18 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/gevrnd.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gevrnd.m 611s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 611s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 611s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 611s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 611s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 611s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 611s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 611s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 611s ***** assert (class (gevrnd (1,1,1)), "double") 611s ***** assert (class (gevrnd (single (1),1,1)), "single") 611s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 611s ***** assert (class (gevrnd (1,single (1),1)), "single") 611s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 611s ***** assert (class (gevrnd (1,1,single (1))), "single") 611s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 611s ***** error<gevrnd: function called with too few input arguments.> gevrnd () 611s ***** error<gevrnd: function called with too few input arguments.> gevrnd (1) 611s ***** error<gevrnd: function called with too few input arguments.> gevrnd (1, 2) 611s ***** error<gevrnd: K, SIGMA, and MU must be of common size or scalars.> ... 611s gevrnd (ones (3), ones (2), ones (2)) 611s ***** error<gevrnd: K, SIGMA, and MU must be of common size or scalars.> ... 611s gevrnd (ones (2), ones (3), ones (2)) 611s ***** error<gevrnd: K, SIGMA, and MU must be of common size or scalars.> ... 611s gevrnd (ones (2), ones (2), ones (3)) 611s ***** error<gevrnd: K, SIGMA, and MU must not be complex.> gevrnd (i, 2, 3) 611s ***** error<gevrnd: K, SIGMA, and MU must not be complex.> gevrnd (1, i, 3) 611s ***** error<gevrnd: K, SIGMA, and MU must not be complex.> gevrnd (1, 2, i) 611s ***** error<gevrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gevrnd (1, 2, 3, -1) 611s ***** error<gevrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gevrnd (1, 2, 3, 1.2) 611s ***** error<gevrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gevrnd (1, 2, 3, ones (2)) 611s ***** error<gevrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gevrnd (1, 2, 3, [2 -1 2]) 611s ***** error<gevrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gevrnd (1, 2, 3, [2 0 2.5]) 611s ***** error<gevrnd: dimensions must be non-negative integers.> ... 611s gevrnd (1, 2, 3, 2, -1, 5) 611s ***** error<gevrnd: dimensions must be non-negative integers.> ... 611s gevrnd (1, 2, 3, 2, 1.5, 5) 611s ***** error<gevrnd: K, SIGMA, and MU must be scalars or of size SZ.> ... 611s gevrnd (2, ones (2), 2, 3) 611s ***** error<gevrnd: K, SIGMA, and MU must be scalars or of size SZ.> ... 611s gevrnd (2, ones (2), 2, [3, 2]) 611s ***** error<gevrnd: K, SIGMA, and MU must be scalars or of size SZ.> ... 611s gevrnd (2, ones (2), 2, 3, 2) 611s 34 tests, 34 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/geocdf.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/geocdf.m 611s ***** demo 611s ## Plot various CDFs from the geometric distribution 611s x = 0:10; 611s p1 = geocdf (x, 0.2); 611s p2 = geocdf (x, 0.5); 611s p3 = geocdf (x, 0.7); 611s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 611s grid on 611s xlim ([0, 10]) 611s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 611s title ("Geometric CDF") 611s xlabel ("values in x (number of failures)") 611s ylabel ("probability") 611s ***** test 611s p = geocdf ([1, 2, 3, 4], 0.25); 611s assert (p(1), 0.4375000000, 1e-14); 611s assert (p(2), 0.5781250000, 1e-14); 611s assert (p(3), 0.6835937500, 1e-14); 611s assert (p(4), 0.7626953125, 1e-14); 611s ***** test 611s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 611s assert (p(1), 0.5625000000, 1e-14); 611s assert (p(2), 0.4218750000, 1e-14); 611s assert (p(3), 0.3164062500, 1e-14); 611s assert (p(4), 0.2373046875, 1e-14); 611s ***** shared x, p 611s x = [-1 0 1 Inf]; 611s p = [0 0.5 0.75 1]; 611s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 611s ***** assert (geocdf (x, 0.5), p) 611s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 611s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 611s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 611s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 611s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 611s ***** error<geocdf: function called with too few input arguments.> geocdf () 611s ***** error<geocdf: function called with too few input arguments.> geocdf (1) 611s ***** error<geocdf: X and PS must be of common size or scalars.> ... 611s geocdf (ones (3), ones (2)) 611s ***** error<geocdf: X and PS must be of common size or scalars.> ... 611s geocdf (ones (2), ones (3)) 611s ***** error<geocdf: X and PS must not be complex.> geocdf (i, 2) 611s ***** error<geocdf: X and PS must not be complex.> geocdf (2, i) 611s ***** error<geocdf: invalid argument for upper tail.> geocdf (2, 3, "tail") 611s ***** error<geocdf: invalid argument for upper tail.> geocdf (2, 3, 5) 611s 17 tests, 17 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/tlspdf.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tlspdf.m 611s ***** demo 611s ## Plot various PDFs from the Student's T distribution 611s x = -8:0.01:8; 611s y1 = tlspdf (x, 0, 1, 1); 611s y2 = tlspdf (x, 0, 2, 2); 611s y3 = tlspdf (x, 3, 2, 5); 611s y4 = tlspdf (x, -1, 3, Inf); 611s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 611s grid on 611s xlim ([-8, 8]) 611s ylim ([0, 0.41]) 611s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 611s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 611s "location", "northwest") 611s title ("Location-scale Student's T PDF") 611s xlabel ("values in x") 611s ylabel ("density") 611s ***** test 611s x = rand (10,1); 611s y = 1./(pi * (1 + x.^2)); 611s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 611s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 611s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 611s ***** shared x, y 611s x = [-Inf 0 0.5 1 Inf]; 611s y = 1./(pi * (1 + x.^2)); 611s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 611s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 611s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 611s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 611s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 611s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 611s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 611s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 611s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 611s ***** error<tlspdf: function called with too few input arguments.> tlspdf () 611s ***** error<tlspdf: function called with too few input arguments.> tlspdf (1) 611s ***** error<tlspdf: function called with too few input arguments.> tlspdf (1, 2) 611s ***** error<tlspdf: function called with too few input arguments.> tlspdf (1, 2, 3) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 611s tlspdf (ones (3), ones (2), 1, 1) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 611s tlspdf (ones (2), 1, ones (3), 1) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 611s tlspdf (ones (2), 1, 1, ones (3)) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must not be complex.> tlspdf (i, 2, 1, 1) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must not be complex.> tlspdf (2, i, 1, 1) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must not be complex.> tlspdf (2, 1, i, 1) 611s ***** error<tlspdf: X, MU, SIGMA, and NU must not be complex.> tlspdf (2, 1, 1, i) 611s 21 tests, 21 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/ncfcdf.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncfcdf.m 611s ***** demo 611s ## Plot various CDFs from the noncentral F distribution 611s x = 0:0.01:5; 611s p1 = ncfcdf (x, 2, 5, 1); 611s p2 = ncfcdf (x, 2, 5, 2); 611s p3 = ncfcdf (x, 5, 10, 1); 611s p4 = ncfcdf (x, 10, 20, 10); 611s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 611s grid on 611s xlim ([0, 5]) 611s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 611s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 611s "location", "southeast") 611s title ("Noncentral F CDF") 611s xlabel ("values in x") 611s ylabel ("probability") 611s ***** demo 611s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 611s ## same number of numerator and denominator degrees of freedom (5, 20) 611s 611s x = 0.01:0.1:10.01; 611s p1 = ncfcdf (x, 5, 20, 10); 611s p2 = fcdf (x, 5, 20); 611s plot (x, p1, "-", x, p2, "-"); 611s grid on 611s xlim ([0, 10]) 611s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 611s title ("Noncentral F vs F CDFs") 611s xlabel ("values in x") 611s ylabel ("probability") 611s ***** test 611s x = -2:0.1:2; 611s p = ncfcdf (x, 10, 1, 3); 611s assert (p([1:21]), zeros (1, 21), 1e-76); 611s assert (p(22), 0.004530737275319753, 1e-14); 611s assert (p(30), 0.255842099135669, 1e-14); 611s assert (p(41), 0.4379890998457305, 1e-14); 611s ***** test 611s p = ncfcdf (12, 10, 3, 2); 611s assert (p, 0.9582287900447416, 1e-14); 611s ***** test 611s p = ncfcdf (2, 3, 2, 1); 611s assert (p, 0.5731985522994989, 1e-14); 611s ***** test 611s p = ncfcdf (2, 3, 2, 1, "upper"); 611s assert (p, 0.4268014477004823, 1e-14); 611s ***** test 611s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 611s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 611s ***** error<ncfcdf: function called with too few input arguments.> ncfcdf () 611s ***** error<ncfcdf: function called with too few input arguments.> ncfcdf (1) 611s ***** error<ncfcdf: function called with too few input arguments.> ncfcdf (1, 2) 611s ***** error<ncfcdf: function called with too few input arguments.> ncfcdf (1, 2, 3) 611s ***** error<ncfcdf: invalid argument for upper tail.> ncfcdf (1, 2, 3, 4, "tail") 611s ***** error<ncfcdf: invalid argument for upper tail.> ncfcdf (1, 2, 3, 4, 5) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 611s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 611s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 611s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 611s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfcdf (i, 2, 2, 2) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfcdf (2, i, 2, 2) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfcdf (2, 2, i, 2) 611s ***** error<ncfcdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfcdf (2, 2, 2, i) 611s 19 tests, 19 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/gamrnd.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gamrnd.m 611s ***** assert (size (gamrnd (1, 1)), [1 1]) 611s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 611s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 611s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 611s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 611s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 611s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 611s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 611s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 611s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 611s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 611s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 611s ***** assert (class (gamrnd (1, 1)), "double") 611s ***** assert (class (gamrnd (1, single (1))), "single") 611s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 611s ***** assert (class (gamrnd (single (1), 1)), "single") 611s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 611s ***** error<gamrnd: function called with too few input arguments.> gamrnd () 611s ***** error<gamrnd: function called with too few input arguments.> gamrnd (1) 611s ***** error<gamrnd: A and B must be of common size or scalars.> ... 611s gamrnd (ones (3), ones (2)) 611s ***** error<gamrnd: A and B must be of common size or scalars.> ... 611s gamrnd (ones (2), ones (3)) 611s ***** error<gamrnd: A and B must not be complex.> gamrnd (i, 2, 3) 611s ***** error<gamrnd: A and B must not be complex.> gamrnd (1, i, 3) 611s ***** error<gamrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gamrnd (1, 2, -1) 611s ***** error<gamrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gamrnd (1, 2, 1.2) 611s ***** error<gamrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gamrnd (1, 2, ones (2)) 611s ***** error<gamrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gamrnd (1, 2, [2 -1 2]) 611s ***** error<gamrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s gamrnd (1, 2, [2 0 2.5]) 611s ***** error<gamrnd: dimensions must be non-negative integers.> ... 611s gamrnd (1, 2, 2, -1, 5) 611s ***** error<gamrnd: dimensions must be non-negative integers.> ... 611s gamrnd (1, 2, 2, 1.5, 5) 611s ***** error<gamrnd: A and B must be scalars or of size SZ.> ... 611s gamrnd (2, ones (2), 3) 611s ***** error<gamrnd: A and B must be scalars or of size SZ.> ... 611s gamrnd (2, ones (2), [3, 2]) 611s ***** error<gamrnd: A and B must be scalars or of size SZ.> ... 611s gamrnd (2, ones (2), 3, 2) 611s 33 tests, 33 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/iwishrnd.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/iwishrnd.m 611s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 611s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 611s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 611s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 611s ***** error iwishrnd () 611s ***** error iwishrnd (1) 611s ***** error iwishrnd ([-3 1; 1 3],1) 611s ***** error iwishrnd ([1; 1],1) 611s 8 tests, 8 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/lognrnd.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/lognrnd.m 611s ***** assert (size (lognrnd (1, 1)), [1 1]) 611s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 611s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 611s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 611s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 611s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 611s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 611s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 611s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 611s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 611s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 611s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 611s ***** assert (class (lognrnd (1, 1)), "double") 611s ***** assert (class (lognrnd (1, single (1))), "single") 611s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 611s ***** assert (class (lognrnd (single (1), 1)), "single") 611s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 611s ***** error<lognrnd: function called with too few input arguments.> lognrnd () 611s ***** error<lognrnd: function called with too few input arguments.> lognrnd (1) 611s ***** error<lognrnd: MU and SIGMA must be of common size or scalars.> ... 611s lognrnd (ones (3), ones (2)) 611s ***** error<lognrnd: MU and SIGMA must be of common size or scalars.> ... 611s lognrnd (ones (2), ones (3)) 611s ***** error<lognrnd: MU and SIGMA must not be complex.> lognrnd (i, 2, 3) 611s ***** error<lognrnd: MU and SIGMA must not be complex.> lognrnd (1, i, 3) 611s ***** error<lognrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s lognrnd (1, 2, -1) 611s ***** error<lognrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s lognrnd (1, 2, 1.2) 611s ***** error<lognrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s lognrnd (1, 2, ones (2)) 611s ***** error<lognrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s lognrnd (1, 2, [2 -1 2]) 611s ***** error<lognrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 611s lognrnd (1, 2, [2 0 2.5]) 611s ***** error<lognrnd: dimensions must be non-negative integers.> ... 611s lognrnd (1, 2, 2, -1, 5) 611s ***** error<lognrnd: dimensions must be non-negative integers.> ... 611s lognrnd (1, 2, 2, 1.5, 5) 611s ***** error<lognrnd: MU and SIGMA must be scalars or of size SZ.> ... 611s lognrnd (2, ones (2), 3) 611s ***** error<lognrnd: MU and SIGMA must be scalars or of size SZ.> ... 611s lognrnd (2, ones (2), [3, 2]) 611s ***** error<lognrnd: MU and SIGMA must be scalars or of size SZ.> ... 611s lognrnd (2, ones (2), 3, 2) 611s 33 tests, 33 passed, 0 known failure, 0 skipped 611s [inst/dist_fun/ncx2inv.m] 611s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncx2inv.m 611s ***** demo 611s ## Plot various iCDFs from the noncentral chi-squared distribution 611s p = 0.001:0.001:0.999; 611s x1 = ncx2inv (p, 2, 1); 611s x2 = ncx2inv (p, 2, 2); 611s x3 = ncx2inv (p, 2, 3); 611s x4 = ncx2inv (p, 4, 1); 611s x5 = ncx2inv (p, 4, 2); 611s x6 = ncx2inv (p, 4, 3); 611s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 611s p, x4, "-m", p, x5, "-c", p, x6, "-y") 611s grid on 611s ylim ([0, 10]) 611s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 611s "df = 2, λ = 3", "df = 4, λ = 1", ... 611s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 611s title ("Noncentral chi-squared iCDF") 611s xlabel ("probability") 611s ylabel ("values in x") 611s ***** demo 611s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 611s ## chi-squared CDF with the same number of degrees of freedom (4). 611s 611s p = 0.001:0.001:0.999; 611s x1 = ncx2inv (p, 4, 2); 611s x2 = chi2inv (p, 4); 611s plot (p, x1, "-", p, x2, "-"); 611s grid on 611s ylim ([0, 10]) 611s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 611s title ("Noncentral chi-squared vs chi-squared quantile functions") 611s xlabel ("probability") 611s ylabel ("values in x") 611s ***** test 611s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 611s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 611s ***** test 611s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 611s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 612s ***** test 612s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 612s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 612s ***** test 612s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 612s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 612s ***** test 612s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 612s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 612s ***** test 612s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 612s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 612s ***** test 612s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 613s ***** error<ncx2inv: function called with too few input arguments.> ncx2inv () 613s ***** error<ncx2inv: function called with too few input arguments.> ncx2inv (1) 613s ***** error<ncx2inv: function called with too few input arguments.> ncx2inv (1, 2) 613s ***** error<ncx2inv: P, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2inv (ones (3), ones (2), ones (2)) 613s ***** error<ncx2inv: P, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2inv (ones (2), ones (3), ones (2)) 613s ***** error<ncx2inv: P, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2inv (ones (2), ones (2), ones (3)) 613s ***** error<ncx2inv: P, DF, and LAMBDA must not be complex.> ncx2inv (i, 2, 2) 613s ***** error<ncx2inv: P, DF, and LAMBDA must not be complex.> ncx2inv (2, i, 2) 613s ***** error<ncx2inv: P, DF, and LAMBDA must not be complex.> ncx2inv (2, 2, i) 613s 16 tests, 16 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/bvncdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bvncdf.m 613s ***** demo 613s mu = [1, -1]; 613s sigma = [0.9, 0.4; 0.4, 0.3]; 613s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 613s x = [X1(:), X2(:)]; 613s p = bvncdf (x, mu, sigma); 613s Z = reshape (p, 25, 25); 613s surf (X1, X2, Z); 613s title ("Bivariate Normal Distribution"); 613s ylabel "X1" 613s xlabel "X2" 613s ***** test 613s mu = [1, -1]; 613s sigma = [0.9, 0.4; 0.4, 0.3]; 613s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 613s x = [X1(:), X2(:)]; 613s p = bvncdf (x, mu, sigma); 613s p_out = [0.00011878988774500, 0.00034404112322371, ... 613s 0.00087682502191813, 0.00195221905058185, ... 613s 0.00378235566873474, 0.00638175749734415, ... 613s 0.00943764224329656, 0.01239164888125426, ... 613s 0.01472750274376648, 0.01623228313374828]'; 613s assert (p([1:10]), p_out, 1e-16); 613s ***** test 613s mu = [1, -1]; 613s sigma = [0.9, 0.4; 0.4, 0.3]; 613s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 613s x = [X1(:), X2(:)]; 613s p = bvncdf (x, mu, sigma); 613s p_out = [0.8180695783608276, 0.8854485749482751, ... 613s 0.9308108777385832, 0.9579855743025508, ... 613s 0.9722897881414742, 0.9788150170059926, ... 613s 0.9813597788804785, 0.9821977956568989, ... 613s 0.9824283794464095, 0.9824809345614861]'; 613s assert (p([616:625]), p_out, 3e-16); 613s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 613s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 613s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 613s 5 tests, 5 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/ncx2pdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncx2pdf.m 613s ***** demo 613s ## Plot various PDFs from the noncentral chi-squared distribution 613s x = 0:0.1:10; 613s y1 = ncx2pdf (x, 2, 1); 613s y2 = ncx2pdf (x, 2, 2); 613s y3 = ncx2pdf (x, 2, 3); 613s y4 = ncx2pdf (x, 4, 1); 613s y5 = ncx2pdf (x, 4, 2); 613s y6 = ncx2pdf (x, 4, 3); 613s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 613s x, y4, "-m", x, y5, "-c", x, y6, "-y") 613s grid on 613s xlim ([0, 10]) 613s ylim ([0, 0.32]) 613s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 613s "df = 2, λ = 3", "df = 4, λ = 1", ... 613s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 613s title ("Noncentral chi-squared PDF") 613s xlabel ("values in x") 613s ylabel ("density") 613s ***** demo 613s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 613s ## chi-squared PDF with the same number of degrees of freedom (4). 613s 613s x = 0:0.1:10; 613s y1 = ncx2pdf (x, 4, 2); 613s y2 = chi2pdf (x, 4); 613s plot (x, y1, "-", x, y2, "-"); 613s grid on 613s xlim ([0, 10]) 613s ylim ([0, 0.32]) 613s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 613s title ("Noncentral chi-squared vs chi-squared PDFs") 613s xlabel ("values in x") 613s ylabel ("density") 613s ***** shared x1, df, d1 613s x1 = [-Inf, 2, NaN, 4, Inf]; 613s df = [2, 0, -1, 1, 4]; 613s d1 = [1, NaN, 3, -1, 2]; 613s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 613s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 613s 0.06160064323277038, 0], 1e-14); 613s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 613s 0.09631299762429098, 0], 1e-14); 613s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 613s 0.08430464047296625, 0], 1e-14); 613s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 613s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 613s NaN, 0.1076346446244688], 1e-14); 613s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 613s NaN, 0.1192317192431485], 1e-14); 613s ***** error<ncx2pdf: function called with too few input arguments.> ncx2pdf () 613s ***** error<ncx2pdf: function called with too few input arguments.> ncx2pdf (1) 613s ***** error<ncx2pdf: function called with too few input arguments.> ncx2pdf (1, 2) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2pdf (ones (3), ones (2), ones (2)) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2pdf (ones (2), ones (3), ones (2)) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must be of common size or scalars.> ... 613s ncx2pdf (ones (2), ones (2), ones (3)) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must not be complex.> ncx2pdf (i, 2, 2) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must not be complex.> ncx2pdf (2, i, 2) 613s ***** error<ncx2pdf: X, DF, and LAMBDA must not be complex.> ncx2pdf (2, 2, i) 613s 16 tests, 16 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/expinv.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/expinv.m 613s ***** demo 613s ## Plot various iCDFs from the exponential distribution 613s p = 0.001:0.001:0.999; 613s x1 = expinv (p, 2/3); 613s x2 = expinv (p, 1.0); 613s x3 = expinv (p, 2.0); 613s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 613s grid on 613s ylim ([0, 5]) 613s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 613s title ("Exponential iCDF") 613s xlabel ("probability") 613s ylabel ("values in x") 613s ***** shared p 613s p = [-1 0 0.3934693402873666 1 2]; 613s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 613s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 613s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 613s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 613s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 613s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 613s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 613s ***** error<expinv: invalid number of input arguments.> expinv () 613s ***** error<expinv: invalid number of input arguments.> expinv (1, 2 ,3 ,4 ,5) 613s ***** error<expinv: P and MU must be of common size or scalars.> ... 613s expinv (ones (3), ones (2)) 613s ***** error<expinv: invalid size of variance, PCOV must be a scalar.> ... 613s expinv (2, 3, [1, 2]) 613s ***** error<expinv: variance, PCOV, is required for confidence bounds.> ... 613s [x, xlo, xup] = expinv (1, 2) 613s ***** error<expinv: invalid value for alpha.> [x, xlo, xup] = ... 613s expinv (1, 2, 3, 0) 613s ***** error<expinv: invalid value for alpha.> [x, xlo, xup] = ... 613s expinv (1, 2, 3, 1.22) 613s ***** error<expinv: invalid value for alpha.> [x, xlo, xup] = ... 613s expinv (1, 2, 3, [0.05, 0.1]) 613s ***** error<expinv: P and MU must not be complex.> expinv (i, 2) 613s ***** error<expinv: P and MU must not be complex.> expinv (2, i) 613s ***** error<expinv: variance, PCOV, cannot be negative.> ... 613s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 613s 18 tests, 18 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/cauchyrnd.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/cauchyrnd.m 613s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 613s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 613s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 613s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 613s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 613s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 613s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 613s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 613s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 613s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 613s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 613s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 613s ***** assert (class (cauchyrnd (1, 1)), "double") 613s ***** assert (class (cauchyrnd (1, single (1))), "single") 613s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 613s ***** assert (class (cauchyrnd (single (1), 1)), "single") 613s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 613s ***** error<cauchyrnd: function called with too few input arguments.> cauchyrnd () 613s ***** error<cauchyrnd: function called with too few input arguments.> cauchyrnd (1) 613s ***** error<cauchyrnd: X0 and GAMMA must be of common size or scalars.> ... 613s cauchyrnd (ones (3), ones (2)) 613s ***** error<cauchyrnd: X0 and GAMMA must be of common size or scalars.> ... 613s cauchyrnd (ones (2), ones (3)) 613s ***** error<cauchyrnd: X0 and GAMMA must not be complex.> cauchyrnd (i, 2, 3) 613s ***** error<cauchyrnd: X0 and GAMMA must not be complex.> cauchyrnd (1, i, 3) 613s ***** error<cauchyrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 613s cauchyrnd (1, 2, -1) 613s ***** error<cauchyrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 613s cauchyrnd (1, 2, 1.2) 613s ***** error<cauchyrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 613s cauchyrnd (1, 2, ones (2)) 613s ***** error<cauchyrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 613s cauchyrnd (1, 2, [2 -1 2]) 613s ***** error<cauchyrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 613s cauchyrnd (1, 2, [2 0 2.5]) 613s ***** error<cauchyrnd: dimensions must be non-negative integers.> ... 613s cauchyrnd (1, 2, 2, -1, 5) 613s ***** error<cauchyrnd: dimensions must be non-negative integers.> ... 613s cauchyrnd (1, 2, 2, 1.5, 5) 613s ***** error<cauchyrnd: X0 and GAMMA must be scalars or of size SZ.> ... 613s cauchyrnd (2, ones (2), 3) 613s ***** error<cauchyrnd: X0 and GAMMA must be scalars or of size SZ.> ... 613s cauchyrnd (2, ones (2), [3, 2]) 613s ***** error<cauchyrnd: X0 and GAMMA must be scalars or of size SZ.> ... 613s cauchyrnd (2, ones (2), 3, 2) 613s 33 tests, 33 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/tripdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tripdf.m 613s ***** demo 613s ## Plot various CDFs from the triangular distribution 613s x = 0.001:0.001:10; 613s y1 = tripdf (x, 3, 4, 6); 613s y2 = tripdf (x, 1, 2, 5); 613s y3 = tripdf (x, 2, 3, 9); 613s y4 = tripdf (x, 2, 5, 9); 613s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 613s grid on 613s xlim ([0, 10]) 613s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 613s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 613s "location", "northeast") 613s title ("Triangular CDF") 613s xlabel ("values in x") 613s ylabel ("probability") 613s ***** shared x, y, deps 613s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 613s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 613s deps = 2*eps; 613s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 613s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 613s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 613s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 613s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 613s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 613s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 613s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 613s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 613s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 613s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 613s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 613s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 613s ***** error<tripdf: function called with too few input arguments.> tripdf () 613s ***** error<tripdf: function called with too few input arguments.> tripdf (1) 613s ***** error<tripdf: function called with too few input arguments.> tripdf (1, 2) 613s ***** error<tripdf: function called with too few input arguments.> tripdf (1, 2, 3) 613s ***** error<tripdf: function called with too many inputs> ... 613s tripdf (1, 2, 3, 4, 5) 613s ***** error<tripdf: X, A, B, and C must be of common size or scalars.> ... 613s tripdf (ones (3), ones (2), ones(2), ones(2)) 613s ***** error<tripdf: X, A, B, and C must be of common size or scalars.> ... 613s tripdf (ones (2), ones (3), ones(2), ones(2)) 613s ***** error<tripdf: X, A, B, and C must be of common size or scalars.> ... 613s tripdf (ones (2), ones (2), ones(3), ones(2)) 613s ***** error<tripdf: X, A, B, and C must be of common size or scalars.> ... 613s tripdf (ones (2), ones (2), ones(2), ones(3)) 613s ***** error<tripdf: X, A, B, and C must not be complex.> tripdf (i, 2, 3, 4) 613s ***** error<tripdf: X, A, B, and C must not be complex.> tripdf (1, i, 3, 4) 613s ***** error<tripdf: X, A, B, and C must not be complex.> tripdf (1, 2, i, 4) 613s ***** error<tripdf: X, A, B, and C must not be complex.> tripdf (1, 2, 3, i) 613s 26 tests, 26 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/ncfinv.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncfinv.m 613s ***** demo 613s ## Plot various iCDFs from the noncentral F distribution 613s p = 0.001:0.001:0.999; 613s x1 = ncfinv (p, 2, 5, 1); 613s x2 = ncfinv (p, 2, 5, 2); 613s x3 = ncfinv (p, 5, 10, 1); 613s x4 = ncfinv (p, 10, 20, 10); 613s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 613s grid on 613s ylim ([0, 5]) 613s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 613s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 613s "location", "northwest") 613s title ("Noncentral F iCDF") 613s xlabel ("probability") 613s ylabel ("values in x") 613s ***** demo 613s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 613s ## same number of numerator and denominator degrees of freedom (5, 20) 613s 613s p = 0.001:0.001:0.999; 613s x1 = ncfinv (p, 5, 20, 10); 613s x2 = finv (p, 5, 20); 613s plot (p, x1, "-", p, x2, "-"); 613s grid on 613s ylim ([0, 10]) 613s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 613s title ("Noncentral F vs F quantile functions") 613s xlabel ("probability") 613s ylabel ("values in x") 613s ***** test 613s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 613s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 613s ***** test 613s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 613s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 613s ***** test 613s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 613s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 613s ***** test 613s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 613s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 613s ***** test 613s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 613s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 613s ***** test 613s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 613s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 613s ***** test 613s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 613s ***** error<ncfinv: function called with too few input arguments.> ncfinv () 613s ***** error<ncfinv: function called with too few input arguments.> ncfinv (1) 613s ***** error<ncfinv: function called with too few input arguments.> ncfinv (1, 2) 613s ***** error<ncfinv: function called with too few input arguments.> ncfinv (1, 2, 3) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 613s ncfinv (ones (3), ones (2), ones (2), ones (2)) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 613s ncfinv (ones (2), ones (3), ones (2), ones (2)) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 613s ncfinv (ones (2), ones (2), ones (3), ones (2)) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 613s ncfinv (ones (2), ones (2), ones (2), ones (3)) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must not be complex.> ncfinv (i, 2, 2, 2) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must not be complex.> ncfinv (2, i, 2, 2) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must not be complex.> ncfinv (2, 2, i, 2) 613s ***** error<ncfinv: P, DF1, DF2, and LAMBDA must not be complex.> ncfinv (2, 2, 2, i) 613s 19 tests, 19 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/poisspdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/poisspdf.m 613s ***** demo 613s ## Plot various PDFs from the Poisson distribution 613s x = 0:20; 613s y1 = poisspdf (x, 1); 613s y2 = poisspdf (x, 4); 613s y3 = poisspdf (x, 10); 613s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 613s grid on 613s ylim ([0, 0.4]) 613s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 613s title ("Poisson PDF") 613s xlabel ("values in x (number of occurences)") 613s ylabel ("density") 613s ***** shared x, y 613s x = [-1 0 1 2 Inf]; 613s y = [0, exp(-1)*[1 1 0.5], 0]; 613s ***** assert (poisspdf (x, ones (1,5)), y, eps) 613s ***** assert (poisspdf (x, 1), y, eps) 613s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 613s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 613s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 613s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 613s ***** error<poisspdf: function called with too few input arguments.> poisspdf () 613s ***** error<poisspdf: function called with too few input arguments.> poisspdf (1) 613s ***** error<poisspdf: X and LAMBDA must be of common size or scalars.> ... 613s poisspdf (ones (3), ones (2)) 613s ***** error<poisspdf: X and LAMBDA must be of common size or scalars.> ... 613s poisspdf (ones (2), ones (3)) 613s ***** error<poisspdf: X and LAMBDA must not be complex.> poisspdf (i, 2) 613s ***** error<poisspdf: X and LAMBDA must not be complex.> poisspdf (2, i) 613s 12 tests, 12 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/jsucdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/jsucdf.m 613s ***** error jsucdf () 613s ***** error jsucdf (1, 2, 3, 4) 613s ***** error<jsucdf: X, ALPHA1, and ALPHA2 must be of common size or scalars.> ... 613s jsucdf (1, ones (2), ones (3)) 613s 3 tests, 3 passed, 0 known failure, 0 skipped 613s [inst/dist_fun/nctcdf.m] 613s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nctcdf.m 613s ***** demo 613s ## Plot various CDFs from the noncentral Τ distribution 613s x = -5:0.01:5; 613s p1 = nctcdf (x, 1, 0); 613s p2 = nctcdf (x, 4, 0); 613s p3 = nctcdf (x, 1, 2); 613s p4 = nctcdf (x, 4, 2); 613s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 613s grid on 613s xlim ([-5, 5]) 613s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 613s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 613s title ("Noncentral Τ CDF") 613s xlabel ("values in x") 613s ylabel ("probability") 613s ***** demo 613s ## Compare the noncentral T CDF with MU = 1 to the T CDF 613s ## with the same number of degrees of freedom (10). 613s 613s x = -5:0.1:5; 613s p1 = nctcdf (x, 10, 1); 613s p2 = tcdf (x, 10); 613s plot (x, p1, "-", x, p2, "-") 613s grid on 613s xlim ([-5, 5]) 613s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 613s title ("Noncentral T vs T CDFs") 613s xlabel ("values in x") 613s ylabel ("probability") 613s ***** test 613s x = -2:0.1:2; 613s p = nctcdf (x, 10, 1); 613s assert (p(1), 0.003302485766631558, 1e-14); 613s assert (p(2), 0.004084668193532631, 1e-14); 613s assert (p(3), 0.005052800319478737, 1e-14); 613s assert (p(41), 0.8076115625303751, 1e-14); 614s ***** test 614s p = nctcdf (12, 10, 3); 614s assert (p, 0.9997719343243797, 1e-14); 614s ***** test 614s p = nctcdf (2, 3, 2); 614s assert (p, 0.4430757822176028, 1e-14); 614s ***** test 614s p = nctcdf (2, 3, 2, "upper"); 614s assert (p, 0.5569242177823971, 1e-14); 614s ***** test 614s p = nctcdf ([3, 6], 3, 2, "upper"); 614s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 614s ***** error<nctcdf: function called with too few input arguments.> nctcdf () 614s ***** error<nctcdf: function called with too few input arguments.> nctcdf (1) 614s ***** error<nctcdf: function called with too few input arguments.> nctcdf (1, 2) 614s ***** error<nctcdf: invalid argument for upper tail.> nctcdf (1, 2, 3, "tail") 614s ***** error<nctcdf: invalid argument for upper tail.> nctcdf (1, 2, 3, 4) 614s ***** error<nctcdf: X, DF, and MU must be of common size or scalars.> ... 614s nctcdf (ones (3), ones (2), ones (2)) 614s ***** error<nctcdf: X, DF, and MU must be of common size or scalars.> ... 614s nctcdf (ones (2), ones (3), ones (2)) 614s ***** error<nctcdf: X, DF, and MU must be of common size or scalars.> ... 614s nctcdf (ones (2), ones (2), ones (3)) 614s ***** error<nctcdf: X, DF, and MU must not be complex.> nctcdf (i, 2, 2) 614s ***** error<nctcdf: X, DF, and MU must not be complex.> nctcdf (2, i, 2) 614s ***** error<nctcdf: X, DF, and MU must not be complex.> nctcdf (2, 2, i) 614s 16 tests, 16 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/evinv.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/evinv.m 614s ***** demo 614s ## Plot various iCDFs from the extreme value distribution 614s p = 0.001:0.001:0.999; 614s x1 = evinv (p, 0.5, 2); 614s x2 = evinv (p, 1.0, 2); 614s x3 = evinv (p, 1.5, 3); 614s x4 = evinv (p, 3.0, 4); 614s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 614s grid on 614s ylim ([-10, 10]) 614s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 614s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 614s title ("Extreme value iCDF") 614s xlabel ("probability") 614s ylabel ("values in x") 614s ***** shared p, x 614s p = [0, 0.05, 0.5 0.95]; 614s x = [-Inf, -2.9702, -0.3665, 1.0972]; 614s ***** assert (evinv (p), x, 1e-4) 614s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 614s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 614s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 614s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 614s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 614s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 614s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 614s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 614s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 614s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 614s ***** error<evinv: invalid number of input arguments.> evinv () 614s ***** error evinv (1,2,3,4,5,6) 614s ***** error<evinv: P, MU, and SIGMA must be of common size or scalars.> ... 614s evinv (ones (3), ones (2), ones (2)) 614s ***** error<evinv: invalid size of covariance matrix.> ... 614s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 614s ***** error<evinv: covariance matrix is required for confidence bounds.> ... 614s [p, plo, pup] = evinv (1, 2, 3) 614s ***** error<evinv: invalid value for alpha.> [p, plo, pup] = ... 614s evinv (1, 2, 3, [1, 0; 0, 1], 0) 614s ***** error<evinv: invalid value for alpha.> [p, plo, pup] = ... 614s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 614s ***** error<evinv: P, MU, and SIGMA must not be complex.> evinv (i, 2, 2) 614s ***** error<evinv: P, MU, and SIGMA must not be complex.> evinv (2, i, 2) 614s ***** error<evinv: P, MU, and SIGMA must not be complex.> evinv (2, 2, i) 614s ***** error<evinv: bad covariance matrix.> ... 614s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 614s 22 tests, 22 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/laplacecdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/laplacecdf.m 614s ***** demo 614s ## Plot various CDFs from the Laplace distribution 614s x = -10:0.01:10; 614s p1 = laplacecdf (x, 0, 1); 614s p2 = laplacecdf (x, 0, 2); 614s p3 = laplacecdf (x, 0, 4); 614s p4 = laplacecdf (x, -5, 4); 614s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 614s grid on 614s xlim ([-10, 10]) 614s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 614s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 614s title ("Laplace CDF") 614s xlabel ("values in x") 614s ylabel ("probability") 614s ***** shared x, y 614s x = [-Inf, -log(2), 0, log(2), Inf]; 614s y = [0, 1/4, 1/2, 3/4, 1]; 614s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 614s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 614s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 614s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 614s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 614s ***** error<laplacecdf: function called with too few input arguments.> laplacecdf () 614s ***** error<laplacecdf: function called with too few input arguments.> laplacecdf (1) 614s ***** error<laplacecdf: function called with too few input arguments.> ... 614s laplacecdf (1, 2) 614s ***** error<laplacecdf: function called with too many inputs> ... 614s laplacecdf (1, 2, 3, 4, 5) 614s ***** error<laplacecdf: invalid argument for upper tail.> laplacecdf (1, 2, 3, "tail") 614s ***** error<laplacecdf: invalid argument for upper tail.> laplacecdf (1, 2, 3, 4) 614s ***** error<laplacecdf: X, MU, and BETA must be of common size or scalars.> ... 614s laplacecdf (ones (3), ones (2), ones (2)) 614s ***** error<laplacecdf: X, MU, and BETA must be of common size or scalars.> ... 614s laplacecdf (ones (2), ones (3), ones (2)) 614s ***** error<laplacecdf: X, MU, and BETA must be of common size or scalars.> ... 614s laplacecdf (ones (2), ones (2), ones (3)) 614s ***** error<laplacecdf: X, MU, and BETA must not be complex.> laplacecdf (i, 2, 2) 614s ***** error<laplacecdf: X, MU, and BETA must not be complex.> laplacecdf (2, i, 2) 614s ***** error<laplacecdf: X, MU, and BETA must not be complex.> laplacecdf (2, 2, i) 614s 17 tests, 17 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/logninv.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logninv.m 614s ***** demo 614s ## Plot various iCDFs from the log-normal distribution 614s p = 0.001:0.001:0.999; 614s x1 = logninv (p, 0, 1); 614s x2 = logninv (p, 0, 0.5); 614s x3 = logninv (p, 0, 0.25); 614s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 614s grid on 614s ylim ([0, 3]) 614s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 614s "location", "northwest") 614s title ("Log-normal iCDF") 614s xlabel ("probability") 614s ylabel ("values in x") 614s ***** shared p 614s p = [-1 0 0.5 1 2]; 614s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 614s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 614s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 614s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 614s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 614s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 614s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 614s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 614s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 614s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 614s ***** error logninv () 614s ***** error logninv (1,2,3,4) 614s ***** error logninv (ones (3), ones (2), ones (2)) 614s ***** error logninv (ones (2), ones (3), ones (2)) 614s ***** error logninv (ones (2), ones (2), ones (3)) 614s ***** error logninv (i, 2, 2) 614s ***** error logninv (2, i, 2) 614s ***** error logninv (2, 2, i) 614s 18 tests, 18 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/chi2inv.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/chi2inv.m 614s ***** demo 614s ## Plot various iCDFs from the chi-squared distribution 614s p = 0.001:0.001:0.999; 614s x1 = chi2inv (p, 1); 614s x2 = chi2inv (p, 2); 614s x3 = chi2inv (p, 3); 614s x4 = chi2inv (p, 4); 614s x5 = chi2inv (p, 6); 614s x6 = chi2inv (p, 9); 614s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 614s p, x4, "-c", p, x5, "-m", p, x6, "-y") 614s grid on 614s ylim ([0, 8]) 614s legend ({"df = 1", "df = 2", "df = 3", ... 614s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 614s title ("Chi-squared iCDF") 614s xlabel ("probability") 614s ylabel ("values in x") 614s ***** shared p 614s p = [-1 0 0.3934693402873666 1 2]; 614s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 614s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 614s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 614s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 614s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 614s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 614s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 614s ***** error<chi2inv: function called with too few input arguments.> chi2inv () 614s ***** error<chi2inv: function called with too few input arguments.> chi2inv (1) 614s ***** error<chi2inv: function called with too many inputs> chi2inv (1,2,3) 614s ***** error<chi2inv: P and DF must be of common size or scalars.> ... 614s chi2inv (ones (3), ones (2)) 614s ***** error<chi2inv: P and DF must be of common size or scalars.> ... 614s chi2inv (ones (2), ones (3)) 614s ***** error<chi2inv: P and DF must not be complex.> chi2inv (i, 2) 614s ***** error<chi2inv: P and DF must not be complex.> chi2inv (2, i) 614s 14 tests, 14 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/ncfpdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncfpdf.m 614s ***** demo 614s ## Plot various PDFs from the noncentral F distribution 614s x = 0:0.01:5; 614s y1 = ncfpdf (x, 2, 5, 1); 614s y2 = ncfpdf (x, 2, 5, 2); 614s y3 = ncfpdf (x, 5, 10, 1); 614s y4 = ncfpdf (x, 10, 20, 10); 614s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 614s grid on 614s xlim ([0, 5]) 614s ylim ([0, 0.8]) 614s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 614s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 614s "location", "northeast") 614s title ("Noncentral F PDF") 614s xlabel ("values in x") 614s ylabel ("density") 614s ***** demo 614s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 614s ## same number of numerator and denominator degrees of freedom (5, 20) 614s 614s x = 0.01:0.1:10.01; 614s y1 = ncfpdf (x, 5, 20, 10); 614s y2 = fpdf (x, 5, 20); 614s plot (x, y1, "-", x, y2, "-"); 614s grid on 614s xlim ([0, 10]) 614s ylim ([0, 0.8]) 614s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 614s title ("Noncentral F vs F PDFs") 614s xlabel ("values in x") 614s ylabel ("density") 614s ***** shared x1, df1, df2, lambda 614s x1 = [-Inf, 2, NaN, 4, Inf]; 614s df1 = [2, 0, -1, 1, 4]; 614s df2 = [2, 4, 5, 6, 8]; 614s lambda = [1, NaN, 3, -1, 2]; 614s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 614s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 614s 0.05607937264237208, NaN], 1e-14); 614s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 614s 0.080125760971946518, NaN], 1e-14); 614s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 614s 0.0715902008258656, NaN], 1e-14); 614s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 614s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 614s NaN, 0.2152571783045893], 1e-14); 614s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 614s NaN, 0.05560846335398539], 1e-14); 614s ***** error<ncfpdf: function called with too few input arguments.> ncfpdf () 614s ***** error<ncfpdf: function called with too few input arguments.> ncfpdf (1) 614s ***** error<ncfpdf: function called with too few input arguments.> ncfpdf (1, 2) 614s ***** error<ncfpdf: function called with too few input arguments.> ncfpdf (1, 2, 3) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 614s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 614s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 614s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must be of common size or scalars.> ... 614s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfpdf (i, 2, 2, 2) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfpdf (2, i, 2, 2) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfpdf (2, 2, i, 2) 614s ***** error<ncfpdf: X, DF1, DF2, and LAMBDA must not be complex.> ncfpdf (2, 2, 2, i) 614s 19 tests, 19 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/loglinv.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/loglinv.m 614s ***** demo 614s ## Plot various iCDFs from the log-logistic distribution 614s p = 0.001:0.001:0.999; 614s x1 = loglinv (p, log (1), 1/0.5); 614s x2 = loglinv (p, log (1), 1); 614s x3 = loglinv (p, log (1), 1/2); 614s x4 = loglinv (p, log (1), 1/4); 614s x5 = loglinv (p, log (1), 1/8); 614s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 614s ylim ([0, 20]) 614s grid on 614s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 614s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 614s title ("Log-logistic iCDF") 614s xlabel ("probability") 614s ylabel ("x") 614s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 614s ***** shared p, out1, out2 614s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 614s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 614s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 614s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 614s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 614s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 614s ***** assert (class (loglinv (single (1), 2, 3)), "single") 614s ***** assert (class (loglinv (1, single (2), 3)), "single") 614s ***** assert (class (loglinv (1, 2, single (3))), "single") 614s ***** error<loglinv: function called with too few input arguments.> loglinv (1) 614s ***** error<loglinv: function called with too few input arguments.> loglinv (1, 2) 614s ***** error<loglinv: P, MU, and SIGMA must be of common size or scalars.> ... 614s loglinv (1, ones (2), ones (3)) 614s ***** error<loglinv: P, MU, and SIGMA must be of common size or scalars.> ... 614s loglinv (ones (2), 1, ones (3)) 614s ***** error<loglinv: P, MU, and SIGMA must be of common size or scalars.> ... 614s loglinv (ones (2), ones (3), 1) 614s ***** error<loglinv: P, MU, and SIGMA must not be complex.> loglinv (i, 2, 3) 614s ***** error<loglinv: P, MU, and SIGMA must not be complex.> loglinv (1, i, 3) 614s ***** error<loglinv: P, MU, and SIGMA must not be complex.> loglinv (1, 2, i) 614s 14 tests, 14 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/mvnpdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvnpdf.m 614s ***** demo 614s mu = [1, -1]; 614s sigma = [0.9, 0.4; 0.4, 0.3]; 614s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 614s x = [X1(:), X2(:)]; 614s p = mvnpdf (x, mu, sigma); 614s surf (X1, X2, reshape (p, 25, 25)); 614s ***** error<mvnpdf: too few input arguments.> y = mvnpdf (); 614s ***** error<mvnpdf: too few dimensions in X.> y = mvnpdf ([]); 614s ***** error<mvnpdf: wrong dimensions in X.> y = mvnpdf (ones (3,3,3)); 614s ***** error<mvnpdf: columns in X and MU mismatch.> ... 614s y = mvnpdf (ones (10, 2), [4, 2, 3]); 614s ***** error<mvnpdf: rows in X and MU mismatch.> ... 614s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 614s ***** error<mvnpdf: wrong size of MU.> ... 614s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 614s ***** shared x, mu, sigma 614s x = [1, 2, 5, 4, 6]; 614s mu = [2, 0, -1, 1, 4]; 614s sigma = [2, 2, 2, 2, 2]; 614s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 614s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 614s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 614s 9 tests, 9 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/invgpdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/invgpdf.m 614s ***** demo 614s ## Plot various PDFs from the inverse Gaussian distribution 614s x = 0:0.001:3; 614s y1 = invgpdf (x, 1, 0.2); 614s y2 = invgpdf (x, 1, 1); 614s y3 = invgpdf (x, 1, 3); 614s y4 = invgpdf (x, 3, 0.2); 614s y5 = invgpdf (x, 3, 1); 614s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 614s grid on 614s xlim ([0, 3]) 614s ylim ([0, 3]) 614s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 614s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 614s title ("Inverse Gaussian PDF") 614s xlabel ("values in x") 614s ylabel ("density") 614s ***** shared x, y 614s x = [-Inf, -1, 0, 1/2, 1, Inf]; 614s y = [0, 0, 0, 0.8788, 0.3989, 0]; 614s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 614s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 614s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 614s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 614s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 614s ***** error<invgpdf: function called with too few input arguments.> invgpdf () 614s ***** error<invgpdf: function called with too few input arguments.> invgpdf (1) 614s ***** error<invgpdf: function called with too few input arguments.> invgpdf (1, 2) 614s ***** error<invgpdf: X, MU, and LAMBDA must be of common size or scalars.> ... 614s invgpdf (1, ones (2), ones (3)) 614s ***** error<invgpdf: X, MU, and LAMBDA must be of common size or scalars.> ... 614s invgpdf (ones (2), 1, ones (3)) 614s ***** error<invgpdf: X, MU, and LAMBDA must be of common size or scalars.> ... 614s invgpdf (ones (2), ones (3), 1) 614s ***** error<invgpdf: X, MU, and LAMBDA must not be complex.> invgpdf (i, 2, 3) 614s ***** error<invgpdf: X, MU, and LAMBDA must not be complex.> invgpdf (1, i, 3) 614s ***** error<invgpdf: X, MU, and LAMBDA must not be complex.> invgpdf (1, 2, i) 614s 14 tests, 14 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/gpcdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gpcdf.m 614s ***** demo 614s ## Plot various CDFs from the generalized Pareto distribution 614s x = 0:0.001:5; 614s p1 = gpcdf (x, 1, 1, 0); 614s p2 = gpcdf (x, 5, 1, 0); 614s p3 = gpcdf (x, 20, 1, 0); 614s p4 = gpcdf (x, 1, 2, 0); 614s p5 = gpcdf (x, 5, 2, 0); 614s p6 = gpcdf (x, 20, 2, 0); 614s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 614s x, p4, "-c", x, p5, "-m", x, p6, "-k") 614s grid on 614s xlim ([0, 5]) 614s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 614s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 614s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 614s "location", "northwest") 614s title ("Generalized Pareto CDF") 614s xlabel ("values in x") 614s ylabel ("probability") 614s ***** shared x, y1, y1u, y2, y2u, y3, y3u 614s x = [-Inf, -1, 0, 1/2, 1, Inf]; 614s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 614s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 614s y2 = [0, 0, 0, 1/3, 1/2, 1]; 614s y2u = [1, 1, 1, 2/3, 1/2, 0]; 614s y3 = [0, 0, 0, 1/2, 1, 1]; 614s y3u = [1, 1, 1, 1/2, 0, 0]; 614s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 614s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 614s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 614s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 614s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 614s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 614s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 614s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 614s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 614s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 614s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 614s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 614s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 614s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 614s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 614s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 614s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 614s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 614s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 614s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 614s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 614s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 614s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 614s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 614s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 614s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 614s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 614s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 614s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 614s [y2u(1:3), NaN, y2u(5:6)], eps) 614s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 614s [y2u(1:3), NaN, y2u(5:6)], eps) 614s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 614s [y2u(1:3), NaN, y2u(5:6)], eps) 614s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 614s [y2u(1:3), NaN, y2u(5:6)], eps) 614s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 614s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 614s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 614s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 614s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 614s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 614s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 614s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 614s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 614s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 614s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 614s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 614s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 614s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 614s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 614s [y3u(1:3), NaN, y3u(5:6)], eps) 614s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 614s [y3u(1:3), NaN, y3u(5:6)], eps) 614s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 614s [y3u(1:3), NaN, y3u(5:6)], eps) 614s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 614s [y3u(1:3), NaN, y3u(5:6)], eps) 614s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 614s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 614s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 614s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 614s ***** error<gpcdf: function called with too few input arguments.> gpcdf () 614s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1) 614s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1, 2) 614s ***** error<gpcdf: function called with too few input arguments.> gpcdf (1, 2, 3) 614s ***** error<gpcdf: invalid argument for upper tail.> gpcdf (1, 2, 3, 4, "tail") 614s ***** error<gpcdf: invalid argument for upper tail.> gpcdf (1, 2, 3, 4, 5) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 614s gpcdf (ones (3), ones (2), ones(2), ones(2)) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 614s gpcdf (ones (2), ones (3), ones(2), ones(2)) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 614s gpcdf (ones (2), ones (2), ones(3), ones(2)) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must be of common size or scalars.> ... 614s gpcdf (ones (2), ones (2), ones(2), ones(3)) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (i, 2, 3, 4) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, i, 3, 4) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, 2, i, 4) 614s ***** error<gpcdf: X, K, SIGMA, and THETA must not be complex.> gpcdf (1, 2, 3, i) 614s 76 tests, 76 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/hnpdf.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hnpdf.m 614s ***** demo 614s ## Plot various PDFs from the half-normal distribution 614s x = 0:0.001:10; 614s y1 = hnpdf (x, 0, 1); 614s y2 = hnpdf (x, 0, 2); 614s y3 = hnpdf (x, 0, 3); 614s y4 = hnpdf (x, 0, 5); 614s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 614s grid on 614s xlim ([0, 10]) 614s ylim ([0, 0.9]) 614s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 614s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 614s title ("Half-normal PDF") 614s xlabel ("values in x") 614s ylabel ("density") 614s ***** demo 614s ## Plot half-normal against normal probability density function 614s x = -5:0.001:5; 614s y1 = hnpdf (x, 0, 1); 614s y2 = normpdf (x); 614s plot (x, y1, "-b", x, y2, "-g") 614s grid on 614s xlim ([-5, 5]) 614s ylim ([0, 0.9]) 614s legend ({"half-normal with μ = 0, σ = 1", ... 614s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 614s title ("Half-normal against standard normal PDF") 614s xlabel ("values in x") 614s ylabel ("density") 614s ***** shared x, y 614s x = [-Inf, -1, 0, 1/2, 1, Inf]; 614s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 614s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 614s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 614s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 614s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 614s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 614s ***** error<hnpdf: function called with too few input arguments.> hnpdf () 614s ***** error<hnpdf: function called with too few input arguments.> hnpdf (1) 614s ***** error<hnpdf: function called with too few input arguments.> hnpdf (1, 2) 614s ***** error<hnpdf: X, MU, and SIGMA must be of common size or scalars.> ... 614s hnpdf (1, ones (2), ones (3)) 614s ***** error<hnpdf: X, MU, and SIGMA must be of common size or scalars.> ... 614s hnpdf (ones (2), 1, ones (3)) 614s ***** error<hnpdf: X, MU, and SIGMA must be of common size or scalars.> ... 614s hnpdf (ones (2), ones (3), 1) 614s ***** error<hnpdf: X, MU, and SIGMA must not be complex.> hnpdf (i, 2, 3) 614s ***** error<hnpdf: X, MU, and SIGMA must not be complex.> hnpdf (1, i, 3) 614s ***** error<hnpdf: X, MU, and SIGMA must not be complex.> hnpdf (1, 2, i) 614s 14 tests, 14 passed, 0 known failure, 0 skipped 614s [inst/dist_fun/ncx2rnd.m] 614s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncx2rnd.m 614s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 614s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 614s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 614s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 614s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 614s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 614s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 614s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 614s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 614s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 614s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 614s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 614s ***** assert (class (ncx2rnd (1, 1)), "double") 614s ***** assert (class (ncx2rnd (1, single (1))), "single") 614s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 614s ***** assert (class (ncx2rnd (single (1), 1)), "single") 614s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 614s ***** error<ncx2rnd: function called with too few input arguments.> ncx2rnd () 614s ***** error<ncx2rnd: function called with too few input arguments.> ncx2rnd (1) 614s ***** error<ncx2rnd: DF and LAMBDA must be of common size or scalars.> ... 614s ncx2rnd (ones (3), ones (2)) 614s ***** error<ncx2rnd: DF and LAMBDA must be of common size or scalars.> ... 614s ncx2rnd (ones (2), ones (3)) 615s ***** error<ncx2rnd: DF and LAMBDA must not be complex.> ncx2rnd (i, 2) 615s ***** error<ncx2rnd: DF and LAMBDA must not be complex.> ncx2rnd (1, i) 615s ***** error<ncx2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s ncx2rnd (1, 2, -1) 615s ***** error<ncx2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s ncx2rnd (1, 2, 1.2) 615s ***** error<ncx2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s ncx2rnd (1, 2, ones (2)) 615s ***** error<ncx2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s ncx2rnd (1, 2, [2 -1 2]) 615s ***** error<ncx2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s ncx2rnd (1, 2, [2 0 2.5]) 615s ***** error<ncx2rnd: dimensions must be non-negative integers.> ... 615s ncx2rnd (1, 2, 2, -1, 5) 615s ***** error<ncx2rnd: dimensions must be non-negative integers.> ... 615s ncx2rnd (1, 2, 2, 1.5, 5) 615s ***** error<ncx2rnd: DF and LAMBDA must be scalars or of size SZ.> ... 615s ncx2rnd (2, ones (2), 3) 615s ***** error<ncx2rnd: DF and LAMBDA must be scalars or of size SZ.> ... 615s ncx2rnd (2, ones (2), [3, 2]) 615s ***** error<ncx2rnd: DF and LAMBDA must be scalars or of size SZ.> ... 615s ncx2rnd (2, ones (2), 3, 2) 615s 33 tests, 33 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/tlsrnd.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tlsrnd.m 615s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 615s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 615s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 615s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 615s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 615s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 615s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 615s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 615s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 615s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 615s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 615s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 615s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 615s ***** assert (class (tlsrnd (1, 2, 3)), "double") 615s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 615s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 615s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 615s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 615s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 615s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 615s ***** error<tlsrnd: function called with too few input arguments.> tlsrnd () 615s ***** error<tlsrnd: function called with too few input arguments.> tlsrnd (1) 615s ***** error<tlsrnd: function called with too few input arguments.> tlsrnd (1, 2) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlsrnd (ones (3), ones (2), 1) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlsrnd (ones (2), 1, ones (3)) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlsrnd (1, ones (2), ones (3)) 615s ***** error<tlsrnd: MU, SIGMA, and NU must not be complex.> tlsrnd (i, 2, 3) 615s ***** error<tlsrnd: MU, SIGMA, and NU must not be complex.> tlsrnd (1, i, 3) 615s ***** error<tlsrnd: MU, SIGMA, and NU must not be complex.> tlsrnd (1, 2, i) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (1, 2, 3, -1) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (1, 2, 3, 1.2) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (1, 2, 3, ones (2)) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (1, 2, 3, [2 -1 2]) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (1, 2, 3, [2 0 2.5]) 615s ***** error<tlsrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s tlsrnd (ones (2), 2, 3, ones (2)) 615s ***** error<tlsrnd: dimensions must be non-negative integers.> ... 615s tlsrnd (1, 2, 3, 2, -1, 5) 615s ***** error<tlsrnd: dimensions must be non-negative integers.> ... 615s tlsrnd (1, 2, 3, 2, 1.5, 5) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be scalar or of size SZ.> ... 615s tlsrnd (ones (2,2), 2, 3, 3) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be scalar or of size SZ.> ... 615s tlsrnd (1, ones (2,2), 3, 3) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be scalar or of size SZ.> ... 615s tlsrnd (1, 2, ones (2,2), 3) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be scalar or of size SZ.> ... 615s tlsrnd (1, 2, ones (2,2), [3, 3]) 615s ***** error<tlsrnd: MU, SIGMA, and NU must be scalar or of size SZ.> ... 615s tlsrnd (1, 2, ones (2,2), 2, 3) 615s 42 tests, 42 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/chi2pdf.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/chi2pdf.m 615s ***** demo 615s ## Plot various PDFs from the chi-squared distribution 615s x = 0:0.01:8; 615s y1 = chi2pdf (x, 1); 615s y2 = chi2pdf (x, 2); 615s y3 = chi2pdf (x, 3); 615s y4 = chi2pdf (x, 4); 615s y5 = chi2pdf (x, 6); 615s y6 = chi2pdf (x, 9); 615s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 615s x, y4, "-c", x, y5, "-m", x, y6, "-y") 615s grid on 615s xlim ([0, 8]) 615s ylim ([0, 0.5]) 615s legend ({"df = 1", "df = 2", "df = 3", ... 615s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 615s title ("Chi-squared PDF") 615s xlabel ("values in x") 615s ylabel ("density") 615s ***** shared x, y 615s x = [-1 0 0.5 1 Inf]; 615s y = [0, 1/2 * exp(-x(2:5)/2)]; 615s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 615s ***** assert (chi2pdf (x, 2), y) 615s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 615s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 615s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 615s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 615s ***** error<chi2pdf: function called with too few input arguments.> chi2pdf () 615s ***** error<chi2pdf: function called with too few input arguments.> chi2pdf (1) 615s ***** error<chi2pdf: function called with too many inputs> chi2pdf (1,2,3) 615s ***** error<chi2pdf: X and DF must be of common size or scalars.> ... 615s chi2pdf (ones (3), ones (2)) 615s ***** error<chi2pdf: X and DF must be of common size or scalars.> ... 615s chi2pdf (ones (2), ones (3)) 615s ***** error<chi2pdf: X and DF must not be complex.> chi2pdf (i, 2) 615s ***** error<chi2pdf: X and DF must not be complex.> chi2pdf (2, i) 615s 13 tests, 13 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/lognpdf.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/lognpdf.m 615s ***** demo 615s ## Plot various PDFs from the log-normal distribution 615s x = 0:0.01:5; 615s y1 = lognpdf (x, 0, 1); 615s y2 = lognpdf (x, 0, 0.5); 615s y3 = lognpdf (x, 0, 0.25); 615s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 615s grid on 615s ylim ([0, 2]) 615s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 615s "location", "northeast") 615s title ("Log-normal PDF") 615s xlabel ("values in x") 615s ylabel ("density") 615s ***** shared x, y 615s x = [-1 0 e Inf]; 615s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 615s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 615s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 615s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 615s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 615s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 615s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 615s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 615s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 615s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 615s ***** error lognpdf () 615s ***** error lognpdf (1,2,3,4) 615s ***** error lognpdf (ones (3), ones (2), ones (2)) 615s ***** error lognpdf (ones (2), ones (3), ones (2)) 615s ***** error lognpdf (ones (2), ones (2), ones (3)) 615s ***** error lognpdf (i, 2, 2) 615s ***** error lognpdf (2, i, 2) 615s ***** error lognpdf (2, 2, i) 615s 17 tests, 17 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/trnd.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/trnd.m 615s ***** assert (size (trnd (2)), [1, 1]) 615s ***** assert (size (trnd (ones (2,1))), [2, 1]) 615s ***** assert (size (trnd (ones (2,2))), [2, 2]) 615s ***** assert (size (trnd (1, 3)), [3, 3]) 615s ***** assert (size (trnd (1, [4 1])), [4, 1]) 615s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 615s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 615s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 615s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 615s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 615s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 615s ***** assert (trnd (0, 1, 1), NaN) 615s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 615s ***** assert (class (trnd (2)), "double") 615s ***** assert (class (trnd (single (2))), "single") 615s ***** assert (class (trnd (single ([2 2]))), "single") 615s ***** error<trnd: function called with too few input arguments.> trnd () 615s ***** error<trnd: DF must not be complex.> trnd (i) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (1, -1) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (1, 1.2) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (1, ones (2)) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (1, [2 -1 2]) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (1, [2 0 2.5]) 615s ***** error<trnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s trnd (ones (2), ones (2)) 615s ***** error<trnd: dimensions must be non-negative integers.> ... 615s trnd (1, 2, -1, 5) 615s ***** error<trnd: dimensions must be non-negative integers.> ... 615s trnd (1, 2, 1.5, 5) 615s ***** error<trnd: DF must be scalar or of size SZ.> trnd (ones (2,2), 3) 615s ***** error<trnd: DF must be scalar or of size SZ.> trnd (ones (2,2), [3, 2]) 615s ***** error<trnd: DF must be scalar or of size SZ.> trnd (ones (2,2), 2, 3) 615s 29 tests, 29 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/hygernd.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hygernd.m 615s ***** assert (size (hygernd (4,2,2)), [1, 1]) 615s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 615s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 615s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 615s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 615s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 615s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 615s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 615s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 615s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 615s ***** assert (class (hygernd (4,2,2)), "double") 615s ***** assert (class (hygernd (single (4),2,2)), "single") 615s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 615s ***** assert (class (hygernd (4,single (2),2)), "single") 615s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 615s ***** assert (class (hygernd (4,2,single (2))), "single") 615s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 615s ***** error<hygernd: function called with too few input arguments.> hygernd () 615s ***** error<hygernd: function called with too few input arguments.> hygernd (1) 615s ***** error<hygernd: function called with too few input arguments.> hygernd (1, 2) 615s ***** error<hygernd: T, M, and N must be of common size or scalars.> ... 615s hygernd (ones (3), ones (2), ones (2)) 615s ***** error<hygernd: T, M, and N must be of common size or scalars.> ... 615s hygernd (ones (2), ones (3), ones (2)) 615s ***** error<hygernd: T, M, and N must be of common size or scalars.> ... 615s hygernd (ones (2), ones (2), ones (3)) 615s ***** error<hygernd: T, M, and N must not be complex.> hygernd (i, 2, 3) 615s ***** error<hygernd: T, M, and N must not be complex.> hygernd (1, i, 3) 615s ***** error<hygernd: T, M, and N must not be complex.> hygernd (1, 2, i) 615s ***** error<hygernd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s hygernd (1, 2, 3, -1) 615s ***** error<hygernd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s hygernd (1, 2, 3, 1.2) 615s ***** error<hygernd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s hygernd (1, 2, 3, ones (2)) 615s ***** error<hygernd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s hygernd (1, 2, 3, [2 -1 2]) 615s ***** error<hygernd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s hygernd (1, 2, 3, [2 0 2.5]) 615s ***** error<hygernd: dimensions must be non-negative integers.> ... 615s hygernd (1, 2, 3, 2, -1, 5) 615s ***** error<hygernd: dimensions must be non-negative integers.> ... 615s hygernd (1, 2, 3, 2, 1.5, 5) 615s ***** error<hygernd: T, M, and N must be scalars or of size SZ.> ... 615s hygernd (2, ones (2), 2, 3) 615s ***** error<hygernd: T, M, and N must be scalars or of size SZ.> ... 615s hygernd (2, ones (2), 2, [3, 2]) 615s ***** error<hygernd: T, M, and N must be scalars or of size SZ.> ... 615s hygernd (2, ones (2), 2, 3, 2) 615s 36 tests, 36 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/ncx2cdf.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncx2cdf.m 615s ***** demo 615s ## Plot various CDFs from the noncentral chi-squared distribution 615s x = 0:0.1:10; 615s p1 = ncx2cdf (x, 2, 1); 615s p2 = ncx2cdf (x, 2, 2); 615s p3 = ncx2cdf (x, 2, 3); 615s p4 = ncx2cdf (x, 4, 1); 615s p5 = ncx2cdf (x, 4, 2); 615s p6 = ncx2cdf (x, 4, 3); 615s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 615s x, p4, "-m", x, p5, "-c", x, p6, "-y") 615s grid on 615s xlim ([0, 10]) 615s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 615s "df = 2, λ = 3", "df = 4, λ = 1", ... 615s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 615s title ("Noncentral chi-squared CDF") 615s xlabel ("values in x") 615s ylabel ("probability") 615s ***** demo 615s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 615s ## chi-squared CDF with the same number of degrees of freedom (4). 615s 615s x = 0:0.1:10; 615s p1 = ncx2cdf (x, 4, 2); 615s p2 = chi2cdf (x, 4); 615s plot (x, p1, "-", x, p2, "-") 615s grid on 615s xlim ([0, 10]) 615s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 615s title ("Noncentral chi-squared vs chi-squared CDFs") 615s xlabel ("values in x") 615s ylabel ("probability") 615s ***** test 615s x = -2:0.1:2; 615s p = ncx2cdf (x, 10, 1); 615s assert (p([1:21]), zeros (1, 21), 3e-84); 615s assert (p(22), 1.521400636466575e-09, 1e-14); 615s assert (p(30), 6.665480510026046e-05, 1e-14); 615s assert (p(41), 0.002406447308399836, 1e-14); 615s ***** test 615s p = ncx2cdf (12, 10, 3); 615s assert (p, 0.4845555602398649, 1e-14); 615s ***** test 615s p = ncx2cdf (2, 3, 2); 615s assert (p, 0.2207330870741212, 1e-14); 615s ***** test 615s p = ncx2cdf (2, 3, 2, "upper"); 615s assert (p, 0.7792669129258789, 1e-14); 615s ***** test 615s p = ncx2cdf ([3, 6], 3, 2, "upper"); 615s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 615s ***** error<ncx2cdf: function called with too few input arguments.> ncx2cdf () 615s ***** error<ncx2cdf: function called with too few input arguments.> ncx2cdf (1) 615s ***** error<ncx2cdf: function called with too few input arguments.> ncx2cdf (1, 2) 615s ***** error<ncx2cdf: invalid argument for upper tail.> ncx2cdf (1, 2, 3, "tail") 615s ***** error<ncx2cdf: invalid argument for upper tail.> ncx2cdf (1, 2, 3, 4) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must be of common size or scalars.> ... 615s ncx2cdf (ones (3), ones (2), ones (2)) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must be of common size or scalars.> ... 615s ncx2cdf (ones (2), ones (3), ones (2)) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must be of common size or scalars.> ... 615s ncx2cdf (ones (2), ones (2), ones (3)) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must not be complex.> ncx2cdf (i, 2, 2) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must not be complex.> ncx2cdf (2, i, 2) 615s ***** error<ncx2cdf: X, DF, and LAMBDA must not be complex.> ncx2cdf (2, 2, i) 615s 16 tests, 16 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/normrnd.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/normrnd.m 615s ***** assert (size (normrnd (1, 1)), [1 1]) 615s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 615s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 615s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 615s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 615s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 615s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 615s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 615s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 615s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 615s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 615s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 615s ***** assert (class (normrnd (1, 1)), "double") 615s ***** assert (class (normrnd (1, single (1))), "single") 615s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 615s ***** assert (class (normrnd (single (1), 1)), "single") 615s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 615s ***** error<normrnd: function called with too few input arguments.> normrnd () 615s ***** error<normrnd: function called with too few input arguments.> normrnd (1) 615s ***** error<normrnd: MU and SIGMA must be of common size or scalars.> ... 615s normrnd (ones (3), ones (2)) 615s ***** error<normrnd: MU and SIGMA must be of common size or scalars.> ... 615s normrnd (ones (2), ones (3)) 615s ***** error<normrnd: MU and SIGMA must not be complex.> normrnd (i, 2, 3) 615s ***** error<normrnd: MU and SIGMA must not be complex.> normrnd (1, i, 3) 615s ***** error<normrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s normrnd (1, 2, -1) 615s ***** error<normrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s normrnd (1, 2, 1.2) 615s ***** error<normrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s normrnd (1, 2, ones (2)) 615s ***** error<normrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s normrnd (1, 2, [2 -1 2]) 615s ***** error<normrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 615s normrnd (1, 2, [2 0 2.5]) 615s ***** error<normrnd: dimensions must be non-negative integers.> ... 615s normrnd (1, 2, 2, -1, 5) 615s ***** error<normrnd: dimensions must be non-negative integers.> ... 615s normrnd (1, 2, 2, 1.5, 5) 615s ***** error<normrnd: MU and SIGMA must be scalars or of size SZ.> ... 615s normrnd (2, ones (2), 3) 615s ***** error<normrnd: MU and SIGMA must be scalars or of size SZ.> ... 615s normrnd (2, ones (2), [3, 2]) 615s ***** error<normrnd: MU and SIGMA must be scalars or of size SZ.> ... 615s normrnd (2, ones (2), 3, 2) 615s 33 tests, 33 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/tlscdf.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tlscdf.m 615s ***** demo 615s ## Plot various CDFs from the location-scale Student's T distribution 615s x = -8:0.01:8; 615s p1 = tlscdf (x, 0, 1, 1); 615s p2 = tlscdf (x, 0, 2, 2); 615s p3 = tlscdf (x, 3, 2, 5); 615s p4 = tlscdf (x, -1, 3, Inf); 615s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 615s grid on 615s xlim ([-8, 8]) 615s ylim ([0, 1]) 615s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 615s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 615s "location", "northwest") 615s title ("Location-scale Student's T CDF") 615s xlabel ("values in x") 615s ylabel ("probability") 615s ***** shared x,y 615s x = [-Inf 0 1 Inf]; 615s y = [0 1/2 3/4 1]; 615s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 615s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 615s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 615s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 615s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 615s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 615s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 615s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 615s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 615s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 615s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 615s ***** error<tlscdf: function called with too few input arguments.> tlscdf () 615s ***** error<tlscdf: function called with too few input arguments.> tlscdf (1) 615s ***** error<tlscdf: function called with too few input arguments.> tlscdf (1, 2) 615s ***** error<tlscdf: function called with too few input arguments.> tlscdf (1, 2, 3) 615s ***** error<tlscdf: invalid argument for upper tail.> tlscdf (1, 2, 3, 4, "uper") 615s ***** error<tlscdf: invalid argument for upper tail.> tlscdf (1, 2, 3, 4, 5) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), ones (2), 1, 1) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), 1, ones (2), 1) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), 1, 1, ones (2)) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), ones (2), 1, 1, "upper") 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), 1, ones (2), 1, "upper") 615s ***** error<tlscdf: X, MU, SIGMA, and NU must be of common size or scalars.> ... 615s tlscdf (ones (3), 1, 1, ones (2), "upper") 615s ***** error<tlscdf: X, MU, SIGMA, and NU must not be complex.> tlscdf (i, 2, 1, 1) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must not be complex.> tlscdf (2, i, 1, 1) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must not be complex.> tlscdf (2, 1, i, 1) 615s ***** error<tlscdf: X, MU, SIGMA, and NU must not be complex.> tlscdf (2, 1, 1, i) 615s 27 tests, 27 passed, 0 known failure, 0 skipped 615s [inst/dist_fun/bisarnd.m] 615s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bisarnd.m 615s ***** assert (size (bisarnd (1, 1)), [1 1]) 615s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 615s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 615s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 615s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 615s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 615s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 615s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 615s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 615s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 615s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 615s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 615s ***** assert (class (bisarnd (1, 1)), "double") 615s ***** assert (class (bisarnd (1, single (1))), "single") 615s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 615s ***** assert (class (bisarnd (single (1), 1)), "single") 615s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 615s ***** error<bisarnd: function called with too few input arguments.> bisarnd () 615s ***** error<bisarnd: function called with too few input arguments.> bisarnd (1) 615s ***** error<bisarnd: BETA and GAMMA must be of common size or scalars.> ... 615s bisarnd (ones (3), ones (2)) 615s ***** error<bisarnd: BETA and GAMMA must be of common size or scalars.> ... 615s bisarnd (ones (2), ones (3)) 615s ***** error<bisarnd: BETA and GAMMA must not be complex.> bisarnd (i, 2, 3) 616s ***** error<bisarnd: BETA and GAMMA must not be complex.> bisarnd (1, i, 3) 616s ***** error<bisarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s bisarnd (1, 2, -1) 616s ***** error<bisarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s bisarnd (1, 2, 1.2) 616s ***** error<bisarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s bisarnd (1, 2, ones (2)) 616s ***** error<bisarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s bisarnd (1, 2, [2 -1 2]) 616s ***** error<bisarnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s bisarnd (1, 2, [2 0 2.5]) 616s ***** error<bisarnd: dimensions must be non-negative integers.> ... 616s bisarnd (1, 2, 2, -1, 5) 616s ***** error<bisarnd: dimensions must be non-negative integers.> ... 616s bisarnd (1, 2, 2, 1.5, 5) 616s ***** error<bisarnd: BETA and GAMMA must be scalars or of size SZ.> ... 616s bisarnd (2, ones (2), 3) 616s ***** error<bisarnd: BETA and GAMMA must be scalars or of size SZ.> ... 616s bisarnd (2, ones (2), [3, 2]) 616s ***** error<bisarnd: BETA and GAMMA must be scalars or of size SZ.> ... 616s bisarnd (2, ones (2), 3, 2) 616s 33 tests, 33 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/gevcdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gevcdf.m 616s ***** demo 616s ## Plot various CDFs from the generalized extreme value distribution 616s x = -1:0.001:10; 616s p1 = gevcdf (x, 1, 1, 1); 616s p2 = gevcdf (x, 0.5, 1, 1); 616s p3 = gevcdf (x, 1, 1, 5); 616s p4 = gevcdf (x, 1, 2, 5); 616s p5 = gevcdf (x, 1, 5, 5); 616s p6 = gevcdf (x, 1, 0.5, 5); 616s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 616s x, p4, "-c", x, p5, "-m", x, p6, "-k") 616s grid on 616s xlim ([-1, 10]) 616s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 616s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 616s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 616s "location", "southeast") 616s title ("Generalized extreme value CDF") 616s xlabel ("values in x") 616s ylabel ("probability") 616s ***** test 616s x = 0:0.5:2.5; 616s sigma = 1:6; 616s k = 1; 616s mu = 0; 616s p = gevcdf (x, k, sigma, mu); 616s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 616s assert (p, expected_p, 0.001); 616s ***** test 616s x = -0.5:0.5:2.5; 616s sigma = 0.5; 616s k = 1; 616s mu = 0; 616s p = gevcdf (x, k, sigma, mu); 616s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 616s assert (p, expected_p, 0.001); 616s ***** test # check for continuity for k near 0 616s x = 1; 616s sigma = 0.5; 616s k = -0.03:0.01:0.03; 616s mu = 0; 616s p = gevcdf (x, k, sigma, mu); 616s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 616s assert (p, expected_p, 0.001); 616s ***** error<gevcdf: function called with too few input arguments.> gevcdf () 616s ***** error<gevcdf: function called with too few input arguments.> gevcdf (1) 616s ***** error<gevcdf: function called with too few input arguments.> gevcdf (1, 2) 616s ***** error<gevcdf: function called with too few input arguments.> gevcdf (1, 2, 3) 616s ***** error<gevcdf: function called with too many inputs> ... 616s gevcdf (1, 2, 3, 4, 5, 6) 616s ***** error<gevcdf: invalid argument for upper tail.> gevcdf (1, 2, 3, 4, "tail") 616s ***** error<gevcdf: invalid argument for upper tail.> gevcdf (1, 2, 3, 4, 5) 616s ***** error<gevcdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 616s gevcdf (ones (3), ones (2), ones(2), ones(2)) 616s ***** error<gevcdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 616s gevcdf (ones (2), ones (3), ones(2), ones(2)) 616s ***** error<gevcdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 616s gevcdf (ones (2), ones (2), ones(3), ones(2)) 616s ***** error<gevcdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 616s gevcdf (ones (2), ones (2), ones(2), ones(3)) 616s ***** error<gevcdf: X, K, SIGMA, and MU must not be complex.> gevcdf (i, 2, 3, 4) 616s ***** error<gevcdf: X, K, SIGMA, and MU must not be complex.> gevcdf (1, i, 3, 4) 616s ***** error<gevcdf: X, K, SIGMA, and MU must not be complex.> gevcdf (1, 2, i, 4) 616s ***** error<gevcdf: X, K, SIGMA, and MU must not be complex.> gevcdf (1, 2, 3, i) 616s 18 tests, 18 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/tinv.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tinv.m 616s ***** demo 616s ## Plot various iCDFs from the Student's T distribution 616s p = 0.001:0.001:0.999; 616s x1 = tinv (p, 1); 616s x2 = tinv (p, 2); 616s x3 = tinv (p, 5); 616s x4 = tinv (p, Inf); 616s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 616s grid on 616s xlim ([0, 1]) 616s ylim ([-5, 5]) 616s legend ({"df = 1", "df = 2", ... 616s "df = 5", 'df = \infty'}, "location", "northwest") 616s title ("Student's T iCDF") 616s xlabel ("probability") 616s ylabel ("values in x") 616s ***** shared p 616s p = [-1 0 0.5 1 2]; 616s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 616s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 616s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 616s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 616s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 616s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 616s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 616s ***** error<tinv: function called with too few input arguments.> tinv () 616s ***** error<tinv: function called with too few input arguments.> tinv (1) 616s ***** error<tinv: P and DF must be of common size or scalars.> ... 616s tinv (ones (3), ones (2)) 616s ***** error<tinv: P and DF must be of common size or scalars.> ... 616s tinv (ones (2), ones (3)) 616s ***** error<tinv: P and DF must not be complex.> tinv (i, 2) 616s ***** error<tinv: P and DF must not be complex.> tinv (2, i) 616s 13 tests, 13 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/copulacdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/copulacdf.m 616s ***** test 616s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 616s theta = [1; 2]; 616s p = copulacdf ("Clayton", x, theta); 616s expected_p = [0.1395; 0.1767]; 616s assert (p, expected_p, 0.001); 616s ***** test 616s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 616s p = copulacdf ("Gumbel", x, 2); 616s expected_p = [0.1464; 0.1464]; 616s assert (p, expected_p, 0.001); 616s ***** test 616s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 616s theta = [1; 2]; 616s p = copulacdf ("Frank", x, theta); 616s expected_p = [0.0699; 0.0930]; 616s assert (p, expected_p, 0.001); 616s ***** test 616s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 616s theta = [0.3; 0.7]; 616s p = copulacdf ("AMH", x, theta); 616s expected_p = [0.0629; 0.0959]; 616s assert (p, expected_p, 0.001); 616s ***** test 616s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 616s theta = [0.2, 0.1, 0.1, 0.05]; 616s p = copulacdf ("FGM", x, theta); 616s expected_p = [0.0558; 0.0293]; 616s assert (p, expected_p, 0.001); 616s 5 tests, 5 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/trirnd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/trirnd.m 616s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 616s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 616s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 616s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 616s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 616s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 616s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 616s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 616s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 616s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 616s ***** assert (class (trirnd (1, 1.5, 2)), "double") 616s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 616s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 616s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 616s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 616s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 616s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 616s ***** error<trirnd: function called with too few input arguments.> trirnd () 616s ***** error<trirnd: function called with too few input arguments.> trirnd (1) 616s ***** error<trirnd: function called with too few input arguments.> trirnd (1, 2) 616s ***** error<trirnd: A, B, and C must be of common size or scalars.> ... 616s trirnd (ones (3), 5 * ones (2), ones (2)) 616s ***** error<trirnd: A, B, and C must be of common size or scalars.> ... 616s trirnd (ones (2), 5 * ones (3), ones (2)) 616s ***** error<trirnd: A, B, and C must be of common size or scalars.> ... 616s trirnd (ones (2), 5 * ones (2), ones (3)) 616s ***** error<trirnd: A, B, and C must not be complex.> trirnd (i, 5, 3) 616s ***** error<trirnd: A, B, and C must not be complex.> trirnd (1, 5+i, 3) 616s ***** error<trirnd: A, B, and C must not be complex.> trirnd (1, 5, i) 616s ***** error<trirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s trirnd (1, 5, 3, -1) 616s ***** error<trirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s trirnd (1, 5, 3, 1.2) 616s ***** error<trirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s trirnd (1, 5, 3, ones (2)) 616s ***** error<trirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s trirnd (1, 5, 3, [2 -1 2]) 616s ***** error<trirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s trirnd (1, 5, 3, [2 0 2.5]) 616s ***** error<trirnd: dimensions must be non-negative integers.> ... 616s trirnd (1, 5, 3, 2, -1, 5) 616s ***** error<trirnd: dimensions must be non-negative integers.> ... 616s trirnd (1, 5, 3, 2, 1.5, 5) 616s ***** error<trirnd: A, B, and C must be scalar or of size SZ.> ... 616s trirnd (2, 5 * ones (2), 2, 3) 616s ***** error<trirnd: A, B, and C must be scalar or of size SZ.> ... 616s trirnd (2, 5 * ones (2), 2, [3, 2]) 616s ***** error<trirnd: A, B, and C must be scalar or of size SZ.> ... 616s trirnd (2, 5 * ones (2), 2, 3, 2) 616s 36 tests, 36 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/wblrnd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wblrnd.m 616s ***** assert (size (wblrnd (1, 1)), [1 1]) 616s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 616s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 616s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 616s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 616s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 616s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 616s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 616s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 616s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 616s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 616s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 616s ***** assert (class (wblrnd (1, 1)), "double") 616s ***** assert (class (wblrnd (1, single (1))), "single") 616s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 616s ***** assert (class (wblrnd (single (1), 1)), "single") 616s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 616s ***** error<wblrnd: function called with too few input arguments.> wblrnd () 616s ***** error<wblrnd: function called with too few input arguments.> wblrnd (1) 616s ***** error<wblrnd: LAMBDA and K must be of common size or scalars.> ... 616s wblrnd (ones (3), ones (2)) 616s ***** error<wblrnd: LAMBDA and K must be of common size or scalars.> ... 616s wblrnd (ones (2), ones (3)) 616s ***** error<wblrnd: LAMBDA and K must not be complex.> wblrnd (i, 2, 3) 616s ***** error<wblrnd: LAMBDA and K must not be complex.> wblrnd (1, i, 3) 616s ***** error<wblrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s wblrnd (1, 2, -1) 616s ***** error<wblrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s wblrnd (1, 2, 1.2) 616s ***** error<wblrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s wblrnd (1, 2, ones (2)) 616s ***** error<wblrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s wblrnd (1, 2, [2 -1 2]) 616s ***** error<wblrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s wblrnd (1, 2, [2 0 2.5]) 616s ***** error<wblrnd: dimensions must be non-negative integers.> ... 616s wblrnd (1, 2, 2, -1, 5) 616s ***** error<wblrnd: dimensions must be non-negative integers.> ... 616s wblrnd (1, 2, 2, 1.5, 5) 616s ***** error<wblrnd: LAMBDA and K must be scalar or of size SZ.> ... 616s wblrnd (2, ones (2), 3) 616s ***** error<wblrnd: LAMBDA and K must be scalar or of size SZ.> ... 616s wblrnd (2, ones (2), [3, 2]) 616s ***** error<wblrnd: LAMBDA and K must be scalar or of size SZ.> ... 616s wblrnd (2, ones (2), 3, 2) 616s 33 tests, 33 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/plrnd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/plrnd.m 616s ***** shared x, Fx 616s x = [0, 1, 3, 4, 7, 10]; 616s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 616s ***** assert (size (plrnd (x, Fx)), [1, 1]) 616s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 616s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 616s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 616s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 616s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 616s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 616s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 616s ***** assert (class (plrnd (x, Fx)), "double") 616s ***** assert (class (plrnd (x, single (Fx))), "single") 616s ***** assert (class (plrnd (single (x), Fx)), "single") 616s ***** error<plrnd: function called with too few input arguments.> plrnd () 616s ***** error<plrnd: function called with too few input arguments.> plrnd (1) 616s ***** error<plrnd: X and FX must be vectors of equal size.> ... 616s plrnd ([0, 1, 2], [0, 1]) 616s ***** error<plrnd: X and FX must be at least two-elements long.> ... 616s plrnd ([0], [1]) 616s ***** error<plrnd: FX must be bounded in the range> ... 616s plrnd ([0, 1, 2], [0, 1, 1.5]) 616s ***** error<plrnd: FX must be bounded in the range> ... 616s plrnd ([0, 1, 2], [0, i, 1]) 616s ***** error<plrnd: X and FX must not be complex.> ... 616s plrnd ([0, i, 2], [0, 0.5, 1]) 616s ***** error<plrnd: X and FX must not be complex.> ... 616s plrnd ([0, i, 2], [0, 0.5i, 1]) 616s ***** error<plrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s plrnd (x, Fx, -1) 616s ***** error<plrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s plrnd (x, Fx, 1.2) 616s ***** error<plrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s plrnd (x, Fx, ones (2)) 616s ***** error<plrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s plrnd (x, Fx, [2 -1 2]) 616s ***** error<plrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s plrnd (x, Fx, [2 0 2.5]) 616s ***** error<plrnd: dimensions must be non-negative integers.> ... 616s plrnd (x, Fx, 2, -1, 5) 616s ***** error<plrnd: dimensions must be non-negative integers.> ... 616s plrnd (x, Fx, 2, 1.5, 5) 616s 26 tests, 26 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/laplacepdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/laplacepdf.m 616s ***** demo 616s ## Plot various PDFs from the Laplace distribution 616s x = -10:0.01:10; 616s y1 = laplacepdf (x, 0, 1); 616s y2 = laplacepdf (x, 0, 2); 616s y3 = laplacepdf (x, 0, 4); 616s y4 = laplacepdf (x, -5, 4); 616s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 616s grid on 616s xlim ([-10, 10]) 616s ylim ([0, 0.6]) 616s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 616s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 616s title ("Laplace PDF") 616s xlabel ("values in x") 616s ylabel ("density") 616s ***** shared x, y 616s x = [-Inf -log(2) 0 log(2) Inf]; 616s y = [0, 1/4, 1/2, 1/4, 0]; 616s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 616s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 616s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 616s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 616s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 616s ***** error<laplacepdf: function called with too few input arguments.> laplacepdf () 616s ***** error<laplacepdf: function called with too few input arguments.> laplacepdf (1) 616s ***** error<laplacepdf: function called with too few input arguments.> ... 616s laplacepdf (1, 2) 616s ***** error<laplacepdf: function called with too many inputs> laplacepdf (1, 2, 3, 4) 616s ***** error<laplacepdf: X, MU, and BETA must be of common size or scalars.> ... 616s laplacepdf (1, ones (2), ones (3)) 616s ***** error<laplacepdf: X, MU, and BETA must be of common size or scalars.> ... 616s laplacepdf (ones (2), 1, ones (3)) 616s ***** error<laplacepdf: X, MU, and BETA must be of common size or scalars.> ... 616s laplacepdf (ones (2), ones (3), 1) 616s ***** error<laplacepdf: X, MU, and BETA must not be complex.> laplacepdf (i, 2, 3) 616s ***** error<laplacepdf: X, MU, and BETA must not be complex.> laplacepdf (1, i, 3) 616s ***** error<laplacepdf: X, MU, and BETA must not be complex.> laplacepdf (1, 2, i) 616s 15 tests, 15 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/mvncdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvncdf.m 616s ***** demo 616s mu = [1, -1]; 616s Sigma = [0.9, 0.4; 0.4, 0.3]; 616s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 616s X = [X1(:), X2(:)]; 616s p = mvncdf (X, mu, Sigma); 616s Z = reshape (p, 25, 25); 616s surf (X1, X2, Z); 616s title ("Bivariate Normal Distribution"); 616s ylabel "X1" 616s xlabel "X2" 616s ***** demo 616s mu = [0, 0]; 616s Sigma = [0.25, 0.3; 0.3, 1]; 616s p = mvncdf ([0 0], [1 1], mu, Sigma); 616s x1 = -3:.2:3; 616s x2 = -3:.2:3; 616s [X1, X2] = meshgrid (x1, x2); 616s X = [X1(:), X2(:)]; 616s p = mvnpdf (X, mu, Sigma); 616s p = reshape (p, length (x2), length (x1)); 616s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 616s xlabel ("x"); 616s ylabel ("p"); 616s title ("Probability over Rectangular Region"); 616s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 616s ***** test 616s fD = (-2:2)'; 616s X = repmat (fD, 1, 4); 616s p = mvncdf (X); 616s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 616s ***** test 616s mu = [1, -1]; 616s Sigma = [0.9, 0.4; 0.4, 0.3]; 616s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 616s X = [X1(:), X2(:)]; 616s p = mvncdf (X, mu, Sigma); 616s p_out = [0.00011878988774500, 0.00034404112322371, ... 616s 0.00087682502191813, 0.00195221905058185, ... 616s 0.00378235566873474, 0.00638175749734415, ... 616s 0.00943764224329656, 0.01239164888125426, ... 616s 0.01472750274376648, 0.01623228313374828]'; 616s assert (p([1:10]), p_out, 1e-16); 616s ***** test 616s mu = [1, -1]; 616s Sigma = [0.9, 0.4; 0.4, 0.3]; 616s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 616s X = [X1(:), X2(:)]; 616s p = mvncdf (X, mu, Sigma); 616s p_out = [0.8180695783608276, 0.8854485749482751, ... 616s 0.9308108777385832, 0.9579855743025508, ... 616s 0.9722897881414742, 0.9788150170059926, ... 616s 0.9813597788804785, 0.9821977956568989, ... 616s 0.9824283794464095, 0.9824809345614861]'; 616s assert (p([616:625]), p_out, 3e-16); 616s ***** test 616s mu = [0, 0]; 616s Sigma = [0.25, 0.3; 0.3, 1]; 616s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 616s assert (p, 0.2097424404755626, 1e-16); 616s assert (err, 1e-08); 616s ***** test 616s x = [1 2]; 616s mu = [0.5 1.5]; 616s sigma = [1.0, 0.5; 0.5, 1.0]; 616s p = mvncdf (x, mu, sigma); 616s assert (p, 0.546244443857090, 1e-15); 616s ***** test 616s x = [1 2]; 616s mu = [0.5 1.5]; 616s sigma = [1.0, 0.5; 0.5, 1.0]; 616s a = [-inf 0]; 616s p = mvncdf (a, x, mu, sigma); 616s assert (p, 0.482672935215631, 1e-15); 616s ***** error p = mvncdf (randn (25,26), [], eye (26)); 616s ***** error p = mvncdf (randn (25,8), [], eye (9)); 616s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 616s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 616s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 616s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 616s 12 tests, 12 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/raylpdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/raylpdf.m 616s ***** demo 616s ## Plot various PDFs from the Rayleigh distribution 616s x = 0:0.01:10; 616s y1 = raylpdf (x, 0.5); 616s y2 = raylpdf (x, 1); 616s y3 = raylpdf (x, 2); 616s y4 = raylpdf (x, 3); 616s y5 = raylpdf (x, 4); 616s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 616s grid on 616s ylim ([0, 1.25]) 616s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 616s "σ = 3", "σ = 4"}, "location", "northeast") 616s title ("Rayleigh PDF") 616s xlabel ("values in x") 616s ylabel ("density") 616s ***** test 616s x = 0:0.5:2.5; 616s sigma = 1:6; 616s y = raylpdf (x, sigma); 616s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 616s assert (y, expected_y, 0.001); 616s ***** test 616s x = 0:0.5:2.5; 616s y = raylpdf (x, 0.5); 616s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 616s assert (y, expected_y, 0.001); 616s ***** error<raylpdf: function called with too few input arguments.> raylpdf () 616s ***** error<raylpdf: function called with too few input arguments.> raylpdf (1) 616s ***** error<raylpdf: X and SIGMA must be of common size or scalars.> ... 616s raylpdf (ones (3), ones (2)) 616s ***** error<raylpdf: X and SIGMA must be of common size or scalars.> ... 616s raylpdf (ones (2), ones (3)) 616s ***** error<raylpdf: X and SIGMA must not be complex.> raylpdf (i, 2) 616s ***** error<raylpdf: X and SIGMA must not be complex.> raylpdf (2, i) 616s 8 tests, 8 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/nbinrnd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nbinrnd.m 616s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 616s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 616s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 616s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 616s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 616s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 616s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 616s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 616s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 616s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 616s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 616s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 616s ***** assert (class (nbinrnd (1, 0.5)), "double") 616s ***** assert (class (nbinrnd (1, single (0.5))), "single") 616s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 616s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 616s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 616s ***** error<nbinrnd: function called with too few input arguments.> nbinrnd () 616s ***** error<nbinrnd: function called with too few input arguments.> nbinrnd (1) 616s ***** error<nbinrnd: R and PS must be of common size or scalars.> ... 616s nbinrnd (ones (3), ones (2)) 616s ***** error<nbinrnd: R and PS must be of common size or scalars.> ... 616s nbinrnd (ones (2), ones (3)) 616s ***** error<nbinrnd: R and PS must not be complex.> nbinrnd (i, 2, 3) 616s ***** error<nbinrnd: R and PS must not be complex.> nbinrnd (1, i, 3) 616s ***** error<nbinrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s nbinrnd (1, 2, -1) 616s ***** error<nbinrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s nbinrnd (1, 2, 1.2) 616s ***** error<nbinrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s nbinrnd (1, 2, ones (2)) 616s ***** error<nbinrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s nbinrnd (1, 2, [2 -1 2]) 616s ***** error<nbinrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s nbinrnd (1, 2, [2 0 2.5]) 616s ***** error<nbinrnd: dimensions must be non-negative integers.> ... 616s nbinrnd (1, 2, 2, -1, 5) 616s ***** error<nbinrnd: dimensions must be non-negative integers.> ... 616s nbinrnd (1, 2, 2, 1.5, 5) 616s ***** error<nbinrnd: R and PS must be scalars or of size SZ.> ... 616s nbinrnd (2, ones (2), 3) 616s ***** error<nbinrnd: R and PS must be scalars or of size SZ.> ... 616s nbinrnd (2, ones (2), [3, 2]) 616s ***** error<nbinrnd: R and PS must be scalars or of size SZ.> ... 616s nbinrnd (2, ones (2), 3, 2) 616s 33 tests, 33 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/laplacernd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/laplacernd.m 616s ***** assert (size (laplacernd (1, 1)), [1 1]) 616s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 616s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 616s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 616s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 616s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 616s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 616s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 616s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 616s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 616s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 616s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 616s ***** assert (class (laplacernd (1, 1)), "double") 616s ***** assert (class (laplacernd (1, single (1))), "single") 616s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 616s ***** assert (class (laplacernd (single (1), 1)), "single") 616s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 616s ***** error<laplacernd: function called with too few input arguments.> laplacernd () 616s ***** error<laplacernd: function called with too few input arguments.> laplacernd (1) 616s ***** error<laplacernd: MU and BETA must be of common size or scalars.> ... 616s laplacernd (ones (3), ones (2)) 616s ***** error<laplacernd: MU and BETA must be of common size or scalars.> ... 616s laplacernd (ones (2), ones (3)) 616s ***** error<laplacernd: MU and BETA must not be complex.> laplacernd (i, 2, 3) 616s ***** error<laplacernd: MU and BETA must not be complex.> laplacernd (1, i, 3) 616s ***** error<laplacernd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s laplacernd (1, 2, -1) 616s ***** error<laplacernd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s laplacernd (1, 2, 1.2) 616s ***** error<laplacernd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s laplacernd (1, 2, ones (2)) 616s ***** error<laplacernd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s laplacernd (1, 2, [2 -1 2]) 616s ***** error<laplacernd: SZ must be a scalar or a row vector of non-negative integers.> ... 616s laplacernd (1, 2, [2 0 2.5]) 616s ***** error<laplacernd: dimensions must be non-negative integers.> ... 616s laplacernd (1, 2, 2, -1, 5) 616s ***** error<laplacernd: dimensions must be non-negative integers.> ... 616s laplacernd (1, 2, 2, 1.5, 5) 616s ***** error<laplacernd: MU and BETA must be scalars or of size SZ.> ... 616s laplacernd (2, ones (2), 3) 616s ***** error<laplacernd: MU and BETA must be scalars or of size SZ.> ... 616s laplacernd (2, ones (2), [3, 2]) 616s ***** error<laplacernd: MU and BETA must be scalars or of size SZ.> ... 616s laplacernd (2, ones (2), 3, 2) 616s 33 tests, 33 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/mvnrnd.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvnrnd.m 616s ***** error<mvnrnd: too few input arguments.> mvnrnd () 616s ***** error<mvnrnd: too few input arguments.> mvnrnd ([2, 3, 4]) 616s ***** error<mvnrnd: wrong size of MU.> mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 616s ***** error<mvnrnd: wrong size of SIGMA.> mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 616s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 616s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 616s 6 tests, 6 passed, 0 known failure, 0 skipped 616s [inst/dist_fun/vmcdf.m] 616s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/vmcdf.m 616s ***** demo 616s ## Plot various CDFs from the von Mises distribution 616s x1 = [-pi:0.1:pi]; 616s p1 = vmcdf (x1, 0, 0.5); 616s p2 = vmcdf (x1, 0, 1); 616s p3 = vmcdf (x1, 0, 2); 616s p4 = vmcdf (x1, 0, 4); 616s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 616s grid on 616s xlim ([-pi, pi]) 616s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 616s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 616s title ("Von Mises CDF") 616s xlabel ("values in x") 616s ylabel ("probability") 616s ***** shared x, p0, p1 616s x = [-pi:pi/2:pi]; 616s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 616s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 616s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 616s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 617s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 617s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 617s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 617s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 617s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 617s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 617s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 617s ***** error<vmcdf: function called with too few input arguments.> vmcdf () 617s ***** error<vmcdf: function called with too few input arguments.> vmcdf (1) 617s ***** error<vmcdf: function called with too few input arguments.> vmcdf (1, 2) 617s ***** error<vmcdf: invalid argument for upper tail.> vmcdf (1, 2, 3, "tail") 617s ***** error<vmcdf: invalid argument for upper tail.> vmcdf (1, 2, 3, 4) 617s ***** error<vmcdf: X, MU, and K must be of common size or scalars.> ... 617s vmcdf (ones (3), ones (2), ones (2)) 617s ***** error<vmcdf: X, MU, and K must be of common size or scalars.> ... 617s vmcdf (ones (2), ones (3), ones (2)) 617s ***** error<vmcdf: X, MU, and K must be of common size or scalars.> ... 617s vmcdf (ones (2), ones (2), ones (3)) 617s ***** error<vmcdf: X, MU, and K must not be complex.> vmcdf (i, 2, 2) 617s ***** error<vmcdf: X, MU, and K must not be complex.> vmcdf (2, i, 2) 617s ***** error<vmcdf: X, MU, and K must not be complex.> vmcdf (2, 2, i) 617s 20 tests, 20 passed, 0 known failure, 0 skipped 617s [inst/dist_fun/binornd.m] 617s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/binornd.m 617s ***** assert (size (binornd (2, 1/2)), [1 1]) 617s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 617s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 617s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 617s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 617s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 617s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 617s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 617s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 617s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 617s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 617s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 617s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 617s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 617s ***** assert (class (binornd (1, 1)), "double") 617s ***** assert (class (binornd (1, single (0))), "single") 617s ***** assert (class (binornd (1, single ([0, 0]))), "single") 617s ***** assert (class (binornd (1, single (1), 2)), "single") 617s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 617s ***** assert (class (binornd (single (1), 1, 2)), "single") 617s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 617s ***** error<binornd: function called with too few input arguments.> binornd () 617s ***** error<binornd: function called with too few input arguments.> binornd (1) 617s ***** error<binornd: N and PS must be of common size or scalars.> ... 617s binornd (ones (3), ones (2)) 617s ***** error<binornd: N and PS must be of common size or scalars.> ... 617s binornd (ones (2), ones (3)) 617s ***** error<binornd: N and PS must not be complex.> binornd (i, 2) 617s ***** error<binornd: N and PS must not be complex.> binornd (1, i) 617s ***** error<binornd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s binornd (1, 1/2, -1) 617s ***** error<binornd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s binornd (1, 1/2, 1.2) 617s ***** error<binornd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s binornd (1, 1/2, ones (2)) 617s ***** error<binornd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s binornd (1, 1/2, [2 -1 2]) 617s ***** error<binornd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s binornd (1, 1/2, [2 0 2.5]) 617s ***** error<binornd: dimensions must be non-negative integers.> ... 617s binornd (1, 1/2, 2, -1, 5) 617s ***** error<binornd: dimensions must be non-negative integers.> ... 617s binornd (1, 1/2, 2, 1.5, 5) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2, 1/2 * ones (2), 3) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2, 1/2 * ones (2), [3, 2]) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2, 1/2 * ones (2), 3, 2) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2 * ones (2), 1/2, 3) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2 * ones (2), 1/2, [3, 2]) 617s ***** error<binornd: N and PS must be scalars or of size SZ.> ... 617s binornd (2 * ones (2), 1/2, 3, 2) 617s 40 tests, 40 passed, 0 known failure, 0 skipped 617s [inst/dist_fun/frnd.m] 617s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/frnd.m 617s ***** assert (size (frnd (1, 1)), [1 1]) 617s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 617s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 617s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 617s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 617s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 617s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 617s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 617s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 617s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 617s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 617s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 617s ***** assert (class (frnd (1, 1)), "double") 617s ***** assert (class (frnd (1, single (1))), "single") 617s ***** assert (class (frnd (1, single ([1, 1]))), "single") 617s ***** assert (class (frnd (single (1), 1)), "single") 617s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 617s ***** error<frnd: function called with too few input arguments.> frnd () 617s ***** error<frnd: function called with too few input arguments.> frnd (1) 617s ***** error<frnd: DF1 and DF2 must be of common size or scalars.> ... 617s frnd (ones (3), ones (2)) 617s ***** error<frnd: DF1 and DF2 must be of common size or scalars.> ... 617s frnd (ones (2), ones (3)) 617s ***** error<frnd: DF1 and DF2 must not be complex.> frnd (i, 2, 3) 617s ***** error<frnd: DF1 and DF2 must not be complex.> frnd (1, i, 3) 617s ***** error<frnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s frnd (1, 2, -1) 617s ***** error<frnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s frnd (1, 2, 1.2) 617s ***** error<frnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s frnd (1, 2, ones (2)) 617s ***** error<frnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s frnd (1, 2, [2 -1 2]) 617s ***** error<frnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s frnd (1, 2, [2 0 2.5]) 617s ***** error<frnd: dimensions must be non-negative integers.> ... 617s frnd (1, 2, 2, -1, 5) 617s ***** error<frnd: dimensions must be non-negative integers.> ... 617s frnd (1, 2, 2, 1.5, 5) 617s ***** error<frnd: DF1 and DF2 must be scalars or of size SZ.> ... 617s frnd (2, ones (2), 3) 617s ***** error<frnd: DF1 and DF2 must be scalars or of size SZ.> ... 617s frnd (2, ones (2), [3, 2]) 617s ***** error<frnd: DF1 and DF2 must be scalars or of size SZ.> ... 617s frnd (2, ones (2), 3, 2) 617s 33 tests, 33 passed, 0 known failure, 0 skipped 617s [inst/dist_fun/normcdf.m] 617s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/normcdf.m 617s ***** demo 617s ## Plot various CDFs from the normal distribution 617s x = -5:0.01:5; 617s p1 = normcdf (x, 0, 0.5); 617s p2 = normcdf (x, 0, 1); 617s p3 = normcdf (x, 0, 2); 617s p4 = normcdf (x, -2, 0.8); 617s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 617s grid on 617s xlim ([-5, 5]) 617s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 617s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 617s title ("Normal CDF") 617s xlabel ("values in x") 617s ylabel ("probability") 617s ***** shared x, y 617s x = [-Inf 1 2 Inf]; 617s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 617s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 617s ***** assert (normcdf (x, 1, ones (1,4)), y) 617s ***** assert (normcdf (x, ones (1,4), 1), y) 617s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 617s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 617s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 617s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 617s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 617s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 617s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 617s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 617s ***** error<normcdf: invalid number of input arguments.> normcdf () 617s ***** error<normcdf: invalid number of input arguments.> normcdf (1,2,3,4,5,6,7) 617s ***** error<normcdf: invalid argument for upper tail.> normcdf (1, 2, 3, 4, "uper") 617s ***** error<normcdf: X, MU, and SIGMA must be of common size or scalars.> ... 617s normcdf (ones (3), ones (2), ones (2)) 617s ***** error<normcdf: invalid size of covariance matrix.> normcdf (2, 3, 4, [1, 2]) 617s ***** error<normcdf: covariance matrix is required for confidence bounds.> ... 617s [p, plo, pup] = normcdf (1, 2, 3) 617s ***** error<normcdf: invalid value for alpha.> [p, plo, pup] = ... 617s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 617s ***** error<normcdf: invalid value for alpha.> [p, plo, pup] = ... 617s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 617s ***** error<normcdf: invalid value for alpha.> [p, plo, pup] = ... 617s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 617s ***** error<normcdf: X, MU, and SIGMA must not be complex.> normcdf (i, 2, 2) 617s ***** error<normcdf: X, MU, and SIGMA must not be complex.> normcdf (2, i, 2) 617s ***** error<normcdf: X, MU, and SIGMA must not be complex.> normcdf (2, 2, i) 617s ***** error<normcdf: bad covariance matrix.> ... 617s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 617s 24 tests, 24 passed, 0 known failure, 0 skipped 617s [inst/dist_fun/gaminv.m] 617s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gaminv.m 617s ***** demo 617s ## Plot various iCDFs from the Gamma distribution 617s p = 0.001:0.001:0.999; 617s x1 = gaminv (p, 1, 2); 617s x2 = gaminv (p, 2, 2); 617s x3 = gaminv (p, 3, 2); 617s x4 = gaminv (p, 5, 1); 617s x5 = gaminv (p, 9, 0.5); 617s x6 = gaminv (p, 7.5, 1); 617s x7 = gaminv (p, 0.5, 1); 617s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 617s p, x5, "-k", p, x6, "-b", p, x7, "-c") 617s ylim ([0, 20]) 617s grid on 617s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 617s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 617s "α = 0.5, β = 1"}, "location", "northwest") 617s title ("Gamma iCDF") 617s xlabel ("probability") 617s ylabel ("x") 617s ***** shared p 617s p = [-1 0 0.63212055882855778 1 2]; 617s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 617s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 617s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 617s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 617s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 617s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 617s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 617s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 617s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 617s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 617s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 617s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 617s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 617s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 617s eps ("single")) 617s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 617s eps ("single")) 617s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 617s eps ("single")) 617s ***** error<gaminv: function called with too few input arguments.> gaminv () 617s ***** error<gaminv: function called with too few input arguments.> gaminv (1) 617s ***** error<gaminv: function called with too few input arguments.> gaminv (1,2) 617s ***** error<gaminv: P, Α, and Β must be of common size or scalars.> ... 617s gaminv (ones (3), ones (2), ones (2)) 617s ***** error<gaminv: P, Α, and Β must be of common size or scalars.> ... 617s gaminv (ones (2), ones (3), ones (2)) 617s ***** error<gaminv: P, Α, and Β must be of common size or scalars.> ... 617s gaminv (ones (2), ones (2), ones (3)) 617s ***** error<gaminv: P, Α, and Β must not be complex.> gaminv (i, 2, 2) 617s ***** error<gaminv: P, Α, and Β must not be complex.> gaminv (2, i, 2) 617s ***** error<gaminv: P, Α, and Β must not be complex.> gaminv (2, 2, i) 617s 25 tests, 25 passed, 0 known failure, 0 skipped 617s [inst/dist_fun/logirnd.m] 617s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logirnd.m 617s ***** assert (size (logirnd (1, 1)), [1 1]) 617s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 617s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 617s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 617s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 617s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 617s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 617s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 617s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 617s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 617s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 617s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 617s ***** assert (class (logirnd (1, 1)), "double") 617s ***** assert (class (logirnd (1, single (1))), "single") 617s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 617s ***** assert (class (logirnd (single (1), 1)), "single") 617s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 617s ***** error<logirnd: function called with too few input arguments.> logirnd () 617s ***** error<logirnd: function called with too few input arguments.> logirnd (1) 617s ***** error<logirnd: MU and SIGMA must be of common size or scalars.> ... 617s logirnd (ones (3), ones (2)) 617s ***** error<logirnd: MU and SIGMA must be of common size or scalars.> ... 617s logirnd (ones (2), ones (3)) 617s ***** error<logirnd: MU and SIGMA must not be complex.> logirnd (i, 2, 3) 617s ***** error<logirnd: MU and SIGMA must not be complex.> logirnd (1, i, 3) 617s ***** error<logirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s logirnd (1, 2, -1) 617s ***** error<logirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s logirnd (1, 2, 1.2) 617s ***** error<logirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s logirnd (1, 2, ones (2)) 617s ***** error<logirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s logirnd (1, 2, [2 -1 2]) 617s ***** error<logirnd: SZ must be a scalar or a row vector of non-negative integers.> ... 617s logirnd (1, 2, [2 0 2.5]) 617s ***** error<logirnd: dimensions must be non-negative integers.> ... 617s logirnd (1, 2, 2, -1, 5) 617s ***** error<logirnd: dimensions must be non-negative integers.> ... 617s logirnd (1, 2, 2, 1.5, 5) 618s ***** error<logirnd: MU and SIGMA must be scalars or of size SZ.> ... 618s logirnd (2, ones (2), 3) 618s ***** error<logirnd: MU and SIGMA must be scalars or of size SZ.> ... 618s logirnd (2, ones (2), [3, 2]) 618s ***** error<logirnd: MU and SIGMA must be scalars or of size SZ.> ... 618s logirnd (2, ones (2), 3, 2) 618s 33 tests, 33 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/unidinv.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unidinv.m 618s ***** demo 618s ## Plot various iCDFs from the discrete uniform distribution 618s p = 0.001:0.001:0.999; 618s x1 = unidinv (p, 5); 618s x2 = unidinv (p, 9); 618s plot (p, x1, "-b", p, x2, "-g") 618s grid on 618s xlim ([0, 1]) 618s ylim ([0, 10]) 618s legend ({"N = 5", "N = 9"}, "location", "northwest") 618s title ("Discrete uniform iCDF") 618s xlabel ("probability") 618s ylabel ("values in x") 618s ***** shared p 618s p = [-1 0 0.5 1 2]; 618s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 618s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 618s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 618s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 618s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 618s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 618s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 618s ***** error<unidinv: function called with too few input arguments.> unidinv () 618s ***** error<unidinv: function called with too few input arguments.> unidinv (1) 618s ***** error<unidinv: P and N must be of common size or scalars.> ... 618s unidinv (ones (3), ones (2)) 618s ***** error<unidinv: P and N must be of common size or scalars.> ... 618s unidinv (ones (2), ones (3)) 618s ***** error<unidinv: P and N must not be complex.> unidinv (i, 2) 618s ***** error<unidinv: P and N must not be complex.> unidinv (2, i) 618s 13 tests, 13 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/gprnd.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gprnd.m 618s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 618s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 618s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 618s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 618s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 618s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 618s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 618s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 618s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 618s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 618s ***** assert (size (gprnd (1,1,0)), [1, 1]) 618s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 618s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 618s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 618s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 618s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 618s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 618s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 618s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 618s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 618s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 618s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 618s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 618s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 618s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 618s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 618s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 618s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 618s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 618s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 618s ***** assert (class (gprnd (0, 1, 0)), "double") 618s ***** assert (class (gprnd (0, 1, single (0))), "single") 618s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 618s ***** assert (class (gprnd (0, single (1),0)), "single") 618s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 618s ***** assert (class (gprnd (single (0), 1, 0)), "single") 618s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 618s ***** error<gprnd: function called with too few input arguments.> gprnd () 618s ***** error<gprnd: function called with too few input arguments.> gprnd (1) 618s ***** error<gprnd: function called with too few input arguments.> gprnd (1, 2) 618s ***** error<gprnd: K, SIGMA, and THETA must be of common size or scalars.> ... 618s gprnd (ones (3), ones (2), ones (2)) 618s ***** error<gprnd: K, SIGMA, and THETA must be of common size or scalars.> ... 618s gprnd (ones (2), ones (3), ones (2)) 618s ***** error<gprnd: K, SIGMA, and THETA must be of common size or scalars.> ... 618s gprnd (ones (2), ones (2), ones (3)) 618s ***** error<gprnd: K, SIGMA, and THETA must not be complex.> gprnd (i, 2, 3) 618s ***** error<gprnd: K, SIGMA, and THETA must not be complex.> gprnd (1, i, 3) 618s ***** error<gprnd: K, SIGMA, and THETA must not be complex.> gprnd (1, 2, i) 618s ***** error<gprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 618s gprnd (1, 2, 3, -1) 618s ***** error<gprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 618s gprnd (1, 2, 3, 1.2) 618s ***** error<gprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 618s gprnd (1, 2, 3, ones (2)) 618s ***** error<gprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 618s gprnd (1, 2, 3, [2 -1 2]) 618s ***** error<gprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 618s gprnd (1, 2, 3, [2 0 2.5]) 618s ***** error<gprnd: dimensions must be non-negative integers.> ... 618s gprnd (1, 2, 3, 2, -1, 5) 618s ***** error<gprnd: dimensions must be non-negative integers.> ... 618s gprnd (1, 2, 3, 2, 1.5, 5) 618s ***** error<gprnd: K, SIGMA, and THETA must be scalars or of size SZ.> ... 618s gprnd (2, ones (2), 2, 3) 618s ***** error<gprnd: K, SIGMA, and THETA must be scalars or of size SZ.> ... 618s gprnd (2, ones (2), 2, [3, 2]) 618s ***** error<gprnd: K, SIGMA, and THETA must be scalars or of size SZ.> ... 618s gprnd (2, ones (2), 2, 3, 2) 618s 56 tests, 56 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/hygecdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hygecdf.m 618s ***** demo 618s ## Plot various CDFs from the hypergeometric distribution 618s x = 0:60; 618s p1 = hygecdf (x, 500, 50, 100); 618s p2 = hygecdf (x, 500, 60, 200); 618s p3 = hygecdf (x, 500, 70, 300); 618s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 618s grid on 618s xlim ([0, 60]) 618s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 618s "m = 500, k = 70, n = 300"}, "location", "southeast") 618s title ("Hypergeometric CDF") 618s xlabel ("values in x (number of successes)") 618s ylabel ("probability") 618s ***** shared x, y 618s x = [-1 0 1 2 3]; 618s y = [0 1/6 5/6 1 1]; 618s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 618s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 618s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 618s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 618s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 618s [y(5) NaN NaN NaN y(1)], 5*eps) 618s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 618s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 618s [y(5) NaN NaN NaN y(1)], 5*eps) 618s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 618s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 618s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 618s [y(5) NaN NaN NaN y(1)], 5*eps) 618s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 618s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 618s ***** test 618s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 618s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 618s ***** test 618s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 618s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 618s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 618s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 618s eps ("single")) 618s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 618s eps ("single")) 618s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 618s eps ("single")) 618s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 618s eps ("single")) 618s ***** error<hygecdf: function called with too few input arguments.> hygecdf () 618s ***** error<hygecdf: function called with too few input arguments.> hygecdf (1) 618s ***** error<hygecdf: function called with too few input arguments.> hygecdf (1,2) 618s ***** error<hygecdf: function called with too few input arguments.> hygecdf (1,2,3) 618s ***** error<hygecdf: invalid argument for upper tail.> hygecdf (1,2,3,4,5) 618s ***** error<hygecdf: invalid argument for upper tail.> hygecdf (1,2,3,4,"uper") 618s ***** error<hygecdf: X, T, k, and N must be of common size or scalars.> ... 618s hygecdf (ones (2), ones (3), 1, 1) 618s ***** error<hygecdf: X, T, k, and N must be of common size or scalars.> ... 618s hygecdf (1, ones (2), ones (3), 1) 618s ***** error<hygecdf: X, T, k, and N must be of common size or scalars.> ... 618s hygecdf (1, 1, ones (2), ones (3)) 618s ***** error<hygecdf: X, T, k, and N must not be complex.> hygecdf (i, 2, 2, 2) 618s ***** error<hygecdf: X, T, k, and N must not be complex.> hygecdf (2, i, 2, 2) 618s ***** error<hygecdf: X, T, k, and N must not be complex.> hygecdf (2, 2, i, 2) 618s ***** error<hygecdf: X, T, k, and N must not be complex.> hygecdf (2, 2, 2, i) 618s 32 tests, 32 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/loglpdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/loglpdf.m 618s ***** demo 618s ## Plot various PDFs from the log-logistic distribution 618s x = 0.001:0.001:2; 618s y1 = loglpdf (x, log (1), 1/0.5); 618s y2 = loglpdf (x, log (1), 1); 618s y3 = loglpdf (x, log (1), 1/2); 618s y4 = loglpdf (x, log (1), 1/4); 618s y5 = loglpdf (x, log (1), 1/8); 618s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 618s grid on 618s ylim ([0,3]) 618s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 618s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 618s title ("Log-logistic PDF") 618s xlabel ("values in x") 618s ylabel ("density") 618s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 618s ***** shared out1, out2 618s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 618s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 618s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 618s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 618s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 618s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 618s ***** assert (class (loglpdf (1, single (2), 3)), "single") 618s ***** assert (class (loglpdf (1, 2, single (3))), "single") 618s ***** error<loglpdf: function called with too few input arguments.> loglpdf (1) 618s ***** error<loglpdf: function called with too few input arguments.> loglpdf (1, 2) 618s ***** error<loglpdf: X, MU, and SIGMA must be of common size or scalars.> ... 618s loglpdf (1, ones (2), ones (3)) 618s ***** error<loglpdf: X, MU, and SIGMA must be of common size or scalars.> ... 618s loglpdf (ones (2), 1, ones (3)) 618s ***** error<loglpdf: X, MU, and SIGMA must be of common size or scalars.> ... 618s loglpdf (ones (2), ones (3), 1) 618s ***** error<loglpdf: X, MU, and SIGMA must not be complex.> loglpdf (i, 2, 3) 618s ***** error<loglpdf: X, MU, and SIGMA must not be complex.> loglpdf (1, i, 3) 618s ***** error<loglpdf: X, MU, and SIGMA must not be complex.> loglpdf (1, 2, i) 618s 14 tests, 14 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/cauchycdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/cauchycdf.m 618s ***** demo 618s ## Plot various CDFs from the Cauchy distribution 618s x = -5:0.01:5; 618s p1 = cauchycdf (x, 0, 0.5); 618s p2 = cauchycdf (x, 0, 1); 618s p3 = cauchycdf (x, 0, 2); 618s p4 = cauchycdf (x, -2, 1); 618s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 618s grid on 618s xlim ([-5, 5]) 618s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 618s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 618s title ("Cauchy CDF") 618s xlabel ("values in x") 618s ylabel ("probability") 618s ***** shared x, y 618s x = [-1 0 0.5 1 2]; 618s y = 1/pi * atan ((x-1) / 2) + 1/2; 618s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 618s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 618s ***** assert (cauchycdf (x, ones (1,5), 2), y) 618s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 618s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 618s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 618s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 618s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 618s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 618s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 618s ***** error<cauchycdf: function called with too few input arguments.> cauchycdf () 618s ***** error<cauchycdf: function called with too few input arguments.> cauchycdf (1) 618s ***** error<cauchycdf: function called with too few input arguments.> ... 618s cauchycdf (1, 2) 618s ***** error<cauchycdf: function called with too many inputs> ... 618s cauchycdf (1, 2, 3, 4, 5) 618s ***** error<cauchycdf: invalid argument for upper tail.> cauchycdf (1, 2, 3, "tail") 618s ***** error<cauchycdf: invalid argument for upper tail.> cauchycdf (1, 2, 3, 4) 618s ***** error<cauchycdf: X, X0, and GAMMA must be of common size or scalars.> ... 618s cauchycdf (ones (3), ones (2), ones (2)) 618s ***** error<cauchycdf: X, X0, and GAMMA must be of common size or scalars.> ... 618s cauchycdf (ones (2), ones (3), ones (2)) 618s ***** error<cauchycdf: X, X0, and GAMMA must be of common size or scalars.> ... 618s cauchycdf (ones (2), ones (2), ones (3)) 618s ***** error<cauchycdf: X, X0, and GAMMA must not be complex.> cauchycdf (i, 2, 2) 618s ***** error<cauchycdf: X, X0, and GAMMA must not be complex.> cauchycdf (2, i, 2) 618s ***** error<cauchycdf: X, X0, and GAMMA must not be complex.> cauchycdf (2, 2, i) 618s 22 tests, 22 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/poisscdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/poisscdf.m 618s ***** demo 618s ## Plot various CDFs from the Poisson distribution 618s x = 0:20; 618s p1 = poisscdf (x, 1); 618s p2 = poisscdf (x, 4); 618s p3 = poisscdf (x, 10); 618s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 618s grid on 618s ylim ([0, 1]) 618s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 618s title ("Poisson CDF") 618s xlabel ("values in x (number of occurences)") 618s ylabel ("probability") 618s ***** shared x, y 618s x = [-1 0 1 2 Inf]; 618s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 618s ***** assert (poisscdf (x, ones (1,5)), y) 618s ***** assert (poisscdf (x, 1), y) 618s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 618s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 618s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 618s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 618s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 618s ***** error<poisscdf: function called with too few input arguments.> poisscdf () 618s ***** error<poisscdf: function called with too few input arguments.> poisscdf (1) 618s ***** error<poisscdf: invalid argument for upper tail.> poisscdf (1, 2, 3) 618s ***** error<poisscdf: invalid argument for upper tail.> poisscdf (1, 2, "tail") 618s ***** error<poisscdf: X and LAMBDA must be of common size or scalars.> ... 618s poisscdf (ones (3), ones (2)) 618s ***** error<poisscdf: X and LAMBDA must be of common size or scalars.> ... 618s poisscdf (ones (2), ones (3)) 618s ***** error<poisscdf: X and LAMBDA must not be complex.> poisscdf (i, 2) 618s ***** error<poisscdf: X and LAMBDA must not be complex.> poisscdf (2, i) 618s 15 tests, 15 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/fpdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/fpdf.m 618s ***** demo 618s ## Plot various PDFs from the F distribution 618s x = 0.01:0.01:4; 618s y1 = fpdf (x, 1, 1); 618s y2 = fpdf (x, 2, 1); 618s y3 = fpdf (x, 5, 2); 618s y4 = fpdf (x, 10, 1); 618s y5 = fpdf (x, 100, 100); 618s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 618s grid on 618s ylim ([0, 2.5]) 618s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 618s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 618s "df1 = 100, df2 = 100"}, "location", "northeast") 618s title ("F PDF") 618s xlabel ("values in x") 618s ylabel ("density") 618s ***** shared x, y 618s x = [-1 0 0.5 1 2]; 618s y = [0 0 4/9 1/4 1/9]; 618s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 618s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 618s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 618s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 618s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 618s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 618s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 618s rand ("seed", 1234); # for reproducibility 618s xr = rand (10,1); 618s xr = xr(x > 0.1 & x < 0.9); 618s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 618s assert (fpdf (xr, 1, 2), yr, 5*eps); 618s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 618s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 618s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 618s ***** error<fpdf: function called with too few input arguments.> fpdf () 618s ***** error<fpdf: function called with too few input arguments.> fpdf (1) 618s ***** error<fpdf: function called with too few input arguments.> fpdf (1,2) 618s ***** error<fpdf: X, DF1, and DF2 must be of common size or scalars.> ... 618s fpdf (ones (3), ones (2), ones (2)) 618s ***** error<fpdf: X, DF1, and DF2 must be of common size or scalars.> ... 618s fpdf (ones (2), ones (3), ones (2)) 618s ***** error<fpdf: X, DF1, and DF2 must be of common size or scalars.> ... 618s fpdf (ones (2), ones (2), ones (3)) 618s ***** error<fpdf: X, DF1, and DF2 must not be complex.> fpdf (i, 2, 2) 618s ***** error<fpdf: X, DF1, and DF2 must not be complex.> fpdf (2, i, 2) 618s ***** error<fpdf: X, DF1, and DF2 must not be complex.> fpdf (2, 2, i) 618s 19 tests, 19 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/wishrnd.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wishrnd.m 618s ***** assert(size (wishrnd (1,2)), [1, 1]); 618s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 618s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 618s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 618s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 618s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 618s ***** error wishrnd () 618s ***** error wishrnd (1) 618s ***** error wishrnd ([1; 1], 2) 618s 9 tests, 9 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/evpdf.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/evpdf.m 618s ***** demo 618s ## Plot various PDFs from the Extreme value distribution 618s x = -10:0.001:10; 618s y1 = evpdf (x, 0.5, 2); 618s y2 = evpdf (x, 1.0, 2); 618s y3 = evpdf (x, 1.5, 3); 618s y4 = evpdf (x, 3.0, 4); 618s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 618s grid on 618s ylim ([0, 0.2]) 618s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 618s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 618s title ("Extreme value PDF") 618s xlabel ("values in x") 618s ylabel ("density") 618s ***** shared x, y0, y1 618s x = [-5, 0, 1, 2, 3]; 618s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 618s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 618s ***** assert (evpdf (x), y0, 1e-4) 618s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 618s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 618s ***** error<evpdf: function called with too few input arguments.> evpdf () 618s ***** error<evpdf: X, MU, and SIGMA must be of common size or scalars.> ... 618s evpdf (ones (3), ones (2), ones (2)) 618s ***** error<evpdf: X, MU, and SIGMA must not be complex.> evpdf (i, 2, 2) 618s ***** error<evpdf: X, MU, and SIGMA must not be complex.> evpdf (2, i, 2) 618s ***** error<evpdf: X, MU, and SIGMA must not be complex.> evpdf (2, 2, i) 618s 8 tests, 8 passed, 0 known failure, 0 skipped 618s [inst/dist_fun/unifinv.m] 618s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unifinv.m 618s ***** demo 618s ## Plot various iCDFs from the continuous uniform distribution 618s p = 0.001:0.001:0.999; 618s x1 = unifinv (p, 2, 5); 618s x2 = unifinv (p, 3, 9); 618s plot (p, x1, "-b", p, x2, "-g") 618s grid on 618s xlim ([0, 1]) 618s ylim ([0, 10]) 618s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 618s title ("Continuous uniform iCDF") 618s xlabel ("probability") 618s ylabel ("values in x") 618s ***** shared p 618s p = [-1 0 0.5 1 2]; 618s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 618s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 618s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 618s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 618s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 618s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 618s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 618s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 618s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 618s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 619s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 619s ***** error<unifinv: function called with too few input arguments.> unifinv () 619s ***** error<unifinv: function called with too few input arguments.> unifinv (1, 2) 619s ***** error<unifinv: P, A, and B must be of common size or scalars.> ... 619s unifinv (ones (3), ones (2), ones (2)) 619s ***** error<unifinv: P, A, and B must be of common size or scalars.> ... 619s unifinv (ones (2), ones (3), ones (2)) 619s ***** error<unifinv: P, A, and B must be of common size or scalars.> ... 619s unifinv (ones (2), ones (2), ones (3)) 619s ***** error<unifinv: P, A, and B must not be complex.> unifinv (i, 2, 2) 619s ***** error<unifinv: P, A, and B must not be complex.> unifinv (2, i, 2) 619s ***** error<unifinv: P, A, and B must not be complex.> unifinv (2, 2, i) 619s 19 tests, 19 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/laplaceinv.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/laplaceinv.m 619s ***** demo 619s ## Plot various iCDFs from the Laplace distribution 619s p = 0.001:0.001:0.999; 619s x1 = cauchyinv (p, 0, 1); 619s x2 = cauchyinv (p, 0, 2); 619s x3 = cauchyinv (p, 0, 4); 619s x4 = cauchyinv (p, -5, 4); 619s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 619s grid on 619s ylim ([-10, 10]) 619s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 619s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 619s title ("Laplace iCDF") 619s xlabel ("probability") 619s ylabel ("values in x") 619s ***** shared p, x 619s p = [-1 0 0.5 1 2]; 619s x = [NaN, -Inf, 0, Inf, NaN]; 619s ***** assert (laplaceinv (p, 0, 1), x) 619s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 619s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 619s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 619s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 619s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 619s ***** error<laplaceinv: function called with too few input arguments.> laplaceinv () 619s ***** error<laplaceinv: function called with too few input arguments.> laplaceinv (1) 619s ***** error<laplaceinv: function called with too few input arguments.> ... 619s laplaceinv (1, 2) 619s ***** error<laplaceinv: function called with too many inputs> laplaceinv (1, 2, 3, 4) 619s ***** error<laplaceinv: P, MU, and BETA must be of common size or scalars.> ... 619s laplaceinv (1, ones (2), ones (3)) 619s ***** error<laplaceinv: P, MU, and BETA must be of common size or scalars.> ... 619s laplaceinv (ones (2), 1, ones (3)) 619s ***** error<laplaceinv: P, MU, and BETA must be of common size or scalars.> ... 619s laplaceinv (ones (2), ones (3), 1) 619s ***** error<laplaceinv: P, MU, and BETA must not be complex.> laplaceinv (i, 2, 3) 619s ***** error<laplaceinv: P, MU, and BETA must not be complex.> laplaceinv (1, i, 3) 619s ***** error<laplaceinv: P, MU, and BETA must not be complex.> laplaceinv (1, 2, i) 619s 16 tests, 16 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/hygepdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hygepdf.m 619s ***** demo 619s ## Plot various PDFs from the hypergeometric distribution 619s x = 0:60; 619s y1 = hygepdf (x, 500, 50, 100); 619s y2 = hygepdf (x, 500, 60, 200); 619s y3 = hygepdf (x, 500, 70, 300); 619s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 619s grid on 619s xlim ([0, 60]) 619s ylim ([0, 0.18]) 619s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 619s "m = 500, k = 70, μ = 300"}, "location", "northeast") 619s title ("Hypergeometric PDF") 619s xlabel ("values in x (number of successes)") 619s ylabel ("density") 619s ***** shared x, y 619s x = [-1 0 1 2 3]; 619s y = [0 1/6 4/6 1/6 0]; 619s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 619s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 619s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 619s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 619s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 619s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 619s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 619s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 619s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 619s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 619s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 619s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 619s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 619s ***** test 619s z = zeros(3,5); 619s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 619s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 619s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 619s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 619s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 619s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 619s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 619s ***** error<hygepdf: function called with too few input arguments.> hygepdf () 619s ***** error<hygepdf: function called with too few input arguments.> hygepdf (1) 619s ***** error<hygepdf: function called with too few input arguments.> hygepdf (1,2) 619s ***** error<hygepdf: function called with too few input arguments.> hygepdf (1,2,3) 619s ***** error<hygepdf: X, T, M, and N must be of common size or scalars.> ... 619s hygepdf (1, ones (3), ones (2), ones (2)) 619s ***** error<hygepdf: X, T, M, and N must be of common size or scalars.> ... 619s hygepdf (1, ones (2), ones (3), ones (2)) 619s ***** error<hygepdf: X, T, M, and N must be of common size or scalars.> ... 619s hygepdf (1, ones (2), ones (2), ones (3)) 619s ***** error<hygepdf: X, T, M, and N must not be complex.> hygepdf (i, 2, 2, 2) 619s ***** error<hygepdf: X, T, M, and N must not be complex.> hygepdf (2, i, 2, 2) 619s ***** error<hygepdf: X, T, M, and N must not be complex.> hygepdf (2, 2, i, 2) 619s ***** error<hygepdf: X, T, M, and N must not be complex.> hygepdf (2, 2, 2, i) 619s 25 tests, 25 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/burrinv.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/burrinv.m 619s ***** demo 619s ## Plot various iCDFs from the Burr type XII distribution 619s p = 0.001:0.001:0.999; 619s x1 = burrinv (p, 1, 1, 1); 619s x2 = burrinv (p, 1, 1, 2); 619s x3 = burrinv (p, 1, 1, 3); 619s x4 = burrinv (p, 1, 2, 1); 619s x5 = burrinv (p, 1, 3, 1); 619s x6 = burrinv (p, 1, 0.5, 2); 619s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 619s p, x4, "-c", p, x5, "-m", p, x6, "-k") 619s grid on 619s ylim ([0, 5]) 619s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 619s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 619s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 619s "location", "northwest") 619s title ("Burr type XII iCDF") 619s xlabel ("probability") 619s ylabel ("values in x") 619s ***** shared p, y 619s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 619s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 619s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 619s ***** assert (burrinv (p, 1, 1, 1), y, eps) 619s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 619s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 619s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 619s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 619s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 619s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 619s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 619s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 619s ***** error<burrinv: function called with too few input arguments.> burrinv () 619s ***** error<burrinv: function called with too few input arguments.> burrinv (1) 619s ***** error<burrinv: function called with too few input arguments.> burrinv (1, 2) 619s ***** error<burrinv: function called with too few input arguments.> burrinv (1, 2, 3) 619s ***** error<burrinv: function called with too many inputs> ... 619s burrinv (1, 2, 3, 4, 5) 619s ***** error<burrinv: P, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrinv (ones (3), ones (2), ones(2), ones(2)) 619s ***** error<burrinv: P, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrinv (ones (2), ones (3), ones(2), ones(2)) 619s ***** error<burrinv: P, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrinv (ones (2), ones (2), ones(3), ones(2)) 619s ***** error<burrinv: P, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrinv (ones (2), ones (2), ones(2), ones(3)) 619s ***** error<burrinv: P, LAMBDA, C, and K must not be complex.> burrinv (i, 2, 3, 4) 619s ***** error<burrinv: P, LAMBDA, C, and K must not be complex.> burrinv (1, i, 3, 4) 619s ***** error<burrinv: P, LAMBDA, C, and K must not be complex.> burrinv (1, 2, i, 4) 619s ***** error<burrinv: P, LAMBDA, C, and K must not be complex.> burrinv (1, 2, 3, i) 619s 23 tests, 23 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/gevpdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gevpdf.m 619s ***** demo 619s ## Plot various PDFs from the generalized extreme value distribution 619s x = -1:0.001:10; 619s y1 = gevpdf (x, 1, 1, 1); 619s y2 = gevpdf (x, 0.5, 1, 1); 619s y3 = gevpdf (x, 1, 1, 5); 619s y4 = gevpdf (x, 1, 2, 5); 619s y5 = gevpdf (x, 1, 5, 5); 619s y6 = gevpdf (x, 1, 0.5, 5); 619s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 619s x, y4, "-c", x, y5, "-m", x, y6, "-k") 619s grid on 619s xlim ([-1, 10]) 619s ylim ([0, 1.1]) 619s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 619s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 619s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 619s "location", "northeast") 619s title ("Generalized extreme value PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** test 619s x = 0:0.5:2.5; 619s sigma = 1:6; 619s k = 1; 619s mu = 0; 619s y = gevpdf (x, k, sigma, mu); 619s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 619s assert (y, expected_y, 0.001); 619s ***** test 619s x = -0.5:0.5:2.5; 619s sigma = 0.5; 619s k = 1; 619s mu = 0; 619s y = gevpdf (x, k, sigma, mu); 619s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 619s assert (y, expected_y, 0.001); 619s ***** test # check for continuity for k near 0 619s x = 1; 619s sigma = 0.5; 619s k = -0.03:0.01:0.03; 619s mu = 0; 619s y = gevpdf (x, k, sigma, mu); 619s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 619s assert (y, expected_y, 0.001); 619s ***** error<gevpdf: function called with too few input arguments.> gevpdf () 619s ***** error<gevpdf: function called with too few input arguments.> gevpdf (1) 619s ***** error<gevpdf: function called with too few input arguments.> gevpdf (1, 2) 619s ***** error<gevpdf: function called with too few input arguments.> gevpdf (1, 2, 3) 619s ***** error<gevpdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 619s gevpdf (ones (3), ones (2), ones(2), ones(2)) 619s ***** error<gevpdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 619s gevpdf (ones (2), ones (3), ones(2), ones(2)) 619s ***** error<gevpdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 619s gevpdf (ones (2), ones (2), ones(3), ones(2)) 619s ***** error<gevpdf: X, K, SIGMA, and MU must be of common size or scalars.> ... 619s gevpdf (ones (2), ones (2), ones(2), ones(3)) 619s ***** error<gevpdf: X, K, SIGMA, and MU must not be complex.> gevpdf (i, 2, 3, 4) 619s ***** error<gevpdf: X, K, SIGMA, and MU must not be complex.> gevpdf (1, i, 3, 4) 619s ***** error<gevpdf: X, K, SIGMA, and MU must not be complex.> gevpdf (1, 2, i, 4) 619s ***** error<gevpdf: X, K, SIGMA, and MU must not be complex.> gevpdf (1, 2, 3, i) 619s 15 tests, 15 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/tlsinv.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tlsinv.m 619s ***** demo 619s ## Plot various iCDFs from the location-scale Student's T distribution 619s p = 0.001:0.001:0.999; 619s x1 = tlsinv (p, 0, 1, 1); 619s x2 = tlsinv (p, 0, 2, 2); 619s x3 = tlsinv (p, 3, 2, 5); 619s x4 = tlsinv (p, -1, 3, Inf); 619s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 619s grid on 619s xlim ([0, 1]) 619s ylim ([-8, 8]) 619s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 619s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 619s "location", "southeast") 619s title ("Location-scale Student's T iCDF") 619s xlabel ("probability") 619s ylabel ("values in x") 619s ***** shared p 619s p = [-1 0 0.5 1 2]; 619s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 619s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 619s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 619s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 619s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 619s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 619s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 619s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 619s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 619s ***** error<tlsinv: function called with too few input arguments.> tlsinv () 619s ***** error<tlsinv: function called with too few input arguments.> tlsinv (1) 619s ***** error<tlsinv: function called with too few input arguments.> tlsinv (1, 2) 619s ***** error<tlsinv: function called with too few input arguments.> tlsinv (1, 2, 3) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must be of common size or scalars.> ... 619s tlsinv (ones (3), ones (2), 1, 1) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must be of common size or scalars.> ... 619s tlsinv (ones (2), 1, ones (3), 1) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must be of common size or scalars.> ... 619s tlsinv (ones (2), 1, 1, ones (3)) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must not be complex.> tlsinv (i, 2, 3, 4) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must not be complex.> tlsinv (2, i, 3, 4) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must not be complex.> tlsinv (2, 2, i, 4) 619s ***** error<tlsinv: P, MU, SIGMA, and NU must not be complex.> tlsinv (2, 2, 3, i) 619s 20 tests, 20 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/exppdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/exppdf.m 619s ***** demo 619s ## Plot various PDFs from the exponential distribution 619s x = 0:0.01:5; 619s y1 = exppdf (x, 2/3); 619s y2 = exppdf (x, 1.0); 619s y3 = exppdf (x, 2.0); 619s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 619s grid on 619s ylim ([0, 1.5]) 619s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 619s title ("Exponential PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** shared x,y 619s x = [-1 0 0.5 1 Inf]; 619s y = gampdf (x, 1, 2); 619s ***** assert (exppdf (x, 2*ones (1,5)), y) 619s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 619s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 619s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 619s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 619s ***** error<exppdf: function called with too few input arguments.> exppdf () 619s ***** error<exppdf: function called with too many inputs> exppdf (1,2,3) 619s ***** error<exppdf: X and MU must be of common size or scalars.> ... 619s exppdf (ones (3), ones (2)) 619s ***** error<exppdf: X and MU must be of common size or scalars.> ... 619s exppdf (ones (2), ones (3)) 619s ***** error<exppdf: X and MU must not be complex.> exppdf (i, 2) 619s ***** error<exppdf: X and MU must not be complex.> exppdf (2, i) 619s 11 tests, 11 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/burrpdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/burrpdf.m 619s ***** demo 619s ## Plot various PDFs from the Burr type XII distribution 619s x = 0.001:0.001:3; 619s y1 = burrpdf (x, 1, 1, 1); 619s y2 = burrpdf (x, 1, 1, 2); 619s y3 = burrpdf (x, 1, 1, 3); 619s y4 = burrpdf (x, 1, 2, 1); 619s y5 = burrpdf (x, 1, 3, 1); 619s y6 = burrpdf (x, 1, 0.5, 2); 619s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 619s x, y4, "-c", x, y5, "-m", x, y6, "-k") 619s grid on 619s ylim ([0, 2]) 619s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 619s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 619s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 619s "location", "northeast") 619s title ("Burr type XII PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** shared x, y 619s x = [-1, 0, 1, 2, Inf]; 619s y = [0, 1, 1/4, 1/9, 0]; 619s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 619s ***** assert (burrpdf (x, 1, 1, 1), y) 619s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 619s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 619s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 619s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 619s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 619s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 619s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 619s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 619s ***** error<burrpdf: function called with too few input arguments.> burrpdf () 619s ***** error<burrpdf: function called with too few input arguments.> burrpdf (1) 619s ***** error<burrpdf: function called with too few input arguments.> burrpdf (1, 2) 619s ***** error<burrpdf: function called with too few input arguments.> burrpdf (1, 2, 3) 619s ***** error<burrpdf: function called with too many inputs> ... 619s burrpdf (1, 2, 3, 4, 5) 619s ***** error<burrpdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrpdf (ones (3), ones (2), ones(2), ones(2)) 619s ***** error<burrpdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrpdf (ones (2), ones (3), ones(2), ones(2)) 619s ***** error<burrpdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrpdf (ones (2), ones (2), ones(3), ones(2)) 619s ***** error<burrpdf: X, LAMBDA, C, and K must be of common size or scalars.> ... 619s burrpdf (ones (2), ones (2), ones(2), ones(3)) 619s ***** error<burrpdf: X, LAMBDA, C, and K must not be complex.> burrpdf (i, 2, 3, 4) 619s ***** error<burrpdf: X, LAMBDA, C, and K must not be complex.> burrpdf (1, i, 3, 4) 619s ***** error<burrpdf: X, LAMBDA, C, and K must not be complex.> burrpdf (1, 2, i, 4) 619s ***** error<burrpdf: X, LAMBDA, C, and K must not be complex.> burrpdf (1, 2, 3, i) 619s 23 tests, 23 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/invgrnd.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/invgrnd.m 619s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 619s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 619s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 619s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 619s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 619s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 619s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 619s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 619s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 619s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 619s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 619s ***** test 619s r = invgrnd (1, [1, 0, -1]); 619s assert (r([2:3]), [NaN, NaN]) 619s ***** assert (class (invgrnd (1, 0)), "double") 619s ***** assert (class (invgrnd (1, single (0))), "single") 619s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 619s ***** assert (class (invgrnd (1, single (1))), "single") 619s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 619s ***** assert (class (invgrnd (single (1), 1)), "single") 619s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 619s ***** error<invgrnd: function called with too few input arguments.> invgrnd () 619s ***** error<invgrnd: function called with too few input arguments.> invgrnd (1) 619s ***** error<invgrnd: MU and LAMBDA must be of common size or scalars.> ... 619s invgrnd (ones (3), ones (2)) 619s ***** error<invgrnd: MU and LAMBDA must be of common size or scalars.> ... 619s invgrnd (ones (2), ones (3)) 619s ***** error<invgrnd: MU and LAMBDA must not be complex.> invgrnd (i, 2, 3) 619s ***** error<invgrnd: MU and LAMBDA must not be complex.> invgrnd (1, i, 3) 619s ***** error<invgrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s invgrnd (1, 2, -1) 619s ***** error<invgrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s invgrnd (1, 2, 1.2) 619s ***** error<invgrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s invgrnd (1, 2, ones (2)) 619s ***** error<invgrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s invgrnd (1, 2, [2 -1 2]) 619s ***** error<invgrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s invgrnd (1, 2, [2 0 2.5]) 619s ***** error<invgrnd: dimensions must be non-negative integers.> ... 619s invgrnd (1, 2, 2, -1, 5) 619s ***** error<invgrnd: dimensions must be non-negative integers.> ... 619s invgrnd (1, 2, 2, 1.5, 5) 619s ***** error<invgrnd: MU and LAMBDA must be scalars or of size SZ.> ... 619s invgrnd (2, ones (2), 3) 619s ***** error<invgrnd: MU and LAMBDA must be scalars or of size SZ.> ... 619s invgrnd (2, ones (2), [3, 2]) 619s ***** error<invgrnd: MU and LAMBDA must be scalars or of size SZ.> ... 619s invgrnd (2, ones (2), 3, 2) 619s 35 tests, 35 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/gumbelpdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gumbelpdf.m 619s ***** demo 619s ## Plot various PDFs from the Extreme value distribution 619s x = -5:0.001:20; 619s y1 = gumbelpdf (x, 0.5, 2); 619s y2 = gumbelpdf (x, 1.0, 2); 619s y3 = gumbelpdf (x, 1.5, 3); 619s y4 = gumbelpdf (x, 3.0, 4); 619s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 619s grid on 619s ylim ([0, 0.2]) 619s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 619s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 619s title ("Extreme value PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** shared x, y0, y1 619s x = [-5, 0, 1, 2, 3]; 619s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 619s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 619s ***** assert (gumbelpdf (x), y0, 1e-4) 619s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 619s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 619s ***** error<gumbelpdf: too few input arguments.> gumbelpdf () 619s ***** error<gumbelpdf: X, MU, and BETA must be of common size or scalars.> ... 619s gumbelpdf (ones (3), ones (2), ones (2)) 619s ***** error<gumbelpdf: X, MU, and BETA must not be complex.> gumbelpdf (i, 2, 2) 619s ***** error<gumbelpdf: X, MU, and BETA must not be complex.> gumbelpdf (2, i, 2) 619s ***** error<gumbelpdf: X, MU, and BETA must not be complex.> gumbelpdf (2, 2, i) 619s 8 tests, 8 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/plcdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/plcdf.m 619s ***** demo 619s ## Plot various CDFs from the Piecewise linear distribution 619s data = 0:0.01:10; 619s x1 = [0, 1, 3, 4, 7, 10]; 619s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 619s x2 = [0, 2, 5, 6, 7, 8]; 619s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 619s p1 = plcdf (data, x1, Fx1); 619s p2 = plcdf (data, x2, Fx2); 619s plot (data, p1, "-b", data, p2, "g") 619s grid on 619s ylim ([0, 1]) 619s xlim ([0, 10]) 619s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 619s title ("Piecewise linear CDF") 619s xlabel ("values in data") 619s ylabel ("probability") 619s ***** test 619s data = 0:0.2:1; 619s p = plcdf (data, [0, 1], [0, 1]); 619s assert (p, data); 619s ***** test 619s data = 0:0.2:1; 619s p = plcdf (data, [0, 2], [0, 1]); 619s assert (p, 0.5 * data); 619s ***** test 619s data = 0:0.2:1; 619s p = plcdf (data, [0, 1], [0, 0.5]); 619s assert (p, 0.5 * data); 619s ***** test 619s data = 0:0.2:1; 619s p = plcdf (data, [0, 0.5], [0, 1]); 619s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 619s ***** test 619s data = 0:0.2:1; 619s p = plcdf (data, [0, 1], [0, 1], "upper"); 619s assert (p, 1 - data); 619s ***** error<plcdf: function called with too few input arguments.> plcdf () 619s ***** error<plcdf: function called with too few input arguments.> plcdf (1) 619s ***** error<plcdf: function called with too few input arguments.> plcdf (1, 2) 619s ***** error<plcdf: invalid argument for upper tail.> plcdf (1, 2, 3, "uper") 619s ***** error<plcdf: invalid argument for upper tail.> plcdf (1, 2, 3, 4) 619s ***** error<plcdf: X and FX must be vectors of equal size.> ... 619s plcdf (1, [0, 1, 2], [0, 1]) 619s ***** error<plcdf: X and FX must be at least two-elements long.> ... 619s plcdf (1, [0], [1]) 619s ***** error<plcdf: FX must be bounded in the range> ... 619s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 619s ***** error<plcdf: FX must be bounded in the range> ... 619s plcdf (1, [0, 1, 2], [0, i, 1]) 619s ***** error<plcdf: DATA, X, and FX must not be complex.> ... 619s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 619s ***** error<plcdf: DATA, X, and FX must not be complex.> ... 619s plcdf (1, [0, i, 2], [0, 0.5, 1]) 619s ***** error<plcdf: DATA, X, and FX must not be complex.> ... 619s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 619s 17 tests, 17 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/loglrnd.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/loglrnd.m 619s ***** assert (size (loglrnd (1, 1)), [1 1]) 619s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 619s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 619s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 619s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 619s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 619s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 619s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 619s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 619s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 619s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 619s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 619s ***** assert (class (loglrnd (1, 1)), "double") 619s ***** assert (class (loglrnd (1, single (1))), "single") 619s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 619s ***** assert (class (loglrnd (single (1), 1)), "single") 619s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 619s ***** error<loglrnd: function called with too few input arguments.> loglrnd () 619s ***** error<loglrnd: function called with too few input arguments.> loglrnd (1) 619s ***** error<loglrnd: MU and SIGMA must be of common size or scalars.> ... 619s loglrnd (ones (3), ones (2)) 619s ***** error<loglrnd: MU and SIGMA must be of common size or scalars.> ... 619s loglrnd (ones (2), ones (3)) 619s ***** error<loglrnd: MU and SIGMA must not be complex.> loglrnd (i, 2, 3) 619s ***** error<loglrnd: MU and SIGMA must not be complex.> loglrnd (1, i, 3) 619s ***** error<loglrnd: SZ must be mu scalar or mu row vector of non-negative integers.> ... 619s loglrnd (1, 2, -1) 619s ***** error<loglrnd: SZ must be mu scalar or mu row vector of non-negative integers.> ... 619s loglrnd (1, 2, 1.2) 619s ***** error<loglrnd: SZ must be mu scalar or mu row vector of non-negative integers.> ... 619s loglrnd (1, 2, ones (2)) 619s ***** error<loglrnd: SZ must be mu scalar or mu row vector of non-negative integers.> ... 619s loglrnd (1, 2, [2 -1 2]) 619s ***** error<loglrnd: SZ must be mu scalar or mu row vector of non-negative integers.> ... 619s loglrnd (1, 2, [2 0 2.5]) 619s ***** error<loglrnd: dimensions must be non-negative integers.> ... 619s loglrnd (1, 2, 2, -1, 5) 619s ***** error<loglrnd: dimensions must be non-negative integers.> ... 619s loglrnd (1, 2, 2, 1.5, 5) 619s ***** error<loglrnd: MU and SIGMA must be scalars or of size SZ.> ... 619s loglrnd (2, ones (2), 3) 619s ***** error<loglrnd: MU and SIGMA must be scalars or of size SZ.> ... 619s loglrnd (2, ones (2), [3, 2]) 619s ***** error<loglrnd: MU and SIGMA must be scalars or of size SZ.> ... 619s loglrnd (2, ones (2), 3, 2) 619s 33 tests, 33 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/vmrnd.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/vmrnd.m 619s ***** assert (size (vmrnd (1, 1)), [1 1]) 619s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 619s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 619s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 619s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 619s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 619s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 619s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 619s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 619s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 619s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 619s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 619s ***** assert (class (vmrnd (1, 1)), "double") 619s ***** assert (class (vmrnd (1, single (1))), "single") 619s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 619s ***** assert (class (vmrnd (single (1), 1)), "single") 619s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 619s ***** error<vmrnd: function called with too few input arguments.> vmrnd () 619s ***** error<vmrnd: function called with too few input arguments.> vmrnd (1) 619s ***** error<vmrnd: MU and K must be of common size or scalars.> ... 619s vmrnd (ones (3), ones (2)) 619s ***** error<vmrnd: MU and K must be of common size or scalars.> ... 619s vmrnd (ones (2), ones (3)) 619s ***** error<vmrnd: MU and K must not be complex.> vmrnd (i, 2, 3) 619s ***** error<vmrnd: MU and K must not be complex.> vmrnd (1, i, 3) 619s ***** error<vmrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s vmrnd (1, 2, -1) 619s ***** error<vmrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s vmrnd (1, 2, 1.2) 619s ***** error<vmrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s vmrnd (1, 2, ones (2)) 619s ***** error<vmrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s vmrnd (1, 2, [2 -1 2]) 619s ***** error<vmrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 619s vmrnd (1, 2, [2 0 2.5]) 619s ***** error<vmrnd: dimensions must be non-negative integers.> ... 619s vmrnd (1, 2, 2, -1, 5) 619s ***** error<vmrnd: dimensions must be non-negative integers.> ... 619s vmrnd (1, 2, 2, 1.5, 5) 619s ***** error<vmrnd: MU and K must be scalars or of size SZ.> ... 619s vmrnd (2, ones (2), 3) 619s ***** error<vmrnd: MU and K must be scalars or of size SZ.> ... 619s vmrnd (2, ones (2), [3, 2]) 619s ***** error<vmrnd: MU and K must be scalars or of size SZ.> ... 619s vmrnd (2, ones (2), 3, 2) 619s 33 tests, 33 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/wblcdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wblcdf.m 619s ***** demo 619s ## Plot various CDFs from the Weibull distribution 619s x = 0:0.001:2.5; 619s p1 = wblcdf (x, 1, 0.5); 619s p2 = wblcdf (x, 1, 1); 619s p3 = wblcdf (x, 1, 1.5); 619s p4 = wblcdf (x, 1, 5); 619s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 619s grid on 619s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 619s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 619s title ("Weibull CDF") 619s xlabel ("values in x") 619s ylabel ("probability") 619s ***** shared x, y 619s x = [-1 0 0.5 1 Inf]; 619s y = [0, 1-exp(-x(2:4)), 1]; 619s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 619s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 619s ***** assert (wblcdf (x, "upper"), 1 - y) 619s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 619s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 619s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 619s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 619s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 619s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 619s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 619s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 619s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 619s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 619s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 619s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 619s ***** error<wblcdf: invalid number of input arguments.> wblcdf () 619s ***** error<wblcdf: invalid number of input arguments.> wblcdf (1,2,3,4,5,6,7) 619s ***** error<wblcdf: invalid argument for upper tail.> wblcdf (1, 2, 3, 4, "uper") 619s ***** error<wblcdf: X, LAMBDA, and K must be of common size or scalars.> ... 619s wblcdf (ones (3), ones (2), ones (2)) 619s ***** error<wblcdf: invalid size of covariance matrix.> wblcdf (2, 3, 4, [1, 2]) 619s ***** error<wblcdf: covariance matrix is required for confidence bounds.> ... 619s [p, plo, pup] = wblcdf (1, 2, 3) 619s ***** error<wblcdf: invalid value for alpha.> [p, plo, pup] = ... 619s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 619s ***** error<wblcdf: invalid value for alpha.> [p, plo, pup] = ... 619s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 619s ***** error<wblcdf: invalid value for alpha.> [p, plo, pup] = ... 619s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 619s ***** error<wblcdf: X, LAMBDA, and K must not be complex.> wblcdf (i, 2, 2) 619s ***** error<wblcdf: X, LAMBDA, and K must not be complex.> wblcdf (2, i, 2) 619s ***** error<wblcdf: X, LAMBDA, and K must not be complex.> wblcdf (2, 2, i) 619s ***** error<wblcdf: bad covariance matrix.> ... 619s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 619s 28 tests, 28 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/gampdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gampdf.m 619s ***** demo 619s ## Plot various PDFs from the Gamma distribution 619s x = 0:0.01:20; 619s y1 = gampdf (x, 1, 2); 619s y2 = gampdf (x, 2, 2); 619s y3 = gampdf (x, 3, 2); 619s y4 = gampdf (x, 5, 1); 619s y5 = gampdf (x, 9, 0.5); 619s y6 = gampdf (x, 7.5, 1); 619s y7 = gampdf (x, 0.5, 1); 619s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 619s x, y5, "-k", x, y6, "-b", x, y7, "-c") 619s grid on 619s ylim ([0,0.5]) 619s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 619s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 619s "α = 0.5, β = 1"}, "location", "northeast") 619s title ("Gamma PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** shared x, y 619s x = [-1 0 0.5 1 Inf]; 619s y = [0 exp(-x(2:end))]; 619s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 619s ***** assert (gampdf (x, 1, ones (1,5)), y) 619s ***** assert (gampdf (x, ones (1,5), 1), y) 619s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 619s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 619s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 619s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 619s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 619s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 619s ***** error<gampdf: function called with too few input arguments.> gampdf () 619s ***** error<gampdf: function called with too few input arguments.> gampdf (1) 619s ***** error<gampdf: function called with too few input arguments.> gampdf (1,2) 619s ***** error<gampdf: X, A, and B must be of common size or scalars.> ... 619s gampdf (ones (3), ones (2), ones (2)) 619s ***** error<gampdf: X, A, and B must be of common size or scalars.> ... 619s gampdf (ones (2), ones (3), ones (2)) 619s ***** error<gampdf: X, A, and B must be of common size or scalars.> ... 619s gampdf (ones (2), ones (2), ones (3)) 619s ***** error<gampdf: X, A, and B must not be complex.> gampdf (i, 2, 2) 619s ***** error<gampdf: X, A, and B must not be complex.> gampdf (2, i, 2) 619s ***** error<gampdf: X, A, and B must not be complex.> gampdf (2, 2, i) 619s 18 tests, 18 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/mvtpdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvtpdf.m 619s ***** demo 619s ## Compute the pdf of a multivariate t distribution with correlation 619s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 619s 619s rho = [1, 0.4; 0.4, 1]; 619s df = 2; 619s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 619s X = [X1(:), X2(:)]; 619s y = mvtpdf (X, rho, df); 619s surf (X1, X2, reshape (y, 25, 25)); 619s title ("Bivariate Student's t probability density function"); 619s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 619s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 619s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 619s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 619s [0.04713313 0.03722421 0.02069011]', 1E-7) 619s 3 tests, 3 passed, 0 known failure, 0 skipped 619s [inst/dist_fun/wblpdf.m] 619s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wblpdf.m 619s ***** demo 619s ## Plot various PDFs from the Weibul distribution 619s x = 0:0.001:2.5; 619s y1 = wblpdf (x, 1, 0.5); 619s y2 = wblpdf (x, 1, 1); 619s y3 = wblpdf (x, 1, 1.5); 619s y4 = wblpdf (x, 1, 5); 619s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 619s grid on 619s ylim ([0, 2.5]) 619s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 619s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 619s title ("Weibul PDF") 619s xlabel ("values in x") 619s ylabel ("density") 619s ***** shared x,y 619s x = [-1 0 0.5 1 Inf]; 619s y = [0, exp(-x(2:4)), NaN]; 619s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 619s ***** assert (wblpdf (x, 1, ones (1,5)), y) 619s ***** assert (wblpdf (x, ones (1,5), 1), y) 619s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 619s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 619s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 619s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 619s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 619s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 619s ***** error wblpdf () 619s ***** error wblpdf (1,2,3,4) 620s ***** error wblpdf (ones (3), ones (2), ones (2)) 620s ***** error wblpdf (ones (2), ones (3), ones (2)) 620s ***** error wblpdf (ones (2), ones (2), ones (3)) 620s ***** error wblpdf (i, 2, 2) 620s ***** error wblpdf (2, i, 2) 620s ***** error wblpdf (2, 2, i) 620s 17 tests, 17 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/mvtcdfqmc.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvtcdfqmc.m 620s ***** error mvtcdfqmc (1, 2, 3); 620s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 620s 2 tests, 2 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/exprnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/exprnd.m 620s ***** assert (size (exprnd (2)), [1, 1]) 620s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 620s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 620s ***** assert (size (exprnd (1, 3)), [3, 3]) 620s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 620s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 620s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 620s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 620s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 620s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 620s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 620s ***** assert (class (exprnd (2)), "double") 620s ***** assert (class (exprnd (single (2))), "single") 620s ***** assert (class (exprnd (single ([2 2]))), "single") 620s ***** error<exprnd: function called with too few input arguments.> exprnd () 620s ***** error<exprnd: MU must not be complex.> exprnd (i) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (1, -1) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (1, 1.2) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (1, ones (2)) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (1, [2 -1 2]) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (1, [2 0 2.5]) 620s ***** error<exprnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s exprnd (ones (2), ones (2)) 620s ***** error<exprnd: dimensions must be non-negative integers.> ... 620s exprnd (1, 2, -1, 5) 620s ***** error<exprnd: dimensions must be non-negative integers.> ... 620s exprnd (1, 2, 1.5, 5) 620s ***** error<exprnd: MU must be scalar or of size SZ.> exprnd (ones (2,2), 3) 620s ***** error<exprnd: MU must be scalar or of size SZ.> exprnd (ones (2,2), [3, 2]) 620s ***** error<exprnd: MU must be scalar or of size SZ.> exprnd (ones (2,2), 2, 3) 620s 27 tests, 27 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/evrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/evrnd.m 620s ***** assert (size (evrnd (1, 1)), [1 1]) 620s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 620s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 620s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 620s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 620s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 620s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 620s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 620s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 620s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 620s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 620s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 620s ***** assert (class (evrnd (1, 1)), "double") 620s ***** assert (class (evrnd (1, single (1))), "single") 620s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 620s ***** assert (class (evrnd (single (1), 1)), "single") 620s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 620s ***** error<evrnd: function called with too few input arguments.> evrnd () 620s ***** error<evrnd: function called with too few input arguments.> evrnd (1) 620s ***** error<evrnd: MU and SIGMA must be of common size or scalars.> ... 620s evrnd (ones (3), ones (2)) 620s ***** error<evrnd: MU and SIGMA must be of common size or scalars.> ... 620s evrnd (ones (2), ones (3)) 620s ***** error<evrnd: MU and SIGMA must not be complex.> evrnd (i, 2, 3) 620s ***** error<evrnd: MU and SIGMA must not be complex.> evrnd (1, i, 3) 620s ***** error<evrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s evrnd (1, 2, -1) 620s ***** error<evrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s evrnd (1, 2, 1.2) 620s ***** error<evrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s evrnd (1, 2, ones (2)) 620s ***** error<evrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s evrnd (1, 2, [2 -1 2]) 620s ***** error<evrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s evrnd (1, 2, [2 0 2.5]) 620s ***** error<evrnd: dimensions must be non-negative integers.> ... 620s evrnd (1, 2, 2, -1, 5) 620s ***** error<evrnd: dimensions must be non-negative integers.> ... 620s evrnd (1, 2, 2, 1.5, 5) 620s ***** error<evrnd: MU and SIGMA must be scalars or of size SZ.> ... 620s evrnd (2, ones (2), 3) 620s ***** error<evrnd: MU and SIGMA must be scalars or of size SZ.> ... 620s evrnd (2, ones (2), [3, 2]) 620s ***** error<evrnd: MU and SIGMA must be scalars or of size SZ.> ... 620s evrnd (2, ones (2), 3, 2) 620s 33 tests, 33 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/burrrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/burrrnd.m 620s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 620s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 620s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 620s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 620s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 620s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 620s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 620s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 620s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 620s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 620s ***** assert (class (burrrnd (1,1,1)), "double") 620s ***** assert (class (burrrnd (single (1),1,1)), "single") 620s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 620s ***** assert (class (burrrnd (1,single (1),1)), "single") 620s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 620s ***** assert (class (burrrnd (1,1,single (1))), "single") 620s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 620s ***** error<burrrnd: function called with too few input arguments.> burrrnd () 620s ***** error<burrrnd: function called with too few input arguments.> burrrnd (1) 620s ***** error<burrrnd: function called with too few input arguments.> burrrnd (1, 2) 620s ***** error<burrrnd: LAMBDA, C, and K must be of common size or scalars.> ... 620s burrrnd (ones (3), ones (2), ones (2)) 620s ***** error<burrrnd: LAMBDA, C, and K must be of common size or scalars.> ... 620s burrrnd (ones (2), ones (3), ones (2)) 620s ***** error<burrrnd: LAMBDA, C, and K must be of common size or scalars.> ... 620s burrrnd (ones (2), ones (2), ones (3)) 620s ***** error<burrrnd: LAMBDA, C, and K must not be complex.> burrrnd (i, 2, 3) 620s ***** error<burrrnd: LAMBDA, C, and K must not be complex.> burrrnd (1, i, 3) 620s ***** error<burrrnd: LAMBDA, C, and K must not be complex.> burrrnd (1, 2, i) 620s ***** error<burrrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s burrrnd (1, 2, 3, -1) 620s ***** error<burrrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s burrrnd (1, 2, 3, 1.2) 620s ***** error<burrrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s burrrnd (1, 2, 3, ones (2)) 620s ***** error<burrrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s burrrnd (1, 2, 3, [2 -1 2]) 620s ***** error<burrrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s burrrnd (1, 2, 3, [2 0 2.5]) 620s ***** error<burrrnd: dimensions must be non-negative integers.> ... 620s burrrnd (1, 2, 3, 2, -1, 5) 620s ***** error<burrrnd: dimensions must be non-negative integers.> ... 620s burrrnd (1, 2, 3, 2, 1.5, 5) 620s ***** error<burrrnd: LAMBDA, C, and K must be scalars or of size SZ.> ... 620s burrrnd (2, ones (2), 2, 3) 620s ***** error<burrrnd: LAMBDA, C, and K must be scalars or of size SZ.> ... 620s burrrnd (2, ones (2), 2, [3, 2]) 620s ***** error<burrrnd: LAMBDA, C, and K must be scalars or of size SZ.> ... 620s burrrnd (2, ones (2), 2, 3, 2) 620s 36 tests, 36 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/unifcdf.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unifcdf.m 620s ***** demo 620s ## Plot various CDFs from the continuous uniform distribution 620s x = 0:0.1:10; 620s p1 = unifcdf (x, 2, 5); 620s p2 = unifcdf (x, 3, 9); 620s plot (x, p1, "-b", x, p2, "-g") 620s grid on 620s xlim ([0, 10]) 620s ylim ([0, 1]) 620s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 620s title ("Continuous uniform CDF") 620s xlabel ("values in x") 620s ylabel ("probability") 620s ***** shared x, y 620s x = [-1 0 0.5 1 2] + 1; 620s y = [0 0 0.5 1 1]; 620s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 620s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 620s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 620s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 620s ***** assert (unifcdf (x, ones (1,5), 2), y) 620s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 620s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 620s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 620s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 620s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 620s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 620s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 620s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 620s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 620s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 620s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 620s ***** error<unifcdf: function called with too few input arguments.> unifcdf () 620s ***** error<unifcdf: function called with too few input arguments.> unifcdf (1) 620s ***** error<unifcdf: function called with too few input arguments.> unifcdf (1, 2) 620s ***** error<unifcdf: invalid argument for upper tail.> unifcdf (1, 2, 3, 4) 620s ***** error<unifcdf: invalid argument for upper tail.> unifcdf (1, 2, 3, "tail") 620s ***** error<unifcdf: X, A, and B must be of common size or scalars.> ... 620s unifcdf (ones (3), ones (2), ones (2)) 620s ***** error<unifcdf: X, A, and B must be of common size or scalars.> ... 620s unifcdf (ones (2), ones (3), ones (2)) 620s ***** error<unifcdf: X, A, and B must be of common size or scalars.> ... 620s unifcdf (ones (2), ones (2), ones (3)) 620s ***** error<unifcdf: X, A, and B must not be complex.> unifcdf (i, 2, 2) 620s ***** error<unifcdf: X, A, and B must not be complex.> unifcdf (2, i, 2) 620s ***** error<unifcdf: X, A, and B must not be complex.> unifcdf (2, 2, i) 620s 27 tests, 27 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/ncfrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ncfrnd.m 620s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 620s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 620s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 620s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 620s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 620s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 620s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 620s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 620s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 620s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 620s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 620s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 620s ***** assert (class (ncfrnd (1, 1, 1)), "double") 620s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 620s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 620s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 620s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 620s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 620s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 620s ***** error<ncfrnd: function called with too few input arguments.> ncfrnd () 620s ***** error<ncfrnd: function called with too few input arguments.> ncfrnd (1) 620s ***** error<ncfrnd: function called with too few input arguments.> ncfrnd (1, 2) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 620s ncfrnd (ones (3), ones (2), ones (2)) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 620s ncfrnd (ones (2), ones (3), ones (2)) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 620s ncfrnd (ones (2), ones (2), ones (3)) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must not be complex.> ncfrnd (i, 2, 3) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must not be complex.> ncfrnd (1, i, 3) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must not be complex.> ncfrnd (1, 2, i) 620s ***** error<ncfrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s ncfrnd (1, 2, 3, -1) 620s ***** error<ncfrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s ncfrnd (1, 2, 3, 1.2) 620s ***** error<ncfrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s ncfrnd (1, 2, 3, ones (2)) 620s ***** error<ncfrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s ncfrnd (1, 2, 3, [2 -1 2]) 620s ***** error<ncfrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s ncfrnd (1, 2, 3, [2 0 2.5]) 620s ***** error<ncfrnd: dimensions must be non-negative integers.> ... 620s ncfrnd (1, 2, 3, 2, -1, 5) 620s ***** error<ncfrnd: dimensions must be non-negative integers.> ... 620s ncfrnd (1, 2, 3, 2, 1.5, 5) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be scalars or of size SZ.> ... 620s ncfrnd (2, ones (2), 2, 3) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be scalars or of size SZ.> ... 620s ncfrnd (2, ones (2), 2, [3, 2]) 620s ***** error<ncfrnd: DF1, DF2, and LAMBDA must be scalars or of size SZ.> ... 620s ncfrnd (2, ones (2), 2, 3, 2) 620s 38 tests, 38 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/nakacdf.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nakacdf.m 620s ***** demo 620s ## Plot various CDFs from the Nakagami distribution 620s x = 0:0.01:3; 620s p1 = nakacdf (x, 0.5, 1); 620s p2 = nakacdf (x, 1, 1); 620s p3 = nakacdf (x, 1, 2); 620s p4 = nakacdf (x, 1, 3); 620s p5 = nakacdf (x, 2, 1); 620s p6 = nakacdf (x, 2, 2); 620s p7 = nakacdf (x, 5, 1); 620s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 620s x, p5, "-k", x, p6, "-b", x, p7, "-c") 620s grid on 620s xlim ([0, 3]) 620s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 620s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 620s "μ = 5, ω = 1"}, "location", "southeast") 620s title ("Nakagami CDF") 620s xlabel ("values in x") 620s ylabel ("probability") 620s ***** shared x, y 620s x = [-1, 0, 1, 2, Inf]; 620s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 620s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 620s ***** assert (nakacdf (x, 1, 1), y, eps) 620s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 620s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 620s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 620s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 620s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 620s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 620s ***** error<nakacdf: function called with too few input arguments.> nakacdf () 620s ***** error<nakacdf: function called with too few input arguments.> nakacdf (1) 620s ***** error<nakacdf: function called with too few input arguments.> nakacdf (1, 2) 620s ***** error<nakacdf: invalid argument for upper tail.> nakacdf (1, 2, 3, "tail") 620s ***** error<nakacdf: invalid argument for upper tail.> nakacdf (1, 2, 3, 4) 620s ***** error<nakacdf: X, MU, and OMEGA must be of common size or scalars.> ... 620s nakacdf (ones (3), ones (2), ones (2)) 620s ***** error<nakacdf: X, MU, and OMEGA must be of common size or scalars.> ... 620s nakacdf (ones (2), ones (3), ones (2)) 620s ***** error<nakacdf: X, MU, and OMEGA must be of common size or scalars.> ... 620s nakacdf (ones (2), ones (2), ones (3)) 620s ***** error<nakacdf: X, MU, and OMEGA must not be complex.> nakacdf (i, 2, 2) 620s ***** error<nakacdf: X, MU, and OMEGA must not be complex.> nakacdf (2, i, 2) 620s ***** error<nakacdf: X, MU, and OMEGA must not be complex.> nakacdf (2, 2, i) 620s 19 tests, 19 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/hninv.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/hninv.m 620s ***** demo 620s ## Plot various iCDFs from the half-normal distribution 620s p = 0.001:0.001:0.999; 620s x1 = hninv (p, 0, 1); 620s x2 = hninv (p, 0, 2); 620s x3 = hninv (p, 0, 3); 620s x4 = hninv (p, 0, 5); 620s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 620s grid on 620s ylim ([0, 10]) 620s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 620s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 620s title ("Half-normal iCDF") 620s xlabel ("probability") 620s ylabel ("x") 620s ***** shared p, x 620s p = [0, 0.3829, 0.6827, 1]; 620s x = [0, 1/2, 1, Inf]; 620s ***** assert (hninv (p, 0, 1), x, 1e-4); 620s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 620s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 620s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 620s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 620s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 620s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 620s ***** error<hninv: function called with too few input arguments.> hninv (1) 620s ***** error<hninv: function called with too few input arguments.> hninv (1, 2) 620s ***** error<hninv: P, MU, and SIGMA must be of common size or scalars.> ... 620s hninv (1, ones (2), ones (3)) 620s ***** error<hninv: P, MU, and SIGMA must be of common size or scalars.> ... 620s hninv (ones (2), 1, ones (3)) 620s ***** error<hninv: P, MU, and SIGMA must be of common size or scalars.> ... 620s hninv (ones (2), ones (3), 1) 620s ***** error<hninv: P, MU, and SIGMA must not be complex.> hninv (i, 2, 3) 620s ***** error<hninv: P, MU, and SIGMA must not be complex.> hninv (1, i, 3) 620s ***** error<hninv: P, MU, and SIGMA must not be complex.> hninv (1, 2, i) 620s 15 tests, 15 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/bvtcdf.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bvtcdf.m 620s ***** test 620s x = [1, 2]; 620s rho = [1, 0.5; 0.5, 1]; 620s df = 4; 620s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 620s ***** test 620s x = [3, 2;2, 4;1, 5]; 620s rho = [1, 0.5; 0.5, 1]; 620s df = 4; 620s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 620s 2 tests, 2 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/nctrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nctrnd.m 620s ***** assert (size (nctrnd (1, 1)), [1 1]) 620s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 620s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 620s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 620s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 620s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 620s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 620s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 620s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 620s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 620s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 620s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 620s ***** assert (class (nctrnd (1, 1)), "double") 620s ***** assert (class (nctrnd (1, single (1))), "single") 620s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 620s ***** assert (class (nctrnd (single (1), 1)), "single") 620s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 620s ***** error<nctrnd: function called with too few input arguments.> nctrnd () 620s ***** error<nctrnd: function called with too few input arguments.> nctrnd (1) 620s ***** error<nctrnd: DF and MU must be of common size or scalars.> ... 620s nctrnd (ones (3), ones (2)) 620s ***** error<nctrnd: DF and MU must be of common size or scalars.> ... 620s nctrnd (ones (2), ones (3)) 620s ***** error<nctrnd: DF and MU must not be complex.> nctrnd (i, 2) 620s ***** error<nctrnd: DF and MU must not be complex.> nctrnd (1, i) 620s ***** error<nctrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s nctrnd (1, 2, -1) 620s ***** error<nctrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s nctrnd (1, 2, 1.2) 620s ***** error<nctrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s nctrnd (1, 2, ones (2)) 620s ***** error<nctrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s nctrnd (1, 2, [2 -1 2]) 620s ***** error<nctrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s nctrnd (1, 2, [2 0 2.5]) 620s ***** error<nctrnd: dimensions must be non-negative integers.> ... 620s nctrnd (1, 2, 2, -1, 5) 620s ***** error<nctrnd: dimensions must be non-negative integers.> ... 620s nctrnd (1, 2, 2, 1.5, 5) 620s ***** error<nctrnd: DF and MU must be scalars or of size SZ.> ... 620s nctrnd (2, ones (2), 3) 620s ***** error<nctrnd: DF and MU must be scalars or of size SZ.> ... 620s nctrnd (2, ones (2), [3, 2]) 620s ***** error<nctrnd: DF and MU must be scalars or of size SZ.> ... 620s nctrnd (2, ones (2), 3, 2) 620s 33 tests, 33 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/betacdf.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/betacdf.m 620s ***** demo 620s ## Plot various CDFs from the Beta distribution 620s x = 0:0.005:1; 620s p1 = betacdf (x, 0.5, 0.5); 620s p2 = betacdf (x, 5, 1); 620s p3 = betacdf (x, 1, 3); 620s p4 = betacdf (x, 2, 2); 620s p5 = betacdf (x, 2, 5); 620s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 620s grid on 620s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 620s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 620s title ("Beta CDF") 620s xlabel ("values in x") 620s ylabel ("probability") 620s ***** shared x, y, x1, x2 620s x = [-1 0 0.5 1 2]; 620s y = [0 0 0.75 1 1]; 620s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 620s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 620s ***** assert (betacdf (x, ones (1, 5), 2), y) 620s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 620s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 620s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 620s x1 = [0.1:0.2:0.9]; 620s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 620s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 620s 1e-14); 620s x2 = [1, 2, 3]; 620s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 620s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 620s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 620s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 620s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 620s ***** error<betacdf: function called with too few input arguments.> betacdf () 620s ***** error<betacdf: function called with too few input arguments.> betacdf (1) 620s ***** error<betacdf: function called with too few input arguments.> betacdf (1, 2) 620s ***** error<betacdf: function called with too many inputs> betacdf (1, 2, 3, 4, 5) 620s ***** error<betacdf: invalid argument for upper tail.> betacdf (1, 2, 3, "tail") 620s ***** error<betacdf: invalid argument for upper tail.> betacdf (1, 2, 3, 4) 620s ***** error<betacdf: X, A, and B must be of common size or scalars.> ... 620s betacdf (ones (3), ones (2), ones (2)) 620s ***** error<betacdf: X, A, and B must be of common size or scalars.> ... 620s betacdf (ones (2), ones (3), ones (2)) 620s ***** error<betacdf: X, A, and B must be of common size or scalars.> ... 620s betacdf (ones (2), ones (2), ones (3)) 620s ***** error<betacdf: X, A, and B must not be complex.> betacdf (i, 2, 2) 620s ***** error<betacdf: X, A, and B must not be complex.> betacdf (2, i, 2) 620s ***** error<betacdf: X, A, and B must not be complex.> betacdf (2, 2, i) 620s 25 tests, 25 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/unidrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unidrnd.m 620s ***** assert (size (unidrnd (2)), [1, 1]) 620s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 620s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 620s ***** assert (size (unidrnd (1, 3)), [3, 3]) 620s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 620s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 620s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 620s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 620s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 620s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 620s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 620s ***** assert (unidrnd (0, 1, 1), NaN) 620s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 620s ***** assert (class (unidrnd (2)), "double") 620s ***** assert (class (unidrnd (single (2))), "single") 620s ***** assert (class (unidrnd (single ([2 2]))), "single") 620s ***** error<unidrnd: function called with too few input arguments.> unidrnd () 620s ***** error<unidrnd: N must not be complex.> unidrnd (i) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (1, -1) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (1, 1.2) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (1, ones (2)) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (1, [2 -1 2]) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (1, [2 0 2.5]) 620s ***** error<unidrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 620s unidrnd (ones (2), ones (2)) 620s ***** error<unidrnd: dimensions must be non-negative integers.> ... 620s unidrnd (1, 2, -1, 5) 620s ***** error<unidrnd: dimensions must be non-negative integers.> ... 620s unidrnd (1, 2, 1.5, 5) 620s ***** error<unidrnd: N must be scalar or of size SZ.> unidrnd (ones (2,2), 3) 620s ***** error<unidrnd: N must be scalar or of size SZ.> unidrnd (ones (2,2), [3, 2]) 620s ***** error<unidrnd: N must be scalar or of size SZ.> unidrnd (ones (2,2), 2, 3) 620s 29 tests, 29 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/mvtrnd.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/mvtrnd.m 620s ***** test 620s rho = [1, 0.5; 0.5, 1]; 620s df = 3; 620s n = 10; 620s r = mvtrnd (rho, df, n); 620s assert (size (r), [10, 2]); 620s ***** test 620s rho = [1, 0.5; 0.5, 1]; 620s df = [2; 3]; 620s n = 2; 620s r = mvtrnd (rho, df, 2); 620s assert (size (r), [2, 2]); 620s 2 tests, 2 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/expcdf.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/expcdf.m 620s ***** demo 620s ## Plot various CDFs from the exponential distribution 620s x = 0:0.01:5; 620s p1 = expcdf (x, 2/3); 620s p2 = expcdf (x, 1.0); 620s p3 = expcdf (x, 2.0); 620s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 620s grid on 620s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 620s title ("Exponential CDF") 620s xlabel ("values in x") 620s ylabel ("probability") 620s ***** shared x, p 620s x = [-1 0 0.5 1 Inf]; 620s p = [0, 1 - exp(-x(2:end)/2)]; 620s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 620s ***** assert (expcdf (x, 2), p, 1e-16) 620s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 620s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 620s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 620s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 620s ***** test 620s [p, plo, pup] = expcdf (1, 2, 3); 620s assert (p, 0.39346934028737, 1e-14); 620s assert (plo, 0.08751307220484, 1e-14); 620s assert (pup, 0.93476821257933, 1e-14); 620s ***** test 620s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 620s assert (p, 0.39346934028737, 1e-14); 620s assert (plo, 0.14466318041675, 1e-14); 620s assert (pup, 0.79808291849140, 1e-14); 620s ***** test 620s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 620s assert (p, 0.60653065971263, 1e-14); 620s assert (plo, 0.20191708150860, 1e-14); 620s assert (pup, 0.85533681958325, 1e-14); 620s ***** error<expcdf: invalid number of input arguments.> expcdf () 620s ***** error<expcdf: invalid number of input arguments.> expcdf (1, 2 ,3 ,4 ,5, 6) 620s ***** error<expcdf: invalid argument for upper tail.> expcdf (1, 2, 3, 4, "uper") 620s ***** error<expcdf: X and MU must be of common size or scalars.> ... 620s expcdf (ones (3), ones (2)) 620s ***** error<expcdf: invalid size of variance, PCOV must be a scalar.> ... 620s expcdf (2, 3, [1, 2]) 620s ***** error<expcdf: variance, PCOV, is required for confidence bounds.> ... 620s [p, plo, pup] = expcdf (1, 2) 620s ***** error<expcdf: invalid value for alpha.> [p, plo, pup] = ... 620s expcdf (1, 2, 3, 0) 620s ***** error<expcdf: invalid value for alpha.> [p, plo, pup] = ... 620s expcdf (1, 2, 3, 1.22) 620s ***** error<expcdf: invalid value for alpha.> [p, plo, pup] = ... 620s expcdf (1, 2, 3, "alpha", "upper") 620s ***** error<expcdf: X and MU must not be complex.> expcdf (i, 2) 620s ***** error<expcdf: X and MU must not be complex.> expcdf (2, i) 620s ***** error<expcdf: variance, PCOV, cannot be negative.> ... 620s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 620s 21 tests, 21 passed, 0 known failure, 0 skipped 620s [inst/dist_fun/finv.m] 620s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/finv.m 620s ***** demo 620s ## Plot various iCDFs from the F distribution 620s p = 0.001:0.001:0.999; 620s x1 = finv (p, 1, 1); 620s x2 = finv (p, 2, 1); 620s x3 = finv (p, 5, 2); 620s x4 = finv (p, 10, 1); 620s x5 = finv (p, 100, 100); 620s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 620s grid on 620s ylim ([0, 4]) 620s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 620s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 620s "df1 = 100, df2 = 100"}, "location", "northwest") 620s title ("F iCDF") 620s xlabel ("probability") 620s ylabel ("values in x") 620s ***** shared p 620s p = [-1 0 0.5 1 2]; 620s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 620s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 620s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 620s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 620s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 620s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 620s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 620s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 621s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 621s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 621s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 621s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 621s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 621s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 621s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 621s ***** error<finv: function called with too few input arguments.> finv () 621s ***** error<finv: function called with too few input arguments.> finv (1) 621s ***** error<finv: function called with too few input arguments.> finv (1,2) 621s ***** error<finv: P, DF1, and DF2 must be of common size or scalars.> ... 621s finv (ones (3), ones (2), ones (2)) 621s ***** error<finv: P, DF1, and DF2 must be of common size or scalars.> ... 621s finv (ones (2), ones (3), ones (2)) 621s ***** error<finv: P, DF1, and DF2 must be of common size or scalars.> ... 621s finv (ones (2), ones (2), ones (3)) 621s ***** error<finv: P, DF1, and DF2 must not be complex.> finv (i, 2, 2) 621s ***** error<finv: P, DF1, and DF2 must not be complex.> finv (2, i, 2) 621s ***** error<finv: P, DF1, and DF2 must not be complex.> finv (2, 2, i) 621s 24 tests, 24 passed, 0 known failure, 0 skipped 621s [inst/dist_fun/nbininv.m] 621s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nbininv.m 621s ***** demo 621s ## Plot various iCDFs from the negative binomial distribution 621s p = 0.001:0.001:0.999; 621s x1 = nbininv (p, 2, 0.15); 621s x2 = nbininv (p, 5, 0.2); 621s x3 = nbininv (p, 4, 0.4); 621s x4 = nbininv (p, 10, 0.3); 621s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 621s grid on 621s ylim ([0, 40]) 621s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 621s "r = 10, ps = 0.3"}, "location", "northwest") 621s title ("Negative binomial iCDF") 621s xlabel ("probability") 621s ylabel ("values in x (number of failures)") 621s ***** shared p 621s p = [-1 0 3/4 1 2]; 621s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 621s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 621s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 621s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 621s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 621s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 621s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 621s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 621s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 621s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 621s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 621s ***** shared y, tol 621s y = magic (3) + 1; 621s tol = 1; 621s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 621s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 621s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 621s ***** error<nbininv: function called with too few input arguments.> nbininv () 621s ***** error<nbininv: function called with too few input arguments.> nbininv (1) 621s ***** error<nbininv: function called with too few input arguments.> nbininv (1, 2) 621s ***** error<nbininv: P, R, and PS must be of common size or scalars.> ... 621s nbininv (ones (3), ones (2), ones (2)) 621s ***** error<nbininv: P, R, and PS must be of common size or scalars.> ... 621s nbininv (ones (2), ones (3), ones (2)) 621s ***** error<nbininv: P, R, and PS must be of common size or scalars.> ... 621s nbininv (ones (2), ones (2), ones (3)) 621s ***** error<nbininv: P, R, and PS must not be complex.> nbininv (i, 2, 2) 621s ***** error<nbininv: P, R, and PS must not be complex.> nbininv (2, i, 2) 621s ***** error<nbininv: P, R, and PS must not be complex.> nbininv (2, 2, i) 621s 23 tests, 23 passed, 0 known failure, 0 skipped 621s [inst/dist_fun/iwishpdf.m] 621s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/iwishpdf.m 621s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 621s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 621s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 621s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 621s ***** error iwishpdf () 621s ***** error iwishpdf (1, 2) 621s ***** error iwishpdf (1, 2, 0) 621s 6 tests, 6 passed, 0 known failure, 0 skipped 621s [inst/dist_fun/bisacdf.m] 621s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/bisacdf.m 621s ***** demo 621s ## Plot various CDFs from the Birnbaum-Saunders distribution 621s x = 0.01:0.01:4; 621s p1 = bisacdf (x, 1, 0.5); 621s p2 = bisacdf (x, 1, 1); 621s p3 = bisacdf (x, 1, 2); 621s p4 = bisacdf (x, 1, 5); 621s p5 = bisacdf (x, 1, 10); 621s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 621s grid on 621s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 621s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 621s title ("Birnbaum-Saunders CDF") 621s xlabel ("values in x") 621s ylabel ("probability") 621s ***** demo 621s ## Plot various CDFs from the Birnbaum-Saunders distribution 621s x = 0.01:0.01:6; 621s p1 = bisacdf (x, 1, 0.3); 621s p2 = bisacdf (x, 2, 0.3); 621s p3 = bisacdf (x, 1, 0.5); 621s p4 = bisacdf (x, 3, 0.5); 621s p5 = bisacdf (x, 5, 0.5); 621s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 621s grid on 621s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 621s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 621s title ("Birnbaum-Saunders CDF") 621s xlabel ("values in x") 621s ylabel ("probability") 621s ***** shared x, y 621s x = [-1, 0, 1, 2, Inf]; 621s y = [0, 0, 1/2, 0.76024993890652337, 1]; 621s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 621s ***** assert (bisacdf (x, 1, 1), y, eps) 621s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 621s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 621s ***** assert (bisacdf (x, 1, 1), y, eps) 621s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 621s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 621s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 621s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 621s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 621s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 621s ***** error<bisacdf: function called with too few input arguments.> bisacdf () 621s ***** error<bisacdf: function called with too few input arguments.> bisacdf (1) 621s ***** error<bisacdf: function called with too few input arguments.> bisacdf (1, 2) 621s ***** error<bisacdf: function called with too many inputs> ... 621s bisacdf (1, 2, 3, 4, 5) 621s ***** error<bisacdf: invalid argument for upper tail.> bisacdf (1, 2, 3, "tail") 621s ***** error<bisacdf: invalid argument for upper tail.> bisacdf (1, 2, 3, 4) 621s ***** error<bisacdf: X, BETA, and GAMMA must be of common size or scalars.> ... 621s bisacdf (ones (3), ones (2), ones(2)) 621s ***** error<bisacdf: X, BETA, and GAMMA must be of common size or scalars.> ... 621s bisacdf (ones (2), ones (3), ones(2)) 621s ***** error<bisacdf: X, BETA, and GAMMA must be of common size or scalars.> ... 621s bisacdf (ones (2), ones (2), ones(3)) 621s ***** error<bisacdf: X, BETA, and GAMMA must not be complex.> bisacdf (i, 4, 3) 621s ***** error<bisacdf: X, BETA, and GAMMA must not be complex.> bisacdf (1, i, 3) 621s ***** error<bisacdf: X, BETA, and GAMMA must not be complex.> bisacdf (1, 4, i) 621s 23 tests, 23 passed, 0 known failure, 0 skipped 621s [inst/dist_fun/nctinv.m] 621s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nctinv.m 621s ***** demo 621s ## Plot various iCDFs from the noncentral T distribution 621s p = 0.001:0.001:0.999; 621s x1 = nctinv (p, 1, 0); 621s x2 = nctinv (p, 4, 0); 621s x3 = nctinv (p, 1, 2); 621s x4 = nctinv (p, 4, 2); 621s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 621s grid on 621s ylim ([-5, 5]) 621s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 621s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 621s title ("Noncentral T iCDF") 621s xlabel ("probability") 621s ylabel ("values in x") 621s ***** demo 621s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 621s ## with the same number of degrees of freedom (10). 621s 621s p = 0.001:0.001:0.999; 621s x1 = nctinv (p, 10, 1); 621s x2 = tinv (p, 10); 621s plot (p, x1, "-", p, x2, "-"); 621s grid on 621s ylim ([-5, 5]) 621s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 621s title ("Noncentral T vs T quantile functions") 621s xlabel ("probability") 621s ylabel ("values in x") 621s ***** test 621s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 621s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 622s ***** test 622s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 622s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 622s ***** test 622s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 622s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 623s ***** test 623s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 623s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 623s ***** test 623s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 623s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 624s ***** test 624s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 624s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 625s ***** test 625s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 627s ***** error<nctinv: function called with too few input arguments.> nctinv () 627s ***** error<nctinv: function called with too few input arguments.> nctinv (1) 627s ***** error<nctinv: function called with too few input arguments.> nctinv (1, 2) 627s ***** error<nctinv: P, DF, and MU must be of common size or scalars.> ... 627s nctinv (ones (3), ones (2), ones (2)) 627s ***** error<nctinv: P, DF, and MU must be of common size or scalars.> ... 627s nctinv (ones (2), ones (3), ones (2)) 627s ***** error<nctinv: P, DF, and MU must be of common size or scalars.> ... 627s nctinv (ones (2), ones (2), ones (3)) 627s ***** error<nctinv: P, DF, and MU must not be complex.> nctinv (i, 2, 2) 627s ***** error<nctinv: P, DF, and MU must not be complex.> nctinv (2, i, 2) 627s ***** error<nctinv: P, DF, and MU must not be complex.> nctinv (2, 2, i) 627s 16 tests, 16 passed, 0 known failure, 0 skipped 627s [inst/dist_fun/wishpdf.m] 627s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/wishpdf.m 627s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 627s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 627s ***** 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); 627s ***** error wishpdf () 627s ***** error wishpdf (1, 2) 627s ***** error wishpdf (1, 2, 0) 627s ***** error wishpdf (1, 2) 627s 7 tests, 7 passed, 0 known failure, 0 skipped 627s [inst/dist_fun/jsupdf.m] 627s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/jsupdf.m 627s ***** error jsupdf () 627s ***** error jsupdf (1, 2, 3, 4) 627s ***** error<jsupdf: X, ALPHA1, and ALPHA2 must be of common size or scalars.> ... 627s jsupdf (1, ones (2), ones (3)) 627s 3 tests, 3 passed, 0 known failure, 0 skipped 627s [inst/dist_fun/binopdf.m] 627s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/binopdf.m 627s ***** demo 627s ## Plot various PDFs from the binomial distribution 627s x = 0:40; 627s y1 = binopdf (x, 20, 0.5); 627s y2 = binopdf (x, 20, 0.7); 627s y3 = binopdf (x, 40, 0.5); 627s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 627s grid on 627s ylim ([0, 0.25]) 627s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 627s "n = 40, ps = 0.5"}, "location", "northeast") 627s title ("Binomial PDF") 627s xlabel ("values in x (number of successes)") 627s ylabel ("density") 627s ***** shared x, y 627s x = [-1 0 1 2 3]; 627s y = [0 1/4 1/2 1/4 0]; 627s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 627s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 627s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 627s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 628s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 628s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 628s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 628s ***** assert (binopdf (1, 1, 1), 1) 628s ***** assert (binopdf (0, 3, 0), 1) 628s ***** assert (binopdf (2, 2, 1), 1) 628s ***** assert (binopdf (1, 2, 1), 0) 628s ***** assert (binopdf (0, 1.1, 0), NaN) 628s ***** assert (binopdf (1, 2, -1), NaN) 628s ***** assert (binopdf (1, 2, 1.5), NaN) 628s ***** assert (binopdf ([], 1, 1), []) 628s ***** assert (binopdf (1, [], 1), []) 628s ***** assert (binopdf (1, 1, []), []) 628s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 628s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 628s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 628s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 628s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 628s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 628s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 628s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 628s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 628s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 628s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 628s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 628s ***** error<binopdf: function called with too few input arguments.> binopdf () 628s ***** error<binopdf: function called with too few input arguments.> binopdf (1) 628s ***** error<binopdf: function called with too few input arguments.> binopdf (1, 2) 628s ***** error<binopdf: function called with too many inputs> binopdf (1, 2, 3, 4) 628s ***** error<binopdf: X, N, and PS must be of common size or scalars.> ... 628s binopdf (ones (3), ones (2), ones (2)) 628s ***** error<binopdf: X, N, and PS must be of common size or scalars.> ... 628s binopdf (ones (2), ones (3), ones (2)) 628s ***** error<binopdf: X, N, and PS must be of common size or scalars.> ... 628s binopdf (ones (2), ones (2), ones (3)) 628s ***** error<binopdf: X, N, and PS must not be complex.> binopdf (i, 2, 2) 628s ***** error<binopdf: X, N, and PS must not be complex.> binopdf (2, i, 2) 628s ***** error<binopdf: X, N, and PS must not be complex.> binopdf (2, 2, i) 628s 39 tests, 39 passed, 0 known failure, 0 skipped 628s [inst/dist_fun/tpdf.m] 628s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tpdf.m 628s ***** demo 628s ## Plot various PDFs from the Student's T distribution 628s x = -5:0.01:5; 628s y1 = tpdf (x, 1); 628s y2 = tpdf (x, 2); 628s y3 = tpdf (x, 5); 628s y4 = tpdf (x, Inf); 628s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 628s grid on 628s xlim ([-5, 5]) 628s ylim ([0, 0.41]) 628s legend ({"df = 1", "df = 2", ... 628s "df = 5", 'df = \infty'}, "location", "northeast") 628s title ("Student's T PDF") 628s xlabel ("values in x") 628s ylabel ("density") 628s ***** test 628s x = rand (10,1); 628s y = 1./(pi * (1 + x.^2)); 628s assert (tpdf (x, 1), y, 5*eps); 628s ***** shared x, y 628s x = [-Inf 0 0.5 1 Inf]; 628s y = 1./(pi * (1 + x.^2)); 628s ***** assert (tpdf (x, ones (1,5)), y, eps) 628s ***** assert (tpdf (x, 1), y, eps) 628s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 628s ***** assert (tpdf (x, Inf), normpdf (x)) 628s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 628s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 628s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 628s ***** error<tpdf: function called with too few input arguments.> tpdf () 628s ***** error<tpdf: function called with too few input arguments.> tpdf (1) 628s ***** error<tpdf: X and DF must be of common size or scalars.> ... 628s tpdf (ones (3), ones (2)) 628s ***** error<tpdf: X and DF must be of common size or scalars.> ... 628s tpdf (ones (2), ones (3)) 628s ***** error<tpdf: X and DF must not be complex.> tpdf (i, 2) 628s ***** error<tpdf: X and DF must not be complex.> tpdf (2, i) 628s 14 tests, 14 passed, 0 known failure, 0 skipped 628s [inst/dist_fun/unidpdf.m] 628s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unidpdf.m 628s ***** demo 628s ## Plot various PDFs from the discrete uniform distribution 628s x = 0:10; 628s y1 = unidpdf (x, 5); 628s y2 = unidpdf (x, 9); 628s plot (x, y1, "*b", x, y2, "*g") 628s grid on 628s xlim ([0, 10]) 628s ylim ([0, 0.25]) 628s legend ({"N = 5", "N = 9"}, "location", "northeast") 628s title ("Descrete uniform PDF") 628s xlabel ("values in x") 628s ylabel ("density") 628s ***** shared x, y 628s x = [-1 0 1 2 10 11]; 628s y = [0 0 0.1 0.1 0.1 0]; 628s ***** assert (unidpdf (x, 10*ones (1,6)), y) 628s ***** assert (unidpdf (x, 10), y) 628s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 628s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 628s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 628s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 628s ***** error<unidpdf: function called with too few input arguments.> unidpdf () 628s ***** error<unidpdf: function called with too few input arguments.> unidpdf (1) 628s ***** error<unidpdf: X and N must be of common size or scalars.> ... 628s unidpdf (ones (3), ones (2)) 628s ***** error<unidpdf: X and N must be of common size or scalars.> ... 628s unidpdf (ones (2), ones (3)) 628s ***** error<unidpdf: X and N must not be complex.> unidpdf (i, 2) 628s ***** error<unidpdf: X and N must not be complex.> unidpdf (2, i) 628s 12 tests, 12 passed, 0 known failure, 0 skipped 628s [inst/dist_fun/gamcdf.m] 628s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gamcdf.m 628s ***** demo 628s ## Plot various CDFs from the Gamma distribution 628s x = 0:0.01:20; 628s p1 = gamcdf (x, 1, 2); 628s p2 = gamcdf (x, 2, 2); 628s p3 = gamcdf (x, 3, 2); 628s p4 = gamcdf (x, 5, 1); 628s p5 = gamcdf (x, 9, 0.5); 628s p6 = gamcdf (x, 7.5, 1); 628s p7 = gamcdf (x, 0.5, 1); 628s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 628s x, p5, "-k", x, p6, "-b", x, p7, "-c") 628s grid on 628s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 628s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 628s "α = 0.5, β = 1"}, "location", "southeast") 628s title ("Gamma CDF") 628s xlabel ("values in x") 628s ylabel ("probability") 628s ***** shared x, y, u 628s x = [-1, 0, 0.5, 1, 2, Inf]; 628s y = [0, gammainc(x(2:end), 1)]; 628s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 628s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 628s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 628s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 628s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 628s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 628s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 628s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 628s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 628s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 628s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 628s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 628s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 628s ***** error<gamcdf: invalid number of input arguments.> gamcdf () 628s ***** error<gamcdf: invalid number of input arguments.> gamcdf (1) 628s ***** error<gamcdf: invalid number of input arguments.> gamcdf (1, 2, 3, 4, 5, 6, 7) 628s ***** error<gamcdf: invalid argument for upper tail.> gamcdf (1, 2, 3, "uper") 628s ***** error<gamcdf: invalid argument for upper tail.> gamcdf (1, 2, 3, 4, 5, "uper") 628s ***** error<gamcdf: invalid size of covariance matrix.> gamcdf (2, 3, 4, [1, 2]) 628s ***** error<gamcdf: covariance matrix is required for confidence bounds.> ... 628s [p, plo, pup] = gamcdf (1, 2, 3) 628s ***** error<gamcdf: covariance matrix is required for confidence bounds.> ... 628s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 628s ***** error<gamcdf: invalid value for alpha.> [p, plo, pup] = ... 628s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 628s ***** error<gamcdf: invalid value for alpha.> [p, plo, pup] = ... 628s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 628s ***** error<gamcdf: invalid value for alpha.> [p, plo, pup] = ... 628s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 628s ***** error<gamcdf: X, A, and B must be of common size or scalars.> ... 628s gamcdf (ones (3), ones (2), ones (2)) 628s ***** error<gamcdf: X, A, and B must be of common size or scalars.> ... 628s gamcdf (ones (2), ones (3), ones (2)) 628s ***** error<gamcdf: X, A, and B must be of common size or scalars.> ... 628s gamcdf (ones (2), ones (2), ones (3)) 628s ***** error<gamcdf: X, A, and B must not be complex.> gamcdf (i, 2, 2) 628s ***** error<gamcdf: X, A, and B must not be complex.> gamcdf (2, i, 2) 628s ***** error<gamcdf: X, A, and B must not be complex.> gamcdf (2, 2, i) 628s ***** error<gamcdf: bad covariance matrix.> ... 628s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 628s 30 tests, 30 passed, 0 known failure, 0 skipped 628s [inst/dist_fun/ricernd.m] 628s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/ricernd.m 628s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 628s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 628s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 628s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 628s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 628s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 628s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 628s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 628s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 628s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 628s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 628s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 628s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 628s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 628s ***** assert (class (ricernd (1, 1)), "double") 628s ***** assert (class (ricernd (1, single (0))), "single") 628s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 628s ***** assert (class (ricernd (1, single (1), 2)), "single") 628s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 628s ***** assert (class (ricernd (single (1), 1, 2)), "single") 628s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 628s ***** error<ricernd: function called with too few input arguments.> ricernd () 628s ***** error<ricernd: function called with too few input arguments.> ricernd (1) 628s ***** error<ricernd: S and SIGMA must be of common size or scalars.> ... 628s ricernd (ones (3), ones (2)) 628s ***** error<ricernd: S and SIGMA must be of common size or scalars.> ... 628s ricernd (ones (2), ones (3)) 628s ***** error<ricernd: S and SIGMA must not be complex.> ricernd (i, 2) 628s ***** error<ricernd: S and SIGMA must not be complex.> ricernd (1, i) 628s ***** error<ricernd: SZ must be a scalar or a row vector of non-negative integers.> ... 628s ricernd (1, 1/2, -1) 628s ***** error<ricernd: SZ must be a scalar or a row vector of non-negative integers.> ... 628s ricernd (1, 1/2, 1.2) 628s ***** error<ricernd: SZ must be a scalar or a row vector of non-negative integers.> ... 628s ricernd (1, 1/2, ones (2)) 628s ***** error<ricernd: SZ must be a scalar or a row vector of non-negative integers.> ... 628s ricernd (1, 1/2, [2 -1 2]) 628s ***** error<ricernd: SZ must be a scalar or a row vector of non-negative integers.> ... 628s ricernd (1, 1/2, [2 0 2.5]) 628s ***** error<ricernd: dimensions must be non-negative integers.> ... 628s ricernd (1, 1/2, 2, -1, 5) 628s ***** error<ricernd: dimensions must be non-negative integers.> ... 628s ricernd (1, 1/2, 2, 1.5, 5) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2, 1/2 * ones (2), 3) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2, 1/2 * ones (2), [3, 2]) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2, 1/2 * ones (2), 3, 2) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2 * ones (2), 1/2, 3) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2 * ones (2), 1/2, [3, 2]) 628s ***** error<ricernd: S and SIGMA must be scalars or of size SZ.> ... 628s ricernd (2 * ones (2), 1/2, 3, 2) 628s 40 tests, 40 passed, 0 known failure, 0 skipped 628s [inst/dist_fun/vminv.m] 628s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/vminv.m 628s ***** demo 628s ## Plot various iCDFs from the von Mises distribution 628s 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]; 628s x1 = vminv (p1, 0, 0.5); 628s x2 = vminv (p1, 0, 1); 628s x3 = vminv (p1, 0, 2); 628s x4 = vminv (p1, 0, 4); 628s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 628s grid on 628s ylim ([-pi, pi]) 628s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 628s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 628s title ("Von Mises iCDF") 628s xlabel ("probability") 628s ylabel ("values in x") 628s ***** shared x, p0, p1 628s x = [-pi:pi/2:pi]; 628s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 628s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 628s ***** assert (vminv (p0, 0, 1), x, 5e-5) 628s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 629s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 629s ***** error<vminv: function called with too few input arguments.> vminv () 629s ***** error<vminv: function called with too few input arguments.> vminv (1) 629s ***** error<vminv: function called with too few input arguments.> vminv (1, 2) 629s ***** error<vminv: P, MU, and K must be of common size or scalars.> ... 629s vminv (ones (3), ones (2), ones (2)) 629s ***** error<vminv: P, MU, and K must be of common size or scalars.> ... 629s vminv (ones (2), ones (3), ones (2)) 629s ***** error<vminv: P, MU, and K must be of common size or scalars.> ... 629s vminv (ones (2), ones (2), ones (3)) 629s ***** error<vminv: P, MU, and K must not be complex.> vminv (i, 2, 2) 629s ***** error<vminv: P, MU, and K must not be complex.> vminv (2, i, 2) 629s ***** error<vminv: P, MU, and K must not be complex.> vminv (2, 2, i) 629s 12 tests, 12 passed, 0 known failure, 0 skipped 629s [inst/dist_fun/geornd.m] 629s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/geornd.m 629s ***** assert (size (geornd (0.5)), [1, 1]) 629s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 629s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 629s ***** assert (size (geornd (0.5, 3)), [3, 3]) 629s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 629s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 629s ***** assert (class (geornd (0.5)), "double") 629s ***** assert (class (geornd (single (0.5))), "single") 629s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 629s ***** assert (class (geornd (single (0))), "single") 629s ***** assert (class (geornd (single (1))), "single") 629s ***** error<geornd: function called with too few input arguments.> geornd () 629s ***** error<geornd: PS must not be complex.> geornd (i) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (1, -1) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (1, 1.2) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (1, ones (2)) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (1, [2 -1 2]) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (1, [2 0 2.5]) 629s ***** error<geornd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s geornd (ones (2), ones (2)) 629s ***** error<geornd: dimensions must be non-negative integers.> ... 629s geornd (1, 2, -1, 5) 629s ***** error<geornd: dimensions must be non-negative integers.> ... 629s geornd (1, 2, 1.5, 5) 629s ***** error<geornd: PS must be scalar or of size SZ.> geornd (ones (2,2), 3) 629s ***** error<geornd: PS must be scalar or of size SZ.> geornd (ones (2,2), [3, 2]) 629s ***** error<geornd: PS must be scalar or of size SZ.> geornd (ones (2,2), 2, 3) 629s 24 tests, 24 passed, 0 known failure, 0 skipped 629s [inst/dist_fun/fcdf.m] 629s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/fcdf.m 629s ***** demo 629s ## Plot various CDFs from the F distribution 629s x = 0.01:0.01:4; 629s p1 = fcdf (x, 1, 2); 629s p2 = fcdf (x, 2, 1); 629s p3 = fcdf (x, 5, 2); 629s p4 = fcdf (x, 10, 1); 629s p5 = fcdf (x, 100, 100); 629s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 629s grid on 629s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 629s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 629s "df1 = 100, df2 = 100"}, "location", "southeast") 629s title ("F CDF") 629s xlabel ("values in x") 629s ylabel ("probability") 629s ***** shared x, y 629s x = [-1, 0, 0.5, 1, 2, Inf]; 629s y = [0, 0, 1/3, 1/2, 2/3, 1]; 629s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 629s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 629s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 629s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 629s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 629s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 629s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 629s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 629s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 629s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 629s ***** error<fcdf: function called with too few input arguments.> fcdf () 629s ***** error<fcdf: function called with too few input arguments.> fcdf (1) 629s ***** error<fcdf: function called with too few input arguments.> fcdf (1, 2) 629s ***** error<fcdf: invalid argument for upper tail.> fcdf (1, 2, 3, 4) 629s ***** error<fcdf: invalid argument for upper tail.> fcdf (1, 2, 3, "tail") 629s ***** error<fcdf: X, DF1, and DF2 must be of common size or scalars.> ... 629s fcdf (ones (3), ones (2), ones (2)) 629s ***** error<fcdf: X, DF1, and DF2 must be of common size or scalars.> ... 629s fcdf (ones (2), ones (3), ones (2)) 629s ***** error<fcdf: X, DF1, and DF2 must be of common size or scalars.> ... 629s fcdf (ones (2), ones (2), ones (3)) 629s ***** error<fcdf: X, DF1, and DF2 must not be complex.> fcdf (i, 2, 2) 629s ***** error<fcdf: X, DF1, and DF2 must not be complex.> fcdf (2, i, 2) 629s ***** error<fcdf: X, DF1, and DF2 must not be complex.> fcdf (2, 2, i) 629s 21 tests, 21 passed, 0 known failure, 0 skipped 629s [inst/dist_fun/unifrnd.m] 629s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/unifrnd.m 629s ***** assert (size (unifrnd (1, 1)), [1 1]) 629s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 629s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 629s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 629s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 629s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 629s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 629s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 629s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 629s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 629s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 629s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 629s ***** assert (class (unifrnd (1, 1)), "double") 629s ***** assert (class (unifrnd (1, single (1))), "single") 629s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 629s ***** assert (class (unifrnd (single (1), 1)), "single") 629s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 629s ***** error<unifrnd: function called with too few input arguments.> unifrnd () 629s ***** error<unifrnd: function called with too few input arguments.> unifrnd (1) 629s ***** error<unifrnd: A and B must be of common size or scalars.> ... 629s unifrnd (ones (3), ones (2)) 629s ***** error<unifrnd: A and B must be of common size or scalars.> ... 629s unifrnd (ones (2), ones (3)) 629s ***** error<unifrnd: A and B must not be complex.> unifrnd (i, 2, 3) 629s ***** error<unifrnd: A and B must not be complex.> unifrnd (1, i, 3) 629s ***** error<unifrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s unifrnd (1, 2, -1) 629s ***** error<unifrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s unifrnd (1, 2, 1.2) 629s ***** error<unifrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s unifrnd (1, 2, ones (2)) 629s ***** error<unifrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s unifrnd (1, 2, [2 -1 2]) 629s ***** error<unifrnd: SZ must be a scalar or a row vector of non-negative integers.> ... 629s unifrnd (1, 2, [2 0 2.5]) 629s ***** error<unifrnd: dimensions must be non-negative integers.> ... 629s unifrnd (1, 2, 2, -1, 5) 629s ***** error<unifrnd: dimensions must be non-negative integers.> ... 629s unifrnd (1, 2, 2, 1.5, 5) 629s ***** error<unifrnd: A and B must be scalars or of size SZ.> ... 629s unifrnd (2, ones (2), 3) 629s ***** error<unifrnd: A and B must be scalars or of size SZ.> ... 629s unifrnd (2, ones (2), [3, 2]) 629s ***** error<unifrnd: A and B must be scalars or of size SZ.> ... 629s unifrnd (2, ones (2), 3, 2) 629s 33 tests, 33 passed, 0 known failure, 0 skipped 629s [inst/dist_fun/binoinv.m] 629s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/binoinv.m 629s ***** demo 629s ## Plot various iCDFs from the binomial distribution 629s p = 0.001:0.001:0.999; 629s x1 = binoinv (p, 20, 0.5); 629s x2 = binoinv (p, 20, 0.7); 629s x3 = binoinv (p, 40, 0.5); 629s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 629s grid on 629s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 629s "n = 40, ps = 0.5"}, "location", "southeast") 629s title ("Binomial iCDF") 629s xlabel ("probability") 629s ylabel ("values in x (number of successes)") 629s ***** shared p 629s p = [-1 0 0.5 1 2]; 629s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 629s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 629s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 629s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 629s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 629s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 629s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 629s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 629s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 629s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 629s ***** shared x, tol 629s x = magic (3) + 1; 629s tol = 1; 629s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 629s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 629s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 629s ***** error<binoinv: function called with too few input arguments.> binoinv () 629s ***** error<binoinv: function called with too few input arguments.> binoinv (1) 629s ***** error<binoinv: function called with too few input arguments.> binoinv (1,2) 629s ***** error<binoinv: function called with too many inputs> binoinv (1,2,3,4) 629s ***** error<binoinv: P, N, and PS must be of common size or scalars.> ... 629s binoinv (ones (3), ones (2), ones (2)) 629s ***** error<binoinv: P, N, and PS must be of common size or scalars.> ... 629s binoinv (ones (2), ones (3), ones (2)) 629s ***** error<binoinv: P, N, and PS must be of common size or scalars.> ... 629s binoinv (ones (2), ones (2), ones (3)) 629s ***** error<binoinv: P, N, and PS must not be complex.> binoinv (i, 2, 2) 629s ***** error<binoinv: P, N, and PS must not be complex.> binoinv (2, i, 2) 629s ***** error<binoinv: P, N, and PS must not be complex.> binoinv (2, 2, i) 629s 23 tests, 23 passed, 0 known failure, 0 skipped 629s [inst/dist_fun/tcdf.m] 629s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tcdf.m 629s ***** demo 629s ## Plot various CDFs from the Student's T distribution 629s x = -5:0.01:5; 629s p1 = tcdf (x, 1); 629s p2 = tcdf (x, 2); 629s p3 = tcdf (x, 5); 629s p4 = tcdf (x, Inf); 629s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 629s grid on 629s xlim ([-5, 5]) 629s ylim ([0, 1]) 629s legend ({"df = 1", "df = 2", ... 629s "df = 5", 'df = \infty'}, "location", "southeast") 629s title ("Student's T CDF") 629s xlabel ("values in x") 629s ylabel ("probability") 629s ***** shared x,y 629s x = [-Inf 0 1 Inf]; 629s y = [0 1/2 3/4 1]; 629s ***** assert (tcdf (x, ones (1,4)), y, eps) 630s ***** assert (tcdf (x, 1), y, eps) 630s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 630s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 630s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 630s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 630s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 630s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 630s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 630s ***** error<tcdf: function called with too few input arguments.> tcdf () 630s ***** error<tcdf: function called with too few input arguments.> tcdf (1) 630s ***** error<tcdf: invalid argument for upper tail.> tcdf (1, 2, "uper") 630s ***** error<tcdf: invalid argument for upper tail.> tcdf (1, 2, 3) 630s ***** error<tcdf: X and DF must be of common size or scalars.> ... 630s tcdf (ones (3), ones (2)) 630s ***** error<tcdf: X and DF must be of common size or scalars.> ... 630s tcdf (ones (3), ones (2)) 630s ***** error<tcdf: X and DF must be of common size or scalars.> ... 630s tcdf (ones (3), ones (2), "upper") 630s ***** error<tcdf: X and DF must not be complex.> tcdf (i, 2) 630s ***** error<tcdf: X and DF must not be complex.> tcdf (2, i) 630s ***** shared tol_rel 630s tol_rel = 10 * eps; 630s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 630s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 630s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 630s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 630s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 630s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 630s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 630s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 630s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 630s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 630s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 630s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 630s 30 tests, 30 passed, 0 known failure, 0 skipped 630s [inst/dist_fun/logicdf.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/logicdf.m 630s ***** demo 630s ## Plot various CDFs from the logistic distribution 630s x = -5:0.01:20; 630s p1 = logicdf (x, 5, 2); 630s p2 = logicdf (x, 9, 3); 630s p3 = logicdf (x, 9, 4); 630s p4 = logicdf (x, 6, 2); 630s p5 = logicdf (x, 2, 1); 630s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 630s grid on 630s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 630s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 630s title ("Logistic CDF") 630s xlabel ("values in x") 630s ylabel ("probability") 630s ***** shared x, y 630s x = [-Inf -log(3) 0 log(3) Inf]; 630s y = [0, 1/4, 1/2, 3/4, 1]; 630s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 630s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 630s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 630s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 630s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 630s ***** error<logicdf: function called with too few input arguments.> logicdf () 630s ***** error<logicdf: function called with too few input arguments.> logicdf (1) 630s ***** error<logicdf: function called with too few input arguments.> ... 630s logicdf (1, 2) 630s ***** error<logicdf: invalid argument for upper tail.> logicdf (1, 2, 3, "tail") 630s ***** error<logicdf: invalid argument for upper tail.> logicdf (1, 2, 3, 4) 630s ***** error<logicdf: X, MU, and SIGMA must be of common size or scalars.> ... 630s logicdf (1, ones (2), ones (3)) 630s ***** error<logicdf: X, MU, and SIGMA must be of common size or scalars.> ... 630s logicdf (ones (2), 1, ones (3)) 630s ***** error<logicdf: X, MU, and SIGMA must be of common size or scalars.> ... 630s logicdf (ones (2), ones (3), 1) 630s ***** error<logicdf: X, MU, and SIGMA must not be complex.> logicdf (i, 2, 3) 630s ***** error<logicdf: X, MU, and SIGMA must not be complex.> logicdf (1, i, 3) 630s ***** error<logicdf: X, MU, and SIGMA must not be complex.> logicdf (1, 2, i) 630s 16 tests, 16 passed, 0 known failure, 0 skipped 630s [inst/dist_fun/chi2rnd.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/chi2rnd.m 630s ***** assert (size (chi2rnd (2)), [1, 1]) 630s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 630s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 630s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 630s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 630s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 630s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 630s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 630s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 630s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 630s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 630s ***** assert (class (chi2rnd (2)), "double") 630s ***** assert (class (chi2rnd (single (2))), "single") 630s ***** assert (class (chi2rnd (single ([2 2]))), "single") 630s ***** error<chi2rnd: function called with too few input arguments.> chi2rnd () 630s ***** error<chi2rnd: DF must not be complex.> chi2rnd (i) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (1, -1) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (1, 1.2) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (1, ones (2)) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (1, [2 -1 2]) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (1, [2 0 2.5]) 630s ***** error<chi2rnd: SZ must be a scalar or a row vector of non-negative integers.> ... 630s chi2rnd (ones (2), ones (2)) 630s ***** error<chi2rnd: dimensions must be non-negative integers.> ... 630s chi2rnd (1, 2, -1, 5) 630s ***** error<chi2rnd: dimensions must be non-negative integers.> ... 630s chi2rnd (1, 2, 1.5, 5) 630s ***** error<chi2rnd: DF must be scalar or of size SZ.> chi2rnd (ones (2,2), 3) 630s ***** error<chi2rnd: DF must be scalar or of size SZ.> chi2rnd (ones (2,2), [3, 2]) 630s ***** error<chi2rnd: DF must be scalar or of size SZ.> chi2rnd (ones (2,2), 2, 3) 630s 27 tests, 27 passed, 0 known failure, 0 skipped 630s [inst/dist_fun/gpinv.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/gpinv.m 630s ***** demo 630s ## Plot various iCDFs from the generalized Pareto distribution 630s p = 0.001:0.001:0.999; 630s x1 = gpinv (p, 1, 1, 0); 630s x2 = gpinv (p, 5, 1, 0); 630s x3 = gpinv (p, 20, 1, 0); 630s x4 = gpinv (p, 1, 2, 0); 630s x5 = gpinv (p, 5, 2, 0); 630s x6 = gpinv (p, 20, 2, 0); 630s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 630s p, x4, "-c", p, x5, "-m", p, x6, "-k") 630s grid on 630s ylim ([0, 5]) 630s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 630s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 630s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 630s "location", "southeast") 630s title ("Generalized Pareto iCDF") 630s xlabel ("probability") 630s ylabel ("values in x") 630s ***** shared p, y1, y2, y3 630s p = [-1, 0, 1/2, 1, 2]; 630s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 630s y2 = [NaN, 0, 1, Inf, NaN]; 630s y3 = [NaN, 0, 1/2, 1, NaN]; 630s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 630s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 630s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 630s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 630s ***** assert (gpinv (p, 0, 1, 0), y1) 630s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 630s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 630s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 630s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 630s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 630s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 630s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 630s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 630s ***** assert (gpinv (p, 1, 1, 0), y2) 630s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 630s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 630s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 630s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 630s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 630s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 630s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 630s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 630s ***** assert (gpinv (p, -1, 1, 0), y3) 630s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 630s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 630s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 630s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 630s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 630s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 630s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 630s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 630s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 630s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 630s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 630s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 630s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 630s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 630s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 630s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 630s ***** error<gpinv: function called with too few input arguments.> gpinv () 630s ***** error<gpinv: function called with too few input arguments.> gpinv (1) 630s ***** error<gpinv: function called with too few input arguments.> gpinv (1, 2) 630s ***** error<gpinv: function called with too few input arguments.> gpinv (1, 2, 3) 630s ***** error<gpinv: P, K, SIGMA, and THETA must be of common size or scalars.> ... 630s gpinv (ones (3), ones (2), ones(2), ones(2)) 630s ***** error<gpinv: P, K, SIGMA, and THETA must be of common size or scalars.> ... 630s gpinv (ones (2), ones (3), ones(2), ones(2)) 630s ***** error<gpinv: P, K, SIGMA, and THETA must be of common size or scalars.> ... 630s gpinv (ones (2), ones (2), ones(3), ones(2)) 630s ***** error<gpinv: P, K, SIGMA, and THETA must be of common size or scalars.> ... 630s gpinv (ones (2), ones (2), ones(2), ones(3)) 630s ***** error<gpinv: P, K, SIGMA, and THETA must not be complex.> gpinv (i, 2, 3, 4) 630s ***** error<gpinv: P, K, SIGMA, and THETA must not be complex.> gpinv (1, i, 3, 4) 630s ***** error<gpinv: P, K, SIGMA, and THETA must not be complex.> gpinv (1, 2, i, 4) 630s ***** error<gpinv: P, K, SIGMA, and THETA must not be complex.> gpinv (1, 2, 3, i) 630s 51 tests, 51 passed, 0 known failure, 0 skipped 630s [inst/dist_fun/nctpdf.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/nctpdf.m 630s ***** demo 630s ## Plot various PDFs from the noncentral T distribution 630s x = -5:0.01:10; 630s y1 = nctpdf (x, 1, 0); 630s y2 = nctpdf (x, 4, 0); 630s y3 = nctpdf (x, 1, 2); 630s y4 = nctpdf (x, 4, 2); 630s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 630s grid on 630s xlim ([-5, 10]) 630s ylim ([0, 0.4]) 630s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 630s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 630s title ("Noncentral T PDF") 630s xlabel ("values in x") 630s ylabel ("density") 630s ***** demo 630s ## Compare the noncentral T PDF with MU = 1 to the T PDF 630s ## with the same number of degrees of freedom (10). 630s 630s x = -5:0.1:5; 630s y1 = nctpdf (x, 10, 1); 630s y2 = tpdf (x, 10); 630s plot (x, y1, "-", x, y2, "-"); 630s grid on 630s xlim ([-5, 5]) 630s ylim ([0, 0.4]) 630s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 630s title ("Noncentral T vs T PDFs") 630s xlabel ("values in x") 630s ylabel ("density") 630s ***** shared x1, df, mu 630s x1 = [-Inf, 2, NaN, 4, Inf]; 630s df = [2, 0, -1, 1, 4]; 630s mu = [1, NaN, 3, -1, 2]; 630s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 630s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 630s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 630s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 630s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 630s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 630s 0.0146500727180389, 0.3082302682110299], 1e-14); 630s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 630s 0.00401787561306999, 0.0972086534042828], 1e-14); 630s ***** error<nctpdf: function called with too few input arguments.> nctpdf () 630s ***** error<nctpdf: function called with too few input arguments.> nctpdf (1) 630s ***** error<nctpdf: function called with too few input arguments.> nctpdf (1, 2) 630s ***** error<nctpdf: X, DF, and MU must be of common size or scalars.> ... 630s nctpdf (ones (3), ones (2), ones (2)) 630s ***** error<nctpdf: X, DF, and MU must be of common size or scalars.> ... 630s nctpdf (ones (2), ones (3), ones (2)) 630s ***** error<nctpdf: X, DF, and MU must be of common size or scalars.> ... 630s nctpdf (ones (2), ones (2), ones (3)) 630s ***** error<nctpdf: X, DF, and MU must not be complex.> nctpdf (i, 2, 2) 630s ***** error<nctpdf: X, DF, and MU must not be complex.> nctpdf (2, i, 2) 630s ***** error<nctpdf: X, DF, and MU must not be complex.> nctpdf (2, 2, i) 630s 16 tests, 16 passed, 0 known failure, 0 skipped 630s [inst/dist_fun/tricdf.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_fun/tricdf.m 630s ***** demo 630s ## Plot various CDFs from the triangular distribution 630s x = 0.001:0.001:10; 630s p1 = tricdf (x, 3, 4, 6); 630s p2 = tricdf (x, 1, 2, 5); 630s p3 = tricdf (x, 2, 3, 9); 630s p4 = tricdf (x, 2, 5, 9); 630s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 630s grid on 630s xlim ([0, 10]) 630s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 630s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 630s "location", "southeast") 630s title ("Triangular CDF") 630s xlabel ("values in x") 630s ylabel ("probability") 630s ***** shared x, y 630s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 630s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 630s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 630s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 630s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 630s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 630s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 630s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 630s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 630s [y(1:2), NaN, y(4:7)], eps) 630s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 630s [y(1:2), NaN, y(4:7)], eps) 630s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 630s [y(1:2), NaN, y(4:7)], eps) 630s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 630s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 630s single ([y, NaN]), eps("single")) 630s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 630s single ([y, NaN]), eps("single")) 630s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 630s single ([y, NaN]), eps("single")) 630s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 630s single ([y, NaN]), eps("single")) 630s ***** error<tricdf: function called with too few input arguments.> tricdf () 630s ***** error<tricdf: function called with too few input arguments.> tricdf (1) 630s ***** error<tricdf: function called with too few input arguments.> tricdf (1, 2) 630s ***** error<tricdf: function called with too few input arguments.> tricdf (1, 2, 3) 630s ***** error<tricdf: function called with too many inputs> ... 630s tricdf (1, 2, 3, 4, 5, 6) 630s ***** error<tricdf: invalid argument for upper tail.> tricdf (1, 2, 3, 4, "tail") 630s ***** error<tricdf: invalid argument for upper tail.> tricdf (1, 2, 3, 4, 5) 630s ***** error<tricdf: X, A, B, and C must be of common size or scalars.> ... 630s tricdf (ones (3), ones (2), ones(2), ones(2)) 630s ***** error<tricdf: X, A, B, and C must be of common size or scalars.> ... 630s tricdf (ones (2), ones (3), ones(2), ones(2)) 630s ***** error<tricdf: X, A, B, and C must be of common size or scalars.> ... 630s tricdf (ones (2), ones (2), ones(3), ones(2)) 630s ***** error<tricdf: X, A, B, and C must be of common size or scalars.> ... 630s tricdf (ones (2), ones (2), ones(2), ones(3)) 630s ***** error<tricdf: X, A, B, and C must not be complex.> tricdf (i, 2, 3, 4) 630s ***** error<tricdf: X, A, B, and C must not be complex.> tricdf (1, i, 3, 4) 630s ***** error<tricdf: X, A, B, and C must not be complex.> tricdf (1, 2, i, 4) 630s ***** error<tricdf: X, A, B, and C must not be complex.> tricdf (1, 2, 3, i) 630s 29 tests, 29 passed, 0 known failure, 0 skipped 630s [inst/dist_obj/UniformDistribution.m] 630s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/UniformDistribution.m 630s ***** shared pd, t 630s pd = UniformDistribution (0, 5); 630s t = truncate (pd, 2, 4); 630s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 630s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 630s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 630s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 630s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 630s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 630s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 630s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 630s ***** assert (iqr (pd), 2.5, 1e-14); 630s ***** assert (iqr (t), 1, 1e-14); 630s ***** assert (mean (pd), 2.5, 1e-14); 630s ***** assert (mean (t), 3, 1e-14); 630s ***** assert (median (pd), 2.5, 1e-14); 630s ***** assert (median (t), 3, 1e-14); 630s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 630s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 630s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 630s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 630s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 630s ***** assert (any (random (t, 1000, 1) < 2), false); 630s ***** assert (any (random (t, 1000, 1) > 4), false); 630s ***** assert (std (pd), 1.4434, 1e-4); 630s ***** assert (std (t), 0.5774, 1e-4); 630s ***** assert (var (pd), 2.0833, 1e-4); 630s ***** assert (var (t), 0.3333, 1e-4); 630s ***** error <UniformDistribution: LOWER must be a real scalar.> ... 630s UniformDistribution (i, 1) 630s ***** error <UniformDistribution: LOWER must be a real scalar.> ... 630s UniformDistribution (Inf, 1) 630s ***** error <UniformDistribution: LOWER must be a real scalar.> ... 630s UniformDistribution ([1, 2], 1) 630s ***** error <UniformDistribution: LOWER must be a real scalar.> ... 630s UniformDistribution ("a", 1) 630s ***** error <UniformDistribution: LOWER must be a real scalar.> ... 630s UniformDistribution (NaN, 1) 630s ***** error <UniformDistribution: UPPER must be a real scalar.> ... 630s UniformDistribution (1, i) 630s ***** error <UniformDistribution: UPPER must be a real scalar.> ... 630s UniformDistribution (1, Inf) 630s ***** error <UniformDistribution: UPPER must be a real scalar.> ... 630s UniformDistribution (1, [1, 2]) 630s ***** error <UniformDistribution: UPPER must be a real scalar.> ... 630s UniformDistribution (1, "a") 630s ***** error <UniformDistribution: UPPER must be a real scalar.> ... 630s UniformDistribution (1, NaN) 630s ***** error <UniformDistribution: LOWER must be less than UPPER.> ... 630s UniformDistribution (2, 1) 630s ***** error <cdf: invalid argument for upper tail.> ... 630s cdf (UniformDistribution, 2, "uper") 630s ***** error <cdf: invalid argument for upper tail.> ... 630s cdf (UniformDistribution, 2, 3) 630s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 630s plot (UniformDistribution, "Parent") 630s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 630s plot (UniformDistribution, "PlotType", 12) 630s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 630s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 630s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 630s plot (UniformDistribution, "PlotType", "pdfcdf") 630s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 630s plot (UniformDistribution, "Discrete", "pdfcdf") 630s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 630s plot (UniformDistribution, "Discrete", [1, 0]) 630s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 630s plot (UniformDistribution, "Discrete", {true}) 630s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 630s plot (UniformDistribution, "Parent", 12) 630s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 630s plot (UniformDistribution, "Parent", "hax") 630s ***** error <plot: invalid NAME for optional argument.> ... 630s plot (UniformDistribution, "invalidNAME", "pdf") 630s ***** error <plot: 'probability' PlotType is not supported for 'UniformDistribution'.> ... 630s plot (UniformDistribution, "PlotType", "probability") 630s ***** error <truncate: missing input argument.> ... 630s truncate (UniformDistribution) 630s ***** error <truncate: missing input argument.> ... 630s truncate (UniformDistribution, 2) 630s ***** error <truncate: invalid lower upper limits.> ... 630s truncate (UniformDistribution, 4, 2) 630s ***** shared pd 630s pd = UniformDistribution (0, 1); 630s pd(2) = UniformDistribution (0, 2); 630s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 630s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 630s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 630s ***** error <mean: requires a scalar probability distribution.> mean (pd) 630s ***** error <median: requires a scalar probability distribution.> median (pd) 630s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 630s ***** error <plot: requires a scalar probability distribution.> plot (pd) 630s ***** error <random: requires a scalar probability distribution.> random (pd) 630s ***** error <std: requires a scalar probability distribution.> std (pd) 631s ***** error <truncate: requires a scalar probability distribution.> ... 631s truncate (pd, 2, 4) 631s ***** error <var: requires a scalar probability distribution.> var (pd) 631s 63 tests, 63 passed, 0 known failure, 0 skipped 631s [inst/dist_obj/InverseGaussianDistribution.m] 631s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/InverseGaussianDistribution.m 631s ***** shared pd, t 631s pd = InverseGaussianDistribution (1, 1); 631s t = truncate (pd, 2, 4); 631s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 631s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 631s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 631s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 631s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 631s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 631s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 631s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 631s ***** assert (iqr (pd), 0.8643, 1e-4); 631s ***** assert (iqr (t), 0.8222, 1e-4); 631s ***** assert (mean (pd), 1); 631s ***** assert (mean (t), 2.6953, 1e-4); 631s ***** assert (median (pd), 0.6758, 1e-4); 631s ***** assert (median (t), 2.5716, 1e-4); 631s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 631s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 631s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 631s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 631s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 631s ***** assert (any (random (t, 1000, 1) < 2), false); 631s ***** assert (any (random (t, 1000, 1) > 4), false); 631s ***** assert (std (pd), 1); 631s ***** assert (std (t), 0.5332, 1e-4); 631s ***** assert (var (pd), 1); 631s ***** assert (var (t), 0.2843, 1e-4); 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution(0, 1) 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution(Inf, 1) 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution(i, 1) 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution("a", 1) 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution([1, 2], 1) 631s ***** error <InverseGaussianDistribution: MU must be a positive real scalar.> ... 631s InverseGaussianDistribution(NaN, 1) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, 0) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, -1) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, Inf) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, i) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, "a") 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, [1, 2]) 631s ***** error <InverseGaussianDistribution: LAMBDA must be a positive real scalar.> ... 631s InverseGaussianDistribution(1, NaN) 631s ***** error <cdf: invalid argument for upper tail.> ... 631s cdf (InverseGaussianDistribution, 2, "uper") 631s ***** error <cdf: invalid argument for upper tail.> ... 631s cdf (InverseGaussianDistribution, 2, 3) 631s ***** shared x 631s x = invgrnd (1, 1, [1, 100]); 631s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha") 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 631s "alpha", {0.05}) 631s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), ... 631s "parameter", {"mu", "lambda", "param"}) 631s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 631s "parameter", {"mu", "lambda", "param"}) 631s ***** error <paramci: unknown distribution parameter.> ... 631s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 631s ***** error <paramci: unknown distribution parameter.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 631s "parameter", "param") 631s ***** error <paramci: invalid NAME for optional argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 631s ***** error <paramci: invalid NAME for optional argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 631s ***** error <paramci: invalid NAME for optional argument.> ... 631s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 631s "parameter", "mu", "NAME", "value") 631s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 631s plot (InverseGaussianDistribution, "Parent") 631s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 631s plot (InverseGaussianDistribution, "PlotType", 12) 631s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 631s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 631s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 631s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 631s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 631s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 631s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 631s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 631s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 631s plot (InverseGaussianDistribution, "Discrete", {true}) 631s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 631s plot (InverseGaussianDistribution, "Parent", 12) 631s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 631s plot (InverseGaussianDistribution, "Parent", "hax") 631s ***** error <plot: invalid NAME for optional argument.> ... 631s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 631s ***** error <plot: no fitted DATA to plot a probability plot.> ... 631s plot (InverseGaussianDistribution, "PlotType", "probability") 631s ***** error <proflik: no fitted data available.> ... 631s proflik (InverseGaussianDistribution, 2) 631s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 631s proflik (InverseGaussianDistribution.fit (x), 3) 631s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 631s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 631s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 631s proflik (InverseGaussianDistribution.fit (x), {1}) 631s ***** error <proflik: SETPARAM must be a numeric vector.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 631s ***** error <proflik: missing VALUE for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 631s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 631s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 631s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 631s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 631s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 631s ***** error <proflik: invalid NAME for optional arguments.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 631s ***** error <proflik: invalid optional argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 631s ***** error <proflik: invalid optional argument.> ... 631s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 631s ***** error <truncate: missing input argument.> ... 631s truncate (InverseGaussianDistribution) 631s ***** error <truncate: missing input argument.> ... 631s truncate (InverseGaussianDistribution, 2) 631s ***** error <truncate: invalid lower upper limits.> ... 631s truncate (InverseGaussianDistribution, 4, 2) 631s ***** shared pd 631s pd = InverseGaussianDistribution(1, 1); 631s pd(2) = InverseGaussianDistribution(1, 3); 631s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 631s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 631s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 631s ***** error <mean: requires a scalar probability distribution.> mean (pd) 631s ***** error <median: requires a scalar probability distribution.> median (pd) 631s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 631s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 631s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 631s ***** error <plot: requires a scalar probability distribution.> plot (pd) 631s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 631s ***** error <random: requires a scalar probability distribution.> random (pd) 631s ***** error <std: requires a scalar probability distribution.> std (pd) 631s ***** error <truncate: requires a scalar probability distribution.> ... 631s truncate (pd, 2, 4) 631s ***** error <var: requires a scalar probability distribution.> var (pd) 631s 96 tests, 96 passed, 0 known failure, 0 skipped 631s [inst/dist_obj/LoglogisticDistribution.m] 631s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/LoglogisticDistribution.m 631s ***** shared pd, t 631s pd = LoglogisticDistribution; 631s t = truncate (pd, 2, 4); 631s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 631s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 631s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 631s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 631s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 631s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 631s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 631s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 631s ***** assert (iqr (pd), 2.6667, 1e-4); 631s ***** assert (iqr (t), 0.9524, 1e-4); 631s ***** assert (mean (pd), Inf); 631s ***** assert (mean (t), 2.8312, 1e-4); 631s ***** assert (median (pd), 1, 1e-4); 631s ***** assert (median (t), 2.75, 1e-4); 631s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 631s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 631s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 631s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 631s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 631s ***** assert (any (random (t, 1000, 1) < 2), false); 631s ***** assert (any (random (t, 1000, 1) > 4), false); 631s ***** assert (std (pd), Inf); 631s ***** assert (std (t), 0.5674, 1e-4); 631s ***** assert (var (pd), Inf); 631s ***** assert (var (t), 0.3220, 1e-4); 631s ***** error <LoglogisticDistribution: MU must be a nonnegative real scalar.> ... 631s LoglogisticDistribution(Inf, 1) 631s ***** error <LoglogisticDistribution: MU must be a nonnegative real scalar.> ... 631s LoglogisticDistribution(i, 1) 631s ***** error <LoglogisticDistribution: MU must be a nonnegative real scalar.> ... 631s LoglogisticDistribution("a", 1) 631s ***** error <LoglogisticDistribution: MU must be a nonnegative real scalar.> ... 631s LoglogisticDistribution([1, 2], 1) 631s ***** error <LoglogisticDistribution: MU must be a nonnegative real scalar.> ... 631s LoglogisticDistribution(NaN, 1) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, 0) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, -1) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, Inf) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, i) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, "a") 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, [1, 2]) 631s ***** error <LoglogisticDistribution: SIGMA must be a positive real scalar.> ... 631s LoglogisticDistribution(1, NaN) 631s ***** error <cdf: invalid argument for upper tail.> ... 631s cdf (LoglogisticDistribution, 2, "uper") 631s ***** error <cdf: invalid argument for upper tail.> ... 631s cdf (LoglogisticDistribution, 2, 3) 631s ***** shared x 631s x = loglrnd (1, 1, [1, 100]); 631s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha") 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha", "") 631s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 631s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 632s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 632s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 632s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 632s "parameter", {"mu", "sigma", "param"}) 632s ***** error <paramci: unknown distribution parameter.> ... 632s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 632s ***** error <paramci: unknown distribution parameter.> ... 632s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 632s ***** error <paramci: invalid NAME for optional argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 632s ***** error <paramci: invalid NAME for optional argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 632s ***** error <paramci: invalid NAME for optional argument.> ... 632s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 632s "parameter", "mu", "NAME", "value") 632s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 632s plot (LoglogisticDistribution, "Parent") 632s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 632s plot (LoglogisticDistribution, "PlotType", 12) 632s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 632s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 632s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 632s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 632s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 632s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 632s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 632s plot (LoglogisticDistribution, "Discrete", [1, 0]) 632s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 632s plot (LoglogisticDistribution, "Discrete", {true}) 632s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 632s plot (LoglogisticDistribution, "Parent", 12) 632s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 632s plot (LoglogisticDistribution, "Parent", "hax") 632s ***** error <plot: invalid NAME for optional argument.> ... 632s plot (LoglogisticDistribution, "invalidNAME", "pdf") 632s ***** error <plot: no fitted DATA to plot a probability plot.> ... 632s plot (LoglogisticDistribution, "PlotType", "probability") 632s ***** error <proflik: no fitted data available.> ... 632s proflik (LoglogisticDistribution, 2) 632s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 632s proflik (LoglogisticDistribution.fit (x), 3) 632s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 632s proflik (LoglogisticDistribution.fit (x), [1, 2]) 632s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 632s proflik (LoglogisticDistribution.fit (x), {1}) 632s ***** error <proflik: SETPARAM must be a numeric vector.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 632s ***** error <proflik: missing VALUE for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display") 632s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 632s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 632s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 632s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 632s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 632s ***** error <proflik: invalid NAME for optional arguments.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 632s ***** error <proflik: invalid optional argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 632s ***** error <proflik: invalid optional argument.> ... 632s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 632s ***** error <truncate: missing input argument.> ... 632s truncate (LoglogisticDistribution) 632s ***** error <truncate: missing input argument.> ... 632s truncate (LoglogisticDistribution, 2) 632s ***** error <truncate: invalid lower upper limits.> ... 632s truncate (LoglogisticDistribution, 4, 2) 632s ***** shared pd 632s pd = LoglogisticDistribution(1, 1); 632s pd(2) = LoglogisticDistribution(1, 3); 632s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 632s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 632s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 632s ***** error <mean: requires a scalar probability distribution.> mean (pd) 632s ***** error <median: requires a scalar probability distribution.> median (pd) 632s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 632s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 632s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 632s ***** error <plot: requires a scalar probability distribution.> plot (pd) 632s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 632s ***** error <random: requires a scalar probability distribution.> random (pd) 632s ***** error <std: requires a scalar probability distribution.> std (pd) 632s ***** error <truncate: requires a scalar probability distribution.> ... 632s truncate (pd, 2, 4) 632s ***** error <var: requires a scalar probability distribution.> var (pd) 632s 95 tests, 95 passed, 0 known failure, 0 skipped 632s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 632s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 632s ***** shared pd, t 632s pd = GeneralizedExtremeValueDistribution; 632s t = truncate (pd, 2, 4); 632s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 632s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 632s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 632s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 632s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 632s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 632s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 633s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 633s ***** assert (iqr (pd), 1.5725, 1e-4); 633s ***** assert (iqr (t), 0.8164, 1e-4); 633s ***** assert (mean (pd), 0.5772, 1e-4); 633s ***** assert (mean (t), 2.7043, 1e-4); 633s ***** assert (median (pd), 0.3665, 1e-4); 633s ***** assert (median (t), 2.5887, 1e-4); 633s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 633s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 633s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 633s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 633s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 633s ***** assert (any (random (t, 1000, 1) < 2), false); 633s ***** assert (any (random (t, 1000, 1) > 4), false); 633s ***** assert (std (pd), 1.2825, 1e-4); 633s ***** assert (std (t), 0.5289, 1e-4); 633s ***** assert (var (pd), 1.6449, 1e-4); 633s ***** assert (var (t), 0.2798, 1e-4); 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(Inf, 1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(i, 1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution("a", 1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(NaN, 1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 0, 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, -1, 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, Inf, 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, i, 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, "a", 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 633s ***** error <GeneralizedExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, NaN, 1) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 1, Inf) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 1, i) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 1, "a") 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 633s ***** error <GeneralizedExtremeValueDistribution: MU must be a real scalar.> ... 633s GeneralizedExtremeValueDistribution(1, 1, NaN) 633s ***** error <cdf: invalid argument for upper tail.> ... 633s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 633s ***** error <cdf: invalid argument for upper tail.> ... 633s cdf (GeneralizedExtremeValueDistribution, 2, 3) 633s ***** shared x 633s x = gevrnd (1, 1, 1, [1, 100]); 633s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 633s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 633s "parameter", "sigma", "alpha", {0.05}) 633s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 633s "parameter", {"k", "sigma", "mu", "param"}) 633s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 633s "parameter", {"k", "sigma", "mu", "param"}) 633s ***** error <paramci: unknown distribution parameter.> ... 633s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 634s ***** error <paramci: unknown distribution parameter.> ... 634s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 634s "parameter", "param") 634s ***** error <paramci: invalid NAME for optional argument.> ... 634s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 634s ***** error <paramci: invalid NAME for optional argument.> ... 634s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 634s "NAME", "value") 634s ***** error <paramci: invalid NAME for optional argument.> ... 634s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 634s "parameter", "sigma", "NAME", "value") 634s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 634s plot (GeneralizedExtremeValueDistribution, "Parent") 634s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 634s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 634s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 634s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 634s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 634s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 634s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 634s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 634s ***** error <plot: invalid NAME for optional argument.> ... 634s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 634s ***** error <plot: no fitted DATA to plot a probability plot.> ... 634s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 634s ***** error <proflik: no fitted data available.> ... 634s proflik (GeneralizedExtremeValueDistribution, 2) 634s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 634s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 634s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 634s ***** error <proflik: SETPARAM must be a numeric vector.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 634s ***** error <proflik: missing VALUE for 'Display' argument.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 634s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 634s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 634s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 635s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 635s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 635s "Display", ["on"; "on"]) 635s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 635s ***** error <proflik: invalid NAME for optional arguments.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 635s ***** error <proflik: invalid optional argument.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 635s ***** error <proflik: invalid optional argument.> ... 635s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 635s "Display", "on") 635s ***** error <truncate: missing input argument.> ... 635s truncate (GeneralizedExtremeValueDistribution) 635s ***** error <truncate: missing input argument.> ... 635s truncate (GeneralizedExtremeValueDistribution, 2) 635s ***** error <truncate: invalid lower upper limits.> ... 635s truncate (GeneralizedExtremeValueDistribution, 4, 2) 635s ***** shared pd 635s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 635s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 635s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 635s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 635s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 635s ***** error <mean: requires a scalar probability distribution.> mean (pd) 635s ***** error <median: requires a scalar probability distribution.> median (pd) 635s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 635s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 635s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 635s ***** error <plot: requires a scalar probability distribution.> plot (pd) 635s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 635s ***** error <random: requires a scalar probability distribution.> random (pd) 635s ***** error <std: requires a scalar probability distribution.> std (pd) 635s ***** error <truncate: requires a scalar probability distribution.> ... 635s truncate (pd, 2, 4) 635s ***** error <var: requires a scalar probability distribution.> var (pd) 635s 100 tests, 100 passed, 0 known failure, 0 skipped 635s [inst/dist_obj/TriangularDistribution.m] 635s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/TriangularDistribution.m 635s ***** shared pd, t 635s pd = TriangularDistribution (0, 3, 5); 635s t = truncate (pd, 2, 4); 635s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 635s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 635s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 635s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 635s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 635s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 635s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 635s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 635s ***** assert (iqr (pd), 1.4824, 1e-4); 635s ***** assert (iqr (t), 0.8678, 1e-4); 635s ***** assert (mean (pd), 2.6667, 1e-4); 635s ***** assert (mean (t), 2.9649, 1e-4); 635s ***** assert (median (pd), 2.7386, 1e-4); 635s ***** assert (median (t), 2.9580, 1e-4); 635s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 635s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 635s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 635s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 635s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 635s ***** assert (any (random (t, 1000, 1) < 2), false); 635s ***** assert (any (random (t, 1000, 1) > 4), false); 635s ***** assert (std (pd), 1.0274, 1e-4); 635s ***** assert (std (t), 0.5369, 1e-4); 635s ***** assert (var (pd), 1.0556, 1e-4); 635s ***** assert (var (t), 0.2882, 1e-4); 635s ***** error <TriangularDistribution: lower limit A must be a real scalar.> ... 635s TriangularDistribution (i, 1, 2) 635s ***** error <TriangularDistribution: lower limit A must be a real scalar.> ... 635s TriangularDistribution (Inf, 1, 2) 635s ***** error <TriangularDistribution: lower limit A must be a real scalar.> ... 635s TriangularDistribution ([1, 2], 1, 2) 635s ***** error <TriangularDistribution: lower limit A must be a real scalar.> ... 635s TriangularDistribution ("a", 1, 2) 635s ***** error <TriangularDistribution: lower limit A must be a real scalar.> ... 635s TriangularDistribution (NaN, 1, 2) 635s ***** error <TriangularDistribution: mode B must be a real scalar.> ... 635s TriangularDistribution (1, i, 2) 635s ***** error <TriangularDistribution: mode B must be a real scalar.> ... 635s TriangularDistribution (1, Inf, 2) 635s ***** error <TriangularDistribution: mode B must be a real scalar.> ... 635s TriangularDistribution (1, [1, 2], 2) 635s ***** error <TriangularDistribution: mode B must be a real scalar.> ... 635s TriangularDistribution (1, "a", 2) 635s ***** error <TriangularDistribution: mode B must be a real scalar.> ... 635s TriangularDistribution (1, NaN, 2) 635s ***** error <TriangularDistribution: upper limit C must be a real scalar.> ... 635s TriangularDistribution (1, 2, i) 635s ***** error <TriangularDistribution: upper limit C must be a real scalar.> ... 635s TriangularDistribution (1, 2, Inf) 635s ***** error <TriangularDistribution: upper limit C must be a real scalar.> ... 635s TriangularDistribution (1, 2, [1, 2]) 635s ***** error <TriangularDistribution: upper limit C must be a real scalar.> ... 635s TriangularDistribution (1, 2, "a") 635s ***** error <TriangularDistribution: upper limit C must be a real scalar.> ... 635s TriangularDistribution (1, 2, NaN) 635s ***** error <TriangularDistribution: lower limit A must be less than upper limit C.> ... 635s TriangularDistribution (1, 1, 1) 635s ***** error <TriangularDistribution: mode B must be within lower limit A and upper limit C.> ... 635s TriangularDistribution (1, 0.5, 2) 635s ***** error <cdf: invalid argument for upper tail.> ... 635s cdf (TriangularDistribution, 2, "uper") 635s ***** error <cdf: invalid argument for upper tail.> ... 635s cdf (TriangularDistribution, 2, 3) 635s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 635s plot (TriangularDistribution, "Parent") 635s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 635s plot (TriangularDistribution, "PlotType", 12) 635s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 635s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 635s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 635s plot (TriangularDistribution, "PlotType", "pdfcdf") 635s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 635s plot (TriangularDistribution, "Discrete", "pdfcdf") 635s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 635s plot (TriangularDistribution, "Discrete", [1, 0]) 635s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 635s plot (TriangularDistribution, "Discrete", {true}) 635s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 635s plot (TriangularDistribution, "Parent", 12) 635s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 635s plot (TriangularDistribution, "Parent", "hax") 635s ***** error <plot: invalid NAME for optional argument.> ... 635s plot (TriangularDistribution, "invalidNAME", "pdf") 635s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 635s plot (TriangularDistribution, "PlotType", "probability") 635s ***** error <truncate: missing input argument.> ... 635s truncate (TriangularDistribution) 635s ***** error <truncate: missing input argument.> ... 635s truncate (TriangularDistribution, 2) 635s ***** error <truncate: invalid lower upper limits.> ... 635s truncate (TriangularDistribution, 4, 2) 635s ***** shared pd 635s pd = TriangularDistribution (0, 1, 2); 635s pd(2) = TriangularDistribution (0, 1, 2); 635s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 635s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 635s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 635s ***** error <mean: requires a scalar probability distribution.> mean (pd) 635s ***** error <median: requires a scalar probability distribution.> median (pd) 635s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 635s ***** error <plot: requires a scalar probability distribution.> plot (pd) 635s ***** error <random: requires a scalar probability distribution.> random (pd) 635s ***** error <std: requires a scalar probability distribution.> std (pd) 635s ***** error <truncate: requires a scalar probability distribution.> ... 635s truncate (pd, 2, 4) 635s ***** error <var: requires a scalar probability distribution.> var (pd) 635s 69 tests, 69 passed, 0 known failure, 0 skipped 635s [inst/dist_obj/MultinomialDistribution.m] 635s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/MultinomialDistribution.m 635s ***** shared pd, t 635s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 635s t = truncate (pd, 2, 4); 635s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 635s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 635s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 635s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 635s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 635s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 635s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 635s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 635s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 635s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 635s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 635s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 635s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 635s ***** assert (iqr (pd), 2); 635s ***** assert (iqr (t), 2); 635s ***** assert (mean (pd), 3.3, 1e-14); 635s ***** assert (mean (t), 3, eps); 635s ***** assert (median (pd), 3); 635s ***** assert (median (t), 3); 635s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 635s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 635s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 635s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 635s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 635s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 635s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 635s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 635s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 635s ***** assert (std (pd), 1.4177, 1e-4); 635s ***** assert (std (t), 0.7559, 1e-4); 635s ***** assert (var (pd), 2.0100, 1e-4); 635s ***** assert (var (t), 0.5714, 1e-4); 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution(0) 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution(-1) 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution(Inf) 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution(i) 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution("a") 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution([1, 2]) 635s ***** error <MultinomialDistribution: PROBABILITIES must be a vector of positive real scalars that sum up to 1.> ... 635s MultinomialDistribution(NaN) 635s ***** error <cdf: invalid argument for upper tail.> ... 635s cdf (MultinomialDistribution, 2, "uper") 635s ***** error <cdf: invalid argument for upper tail.> ... 635s cdf (MultinomialDistribution, 2, 3) 635s ***** error <cdf: X must be real.> ... 635s cdf (MultinomialDistribution, i) 635s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 635s plot (MultinomialDistribution, "Parent") 635s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 635s plot (MultinomialDistribution, "PlotType", 12) 635s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 635s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 635s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 635s plot (MultinomialDistribution, "PlotType", "pdfcdf") 635s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 635s plot (MultinomialDistribution, "Discrete", "pdfcdf") 635s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 635s plot (MultinomialDistribution, "Discrete", [1, 0]) 636s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 636s plot (MultinomialDistribution, "Discrete", {true}) 636s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 636s plot (MultinomialDistribution, "Parent", 12) 636s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 636s plot (MultinomialDistribution, "Parent", "hax") 636s ***** error <plot: invalid NAME for optional argument.> ... 636s plot (MultinomialDistribution, "invalidNAME", "pdf") 636s ***** error <plot: 'probability' PlotType is not supported for 'MultinomialDistribution'.> ... 636s plot (MultinomialDistribution, "PlotType", "probability") 636s ***** error <truncate: is_nan input argument.> ... 636s truncate (MultinomialDistribution) 636s ***** error <truncate: is_nan input argument.> ... 636s truncate (MultinomialDistribution, 2) 636s ***** error <truncate: invalid lower upper limits.> ... 636s truncate (MultinomialDistribution, 4, 2) 636s ***** shared pd 636s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 636s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 636s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 636s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 636s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 636s ***** error <mean: requires a scalar probability distribution.> mean (pd) 636s ***** error <median: requires a scalar probability distribution.> median (pd) 636s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 636s ***** error <plot: requires a scalar probability distribution.> plot (pd) 636s ***** error <random: requires a scalar probability distribution.> random (pd) 636s ***** error <std: requires a scalar probability distribution.> std (pd) 636s ***** error <truncate: requires a scalar probability distribution.> ... 636s truncate (pd, 2, 4) 636s ***** error <var: requires a scalar probability distribution.> var (pd) 636s 64 tests, 64 passed, 0 known failure, 0 skipped 636s [inst/dist_obj/NegativeBinomialDistribution.m] 636s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/NegativeBinomialDistribution.m 636s ***** shared pd, t, t_inf 636s pd = NegativeBinomialDistribution (5, 0.5); 636s t = truncate (pd, 2, 4); 636s t_inf = truncate (pd, 2, Inf); 636s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 636s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 636s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 636s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 636s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 636s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 636s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 636s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 636s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 636s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 636s ***** assert (iqr (pd), 4); 636s ***** assert (iqr (t), 2); 636s ***** assert (mean (pd), 5); 636s ***** assert (mean (t), 3.0500, 1e-4); 636s ***** assert (mean (t_inf), 5.5263, 1e-4); 636s ***** assert (median (pd), 4); 636s ***** assert (median (t), 3); 636s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 636s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 636s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 636s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 636s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 636s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 636s ***** assert (any (random (t, 1000, 1) < 2), false); 636s ***** assert (any (random (t, 1000, 1) > 4), false); 636s ***** assert (std (pd), 3.1623, 1e-4); 636s ***** assert (std (t), 0.8047, 1e-4); 636s ***** assert (std (t_inf), 2.9445, 1e-4); 636s ***** assert (var (pd), 10); 636s ***** assert (var (t), 0.6475, 1e-4); 636s ***** assert (var (t_inf), 8.6704, 1e-4); 636s ***** error <NegativeBinomialDistribution: R must be a positive scalar.> ... 636s NegativeBinomialDistribution(Inf, 1) 636s ***** error <NegativeBinomialDistribution: R must be a positive scalar.> ... 636s NegativeBinomialDistribution(i, 1) 636s ***** error <NegativeBinomialDistribution: R must be a positive scalar.> ... 636s NegativeBinomialDistribution("a", 1) 636s ***** error <NegativeBinomialDistribution: R must be a positive scalar.> ... 636s NegativeBinomialDistribution([1, 2], 1) 636s ***** error <NegativeBinomialDistribution: R must be a positive scalar.> ... 636s NegativeBinomialDistribution(NaN, 1) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, 0) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, -1) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, Inf) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, i) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, "a") 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, [1, 2]) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, NaN) 636s ***** error <NegativeBinomialDistribution: P must be a real scalar bounded in the range> ... 636s NegativeBinomialDistribution(1, 1.2) 636s ***** error <cdf: invalid argument for upper tail.> ... 636s cdf (NegativeBinomialDistribution, 2, "uper") 636s ***** error <cdf: invalid argument for upper tail.> ... 636s cdf (NegativeBinomialDistribution, 2, 3) 636s ***** shared x 636s x = nbinrnd (1, 0.5, [1, 100]); 636s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha") 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 636s "alpha", {0.05}) 636s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), ... 636s "parameter", {"R", "P", "param"}) 636s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 636s "parameter", {"R", "P", "param"}) 636s ***** error <paramci: unknown distribution parameter.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 636s ***** error <paramci: unknown distribution parameter.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 636s "parameter", "param") 636s ***** error <paramci: invalid NAME for optional argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 636s ***** error <paramci: invalid NAME for optional argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 636s "NAME", "value") 636s ***** error <paramci: invalid NAME for optional argument.> ... 636s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 636s "parameter", "R", "NAME", "value") 636s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 636s plot (NegativeBinomialDistribution, "Parent") 636s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 636s plot (NegativeBinomialDistribution, "PlotType", 12) 636s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 636s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 636s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 636s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 636s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 636s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 636s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 636s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 636s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 636s plot (NegativeBinomialDistribution, "Discrete", {true}) 636s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 636s plot (NegativeBinomialDistribution, "Parent", 12) 636s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 636s plot (NegativeBinomialDistribution, "Parent", "hax") 636s ***** error <plot: invalid NAME for optional argument.> ... 636s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 636s ***** error <plot: no fitted DATA to plot a probability plot.> ... 636s plot (NegativeBinomialDistribution, "PlotType", "probability") 636s ***** error <proflik: no fitted data available.> ... 636s proflik (NegativeBinomialDistribution, 2) 636s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 3) 636s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 636s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 636s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 636s proflik (NegativeBinomialDistribution.fit (x), {1}) 636s ***** error <proflik: SETPARAM must be a numeric vector.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 636s ***** error <proflik: missing VALUE for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 636s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 636s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 636s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 636s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 636s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 636s ***** error <proflik: invalid NAME for optional arguments.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 636s ***** error <proflik: invalid optional argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 636s ***** error <proflik: invalid optional argument.> ... 636s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 636s ***** error <truncate: missing input argument.> ... 636s truncate (NegativeBinomialDistribution) 636s ***** error <truncate: missing input argument.> ... 636s truncate (NegativeBinomialDistribution, 2) 636s ***** error <truncate: invalid lower upper limits.> ... 636s truncate (NegativeBinomialDistribution, 4, 2) 636s ***** shared pd 636s pd = NegativeBinomialDistribution(1, 0.5); 636s pd(2) = NegativeBinomialDistribution(1, 0.6); 636s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 636s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 636s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 636s ***** error <mean: requires a scalar probability distribution.> mean (pd) 636s ***** error <median: requires a scalar probability distribution.> median (pd) 636s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 636s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 636s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 636s ***** error <plot: requires a scalar probability distribution.> plot (pd) 636s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 636s ***** error <random: requires a scalar probability distribution.> random (pd) 636s ***** error <std: requires a scalar probability distribution.> std (pd) 636s ***** error <truncate: requires a scalar probability distribution.> ... 636s truncate (pd, 2, 4) 636s ***** error <var: requires a scalar probability distribution.> var (pd) 636s 102 tests, 102 passed, 0 known failure, 0 skipped 636s [inst/dist_obj/GeneralizedParetoDistribution.m] 636s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/GeneralizedParetoDistribution.m 636s ***** shared pd, t 636s pd = GeneralizedParetoDistribution (1, 1, 1); 636s t = truncate (pd, 2, 4); 636s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 636s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 636s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 636s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 636s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 636s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 636s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 636s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 636s ***** assert (iqr (pd), 2.6667, 1e-4); 636s ***** assert (iqr (t), 0.9143, 1e-4); 636s ***** assert (mean (pd), Inf); 636s ***** assert (mean (t), 2.7726, 1e-4); 636s ***** assert (median (pd), 2); 636s ***** assert (median (t), 2.6667, 1e-4); 636s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 636s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 636s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 636s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 636s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 636s ***** assert (any (random (t, 1000, 1) < 2), false); 636s ***** assert (any (random (t, 1000, 1) > 4), false); 636s ***** assert (std (pd), Inf); 636s ***** assert (std (t), 0.5592, 1e-4); 636s ***** assert (var (pd), Inf); 636s ***** assert (var (t), 0.3128, 1e-4); 636s ***** error <GeneralizedParetoDistribution: MU must be a real scalar.> ... 636s GeneralizedParetoDistribution(Inf, 1, 1) 636s ***** error <GeneralizedParetoDistribution: MU must be a real scalar.> ... 636s GeneralizedParetoDistribution(i, 1, 1) 636s ***** error <GeneralizedParetoDistribution: MU must be a real scalar.> ... 636s GeneralizedParetoDistribution("a", 1, 1) 636s ***** error <GeneralizedParetoDistribution: MU must be a real scalar.> ... 636s GeneralizedParetoDistribution([1, 2], 1, 1) 636s ***** error <GeneralizedParetoDistribution: MU must be a real scalar.> ... 636s GeneralizedParetoDistribution(NaN, 1, 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, 0, 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, -1, 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, Inf, 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, i, 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, "a", 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, [1, 2], 1) 636s ***** error <GeneralizedParetoDistribution: SIGMA must be a positive real scalar.> ... 636s GeneralizedParetoDistribution(1, NaN, 1) 636s ***** error <GeneralizedParetoDistribution: THETA must be a real scalar.> ... 636s GeneralizedParetoDistribution(1, 1, Inf) 636s ***** error <GeneralizedParetoDistribution: THETA must be a real scalar.> ... 636s GeneralizedParetoDistribution(1, 1, i) 636s ***** error <GeneralizedParetoDistribution: THETA must be a real scalar.> ... 636s GeneralizedParetoDistribution(1, 1, "a") 636s ***** error <GeneralizedParetoDistribution: THETA must be a real scalar.> ... 636s GeneralizedParetoDistribution(1, 1, [1, 2]) 636s ***** error <GeneralizedParetoDistribution: THETA must be a real scalar.> ... 636s GeneralizedParetoDistribution(1, 1, NaN) 636s ***** error <cdf: invalid argument for upper tail.> ... 636s cdf (GeneralizedParetoDistribution, 2, "uper") 636s ***** error <cdf: invalid argument for upper tail.> ... 636s cdf (GeneralizedParetoDistribution, 2, 3) 636s ***** shared x 636s x = gprnd (1, 1, 1, [1, 100]); 636s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 636s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 636s "parameter", "sigma", "alpha", {0.05}) 636s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 636s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 636s "parameter", {"k", "sigma", "param"}) 637s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 637s "parameter", {"k", "sigma", "param"}) 637s ***** error <paramci: unknown distribution parameter.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 637s ***** error <paramci: unknown distribution parameter.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 637s "parameter", "param") 637s ***** error <paramci: invalid NAME for optional argument.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 637s ***** error <paramci: invalid NAME for optional argument.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 637s "NAME", "value") 637s ***** error <paramci: invalid NAME for optional argument.> ... 637s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 637s "parameter", "sigma", "NAME", "value") 637s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 637s plot (GeneralizedParetoDistribution, "Parent") 637s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 637s plot (GeneralizedParetoDistribution, "PlotType", 12) 637s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 637s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 637s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 637s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 637s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 637s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 637s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 637s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 637s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 637s plot (GeneralizedParetoDistribution, "Discrete", {true}) 637s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 637s plot (GeneralizedParetoDistribution, "Parent", 12) 637s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 637s plot (GeneralizedParetoDistribution, "Parent", "hax") 637s ***** error <plot: invalid NAME for optional argument.> ... 637s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 637s ***** error <plot: no fitted DATA to plot a probability plot.> ... 637s plot (GeneralizedParetoDistribution, "PlotType", "probability") 637s ***** error <proflik: no fitted data available.> ... 637s proflik (GeneralizedParetoDistribution, 2) 637s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 637s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 637s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 637s ***** error <proflik: SETPARAM must be a numeric vector.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 637s ***** error <proflik: missing VALUE for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 637s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 637s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 637s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 637s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 637s "Display", ["on"; "on"]) 637s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 637s ***** error <proflik: invalid NAME for optional arguments.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 637s ***** error <proflik: invalid optional argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 637s ***** error <proflik: invalid optional argument.> ... 637s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 637s "Display", "on") 637s ***** error <truncate: missing input argument.> ... 637s truncate (GeneralizedParetoDistribution) 637s ***** error <truncate: missing input argument.> ... 637s truncate (GeneralizedParetoDistribution, 2) 637s ***** error <truncate: invalid lower upper limits.> ... 637s truncate (GeneralizedParetoDistribution, 4, 2) 637s ***** shared pd 637s pd = GeneralizedParetoDistribution(1, 1, 1); 637s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 637s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 637s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 637s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 637s ***** error <mean: requires a scalar probability distribution.> mean (pd) 637s ***** error <median: requires a scalar probability distribution.> median (pd) 637s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 637s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 637s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 637s ***** error <plot: requires a scalar probability distribution.> plot (pd) 637s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 637s ***** error <random: requires a scalar probability distribution.> random (pd) 637s ***** error <std: requires a scalar probability distribution.> std (pd) 637s ***** error <truncate: requires a scalar probability distribution.> ... 637s truncate (pd, 2, 4) 637s ***** error <var: requires a scalar probability distribution.> var (pd) 637s 100 tests, 100 passed, 0 known failure, 0 skipped 637s [inst/dist_obj/HalfNormalDistribution.m] 637s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/HalfNormalDistribution.m 637s ***** shared pd, t 637s pd = HalfNormalDistribution (0, 1); 637s t = truncate (pd, 2, 4); 637s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 637s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 637s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 637s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 637s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 637s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 637s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 637s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 637s ***** assert (iqr (pd), 0.8317, 1e-4); 637s ***** assert (iqr (t), 0.4111, 1e-4); 637s ***** assert (mean (pd), 0.7979, 1e-4); 637s ***** assert (mean (t), 2.3706, 1e-4); 637s ***** assert (median (pd), 0.6745, 1e-4); 637s ***** assert (median (t), 2.2771, 1e-4); 637s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 637s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 637s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 637s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 637s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 637s ***** assert (any (random (t, 1000, 1) < 2), false); 637s ***** assert (any (random (t, 1000, 1) > 4), false); 637s ***** assert (std (pd), 0.6028, 1e-4); 637s ***** assert (std (t), 0.3310, 1e-4); 637s ***** assert (var (pd), 0.3634, 1e-4); 637s ***** assert (var (t), 0.1096, 1e-4); 637s ***** error <HalfNormalDistribution: MU must be a real scalar.> ... 637s HalfNormalDistribution(Inf, 1) 637s ***** error <HalfNormalDistribution: MU must be a real scalar.> ... 637s HalfNormalDistribution(i, 1) 637s ***** error <HalfNormalDistribution: MU must be a real scalar.> ... 637s HalfNormalDistribution("a", 1) 637s ***** error <HalfNormalDistribution: MU must be a real scalar.> ... 637s HalfNormalDistribution([1, 2], 1) 637s ***** error <HalfNormalDistribution: MU must be a real scalar.> ... 637s HalfNormalDistribution(NaN, 1) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, 0) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, -1) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, Inf) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, i) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, "a") 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, [1, 2]) 637s ***** error <HalfNormalDistribution: SIGMA must be a positive real scalar.> ... 637s HalfNormalDistribution(1, NaN) 637s ***** error <cdf: invalid argument for upper tail.> ... 637s cdf (HalfNormalDistribution, 2, "uper") 637s ***** error <cdf: invalid argument for upper tail.> ... 637s cdf (HalfNormalDistribution, 2, 3) 637s ***** shared x 637s x = hnrnd (1, 1, [1, 100]); 637s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 637s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 637s "alpha", {0.05}) 637s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), ... 637s "parameter", {"mu", "sigma", "param"}) 637s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 637s "parameter", {"mu", "sigma", "param"}) 637s ***** error <paramci: unknown distribution parameter.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 637s ***** error <paramci: unknown distribution parameter.> ... 637s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 637s "parameter", "param") 637s ***** error <paramci: invalid NAME for optional argument.> ... 637s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 638s ***** error <paramci: invalid NAME for optional argument.> ... 638s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 638s "NAME", "value") 638s ***** error <paramci: invalid NAME for optional argument.> ... 638s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 638s "parameter", "sigma", "NAME", "value") 638s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 638s plot (HalfNormalDistribution, "Parent") 638s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 638s plot (HalfNormalDistribution, "PlotType", 12) 638s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 638s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 638s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 638s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (HalfNormalDistribution, "Discrete", [1, 0]) 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (HalfNormalDistribution, "Discrete", {true}) 638s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 638s plot (HalfNormalDistribution, "Parent", 12) 638s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 638s plot (HalfNormalDistribution, "Parent", "hax") 638s ***** error <plot: invalid NAME for optional argument.> ... 638s plot (HalfNormalDistribution, "invalidNAME", "pdf") 638s ***** error <plot: no fitted DATA to plot a probability plot.> ... 638s plot (HalfNormalDistribution, "PlotType", "probability") 638s ***** error <proflik: no fitted data available.> ... 638s proflik (HalfNormalDistribution, 2) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 3) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), {1}) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 1) 638s ***** error <proflik: SETPARAM must be a numeric vector.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 638s ***** error <proflik: missing VALUE for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 638s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 638s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 638s ***** error <proflik: invalid NAME for optional arguments.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 638s ***** error <proflik: invalid optional argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 638s ***** error <proflik: invalid optional argument.> ... 638s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 638s "Display", "on") 638s ***** error <truncate: missing input argument.> ... 638s truncate (HalfNormalDistribution) 638s ***** error <truncate: missing input argument.> ... 638s truncate (HalfNormalDistribution, 2) 638s ***** error <truncate: invalid lower upper limits.> ... 638s truncate (HalfNormalDistribution, 4, 2) 638s ***** shared pd 638s pd = HalfNormalDistribution(1, 1); 638s pd(2) = HalfNormalDistribution(1, 3); 638s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 638s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 638s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 638s ***** error <mean: requires a scalar probability distribution.> mean (pd) 638s ***** error <median: requires a scalar probability distribution.> median (pd) 638s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 638s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 638s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 638s ***** error <plot: requires a scalar probability distribution.> plot (pd) 638s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 638s ***** error <random: requires a scalar probability distribution.> random (pd) 638s ***** error <std: requires a scalar probability distribution.> std (pd) 638s ***** error <truncate: requires a scalar probability distribution.> ... 638s truncate (pd, 2, 4) 638s ***** error <var: requires a scalar probability distribution.> var (pd) 638s 96 tests, 96 passed, 0 known failure, 0 skipped 638s [inst/dist_obj/PoissonDistribution.m] 638s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/PoissonDistribution.m 638s ***** shared pd, t, t_inf 638s pd = PoissonDistribution; 638s t = truncate (pd, 2, 4); 638s t_inf = truncate (pd, 2, Inf); 638s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 638s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 638s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 638s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 638s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 638s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 638s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 638s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 638s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 638s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 638s ***** assert (iqr (pd), 2); 638s ***** assert (iqr (t), 1); 638s ***** assert (mean (pd), 1); 638s ***** assert (mean (t), 2.3529, 1e-4); 638s ***** assert (mean (t_inf), 2.3922, 1e-4); 638s ***** assert (median (pd), 1); 638s ***** assert (median (t), 2); 638s ***** assert (median (t_inf), 2); 638s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 638s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 638s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 638s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 638s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 638s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 638s ***** assert (any (random (t, 1000, 1) < 2), false); 638s ***** assert (any (random (t, 1000, 1) > 4), false); 638s ***** assert (std (pd), 1); 638s ***** assert (std (t), 0.5882, 1e-4); 638s ***** assert (std (t_inf), 0.6738, 1e-4); 638s ***** assert (var (pd), 1); 638s ***** assert (var (t), 0.3460, 1e-4); 638s ***** assert (var (t_inf), 0.4540, 1e-4); 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution(0) 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution(-1) 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution(Inf) 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution(i) 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution("a") 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution([1, 2]) 638s ***** error <PoissonDistribution: LAMBDA must be a positive real scalar.> ... 638s PoissonDistribution(NaN) 638s ***** error <cdf: invalid argument for upper tail.> ... 638s cdf (PoissonDistribution, 2, "uper") 638s ***** error <cdf: invalid argument for upper tail.> ... 638s cdf (PoissonDistribution, 2, 3) 638s ***** shared x 638s x = poissrnd (1, [1, 100]); 638s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 638s paramci (PoissonDistribution.fit (x), "alpha") 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 0) 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 1) 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", "") 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 638s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 638s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 638s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 638s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 638s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 638s "parameter", {"lambda", "param"}) 638s ***** error <paramci: unknown distribution parameter.> ... 638s paramci (PoissonDistribution.fit (x), "parameter", "param") 638s ***** error <paramci: unknown distribution parameter.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 638s ***** error <paramci: invalid NAME for optional argument.> ... 638s paramci (PoissonDistribution.fit (x), "NAME", "value") 638s ***** error <paramci: invalid NAME for optional argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 638s ***** error <paramci: invalid NAME for optional argument.> ... 638s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 638s "parameter", "lambda", "NAME", "value") 638s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 638s plot (PoissonDistribution, "Parent") 638s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 638s plot (PoissonDistribution, "PlotType", 12) 638s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 638s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 638s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 638s plot (PoissonDistribution, "PlotType", "pdfcdf") 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (PoissonDistribution, "Discrete", "pdfcdf") 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (PoissonDistribution, "Discrete", [1, 0]) 638s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 638s plot (PoissonDistribution, "Discrete", {true}) 638s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 638s plot (PoissonDistribution, "Parent", 12) 638s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 638s plot (PoissonDistribution, "Parent", "hax") 638s ***** error <plot: invalid NAME for optional argument.> ... 638s plot (PoissonDistribution, "invalidNAME", "pdf") 638s ***** error <plot: no fitted DATA to plot a probability plot.> ... 638s plot (PoissonDistribution, "PlotType", "probability") 638s ***** error <proflik: no fitted data available.> ... 638s proflik (PoissonDistribution, 2) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (PoissonDistribution.fit (x), 3) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (PoissonDistribution.fit (x), [1, 2]) 638s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 638s proflik (PoissonDistribution.fit (x), {1}) 638s ***** error <proflik: SETPARAM must be a numeric vector.> ... 638s proflik (PoissonDistribution.fit (x), 1, ones (2)) 638s ***** error <proflik: missing VALUE for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display") 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 638s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 638s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 638s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 638s ***** error <proflik: invalid NAME for optional arguments.> ... 638s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 638s ***** error <proflik: invalid optional argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 638s ***** error <proflik: invalid optional argument.> ... 638s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 638s ***** error <truncate: missing input argument.> ... 638s truncate (PoissonDistribution) 638s ***** error <truncate: missing input argument.> ... 638s truncate (PoissonDistribution, 2) 638s ***** error <truncate: invalid lower upper limits.> ... 638s truncate (PoissonDistribution, 4, 2) 638s ***** shared pd 638s pd = PoissonDistribution(1); 638s pd(2) = PoissonDistribution(3); 638s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 638s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 638s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 638s ***** error <mean: requires a scalar probability distribution.> mean (pd) 638s ***** error <median: requires a scalar probability distribution.> median (pd) 638s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 639s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 639s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 639s ***** error <plot: requires a scalar probability distribution.> plot (pd) 639s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 639s ***** error <random: requires a scalar probability distribution.> random (pd) 639s ***** error <std: requires a scalar probability distribution.> std (pd) 639s ***** error <truncate: requires a scalar probability distribution.> ... 639s truncate (pd, 2, 4) 639s ***** error <var: requires a scalar probability distribution.> var (pd) 639s 97 tests, 97 passed, 0 known failure, 0 skipped 639s [inst/dist_obj/PiecewiseLinearDistribution.m] 639s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/PiecewiseLinearDistribution.m 639s ***** shared pd, t 639s load patients 639s [f, x] = ecdf (Weight); 639s f = f(1:5:end); 639s x = x(1:5:end); 639s pd = PiecewiseLinearDistribution (x, f); 639s t = truncate (pd, 130, 180); 639s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 639s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 639s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 639s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 639s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 639s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 639s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 639s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 639s ***** assert (iqr (pd), 50.0833, 1e-4); 639s ***** assert (iqr (t), 36.8077, 1e-4); 639s ***** assert (mean (pd), 153.61, 1e-10); 639s ***** assert (mean (t), 152.311, 1e-3); 643s ***** assert (median (pd), 142, 1e-10); 643s ***** assert (median (t), 141.9462, 1e-4); 643s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 643s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 643s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 643s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 643s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 643s ***** assert (any (random (t, 1000, 1) < 130), false); 643s ***** assert (any (random (t, 1000, 1) > 180), false); 643s ***** assert (std (pd), 26.5196, 1e-4); 643s ***** assert (std (t), 18.2941, 1e-4); 652s ***** assert (var (pd), 703.2879, 1e-4); 652s ***** assert (var (t), 334.6757, 1e-4); 661s ***** error <PiecewiseLinearDistribution: X must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, i], [0, 1]) 661s ***** error <PiecewiseLinearDistribution: X must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 661s ***** error <PiecewiseLinearDistribution: X must be a real vector.> ... 661s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 661s ***** error <PiecewiseLinearDistribution: X must be a real vector.> ... 661s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 661s ***** error <PiecewiseLinearDistribution: Fx must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, 1], [0, i]) 661s ***** error <PiecewiseLinearDistribution: Fx must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 661s ***** error <PiecewiseLinearDistribution: Fx must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 661s ***** error <PiecewiseLinearDistribution: Fx must be a real vector.> ... 661s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 661s ***** error <PiecewiseLinearDistribution: X and FX must be vectors of equal size.> ... 661s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 661s ***** error <PiecewiseLinearDistribution: X and FX must be at least two-elements long.> ... 661s PiecewiseLinearDistribution ([0], [1]) 661s ***** error <PiecewiseLinearDistribution: FX must be bounded in the range> ... 661s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 661s ***** error <cdf: invalid argument for upper tail.> ... 661s cdf (PiecewiseLinearDistribution, 2, "uper") 661s ***** error <cdf: invalid argument for upper tail.> ... 661s cdf (PiecewiseLinearDistribution, 2, 3) 661s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 661s plot (PiecewiseLinearDistribution, "Parent") 661s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 661s plot (PiecewiseLinearDistribution, "PlotType", 12) 661s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 661s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 661s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 661s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 661s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 661s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 661s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 661s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 661s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 661s plot (PiecewiseLinearDistribution, "Discrete", {true}) 661s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 661s plot (PiecewiseLinearDistribution, "Parent", 12) 661s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 661s plot (PiecewiseLinearDistribution, "Parent", "hax") 661s ***** error <plot: invalid NAME for optional argument.> ... 661s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 661s ***** error <plot: 'probability' PlotType is not supported for 'PiecewiseLinearDistribution'.> ... 661s plot (PiecewiseLinearDistribution, "PlotType", "probability") 661s ***** error <truncate: missing input argument.> ... 661s truncate (PiecewiseLinearDistribution) 661s ***** error <truncate: missing input argument.> ... 661s truncate (PiecewiseLinearDistribution, 2) 661s ***** error <truncate: invalid lower upper limits.> ... 661s truncate (PiecewiseLinearDistribution, 4, 2) 661s ***** shared pd 661s pd = PiecewiseLinearDistribution (); 661s pd(2) = PiecewiseLinearDistribution (); 661s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 661s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 661s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 661s ***** error <mean: requires a scalar probability distribution.> mean (pd) 661s ***** error <median: requires a scalar probability distribution.> median (pd) 661s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 661s ***** error <plot: requires a scalar probability distribution.> plot (pd) 661s ***** error <random: requires a scalar probability distribution.> random (pd) 661s ***** error <std: requires a scalar probability distribution.> std (pd) 661s ***** error <truncate: requires a scalar probability distribution.> ... 661s truncate (pd, 2, 4) 661s ***** error <var: requires a scalar probability distribution.> var (pd) 661s 63 tests, 63 passed, 0 known failure, 0 skipped 661s [inst/dist_obj/LogisticDistribution.m] 661s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/LogisticDistribution.m 661s ***** shared pd, t 661s pd = LogisticDistribution (0, 1); 661s t = truncate (pd, 2, 4); 661s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 661s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 661s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 661s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 661s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 661s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 661s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 661s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 661s ***** assert (iqr (pd), 2.1972, 1e-4); 661s ***** assert (iqr (t), 0.8286, 1e-4); 661s ***** assert (mean (pd), 0, 1e-4); 661s ***** assert (mean (t), 2.7193, 1e-4); 661s ***** assert (median (pd), 0); 661s ***** assert (median (t), 2.6085, 1e-4); 661s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 661s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 661s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 661s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 661s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 661s ***** assert (any (random (t, 1000, 1) < 2), false); 661s ***** assert (any (random (t, 1000, 1) > 4), false); 661s ***** assert (std (pd), 1.8138, 1e-4); 661s ***** assert (std (t), 0.5320, 1e-4); 661s ***** assert (var (pd), 3.2899, 1e-4); 661s ***** assert (var (t), 0.2830, 1e-4); 661s ***** error <LogisticDistribution: MU must be a nonnegative real scalar.> ... 661s LogisticDistribution(Inf, 1) 661s ***** error <LogisticDistribution: MU must be a nonnegative real scalar.> ... 661s LogisticDistribution(i, 1) 661s ***** error <LogisticDistribution: MU must be a nonnegative real scalar.> ... 661s LogisticDistribution("a", 1) 661s ***** error <LogisticDistribution: MU must be a nonnegative real scalar.> ... 661s LogisticDistribution([1, 2], 1) 661s ***** error <LogisticDistribution: MU must be a nonnegative real scalar.> ... 661s LogisticDistribution(NaN, 1) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, 0) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, -1) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, Inf) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, i) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, "a") 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, [1, 2]) 661s ***** error <LogisticDistribution: SIGMA must be a positive real scalar.> ... 661s LogisticDistribution(1, NaN) 661s ***** error <cdf: invalid argument for upper tail.> ... 661s cdf (LogisticDistribution, 2, "uper") 661s ***** error <cdf: invalid argument for upper tail.> ... 661s cdf (LogisticDistribution, 2, 3) 661s ***** shared x 661s x = logirnd (1, 1, [1, 100]); 661s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 661s paramci (LogisticDistribution.fit (x), "alpha") 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "alpha", 0) 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "alpha", 1) 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "alpha", "") 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 661s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 661s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 661s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 661s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 662s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 662s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 662s "parameter", {"mu", "sigma", "param"}) 662s ***** error <paramci: unknown distribution parameter.> ... 662s paramci (LogisticDistribution.fit (x), "parameter", "param") 662s ***** error <paramci: unknown distribution parameter.> ... 662s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 662s ***** error <paramci: invalid NAME for optional argument.> ... 662s paramci (LogisticDistribution.fit (x), "NAME", "value") 662s ***** error <paramci: invalid NAME for optional argument.> ... 662s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 662s ***** error <paramci: invalid NAME for optional argument.> ... 662s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 662s "NAME", "value") 662s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 662s plot (LogisticDistribution, "Parent") 662s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 662s plot (LogisticDistribution, "PlotType", 12) 662s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 662s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 662s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 662s plot (LogisticDistribution, "PlotType", "pdfcdf") 662s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 662s plot (LogisticDistribution, "Discrete", "pdfcdf") 662s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 662s plot (LogisticDistribution, "Discrete", [1, 0]) 662s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 662s plot (LogisticDistribution, "Discrete", {true}) 662s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 662s plot (LogisticDistribution, "Parent", 12) 662s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 662s plot (LogisticDistribution, "Parent", "hax") 662s ***** error <plot: invalid NAME for optional argument.> ... 662s plot (LogisticDistribution, "invalidNAME", "pdf") 662s ***** error <plot: no fitted DATA to plot a probability plot.> ... 662s plot (LogisticDistribution, "PlotType", "probability") 662s ***** error <proflik: no fitted data available.> ... 662s proflik (LogisticDistribution, 2) 662s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 662s proflik (LogisticDistribution.fit (x), 3) 662s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 662s proflik (LogisticDistribution.fit (x), [1, 2]) 662s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 662s proflik (LogisticDistribution.fit (x), {1}) 662s ***** error <proflik: SETPARAM must be a numeric vector.> ... 662s proflik (LogisticDistribution.fit (x), 1, ones (2)) 662s ***** error <proflik: missing VALUE for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display") 662s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 662s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 662s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 662s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 662s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 662s ***** error <proflik: invalid NAME for optional arguments.> ... 662s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 662s ***** error <proflik: invalid optional argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 662s ***** error <proflik: invalid optional argument.> ... 662s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 662s ***** error <truncate: missing input argument.> ... 662s truncate (LogisticDistribution) 662s ***** error <truncate: missing input argument.> ... 662s truncate (LogisticDistribution, 2) 662s ***** error <truncate: invalid lower upper limits.> ... 662s truncate (LogisticDistribution, 4, 2) 662s ***** shared pd 662s pd = LogisticDistribution(1, 1); 662s pd(2) = LogisticDistribution(1, 3); 662s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 662s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 662s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 662s ***** error <mean: requires a scalar probability distribution.> mean (pd) 662s ***** error <median: requires a scalar probability distribution.> median (pd) 662s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 662s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 662s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 662s ***** error <plot: requires a scalar probability distribution.> plot (pd) 662s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 662s ***** error <random: requires a scalar probability distribution.> random (pd) 662s ***** error <std: requires a scalar probability distribution.> std (pd) 662s ***** error <truncate: requires a scalar probability distribution.> ... 662s truncate (pd, 2, 4) 662s ***** error <var: requires a scalar probability distribution.> var (pd) 662s 95 tests, 95 passed, 0 known failure, 0 skipped 662s [inst/dist_obj/BirnbaumSaundersDistribution.m] 662s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/BirnbaumSaundersDistribution.m 662s ***** demo 662s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 662s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 662s ## distribution to this data and plot a PDF of the fitted distribution 662s ## superimposed on a histogram of the data 662s 662s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 662s randg ("seed", 21); 662s data = random (pd, 5000, 1); 662s pd = fitdist (data, "BirnbaumSaunders") 662s plot (pd) 662s msg = "Fitted Birnbaum-Saunders distribution with a = %0.2f and b = %0.2f"; 662s title (sprintf (msg, pd.beta, pd.gamma)) 662s ***** demo 662s ## Plot the PDF of a Birnbaum-Saunders distribution, with parameters beta = 1 662s ## and gamma = 0.5, truncated at [0, 2] intervals. Generate 10000 random 662s ## samples from this truncated distribution and superimpose a histogram with 662s ## 100 bins scaled accordingly 662s 662s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 662s t = truncate (pd, 0, 2) 662s randg ("seed", 21); 662s data = random (t, 10000, 1); 662s plot (t) 662s title ("Birnbaum-Saunders distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 662s hold on 662s hist (data, 100, 50) 662s hold off 662s ***** demo 662s ## Generate a data set of 100 random samples from a Birnbaum-Saunders 662s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 662s ## distribution to this data and plot its CDF superimposed over an empirical 662s ## CDF of the data 662s 662s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 662s randg ("seed", 21); 662s data = random (pd, 100, 1); 662s pd = fitdist (data, "BirnbaumSaunders") 662s plot (pd, "plottype", "cdf") 662s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 662s pd.beta, pd.gamma)) 662s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 662s ***** shared pd, t 662s pd = BirnbaumSaundersDistribution; 662s t = truncate (pd, 2, 4); 662s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 662s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 662s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 662s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 662s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 662s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 662s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 662s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 662s ***** assert (iqr (pd), 1.4236, 1e-4); 662s ***** assert (iqr (t), 0.8968, 1e-4); 662s ***** assert (mean (pd), 1.5, eps); 662s ***** assert (mean (t), 2.7723, 1e-4); 662s ***** assert (median (pd), 1, 1e-4); 662s ***** assert (median (t), 2.6711, 1e-4); 662s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 662s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 662s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 662s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 662s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 662s ***** assert (any (random (t, 1000, 1) < 2), false); 662s ***** assert (any (random (t, 1000, 1) > 4), false); 663s ***** assert (std (pd), 1.5, eps); 663s ***** assert (std (t), 0.5528, 1e-4); 663s ***** assert (var (pd), 2.25, eps); 663s ***** assert (var (t), 0.3056, 1e-4); 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(0, 1) 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(Inf, 1) 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(i, 1) 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution("beta", 1) 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution([1, 2], 1) 663s ***** error <BirnbaumSaundersDistribution: BETA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(NaN, 1) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, 0) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, -1) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, Inf) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, i) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, "beta") 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, [1, 2]) 663s ***** error <BirnbaumSaundersDistribution: GAMMA must be a positive real scalar.> ... 663s BirnbaumSaundersDistribution(1, NaN) 663s ***** error <cdf: invalid argument for upper tail.> ... 663s cdf (BirnbaumSaundersDistribution, 2, "uper") 663s ***** error <cdf: invalid argument for upper tail.> ... 663s cdf (BirnbaumSaundersDistribution, 2, 3) 663s ***** shared x 663s rand ("seed", 5); 663s x = bisarnd (1, 1, [100, 1]); 663s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 663s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 663s "beta", "alpha", {0.05}) 663s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), ... 663s "parameter", {"beta", "gamma", "param"}) 663s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 663s "parameter", {"beta", "gamma", "param"}) 663s ***** error <paramci: unknown distribution parameter.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 663s ***** error <paramci: unknown distribution parameter.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 663s "parameter", "param") 663s ***** error <paramci: invalid NAME for optional argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 663s ***** error <paramci: invalid NAME for optional argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 663s "NAME", "value") 663s ***** error <paramci: invalid NAME for optional argument.> ... 663s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 663s "parameter", "beta", "NAME", "value") 663s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 663s plot (BirnbaumSaundersDistribution, "Parent") 663s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 663s plot (BirnbaumSaundersDistribution, "PlotType", 12) 663s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 663s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 663s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 663s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 663s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 663s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 663s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 663s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 663s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 663s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 663s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 663s plot (BirnbaumSaundersDistribution, "Parent", 12) 663s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 663s plot (BirnbaumSaundersDistribution, "Parent", "hax") 663s ***** error <plot: invalid NAME for optional argument.> ... 663s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 663s ***** error <plot: no fitted DATA to plot a probability plot.> ... 663s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 663s ***** error <proflik: no fitted data available.> ... 663s proflik (BirnbaumSaundersDistribution, 2) 663s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 3) 663s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 663s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 663s ***** error <proflik: SETPARAM must be a numeric vector.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 663s ***** error <proflik: missing VALUE for 'Display' argument.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 663s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 663s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 663s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 663s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 663s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 664s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 664s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 664s ***** error <proflik: invalid NAME for optional arguments.> ... 664s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 664s ***** error <proflik: invalid optional argument.> ... 664s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 664s ***** error <proflik: invalid optional argument.> ... 664s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 664s ***** error <truncate: missing input argument.> ... 664s truncate (BirnbaumSaundersDistribution) 664s ***** error <truncate: missing input argument.> ... 664s truncate (BirnbaumSaundersDistribution, 2) 664s ***** error <truncate: invalid lower upper limits.> ... 664s truncate (BirnbaumSaundersDistribution, 4, 2) 664s ***** shared pd 664s pd = BirnbaumSaundersDistribution(1, 1); 664s pd(2) = BirnbaumSaundersDistribution(1, 3); 664s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 664s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 664s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 664s ***** error <mean: requires a scalar probability distribution.> mean (pd) 664s ***** error <median: requires a scalar probability distribution.> median (pd) 664s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 664s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 664s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 664s ***** error <plot: requires a scalar probability distribution.> plot (pd) 664s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 664s ***** error <random: requires a scalar probability distribution.> random (pd) 664s ***** error <std: requires a scalar probability distribution.> std (pd) 664s ***** error <truncate: requires a scalar probability distribution.> ... 664s truncate (pd, 2, 4) 664s ***** error <var: requires a scalar probability distribution.> var (pd) 664s 96 tests, 96 passed, 0 known failure, 0 skipped 664s [inst/dist_obj/NormalDistribution.m] 664s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/NormalDistribution.m 664s ***** shared pd, t 664s pd = NormalDistribution; 664s t = truncate (pd, -2, 2); 664s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 664s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 664s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 664s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 664s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 664s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 664s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 664s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 664s ***** assert (iqr (pd), 1.3490, 1e-4); 664s ***** assert (iqr (t), 1.2782, 1e-4); 664s ***** assert (mean (pd), 0); 664s ***** assert (mean (t), 0, 3e-16); 664s ***** assert (median (pd), 0); 664s ***** assert (median (t), 0, 3e-16); 664s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 664s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 664s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 664s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 664s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 664s ***** assert (any (random (t, 1000, 1) < -2), false); 664s ***** assert (any (random (t, 1000, 1) > 2), false); 664s ***** assert (std (pd), 1); 664s ***** assert (std (t), 0.8796, 1e-4); 664s ***** assert (var (pd), 1); 664s ***** assert (var (t), 0.7737, 1e-4); 664s ***** error <NormalDistribution: MU must be a real scalar.> ... 664s NormalDistribution(Inf, 1) 664s ***** error <NormalDistribution: MU must be a real scalar.> ... 664s NormalDistribution(i, 1) 664s ***** error <NormalDistribution: MU must be a real scalar.> ... 664s NormalDistribution("a", 1) 664s ***** error <NormalDistribution: MU must be a real scalar.> ... 664s NormalDistribution([1, 2], 1) 664s ***** error <NormalDistribution: MU must be a real scalar.> ... 664s NormalDistribution(NaN, 1) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, 0) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, -1) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, Inf) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, i) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, "a") 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, [1, 2]) 664s ***** error <NormalDistribution: SIGMA must be a positive real scalar.> ... 664s NormalDistribution(1, NaN) 664s ***** error <cdf: invalid argument for upper tail.> ... 664s cdf (NormalDistribution, 2, "uper") 664s ***** error <cdf: invalid argument for upper tail.> ... 664s cdf (NormalDistribution, 2, 3) 664s ***** shared x 664s x = normrnd (1, 1, [1, 100]); 664s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 664s paramci (NormalDistribution.fit (x), "alpha") 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", 0) 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", 1) 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", "") 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 664s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 664s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 664s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 664s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 664s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 664s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 664s "parameter", {"mu", "sigma", "param"}) 665s ***** error <paramci: unknown distribution parameter.> ... 665s paramci (NormalDistribution.fit (x), "parameter", "param") 665s ***** error <paramci: unknown distribution parameter.> ... 665s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 665s ***** error <paramci: invalid NAME for optional argument.> ... 665s paramci (NormalDistribution.fit (x), "NAME", "value") 665s ***** error <paramci: invalid NAME for optional argument.> ... 665s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 665s ***** error <paramci: invalid NAME for optional argument.> ... 665s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 665s "NAME", "value") 665s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 665s plot (NormalDistribution, "Parent") 665s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 665s plot (NormalDistribution, "PlotType", 12) 665s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 665s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 665s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 665s plot (NormalDistribution, "PlotType", "pdfcdf") 665s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 665s plot (NormalDistribution, "Discrete", "pdfcdf") 665s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 665s plot (NormalDistribution, "Discrete", [1, 0]) 665s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 665s plot (NormalDistribution, "Discrete", {true}) 665s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 665s plot (NormalDistribution, "Parent", 12) 665s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 665s plot (NormalDistribution, "Parent", "hax") 665s ***** error <plot: invalid NAME for optional argument.> ... 665s plot (NormalDistribution, "invalidNAME", "pdf") 665s ***** error <plot: no fitted DATA to plot a probability plot.> ... 665s plot (NormalDistribution, "PlotType", "probability") 665s ***** error <proflik: no fitted data available.> ... 665s proflik (NormalDistribution, 2) 665s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 665s proflik (NormalDistribution.fit (x), 3) 665s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 665s proflik (NormalDistribution.fit (x), [1, 2]) 665s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 665s proflik (NormalDistribution.fit (x), {1}) 665s ***** error <proflik: SETPARAM must be a numeric vector.> ... 665s proflik (NormalDistribution.fit (x), 1, ones (2)) 665s ***** error <proflik: missing VALUE for 'Display' argument.> ... 665s proflik (NormalDistribution.fit (x), 1, "Display") 665s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 665s proflik (NormalDistribution.fit (x), 1, "Display", 1) 665s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 665s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 665s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 665s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 666s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 666s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 666s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 666s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 666s ***** error <proflik: invalid NAME for optional arguments.> ... 666s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 666s ***** error <proflik: invalid optional argument.> ... 666s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 666s ***** error <proflik: invalid optional argument.> ... 666s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 666s ***** error <truncate: missing input argument.> ... 666s truncate (NormalDistribution) 666s ***** error <truncate: missing input argument.> ... 666s truncate (NormalDistribution, 2) 666s ***** error <truncate: invalid lower upper limits.> ... 666s truncate (NormalDistribution, 4, 2) 666s ***** shared pd 666s pd = NormalDistribution(1, 1); 666s pd(2) = NormalDistribution(1, 3); 666s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 666s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 666s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 666s ***** error <mean: requires a scalar probability distribution.> mean (pd) 666s ***** error <median: requires a scalar probability distribution.> median (pd) 666s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 666s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 666s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 666s ***** error <plot: requires a scalar probability distribution.> plot (pd) 666s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 666s ***** error <random: requires a scalar probability distribution.> random (pd) 666s ***** error <std: requires a scalar probability distribution.> std (pd) 666s ***** error <truncate: requires a scalar probability distribution.> ... 666s truncate (pd, 2, 4) 666s ***** error <var: requires a scalar probability distribution.> var (pd) 666s 95 tests, 95 passed, 0 known failure, 0 skipped 666s [inst/dist_obj/BinomialDistribution.m] 666s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/BinomialDistribution.m 666s ***** shared pd, t, t_inf 666s pd = BinomialDistribution (5, 0.5); 666s t = truncate (pd, 2, 4); 666s t_inf = truncate (pd, 2, Inf); 666s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 666s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 666s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 666s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 666s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 666s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 666s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 666s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 666s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 666s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 666s ***** assert (iqr (pd), 1); 666s ***** assert (iqr (t), 1); 666s ***** assert (mean (pd), 2.5, 1e-10); 666s ***** assert (mean (t), 2.8, 1e-10); 666s ***** assert (mean (t_inf), 2.8846, 1e-4); 666s ***** assert (median (pd), 2.5); 666s ***** assert (median (t), 3); 666s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 666s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 666s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 666s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 666s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 666s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 666s ***** assert (any (random (t, 1000, 1) < 2), false); 666s ***** assert (any (random (t, 1000, 1) > 4), false); 666s ***** assert (std (pd), 1.1180, 1e-4); 666s ***** assert (std (t), 0.7483, 1e-4); 666s ***** assert (std (t_inf), 0.8470, 1e-4); 666s ***** assert (var (pd), 1.2500, 1e-4); 666s ***** assert (var (t), 0.5600, 1e-4); 666s ***** assert (var (t_inf), 0.7175, 1e-4); 666s ***** error <BinomialDistribution: N must be a positive integer scalar.> ... 666s BinomialDistribution(Inf, 0.5) 666s ***** error <BinomialDistribution: N must be a positive integer scalar.> ... 666s BinomialDistribution(i, 0.5) 666s ***** error <BinomialDistribution: N must be a positive integer scalar.> ... 666s BinomialDistribution("a", 0.5) 666s ***** error <BinomialDistribution: N must be a positive integer scalar.> ... 666s BinomialDistribution([1, 2], 0.5) 666s ***** error <BinomialDistribution: N must be a positive integer scalar.> ... 666s BinomialDistribution(NaN, 0.5) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, 1.01) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, -0.01) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, Inf) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, i) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, "a") 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, [1, 2]) 666s ***** error <BinomialDistribution: p must be a real scalar bounded in the range> ... 666s BinomialDistribution(1, NaN) 666s ***** error <cdf: invalid argument for upper tail.> ... 666s cdf (BinomialDistribution, 2, "uper") 666s ***** error <cdf: invalid argument for upper tail.> ... 666s cdf (BinomialDistribution, 2, 3) 666s ***** shared x 666s rand ("seed", 2); 666s x = binornd (5, 0.5, [1, 100]); 666s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha") 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 666s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 666s "alpha", {0.05}) 666s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), ... 666s "parameter", {"N", "p", "param"}) 666s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 666s "parameter", {"N", "p", "param"}) 666s ***** error <paramci: unknown distribution parameter.> ... 666s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 666s ***** error <paramci: unknown distribution parameter.> ... 666s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 666s ***** error <paramci: unknown distribution parameter.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 666s "parameter", "param") 666s ***** error <paramci: invalid NAME for optional argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 666s ***** error <paramci: invalid NAME for optional argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 666s "NAME", "value") 666s ***** error <paramci: invalid NAME for optional argument.> ... 666s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 666s "parameter", "p", "NAME", "value") 666s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 666s plot (BinomialDistribution, "Parent") 666s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 666s plot (BinomialDistribution, "PlotType", 12) 666s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 666s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 666s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 666s plot (BinomialDistribution, "PlotType", "pdfcdf") 666s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 666s plot (BinomialDistribution, "Discrete", "pdfcdf") 666s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 666s plot (BinomialDistribution, "Discrete", [1, 0]) 666s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 666s plot (BinomialDistribution, "Discrete", {true}) 666s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 666s plot (BinomialDistribution, "Parent", 12) 666s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 666s plot (BinomialDistribution, "Parent", "hax") 666s ***** error <plot: invalid NAME for optional argument.> ... 666s plot (BinomialDistribution, "invalidNAME", "pdf") 666s ***** error <plot: no fitted DATA to plot a probability plot.> ... 666s plot (BinomialDistribution, "PlotType", "probability") 666s ***** error <proflik: no fitted data available.> ... 666s proflik (BinomialDistribution, 2) 666s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 666s proflik (BinomialDistribution.fit (x, 6), 3) 666s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 666s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 667s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 667s proflik (BinomialDistribution.fit (x, 6), {1}) 667s ***** error <proflik: SETPARAM must be a numeric vector.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 667s ***** error <proflik: missing VALUE for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 667s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 667s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 667s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 667s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 667s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 667s ***** error <proflik: invalid NAME for optional arguments.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 667s ***** error <proflik: invalid optional argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 667s ***** error <proflik: invalid optional argument.> ... 667s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 667s ***** error <truncate: missing input argument.> ... 667s truncate (BinomialDistribution) 667s ***** error <truncate: missing input argument.> ... 667s truncate (BinomialDistribution, 2) 667s ***** error <truncate: invalid lower upper limits.> ... 667s truncate (BinomialDistribution, 4, 2) 667s ***** shared pd 667s pd = BinomialDistribution(1, 0.5); 667s pd(2) = BinomialDistribution(1, 0.6); 667s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 667s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 667s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 667s ***** error <mean: requires a scalar probability distribution.> mean (pd) 667s ***** error <median: requires a scalar probability distribution.> median (pd) 667s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 667s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 667s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 667s ***** error <plot: requires a scalar probability distribution.> plot (pd) 667s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 667s ***** error <random: requires a scalar probability distribution.> random (pd) 667s ***** error <std: requires a scalar probability distribution.> std (pd) 667s ***** error <truncate: requires a scalar probability distribution.> ... 667s truncate (pd, 2, 4) 667s ***** error <var: requires a scalar probability distribution.> var (pd) 667s 102 tests, 102 passed, 0 known failure, 0 skipped 667s [inst/dist_obj/tLocationScaleDistribution.m] 667s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/tLocationScaleDistribution.m 667s ***** shared pd, t 667s pd = tLocationScaleDistribution; 667s t = truncate (pd, 2, 4); 667s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 667s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 667s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 667s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 667s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 667s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 667s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 667s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 667s ***** assert (iqr (pd), 1.4534, 1e-4); 667s ***** assert (iqr (t), 0.7139, 1e-4); 667s ***** assert (mean (pd), 0, eps); 667s ***** assert (mean (t), 2.6099, 1e-4); 667s ***** assert (median (pd), 0, eps); 667s ***** assert (median (t), 2.4758, 1e-4); 667s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 667s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 667s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 667s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 667s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 667s ***** assert (any (random (t, 1000, 1) < 2), false); 667s ***** assert (any (random (t, 1000, 1) > 4), false); 667s ***** assert (std (pd), 1.2910, 1e-4); 667s ***** assert (std (t), 0.4989, 1e-4); 667s ***** assert (var (pd), 1.6667, 1e-4); 667s ***** assert (var (t), 0.2489, 1e-4); 667s ***** error <tLocationScaleDistribution: MU must be a real scalar.> ... 667s tLocationScaleDistribution(i, 1, 1) 667s ***** error <tLocationScaleDistribution: MU must be a real scalar.> ... 667s tLocationScaleDistribution(Inf, 1, 1) 667s ***** error <tLocationScaleDistribution: MU must be a real scalar.> ... 667s tLocationScaleDistribution([1, 2], 1, 1) 667s ***** error <tLocationScaleDistribution: MU must be a real scalar.> ... 667s tLocationScaleDistribution("a", 1, 1) 667s ***** error <tLocationScaleDistribution: MU must be a real scalar.> ... 667s tLocationScaleDistribution(NaN, 1, 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 0, 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, -1, 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, Inf, 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, i, 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, "a", 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, [1, 2], 1) 667s ***** error <tLocationScaleDistribution: SIGMA must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, NaN, 1) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, 0) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, -1) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, Inf) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, i) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, "a") 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, [1, 2]) 667s ***** error <tLocationScaleDistribution: NU must be a positive real scalar.> ... 667s tLocationScaleDistribution(0, 1, NaN) 667s ***** error <cdf: invalid argument for upper tail.> ... 667s cdf (tLocationScaleDistribution, 2, "uper") 667s ***** error <cdf: invalid argument for upper tail.> ... 667s cdf (tLocationScaleDistribution, 2, 3) 667s ***** shared x 667s x = tlsrnd (0, 1, 1, [1, 100]); 667s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha") 667s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 667s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 667s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 667s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 667s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 667s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 668s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 668s "alpha", {0.05}) 668s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), ... 668s "parameter", {"mu", "sigma", "nu", "param"}) 668s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 668s "parameter", {"mu", "sigma", "nu", "param"}) 668s ***** error <paramci: unknown distribution parameter.> ... 668s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 668s ***** error <paramci: unknown distribution parameter.> ... 668s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 668s "parameter", "param") 668s ***** error <paramci: invalid NAME for optional argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 668s ***** error <paramci: invalid NAME for optional argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 668s ***** error <paramci: invalid NAME for optional argument.> ... 668s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 668s "parameter", "mu", "NAME", "value") 668s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 668s plot (tLocationScaleDistribution, "Parent") 668s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 668s plot (tLocationScaleDistribution, "PlotType", 12) 668s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 668s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 668s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 668s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 668s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 668s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 668s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 668s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 668s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 668s plot (tLocationScaleDistribution, "Discrete", {true}) 668s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 668s plot (tLocationScaleDistribution, "Parent", 12) 668s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 668s plot (tLocationScaleDistribution, "Parent", "hax") 668s ***** error <plot: invalid NAME for optional argument.> ... 668s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 668s ***** error <plot: no fitted DATA to plot a probability plot.> ... 668s plot (tLocationScaleDistribution, "PlotType", "probability") 668s ***** error <proflik: no fitted data available.> ... 668s proflik (tLocationScaleDistribution, 2) 668s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 668s proflik (tLocationScaleDistribution.fit (x), 4) 668s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 668s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 668s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 668s proflik (tLocationScaleDistribution.fit (x), {1}) 669s ***** error <proflik: SETPARAM must be a numeric vector.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 669s ***** error <proflik: missing VALUE for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 669s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 669s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 669s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 669s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 669s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 669s ***** error <proflik: invalid NAME for optional arguments.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 669s ***** error <proflik: invalid optional argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 669s ***** error <proflik: invalid optional argument.> ... 669s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 669s ***** error <truncate: missing input argument.> ... 669s truncate (tLocationScaleDistribution) 669s ***** error <truncate: missing input argument.> ... 669s truncate (tLocationScaleDistribution, 2) 669s ***** error <truncate: invalid lower upper limits.> ... 669s truncate (tLocationScaleDistribution, 4, 2) 669s ***** shared pd 669s pd = tLocationScaleDistribution (0, 1, 1); 669s pd(2) = tLocationScaleDistribution (0, 1, 3); 669s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 669s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 669s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 669s ***** error <mean: requires a scalar probability distribution.> mean (pd) 669s ***** error <median: requires a scalar probability distribution.> median (pd) 669s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 669s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 669s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 669s ***** error <plot: requires a scalar probability distribution.> plot (pd) 669s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 669s ***** error <random: requires a scalar probability distribution.> random (pd) 669s ***** error <std: requires a scalar probability distribution.> std (pd) 669s ***** error <truncate: requires a scalar probability distribution.> ... 669s truncate (pd, 2, 4) 669s ***** error <var: requires a scalar probability distribution.> var (pd) 669s 102 tests, 102 passed, 0 known failure, 0 skipped 669s [inst/dist_obj/ExtremeValueDistribution.m] 669s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/ExtremeValueDistribution.m 669s ***** shared pd, t 669s pd = ExtremeValueDistribution (0, 1); 669s t = truncate (pd, 2, 4); 669s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 669s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 669s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 669s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 669s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 669s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 669s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 669s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 669s ***** assert (iqr (pd), 1.5725, 1e-4); 669s ***** assert (iqr (t), 0.1338, 1e-4); 669s ***** assert (mean (pd), -0.5772, 1e-4); 669s ***** assert (mean (t), 2.1206, 1e-4); 669s ***** assert (median (pd), -0.3665, 1e-4); 669s ***** assert (median (t), 2.0897, 1e-4); 669s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 670s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 670s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 670s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 670s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 670s ***** assert (any (random (t, 1000, 1) < 2), false); 670s ***** assert (any (random (t, 1000, 1) > 4), false); 670s ***** assert (std (pd), 1.2825, 1e-4); 670s ***** assert (std (t), 0.1091, 1e-4); 670s ***** assert (var (pd), 1.6449, 1e-4); 670s ***** assert (var (t), 0.0119, 1e-4); 670s ***** error <ExtremeValueDistribution: MU must be a real scalar.> ... 670s ExtremeValueDistribution(Inf, 1) 670s ***** error <ExtremeValueDistribution: MU must be a real scalar.> ... 670s ExtremeValueDistribution(i, 1) 670s ***** error <ExtremeValueDistribution: MU must be a real scalar.> ... 670s ExtremeValueDistribution("a", 1) 670s ***** error <ExtremeValueDistribution: MU must be a real scalar.> ... 670s ExtremeValueDistribution([1, 2], 1) 670s ***** error <ExtremeValueDistribution: MU must be a real scalar.> ... 670s ExtremeValueDistribution(NaN, 1) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, 0) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, -1) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, Inf) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, i) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, "a") 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, [1, 2]) 670s ***** error <ExtremeValueDistribution: SIGMA must be a positive real scalar.> ... 670s ExtremeValueDistribution(1, NaN) 670s ***** error <cdf: invalid argument for upper tail.> ... 670s cdf (ExtremeValueDistribution, 2, "uper") 670s ***** error <cdf: invalid argument for upper tail.> ... 670s cdf (ExtremeValueDistribution, 2, 3) 670s ***** shared x 670s rand ("seed", 1); 670s x = evrnd (1, 1, [1000, 1]); 670s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha") 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 670s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), ... 670s "parameter", "mu", "alpha", {0.05}) 670s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), ... 670s "parameter", {"mu", "sigma", "param"}) 670s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 670s "parameter", {"mu", "sigma", "param"}) 670s ***** error <paramci: unknown distribution parameter.> ... 670s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 670s ***** error <paramci: unknown distribution parameter.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 670s "parameter", "param") 670s ***** error <paramci: invalid NAME for optional argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 670s ***** error <paramci: invalid NAME for optional argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 670s ***** error <paramci: invalid NAME for optional argument.> ... 670s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 670s "parameter", "mu", "NAME", "value") 670s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 670s plot (ExtremeValueDistribution, "Parent") 670s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 670s plot (ExtremeValueDistribution, "PlotType", 12) 670s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 670s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 670s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 670s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 670s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 670s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 670s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 670s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 670s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 670s plot (ExtremeValueDistribution, "Discrete", {true}) 670s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 670s plot (ExtremeValueDistribution, "Parent", 12) 670s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 670s plot (ExtremeValueDistribution, "Parent", "hax") 670s ***** error <plot: invalid NAME for optional argument.> ... 670s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 670s ***** error <plot: no fitted DATA to plot a probability plot.> ... 670s plot (ExtremeValueDistribution, "PlotType", "probability") 670s ***** error <proflik: no fitted data available.> ... 670s proflik (ExtremeValueDistribution, 2) 670s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 670s proflik (ExtremeValueDistribution.fit (x), 3) 670s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 670s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 670s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 670s proflik (ExtremeValueDistribution.fit (x), {1}) 670s ***** error <proflik: SETPARAM must be a numeric vector.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 670s ***** error <proflik: missing VALUE for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 670s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 670s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 670s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 670s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 670s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 670s ***** error <proflik: invalid NAME for optional arguments.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 670s ***** error <proflik: invalid optional argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 670s ***** error <proflik: invalid optional argument.> ... 670s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 670s ***** error <truncate: missing input argument.> ... 670s truncate (ExtremeValueDistribution) 670s ***** error <truncate: missing input argument.> ... 670s truncate (ExtremeValueDistribution, 2) 670s ***** error <truncate: invalid lower upper limits.> ... 670s truncate (ExtremeValueDistribution, 4, 2) 670s ***** shared pd 670s pd = ExtremeValueDistribution(1, 1); 670s pd(2) = ExtremeValueDistribution(1, 3); 670s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 670s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 670s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 670s ***** error <mean: requires a scalar probability distribution.> mean (pd) 670s ***** error <median: requires a scalar probability distribution.> median (pd) 670s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 670s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 670s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 670s ***** error <plot: requires a scalar probability distribution.> plot (pd) 670s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 670s ***** error <random: requires a scalar probability distribution.> random (pd) 670s ***** error <std: requires a scalar probability distribution.> std (pd) 670s ***** error <truncate: requires a scalar probability distribution.> ... 670s truncate (pd, 2, 4) 670s ***** error <var: requires a scalar probability distribution.> var (pd) 670s 95 tests, 95 passed, 0 known failure, 0 skipped 670s [inst/dist_obj/NakagamiDistribution.m] 670s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/NakagamiDistribution.m 670s ***** shared pd, t 670s pd = NakagamiDistribution; 670s t = truncate (pd, 2, 4); 670s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 670s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 670s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 670s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 670s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 670s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 670s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 670s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 670s ***** assert (iqr (pd), 0.6411, 1e-4); 670s ***** assert (iqr (t), 0.2502, 1e-4); 670s ***** assert (mean (pd), 0.8862, 1e-4); 670s ***** assert (mean (t), 2.2263, 1e-4); 670s ***** assert (median (pd), 0.8326, 1e-4); 670s ***** assert (median (t), 2.1664, 1e-4); 670s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 670s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 670s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 670s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 670s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 670s ***** assert (any (random (t, 1000, 1) < 2), false); 670s ***** assert (any (random (t, 1000, 1) > 4), false); 670s ***** assert (std (pd), 0.4633, 1e-4); 670s ***** assert (std (t), 0.2083, 1e-4); 670s ***** assert (var (pd), 0.2146, 1e-4); 670s ***** assert (var (t), 0.0434, 1e-4); 670s ***** error <NakagamiDistribution: MU must be a real scalar of at least 0.5.> ... 670s NakagamiDistribution(Inf, 1) 670s ***** error <NakagamiDistribution: MU must be a real scalar of at least 0.5.> ... 670s NakagamiDistribution(i, 1) 670s ***** error <NakagamiDistribution: MU must be a real scalar of at least 0.5.> ... 670s NakagamiDistribution("a", 1) 670s ***** error <NakagamiDistribution: MU must be a real scalar of at least 0.5.> ... 670s NakagamiDistribution([1, 2], 1) 670s ***** error <NakagamiDistribution: MU must be a real scalar of at least 0.5.> ... 670s NakagamiDistribution(NaN, 1) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, 0) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, -1) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, Inf) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, i) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, "a") 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, [1, 2]) 670s ***** error <NakagamiDistribution: OMEGA must be a positive real scalar.> ... 670s NakagamiDistribution(1, NaN) 670s ***** error <cdf: invalid argument for upper tail.> ... 670s cdf (NakagamiDistribution, 2, "uper") 670s ***** error <cdf: invalid argument for upper tail.> ... 670s cdf (NakagamiDistribution, 2, 3) 671s ***** shared x 671s x = nakarnd (1, 0.5, [1, 100]); 671s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha") 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 0) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 1) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", "") 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 671s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 671s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 671s "parameter", {"mu", "omega", "param"}) 671s ***** error <paramci: unknown distribution parameter.> ... 671s paramci (NakagamiDistribution.fit (x), "parameter", "param") 671s ***** error <paramci: unknown distribution parameter.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 671s ***** error <paramci: invalid NAME for optional argument.> ... 671s paramci (NakagamiDistribution.fit (x), "NAME", "value") 671s ***** error <paramci: invalid NAME for optional argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 671s ***** error <paramci: invalid NAME for optional argument.> ... 671s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 671s "NAME", "value") 671s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 671s plot (NakagamiDistribution, "Parent") 671s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 671s plot (NakagamiDistribution, "PlotType", 12) 671s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 671s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 671s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 671s plot (NakagamiDistribution, "PlotType", "pdfcdf") 671s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 671s plot (NakagamiDistribution, "Discrete", "pdfcdf") 671s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 671s plot (NakagamiDistribution, "Discrete", [1, 0]) 671s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 671s plot (NakagamiDistribution, "Discrete", {true}) 671s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 671s plot (NakagamiDistribution, "Parent", 12) 671s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 671s plot (NakagamiDistribution, "Parent", "hax") 671s ***** error <plot: invalid NAME for optional argument.> ... 671s plot (NakagamiDistribution, "invalidNAME", "pdf") 671s ***** error <plot: no fitted DATA to plot a probability plot.> ... 671s plot (NakagamiDistribution, "PlotType", "probability") 671s ***** error <proflik: no fitted data available.> ... 671s proflik (NakagamiDistribution, 2) 671s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 671s proflik (NakagamiDistribution.fit (x), 3) 671s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 671s proflik (NakagamiDistribution.fit (x), [1, 2]) 671s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 671s proflik (NakagamiDistribution.fit (x), {1}) 671s ***** error <proflik: SETPARAM must be a numeric vector.> ... 671s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 671s ***** error <proflik: missing VALUE for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display") 671s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 671s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 671s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 671s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 671s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 671s ***** error <proflik: invalid NAME for optional arguments.> ... 671s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 671s ***** error <proflik: invalid optional argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 671s ***** error <proflik: invalid optional argument.> ... 671s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 671s ***** error <truncate: missing input argument.> ... 671s truncate (NakagamiDistribution) 671s ***** error <truncate: missing input argument.> ... 671s truncate (NakagamiDistribution, 2) 671s ***** error <truncate: invalid lower upper limits.> ... 671s truncate (NakagamiDistribution, 4, 2) 671s ***** shared pd 671s pd = NakagamiDistribution(1, 0.5); 671s pd(2) = NakagamiDistribution(1, 0.6); 671s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 671s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 671s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 671s ***** error <mean: requires a scalar probability distribution.> mean (pd) 671s ***** error <median: requires a scalar probability distribution.> median (pd) 671s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 671s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 671s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 671s ***** error <plot: requires a scalar probability distribution.> plot (pd) 671s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 671s ***** error <random: requires a scalar probability distribution.> random (pd) 671s ***** error <std: requires a scalar probability distribution.> std (pd) 671s ***** error <truncate: requires a scalar probability distribution.> ... 671s truncate (pd, 2, 4) 671s ***** error <var: requires a scalar probability distribution.> var (pd) 671s 95 tests, 95 passed, 0 known failure, 0 skipped 671s [inst/dist_obj/RayleighDistribution.m] 671s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/RayleighDistribution.m 671s ***** shared pd, t 671s pd = RayleighDistribution; 671s t = truncate (pd, 2, 4); 671s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 671s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 671s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 671s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 671s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 671s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 671s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 671s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 671s ***** assert (iqr (pd), 0.9066, 1e-4); 671s ***** assert (iqr (t), 0.4609, 1e-4); 671s ***** assert (mean (pd), 1.2533, 1e-4); 671s ***** assert (mean (t), 2.4169, 1e-4); 671s ***** assert (median (pd), 1.1774, 1e-4); 671s ***** assert (median (t), 2.3198, 1e-4); 671s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 671s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 671s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 671s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 671s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 671s ***** assert (any (random (t, 1000, 1) < 2), false); 671s ***** assert (any (random (t, 1000, 1) > 4), false); 671s ***** assert (std (pd), 0.6551, 1e-4); 671s ***** assert (std (t), 0.3591, 1e-4); 671s ***** assert (var (pd), 0.4292, 1e-4); 671s ***** assert (var (t), 0.1290, 1e-4); 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution(0) 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution(-1) 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution(Inf) 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution(i) 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution("a") 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution([1, 2]) 671s ***** error <RayleighDistribution: SIGMA must be a positive real scalar.> ... 671s RayleighDistribution(NaN) 671s ***** error <cdf: invalid argument for upper tail.> ... 671s cdf (RayleighDistribution, 2, "uper") 671s ***** error <cdf: invalid argument for upper tail.> ... 671s cdf (RayleighDistribution, 2, 3) 671s ***** shared x 671s x = raylrnd (1, [1, 100]); 671s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 671s paramci (RayleighDistribution.fit (x), "alpha") 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", 0) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", 1) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", "") 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 671s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 671s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 671s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 671s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 671s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 671s "parameter", {"sigma", "param"}) 671s ***** error <paramci: unknown distribution parameter.> ... 671s paramci (RayleighDistribution.fit (x), "parameter", "param") 671s ***** error <paramci: unknown distribution parameter.> ... 671s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (RayleighDistribution.fit (x), "NAME", "value") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 672s "parameter", "sigma", "NAME", "value") 672s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 672s plot (RayleighDistribution, "Parent") 672s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 672s plot (RayleighDistribution, "PlotType", 12) 672s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 672s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 672s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 672s plot (RayleighDistribution, "PlotType", "pdfcdf") 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (RayleighDistribution, "Discrete", "pdfcdf") 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (RayleighDistribution, "Discrete", [1, 0]) 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (RayleighDistribution, "Discrete", {true}) 672s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 672s plot (RayleighDistribution, "Parent", 12) 672s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 672s plot (RayleighDistribution, "Parent", "hax") 672s ***** error <plot: invalid NAME for optional argument.> ... 672s plot (RayleighDistribution, "invalidNAME", "pdf") 672s ***** error <plot: no fitted DATA to plot a probability plot.> ... 672s plot (RayleighDistribution, "PlotType", "probability") 672s ***** error <proflik: no fitted data available.> ... 672s proflik (RayleighDistribution, 2) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (RayleighDistribution.fit (x), 3) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (RayleighDistribution.fit (x), [1, 2]) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (RayleighDistribution.fit (x), {1}) 672s ***** error <proflik: SETPARAM must be a numeric vector.> ... 672s proflik (RayleighDistribution.fit (x), 1, ones (2)) 672s ***** error <proflik: missing VALUE for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display") 672s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 672s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 672s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 672s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 672s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 672s ***** error <proflik: invalid NAME for optional arguments.> ... 672s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 672s ***** error <proflik: invalid optional argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 672s ***** error <proflik: invalid optional argument.> ... 672s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 672s ***** error <truncate: missing input argument.> ... 672s truncate (RayleighDistribution) 672s ***** error <truncate: missing input argument.> ... 672s truncate (RayleighDistribution, 2) 672s ***** error <truncate: invalid lower upper limits.> ... 672s truncate (RayleighDistribution, 4, 2) 672s ***** shared pd 672s pd = RayleighDistribution(1); 672s pd(2) = RayleighDistribution(3); 672s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 672s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 672s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 672s ***** error <mean: requires a scalar probability distribution.> mean (pd) 672s ***** error <median: requires a scalar probability distribution.> median (pd) 672s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 672s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 672s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 672s ***** error <plot: requires a scalar probability distribution.> plot (pd) 672s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 672s ***** error <random: requires a scalar probability distribution.> random (pd) 672s ***** error <std: requires a scalar probability distribution.> std (pd) 672s ***** error <truncate: requires a scalar probability distribution.> ... 672s truncate (pd, 2, 4) 672s ***** error <var: requires a scalar probability distribution.> var (pd) 672s 90 tests, 90 passed, 0 known failure, 0 skipped 672s [inst/dist_obj/ExponentialDistribution.m] 672s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/ExponentialDistribution.m 672s ***** shared pd, t 672s pd = ExponentialDistribution (1); 672s t = truncate (pd, 2, 4); 672s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 672s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 672s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 672s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 672s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 672s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 672s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 672s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 672s ***** assert (iqr (pd), 1.0986, 1e-4); 672s ***** assert (iqr (t), 0.8020, 1e-4); 672s ***** assert (mean (pd), 1); 672s ***** assert (mean (t), 2.6870, 1e-4); 672s ***** assert (median (pd), 0.6931, 1e-4); 672s ***** assert (median (t), 2.5662, 1e-4); 672s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 672s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 672s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 672s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 672s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 672s ***** assert (any (random (t, 1000, 1) < 2), false); 672s ***** assert (any (random (t, 1000, 1) > 4), false); 672s ***** assert (std (pd), 1); 672s ***** assert (std (t), 0.5253, 1e-4); 672s ***** assert (var (pd), 1); 672s ***** assert (var (t), 0.2759, 1e-4); 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution(0) 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution(-1) 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution(Inf) 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution(i) 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution("a") 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution([1, 2]) 672s ***** error <ExponentialDistribution: MU must be a positive real scalar.> ... 672s ExponentialDistribution(NaN) 672s ***** error <cdf: invalid argument for upper tail.> ... 672s cdf (ExponentialDistribution, 2, "uper") 672s ***** error <cdf: invalid argument for upper tail.> ... 672s cdf (ExponentialDistribution, 2, 3) 672s ***** shared x 672s x = exprnd (1, [100, 1]); 672s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha") 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 0) 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 1) 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", "") 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 672s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 672s "alpha", {0.05}) 672s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 672s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 672s "parameter", {"mu", "param"}) 672s ***** error <paramci: unknown distribution parameter.> ... 672s paramci (ExponentialDistribution.fit (x), "parameter", "param") 672s ***** error <paramci: unknown distribution parameter.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (ExponentialDistribution.fit (x), "NAME", "value") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 672s ***** error <paramci: invalid NAME for optional argument.> ... 672s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 672s "parameter", "mu", "NAME", "value") 672s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 672s plot (ExponentialDistribution, "Parent") 672s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 672s plot (ExponentialDistribution, "PlotType", 12) 672s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 672s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 672s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 672s plot (ExponentialDistribution, "PlotType", "pdfcdf") 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (ExponentialDistribution, "Discrete", "pdfcdf") 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (ExponentialDistribution, "Discrete", [1, 0]) 672s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 672s plot (ExponentialDistribution, "Discrete", {true}) 672s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 672s plot (ExponentialDistribution, "Parent", 12) 672s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 672s plot (ExponentialDistribution, "Parent", "hax") 672s ***** error <plot: invalid NAME for optional argument.> ... 672s plot (ExponentialDistribution, "invalidNAME", "pdf") 672s ***** error <plot: no fitted DATA to plot a probability plot.> ... 672s plot (ExponentialDistribution, "PlotType", "probability") 672s ***** error <proflik: no fitted data available.> ... 672s proflik (ExponentialDistribution, 2) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (ExponentialDistribution.fit (x), 3) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (ExponentialDistribution.fit (x), [1, 2]) 672s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 672s proflik (ExponentialDistribution.fit (x), {1}) 672s ***** error <proflik: SETPARAM must be a numeric vector.> ... 672s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 672s ***** error <proflik: missing VALUE for 'Display' argument.> ... 672s proflik (ExponentialDistribution.fit (x), 1, "Display") 672s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 672s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 673s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 673s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 673s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 673s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 673s ***** error <proflik: invalid NAME for optional arguments.> ... 673s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 673s ***** error <proflik: invalid optional argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 673s ***** error <proflik: invalid optional argument.> ... 673s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 673s ***** error <truncate: missing input argument.> ... 673s truncate (ExponentialDistribution) 673s ***** error <truncate: missing input argument.> ... 673s truncate (ExponentialDistribution, 2) 673s ***** error <truncate: invalid lower upper limits.> ... 673s truncate (ExponentialDistribution, 4, 2) 673s ***** shared pd 673s pd = ExponentialDistribution(1); 673s pd(2) = ExponentialDistribution(3); 673s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 673s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 673s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 673s ***** error <mean: requires a scalar probability distribution.> mean (pd) 673s ***** error <median: requires a scalar probability distribution.> median (pd) 673s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 673s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 673s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 673s ***** error <plot: requires a scalar probability distribution.> plot (pd) 673s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 673s ***** error <random: requires a scalar probability distribution.> random (pd) 673s ***** error <std: requires a scalar probability distribution.> std (pd) 673s ***** error <truncate: requires a scalar probability distribution.> ... 673s truncate (pd, 2, 4) 673s ***** error <var: requires a scalar probability distribution.> var (pd) 673s 90 tests, 90 passed, 0 known failure, 0 skipped 673s [inst/dist_obj/LognormalDistribution.m] 673s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/LognormalDistribution.m 673s ***** shared pd, t 673s pd = LognormalDistribution; 673s t = truncate (pd, 2, 4); 673s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 673s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 673s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 673s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 673s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 673s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 673s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 673s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 673s ***** assert (iqr (pd), 1.4536, 1e-4); 673s ***** assert (iqr (t), 0.8989, 1e-4); 673s ***** assert (mean (pd), 1.6487, 1e-4); 673s ***** assert (mean (t), 2.7692, 1e-4); 673s ***** assert (median (pd), 1, 1e-4); 673s ***** assert (median (t), 2.6653, 1e-4); 673s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 673s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 673s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 673s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 673s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 673s ***** assert (any (random (t, 1000, 1) < 2), false); 673s ***** assert (any (random (t, 1000, 1) > 4), false); 673s ***** assert (std (pd), 2.1612, 1e-4); 673s ***** assert (std (t), 0.5540, 1e-4); 673s ***** assert (var (pd), 4.6708, 1e-4); 673s ***** assert (var (t), 0.3069, 1e-4); 673s ***** error <LognormalDistribution: MU must be a real scalar.> ... 673s LognormalDistribution(Inf, 1) 673s ***** error <LognormalDistribution: MU must be a real scalar.> ... 673s LognormalDistribution(i, 1) 673s ***** error <LognormalDistribution: MU must be a real scalar.> ... 673s LognormalDistribution("a", 1) 673s ***** error <LognormalDistribution: MU must be a real scalar.> ... 673s LognormalDistribution([1, 2], 1) 673s ***** error <LognormalDistribution: MU must be a real scalar.> ... 673s LognormalDistribution(NaN, 1) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, 0) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, -1) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, Inf) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, i) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, "a") 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, [1, 2]) 673s ***** error <LognormalDistribution: SIGMA must be a positive real scalar.> ... 673s LognormalDistribution(1, NaN) 673s ***** error <cdf: invalid argument for upper tail.> ... 673s cdf (LognormalDistribution, 2, "uper") 673s ***** error <cdf: invalid argument for upper tail.> ... 673s cdf (LognormalDistribution, 2, 3) 673s ***** shared x 673s randn ("seed", 1); 673s x = lognrnd (1, 1, [1, 100]); 673s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 673s paramci (LognormalDistribution.fit (x), "alpha") 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "alpha", 0) 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "alpha", 1) 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "alpha", "") 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 673s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 673s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 674s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 674s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 674s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 674s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 674s "parameter", {"mu", "sigma", "param"}) 674s ***** error <paramci: unknown distribution parameter.> ... 674s paramci (LognormalDistribution.fit (x), "parameter", "param") 674s ***** error <paramci: unknown distribution parameter.> ... 674s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 674s ***** error <paramci: invalid NAME for optional argument.> ... 674s paramci (LognormalDistribution.fit (x), "NAME", "value") 674s ***** error <paramci: invalid NAME for optional argument.> ... 674s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 674s ***** error <paramci: invalid NAME for optional argument.> ... 674s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 674s "NAME", "value") 674s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 674s plot (LognormalDistribution, "Parent") 674s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 674s plot (LognormalDistribution, "PlotType", 12) 674s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 674s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 674s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 674s plot (LognormalDistribution, "PlotType", "pdfcdf") 674s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 674s plot (LognormalDistribution, "Discrete", "pdfcdf") 674s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 674s plot (LognormalDistribution, "Discrete", [1, 0]) 674s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 674s plot (LognormalDistribution, "Discrete", {true}) 674s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 674s plot (LognormalDistribution, "Parent", 12) 674s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 674s plot (LognormalDistribution, "Parent", "hax") 674s ***** error <plot: invalid NAME for optional argument.> ... 674s plot (LognormalDistribution, "invalidNAME", "pdf") 674s ***** error <plot: no fitted DATA to plot a probability plot.> ... 674s plot (LognormalDistribution, "PlotType", "probability") 674s ***** error <proflik: no fitted data available.> ... 674s proflik (LognormalDistribution, 2) 674s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 674s proflik (LognormalDistribution.fit (x), 3) 674s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 674s proflik (LognormalDistribution.fit (x), [1, 2]) 674s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 674s proflik (LognormalDistribution.fit (x), {1}) 674s ***** error <proflik: SETPARAM must be a numeric vector.> ... 674s proflik (LognormalDistribution.fit (x), 1, ones (2)) 674s ***** error <proflik: missing VALUE for 'Display' argument.> ... 674s proflik (LognormalDistribution.fit (x), 1, "Display") 674s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 674s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 674s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 674s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 674s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 674s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 674s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 674s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 675s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 675s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 675s ***** error <proflik: invalid NAME for optional arguments.> ... 675s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 675s ***** error <proflik: invalid optional argument.> ... 675s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 675s ***** error <proflik: invalid optional argument.> ... 675s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 675s ***** error <truncate: missing input argument.> ... 675s truncate (LognormalDistribution) 675s ***** error <truncate: missing input argument.> ... 675s truncate (LognormalDistribution, 2) 675s ***** error <truncate: invalid lower upper limits.> ... 675s truncate (LognormalDistribution, 4, 2) 675s ***** shared pd 675s pd = LognormalDistribution(1, 1); 675s pd(2) = LognormalDistribution(1, 3); 675s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 675s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 675s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 675s ***** error <mean: requires a scalar probability distribution.> mean (pd) 675s ***** error <median: requires a scalar probability distribution.> median (pd) 675s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 675s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 675s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 675s ***** error <plot: requires a scalar probability distribution.> plot (pd) 675s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 675s ***** error <random: requires a scalar probability distribution.> random (pd) 675s ***** error <std: requires a scalar probability distribution.> std (pd) 675s ***** error <truncate: requires a scalar probability distribution.> ... 675s truncate (pd, 2, 4) 675s ***** error <var: requires a scalar probability distribution.> var (pd) 675s 95 tests, 95 passed, 0 known failure, 0 skipped 675s [inst/dist_obj/BetaDistribution.m] 675s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/BetaDistribution.m 675s ***** demo 675s ## Generate a data set of 5000 random samples from a Beta distribution with 675s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 675s ## a PDF of the fitted distribution superimposed on a histogram of the data 675s 675s pd = makedist ("Beta", "a", 2, "b", 4) 675s randg ("seed", 21); 675s data = random (pd, 5000, 1); 675s pd = fitdist (data, "Beta") 675s plot (pd) 675s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 675s pd.a, pd.b)) 675s ***** demo 675s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 675s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 675s ## this truncated distribution and superimpose a histogram with 100 bins 675s ## scaled accordingly 675s 675s pd = makedist ("Beta", "a", 2, "b", 4) 675s t = truncate (pd, 0.1, 0.8) 675s randg ("seed", 21); 675s data = random (t, 10000, 1); 675s plot (t) 675s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 675s hold on 675s hist (data, 100, 140) 675s hold off 675s ***** demo 675s ## Generate a data set of 100 random samples from a Beta distribution with 675s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 675s ## its CDF superimposed over an empirical CDF of the data 675s 675s pd = makedist ("Beta", "a", 2, "b", 4) 675s randg ("seed", 21); 675s data = random (pd, 100, 1); 675s pd = fitdist (data, "Beta") 675s plot (pd, "plottype", "cdf") 675s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 675s pd.a, pd.b)) 675s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 675s ***** demo 675s ## Generate a data set of 200 random samples from a Beta distribution with 675s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 675s ## distribution fit to the data. 675s 675s pd = makedist ("Beta", "a", 2, "b", 4) 675s randg ("seed", 21); 675s data = random (pd, 200, 1); 675s pd = fitdist (data, "Beta") 675s plot (pd, "plottype", "probability") 675s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 675s pd.a, pd.b)) 675s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 675s ***** shared pd, t 675s pd = BetaDistribution; 675s t = truncate (pd, 0.2, 0.8); 675s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 675s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 675s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 675s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 675s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 675s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 675s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 675s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 675s ***** assert (iqr (pd), 0.5, 1e-4); 675s ***** assert (iqr (t), 0.3, 1e-4); 675s ***** assert (mean (pd), 0.5); 675s ***** assert (mean (t), 0.5, 1e-6); 675s ***** assert (median (pd), 0.5); 675s ***** assert (median (t), 0.5, 1e-6); 675s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 675s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 675s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 675s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 675s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 675s ***** assert (any (random (t, 1000, 1) < 0.2), false); 675s ***** assert (any (random (t, 1000, 1) > 0.8), false); 675s ***** assert (std (pd), 0.2887, 1e-4); 675s ***** assert (std (t), 0.1732, 1e-4); 675s ***** assert (var (pd), 0.0833, 1e-4); 675s ***** assert (var (t), 0.0300, 1e-4); 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution(0, 1) 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution(Inf, 1) 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution(i, 1) 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution("a", 1) 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution([1, 2], 1) 676s ***** error <BetaDistribution: A must be a positive real scalar.> ... 676s BetaDistribution(NaN, 1) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, 0) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, -1) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, Inf) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, i) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, "a") 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, [1, 2]) 676s ***** error <BetaDistribution: B must be a positive real scalar.> ... 676s BetaDistribution(1, NaN) 676s ***** error <cdf: invalid argument for upper tail.> ... 676s cdf (BetaDistribution, 2, "uper") 676s ***** error <cdf: invalid argument for upper tail.> ... 676s cdf (BetaDistribution, 2, 3) 676s ***** shared x 676s randg ("seed", 1); 676s x = betarnd (1, 1, [100, 1]); 676s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 676s paramci (BetaDistribution.fit (x), "alpha") 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 0) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 1) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", "") 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 676s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 676s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 676s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 676s "parameter", {"a", "b", "param"}) 676s ***** error <paramci: unknown distribution parameter.> ... 676s paramci (BetaDistribution.fit (x), "parameter", "param") 676s ***** error <paramci: unknown distribution parameter.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 676s ***** error <paramci: invalid NAME for optional argument.> ... 676s paramci (BetaDistribution.fit (x), "NAME", "value") 676s ***** error <paramci: invalid NAME for optional argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 676s ***** error <paramci: invalid NAME for optional argument.> ... 676s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 676s "NAME", "value") 676s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 676s plot (BetaDistribution, "Parent") 676s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 676s plot (BetaDistribution, "PlotType", 12) 676s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 676s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 676s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 676s plot (BetaDistribution, "PlotType", "pdfcdf") 676s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 676s plot (BetaDistribution, "Discrete", "pdfcdf") 676s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 676s plot (BetaDistribution, "Discrete", [1, 0]) 676s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 676s plot (BetaDistribution, "Discrete", {true}) 676s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 676s plot (BetaDistribution, "Parent", 12) 676s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 676s plot (BetaDistribution, "Parent", "hax") 676s ***** error <plot: invalid NAME for optional argument.> ... 676s plot (BetaDistribution, "invalidNAME", "pdf") 676s ***** error <plot: no fitted DATA to plot a probability plot.> ... 676s plot (BetaDistribution, "PlotType", "probability") 676s ***** error <proflik: no fitted data available.> ... 676s proflik (BetaDistribution, 2) 676s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 676s proflik (BetaDistribution.fit (x), 3) 676s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 676s proflik (BetaDistribution.fit (x), [1, 2]) 676s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 676s proflik (BetaDistribution.fit (x), {1}) 676s ***** error <proflik: SETPARAM must be a numeric vector.> ... 676s proflik (BetaDistribution.fit (x), 1, ones (2)) 676s ***** error <proflik: missing VALUE for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display") 676s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display", 1) 676s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 676s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 676s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 676s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 676s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 676s ***** error <proflik: invalid NAME for optional arguments.> ... 676s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 676s ***** error <proflik: invalid optional argument.> ... 676s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 676s ***** error <proflik: invalid optional argument.> ... 676s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 676s ***** error <truncate: missing input argument.> ... 676s truncate (BetaDistribution) 676s ***** error <truncate: missing input argument.> ... 676s truncate (BetaDistribution, 2) 676s ***** error <truncate: invalid lower upper limits.> ... 676s truncate (BetaDistribution, 4, 2) 676s ***** shared pd 676s pd = BetaDistribution(1, 1); 676s pd(2) = BetaDistribution(1, 3); 676s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 676s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 676s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 676s ***** error <mean: requires a scalar probability distribution.> mean (pd) 676s ***** error <median: requires a scalar probability distribution.> median (pd) 676s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 676s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 676s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 676s ***** error <plot: requires a scalar probability distribution.> plot (pd) 676s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 676s ***** error <random: requires a scalar probability distribution.> random (pd) 676s ***** error <std: requires a scalar probability distribution.> std (pd) 676s ***** error <truncate: requires a scalar probability distribution.> ... 676s truncate (pd, 2, 4) 676s ***** error <var: requires a scalar probability distribution.> var (pd) 676s 96 tests, 96 passed, 0 known failure, 0 skipped 676s [inst/dist_obj/GammaDistribution.m] 676s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/GammaDistribution.m 676s ***** shared pd, t 676s pd = GammaDistribution (1, 1); 676s t = truncate (pd, 2, 4); 676s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 676s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 676s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 676s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 676s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 676s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 676s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 676s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 676s ***** assert (iqr (pd), 1.0986, 1e-4); 676s ***** assert (iqr (t), 0.8020, 1e-4); 676s ***** assert (mean (pd), 1); 676s ***** assert (mean (t), 2.6870, 1e-4); 676s ***** assert (median (pd), 0.6931, 1e-4); 676s ***** assert (median (t), 2.5662, 1e-4); 676s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 676s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 676s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 676s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 676s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 676s ***** assert (any (random (t, 1000, 1) < 2), false); 676s ***** assert (any (random (t, 1000, 1) > 4), false); 676s ***** assert (std (pd), 1); 676s ***** assert (std (t), 0.5253, 1e-4); 676s ***** assert (var (pd), 1); 676s ***** assert (var (t), 0.2759, 1e-4); 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution(0, 1) 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution(Inf, 1) 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution(i, 1) 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution("a", 1) 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution([1, 2], 1) 676s ***** error <GammaDistribution: A must be a positive real scalar.> ... 676s GammaDistribution(NaN, 1) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, 0) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, -1) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, Inf) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, i) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, "a") 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, [1, 2]) 676s ***** error <GammaDistribution: B must be a positive real scalar.> ... 676s GammaDistribution(1, NaN) 676s ***** error <cdf: invalid argument for upper tail.> ... 676s cdf (GammaDistribution, 2, "uper") 676s ***** error <cdf: invalid argument for upper tail.> ... 676s cdf (GammaDistribution, 2, 3) 676s ***** shared x 676s x = gamrnd (1, 1, [100, 1]); 676s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 676s paramci (GammaDistribution.fit (x), "alpha") 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", 0) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", 1) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", "") 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 676s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 676s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 676s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 676s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 676s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 676s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 676s "parameter", {"a", "b", "param"}) 677s ***** error <paramci: unknown distribution parameter.> ... 677s paramci (GammaDistribution.fit (x), "parameter", "param") 677s ***** error <paramci: unknown distribution parameter.> ... 677s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 677s ***** error <paramci: invalid NAME for optional argument.> ... 677s paramci (GammaDistribution.fit (x), "NAME", "value") 677s ***** error <paramci: invalid NAME for optional argument.> ... 677s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 677s ***** error <paramci: invalid NAME for optional argument.> ... 677s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 677s "NAME", "value") 677s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 677s plot (GammaDistribution, "Parent") 677s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 677s plot (GammaDistribution, "PlotType", 12) 677s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 677s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 677s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 677s plot (GammaDistribution, "PlotType", "pdfcdf") 677s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 677s plot (GammaDistribution, "Discrete", "pdfcdf") 677s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 677s plot (GammaDistribution, "Discrete", [1, 0]) 677s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 677s plot (GammaDistribution, "Discrete", {true}) 677s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 677s plot (GammaDistribution, "Parent", 12) 677s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 677s plot (GammaDistribution, "Parent", "hax") 677s ***** error <plot: invalid NAME for optional argument.> ... 677s plot (GammaDistribution, "invalidNAME", "pdf") 677s ***** error <plot: no fitted DATA to plot a probability plot.> ... 677s plot (GammaDistribution, "PlotType", "probability") 677s ***** error <proflik: no fitted data available.> ... 677s proflik (GammaDistribution, 2) 677s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 677s proflik (GammaDistribution.fit (x), 3) 677s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 677s proflik (GammaDistribution.fit (x), [1, 2]) 677s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 677s proflik (GammaDistribution.fit (x), {1}) 677s ***** error <proflik: SETPARAM must be a numeric vector.> ... 677s proflik (GammaDistribution.fit (x), 1, ones (2)) 677s ***** error <proflik: missing VALUE for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display") 677s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display", 1) 677s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 677s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 677s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 677s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 677s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 677s ***** error <proflik: invalid NAME for optional arguments.> ... 677s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 677s ***** error <proflik: invalid optional argument.> ... 677s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 677s ***** error <proflik: invalid optional argument.> ... 677s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 677s ***** error <truncate: missing input argument.> ... 677s truncate (GammaDistribution) 677s ***** error <truncate: missing input argument.> ... 677s truncate (GammaDistribution, 2) 677s ***** error <truncate: invalid lower upper limits.> ... 677s truncate (GammaDistribution, 4, 2) 677s ***** shared pd 677s pd = GammaDistribution(1, 1); 677s pd(2) = GammaDistribution(1, 3); 677s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 677s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 677s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 677s ***** error <mean: requires a scalar probability distribution.> mean (pd) 677s ***** error <median: requires a scalar probability distribution.> median (pd) 677s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 677s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 677s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 677s ***** error <plot: requires a scalar probability distribution.> plot (pd) 677s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 677s ***** error <random: requires a scalar probability distribution.> random (pd) 677s ***** error <std: requires a scalar probability distribution.> std (pd) 677s ***** error <truncate: requires a scalar probability distribution.> ... 677s truncate (pd, 2, 4) 677s ***** error <var: requires a scalar probability distribution.> var (pd) 677s 96 tests, 96 passed, 0 known failure, 0 skipped 677s [inst/dist_obj/BurrDistribution.m] 677s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/BurrDistribution.m 677s ***** demo 677s ## Generate a data set of 5000 random samples from a Burr type XII 677s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 677s ## XII distribution to this data and plot a PDF of the fitted distribution 677s ## superimposed on a histogram of the data 677s 677s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 677s rand ("seed", 21); 677s data = random (pd, 5000, 1); 677s pd = fitdist (data, "Burr") 677s plot (pd) 677s msg = strcat (["Fitted Burr type XII distribution with"], ... 677s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 677s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 677s ***** demo 677s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 677s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 677s ## samples from this truncated distribution and superimpose a histogram with 677s ## 100 bins scaled accordingly 677s 677s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 677s t = truncate (pd, 0.5, 2.5) 677s rand ("seed", 21); 677s data = random (t, 10000, 1); 677s plot (t) 677s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 677s hold on 677s hist (data, 100, 50) 677s hold off 677s ***** demo 677s ## Generate a data set of 100 random samples from a Burr type XII 677s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 677s ## XII distribution to this data and plot its CDF superimposed over an 677s ## empirical CDF of the data 677s 677s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 677s rand ("seed", 21); 677s data = random (pd, 100, 1); 677s pd = fitdist (data, "Burr") 677s plot (pd, "plottype", "cdf") 677s msg = strcat (["Fitted Burr type XII distribution with"], ... 677s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 677s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 677s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 677s ***** shared pd, t 677s pd = BurrDistribution; 677s t = truncate (pd, 2, 4); 677s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 677s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 677s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 677s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 677s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 677s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 677s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 677s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 677s ***** assert (iqr (pd), 2.6667, 1e-4); 677s ***** assert (iqr (t), 0.9524, 1e-4); 677s ***** assert (mean (pd), Inf); 677s ***** assert (mean (t), 2.8312, 1e-4); 677s ***** assert (median (pd), 1, 1e-4); 677s ***** assert (median (t), 2.75, 1e-4); 677s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 677s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 677s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 677s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 677s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 677s ***** assert (any (random (t, 1000, 1) < 2), false); 677s ***** assert (any (random (t, 1000, 1) > 4), false); 677s ***** assert (std (pd), Inf); 677s ***** assert (std (t), 0.5674, 1e-4); 677s ***** assert (var (pd), Inf); 677s ***** assert (var (t), 0.3220, 1e-4); 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution(0, 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution(-1, 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution(Inf, 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution(i, 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution("a", 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution([1, 2], 1, 1) 677s ***** error <BurrDistribution: ALPHA must be a positive real scalar.> ... 677s BurrDistribution(NaN, 1, 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, 0, 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, -1, 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, Inf, 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, i, 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, "a", 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, [1, 2], 1) 677s ***** error <BurrDistribution: C must be a positive real scalar.> ... 677s BurrDistribution(1, NaN, 1) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, 0) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, -1) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, Inf) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, i) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, "a") 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, [1, 2]) 677s ***** error <BurrDistribution: K must be a positive real scalar.> ... 677s BurrDistribution(1, 1, NaN) 677s ***** error <cdf: invalid argument for upper tail.> ... 677s cdf (BurrDistribution, 2, "uper") 677s ***** error <cdf: invalid argument for upper tail.> ... 677s cdf (BurrDistribution, 2, 3) 677s ***** shared x 677s rand ("seed", 4); 677s x = burrrnd (1, 1, 1, [1, 100]); 677s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 677s paramci (BurrDistribution.fit (x), "alpha") 677s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 677s paramci (BurrDistribution.fit (x), "alpha", 0) 677s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 677s paramci (BurrDistribution.fit (x), "alpha", 1) 677s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 677s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 677s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 677s paramci (BurrDistribution.fit (x), "alpha", "") 678s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 678s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 678s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 678s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 678s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 678s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 678s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 678s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 678s "parameter", {"alpha", "c", "k", "param"}) 678s ***** error <paramci: unknown distribution parameter.> ... 678s paramci (BurrDistribution.fit (x), "parameter", "param") 678s ***** error <paramci: unknown distribution parameter.> ... 678s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 678s ***** error <paramci: invalid NAME for optional argument.> ... 678s paramci (BurrDistribution.fit (x), "NAME", "value") 678s ***** error <paramci: invalid NAME for optional argument.> ... 678s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 678s ***** error <paramci: invalid NAME for optional argument.> ... 678s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 678s "NAME", "value") 678s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 678s plot (BurrDistribution, "Parent") 678s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 678s plot (BurrDistribution, "PlotType", 12) 678s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 678s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 678s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 678s plot (BurrDistribution, "PlotType", "pdfcdf") 678s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 678s plot (BurrDistribution, "Discrete", "pdfcdf") 678s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 678s plot (BurrDistribution, "Discrete", [1, 0]) 678s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 678s plot (BurrDistribution, "Discrete", {true}) 678s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 678s plot (BurrDistribution, "Parent", 12) 678s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 678s plot (BurrDistribution, "Parent", "hax") 678s ***** error <plot: invalid NAME for optional argument.> ... 678s plot (BurrDistribution, "invalidNAME", "pdf") 678s ***** error <plot: no fitted DATA to plot a probability plot.> ... 678s plot (BurrDistribution, "PlotType", "probability") 678s ***** error <proflik: no fitted data available.> ... 678s proflik (BurrDistribution, 2) 678s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 678s proflik (BurrDistribution.fit (x), 4) 678s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 678s proflik (BurrDistribution.fit (x), [1, 2]) 678s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 678s proflik (BurrDistribution.fit (x), {1}) 679s ***** error <proflik: SETPARAM must be a numeric vector.> ... 679s proflik (BurrDistribution.fit (x), 1, ones (2)) 679s ***** error <proflik: missing VALUE for 'Display' argument.> ... 679s proflik (BurrDistribution.fit (x), 1, "Display") 680s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 680s proflik (BurrDistribution.fit (x), 1, "Display", 1) 680s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 680s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 680s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 680s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 680s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 680s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 680s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 680s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 680s ***** error <proflik: invalid NAME for optional arguments.> ... 680s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 680s ***** error <proflik: invalid optional argument.> ... 680s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 680s ***** error <proflik: invalid optional argument.> ... 680s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 680s ***** error <truncate: missing input argument.> ... 680s truncate (BurrDistribution) 680s ***** error <truncate: missing input argument.> ... 680s truncate (BurrDistribution, 2) 680s ***** error <truncate: invalid lower upper limits.> ... 680s truncate (BurrDistribution, 4, 2) 680s ***** shared pd 680s pd = BurrDistribution(1, 1, 1); 680s pd(2) = BurrDistribution(1, 3, 1); 680s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 680s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 680s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 680s ***** error <mean: requires a scalar probability distribution.> mean (pd) 680s ***** error <median: requires a scalar probability distribution.> median (pd) 680s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 680s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 680s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 680s ***** error <plot: requires a scalar probability distribution.> plot (pd) 680s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 680s ***** error <random: requires a scalar probability distribution.> random (pd) 680s ***** error <std: requires a scalar probability distribution.> std (pd) 680s ***** error <truncate: requires a scalar probability distribution.> ... 680s truncate (pd, 2, 4) 680s ***** error <var: requires a scalar probability distribution.> var (pd) 680s 104 tests, 104 passed, 0 known failure, 0 skipped 680s [inst/dist_obj/LoguniformDistribution.m] 680s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/LoguniformDistribution.m 680s ***** shared pd, t 680s pd = LoguniformDistribution (1, 4); 680s t = truncate (pd, 2, 4); 680s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 680s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 680s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 680s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 680s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 680s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 680s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 680s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 680s ***** assert (iqr (pd), 1.4142, 1e-4); 680s ***** assert (iqr (t), 0.9852, 1e-4); 680s ***** assert (mean (pd), 2.1640, 1e-4); 680s ***** assert (mean (t), 2.8854, 1e-4); 680s ***** assert (median (pd), 2); 680s ***** assert (median (t), 2.8284, 1e-4); 680s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 680s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 680s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 680s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 680s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 680s ***** assert (any (random (pd, 1000, 1) < 1), false); 680s ***** assert (any (random (pd, 1000, 1) > 4), false); 680s ***** assert (any (random (t, 1000, 1) < 2), false); 680s ***** assert (any (random (t, 1000, 1) > 4), false); 680s ***** assert (std (pd), 0.8527, 1e-4); 680s ***** assert (std (t), 0.5751, 1e-4); 680s ***** assert (var (pd), 0.7270, 1e-4); 680s ***** assert (var (t), 0.3307, 1e-4); 680s ***** error <LoguniformDistribution: LOWER must be a positive real scalar.> ... 680s LoguniformDistribution (i, 1) 680s ***** error <LoguniformDistribution: LOWER must be a positive real scalar.> ... 680s LoguniformDistribution (Inf, 1) 680s ***** error <LoguniformDistribution: LOWER must be a positive real scalar.> ... 680s LoguniformDistribution ([1, 2], 1) 680s ***** error <LoguniformDistribution: LOWER must be a positive real scalar.> ... 680s LoguniformDistribution ("a", 1) 680s ***** error <LoguniformDistribution: LOWER must be a positive real scalar.> ... 680s LoguniformDistribution (NaN, 1) 680s ***** error <LoguniformDistribution: UPPER must be a real scalar.> ... 680s LoguniformDistribution (1, i) 680s ***** error <LoguniformDistribution: UPPER must be a real scalar.> ... 680s LoguniformDistribution (1, Inf) 680s ***** error <LoguniformDistribution: UPPER must be a real scalar.> ... 680s LoguniformDistribution (1, [1, 2]) 680s ***** error <LoguniformDistribution: UPPER must be a real scalar.> ... 680s LoguniformDistribution (1, "a") 680s ***** error <LoguniformDistribution: UPPER must be a real scalar.> ... 680s LoguniformDistribution (1, NaN) 680s ***** error <LoguniformDistribution: LOWER must be less than UPPER.> ... 680s LoguniformDistribution (2, 1) 680s ***** error <cdf: invalid argument for upper tail.> ... 680s cdf (LoguniformDistribution, 2, "uper") 680s ***** error <cdf: invalid argument for upper tail.> ... 680s cdf (LoguniformDistribution, 2, 3) 680s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 680s plot (LoguniformDistribution, "Parent") 680s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 680s plot (LoguniformDistribution, "PlotType", 12) 680s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 680s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 680s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 680s plot (LoguniformDistribution, "PlotType", "pdfcdf") 680s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 680s plot (LoguniformDistribution, "Discrete", "pdfcdf") 680s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 680s plot (LoguniformDistribution, "Discrete", [1, 0]) 680s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 680s plot (LoguniformDistribution, "Discrete", {true}) 680s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 680s plot (LoguniformDistribution, "Parent", 12) 680s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 680s plot (LoguniformDistribution, "Parent", "hax") 680s ***** error <plot: invalid NAME for optional argument.> ... 680s plot (LoguniformDistribution, "invalidNAME", "pdf") 680s ***** error <plot: 'probability' PlotType is not supported for 'LoguniformDistribution'.> ... 680s plot (LoguniformDistribution, "PlotType", "probability") 680s ***** error <truncate: missing input argument.> ... 680s truncate (LoguniformDistribution) 680s ***** error <truncate: missing input argument.> ... 680s truncate (LoguniformDistribution, 2) 680s ***** error <truncate: invalid lower upper limits.> ... 680s truncate (LoguniformDistribution, 4, 2) 680s ***** shared pd 680s pd = LoguniformDistribution(1, 4); 680s pd(2) = LoguniformDistribution(2, 5); 680s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 680s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 680s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 680s ***** error <mean: requires a scalar probability distribution.> mean (pd) 680s ***** error <median: requires a scalar probability distribution.> median (pd) 680s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 680s ***** error <plot: requires a scalar probability distribution.> plot (pd) 680s ***** error <random: requires a scalar probability distribution.> random (pd) 680s ***** error <std: requires a scalar probability distribution.> std (pd) 680s ***** error <truncate: requires a scalar probability distribution.> ... 680s truncate (pd, 2, 4) 680s ***** error <var: requires a scalar probability distribution.> var (pd) 680s 65 tests, 65 passed, 0 known failure, 0 skipped 680s [inst/dist_obj/RicianDistribution.m] 680s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/RicianDistribution.m 680s ***** shared pd, t 680s pd = RicianDistribution; 680s t = truncate (pd, 2, 4); 680s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 680s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 680s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 680s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 680s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 680s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 680s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 680s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 680s ***** assert (iqr (pd), 1.0890, 1e-4); 680s ***** assert (iqr (t), 0.5928, 1e-4); 680s ***** assert (mean (pd), 1.5486, 1e-4); 680s ***** assert (mean (t), 2.5380, 1e-4); 680s ***** assert (median (pd), 1.4755, 1e-4); 680s ***** assert (median (t), 2.4341, 1e-4); 680s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 680s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 680s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 680s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 680s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 680s ***** assert (any (random (t, 1000, 1) < 2), false); 680s ***** assert (any (random (t, 1000, 1) > 4), false); 680s ***** assert (std (pd), 0.7758, 1e-4); 680s ***** assert (std (t), 0.4294, 1e-4); 680s ***** assert (var (pd), 0.6019, 1e-4); 680s ***** assert (var (t), 0.1844, 1e-4); 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution(-eps, 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution(-1, 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution(Inf, 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution(i, 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution("a", 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution([1, 2], 1) 680s ***** error <RicianDistribution: NU must be a non-negative real scalar.> ... 680s RicianDistribution(NaN, 1) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, 0) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, -1) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, Inf) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, i) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, "a") 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, [1, 2]) 680s ***** error <RicianDistribution: SIGMA must be a positive real scalar.> ... 680s RicianDistribution(1, NaN) 680s ***** error <cdf: invalid argument for upper tail.> ... 680s cdf (RicianDistribution, 2, "uper") 680s ***** error <cdf: invalid argument for upper tail.> ... 680s cdf (RicianDistribution, 2, 3) 680s ***** shared x 680s x = gevrnd (1, 1, 1, [1, 100]); 680s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 680s paramci (RicianDistribution.fit (x), "alpha") 680s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 680s paramci (RicianDistribution.fit (x), "alpha", 0) 680s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 680s paramci (RicianDistribution.fit (x), "alpha", 1) 680s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 680s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 680s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 680s paramci (RicianDistribution.fit (x), "alpha", "") 681s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 681s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 681s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 681s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 681s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 681s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 681s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 681s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 681s "parameter", {"s", "sigma", "param"}) 681s ***** error <paramci: unknown distribution parameter.> ... 681s paramci (RicianDistribution.fit (x), "parameter", "param") 681s ***** error <paramci: unknown distribution parameter.> ... 681s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 681s ***** error <paramci: invalid NAME for optional argument.> ... 681s paramci (RicianDistribution.fit (x), "NAME", "value") 681s ***** error <paramci: invalid NAME for optional argument.> ... 681s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 681s ***** error <paramci: invalid NAME for optional argument.> ... 681s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 681s "NAME", "value") 681s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 681s plot (RicianDistribution, "Parent") 681s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 681s plot (RicianDistribution, "PlotType", 12) 681s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 681s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 681s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 681s plot (RicianDistribution, "PlotType", "pdfcdf") 681s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 681s plot (RicianDistribution, "Discrete", "pdfcdf") 681s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 681s plot (RicianDistribution, "Discrete", [1, 0]) 681s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 681s plot (RicianDistribution, "Discrete", {true}) 681s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 681s plot (RicianDistribution, "Parent", 12) 681s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 681s plot (RicianDistribution, "Parent", "hax") 681s ***** error <plot: invalid NAME for optional argument.> ... 681s plot (RicianDistribution, "invalidNAME", "pdf") 681s ***** error <plot: no fitted DATA to plot a probability plot.> ... 681s plot (RicianDistribution, "PlotType", "probability") 681s ***** error <proflik: no fitted data available.> ... 681s proflik (RicianDistribution, 2) 681s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 681s proflik (RicianDistribution.fit (x), 3) 681s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 681s proflik (RicianDistribution.fit (x), [1, 2]) 681s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 681s proflik (RicianDistribution.fit (x), {1}) 681s ***** error <proflik: SETPARAM must be a numeric vector.> ... 681s proflik (RicianDistribution.fit (x), 1, ones (2)) 681s ***** error <proflik: missing VALUE for 'Display' argument.> ... 681s proflik (RicianDistribution.fit (x), 1, "Display") 681s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 681s proflik (RicianDistribution.fit (x), 1, "Display", 1) 681s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 681s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 682s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 682s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 682s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 682s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 682s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 682s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 682s ***** error <proflik: invalid NAME for optional arguments.> ... 682s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 682s ***** error <proflik: invalid optional argument.> ... 682s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 682s ***** error <proflik: invalid optional argument.> ... 682s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 682s ***** error <truncate: missing input argument.> ... 682s truncate (RicianDistribution) 682s ***** error <truncate: missing input argument.> ... 682s truncate (RicianDistribution, 2) 682s ***** error <truncate: invalid lower upper limits.> ... 682s truncate (RicianDistribution, 4, 2) 682s ***** shared pd 682s pd = RicianDistribution(1, 1); 682s pd(2) = RicianDistribution(1, 3); 682s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 682s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 682s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 682s ***** error <mean: requires a scalar probability distribution.> mean (pd) 682s ***** error <median: requires a scalar probability distribution.> median (pd) 682s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 682s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 682s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 682s ***** error <plot: requires a scalar probability distribution.> plot (pd) 682s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 682s ***** error <random: requires a scalar probability distribution.> random (pd) 682s ***** error <std: requires a scalar probability distribution.> std (pd) 682s ***** error <truncate: requires a scalar probability distribution.> ... 682s truncate (pd, 2, 4) 682s ***** error <var: requires a scalar probability distribution.> var (pd) 682s 97 tests, 97 passed, 0 known failure, 0 skipped 682s [inst/dist_obj/WeibullDistribution.m] 682s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_obj/WeibullDistribution.m 682s ***** shared pd, t 682s pd = WeibullDistribution; 682s t = truncate (pd, 2, 4); 682s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 682s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 682s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 682s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 682s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 682s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 682s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 682s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 682s ***** assert (iqr (pd), 1.0986, 1e-4); 682s ***** assert (iqr (t), 0.8020, 1e-4); 682s ***** assert (mean (pd), 1, 1e-14); 682s ***** assert (mean (t), 2.6870, 1e-4); 682s ***** assert (median (pd), 0.6931, 1e-4); 682s ***** assert (median (t), 2.5662, 1e-4); 682s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 682s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 682s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 682s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 682s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 682s ***** assert (any (random (t, 1000, 1) < 2), false); 682s ***** assert (any (random (t, 1000, 1) > 4), false); 682s ***** assert (std (pd), 1, 1e-14); 682s ***** assert (std (t), 0.5253, 1e-4); 682s ***** assert (var (pd), 1, 1e-14); 682s ***** assert (var (t), 0.2759, 1e-4); 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution(0, 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution(-1, 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution(Inf, 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution(i, 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution("a", 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution([1, 2], 1) 682s ***** error <WeibullDistribution: LAMBDA must be a positive real scalar.> ... 682s WeibullDistribution(NaN, 1) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, 0) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, -1) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, Inf) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, i) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, "a") 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, [1, 2]) 682s ***** error <WeibullDistribution: K must be a positive real scalar.> ... 682s WeibullDistribution(1, NaN) 682s ***** error <cdf: invalid argument for upper tail.> ... 682s cdf (WeibullDistribution, 2, "uper") 682s ***** error <cdf: invalid argument for upper tail.> ... 682s cdf (WeibullDistribution, 2, 3) 682s ***** shared x 682s x = wblrnd (1, 1, [1, 100]); 682s ***** error <paramci: optional arguments must be in NAME-VALUE pairs.> ... 682s paramci (WeibullDistribution.fit (x), "alpha") 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 0) 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 1) 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", "") 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 682s ***** error <paramci: invalid VALUE for 'Alpha' argument.> ... 682s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 682s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 682s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 682s ***** error <paramci: invalid VALUE size for 'Parameter' argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 682s "parameter", {"lambda", "k", "param"}) 682s ***** error <paramci: unknown distribution parameter.> ... 682s paramci (WeibullDistribution.fit (x), "parameter", "param") 682s ***** error <paramci: unknown distribution parameter.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 682s ***** error <paramci: invalid NAME for optional argument.> ... 682s paramci (WeibullDistribution.fit (x), "NAME", "value") 682s ***** error <paramci: invalid NAME for optional argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 682s ***** error <paramci: invalid NAME for optional argument.> ... 682s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 682s "NAME", "value") 682s ***** error <plot: optional arguments must be in NAME-VALUE pairs.> ... 682s plot (WeibullDistribution, "Parent") 682s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 682s plot (WeibullDistribution, "PlotType", 12) 682s ***** error <plot: invalid VALUE size for 'Parameter' argument.> ... 682s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 682s ***** error <plot: invalid VALUE for 'PlotType' argument.> ... 682s plot (WeibullDistribution, "PlotType", "pdfcdf") 682s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 682s plot (WeibullDistribution, "Discrete", "pdfcdf") 682s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 682s plot (WeibullDistribution, "Discrete", [1, 0]) 682s ***** error <plot: invalid VALUE for 'Discrete' argument.> ... 682s plot (WeibullDistribution, "Discrete", {true}) 682s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 682s plot (WeibullDistribution, "Parent", 12) 682s ***** error <plot: invalid VALUE for 'Parent' argument.> ... 682s plot (WeibullDistribution, "Parent", "hax") 682s ***** error <plot: invalid NAME for optional argument.> ... 682s plot (WeibullDistribution, "invalidNAME", "pdf") 682s ***** error <plot: no fitted DATA to plot a probability plot.> ... 682s plot (WeibullDistribution, "PlotType", "probability") 682s ***** error <proflik: no fitted data available.> ... 682s proflik (WeibullDistribution, 2) 682s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 682s proflik (WeibullDistribution.fit (x), 3) 682s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 682s proflik (WeibullDistribution.fit (x), [1, 2]) 682s ***** error <proflik: PNUM must be a scalar number indexing a non-fixed parameter.> ... 682s proflik (WeibullDistribution.fit (x), {1}) 682s ***** error <proflik: SETPARAM must be a numeric vector.> ... 682s proflik (WeibullDistribution.fit (x), 1, ones (2)) 682s ***** error <proflik: missing VALUE for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display") 682s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 682s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 682s ***** error <proflik: invalid VALUE type for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 682s ***** error <proflik: invalid VALUE size for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 682s ***** error <proflik: invalid VALUE for 'Display' argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 682s ***** error <proflik: invalid NAME for optional arguments.> ... 682s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 682s ***** error <proflik: invalid optional argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 682s ***** error <proflik: invalid optional argument.> ... 682s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 682s ***** error <truncate: missing input argument.> ... 682s truncate (WeibullDistribution) 682s ***** error <truncate: missing input argument.> ... 682s truncate (WeibullDistribution, 2) 682s ***** error <truncate: invalid lower upper limits.> ... 682s truncate (WeibullDistribution, 4, 2) 682s ***** shared pd 682s pd = WeibullDistribution(1, 1); 682s pd(2) = WeibullDistribution(1, 3); 682s ***** error <cdf: requires a scalar probability distribution.> cdf (pd, 1) 682s ***** error <icdf: requires a scalar probability distribution.> icdf (pd, 0.5) 682s ***** error <iqr: requires a scalar probability distribution.> iqr (pd) 682s ***** error <mean: requires a scalar probability distribution.> mean (pd) 682s ***** error <median: requires a scalar probability distribution.> median (pd) 682s ***** error <negloglik: requires a scalar probability distribution.> negloglik (pd) 682s ***** error <paramci: requires a scalar probability distribution.> paramci (pd) 682s ***** error <pdf: requires a scalar probability distribution.> pdf (pd, 1) 682s ***** error <plot: requires a scalar probability distribution.> plot (pd) 682s ***** error <proflik: requires a scalar probability distribution.> proflik (pd, 2) 682s ***** error <random: requires a scalar probability distribution.> random (pd) 682s ***** error <std: requires a scalar probability distribution.> std (pd) 682s ***** error <truncate: requires a scalar probability distribution.> ... 682s truncate (pd, 2, 4) 682s ***** error <var: requires a scalar probability distribution.> var (pd) 682s 97 tests, 97 passed, 0 known failure, 0 skipped 682s [inst/crossval.m] 682s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/crossval.m 682s ***** test 682s load fisheriris 682s y = meas(:, 1); 682s X = [ones(size(y)) meas(:, 2:4)]; 682s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 682s results0 = crossval (f, X, y); 682s results1 = crossval (f, X, y, 'KFold', 10); 682s folds = 5; 682s results2 = crossval (f, X, y, 'KFold', folds); 682s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 682s results4 = crossval (f, X, y, 'LeaveOut', 1); 682s mcreps = 2; n_holdout = 20; 682s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 682s 682s ## ensure equal representation of iris species in the training set -- tends 682s ## to slightly reduce cross-validation mean square error 682s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 682s 682s assert (results0, results1, 2e-15); 682s assert (results2, results3, 5e-17); 682s assert (size(results4), [1 numel(y)]); 682s assert (mean(results4), 0.1018, 1e-4); 682s assert (size(results5), [mcreps 1]); 682s warning: strmatch is obsolete; use strncmp or strcmp instead 682s 1 test, 1 passed, 0 known failure, 0 skipped 682s [inst/anova2.m] 682s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/anova2.m 682s ***** demo 682s 682s # Factorial (Crossed) Two-way ANOVA with Interaction 682s 682s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 682s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 682s 682s [p, atab, stats] = anova2(popcorn, 3, "on"); 682s ***** demo 682s 682s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 682s 682s data = [54, 43, 78, 111; 682s 23, 34, 37, 41; 682s 45, 65, 99, 78; 682s 31, 33, 36, 35; 682s 15, 25, 30, 26]; 682s 682s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 682s ***** demo 682s 682s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 682s 682s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 682s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 682s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 682s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 682s 682s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 682s ***** test 682s ## Test for anova2 ("interaction") 682s ## comparison with results from Matlab for column effect 682s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 682s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 682s [p, atab, stats] = anova2 (popcorn, 3, "off"); 682s assert (p(1), 7.678957383294716e-07, 1e-14); 682s assert (p(2), 0.0001003738963050171, 1e-14); 682s assert (p(3), 0.7462153966366274, 1e-14); 682s assert (atab{2,5}, 56.700, 1e-14); 682s assert (atab{2,3}, 2, 0); 682s assert (atab{4,2}, 0.08333333333333348, 1e-14); 682s assert (atab{5,4}, 0.1388888888888889, 1e-14); 682s assert (atab{5,2}, 1.666666666666667, 1e-14); 682s assert (atab{6,2}, 22); 682s assert (stats.source, "anova2"); 682s assert (stats.colmeans, [6.25, 4.75, 4]); 682s assert (stats.inter, 1, 0); 682s assert (stats.pval, 0.7462153966366274, 1e-14); 682s assert (stats.df, 12); 682s ***** test 682s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 682s data = [54, 43, 78, 111; 682s 23, 34, 37, 41; 682s 45, 65, 99, 78; 682s 31, 33, 36, 35; 682s 15, 25, 30, 26]; 682s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 682s assert (atab{2,2}, 2174.95, 1e-10); 682s assert (atab{3,2}, 8371.7, 1e-10); 682s assert (atab{4,2}, 2404.3, 1e-10); 682s assert (atab{5,2}, 12950.95, 1e-10); 682s assert (atab{2,4}, 724.983333333333, 1e-10); 682s assert (atab{3,4}, 2092.925, 1e-10); 682s assert (atab{4,4}, 200.358333333333, 1e-10); 682s assert (atab{2,5}, 3.61843363972882, 1e-10); 682s assert (atab{3,5}, 10.445909412303, 1e-10); 682s assert (atab{2,6}, 0.087266112738617, 1e-10); 682s assert (atab{3,6}, 0.000698397753556, 1e-10); 682s ***** test 682s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 682s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 682s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 682s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 682s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 682s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 682s assert (atab{2,2}, 745.360306290833, 1e-10); 682s assert (atab{3,2}, 278.01854140125, 1e-10); 682s assert (atab{4,2}, 180.180377467501, 1e-10); 682s assert (atab{5,2}, 1203.55922515958, 1e-10); 682s assert (atab{2,4}, 372.680153145417, 1e-10); 682s assert (atab{3,4}, 92.67284713375, 1e-10); 682s assert (atab{4,4}, 10.0100209704167, 1e-10); 682s assert (atab{2,5}, 4.02146005730833, 1e-10); 682s assert (atab{3,5}, 9.25800729165627, 1e-10); 682s assert (atab{2,6}, 0.141597630656771, 1e-10); 682s assert (atab{3,6}, 0.000636643812875719, 1e-10); 682s 3 tests, 3 passed, 0 known failure, 0 skipped 682s [inst/confusionchart.m] 682s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/confusionchart.m 682s ***** demo 682s ## Setting the chart properties 682s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 682s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 682s confusionchart (Yt, Yp, "Title", ... 682s "Demonstration with summaries","Normalization",... 682s "absolute","ColumnSummary", "column-normalized","RowSummary",... 682s "row-normalized") 682s ***** demo 682s ## Cellstr as inputs 682s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 682s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 682s m = confusionmat (Yt, Yp); 682s confusionchart (m, {"Positive", "Negative"}); 682s ***** demo 682s ## Editing the object properties 682s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 682s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 682s cm = confusionchart (Yt, Yp); 682s cm.Title = "This is an example with a green diagonal"; 682s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 682s ***** demo 682s ## Confusion chart in a uipanel 682s h = uipanel (); 682s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 682s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 682s cm = confusionchart (h, Yt, Yp); 682s ***** demo 682s ## Sorting classes 682s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 682s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 682s cm = confusionchart (Yt, Yp, "Title", ... 682s "Classes are sorted in ascending order"); 682s cm = confusionchart (Yt, Yp, "Title", ... 682s "Classes are sorted according to clusters"); 682s sortClasses (cm, "cluster"); 682s ***** shared visibility_setting 682s visibility_setting = get (0, "DefaultFigureVisible"); 682s ***** test 682s set (0, "DefaultFigureVisible", "off"); 682s fail ("confusionchart ()", "Invalid call"); 682s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 683s ".* YLabel .* string"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 683s ".* FontName .* string"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 683s ".* FontSize .* numeric"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 683s ".* DiagonalColor .* color"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 683s ".* OffDiagonalColor .* color"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 683s ".* invalid .* Normalization"); 683s set (0, "DefaultFigureVisible", visibility_setting); 683s ***** test 683s set (0, "DefaultFigureVisible", "off"); 683s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 683s ".* invalid .* ColumnSummary"); 683s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 684s ".* invalid .* RowSummary"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 684s ".* invalid .* GridVisible"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 684s ".* invalid .* HandleVisibility"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 684s ".* invalid .* OuterPosition"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 684s ".* invalid .* Position"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s ***** test 684s set (0, "DefaultFigureVisible", "off"); 684s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 684s set (0, "DefaultFigureVisible", visibility_setting); 684s 18 tests, 18 passed, 0 known failure, 0 skipped 684s [inst/regression_ttest.m] 684s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/regression_ttest.m 684s ***** error<Invalid call to regression_ttest. Correct usage> regression_ttest (); 686s ***** error<Invalid call to regression_ttest. Correct usage> regression_ttest (1); 686s ***** error<regression_ttest: Y must contain finite real numbers.> ... 686s regression_ttest ([1 2 NaN]', [2 3 4]'); 686s ***** error<regression_ttest: Y must contain finite real numbers.> ... 686s regression_ttest ([1 2 Inf]', [2 3 4]'); 686s ***** error<regression_ttest: Y must contain finite real numbers.> ... 686s regression_ttest ([1 2 3+i]', [2 3 4]'); 686s ***** error<regression_ttest: X must contain finite real numbers.> ... 686s regression_ttest ([1 2 3]', [2 3 NaN]'); 686s ***** error<regression_ttest: X must contain finite real numbers.> ... 686s regression_ttest ([1 2 3]', [2 3 Inf]'); 686s ***** error<regression_ttest: X must contain finite real numbers.> ... 686s regression_ttest ([1 2 3]', [3 4 3+i]'); 686s ***** error<regression_ttest: Y and X must be vectors of equal length.> ... 686s regression_ttest ([1 2 3]', [3 4 4 5]'); 686s ***** error<regression_ttest: invalid value for alpha.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 686s ***** error<regression_ttest: invalid value for alpha.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 686s ***** error<regression_ttest: invalid value for alpha.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 686s ***** error<regression_ttest: invalid value for alpha.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 686s ***** error<regression_ttest: invalid Name argument.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 686s ***** error<regression_ttest: invalid value for tail.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 686s ***** error<regression_ttest: invalid value for tail.> ... 686s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 686s 16 tests, 16 passed, 0 known failure, 0 skipped 686s [inst/tiedrank.m] 686s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/tiedrank.m 686s ***** test 686s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 686s assert (r, [1, 2.5, 4, 5, 2.5]); 686s assert (tieadj, 3); 686s ***** test 686s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 686s assert (r, [1; 2.5; 4; 5; 2.5]); 686s assert (tieadj, 3); 686s ***** test 686s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 686s assert (r, [1, 2.5, 4, 5, 2.5]); 686s assert (tieadj, [1; 0; 18]); 686s ***** test 686s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 686s assert (r, [1, 2.5, 2, 1, 2.5]); 686s assert (tieadj, 3); 686s ***** test 686s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 686s assert (r, [1, 2.5, 2, 1, 2.5]); 686s assert (tieadj, [1; 0; 18]); 686s ***** error <tiedrank: X must be a vector.> tiedrank (ones (2)) 686s ***** error <tiedrank: TIEFLAG must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 686s ***** error <tiedrank: TIEFLAG must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], "A") 686s ***** error <tiedrank: TIEFLAG must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], [true, true]) 686s ***** error <tiedrank: BIDIR must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 686s ***** error <tiedrank: BIDIR must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], 0, "A") 686s ***** error <tiedrank: BIDIR must be a numeric or boolean scalar.> ... 686s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 686s 12 tests, 12 passed, 0 known failure, 0 skipped 686s [inst/dendrogram.m] 686s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dendrogram.m 686s ***** demo 686s ## simple dendrogram 686s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 686s y(:,3) = 1:5; 686s dendrogram (y); 686s title ("simple dendrogram"); 686s ***** demo 686s ## another simple dendrogram 686s v = 2 * rand (30, 1) - 1; 686s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 686s y = linkage (squareform (d, "tovector")); 686s dendrogram (y); 686s title ("another simple dendrogram"); 686s ***** demo 686s ## collapsed tree, find all the leaves of node 5 686s X = randn (60, 2); 686s D = pdist (X); 686s y = linkage (D, "average"); 686s subplot (2, 1, 1); 686s title ("original tree"); 686s dendrogram (y, 0); 686s subplot (2, 1, 2); 686s title ("collapsed tree"); 686s [~, t] = dendrogram (y, 20); 686s find(t == 5) 686s ***** demo 686s ## optimal leaf order 686s X = randn (30, 2); 686s D = pdist (X); 686s y = linkage (D, "average"); 686s order = optimalleaforder (y, D); 686s subplot (2, 1, 1); 686s title ("original leaf order"); 686s dendrogram (y); 686s subplot (2, 1, 2); 686s title ("optimal leaf order"); 686s dendrogram (y, "Reorder", order); 686s ***** demo 686s ## horizontal orientation and labels 686s X = randn (8, 2); 686s D = pdist (X); 686s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 686s "Sneezy"; "Dopey"]; 686s y = linkage (D, "average"); 686s dendrogram (y, "Orientation", "left", "Labels", L); 686s title ("horizontal orientation and labels"); 686s ***** shared visibility_setting 686s visibility_setting = get (0, "DefaultFigureVisible"); 686s ***** test 686s hf = figure ("visible", "off"); 686s unwind_protect 686s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 686s y(:,3) = 1:5; 686s dendrogram (y); 686s unwind_protect_cleanup 686s close (hf); 686s end_unwind_protect 686s ***** test 686s hf = figure ("visible", "off"); 686s unwind_protect 686s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 686s y(:,3) = 1:5; 686s dendrogram (y); 686s unwind_protect_cleanup 686s close (hf); 686s end_unwind_protect 686s ***** test 686s hf = figure ("visible", "off"); 686s unwind_protect 686s v = 2 * rand (30, 1) - 1; 686s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 686s y = linkage (squareform (d, "tovector")); 686s dendrogram (y); 686s unwind_protect_cleanup 686s close (hf); 686s end_unwind_protect 686s ***** test 686s hf = figure ("visible", "off"); 686s unwind_protect 686s X = randn (30, 2); 686s D = pdist (X); 686s y = linkage (D, "average"); 686s order = optimalleaforder (y, D); 686s subplot (2, 1, 1); 686s title ("original leaf order"); 686s dendrogram (y); 686s subplot (2, 1, 2); 686s title ("optimal leaf order"); 686s dendrogram (y, "Reorder", order); 686s unwind_protect_cleanup 686s close (hf); 686s end_unwind_protect 687s ***** error dendrogram (); 687s ***** error <tree must be .*> dendrogram (ones (2, 2), 1); 687s ***** error <unknown property .*> dendrogram ([1 2 1], 1, "xxx", "xxx"); 687s ***** error <reorder.*> dendrogram ([1 2 1], "Reorder", "xxx"); 687s ***** error <reorder.*> dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 687s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 687s 9 tests, 9 passed, 0 known failure, 0 skipped 687s [inst/linkage.m] 687s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/linkage.m 687s ***** shared x, t 687s x = reshape (mod (magic (6),5), [], 3); 687s t = 1e-6; 687s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 687s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 687s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 687s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 687s lastwarn(); # Clear last warning before the test 687s ***** warning <cluster distances> linkage (pdist (x), "centroid"); 687s ***** test 687s warning off Octave:clustering 687s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 687s warning on Octave:clustering 687s ***** warning <cluster distances> linkage (pdist (x), "median"); 687s ***** test 687s warning off Octave:clustering 687s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 687s warning on Octave:clustering 687s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 687s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 687s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 687s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 687s 12 tests, 12 passed, 0 known failure, 0 skipped 687s [inst/hotelling_t2test2.m] 687s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hotelling_t2test2.m 687s ***** error<Invalid call to hotelling_t2test2. Correct usage> hotelling_t2test2 (); 687s ***** error<Invalid call to hotelling_t2test2. Correct usage> ... 687s hotelling_t2test2 ([2, 3, 4, 5, 6]); 687s ***** error<hotelling_t2test2: X must be a vector or a 2D matrix.> ... 687s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 687s ***** error<hotelling_t2test2: X must be a vector or a 2D matrix.> ... 687s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 687s ***** error<hotelling_t2test2: Y must be a vector or a 2D matrix.> ... 687s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 687s ***** error<hotelling_t2test2: Y must be a vector or a 2D matrix.> ... 687s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 687s ***** error<hotelling_t2test2: invalid value for alpha.> ... 687s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 687s ***** error<hotelling_t2test2: invalid value for alpha.> ... 687s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 687s ***** error<hotelling_t2test2: invalid value for alpha.> ... 687s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 687s ***** error<hotelling_t2test2: invalid value for alpha.> ... 687s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 687s ***** error<hotelling_t2test2: invalid Name argument.> ... 687s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 687s ***** error<hotelling_t2test2: if X is a vector, Y must also be a vector.> ... 687s hotelling_t2test2 (ones (20,1), ones (20,2)); 687s ***** error<hotelling_t2test2: X and Y must have the same number of columns.> ... 687s hotelling_t2test2 (ones (20,2), ones (25,3)); 687s ***** test 687s randn ("seed", 1); 687s x1 = randn (60000, 5); 687s randn ("seed", 5); 687s x2 = randn (30000, 5); 687s [h, pval, stats] = hotelling_t2test2 (x1, x2); 687s assert (h, 0); 687s assert (stats.df1, 5); 687s assert (stats.df2, 89994); 687s 14 tests, 14 passed, 0 known failure, 0 skipped 687s [inst/chi2gof.m] 687s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/chi2gof.m 687s ***** demo 687s x = normrnd (50, 5, 100, 1); 687s [h, p, stats] = chi2gof (x) 687s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 687s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 687s ***** demo 687s x = rand (100,1 ); 687s n = length (x); 687s binedges = linspace (0, 1, 11); 687s expectedCounts = n * diff (binedges); 687s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 687s ***** demo 687s bins = 0:5; 687s obsCounts = [6 16 10 12 4 2]; 687s n = sum(obsCounts); 687s lambdaHat = sum(bins.*obsCounts) / n; 687s expCounts = n * poisspdf(bins,lambdaHat); 687s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 687s "expected", expCounts, "nparams",1) 687s ***** error chi2gof () 687s ***** error chi2gof ([2,3;3,4]) 687s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 687s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 687s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 687s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 687s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 687s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 687s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 687s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 687s ***** test 687s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 687s [h, p, stats] = chi2gof (x); 687s assert (h, 0); 687s assert (p, NaN); 687s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 687s assert (stats.df, 0); 687s assert (stats.edges, [1, 2.5, 4], 1e-14); 687s assert (stats.O, [7, 5], 1e-14); 687s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 687s 11 tests, 11 passed, 0 known failure, 0 skipped 687s [inst/ranksum.m] 687s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ranksum.m 687s ***** test 687s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 687s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 687s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 687s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 687s assert (p, 0.004329004329004329, 1e-14); 687s assert (h, true); 687s assert (stats.ranksum, 21.5); 687s ***** test 687s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 687s 49 47 50 60 59 60 62 61 71]'; 687s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 687s 54 50 53 62 62 62 72 60 67]'; 687s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 687s assert (p, 0.1270832752950605, 1e-14); 687s assert (h, false); 687s assert (stats.ranksum, 837.5); 687s assert (stats.zval, -1.140287483634606, 1e-14); 687s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 687s "method", "exact"); 687s assert (p, 0.127343916432862, 1e-14); 687s assert (h, false); 687s assert (stats.ranksum, 837.5); 697s 2 tests, 2 passed, 0 known failure, 0 skipped 697s [inst/ridge.m] 697s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ridge.m 697s ***** demo 697s ## Perform ridge regression for a range of ridge parameters and observe 697s ## how the coefficient estimates change based on the acetylene dataset. 697s 697s load acetylene 697s 697s X = [x1, x2, x3]; 697s 697s x1x2 = x1 .* x2; 697s x1x3 = x1 .* x3; 697s x2x3 = x2 .* x3; 697s 697s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 697s 697s k = 0:1e-5:5e-3; 697s 697s b = ridge (y, D, k); 697s 697s figure 697s plot (k, b, "LineWidth", 2) 697s ylim ([-100, 100]) 697s grid on 697s xlabel ("Ridge Parameter") 697s ylabel ("Standardized Coefficient") 697s title ("Ridge Trace") 697s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 697s 697s ***** demo 697s 697s load carbig 697s X = [Acceleration Weight Displacement Horsepower]; 697s y = MPG; 697s 697s n = length(y); 697s 697s rand("seed",1); % For reproducibility 697s 697s c = cvpartition(n,'HoldOut',0.3); 697s idxTrain = training(c,1); 697s idxTest = ~idxTrain; 697s 697s idxTrain = training(c,1); 697s idxTest = ~idxTrain; 697s 697s k = 5; 697s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 697s 697s % Predict MPG values for the test data using the model. 697s yhat = b(1) + X(idxTest,:)*b(2:end); 697s scatter(y(idxTest),yhat) 697s 697s hold on 697s plot(y(idxTest),y(idxTest),"r") 697s xlabel('Actual MPG') 697s ylabel('Predicted MPG') 697s hold off 697s 697s ***** test 697s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 697s assert (b, [0.5533; 0.5533], 1e-4); 697s ***** test 697s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 697s assert (b, [0.4841; 0.4841], 1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0); 697s assert (b,[10.2273;1.97128;-0.601818],1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0.0005); 697s assert (b,[10.2233;1.9712;-0.6056],1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0.001); 697s assert (b,[10.2194;1.9711;-0.6094],1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0.002); 697s assert (b,[10.2116;1.9709;-0.6169],1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0.005); 697s assert (b,[10.1882;1.9704;-0.6393],1e-4); 697s ***** test 697s load acetylene 697s x = [x1, x2, x3]; 697s b = ridge (y, x, 0.01); 697s assert (b,[10.1497;1.9695;-0.6761],1e-4); 697s ***** error<ridge: function called with too few input arguments.> ridge (1) 697s ***** error<ridge: function called with too few input arguments.> ridge (1, 2) 697s ***** error<ridge: Y must be a numeric column vector.> ridge (ones (3), ones (3), 2) 697s ***** error<ridge: Y must be a numeric column vector.> ridge ([1, 2], ones (2), 2) 697s ***** error<ridge: Y must be a numeric column vector.> ridge ([], ones (3), 2) 697s ***** error<ridge: X must be a numeric matrix.> ridge (ones (5,1), [], 2) 697s ***** error<ridge: Y and X must contain the same number of rows.> ... 697s ridge ([1; 2; 3; 4; 5], ones (3), 3) 697s ***** error<ridge: wrong value for SCALED argument.> ... 697s ridge ([1; 2; 3], ones (3), 3, 2) 697s ***** error<ridge: wrong value for SCALED argument.> ... 697s ridge ([1; 2; 3], ones (3), 3, "some") 697s 17 tests, 17 passed, 0 known failure, 0 skipped 697s [inst/vartest.m] 697s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/vartest.m 697s ***** error<vartest: too few input arguments.> vartest (); 697s ***** error<vartest: invalid value for variance.> vartest ([1, 2, 3, 4], -0.5); 697s ***** error<vartest: invalid value for alpha.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 0); 697s ***** error<vartest: invalid value for alpha.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 697s ***** error<vartest: invalid value for alpha.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 697s ***** error<vartest: invalid value for tail.> ... 697s vartest ([1, 2, 3, 4], 1, "tail", "val"); 697s ***** error<vartest: invalid value for tail.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 697s ***** error<vartest: invalid value for operating dimension.> ... 697s vartest ([1, 2, 3, 4], 1, "dim", 3); 697s ***** error<vartest: invalid value for operating dimension.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 697s ***** error<vartest: invalid name for optional arguments.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 697s ***** error<vartest: optional arguments must be in name/value pairs.> ... 697s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 697s ***** test 697s load carsmall 697s [h, pval, ci] = vartest (MPG, 7^2); 697s assert (h, 1); 697s assert (pval, 0.04335086742174443, 1e-14); 697s assert (ci, [49.397; 88.039], 1e-3); 697s 12 tests, 12 passed, 0 known failure, 0 skipped 697s [inst/inconsistent.m] 697s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/inconsistent.m 697s ***** error inconsistent () 697s ***** error inconsistent ([1 2 1], 2, 3) 697s ***** error <Z must be .* generated by the linkage .*> inconsistent (ones (2, 2)) 697s ***** error <d must be a positive integer scalar> inconsistent ([1 2 1], -1) 697s ***** error <d must be a positive integer scalar> inconsistent ([1 2 1], 1.3) 697s ***** error <d must be a positive integer scalar> inconsistent ([1 2 1], [1 1]) 697s ***** error <Z must be .* generated by the linkage .*> inconsistent (ones (2, 3)) 697s ***** test 697s load fisheriris; 697s Z = linkage(meas, 'average', 'chebychev'); 697s assert (cond (inconsistent (Z)), 39.9, 1e-3); 697s 8 tests, 8 passed, 0 known failure, 0 skipped 697s [inst/crosstab.m] 697s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/crosstab.m 697s ***** error crosstab () 697s ***** error crosstab (1) 697s ***** error <crosstab: x1, x2 ... xn must be vectors.> crosstab (ones (2), [1 1]) 697s ***** error <crosstab: x1, x2 ... xn must be vectors.> crosstab ([1 1], ones (2)) 697s ***** error <x1, x2 .* must be vectors of the same length> crosstab ([1], [1 2]) 697s ***** error <x1, x2 .* must be vectors of the same length> crosstab ([1 2], [1]) 697s ***** test 697s load carbig 697s [table, chisq, p, labels] = crosstab (cyl4, when, org); 697s assert (table(2,3,1), 38); 697s assert (labels{3,3}, "Japan"); 697s ***** test 697s load carbig 697s [table, chisq, p, labels] = crosstab (cyl4, when, org); 697s assert (table(2,3,2), 17); 697s assert (labels{1,3}, "USA"); 697s 8 tests, 8 passed, 0 known failure, 0 skipped 697s [inst/Regression/RegressionGAM.m] 697s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Regression/RegressionGAM.m 697s ***** demo 697s ## Train a RegressionGAM Model for synthetic values 697s f1 = @(x) cos (3 * x); 697s f2 = @(x) x .^ 3; 697s x1 = 2 * rand (50, 1) - 1; 697s x2 = 2 * rand (50, 1) - 1; 697s y = f1(x1) + f2(x2); 697s y = y + y .* 0.2 .* rand (50,1); 697s X = [x1, x2]; 697s a = fitrgam (X, y, "tol", 1e-3) 697s ***** demo 697s ## Declare two different functions 697s f1 = @(x) cos (3 * x); 697s f2 = @(x) x .^ 3; 697s 697s ## Generate 80 samples for f1 and f2 697s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 697s X1 = f1 (x); 697s X2 = f2 (x); 697s 697s ## Create a synthetic response by adding noise 697s rand ("seed", 3); 697s Ytrue = X1 + X2; 697s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 697s 697s ## Assemble predictor data 697s X = [X1, X2]; 697s 697s ## Train the GAM and test on the same data 697s a = fitrgam (X, Y, "order", [5, 5]); 697s [ypred, ySDsd, yInt] = predict (a, X); 697s 697s ## Plot the results 697s figure 697s [sortedY, indY] = sort (Ytrue); 697s plot (sortedY, "r-"); 697s xlim ([0, 80]); 697s hold on 697s plot (ypred(indY), "g+") 697s plot (yInt(indY,1), "k:") 697s plot (yInt(indY,2), "k:") 697s xlabel ("Predictor samples"); 697s ylabel ("Response"); 697s title ("actual vs predicted values for function f1(x) = cos (3x) "); 697s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 697s 697s ## Use 30% Holdout partitioning for training and testing data 697s C = cvpartition (80, "HoldOut", 0.3); 697s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 697s 697s ## Plot the results 697s figure 697s [sortedY, indY] = sort (Ytrue(test(C))); 697s plot (sortedY, 'r-'); 697s xlim ([0, sum(test(C))]); 697s hold on 697s plot (ypred(indY), "g+") 697s plot (yInt(indY,1),'k:') 697s plot (yInt(indY,2),'k:') 697s xlabel ("Predictor samples"); 697s ylabel ("Response"); 697s title ("actual vs predicted values for function f1(x) = cos (3x) "); 697s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 697s ***** test 697s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 697s y = [1; 2; 3; 4]; 697s a = RegressionGAM (x, y); 697s assert ({a.X, a.Y}, {x, y}) 697s assert ({a.BaseModel.Intercept}, {2.5000}) 697s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 697s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 697s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 697s assert ({a.Formula}, {[]}) 697s ***** test 697s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 697s y = [1; 2; 3; 4]; 697s pnames = {"A", "B", "C", "D"}; 697s formula = "Y ~ A + B + C + D + A:C"; 697s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 697s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 697s assert ({a.IntMatrix}, {intMat}) 697s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 697s assert ({a.Formula}, {formula}) 698s ***** error<RegressionGAM: too few input arguments.> RegressionGAM () 698s ***** error<RegressionGAM: too few input arguments.> RegressionGAM (ones(10,2)) 698s ***** error<RegressionGAM: number of rows in X and Y must be equal.> ... 698s RegressionGAM (ones(10,2), ones (5,1)) 698s ***** error<RegressionGAM: invalid values in X.> ... 698s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 698s ***** error<RegressionGAM: invalid parameter name in optional pair arguments.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 698s ***** error<RegressionGAM: Formula must be a string.> 698s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 698s ***** error<RegressionGAM: Formula must be a string.> 698s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 698s ***** error<RegressionGAM: invalid syntax in Formula.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 698s ***** error<RegressionGAM: no predictor terms in Formula.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 698s ***** error<RegressionGAM: no predictor terms in Formula.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 698s ***** error<RegressionGAM: some predictors have not been identified> ... 698s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 698s ***** error<RegressionGAM: invalid Interactions parameter.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 698s ***** error<RegressionGAM: invalid Interactions parameter.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 698s ***** error<RegressionGAM: invalid Interactions parameter.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 698s ***** error<RegressionGAM: number of interaction terms requested is larger than> ... 698s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 698s ***** error<RegressionGAM: Formula has been already defined.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 698s ***** error<RegressionGAM: Interactions have been already defined.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 698s ***** error<RegressionGAM: invalid value for Knots.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 698s ***** error<RegressionGAM: DoF and Order have been set already.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 698s ***** error<RegressionGAM: invalid value for DoF.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 698s ***** error<RegressionGAM: Knots and Order have been set already.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 698s ***** error<RegressionGAM: invalid value for Order.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 698s ***** error<RegressionGAM: DoF and Knots have been set already.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 698s ***** error<RegressionGAM: Tolerance must be a Positive scalar.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 698s ***** error<RegressionGAM: ResponseName must be a char string.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 698s ***** error<RegressionGAM: PredictorNames must be a cellstring array.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 698s ***** error<RegressionGAM: PredictorNames must be a cellstring array.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 698s ***** error<RegressionGAM: PredictorNames must have same number of columns as X.> ... 698s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 698s ***** error<RegressionGAM.predict: too few arguments.> ... 698s predict (RegressionGAM (ones(10,1), ones(10,1))) 698s ***** error<RegressionGAM.predict: Xfit is empty.> ... 698s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 698s ***** error<RegressionGAM.predict: Xfit must have the same number of features> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 698s ***** error<RegressionGAM.predict: invalid NAME in optional pairs of arguments.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 698s ***** error<RegressionGAM.predict: includeinteractions must be a logical value.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 698s ***** error<RegressionGAM.predict: includeinteractions must be a logical value.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 698s ***** error<RegressionGAM.predict: alpha must be a scalar value between 0 and 1.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 698s ***** error<RegressionGAM.predict: alpha must be a scalar value between 0 and 1.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 698s ***** error<RegressionGAM.predict: alpha must be a scalar value between 0 and 1.> ... 698s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 698s 39 tests, 39 passed, 0 known failure, 0 skipped 698s [inst/kstest2.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/kstest2.m 698s ***** error kstest2 ([1,2,3,4,5,5]) 698s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 698s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 698s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 698s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 698s ***** test 698s load examgrades 698s [h, p] = kstest2 (grades(:,1), grades(:,2)); 698s assert (h, false); 698s assert (p, 0.1222791870137312, 1e-14); 698s ***** test 698s load examgrades 698s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 698s assert (h, false); 698s assert (p, 0.1844421391011258, 1e-14); 698s ***** test 698s load examgrades 698s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 698s assert (h, false); 698s assert (p, 0.06115357930171663, 1e-14); 698s ***** test 698s load examgrades 698s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 698s assert (h, true); 698s assert (p, 0.06115357930171663, 1e-14); 698s 14 tests, 14 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/test.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/test.m 698s ***** shared C 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 698s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 698s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 698s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 698s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 698s ***** test 698s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 698s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 698s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 698s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 698s 9 tests, 9 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/cvpartition.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/cvpartition.m 698s ***** demo 698s ## Partition with Fisher iris dataset (n = 150) 698s ## Stratified by species 698s load fisheriris 698s y = species; 698s ## 10-fold cross-validation partition 698s c = cvpartition (species, 'KFold', 10) 698s ## leave-10-out partition 698s c1 = cvpartition (species, 'HoldOut', 10) 698s idx1 = test (c, 2); 698s idx2 = training (c, 2); 698s ## another leave-10-out partition 698s c2 = repartition (c1) 698s ***** test 698s C = cvpartition (ones (10, 1)); 698s assert (isa (C, "cvpartition"), true); 698s ***** test 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 5); 698s assert (get (C, "TrainSize"), ones(5,1) * 8); 698s assert (get (C, "TestSize"), ones (5,1) * 2); 698s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 698s assert (get (C, "Type"), "kfold"); 698s ***** test 698s C = cvpartition (ones (10, 1), "KFold", 2); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 2); 698s assert (get (C, "TrainSize"), [5; 5]); 698s assert (get (C, "TestSize"), [5; 5]); 698s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 698s assert (get (C, "Type"), "kfold"); 698s ***** test 698s C = cvpartition (ones (10, 1), "HoldOut", 5); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 1); 698s assert (get (C, "TrainSize"), 5); 698s assert (get (C, "TestSize"), 5); 698s assert (class (get (C, "inds")), "logical"); 698s assert (length (get (C, "inds")), 10); 698s assert (get (C, "Type"), "holdout"); 698s ***** test 698s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 10); 698s assert (get (C, "TrainSize"), ones (10, 1)); 698s assert (get (C, "TestSize"), ones (10, 1) * 9); 698s assert (get (C, "inds"), []); 698s assert (get (C, "Type"), "leaveout"); 698s ***** test 698s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 1); 698s assert (get (C, "TrainSize"), 10); 698s assert (get (C, "TestSize"), 10); 698s assert (get (C, "inds"), []); 698s assert (get (C, "Type"), "resubstitution"); 698s ***** test 698s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 698s assert (get (C, "NumObservations"), 10); 698s assert (get (C, "NumTestSets"), 10); 698s assert (get (C, "TrainSize"), ones (10, 1) * 9); 698s assert (get (C, "TestSize"), ones (10, 1)); 698s assert (get (C, "inds"), [1:10]'); 698s assert (get (C, "Type"), "given"); 698s ***** warning<cvpartition: unrecognized type, using KFold.> ... 698s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 698s 8 tests, 8 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/set.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/set.m 698s ***** shared C 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s ***** test 698s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 698s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 698s ***** error<set: expecting field/value pairs.> set (C) 698s ***** error<set: expecting field/value pairs.> set (C, "NumObservations") 698s ***** error<set: invalid field some.> set (C, "some", 15) 698s ***** error<set: expecting the field to be a string.> set (C, 15, 15) 698s 5 tests, 5 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/display.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/display.m 698s ***** test 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s s = evalc ("display (C)"); 698s sout = "K-fold cross validation partition"; 698s assert (strcmpi (s(1:length (sout)), sout), true); 698s ***** test 698s C = cvpartition (ones (10, 1), "HoldOut", 5); 698s s = evalc ("display (C)"); 698s sout = "HoldOut cross validation partition"; 698s assert (strcmpi (s(1:length (sout)), sout), true); 698s ***** test 698s C = cvpartition (ones (10, 1), "LeaveOut", 5); 698s s = evalc ("display (C)"); 698s sout = "Leave-One-Out cross validation partition"; 698s assert (strcmpi (s(1:length (sout)), sout), true); 698s ***** test 698s C = cvpartition (ones (10, 1), "resubstitution", 5); 698s s = evalc ("display (C)"); 698s sout = "Resubstitution cross validation partition"; 698s assert (strcmpi (s(1:length (sout)), sout), true); 698s ***** test 698s C = cvpartition (ones (10, 1), "Given", 5); 698s s = evalc ("display (C)"); 698s sout = "Given cross validation partition"; 698s assert (strcmpi (s(1:length (sout)), sout), true); 698s ***** error<Invalid call to display. Correct usage is> display () 698s 6 tests, 6 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/repartition.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/repartition.m 698s ***** test 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s Cnew = repartition (C); 698s assert (isa (Cnew, "cvpartition"), true); 698s ***** test 698s C = cvpartition (ones (100, 1), "HoldOut", 5); 698s Cnew = repartition (C); 698s indC = get (C, "inds"); 698s indCnew = get (Cnew, "inds"); 698s assert (isequal (indC, indCnew), false); 698s 2 tests, 2 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/get.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/get.m 698s ***** shared C 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s ***** assert (get (C, "NumObservations"), 10); 698s ***** assert (get (C, "NumTestSets"), 5); 698s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 698s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 698s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 698s ***** assert (get (C, "Type"), "kfold"); 698s ***** error<get: invalid property some.> get (C, "some") 698s ***** error<get: expecting the property to be a string.> get (C, 25) 698s ***** error<get: expecting the property to be a string.> get (C, {25}) 698s 9 tests, 9 passed, 0 known failure, 0 skipped 698s [inst/@cvpartition/training.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/@cvpartition/training.m 698s ***** shared C 698s C = cvpartition (ones (10, 1), "KFold", 5); 698s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 698s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 698s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 698s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 698s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 698s ***** test 698s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 698s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 698s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 698s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 698s 9 tests, 9 passed, 0 known failure, 0 skipped 698s [inst/probit.m] 698s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/probit.m 698s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 698s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 698s ***** error probit () 699s ***** error probit (1, 2) 699s 4 tests, 4 passed, 0 known failure, 0 skipped 699s [inst/signtest.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/signtest.m 699s ***** test 699s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 699s assert (pval, 1.091701889420221e-218, 1e-14); 699s assert (h, 1); 699s assert (stats.zval, -31.5437631079266, 1e-14); 699s ***** test 699s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 699s assert (pval, 0.6875000000000006, 1e-14); 699s assert (h, 0); 699s assert (stats.zval, NaN); 699s assert (stats.sign, 4); 699s ***** test 699s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 699s assert (pval, 0.6830913983096086, 1e-14); 699s assert (h, 0); 699s assert (stats.zval, 0.4082482904638631, 1e-14); 699s assert (stats.sign, 4); 699s ***** error <signtest: X must be a vector.> signtest (ones (2)) 699s ***** error <signtest: Y must be either a scalar of a vector.> ... 699s signtest ([1, 2, 3, 4], ones (2)) 699s ***** error <signtest: X and Y vectors have different lengths.> ... 699s signtest ([1, 2, 3, 4], [1, 2, 3]) 699s ***** error <signtest: optional arguments must be in pairs.> ... 699s signtest ([1, 2, 3, 4], [], 'tail') 699s ***** error <signtest: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 699s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 699s ***** error <signtest: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 699s signtest ([1, 2, 3, 4], [], 'alpha', 0) 699s ***** error <signtest: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 699s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 699s ***** error <signtest: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 699s signtest ([1, 2, 3, 4], [], 'alpha', "a") 699s ***** error <signtest: 'alpha' must be a numeric scalar in the range 0 to 1.> ... 699s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 699s ***** error <signtest: 'tail' argument must be a character vector.> ... 699s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 699s ***** error <signtest: 'tail' argument must be a character vector.> ... 699s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 699s ***** error <signtest: 'tail' value must be either 'both', right' or 'left'.> ... 699s signtest ([1, 2, 3, 4], [], 'tail', "some") 699s ***** error <signtest: 'tail' value must be either 'both', right' or 'left'.> ... 699s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 699s ***** error <signtest: 'method' argument must be a character vector.> ... 699s signtest ([1, 2, 3, 4], [], 'method', 0.01) 699s ***** error <signtest: 'method' argument must be a character vector.> ... 699s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 699s ***** error <signtest: 'method' value must be either 'exact' or 'approximate'.> ... 699s signtest ([1, 2, 3, 4], [], 'method', "some") 699s ***** error <signtest: 'method' value must be either 'exact' or 'approximate'.> ... 699s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 699s 20 tests, 20 passed, 0 known failure, 0 skipped 699s [inst/cl_multinom.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cl_multinom.m 699s ***** demo 699s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 699s ***** error<Invalid call to cl_multinom. Correct usage> cl_multinom (); 699s ***** error cl_multinom (1, 2, 3, 4, 5); 699s ***** error<cl_multinom: argument method must be a string.> ... 699s cl_multinom (1, 2, 3, 4); 699s ***** error<cl_multinom: unknown calculation type.> ... 699s cl_multinom (1, 2, 3, "some string"); 699s 4 tests, 4 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/unidstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/unidstat.m 699s ***** error<unidstat: function called with too few input arguments.> unidstat () 699s ***** error<unidstat: N must be numeric.> unidstat ({}) 699s ***** error<unidstat: N must be numeric.> unidstat ("") 699s ***** error<unidstat: N must not be complex.> unidstat (i) 699s ***** test 699s N = 1:6; 699s [m, v] = unidstat (N); 699s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 699s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s 5 tests, 5 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/nctstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/nctstat.m 699s ***** error<nctstat: function called with too few input arguments.> nctstat () 699s ***** error<nctstat: function called with too few input arguments.> nctstat (1) 699s ***** error<nctstat: DF and MU must be numeric.> nctstat ({}, 2) 699s ***** error<nctstat: DF and MU must be numeric.> nctstat (1, "") 699s ***** error<nctstat: DF and MU must not be complex.> nctstat (i, 2) 699s ***** error<nctstat: DF and MU must not be complex.> nctstat (1, i) 699s ***** error<nctstat: DF and MU must be of common size or scalars.> ... 699s nctstat (ones (3), ones (2)) 699s ***** error<nctstat: DF and MU must be of common size or scalars.> ... 699s nctstat (ones (2), ones (3)) 699s ***** shared df, mu 699s df = [2, 0, -1, 1, 4]; 699s mu = [1, NaN, 3, -1, 2]; 699s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 699s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 699s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 699s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 699s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 699s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 699s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 699s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 699s 16 tests, 16 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/fstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/fstat.m 699s ***** error<fstat: function called with too few input arguments.> fstat () 699s ***** error<fstat: function called with too few input arguments.> fstat (1) 699s ***** error<fstat: DF1 and DF2 must be numeric.> fstat ({}, 2) 699s ***** error<fstat: DF1 and DF2 must be numeric.> fstat (1, "") 699s ***** error<fstat: DF1 and DF2 must not be complex.> fstat (i, 2) 699s ***** error<fstat: DF1 and DF2 must not be complex.> fstat (1, i) 699s ***** error<fstat: DF1 and DF2 must be of common size or scalars.> ... 699s fstat (ones (3), ones (2)) 699s ***** error<fstat: DF1 and DF2 must be of common size or scalars.> ... 699s fstat (ones (2), ones (3)) 699s ***** test 699s df1 = 1:6; 699s df2 = 5:10; 699s [m, v] = fstat (df1, df2); 699s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 699s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 699s assert (m, expected_mn, 0.001); 699s assert (v, expected_v, 0.001); 699s ***** test 699s df1 = 1:6; 699s [m, v] = fstat (df1, 5); 699s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 699s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 699s assert (m, expected_mn, 0.001); 699s assert (v, expected_v, 0.001); 699s 10 tests, 10 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/expstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/expstat.m 699s ***** error<expstat: function called with too few input arguments.> expstat () 699s ***** error<expstat: MU must be numeric.> expstat ({}) 699s ***** error<expstat: MU must be numeric.> expstat ("") 699s ***** error<expstat: MU must not be complex.> expstat (i) 699s ***** test 699s mu = 1:6; 699s [m, v] = expstat (mu); 699s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 699s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 699s 5 tests, 5 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/gevstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/gevstat.m 699s ***** error<gevstat: function called with too few input arguments.> gevstat () 699s ***** error<gevstat: function called with too few input arguments.> gevstat (1) 699s ***** error<gevstat: function called with too few input arguments.> gevstat (1, 2) 699s ***** error<gevstat: K, SIGMA, and MU must be numeric.> gevstat ({}, 2, 3) 699s ***** error<gevstat: K, SIGMA, and MU must be numeric.> gevstat (1, "", 3) 699s ***** error<gevstat: K, SIGMA, and MU must be numeric.> gevstat (1, 2, "") 699s ***** error<gevstat: K, SIGMA, and MU must not be complex.> gevstat (i, 2, 3) 699s ***** error<gevstat: K, SIGMA, and MU must not be complex.> gevstat (1, i, 3) 699s ***** error<gevstat: K, SIGMA, and MU must not be complex.> gevstat (1, 2, i) 699s ***** error<gevstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gevstat (ones (3), ones (2), 3) 699s ***** error<gevstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gevstat (ones (2), 2, ones (3)) 699s ***** error<gevstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gevstat (1, ones (2), ones (3)) 699s ***** test 699s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 699s sigma = 2; 699s mu = 1; 699s [m, v] = gevstat (k, sigma, mu); 699s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 699s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 699s assert (m, expected_m, -0.001); 699s assert (v, expected_v, -0.001); 699s 13 tests, 13 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/loglstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/loglstat.m 699s ***** error<loglstat: function called with too few input arguments.> loglstat () 699s ***** error<loglstat: function called with too few input arguments.> loglstat (1) 699s ***** error<loglstat: MU and SIGMA must be numeric.> loglstat ({}, 2) 699s ***** error<loglstat: MU and SIGMA must be numeric.> loglstat (1, "") 699s ***** error<loglstat: MU and SIGMA must not be complex.> loglstat (i, 2) 699s ***** error<loglstat: MU and SIGMA must not be complex.> loglstat (1, i) 699s ***** error<loglstat: MU and SIGMA must be of common size or scalars.> ... 699s loglstat (ones (3), ones (2)) 699s ***** error<loglstat: MU and SIGMA must be of common size or scalars.> ... 699s loglstat (ones (2), ones (3)) 699s ***** test 699s [m, v] = loglstat (0, 1); 699s assert (m, Inf, 0.001); 699s assert (v, Inf, 0.001); 699s ***** test 699s [m, v] = loglstat (0, 0.8); 699s assert (m, 4.2758, 0.001); 699s assert (v, Inf, 0.001); 699s ***** test 699s [m, v] = loglstat (0, 0.6); 699s assert (m, 1.9820, 0.001); 699s assert (v, Inf, 0.001); 699s ***** test 699s [m, v] = loglstat (0, 0.4); 699s assert (m, 1.3213, 0.001); 699s assert (v, 2.5300, 0.001); 699s ***** test 699s [m, v] = loglstat (0, 0.2); 699s assert (m, 1.0690, 0.001); 699s assert (v, 0.1786, 0.001); 699s 13 tests, 13 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/nakastat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/nakastat.m 699s ***** error<nakastat: function called with too few input arguments.> nakastat () 699s ***** error<nakastat: function called with too few input arguments.> nakastat (1) 699s ***** error<nakastat: MU and OMEGA must be numeric.> nakastat ({}, 2) 699s ***** error<nakastat: MU and OMEGA must be numeric.> nakastat (1, "") 699s ***** error<nakastat: MU and OMEGA must not be complex.> nakastat (i, 2) 699s ***** error<nakastat: MU and OMEGA must not be complex.> nakastat (1, i) 699s ***** error<nakastat: MU and OMEGA must be of common size or scalars.> ... 699s nakastat (ones (3), ones (2)) 699s ***** error<nakastat: MU and OMEGA must be of common size or scalars.> ... 699s nakastat (ones (2), ones (3)) 699s ***** test 699s [m, v] = nakastat (1, 1); 699s assert (m, 0.8862269254, 1e-10); 699s assert (v, 0.2146018366, 1e-10); 699s ***** test 699s [m, v] = nakastat (1, 2); 699s assert (m, 1.25331413731, 1e-10); 699s assert (v, 0.42920367321, 1e-10); 699s ***** test 699s [m, v] = nakastat (2, 1); 699s assert (m, 0.93998560299, 1e-10); 699s assert (v, 0.11642706618, 1e-10); 699s 11 tests, 11 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/hnstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/hnstat.m 699s ***** error<hnstat: function called with too few input arguments.> hnstat () 699s ***** error<hnstat: function called with too few input arguments.> hnstat (1) 699s ***** error<hnstat: MU and SIGMA must be numeric.> hnstat ({}, 2) 699s ***** error<hnstat: MU and SIGMA must be numeric.> hnstat (1, "") 699s ***** error<hnstat: MU and SIGMA must not be complex.> hnstat (i, 2) 699s ***** error<hnstat: MU and SIGMA must not be complex.> hnstat (1, i) 699s ***** error<hnstat: MU and SIGMA must be of common size or scalars.> ... 699s hnstat (ones (3), ones (2)) 699s ***** error<hnstat: MU and SIGMA must be of common size or scalars.> ... 699s hnstat (ones (2), ones (3)) 699s ***** test 699s [m, v] = hnstat (0, 1); 699s assert (m, 0.7979, 1e-4); 699s assert (v, 0.3634, 1e-4); 699s ***** test 699s [m, v] = hnstat (2, 1); 699s assert (m, 2.7979, 1e-4); 699s assert (v, 0.3634, 1e-4); 699s ***** test 699s [m, v] = hnstat (2, 2); 699s assert (m, 3.5958, 1e-4); 699s assert (v, 1.4535, 1e-4); 699s ***** test 699s [m, v] = hnstat (2, 2.5); 699s assert (m, 3.9947, 1e-4); 699s assert (v, 2.2711, 1e-4); 699s ***** test 699s [m, v] = hnstat (1.5, 0.5); 699s assert (m, 1.8989, 1e-4); 699s assert (v, 0.0908, 1e-4); 699s ***** test 699s [m, v] = hnstat (-1.5, 0.5); 699s assert (m, -1.1011, 1e-4); 699s assert (v, 0.0908, 1e-4); 699s 14 tests, 14 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/ricestat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/ricestat.m 699s ***** error<ricestat: function called with too few input arguments.> ricestat () 699s ***** error<ricestat: function called with too few input arguments.> ricestat (1) 699s ***** error<ricestat: S and SIGMA must be numeric.> ricestat ({}, 2) 699s ***** error<ricestat: S and SIGMA must be numeric.> ricestat (1, "") 699s ***** error<ricestat: S and SIGMA must not be complex.> ricestat (i, 2) 699s ***** error<ricestat: S and SIGMA must not be complex.> ricestat (1, i) 699s ***** error<ricestat: S and SIGMA must be of common size or scalars.> ... 699s ricestat (ones (3), ones (2)) 699s ***** error<ricestat: S and SIGMA must be of common size or scalars.> ... 699s ricestat (ones (2), ones (3)) 699s ***** shared s, sigma 699s s = [2, 0, -1, 1, 4]; 699s sigma = [1, NaN, 3, -1, 2]; 699s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 699s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 699s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 699s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 699s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 699s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 699s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 699s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 699s 16 tests, 16 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/gpstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/gpstat.m 699s ***** error<gpstat: function called with too few input arguments.> gpstat () 699s ***** error<gpstat: function called with too few input arguments.> gpstat (1) 699s ***** error<gpstat: function called with too few input arguments.> gpstat (1, 2) 699s ***** error<gpstat: K, SIGMA, and MU must be numeric.> gpstat ({}, 2, 3) 699s ***** error<gpstat: K, SIGMA, and MU must be numeric.> gpstat (1, "", 3) 699s ***** error<gpstat: K, SIGMA, and MU must be numeric.> gpstat (1, 2, "") 699s ***** error<gpstat: K, SIGMA, and MU must not be complex.> gpstat (i, 2, 3) 699s ***** error<gpstat: K, SIGMA, and MU must not be complex.> gpstat (1, i, 3) 699s ***** error<gpstat: K, SIGMA, and MU must not be complex.> gpstat (1, 2, i) 699s ***** error<gpstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gpstat (ones (3), ones (2), 3) 699s ***** error<gpstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gpstat (ones (2), 2, ones (3)) 699s ***** error<gpstat: K, SIGMA, and MU must be of common size or scalars.> ... 699s gpstat (1, ones (2), ones (3)) 699s ***** shared x, y 699s x = [-Inf, -1, 0, 1/2, 1, Inf]; 699s y = [0, 0.5, 1, 2, Inf, Inf]; 699s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 699s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 699s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 699s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 699s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 699s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 699s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 699s 19 tests, 19 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/betastat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/betastat.m 699s ***** error<betastat: function called with too few input arguments.> betastat () 699s ***** error<betastat: function called with too few input arguments.> betastat (1) 699s ***** error<betastat: A and B must be numeric.> betastat ({}, 2) 699s ***** error<betastat: A and B must be numeric.> betastat (1, "") 699s ***** error<betastat: A and B must not be complex.> betastat (i, 2) 699s ***** error<betastat: A and B must not be complex.> betastat (1, i) 699s ***** error<betastat: A and B must be of common size or scalars.> ... 699s betastat (ones (3), ones (2)) 699s ***** error<betastat: A and B must be of common size or scalars.> ... 699s betastat (ones (2), ones (3)) 699s ***** test 699s a = -2:6; 699s b = 0.4:0.2:2; 699s [m, v] = betastat (a, b); 699s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 699s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 699s assert (m, expected_m, eps*100); 699s assert (v, expected_v, 0.001); 699s ***** test 699s a = -2:1:6; 699s [m, v] = betastat (a, 1.5); 699s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 699s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 699s assert (m, expected_m); 699s assert (v, expected_v, 0.001); 699s ***** test 699s a = [14 Inf 10 NaN 10]; 699s b = [12 9 NaN Inf 12]; 699s [m, v] = betastat (a, b); 699s expected_m = [14/26 NaN NaN NaN 10/22]; 699s expected_v = [168/18252 NaN NaN NaN 120/11132]; 699s assert (m, expected_m); 699s assert (v, expected_v); 699s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 699s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 699s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 699s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 699s 15 tests, 15 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/logistat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/logistat.m 699s ***** error<logistat: function called with too few input arguments.> logistat () 699s ***** error<logistat: function called with too few input arguments.> logistat (1) 699s ***** error<logistat: MU and SIGMA must be numeric.> logistat ({}, 2) 699s ***** error<logistat: MU and SIGMA must be numeric.> logistat (1, "") 699s ***** error<logistat: MU and SIGMA must not be complex.> logistat (i, 2) 699s ***** error<logistat: MU and SIGMA must not be complex.> logistat (1, i) 699s ***** error<logistat: MU and SIGMA must be of common size or scalars.> ... 699s logistat (ones (3), ones (2)) 699s ***** error<logistat: MU and SIGMA must be of common size or scalars.> ... 699s logistat (ones (2), ones (3)) 699s ***** test 699s [m, v] = logistat (0, 1); 699s assert (m, 0); 699s assert (v, 3.2899, 0.001); 699s ***** test 699s [m, v] = logistat (0, 0.8); 699s assert (m, 0); 699s assert (v, 2.1055, 0.001); 699s ***** test 699s [m, v] = logistat (1, 0.6); 699s assert (m, 1); 699s assert (v, 1.1844, 0.001); 699s ***** test 699s [m, v] = logistat (0, 0.4); 699s assert (m, 0); 699s assert (v, 0.5264, 0.001); 699s ***** test 699s [m, v] = logistat (-1, 0.2); 699s assert (m, -1); 699s assert (v, 0.1316, 0.001); 699s 13 tests, 13 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/nbinstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/nbinstat.m 699s ***** error<nbinstat: function called with too few input arguments.> nbinstat () 699s ***** error<nbinstat: function called with too few input arguments.> nbinstat (1) 699s ***** error<nbinstat: R and PS must be numeric.> nbinstat ({}, 2) 699s ***** error<nbinstat: R and PS must be numeric.> nbinstat (1, "") 699s ***** error<nbinstat: R and PS must not be complex.> nbinstat (i, 2) 699s ***** error<nbinstat: R and PS must not be complex.> nbinstat (1, i) 699s ***** error<nbinstat: R and PS must be of common size or scalars.> ... 699s nbinstat (ones (3), ones (2)) 699s ***** error<nbinstat: R and PS must be of common size or scalars.> ... 699s nbinstat (ones (2), ones (3)) 699s ***** test 699s r = 1:4; 699s ps = 0.2:0.2:0.8; 699s [m, v] = nbinstat (r, ps); 699s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 699s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s ***** test 699s r = 1:4; 699s [m, v] = nbinstat (r, 0.5); 699s expected_m = [1, 2, 3, 4]; 699s expected_v = [2, 4, 6, 8]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s 10 tests, 10 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/unifstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/unifstat.m 699s ***** error<unifstat: function called with too few input arguments.> unifstat () 699s ***** error<unifstat: function called with too few input arguments.> unifstat (1) 699s ***** error<unifstat: A and B must be numeric.> unifstat ({}, 2) 699s ***** error<unifstat: A and B must be numeric.> unifstat (1, "") 699s ***** error<unifstat: A and B must not be complex.> unifstat (i, 2) 699s ***** error<unifstat: A and B must not be complex.> unifstat (1, i) 699s ***** error<unifstat: A and B must be of common size or scalars.> ... 699s unifstat (ones (3), ones (2)) 699s ***** error<unifstat: A and B must be of common size or scalars.> ... 699s unifstat (ones (2), ones (3)) 699s ***** test 699s a = 1:6; 699s b = 2:2:12; 699s [m, v] = unifstat (a, b); 699s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 699s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s ***** test 699s a = 1:6; 699s [m, v] = unifstat (a, 10); 699s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 699s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s 10 tests, 10 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/binostat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/binostat.m 699s ***** error<binostat: function called with too few input arguments.> binostat () 699s ***** error<binostat: function called with too few input arguments.> binostat (1) 699s ***** error<binostat: N and PS must be numeric.> binostat ({}, 2) 699s ***** error<binostat: N and PS must be numeric.> binostat (1, "") 699s ***** error<binostat: N and PS must not be complex.> binostat (i, 2) 699s ***** error<binostat: N and PS must not be complex.> binostat (1, i) 699s ***** error<binostat: N and PS must be of common size or scalars.> ... 699s binostat (ones (3), ones (2)) 699s ***** error<binostat: N and PS must be of common size or scalars.> ... 699s binostat (ones (2), ones (3)) 699s ***** test 699s n = 1:6; 699s ps = 0:0.2:1; 699s [m, v] = binostat (n, ps); 699s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 699s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s ***** test 699s n = 1:6; 699s [m, v] = binostat (n, 0.5); 699s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 699s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s ***** test 699s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 699s [m, v] = binostat (n, 0.5); 699s assert (isnan (m), [true true false true false true false false]) 699s assert (isnan (v), [true true false true false true false false]) 699s assert (m(end), Inf); 699s assert (v(end), Inf); 699s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 699s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 699s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 699s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 699s 15 tests, 15 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/invgstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/invgstat.m 699s ***** error<invgstat: function called with too few input arguments.> invgstat () 699s ***** error<invgstat: function called with too few input arguments.> invgstat (1) 699s ***** error<invgstat: MU and LAMBDA must be numeric.> invgstat ({}, 2) 699s ***** error<invgstat: MU and LAMBDA must be numeric.> invgstat (1, "") 699s ***** error<invgstat: MU and LAMBDA must not be complex.> invgstat (i, 2) 699s ***** error<invgstat: MU and LAMBDA must not be complex.> invgstat (1, i) 699s ***** error<invgstat: MU and LAMBDA must be of common size or scalars.> ... 699s invgstat (ones (3), ones (2)) 699s ***** error<invgstat: MU and LAMBDA must be of common size or scalars.> ... 699s invgstat (ones (2), ones (3)) 699s ***** test 699s [m, v] = invgstat (1, 1); 699s assert (m, 1); 699s assert (v, 1); 699s ***** test 699s [m, v] = invgstat (2, 1); 699s assert (m, 2); 699s assert (v, 8); 699s ***** test 699s [m, v] = invgstat (2, 2); 699s assert (m, 2); 699s assert (v, 4); 699s ***** test 699s [m, v] = invgstat (2, 2.5); 699s assert (m, 2); 699s assert (v, 3.2); 699s ***** test 699s [m, v] = invgstat (1.5, 0.5); 699s assert (m, 1.5); 699s assert (v, 6.75); 699s 13 tests, 13 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/raylstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/raylstat.m 699s ***** error<raylstat: function called with too few input arguments.> raylstat () 699s ***** error<raylstat: SIGMA must be numeric.> raylstat ({}) 699s ***** error<raylstat: SIGMA must be numeric.> raylstat ("") 699s ***** error<raylstat: SIGMA must not be complex.> raylstat (i) 699s ***** test 699s sigma = 1:6; 699s [m, v] = raylstat (sigma); 699s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 699s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 699s assert (m, expected_m, 0.001); 699s assert (v, expected_v, 0.001); 699s 5 tests, 5 passed, 0 known failure, 0 skipped 699s [inst/dist_stat/poisstat.m] 699s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/poisstat.m 699s ***** error<poisstat: function called with too few input arguments.> poisstat () 699s ***** error<poisstat: SIGMA must be numeric.> poisstat ({}) 699s ***** error<poisstat: SIGMA must be numeric.> poisstat ("") 699s ***** error<poisstat: SIGMA must not be complex.> poisstat (i) 700s ***** test 700s lambda = 1 ./ (1:6); 700s [m, v] = poisstat (lambda); 700s assert (m, lambda); 700s assert (v, lambda); 700s 5 tests, 5 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/tlsstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/tlsstat.m 700s ***** error<tlsstat: function called with too few input arguments.> tlsstat () 700s ***** error<tlsstat: function called with too few input arguments.> tlsstat (1) 700s ***** error<tlsstat: function called with too few input arguments.> tlsstat (1, 2) 700s ***** error<tlsstat: MU, SIGMA, and NU must be numeric.> tlsstat ({}, 2, 3) 700s ***** error<tlsstat: MU, SIGMA, and NU must be numeric.> tlsstat (1, "", 3) 700s ***** error<tlsstat: MU, SIGMA, and NU must be numeric.> tlsstat (1, 2, ["d"]) 700s ***** error<tlsstat: MU, SIGMA, and NU must not be complex.> tlsstat (i, 2, 3) 700s ***** error<tlsstat: MU, SIGMA, and NU must not be complex.> tlsstat (1, i, 3) 700s ***** error<tlsstat: MU, SIGMA, and NU must not be complex.> tlsstat (1, 2, i) 700s ***** error<tlsstat: MU, SIGMA, and NU must be of common size or scalars.> ... 700s tlsstat (ones (3), ones (2), 1) 700s ***** error<tlsstat: MU, SIGMA, and NU must be of common size or scalars.> ... 700s tlsstat (ones (2), 1, ones (3)) 700s ***** error<tlsstat: MU, SIGMA, and NU must be of common size or scalars.> ... 700s tlsstat (1, ones (2), ones (3)) 700s ***** test 700s [m, v] = tlsstat (0, 1, 0); 700s assert (m, NaN); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (0, 1, 1); 700s assert (m, NaN); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (2, 1, 1); 700s assert (m, NaN); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (-2, 1, 1); 700s assert (m, NaN); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (0, 1, 2); 700s assert (m, 0); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (2, 1, 2); 700s assert (m, 2); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (-2, 1, 2); 700s assert (m, -2); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (0, 2, 2); 700s assert (m, 0); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (2, 2, 2); 700s assert (m, 2); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (-2, 2, 2); 700s assert (m, -2); 700s assert (v, NaN); 700s ***** test 700s [m, v] = tlsstat (0, 1, 3); 700s assert (m, 0); 700s assert (v, 3); 700s ***** test 700s [m, v] = tlsstat (0, 2, 3); 700s assert (m, 0); 700s assert (v, 6); 700s ***** test 700s [m, v] = tlsstat (2, 1, 3); 700s assert (m, 2); 700s assert (v, 3); 700s ***** test 700s [m, v] = tlsstat (2, 2, 3); 700s assert (m, 2); 700s assert (v, 6); 700s ***** test 700s [m, v] = tlsstat (-2, 1, 3); 700s assert (m, -2); 700s assert (v, 3); 700s ***** test 700s [m, v] = tlsstat (-2, 2, 3); 700s assert (m, -2); 700s assert (v, 6); 700s 28 tests, 28 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/bisastat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/bisastat.m 700s ***** error<bisastat: function called with too few input arguments.> bisastat () 700s ***** error<bisastat: function called with too few input arguments.> bisastat (1) 700s ***** error<bisastat: BETA and GAMMA must be numeric.> bisastat ({}, 2) 700s ***** error<bisastat: BETA and GAMMA must be numeric.> bisastat (1, "") 700s ***** error<bisastat: BETA and GAMMA must not be complex.> bisastat (i, 2) 700s ***** error<bisastat: BETA and GAMMA must not be complex.> bisastat (1, i) 700s ***** error<bisastat: BETA and GAMMA must be of common size or scalars.> ... 700s bisastat (ones (3), ones (2)) 700s ***** error<bisastat: BETA and GAMMA must be of common size or scalars.> ... 700s bisastat (ones (2), ones (3)) 700s ***** test 700s beta = 1:6; 700s gamma = 1:0.2:2; 700s [m, v] = bisastat (beta, gamma); 700s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 700s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 700s assert (m, expected_m, 1e-2); 700s assert (v, expected_v, 1e-3); 700s ***** test 700s beta = 1:6; 700s [m, v] = bisastat (beta, 1.5); 700s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 700s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 700s assert (m, expected_m, 1e-3); 700s assert (v, expected_v, 1e-4); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/gamstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/gamstat.m 700s ***** error<gamstat: function called with too few input arguments.> gamstat () 700s ***** error<gamstat: function called with too few input arguments.> gamstat (1) 700s ***** error<gamstat: A and B must be numeric.> gamstat ({}, 2) 700s ***** error<gamstat: A and B must be numeric.> gamstat (1, "") 700s ***** error<gamstat: A and B must not be complex.> gamstat (i, 2) 700s ***** error<gamstat: A and B must not be complex.> gamstat (1, i) 700s ***** error<gamstat: A and B must be of common size or scalars.> ... 700s gamstat (ones (3), ones (2)) 700s ***** error<gamstat: A and B must be of common size or scalars.> ... 700s gamstat (ones (2), ones (3)) 700s ***** test 700s a = 1:6; 700s b = 1:0.2:2; 700s [m, v] = gamstat (a, b); 700s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 700s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s ***** test 700s a = 1:6; 700s [m, v] = gamstat (a, 1.5); 700s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 700s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/ncfstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/ncfstat.m 700s ***** error<ncfstat: function called with too few input arguments.> ncfstat () 700s ***** error<ncfstat: function called with too few input arguments.> ncfstat (1) 700s ***** error<ncfstat: function called with too few input arguments.> ncfstat (1, 2) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be numeric.> ncfstat ({}, 2, 3) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be numeric.> ncfstat (1, "", 3) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be numeric.> ncfstat (1, 2, "") 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must not be complex.> ncfstat (i, 2, 3) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must not be complex.> ncfstat (1, i, 3) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must not be complex.> ncfstat (1, 2, i) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 700s ncfstat (ones (3), ones (2), 3) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 700s ncfstat (ones (2), 2, ones (3)) 700s ***** error<ncfstat: DF1, DF2, and LAMBDA must be of common size or scalars.> ... 700s ncfstat (1, ones (2), ones (3)) 700s ***** shared df1, df2, lambda 700s df1 = [2, 0, -1, 1, 4, 5]; 700s df2 = [2, 4, -1, 5, 6, 7]; 700s lambda = [1, NaN, 3, 0, 2, -1]; 700s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 700s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 700s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 700s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 700s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 700s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 700s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 700s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 700s 20 tests, 20 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/hygestat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/hygestat.m 700s ***** error<hygestat: function called with too few input arguments.> hygestat () 700s ***** error<hygestat: function called with too few input arguments.> hygestat (1) 700s ***** error<hygestat: function called with too few input arguments.> hygestat (1, 2) 700s ***** error<hygestat: M, K, and N must be numeric.> hygestat ({}, 2, 3) 700s ***** error<hygestat: M, K, and N must be numeric.> hygestat (1, "", 3) 700s ***** error<hygestat: M, K, and N must be numeric.> hygestat (1, 2, "") 700s ***** error<hygestat: M, K, and N must not be complex.> hygestat (i, 2, 3) 700s ***** error<hygestat: M, K, and N must not be complex.> hygestat (1, i, 3) 700s ***** error<hygestat: M, K, and N must not be complex.> hygestat (1, 2, i) 700s ***** error<hygestat: M, K, and N must be of common size or scalars.> ... 700s hygestat (ones (3), ones (2), 3) 700s ***** error<hygestat: M, K, and N must be of common size or scalars.> ... 700s hygestat (ones (2), 2, ones (3)) 700s ***** error<hygestat: M, K, and N must be of common size or scalars.> ... 700s hygestat (1, ones (2), ones (3)) 700s ***** test 700s m = 4:9; 700s k = 0:5; 700s n = 1:6; 700s [mn, v] = hygestat (m, k, n); 700s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 700s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 700s assert (mn, expected_mn, 0.001); 700s assert (v, expected_v, 0.001); 700s ***** test 700s m = 4:9; 700s k = 0:5; 700s [mn, v] = hygestat (m, k, 2); 700s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 700s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 700s assert (mn, expected_mn, 0.001); 700s assert (v, expected_v, 0.001); 700s 14 tests, 14 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/normstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/normstat.m 700s ***** error<normstat: function called with too few input arguments.> normstat () 700s ***** error<normstat: function called with too few input arguments.> normstat (1) 700s ***** error<normstat: MU and SIGMA must be numeric.> normstat ({}, 2) 700s ***** error<normstat: MU and SIGMA must be numeric.> normstat (1, "") 700s ***** error<normstat: MU and SIGMA must not be complex.> normstat (i, 2) 700s ***** error<normstat: MU and SIGMA must not be complex.> normstat (1, i) 700s ***** error<normstat: MU and SIGMA must be of common size or scalars.> ... 700s normstat (ones (3), ones (2)) 700s ***** error<normstat: MU and SIGMA must be of common size or scalars.> ... 700s normstat (ones (2), ones (3)) 700s ***** test 700s mu = 1:6; 700s sigma = 0.2:0.2:1.2; 700s [m, v] = normstat (mu, sigma); 700s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 700s assert (m, mu); 700s assert (v, expected_v, 0.001); 700s ***** test 700s sigma = 0.2:0.2:1.2; 700s [m, v] = normstat (0, sigma); 700s expected_mn = [0, 0, 0, 0, 0, 0]; 700s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 700s assert (m, expected_mn, 0.001); 700s assert (v, expected_v, 0.001); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/wblstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/wblstat.m 700s ***** error<wblstat: function called with too few input arguments.> wblstat () 700s ***** error<wblstat: function called with too few input arguments.> wblstat (1) 700s ***** error<wblstat: LAMBDA and K must be numeric.> wblstat ({}, 2) 700s ***** error<wblstat: LAMBDA and K must be numeric.> wblstat (1, "") 700s ***** error<wblstat: LAMBDA and K must not be complex.> wblstat (i, 2) 700s ***** error<wblstat: LAMBDA and K must not be complex.> wblstat (1, i) 700s ***** error<wblstat: LAMBDA and K must be of common size or scalars.> ... 700s wblstat (ones (3), ones (2)) 700s ***** error<wblstat: LAMBDA and K must be of common size or scalars.> ... 700s wblstat (ones (2), ones (3)) 700s ***** test 700s lambda = 3:8; 700s k = 1:6; 700s [m, v] = wblstat (lambda, k); 700s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 700s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s ***** test 700s k = 1:6; 700s [m, v] = wblstat (6, k); 700s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 700s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/ncx2stat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/ncx2stat.m 700s ***** error<ncx2stat: function called with too few input arguments.> ncx2stat () 700s ***** error<ncx2stat: function called with too few input arguments.> ncx2stat (1) 700s ***** error<ncx2stat: DF and LAMBDA must be numeric.> ncx2stat ({}, 2) 700s ***** error<ncx2stat: DF and LAMBDA must be numeric.> ncx2stat (1, "") 700s ***** error<ncx2stat: DF and LAMBDA must not be complex.> ncx2stat (i, 2) 700s ***** error<ncx2stat: DF and LAMBDA must not be complex.> ncx2stat (1, i) 700s ***** error<ncx2stat: DF and LAMBDA must be of common size or scalars.> ... 700s ncx2stat (ones (3), ones (2)) 700s ***** error<ncx2stat: DF and LAMBDA must be of common size or scalars.> ... 700s ncx2stat (ones (2), ones (3)) 700s ***** shared df, d1 700s df = [2, 0, -1, 1, 4]; 700s d1 = [1, NaN, 3, -1, 2]; 700s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 700s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 700s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 700s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 700s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 700s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 700s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 700s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 700s 16 tests, 16 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/tristat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/tristat.m 700s ***** error<tristat: function called with too few input arguments.> tristat () 700s ***** error<tristat: function called with too few input arguments.> tristat (1) 700s ***** error<tristat: function called with too few input arguments.> tristat (1, 2) 700s ***** error<tristat: A, B, and C must be numeric.> tristat ("i", 2, 1) 700s ***** error<tristat: A, B, and C must be numeric.> tristat (0, "d", 1) 700s ***** error<tristat: A, B, and C must be numeric.> tristat (0, 3, {}) 700s ***** error<tristat: A, B, and C must be real.> tristat (i, 2, 1) 700s ***** error<tristat: A, B, and C must be real.> tristat (0, i, 1) 700s ***** error<tristat: A, B, and C must be real.> tristat (0, 3, i) 700s ***** test 700s a = 1:5; 700s b = 3:7; 700s c = 5:9; 700s [m, v] = tristat (a, b, c); 700s expected_m = [3, 4, 5, 6, 7]; 700s assert (m, expected_m); 700s assert (v, ones (1, 5) * (2/3)); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/plstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/plstat.m 700s ***** shared x, Fx 700s x = [0, 1, 3, 4, 7, 10]; 700s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 700s ***** assert (plstat (x, Fx), 4.15) 700s ***** test 700s [m, v] = plstat (x, Fx); 700s assert (v, 10.3775, 1e-14) 700s ***** error<plstat: function called with too few input arguments.> plstat () 700s ***** error<plstat: function called with too few input arguments.> plstat (1) 700s ***** error<plstat: X and FX must be vectors of equal size.> ... 700s plstat ([0, 1, 2], [0, 1]) 700s ***** error<plstat: X and FX must be at least two-elements long.> ... 700s plstat ([0], [1]) 700s ***** error<plstat: FX must be bounded in the range> ... 700s plstat ([0, 1, 2], [0, 1, 1.5]) 700s ***** error<plstat: FX must be bounded in the range> ... 700s plstat ([0, 1, 2], [0, i, 1]) 700s ***** error<plstat: X and FX must not be complex.> ... 700s plstat ([0, i, 2], [0, 0.5, 1]) 700s ***** error<plstat: X and FX must not be complex.> ... 700s plstat ([0, i, 2], [0, 0.5i, 1]) 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/lognstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/lognstat.m 700s ***** error<lognstat: function called with too few input arguments.> lognstat () 700s ***** error<lognstat: function called with too few input arguments.> lognstat (1) 700s ***** error<lognstat: MU and SIGMA must be numeric.> lognstat ({}, 2) 700s ***** error<lognstat: MU and SIGMA must be numeric.> lognstat (1, "") 700s ***** error<lognstat: MU and SIGMA must not be complex.> lognstat (i, 2) 700s ***** error<lognstat: MU and SIGMA must not be complex.> lognstat (1, i) 700s ***** error<lognstat: MU and SIGMA must be of common size or scalars.> ... 700s lognstat (ones (3), ones (2)) 700s ***** error<lognstat: MU and SIGMA must be of common size or scalars.> ... 700s lognstat (ones (2), ones (3)) 700s ***** test 700s mu = 0:0.2:1; 700s sigma = 0.2:0.2:1.2; 700s [m, v] = lognstat (mu, sigma); 700s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 700s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s ***** test 700s sigma = 0.2:0.2:1.2; 700s [m, v] = lognstat (0, sigma); 700s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 700s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 700s assert (m, expected_m, 0.001); 700s assert (v, expected_v, 0.001); 700s 10 tests, 10 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/geostat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/geostat.m 700s ***** error<geostat: function called with too few input arguments.> geostat () 700s ***** error<geostat: PS must be numeric.> geostat ({}) 700s ***** error<geostat: PS must be numeric.> geostat ("") 700s ***** error<geostat: PS must not be complex.> geostat (i) 700s ***** test 700s ps = 1 ./ (1:6); 700s [m, v] = geostat (ps); 700s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 700s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 700s 5 tests, 5 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/tstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/tstat.m 700s ***** error<tstat: function called with too few input arguments.> tstat () 700s ***** error<tstat: DF must be numeric.> tstat ({}) 700s ***** error<tstat: DF must be numeric.> tstat ("") 700s ***** error<tstat: DF must not be complex.> tstat (i) 700s ***** test 700s df = 3:8; 700s [m, v] = tstat (df); 700s expected_m = [0, 0, 0, 0, 0, 0]; 700s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 700s assert (m, expected_m); 700s assert (v, expected_v, 0.001); 700s 5 tests, 5 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/evstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/evstat.m 700s ***** error<evstat: function called with too few input arguments.> evstat () 700s ***** error<evstat: function called with too few input arguments.> evstat (1) 700s ***** error<evstat: MU and SIGMA must be numeric.> evstat ({}, 2) 700s ***** error<evstat: MU and SIGMA must be numeric.> evstat (1, "") 700s ***** error<evstat: MU and SIGMA must not be complex.> evstat (i, 2) 700s ***** error<evstat: MU and SIGMA must not be complex.> evstat (1, i) 700s ***** error<evstat: MU and SIGMA must be of common size or scalars.> ... 700s evstat (ones (3), ones (2)) 700s ***** error<evstat: MU and SIGMA must be of common size or scalars.> ... 700s evstat (ones (2), ones (3)) 700s ***** shared x, y0, y1 700s x = [-5, 0, 1, 2, 3]; 700s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 700s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 700s ***** assert (evstat (x, x), y0, 1e-4) 700s ***** assert (evstat (x, x+6), y1, 1e-4) 700s ***** assert (evstat (x, x-6), NaN (1,5)) 700s 11 tests, 11 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/chi2stat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/chi2stat.m 700s ***** error<chi2stat: function called with too few input arguments.> chi2stat () 700s ***** error<chi2stat: DF must be numeric.> chi2stat ({}) 700s ***** error<chi2stat: DF must be numeric.> chi2stat ("") 700s ***** error<chi2stat: DF must not be complex.> chi2stat (i) 700s ***** test 700s df = 1:6; 700s [m, v] = chi2stat (df); 700s assert (m, df); 700s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 700s 5 tests, 5 passed, 0 known failure, 0 skipped 700s [inst/dist_stat/burrstat.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dist_stat/burrstat.m 700s ***** error<burrstat: function called with too few input arguments.> burrstat () 700s ***** error<burrstat: function called with too few input arguments.> burrstat (1) 700s ***** error<burrstat: function called with too few input arguments.> burrstat (1, 2) 700s ***** error<burrstat: LAMBDA, C, and K must be numeric.> burrstat ({}, 2, 3) 700s ***** error<burrstat: LAMBDA, C, and K must be numeric.> burrstat (1, "", 3) 700s ***** error<burrstat: LAMBDA, C, and K must be numeric.> burrstat (1, 2, "") 700s ***** error<burrstat: LAMBDA, C, and K must not be complex.> burrstat (i, 2, 3) 700s ***** error<burrstat: LAMBDA, C, and K must not be complex.> burrstat (1, i, 3) 700s ***** error<burrstat: LAMBDA, C, and K must not be complex.> burrstat (1, 2, i) 700s ***** error<burrstat: LAMBDA, C, and K must be of common size or scalars.> ... 700s burrstat (ones (3), ones (2), 3) 700s ***** error<burrstat: LAMBDA, C, and K must be of common size or scalars.> ... 700s burrstat (ones (2), 2, ones (3)) 700s ***** error<burrstat: LAMBDA, C, and K must be of common size or scalars.> ... 700s burrstat (1, ones (2), ones (3)) 700s ***** test 700s [m, v] = burrstat (1, 2, 5); 700s assert (m, 0.4295, 1e-4); 700s assert (v, 0.0655, 1e-4); 700s ***** test 700s [m, v] = burrstat (1, 1, 1); 700s assert (m, Inf); 700s assert (v, Inf); 700s ***** test 700s [m, v] = burrstat (2, 4, 1); 700s assert (m, 2.2214, 1e-4); 700s assert (v, 1.3484, 1e-4); 700s 15 tests, 15 passed, 0 known failure, 0 skipped 700s [inst/Classification/ClassificationDiscriminant.m] 700s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationDiscriminant.m 700s ***** demo 700s ## Create discriminant classifier 700s ## Evaluate some model predictions on new data. 700s 700s load fisheriris 700s x = meas; 700s y = species; 700s xc = [min(x); mean(x); max(x)]; 700s obj = fitcdiscr (x, y); 700s [label, score, cost] = predict (obj, xc); 700s ***** demo 700s load fisheriris 700s model = fitcdiscr (meas, species); 700s X = mean (meas); 700s Y = {'versicolor'}; 700s ## Compute loss for discriminant model 700s L = loss (model, X, Y) 700s ***** demo 700s load fisheriris 700s mdl = fitcdiscr (meas, species); 700s X = mean (meas); 700s Y = {'versicolor'}; 700s ## Margin for discriminant model 700s m = margin (mdl, X, Y) 700s ***** demo 700s load fisheriris 700s x = meas; 700s y = species; 700s obj = fitcdiscr (x, y, "gamma", 0.4); 700s ## Cross-validation for discriminant model 700s CVMdl = crossval (obj) 700s ***** test 700s load fisheriris 700s x = meas; 700s y = species; 700s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 700s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 700s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 700s 0.092721, 0.115388, 0.055244, 0.032710; ... 700s 0.167514, 0.055244, 0.185188, 0.042665; ... 700s 0.038401, 0.032710, 0.042665, 0.041882]; 700s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 700s 5.9360, 2.7700, 4.2600, 1.3260; ... 700s 6.5880, 2.9740, 5.5520, 2.0260]; 700s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 700s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 700s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 700s assert (class (Mdl), "ClassificationDiscriminant"); 700s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 700s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 700s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 700s assert (Mdl.ClassNames, unique (species)) 700s assert (Mdl.Sigma, sigma, 1e-6) 700s assert (Mdl.Mu, mu, 1e-14) 700s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 700s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 700s assert (Mdl.PredictorNames, PredictorNames) 700s ***** test 700s load fisheriris 700s x = meas; 700s y = species; 700s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 700s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 700s 0.046361, 0.115388, 0.027622, 0.016355; ... 700s 0.083757, 0.027622, 0.185188, 0.021333; ... 700s 0.019201, 0.016355, 0.021333, 0.041882]; 700s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 700s 5.9360, 2.7700, 4.2600, 1.3260; ... 700s 6.5880, 2.9740, 5.5520, 2.0260]; 700s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 700s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 700s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 700s assert (class (Mdl), "ClassificationDiscriminant"); 700s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 700s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 700s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 700s assert (Mdl.ClassNames, unique (species)) 700s assert (Mdl.Sigma, sigma, 1e-6) 700s assert (Mdl.Mu, mu, 1e-14) 700s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 700s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 700s ***** shared X, Y, MODEL 700s X = rand (10,2); 700s Y = [ones(5,1);2*ones(5,1)]; 700s MODEL = ClassificationDiscriminant (X, Y); 700s ***** error<ClassificationDiscriminant: too few input arguments.> ClassificationDiscriminant () 700s ***** error<ClassificationDiscriminant: too few input arguments.> ... 700s ClassificationDiscriminant (ones(4, 1)) 700s ***** error<ClassificationDiscriminant: number of rows in X and Y must be equal.> ... 700s ClassificationDiscriminant (ones (4,2), ones (1,4)) 700s ***** error<ClassificationDiscriminant: 'PredictorNames' must be supplied as a cellstring array.> ... 700s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 700s ***** error<ClassificationDiscriminant: 'PredictorNames' must be supplied as a cellstring array.> ... 700s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 700s ***** error<ClassificationDiscriminant: 'PredictorNames' must equal the number of columns in X.> ... 700s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 700s ***** error<ClassificationDiscriminant: 'ResponseName' must be a character vector.> ... 700s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 700s ***** error<ClassificationDiscriminant: 'ResponseName' must be a character vector.> ... 700s ClassificationDiscriminant (X, Y, "ResponseName", 1) 700s ***** error<ClassificationDiscriminant: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 700s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 700s ***** error<ClassificationDiscriminant: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 700s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 700s ***** error<ClassificationDiscriminant: not all 'ClassNames' are present in Y.> ... 700s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 700s ***** error<ClassificationDiscriminant: not all 'ClassNames' are present in Y.> ... 700s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 700s ***** error<ClassificationDiscriminant: not all 'ClassNames' are present in Y.> ... 700s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 700s ***** error<ClassificationDiscriminant: 'Prior' must be either a numeric or a character vector.> ... 700s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 700s ***** error<ClassificationDiscriminant: the elements in 'Prior' do not correspond to the selected classes in Y.> ... 700s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 700s ***** error<ClassificationDiscriminant: 'Cost' must be a numeric square matrix.> ... 700s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 700s ***** error<ClassificationDiscriminant: 'Cost' must be a numeric square matrix.> ... 700s ClassificationDiscriminant (X, Y, "Cost", "string") 700s ***** error<ClassificationDiscriminant: 'Cost' must be a numeric square matrix.> ... 700s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 700s ***** error<ClassificationDiscriminant: the number of rows and columns in 'Cost' must correspond to selected classes in Y.> ... 700s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 700s ***** error<ClassificationDiscriminant: Predictor 'x1' has zero within-class variance.> ... 700s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 700s ***** error<ClassificationDiscriminant: Predictor 'A' has zero within-class variance.> ... 700s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 700s ***** error<ClassificationDiscriminant: Predictor 'x2' has zero within-class variance.> ... 700s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 700s ***** error<ClassificationDiscriminant: Predictor 'B' has zero within-class variance.> ... 700s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 700s ***** test 700s load fisheriris 700s x = meas; 700s y = species; 700s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 700s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 700s assert (label, {'versicolor'}) 700s assert (score, [0, 0.9999, 0.0001], 1e-4) 700s assert (cost, [1, 0.0001, 0.9999], 1e-4) 700s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 700s assert (label, {'versicolor'}) 700s assert (score, [0, 0.6368, 0.3632], 1e-4) 700s assert (cost, [1, 0.3632, 0.6368], 1e-4) 700s ***** test 700s load fisheriris 700s x = meas; 700s y = species; 700s xc = [min(x); mean(x); max(x)]; 700s Mdl = fitcdiscr (x, y); 700s [label, score, cost] = predict (Mdl, xc); 700s l = {'setosa'; 'versicolor'; 'virginica'}; 700s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 700s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 700s assert (label, l) 700s assert (score, s, 1e-4) 700s assert (cost, c, 1e-4) 700s ***** error<ClassificationDiscriminant.predict: too few input arguments.> ... 700s predict (MODEL) 700s ***** error<ClassificationDiscriminant.predict: XC is empty.> ... 700s predict (MODEL, []) 700s ***** error<ClassificationDiscriminant.predict: XC must have the same number of predictors as the trained model.> ... 700s predict (MODEL, 1) 700s ***** test 700s load fisheriris 700s model = fitcdiscr (meas, species); 700s x = mean (meas); 700s y = {'versicolor'}; 700s L = loss (model, x, y); 700s assert (L, 0) 700s ***** test 700s x = [1, 2; 3, 4; 5, 6]; 700s y = {'A'; 'B'; 'A'}; 700s model = fitcdiscr (x, y, "Gamma", 0.4); 700s x_test = [1, 6; 3, 3]; 700s y_test = {'A'; 'B'}; 700s L = loss (model, x_test, y_test); 700s assert (L, 0.3333, 1e-4) 700s ***** test 700s x = [1, 2; 3, 4; 5, 6; 7, 8]; 700s y = ['1'; '2'; '3'; '1']; 700s model = fitcdiscr (x, y, "gamma" , 0.5); 700s x_test = [3, 3]; 700s y_test = ['1']; 700s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 700s assert (L, 0.2423, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6; 7, 8]; 701s y = ['1'; '2'; '3'; '1']; 701s model = fitcdiscr (x, y, "gamma" , 0.5); 701s x_test = [3, 3; 5, 7]; 701s y_test = ['1'; '2']; 701s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 701s assert (L, 0.3333, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6; 7, 8]; 701s y = ['1'; '2'; '3'; '1']; 701s model = fitcdiscr (x, y, "gamma" , 0.5); 701s x_test = [3, 3; 5, 7]; 701s y_test = ['1'; '2']; 701s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 701s assert (L, 0.5886, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6; 7, 8]; 701s y = ['1'; '2'; '3'; '1']; 701s model = fitcdiscr (x, y, "gamma" , 0.5); 701s x_test = [3, 3; 5, 7]; 701s y_test = ['1'; '2']; 701s W = [1; 2]; 701s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 701s assert (L, 0.5107, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6]; 701s y = {'A'; 'B'; 'A'}; 701s model = fitcdiscr (x, y, "gamma" , 0.5); 701s x_with_nan = [1, 2; NaN, 4]; 701s y_test = {'A'; 'B'}; 701s L = loss (model, x_with_nan, y_test); 701s assert (L, 0.3333, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6]; 701s y = {'A'; 'B'; 'A'}; 701s model = fitcdiscr (x, y); 701s x_with_nan = [1, 2; NaN, 4]; 701s y_test = {'A'; 'B'}; 701s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 701s assert (isnan (L)) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6]; 701s y = {'A'; 'B'; 'A'}; 701s model = fitcdiscr (x, y); 701s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 701s L = loss (model, x, y, 'LossFun', customLossFun); 701s assert (L, 0.8889, 1e-4) 701s ***** test 701s x = [1, 2; 3, 4; 5, 6]; 701s y = [1; 2; 1]; 701s model = fitcdiscr (x, y); 701s L = loss (model, x, y, 'LossFun', 'classiferror'); 701s assert (L, 0.3333, 1e-4) 701s ***** error<ClassificationDiscriminant.loss: too few input arguments.> ... 701s loss (MODEL) 701s ***** error<ClassificationDiscriminant.loss: too few input arguments.> ... 701s loss (MODEL, ones (4,2)) 701s ***** error<ClassificationDiscriminant.loss: X is empty.> ... 701s loss (MODEL, [], zeros (2)) 701s ***** error<ClassificationDiscriminant.loss: X must have the same number of predictors as the trained model.> ... 701s loss (MODEL, 1, zeros (2)) 701s ***** error<ClassificationDiscriminant.loss: name-value arguments must be in pairs.> ... 701s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 701s ***** error<ClassificationDiscriminant.loss: Y must have the same number of rows as X.> ... 701s loss (MODEL, ones (4,2), ones (3,1)) 701s ***** error<ClassificationDiscriminant.loss: invalid loss function.> ... 701s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 701s ***** error<ClassificationDiscriminant.loss: invalid 'Weights'.> ... 701s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 701s load fisheriris 701s mdl = fitcdiscr (meas, species); 701s X = mean (meas); 701s Y = {'versicolor'}; 701s m = margin (mdl, X, Y); 701s assert (m, 1, 1e-6) 701s ***** test 701s X = [1, 2; 3, 4; 5, 6]; 701s Y = [1; 2; 1]; 701s mdl = fitcdiscr (X, Y, "gamma", 0.5); 701s m = margin (mdl, X, Y); 701s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 701s ***** error<ClassificationDiscriminant.margin: too few input arguments.> ... 701s margin (MODEL) 701s ***** error<ClassificationDiscriminant.margin: too few input arguments.> ... 701s margin (MODEL, ones (4,2)) 701s ***** error<ClassificationDiscriminant.margin: X is empty.> ... 701s margin (MODEL, [], zeros (2)) 701s ***** error<ClassificationDiscriminant.margin: X must have the same number of predictors as the trained model.> ... 701s margin (MODEL, 1, zeros (2)) 701s ***** error<ClassificationDiscriminant.margin: Y must have the same number of rows as X.> ... 701s margin (MODEL, ones (4,2), ones (3,1)) 701s ***** shared x, y, obj 701s load fisheriris 701s x = meas; 701s y = species; 701s obj = fitcdiscr (x, y, "gamma", 0.4); 701s ***** test 701s CVMdl = crossval (obj); 701s assert (class (CVMdl), "ClassificationPartitionedModel") 701s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 701s assert (CVMdl.KFold == 10) 701s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 701s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 701s ***** test 701s CVMdl = crossval (obj, "KFold", 3); 701s assert (class (CVMdl), "ClassificationPartitionedModel") 701s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 701s assert (CVMdl.KFold == 3) 701s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 701s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 701s ***** test 701s CVMdl = crossval (obj, "HoldOut", 0.2); 701s assert (class (CVMdl), "ClassificationPartitionedModel") 701s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 701s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 701s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 701s ***** test 701s CVMdl = crossval (obj, "LeaveOut", 'on'); 701s assert (class (CVMdl), "ClassificationPartitionedModel") 701s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 701s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 701s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 703s ***** test 703s partition = cvpartition (y, 'KFold', 3); 703s CVMdl = crossval (obj, 'cvPartition', partition); 703s assert (class (CVMdl), "ClassificationPartitionedModel") 703s assert (CVMdl.KFold == 3) 703s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 703s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 703s ***** error<ClassificationDiscriminant.crossval: Name-Value arguments must be in pairs.> ... 703s crossval (obj, "kfold") 703s ***** error<ClassificationDiscriminant.crossval: specify only one of the optional Name-Value paired arguments.>... 703s crossval (obj, "kfold", 12, "holdout", 0.2) 703s ***** error<ClassificationDiscriminant.crossval: 'KFold' must be an integer value greater than 1.> ... 703s crossval (obj, "kfold", 'a') 703s ***** error<ClassificationDiscriminant.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 703s crossval (obj, "holdout", 2) 703s ***** error<ClassificationDiscriminant.crossval: 'Leaveout' must be either 'on' or 'off'.> ... 703s crossval (obj, "leaveout", 1) 703s ***** error<ClassificationDiscriminant.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 703s crossval (obj, "cvpartition", 1) 703s 65 tests, 65 passed, 0 known failure, 0 skipped 703s [inst/Classification/CompactClassificationGAM.m] 703s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/CompactClassificationGAM.m 703s ***** demo 703s ## Create a generalized additive model classifier and its compact version 703s # and compare their size 703s 703s load fisheriris 703s X = meas; 703s Y = species; 703s 703s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 703s CMdl = crossval (Mdl) 703s ***** test 703s Mdl = CompactClassificationGAM (); 703s assert (class (Mdl), "CompactClassificationGAM") 703s ***** test 703s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 703s y = [0; 0; 1; 1]; 703s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 703s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 703s CMdl = compact (Mdl); 703s assert (class (CMdl), "CompactClassificationGAM"); 703s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 703s assert (CMdl.ClassNames, {'0'; '1'}) 703s assert (CMdl.PredictorNames, PredictorNames) 703s assert (CMdl.BaseModel.Intercept, 0) 704s ***** test 704s load fisheriris 704s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 704s X = meas(inds, :); 704s Y = species(inds, :)'; 704s Y = strcmp (Y, 'virginica')'; 704s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 704s CMdl = compact (Mdl); 704s assert (class (CMdl), "CompactClassificationGAM"); 704s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 704s assert (CMdl.ClassNames, {'0'; '1'}) 704s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 704s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 704s assert (CMdl.ModelwInt.Intercept, 0) 709s ***** test 709s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 709s Y = [0; 1; 0; 1; 1]; 709s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 709s CMdl = compact (Mdl); 709s assert (class (CMdl), "CompactClassificationGAM"); 709s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 709s assert (CMdl.ClassNames, {'0'; '1'}) 709s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 709s assert (CMdl.Knots, [4, 4, 4]) 709s assert (CMdl.Order, [3, 3, 3]) 709s assert (CMdl.DoF, [7, 7, 7]) 709s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 711s ***** error<CompactClassificationGAM: invalid classification object.> ... 711s CompactClassificationGAM (1) 711s ***** test 711s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 711s y = [1; 0; 1; 0; 1]; 711s Mdl = fitcgam (x, y, "interactions", "all"); 711s CMdl = compact (Mdl); 711s l = {'0'; '0'; '0'; '0'; '0'}; 711s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 711s 0.4259, 0.5741; 0.3760, 0.6240]; 711s [labels, scores] = predict (CMdl, x); 711s assert (class (CMdl), "CompactClassificationGAM"); 711s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 711s assert (CMdl.ClassNames, {'1'; '0'}) 711s assert (CMdl.PredictorNames, {'x1', 'x2'}) 711s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 711s assert (labels, l) 711s assert (scores, s, 1e-1) 713s ***** test 713s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 713s y = [0; 0; 1; 1]; 713s interactions = [false, true, false; true, false, true; false, true, false]; 713s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 713s CMdl = compact (Mdl); 713s [label, score] = predict (CMdl, x, "includeinteractions", true); 713s l = {'0'; '0'; '1'; '1'}; 713s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 713s assert (class (CMdl), "CompactClassificationGAM"); 713s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 713s assert (CMdl.ClassNames, {'0'; '1'}) 713s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 713s assert (CMdl.ModelwInt.Intercept, 0) 713s assert (label, l) 713s assert (score, s, 1e-1) 717s ***** shared CMdl 717s Mdl = fitcgam (ones (4,2), ones (4,1)); 717s CMdl = compact (Mdl); 718s ***** error<CompactClassificationGAM.predict: too few input arguments.> ... 718s predict (CMdl) 718s ***** error<CompactClassificationGAM.predict: XC is empty.> ... 718s predict (CMdl, []) 718s ***** error<CompactClassificationGAM.predict: XC must have the same number of features as the trained model.> ... 718s predict (CMdl, 1) 718s 10 tests, 10 passed, 0 known failure, 0 skipped 718s [inst/Classification/ConfusionMatrixChart.m] 718s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ConfusionMatrixChart.m 718s ***** demo 718s ## Create a simple ConfusionMatrixChart Object 718s 718s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 718s NormalizedValues = cm.NormalizedValues 718s ClassLabels = cm.ClassLabels 718s ***** test 718s hf = figure ("visible", "off"); 718s unwind_protect 718s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 718s assert (isa (cm, "ConfusionMatrixChart"), true); 718s unwind_protect_cleanup 718s close (hf); 718s end_unwind_protect 718s 1 test, 1 passed, 0 known failure, 0 skipped 718s [inst/Classification/CompactClassificationDiscriminant.m] 718s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/CompactClassificationDiscriminant.m 718s ***** demo 718s ## Create a discriminant analysis classifier and its compact version 718s # and compare their size 718s 718s load fisheriris 718s X = meas; 718s Y = species; 718s 718s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 718s CMdl = crossval (Mdl) 718s ***** test 718s load fisheriris 718s x = meas; 718s y = species; 718s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 718s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 718s CMdl = compact (Mdl); 718s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 718s 0.092721, 0.115388, 0.055244, 0.032710; ... 718s 0.167514, 0.055244, 0.185188, 0.042665; ... 718s 0.038401, 0.032710, 0.042665, 0.041882]; 718s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 718s 5.9360, 2.7700, 4.2600, 1.3260; ... 718s 6.5880, 2.9740, 5.5520, 2.0260]; 718s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 718s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 718s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 718s assert (class (CMdl), "CompactClassificationDiscriminant"); 718s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 718s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 718s assert (CMdl.ClassNames, unique (species)) 718s assert (CMdl.Sigma, sigma, 1e-6) 718s assert (CMdl.Mu, mu, 1e-14) 718s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 718s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 718s assert (CMdl.PredictorNames, PredictorNames) 718s ***** test 718s load fisheriris 718s x = meas; 718s y = species; 718s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 718s CMdl = compact (Mdl); 718s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 718s 0.046361, 0.115388, 0.027622, 0.016355; ... 718s 0.083757, 0.027622, 0.185188, 0.021333; ... 718s 0.019201, 0.016355, 0.021333, 0.041882]; 718s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 718s 5.9360, 2.7700, 4.2600, 1.3260; ... 718s 6.5880, 2.9740, 5.5520, 2.0260]; 718s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 718s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 718s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 718s assert (class (CMdl), "CompactClassificationDiscriminant"); 718s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 718s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 718s assert (CMdl.ClassNames, unique (species)) 718s assert (CMdl.Sigma, sigma, 1e-6) 718s assert (CMdl.Mu, mu, 1e-14) 718s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 718s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 718s ***** error<CompactClassificationDiscriminant: invalid classification object.> ... 718s CompactClassificationDiscriminant (1) 718s ***** test 718s load fisheriris 718s x = meas; 718s y = species; 718s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 718s CMdl = compact (Mdl); 718s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 718s assert (label, {'versicolor'}) 718s assert (score, [0, 0.9999, 0.0001], 1e-4) 718s assert (cost, [1, 0.0001, 0.9999], 1e-4) 718s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 718s assert (label, {'versicolor'}) 718s assert (score, [0, 0.6368, 0.3632], 1e-4) 718s assert (cost, [1, 0.3632, 0.6368], 1e-4) 718s ***** test 718s load fisheriris 718s x = meas; 718s y = species; 718s xc = [min(x); mean(x); max(x)]; 718s Mdl = fitcdiscr (x, y); 718s CMdl = compact (Mdl); 718s [label, score, cost] = predict (CMdl, xc); 718s l = {'setosa'; 'versicolor'; 'virginica'}; 718s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 718s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 718s assert (label, l) 718s assert (score, s, 1e-4) 718s assert (cost, c, 1e-4) 718s ***** shared MODEL 718s X = rand (10,2); 718s Y = [ones(5,1);2*ones(5,1)]; 718s MODEL = compact (ClassificationDiscriminant (X, Y)); 718s ***** error<CompactClassificationDiscriminant.predict: too few input arguments.> ... 718s predict (MODEL) 718s ***** error<CompactClassificationDiscriminant.predict: XC is empty.> ... 718s predict (MODEL, []) 718s ***** error<CompactClassificationDiscriminant.predict: XC must have the same number of features as the trained model.> ... 718s predict (MODEL, 1) 718s ***** test 718s load fisheriris 718s model = fitcdiscr (meas, species); 718s x = mean (meas); 718s y = {'versicolor'}; 718s L = loss (model, x, y); 718s assert (L, 0) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6]; 718s y = {'A'; 'B'; 'A'}; 718s model = fitcdiscr (x, y, "Gamma", 0.4); 718s x_test = [1, 6; 3, 3]; 718s y_test = {'A'; 'B'}; 718s L = loss (model, x_test, y_test); 718s assert (L, 0.3333, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6; 7, 8]; 718s y = ['1'; '2'; '3'; '1']; 718s model = fitcdiscr (x, y, "gamma" , 0.5); 718s x_test = [3, 3]; 718s y_test = ['1']; 718s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 718s assert (L, 0.2423, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6; 7, 8]; 718s y = ['1'; '2'; '3'; '1']; 718s model = fitcdiscr (x, y, "gamma" , 0.5); 718s x_test = [3, 3; 5, 7]; 718s y_test = ['1'; '2']; 718s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 718s assert (L, 0.3333, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6; 7, 8]; 718s y = ['1'; '2'; '3'; '1']; 718s model = fitcdiscr (x, y, "gamma" , 0.5); 718s x_test = [3, 3; 5, 7]; 718s y_test = ['1'; '2']; 718s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 718s assert (L, 0.5886, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6; 7, 8]; 718s y = ['1'; '2'; '3'; '1']; 718s model = fitcdiscr (x, y, "gamma" , 0.5); 718s x_test = [3, 3; 5, 7]; 718s y_test = ['1'; '2']; 718s W = [1; 2]; 718s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 718s assert (L, 0.5107, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6]; 718s y = {'A'; 'B'; 'A'}; 718s model = fitcdiscr (x, y, "gamma" , 0.5); 718s x_with_nan = [1, 2; NaN, 4]; 718s y_test = {'A'; 'B'}; 718s L = loss (model, x_with_nan, y_test); 718s assert (L, 0.3333, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6]; 718s y = {'A'; 'B'; 'A'}; 718s model = fitcdiscr (x, y); 718s x_with_nan = [1, 2; NaN, 4]; 718s y_test = {'A'; 'B'}; 718s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 718s assert (isnan (L)) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6]; 718s y = {'A'; 'B'; 'A'}; 718s model = fitcdiscr (x, y); 718s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 718s L = loss (model, x, y, 'LossFun', customLossFun); 718s assert (L, 0.8889, 1e-4) 718s ***** test 718s x = [1, 2; 3, 4; 5, 6]; 718s y = [1; 2; 1]; 718s model = fitcdiscr (x, y); 718s L = loss (model, x, y, 'LossFun', 'classiferror'); 718s assert (L, 0.3333, 1e-4) 718s ***** error<CompactClassificationDiscriminant.loss: too few input arguments.> ... 718s loss (MODEL) 718s ***** error<CompactClassificationDiscriminant.loss: too few input arguments.> ... 718s loss (MODEL, ones (4,2)) 718s ***** error<CompactClassificationDiscriminant.loss: name-value arguments must be in pairs.> ... 718s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 718s ***** error<CompactClassificationDiscriminant.loss: Y must have the same number of rows as X.> ... 718s loss (MODEL, ones (4,2), ones (3,1)) 718s ***** error<CompactClassificationDiscriminant.loss: invalid loss function.> ... 718s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 718s ***** error<CompactClassificationDiscriminant.loss: invalid 'Weights'.> ... 718s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 718s load fisheriris 718s mdl = fitcdiscr (meas, species); 718s X = mean (meas); 718s Y = {'versicolor'}; 718s m = margin (mdl, X, Y); 718s assert (m, 1, 1e-6) 719s ***** test 719s X = [1, 2; 3, 4; 5, 6]; 719s Y = [1; 2; 1]; 719s mdl = fitcdiscr (X, Y, "gamma", 0.5); 719s m = margin (mdl, X, Y); 719s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 719s ***** error<CompactClassificationDiscriminant.margin: too few input arguments.> ... 719s margin (MODEL) 719s ***** error<CompactClassificationDiscriminant.margin: too few input arguments.> ... 719s margin (MODEL, ones (4,2)) 719s ***** error<CompactClassificationDiscriminant.margin: Y must have the same number of rows as X.> ... 719s margin (MODEL, ones (4,2), ones (3,1)) 719s 28 tests, 28 passed, 0 known failure, 0 skipped 719s [inst/Classification/ClassificationNeuralNetwork.m] 719s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationNeuralNetwork.m 719s ***** error<ClassificationNeuralNetwork: too few input arguments.> ... 719s ClassificationNeuralNetwork () 719s ***** error<ClassificationNeuralNetwork: too few input arguments.> ... 719s ClassificationNeuralNetwork (ones(10,2)) 719s ***** error<ClassificationNeuralNetwork: number of rows in X and Y must be equal.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 719s ***** error<ClassificationNeuralNetwork: 'Standardize' must be either true or false.> ... 719s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 719s ***** error<ClassificationNeuralNetwork: 'PredictorNames' must be supplied as a cellstring array.> ... 719s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 719s ***** error<ClassificationNeuralNetwork: 'PredictorNames' must be supplied as a cellstring array.> ... 719s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 719s ***** error<ClassificationNeuralNetwork: 'PredictorNames' must have the same number of columns as X.> ... 719s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 719s ***** error<ClassificationNeuralNetwork: 'ResponseName' must be a character vector.> ... 719s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 719s ***** error<ClassificationNeuralNetwork: 'ResponseName' must be a character vector.> ... 719s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 719s ***** error<ClassificationNeuralNetwork: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 719s ***** error<ClassificationNeuralNetwork: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 719s ***** error<ClassificationNeuralNetwork: not all 'ClassNames' are present in Y.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 719s ***** error<ClassificationNeuralNetwork: not all 'ClassNames' are present in Y.> ... 719s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 719s ***** error<ClassificationNeuralNetwork: not all 'ClassNames' are present in Y.> ... 719s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 719s ***** error<ClassificationNeuralNetwork: 'LayerSizes' must be a positive integer vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 719s ***** error<ClassificationNeuralNetwork: 'LayerSizes' must be a positive integer vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 719s ***** error<ClassificationNeuralNetwork: 'LayerSizes' must be a positive integer vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 719s ***** error<ClassificationNeuralNetwork: 'LayerSizes' must be a positive integer vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 719s ***** error<ClassificationNeuralNetwork: 'LearningRate' must be a positive scalar.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 719s ***** error<ClassificationNeuralNetwork: 'LearningRate' must be a positive scalar.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 719s ***** error<ClassificationNeuralNetwork: 'LearningRate' must be a positive scalar.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 719s ***** error<ClassificationNeuralNetwork: 'Activations' must be a character vector or a cellstring vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 719s ***** error<ClassificationNeuralNetwork: unsupported 'Activation' function.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 719s ***** error<ClassificationNeuralNetwork: unsupported 'Activation' functions.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 719s "Activations", {"sigmoid", "unsupported_type"}) 719s ***** error<ClassificationNeuralNetwork: 'Activations' vector does not match the number of layers.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 719s ***** error<ClassificationNeuralNetwork: 'OutputLayerActivation' must be a character vector.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 719s ***** error<ClassificationNeuralNetwork: unsupported 'OutputLayerActivation' function.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 719s ***** error<ClassificationNeuralNetwork: 'IterationLimit' must be a positive integer.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 719s ***** error<ClassificationNeuralNetwork: 'IterationLimit' must be a positive integer.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 719s ***** error<ClassificationNeuralNetwork: 'IterationLimit' must be a positive integer.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 719s ***** error<ClassificationNeuralNetwork: 'ScoreTransform' must be a character vector or a function handle.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 719s ***** error<ClassificationNeuralNetwork: unrecognized 'ScoreTransform' function.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 719s ***** error<ClassificationNeuralNetwork: invalid parameter name in optional pair arguments.> ... 719s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 719s ***** error<ClassificationNeuralNetwork: invalid values in X.> ... 719s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 719s ***** error<ClassificationNeuralNetwork: invalid values in X.> ... 719s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 719s ***** shared x, y, objST, Mdl 719s load fisheriris 719s x = meas; 719s y = grp2idx (species); 719s Mdl = fitcnet (x, y, "IterationLimit", 100); 719s ***** error<ClassificationNeuralNetwork.predict: too few input arguments.> ... 719s predict (Mdl) 719s ***** error<ClassificationNeuralNetwork.predict: XC is empty.> ... 719s predict (Mdl, []) 719s ***** error<ClassificationNeuralNetwork.predict: XC must have the same number of predictors as the trained model.> ... 719s predict (Mdl, 1) 719s ***** test 719s objST = fitcnet (x, y, "IterationLimit", 100); 719s objST.ScoreTransform = "a"; 719s ***** error<ClassificationNeuralNetwork.predict: 'ScoreTransform' must be a 'function_handle' object.> ... 719s [labels, scores] = predict (objST, x); 719s ***** error<ClassificationNeuralNetwork.resubPredict: 'ScoreTransform' must be a 'function_handle' object.> ... 719s [labels, scores] = resubPredict (objST); 719s ***** test 719s CVMdl = crossval (Mdl, "KFold", 5); 719s assert (class (CVMdl), "ClassificationPartitionedModel") 719s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 719s assert (CVMdl.KFold == 5) 719s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 719s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 719s ***** test 719s CVMdl = crossval (Mdl, "HoldOut", 0.2); 719s assert (class (CVMdl), "ClassificationPartitionedModel") 719s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 719s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 719s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 719s ***** error<ClassificationNeuralNetwork.crossval: Name-Value arguments must be in pairs.> ... 719s crossval (Mdl, "KFold") 719s ***** error<ClassificationNeuralNetwork.crossval: specify only one of the optional Name-Value paired arguments.> ... 719s crossval (Mdl, "KFold", 5, "leaveout", 'on') 719s ***** error<ClassificationNeuralNetwork.crossval: 'KFold' must be an integer value greater than 1.> ... 719s crossval (Mdl, "KFold", 'a') 719s ***** error<ClassificationNeuralNetwork.crossval: 'KFold' must be an integer value greater than 1.> ... 719s crossval (Mdl, "KFold", 1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'KFold' must be an integer value greater than 1.> ... 719s crossval (Mdl, "KFold", -1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'KFold' must be an integer value greater than 1.> ... 719s crossval (Mdl, "KFold", 11.5) 719s ***** error<ClassificationNeuralNetwork.crossval: 'KFold' must be an integer value greater than 1.> ... 719s crossval (Mdl, "KFold", [1,2]) 719s ***** error<ClassificationNeuralNetwork.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 719s crossval (Mdl, "Holdout", 'a') 719s ***** error<ClassificationNeuralNetwork.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 719s crossval (Mdl, "Holdout", 11.5) 719s ***** error<ClassificationNeuralNetwork.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 719s crossval (Mdl, "Holdout", -1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 719s crossval (Mdl, "Holdout", 0) 719s ***** error<ClassificationNeuralNetwork.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 719s crossval (Mdl, "Holdout", 1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'Leaveout' must be either 'on' or 'off'.> ... 719s crossval (Mdl, "Leaveout", 1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 719s crossval (Mdl, "CVPartition", 1) 719s ***** error<ClassificationNeuralNetwork.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 719s crossval (Mdl, "CVPartition", 'a') 719s ***** error<ClassificationNeuralNetwork.crossval: invalid parameter name in optional paired arguments> ... 719s crossval (Mdl, "some", "some") 719s 59 tests, 59 passed, 0 known failure, 0 skipped 719s [inst/Classification/CompactClassificationNeuralNetwork.m] 719s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/CompactClassificationNeuralNetwork.m 719s ***** demo 719s ## Create a neural network classifier and its compact version 719s # and compare their size 719s 719s load fisheriris 719s X = meas; 719s Y = species; 719s 719s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 719s CMdl = crossval (Mdl) 719s ***** error<CompactClassificationDiscriminant: invalid classification object.> ... 719s CompactClassificationDiscriminant (1) 719s ***** shared x, y, CMdl 719s load fisheriris 719s x = meas; 719s y = grp2idx (species); 719s Mdl = fitcnet (x, y, "IterationLimit", 100); 719s CMdl = compact (Mdl); 719s ***** error<CompactClassificationNeuralNetwork.predict: too few input arguments.> ... 719s predict (CMdl) 719s ***** error<CompactClassificationNeuralNetwork.predict: XC is empty.> ... 719s predict (CMdl, []) 719s ***** error<CompactClassificationNeuralNetwork.predict: XC must have the same number of predictors as the trained neural network.> ... 719s predict (CMdl, 1) 719s ***** test 719s CMdl.ScoreTransform = "a"; 719s ***** error<CompactClassificationNeuralNetwork.predict: 'ScoreTransform' must be a 'function_handle' object.> ... 719s [labels, scores] = predict (CMdl, x); 719s 6 tests, 6 passed, 0 known failure, 0 skipped 719s [inst/Classification/CompactClassificationSVM.m] 719s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/CompactClassificationSVM.m 719s ***** demo 719s ## Create a support vectors machine classifier and its compact version 719s # and compare their size 719s 719s load fisheriris 719s X = meas; 719s Y = species; 719s 719s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 719s CMdl = crossval (Mdl) 719s ***** error<CompactClassificationSVM: invalid classification object.> ... 719s CompactClassificationSVM (1) 719s ***** shared x, y, CMdl 719s load fisheriris 719s inds = ! strcmp (species, 'setosa'); 719s x = meas(inds, 3:4); 719s y = grp2idx (species(inds)); 720s ***** test 720s xc = [min(x); mean(x); max(x)]; 720s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 720s CMdl = compact (Mdl); 720s assert (isempty (CMdl.Alpha), true) 720s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 720s [label, score] = predict (CMdl, xc); 720s assert (label, [1; 2; 2]); 720s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 720s assert (score(:,1), -score(:,2), eps) 720s ***** test 720s Mdl = fitcsvm (x, y); 720s CMdl = compact (Mdl); 720s assert (isempty (CMdl.Beta), true) 720s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 720s assert (numel (CMdl.Alpha), 24) 720s assert (CMdl.Bias, -14.415, 1e-3) 720s xc = [min(x); mean(x); max(x)]; 720s label = predict (CMdl, xc); 720s assert (label, [1; 2; 2]); 720s ***** error<CompactClassificationSVM.predict: too few input arguments.> ... 720s predict (CMdl) 720s ***** error<CompactClassificationSVM.predict: XC is empty.> ... 720s predict (CMdl, []) 720s ***** error<CompactClassificationSVM.predict: XC must have the same number of predictors as the trained SVM model.> ... 720s predict (CMdl, 1) 720s ***** test 720s CMdl.ScoreTransform = "a"; 720s ***** error<CompactClassificationSVM.predict: 'ScoreTransform' must be a 'function_handle' object.> ... 720s [labels, scores] = predict (CMdl, x); 720s ***** test 720s rand ("seed", 1); 720s C = cvpartition (y, 'HoldOut', 0.15); 720s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 720s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 720s CMdl = compact (Mdl); 720s testInds = test (C); 720s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 720s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 720s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 720s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 720s assert (computed_margin, expected_margin, 1e-4); 720s ***** error<CompactClassificationSVM.margin: too few input arguments.> ... 720s margin (CMdl) 720s ***** error<CompactClassificationSVM.margin: too few input arguments.> ... 720s margin (CMdl, zeros (2)) 720s ***** error<CompactClassificationSVM.margin: X is empty.> ... 720s margin (CMdl, [], 1) 720s ***** error<CompactClassificationSVM.margin: X must have the same number of predictors as the trained SVM model.> ... 720s margin (CMdl, 1, 1) 720s ***** error<CompactClassificationSVM.margin: Y is empty.> ... 720s margin (CMdl, [1, 2], []) 720s ***** error<CompactClassificationSVM.margin: Y must have the same number of rows as X.> ... 720s margin (CMdl, [1, 2], [1; 2]) 720s ***** test 720s rand ("seed", 1); 720s C = cvpartition (y, 'HoldOut', 0.15); 720s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 720s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 720s CMdl = compact (Mdl); 720s testInds = test (C); 720s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 720s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 720s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 720s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 720s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 720s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 720s assert (L1, 2.8711, 1e-4); 720s assert (L2, 0.5333, 1e-4); 720s assert (L3, 10.9685, 1e-4); 720s assert (L4, 1.9827, 1e-4); 720s assert (L5, 1.5849, 1e-4); 720s assert (L6, 7.6739, 1e-4); 720s ***** error<CompactClassificationSVM.loss: too few input arguments.> ... 720s loss (CMdl) 720s ***** error<CompactClassificationSVM.loss: too few input arguments.> ... 720s loss (CMdl, zeros (2)) 720s ***** error<CompactClassificationSVM.loss: Name-Value arguments must be in pairs.> ... 720s loss (CMdl, [1, 2], 1, "LossFun") 720s ***** error<CompactClassificationSVM.loss: X is empty.> ... 720s loss (CMdl, [], zeros (2)) 720s ***** error<CompactClassificationSVM.loss: X must have the same number of predictors as the trained SVM model.> ... 720s loss (CMdl, 1, zeros (2)) 720s ***** error<CompactClassificationSVM.loss: Y is empty.> ... 720s loss (CMdl, [1, 2], []) 720s ***** error<CompactClassificationSVM.loss: Y must have the same number of rows as X.> ... 720s loss (CMdl, [1, 2], [1; 2]) 720s ***** error<CompactClassificationSVM.loss: 'LossFun' must be a character vector.> ... 720s loss (CMdl, [1, 2], 1, "LossFun", 1) 720s ***** error<CompactClassificationSVM.loss: unsupported Loss function.> ... 720s loss (CMdl, [1, 2], 1, "LossFun", "some") 720s ***** error<CompactClassificationSVM.loss: 'Weights' must be a numeric vector.> ... 720s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 720s ***** error<CompactClassificationSVM.loss: 'Weights' must be a numeric vector.> ... 720s loss (CMdl, [1, 2], 1, "Weights", 'a') 720s ***** error<CompactClassificationSVM.loss: size of 'Weights' must be equal to the number of rows in X.> ... 720s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 720s ***** error<CompactClassificationSVM.loss: invalid parameter name in optional pair arguments.> ... 720s loss (CMdl, [1, 2], 1, "some", "some") 720s 29 tests, 29 passed, 0 known failure, 0 skipped 720s [inst/Classification/ClassificationKNN.m] 720s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationKNN.m 720s ***** demo 720s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 720s ## Evaluate some model predictions on new data. 720s 720s load fisheriris 720s x = meas; 720s y = species; 720s xc = [min(x); mean(x); max(x)]; 720s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 720s [label, score, cost] = predict (obj, xc) 720s ***** demo 720s load fisheriris 720s x = meas; 720s y = species; 720s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 720s 720s ## Create a cross-validated model 720s CVMdl = crossval (obj) 720s ***** demo 720s load fisheriris 720s x = meas; 720s y = species; 720s covMatrix = cov (x); 720s 720s ## Fit the k-NN model using the 'mahalanobis' distance 720s ## and the custom covariance matrix 720s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 720s 'Cov', covMatrix); 720s 720s ## Create a partition model using cvpartition 720s Partition = cvpartition (size (x, 1), 'kfold', 12); 720s 720s ## Create cross-validated model using 'cvPartition' name-value argument 720s CVMdl = crossval (obj, 'cvPartition', Partition) 720s 720s ## Access the trained model from first fold of cross-validation 720s CVMdl.Trained{1} 720s ***** demo 720s X = [1, 2; 3, 4; 5, 6]; 720s Y = {'A'; 'B'; 'A'}; 720s model = fitcknn (X, Y); 720s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 720s ## Calculate loss using custom loss function 720s L = loss (model, X, Y, 'LossFun', customLossFun) 720s ***** demo 720s X = [1, 2; 3, 4; 5, 6]; 720s Y = {'A'; 'B'; 'A'}; 720s model = fitcknn (X, Y); 720s ## Calculate loss using 'mincost' loss function 720s L = loss (model, X, Y, 'LossFun', 'mincost') 720s ***** demo 720s X = [1, 2; 3, 4; 5, 6]; 720s Y = ['1'; '2'; '3']; 720s model = fitcknn (X, Y); 720s X_test = [3, 3; 5, 7]; 720s Y_test = ['1'; '2']; 720s ## Specify custom Weights 720s W = [1; 2]; 720s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 720s ***** demo 720s load fisheriris 720s mdl = fitcknn (meas, species); 720s X = mean (meas); 720s Y = {'versicolor'}; 720s m = margin (mdl, X, Y) 720s ***** demo 720s X = [1, 2; 4, 5; 7, 8; 3, 2]; 720s Y = [2; 1; 3; 2]; 720s ## Train the model 720s mdl = fitcknn (X, Y); 720s ## Specify Vars and Labels 720s Vars = 1; 720s Labels = 2; 720s ## Calculate partialDependence 720s [pd, x, y] = partialDependence (mdl, Vars, Labels); 720s ***** demo 720s X = [1, 2; 4, 5; 7, 8; 3, 2]; 720s Y = [2; 1; 3; 2]; 720s ## Train the model 720s mdl = fitcknn (X, Y); 720s ## Specify Vars and Labels 720s Vars = 1; 720s Labels = 1; 720s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 720s ## Calculate partialDependence using queryPoints 720s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 720s queryPoints) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s k = 10; 720s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = ones (4, 11); 720s y = ["a"; "a"; "b"; "b"]; 720s k = 10; 720s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s k = 10; 720s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s k = 10; 720s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s weights = ones (4,1); 720s a = ClassificationKNN (x, y, "Standardize", 1); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.Standardize}, {true}) 720s assert ({a.Sigma}, {std(x, [], 1)}) 720s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s weights = ones (4,1); 720s a = ClassificationKNN (x, y, "Standardize", false); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.Standardize}, {false}) 720s assert ({a.Sigma}, {[]}) 720s assert ({a.Mu}, {[]}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s s = ones (1, 3); 720s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.DistParameter}, {s}) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 720s assert (class (a), "ClassificationKNN"); 720s assert (a.DistParameter, 5) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 720s "NSMethod", "exhaustive"); 720s assert (class (a), "ClassificationKNN"); 720s assert (a.DistParameter, 5) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 720s assert (class (a), "ClassificationKNN"); 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 720s assert ({a.BucketSize}, {20}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y, "IncludeTies", true); 720s assert (class (a), "ClassificationKNN"); 720s assert (a.IncludeTies, true); 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y); 720s assert (class (a), "ClassificationKNN"); 720s assert (a.IncludeTies, false); 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s a = ClassificationKNN (x, y); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Prior, [0.5; 0.5]) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s prior = [0.5; 0.5]; 720s a = ClassificationKNN (x, y, "Prior", "empirical"); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Prior, prior) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "a"; "b"]; 720s prior = [0.75; 0.25]; 720s a = ClassificationKNN (x, y, "Prior", "empirical"); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Prior, prior) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "a"; "b"]; 720s prior = [0.5; 0.5]; 720s a = ClassificationKNN (x, y, "Prior", "uniform"); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Prior, prior) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s cost = eye (2); 720s a = ClassificationKNN (x, y, "Cost", cost); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Cost, [1, 0; 0, 1]) 720s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 720s y = ["a"; "a"; "b"; "b"]; 720s cost = eye (2); 720s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 720s assert (class (a), "ClassificationKNN") 720s assert (a.Cost, [1, 0; 0, 1]) 720s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 720s assert ({a.BucketSize}, {50}) 720s ***** test 720s x = [1, 2; 3, 4; 5,6; 5, 8]; 720s y = {'9'; '9'; '6'; '7'}; 720s a = ClassificationKNN (x, y); 720s assert (a.Prior, [0.5; 0.25; 0.25]) 720s ***** test 720s load fisheriris 720s x = meas; 720s y = species; 720s ClassNames = {'setosa', 'versicolor', 'virginica'}; 720s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 720s assert (a.ClassNames, ClassNames') 720s ***** error<ClassificationKNN: too few input arguments.> ClassificationKNN () 720s ***** error<ClassificationKNN: too few input arguments.> ... 720s ClassificationKNN (ones(4, 1)) 720s ***** error<ClassificationKNN: number of rows in X and Y must be equal.> ... 720s ClassificationKNN (ones (4,2), ones (1,4)) 720s ***** error<ClassificationKNN: 'Standardize' must be either true or false.> ... 720s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 720s ***** error<ClassificationKNN: 'Standardize' cannot simultaneously be specified with> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 720s ***** error<ClassificationKNN: 'PredictorNames' must be supplied as a cellstring array.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 720s ***** error<ClassificationKNN: 'PredictorNames' must be supplied as a cellstring array.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 720s ***** error<ClassificationKNN: 'PredictorNames' must have the same number of columns as X.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 720s ***** error<ClassificationKNN: 'ResponseName' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 720s ***** error<ClassificationKNN: 'ResponseName' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 720s ***** error<ClassificationKNN: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 720s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 720s ***** error<ClassificationKNN: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 720s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 720s ***** error<ClassificationKNN: not all 'ClassNames' are present in Y.> ... 720s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 720s ***** error<ClassificationKNN: not all 'ClassNames' are present in Y.> ... 720s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 720s ***** error<ClassificationKNN: not all 'ClassNames' are present in Y.> ... 720s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 720s ***** error<ClassificationKNN: 'BreakTies' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 720s ***** error<ClassificationKNN: 'BreakTies' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 720s ***** error<ClassificationKNN: invalid value for 'BreakTies'.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 720s ***** error<ClassificationKNN: 'Prior' must be either a numeric vector or a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 720s ***** error<ClassificationKNN: 'Cost' must be a numeric square matrix.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 720s ***** error<ClassificationKNN: 'Cost' must be a numeric square matrix.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 720s ***** error<ClassificationKNN: 'Cost' must be a numeric square matrix.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 720s ***** error<ClassificationKNN: 'NumNeighbors' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 720s ***** error<ClassificationKNN: 'NumNeighbors' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 720s ***** error<ClassificationKNN: 'NumNeighbors' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 720s ***** error<ClassificationKNN: unsupported distance metric.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 720s ***** error<ClassificationKNN: invalid function handle for distance metric.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 720s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 720s ***** error<ClassificationKNN: custom distance function produces wrong output size.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 720s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 720s ***** error<ClassificationKNN: invalid distance metric.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 720s ***** error<ClassificationKNN: invalid distance metric.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 720s ***** error<ClassificationKNN: invalid distance metric.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 720s ***** error<ClassificationKNN: function handle for distance weight must return the> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 720s ***** error<ClassificationKNN: invalid distance weight.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 720s ***** error<ClassificationKNN: invalid distance weight.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 720s ***** error<ClassificationKNN: 'Scale' must be a numeric vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 720s ***** error<ClassificationKNN: 'Scale' must be a numeric vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 720s ***** error<ClassificationKNN: 'Scale' cannot simultaneously be specified with> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 720s ***** error<ClassificationKNN: 'Cov' must be a symmetric positive definite matrix.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 720s ***** error<ClassificationKNN: 'Cov' cannot simultaneously be specified with> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 720s ***** error<ClassificationKNN: 'Exponent' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 720s ***** error<ClassificationKNN: 'Exponent' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 720s ***** error<ClassificationKNN: 'Exponent' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 720s ***** error<ClassificationKNN: 'Exponent' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 720s ***** error<ClassificationKNN: 'NSMethod' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 720s ***** error<ClassificationKNN: 'NSMethod' must be a character vector.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 720s ***** error<ClassificationKNN: 'NSMethod' must be either 'kdtree' or 'exhaustive'.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 720s ***** error<ClassificationKNN: 'IncludeTies' must be either true or false.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 720s ***** error<ClassificationKNN: 'BucketSize' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 720s ***** error<ClassificationKNN: 'BucketSize' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 720s ***** error<ClassificationKNN: 'BucketSize' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 720s ***** error<ClassificationKNN: 'BucketSize' must be a positive integer.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 720s ***** error<ClassificationKNN: invalid parameter name in optional pair arguments.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 720s ***** error<ClassificationKNN: invalid values in X.> ... 720s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 720s ***** error<ClassificationKNN: invalid values in X.> ... 720s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 720s ***** error<ClassificationKNN: the elements in 'Prior' do not correspond to selected classes in Y.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 720s ***** error<ClassificationKNN: the number of rows and columns in 'Cost' must correspond to selected classes in Y.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 720s ***** error<ClassificationKNN: 'Scale' is only valid when distance metric is seuclidean.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 720s ***** error<ClassificationKNN: 'Scale' vector must have equal length to the number of columns in X.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 720s ***** error<ClassificationKNN: 'Scale' vector must contain nonnegative scalar values.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 720s ***** error<ClassificationKNN: 'Cov' is only valid when distance metric is 'mahalanobis'.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 720s ***** error<ClassificationKNN: 'Cov' matrix must have equal columns as X.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 720s ***** error<ClassificationKNN: 'Exponent' is only valid when distance metric is 'minkowski'.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 720s ***** error<ClassificationKNN: 'kdtree' method is only valid for 'euclidean', 'cityblock', 'manhattan', 'minkowski', and 'chebychev' distance metrics.> ... 720s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 720s ***** shared x, y 720s load fisheriris 720s x = meas; 720s y = species; 720s ***** test 720s xc = [min(x); mean(x); max(x)]; 720s obj = fitcknn (x, y, "NumNeighbors", 5); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"setosa"; "versicolor"; "virginica"}) 720s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 720s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 720s ***** test 720s xc = [min(x); mean(x); max(x)]; 720s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"versicolor"; "versicolor"; "virginica"}) 720s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 720s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 720s ***** test 720s xc = [min(x); mean(x); max(x)]; 720s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 720s [l, s, c] = predict (obj, xc); 720s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 720s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 720s ***** test 720s xc = [min(x); mean(x); max(x)]; 720s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"setosa"; "versicolor"; "virginica"}) 720s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 720s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 720s ***** test 720s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 720s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 720s obj = fitcknn (x, y, "NumNeighbors", 5); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 720s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 720s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 720s ***** test 720s xc = [5, 3, 5, 1.45]; 720s obj = fitcknn (x, y, "NumNeighbors", 5); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"versicolor"}) 720s assert (s, [0, 0.6, 0.4], 1e-4) 720s assert (c, [1, 0.4, 0.6], 1e-4) 720s ***** test 720s xc = [5, 3, 5, 1.45]; 720s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"versicolor"}) 720s assert (s, [0, 0.5, 0.5], 1e-4) 720s assert (c, [1, 0.5, 0.5], 1e-4) 720s ***** test 720s xc = [5, 3, 5, 1.45]; 720s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 720s [l, s, c] = predict (obj, xc); 720s assert (l, {"setosa"}) 720s assert (s, [0.9, 0.1, 0], 1e-4) 720s assert (c, [0.1, 0.9, 1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"versicolor"}) 721s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 721s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"setosa"}) 721s assert (s, [0.8, 0.2, 0], 1e-4) 721s assert (c, [0.2, 0.8, 1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"versicolor"}) 721s assert (s, [0, 1, 0], 1e-4) 721s assert (c, [1, 0, 1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"versicolor"}) 721s assert (s, [0, 0.7, 0.3], 1e-4) 721s assert (c, [1, 0.3, 0.7], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"versicolor"}) 721s assert (s, [0, 0.6, 0.4], 1e-4) 721s assert (c, [1, 0.4, 0.6], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"virginica"}) 721s assert (s, [0, 0.1, 0.9], 1e-4) 721s assert (c, [1, 0.9, 0.1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"virginica"}) 721s assert (s, [0, 0.1, 0.9], 1e-4) 721s assert (c, [1, 0.9, 0.1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"versicolor"}) 721s assert (s, [0, 1, 0], 1e-4) 721s assert (c, [1, 0, 1], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"setosa"}) 721s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 721s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 721s ***** test 721s xc = [5, 3, 5, 1.45]; 721s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"setosa"}) 721s assert (s, [0.8, 0.2, 0], 1e-4) 721s assert (c, [0.2, 0.8, 1], 1e-4) 721s ***** test 721s xc = [min(x); mean(x); max(x)]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"setosa"; "versicolor"; "virginica"}) 721s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 721s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 721s ***** test 721s xc = [min(x); mean(x); max(x)]; 721s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 721s [l, s, c] = predict (obj, xc); 721s assert (l, {"setosa";"setosa";"setosa"}) 721s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 721s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 721s ***** error<ClassificationKNN.predict: too few input arguments.> ... 721s predict (ClassificationKNN (ones (4,2), ones (4,1))) 721s ***** error<ClassificationKNN.predict: XC is empty.> ... 721s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 721s ***** error<ClassificationKNN.predict: XC must have the same number of predictors as the trained model.> ... 721s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 721s ***** test 721s load fisheriris 721s model = fitcknn (meas, species, 'NumNeighbors', 5); 721s X = mean (meas); 721s Y = {'versicolor'}; 721s L = loss (model, X, Y); 721s assert (L, 0) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = {'A'; 'B'; 'A'}; 721s model = fitcknn (X, Y); 721s X_test = [1, 6; 3, 3]; 721s Y_test = {'A'; 'B'}; 721s L = loss (model, X_test, Y_test); 721s assert (abs (L - 0.6667) > 1e-5) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = {'A'; 'B'; 'A'}; 721s model = fitcknn (X, Y); 721s X_with_nan = [1, 2; NaN, 4]; 721s Y_test = {'A'; 'B'}; 721s L = loss (model, X_with_nan, Y_test); 721s assert (abs (L - 0.3333) < 1e-4) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = {'A'; 'B'; 'A'}; 721s model = fitcknn (X, Y); 721s X_with_nan = [1, 2; NaN, 4]; 721s Y_test = {'A'; 'B'}; 721s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 721s assert (isnan (L)) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = {'A'; 'B'; 'A'}; 721s model = fitcknn (X, Y); 721s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 721s L = loss (model, X, Y, 'LossFun', customLossFun); 721s assert (L, 0) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = [1; 2; 1]; 721s model = fitcknn (X, Y); 721s L = loss (model, X, Y, 'LossFun', 'classiferror'); 721s assert (L, 0) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = [true; false; true]; 721s model = fitcknn (X, Y); 721s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 721s assert (abs (L - 0.1269) < 1e-4) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = ['1'; '2'; '1']; 721s model = fitcknn (X, Y); 721s L = loss (model, X, Y, 'LossFun', 'classiferror'); 721s assert (L, 0) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = ['1'; '2'; '3']; 721s model = fitcknn (X, Y); 721s X_test = [3, 3]; 721s Y_test = ['1']; 721s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 721s assert (L, 1) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = ['1'; '2'; '3']; 721s model = fitcknn (X, Y); 721s X_test = [3, 3; 5, 7]; 721s Y_test = ['1'; '2']; 721s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 721s assert (L, 1) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = ['1'; '2'; '3']; 721s model = fitcknn (X, Y); 721s X_test = [3, 3; 5, 7]; 721s Y_test = ['1'; '2']; 721s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 721s assert (L, 1) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = ['1'; '2'; '3']; 721s model = fitcknn (X, Y); 721s X_test = [3, 3; 5, 7]; 721s Y_test = ['1'; '2']; 721s W = [1; 2]; 721s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 721s assert (abs (L - 0.6931) < 1e-4) 721s ***** error<ClassificationKNN.loss: too few input arguments.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1))) 721s ***** error<ClassificationKNN.loss: too few input arguments.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 721s ***** error<ClassificationKNN.loss: X is empty.> ... 721s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 721s ***** error<ClassificationKNN.loss: X must have the same number of predictors as the trained model.> ... 721s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 721s ***** error<ClassificationKNN.loss: name-value arguments must be in pairs.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 721s ones (4,1), 'LossFun') 721s ***** error<ClassificationKNN.loss: Y must have the same number of rows as X.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 721s ***** error<ClassificationKNN.loss: invalid loss function.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 721s ones (4,1), 'LossFun', 'a') 721s ***** error<ClassificationKNN.loss: invalid Weights.> ... 721s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 721s ones (4,1), 'Weights', 'w') 721s ***** test 721s load fisheriris 721s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 721s X = mean (meas); 721s Y = {'versicolor'}; 721s m = margin (mdl, X, Y); 721s assert (m, 1) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = [1; 2; 3]; 721s mdl = fitcknn (X, Y); 721s m = margin (mdl, X, Y); 721s assert (m, [1; 1; 1]) 721s ***** test 721s X = [7, 8; 9, 10]; 721s Y = ['1'; '2']; 721s mdl = fitcknn (X, Y); 721s m = margin (mdl, X, Y); 721s assert (m, [1; 1]) 721s ***** test 721s X = [11, 12]; 721s Y = {'1'}; 721s mdl = fitcknn (X, Y); 721s m = margin (mdl, X, Y); 721s assert (isnan (m)) 721s ***** test 721s X = [1, 2; 3, 4; 5, 6]; 721s Y = [1; 2; 3]; 721s mdl = fitcknn (X, Y); 721s X1 = [15, 16]; 721s Y1 = [1]; 721s m = margin (mdl, X1, Y1); 721s assert (m, -1) 721s ***** error<ClassificationKNN.margin: too few input arguments.> ... 721s margin (ClassificationKNN (ones (4,2), ones (4,1))) 721s ***** error<ClassificationKNN.margin: too few input arguments.> ... 721s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 721s ***** error<ClassificationKNN.margin: X is empty.> ... 721s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 721s ***** error<ClassificationKNN.margin: X must have the same number of predictors as the trained model.> ... 721s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 721s ***** error<ClassificationKNN.margin: Y must have the same number of rows as X.> ... 721s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 721s ***** shared X, Y, mdl 721s X = [1, 2; 4, 5; 7, 8; 3, 2]; 721s Y = [2; 1; 3; 2]; 721s mdl = fitcknn (X, Y); 721s ***** test 721s Vars = 1; 721s Labels = 2; 721s [pd, x, y] = partialDependence (mdl, Vars, Labels); 721s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 721s 0.5000, 0.5000]; 721s assert (pd, pdm) 721s ***** test 721s Vars = 1; 721s Labels = 2; 721s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 721s 'NumObservationsToSample', 5); 721s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 721s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 721s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 721s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 721s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 721s assert (abs (pdm - pd) < 1) 722s ***** test 722s Vars = 1; 722s Labels = 2; 722s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 722s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000]; 722s assert (pd, pdm) 722s ***** test 722s Vars = [1, 2]; 722s Labels = 1; 722s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 722s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 722s queryPoints, 'UseParallel', true); 722s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 722s assert (pd, pdm) 722s ***** test 722s Vars = 1; 722s Labels = [1; 2]; 722s [pd, x, y] = partialDependence (mdl, Vars, Labels); 722s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 722s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 722s 0.5000, 0.5000, 0.5000]; 722s assert (pd, pdm) 723s ***** test 723s Vars = [1, 2]; 723s Labels = [1; 2]; 723s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 723s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 723s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 723s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 723s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 723s assert (pd, pdm) 723s ***** test 723s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 723s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 723s X = [X1, double(X2)]; 723s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 723s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 723s Vars = 1; 723s Labels = 1; 723s [pd, x, y] = partialDependence (mdl, Vars, Labels); 723s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 723s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 723s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 723s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 723s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 723s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 723s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 723s 0.7500, 0.7500, 0.7500]; 723s assert (pd, pdm) 723s ***** test 723s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 723s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 723s X = [X1, double(X2)]; 723s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 723s predictorNames = {'Feature1', 'Feature2'}; 723s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 723s Vars = 'Feature1'; 723s Labels = 1; 723s [pd, x, y] = partialDependence (mdl, Vars, Labels); 723s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 723s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 723s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 723s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 723s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 723s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 723s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 723s 0.7500, 0.7500, 0.7500]; 723s assert (pd, pdm) 724s ***** test 724s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 724s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 724s X = [X1, double(X2)]; 724s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 724s predictorNames = {'Feature1', 'Feature2'}; 724s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 724s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 724s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 724s new_X = [new_X1, double(new_X2)]; 724s Vars = 'Feature1'; 724s Labels = 1; 724s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 724s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 724s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 724s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 724s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 724s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 724s 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]; 724s assert (pd, pdm) 724s ***** error<ClassificationKNN.partialDependence: too few input arguments.> ... 724s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 724s ***** error<ClassificationKNN.partialDependence: too few input arguments.> ... 724s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 724s ***** error<ClassificationKNN.partialDependence: name-value arguments must be in pairs.> ... 724s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 724s ones (4,1), 'NumObservationsToSample') 724s ***** error<ClassificationKNN.partialDependence: name-value arguments must be in pairs.> ... 724s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 724s ones (4,1), 2) 724s ***** shared x, y, obj 724s load fisheriris 724s x = meas; 724s y = species; 724s covMatrix = cov (x); 724s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 724s 'mahalanobis', 'Cov', covMatrix); 724s ***** test 724s CVMdl = crossval (obj); 724s assert (class (CVMdl), "ClassificationPartitionedModel") 724s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 724s assert (CVMdl.KFold == 10) 724s assert (CVMdl.ModelParameters.NumNeighbors == 5) 724s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 724s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 724s assert (!CVMdl.ModelParameters.Standardize) 725s ***** test 725s CVMdl = crossval (obj, "KFold", 5); 725s assert (class (CVMdl), "ClassificationPartitionedModel") 725s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 725s assert (CVMdl.KFold == 5) 725s assert (CVMdl.ModelParameters.NumNeighbors == 5) 725s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 725s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 725s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 725s ***** test 725s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 725s CVMdl = crossval (obj, "HoldOut", 0.2); 725s assert (class (CVMdl), "ClassificationPartitionedModel") 725s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 725s assert (CVMdl.ModelParameters.NumNeighbors == 5) 725s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 725s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 725s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 725s ***** test 725s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 725s CVMdl = crossval (obj, "LeaveOut", 'on'); 725s assert (class (CVMdl), "ClassificationPartitionedModel") 725s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 725s assert (CVMdl.ModelParameters.NumNeighbors == 10) 725s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 725s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 725s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 725s ***** test 725s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 725s partition = cvpartition (y, 'KFold', 3); 725s CVMdl = crossval (obj, 'cvPartition', partition); 725s assert (class (CVMdl), "ClassificationPartitionedModel") 725s assert (CVMdl.KFold == 3) 725s assert (CVMdl.ModelParameters.NumNeighbors == 10) 725s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 725s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 725s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 725s ***** error<ClassificationKNN.crossval: Name-Value arguments must be in pairs.> ... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 725s ***** error<ClassificationKNN.crossval: specify only one of the optional Name-Value paired arguments.>... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 725s ***** error<ClassificationKNN.crossval: 'KFold' must be an integer value greater than 1.> ... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 725s ***** error<ClassificationKNN.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 725s ***** error<ClassificationKNN.crossval: 'Leaveout' must be either 'on' or 'off'.> ... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 725s ***** error<ClassificationKNN.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 725s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 725s 162 tests, 162 passed, 0 known failure, 0 skipped 725s [inst/Classification/ClassificationGAM.m] 725s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationGAM.m 725s ***** demo 725s ## Train a GAM classifier for binary classification 725s ## using specific data and plot the decision boundaries. 725s 725s ## Define specific data 725s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 725s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 725s Y = [0; 0; 0; 0; 0; ... 725s 1; 1; 1; 1; 1]; 725s 725s ## Train the GAM model 725s obj = fitcgam (X, Y, "Interactions", "all") 725s 725s ## Create a grid of values for prediction 725s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 725s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 725s [x1G, x2G] = meshgrid (x1, x2); 725s XGrid = [x1G(:), x2G(:)]; 725s [labels, score] = predict (obj, XGrid); 725s ***** test 725s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 725s y = [0; 0; 1; 1]; 725s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 725s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 725s assert (class (a), "ClassificationGAM"); 725s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 725s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 725s assert (a.ClassNames, {'0'; '1'}) 725s assert (a.PredictorNames, PredictorNames) 725s assert (a.BaseModel.Intercept, 0) 727s ***** test 727s load fisheriris 727s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 727s X = meas(inds, :); 727s Y = species(inds, :)'; 727s Y = strcmp (Y, 'virginica')'; 727s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 727s assert (class (a), "ClassificationGAM"); 727s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 727s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 727s assert (a.ClassNames, {'0'; '1'}) 727s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 727s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 727s assert (a.ModelwInt.Intercept, 0) 732s ***** test 732s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 732s Y = [0; 1; 0; 1; 1]; 732s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 732s assert (class (a), "ClassificationGAM"); 732s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 732s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 732s assert (a.ClassNames, {'0'; '1'}) 732s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 732s assert (a.Knots, [4, 4, 4]) 732s assert (a.Order, [3, 3, 3]) 732s assert (a.DoF, [7, 7, 7]) 732s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 733s ***** error<ClassificationGAM: too few input arguments.> ClassificationGAM () 733s ***** error<ClassificationGAM: too few input arguments.> ... 733s ClassificationGAM (ones(4, 1)) 733s ***** error<ClassificationGAM: number of rows in X and Y must be equal.> ... 733s ClassificationGAM (ones (4,2), ones (1,4)) 733s ***** error<ClassificationGAM: 'PredictorNames' must be supplied as a cellstring array.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 733s ***** error<ClassificationGAM: 'PredictorNames' must be supplied as a cellstring array.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 733s ***** error<ClassificationGAM: 'PredictorNames' must equal the number of columns in X.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 733s ***** error<ClassificationGAM: 'ResponseName' must be a character vector.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 733s ***** error<ClassificationGAM: 'ResponseName' must be a character vector.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 733s ***** error<ClassificationGAM: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 733s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 733s ***** error<ClassificationGAM: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 733s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 733s ***** error<ClassificationGAM: not all 'ClassNames' are present in Y.> ... 733s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 733s ***** error<ClassificationGAM: not all 'ClassNames' are present in Y.> ... 733s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 733s ***** error<ClassificationGAM: not all 'ClassNames' are present in Y.> ... 733s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 733s ***** error<ClassificationGAM: 'Cost' must be a numeric square matrix.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 733s ***** error<ClassificationGAM: 'Cost' must be a numeric square matrix.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 733s ***** error<ClassificationGAM: 'Cost' must be a numeric square matrix.> ... 733s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 733s ***** test 733s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 733s y = [1; 0; 1; 0; 1]; 733s a = ClassificationGAM (x, y, "interactions", "all"); 733s l = {'0'; '0'; '0'; '0'; '0'}; 733s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 733s 0.4259, 0.5741; 0.3760, 0.6240]; 733s [labels, scores] = predict (a, x); 733s assert (class (a), "ClassificationGAM"); 733s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 733s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 733s assert (a.ClassNames, {'1'; '0'}) 733s assert (a.PredictorNames, {'x1', 'x2'}) 733s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 733s assert (labels, l) 733s assert (scores, s, 1e-1) 735s ***** test 735s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 735s y = [0; 0; 1; 1]; 735s interactions = [false, true, false; true, false, true; false, true, false]; 735s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 735s [label, score] = predict (a, x, "includeinteractions", true); 735s l = {'0'; '0'; '1'; '1'}; 735s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 735s assert (class (a), "ClassificationGAM"); 735s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 735s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 735s assert (a.ClassNames, {'0'; '1'}) 735s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 735s assert (a.ModelwInt.Intercept, 0) 735s assert (label, l) 735s assert (score, s, 1e-1) 740s ***** error<ClassificationGAM.predict: too few input arguments.> ... 740s predict (ClassificationGAM (ones (4,2), ones (4,1))) 740s ***** error<ClassificationGAM.predict: XC is empty.> ... 740s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 741s ***** error<ClassificationGAM.predict: XC must have the same number of predictors as the trained model.> ... 741s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 742s ***** shared x, y, obj 742s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 742s y = [0; 0; 1; 1]; 742s obj = fitcgam (x, y); 744s ***** test 744s CVMdl = crossval (obj); 744s assert (class (CVMdl), "ClassificationPartitionedModel") 744s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 744s assert (CVMdl.KFold == 10) 744s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 744s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 758s ***** test 758s CVMdl = crossval (obj, "KFold", 5); 758s assert (class (CVMdl), "ClassificationPartitionedModel") 758s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 758s assert (CVMdl.KFold == 5) 758s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 758s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 765s ***** test 765s CVMdl = crossval (obj, "HoldOut", 0.2); 765s assert (class (CVMdl), "ClassificationPartitionedModel") 765s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 765s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 765s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 766s ***** test 766s partition = cvpartition (y, 'KFold', 3); 766s CVMdl = crossval (obj, 'cvPartition', partition); 766s assert (class (CVMdl), "ClassificationPartitionedModel") 766s assert (CVMdl.KFold == 3) 766s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 766s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 771s ***** error<ClassificationGAM.crossval: Name-Value arguments must be in pairs.> ... 771s crossval (obj, "kfold") 771s ***** error<ClassificationGAM.crossval: specify only one of the optional Name-Value paired arguments.>... 771s crossval (obj, "kfold", 12, "holdout", 0.2) 771s ***** error<ClassificationGAM.crossval: 'KFold' must be an integer value greater than 1.> ... 771s crossval (obj, "kfold", 'a') 771s ***** error<ClassificationGAM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 771s crossval (obj, "holdout", 2) 771s ***** error<ClassificationGAM.crossval: 'Leaveout' must be either 'on' or 'off'.> ... 771s crossval (obj, "leaveout", 1) 771s ***** error<ClassificationGAM.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 771s crossval (obj, "cvpartition", 1) 771s 34 tests, 34 passed, 0 known failure, 0 skipped 771s [inst/Classification/ClassificationPartitionedModel.m] 771s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationPartitionedModel.m 771s ***** demo 771s 771s load fisheriris 771s x = meas; 771s y = species; 771s 771s ## Create a KNN classifier model 771s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 771s 771s ## Create a partition for 5-fold cross-validation 771s partition = cvpartition (y, "KFold", 5); 771s 771s ## Create the ClassificationPartitionedModel object 771s cvModel = crossval (obj, 'cvPartition', partition) 771s ***** demo 771s 771s load fisheriris 771s x = meas; 771s y = species; 771s 771s ## Create a KNN classifier model 771s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 771s 771s ## Create the ClassificationPartitionedModel object 771s cvModel = crossval (obj); 771s 771s ## Predict the class labels for the observations not used for training 771s [label, score, cost] = kfoldPredict (cvModel); 771s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 771s sum (strcmp (label, y)) / numel (y) *100, ... 771s sum (strcmp (label, y)), numel (y)) 771s ***** test 771s load fisheriris 771s a = fitcdiscr (meas, species, "gamma", 0.3); 771s cvModel = crossval (a, "KFold", 5); 771s assert (class (cvModel), "ClassificationPartitionedModel"); 771s assert (cvModel.NumObservations, 150); 771s assert (numel (cvModel.Trained), 5); 771s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 771s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 771s assert (cvModel.KFold, 5); 771s ***** test 771s load fisheriris 771s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 771s cvModel = crossval (a, "HoldOut", 0.3); 771s assert (class (cvModel), "ClassificationPartitionedModel"); 771s assert ({cvModel.X, cvModel.Y}, {meas, species}); 771s assert (cvModel.NumObservations, 150); 771s assert (numel (cvModel.Trained), 1); 771s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 771s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 771s ***** test 771s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 771s y = ["a"; "a"; "b"; "b"]; 771s a = fitcgam (x, y, "Interactions", "all"); 771s cvModel = crossval (a, "KFold", 5); 771s assert (class (cvModel), "ClassificationPartitionedModel"); 771s assert (cvModel.NumObservations, 4); 771s assert (numel (cvModel.Trained), 5); 771s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 771s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 771s assert (cvModel.KFold, 5); 799s ***** test 799s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 799s y = ["a"; "a"; "b"; "b"]; 799s a = fitcgam (x, y); 799s cvModel = crossval (a, "LeaveOut", "on"); 799s assert (class (cvModel), "ClassificationPartitionedModel"); 799s assert ({cvModel.X, cvModel.Y}, {x, y}); 799s assert (cvModel.NumObservations, 4); 799s assert (numel (cvModel.Trained), 4); 799s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 799s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 806s ***** test 806s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 806s y = ["a"; "a"; "b"; "b"]; 806s a = fitcknn (x, y); 806s partition = cvpartition (y, "KFold", 5); 806s cvModel = ClassificationPartitionedModel (a, partition); 806s assert (class (cvModel), "ClassificationPartitionedModel"); 806s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 806s assert (cvModel.NumObservations, 4); 806s assert (cvModel.ModelParameters.NumNeighbors, 1); 806s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 806s assert (cvModel.ModelParameters.Distance, "euclidean"); 806s assert (! cvModel.ModelParameters.Standardize); 806s ***** test 806s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 806s y = ["a"; "a"; "b"; "b"]; 806s a = fitcknn (x, y, "NSMethod", "exhaustive"); 806s partition = cvpartition (y, "HoldOut", 0.2); 806s cvModel = ClassificationPartitionedModel (a, partition); 806s assert (class (cvModel), "ClassificationPartitionedModel"); 806s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 806s assert ({cvModel.X, cvModel.Y}, {x, y}); 806s assert (cvModel.NumObservations, 4); 806s assert (cvModel.ModelParameters.NumNeighbors, 1); 806s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 806s assert (cvModel.ModelParameters.Distance, "euclidean"); 806s assert (! cvModel.ModelParameters.Standardize); 806s ***** test 806s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 806s y = ["a"; "a"; "b"; "b"]; 806s k = 3; 806s a = fitcknn (x, y, "NumNeighbors" ,k); 806s partition = cvpartition (y, "LeaveOut"); 806s cvModel = ClassificationPartitionedModel (a, partition); 806s assert (class (cvModel), "ClassificationPartitionedModel"); 806s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 806s assert ({cvModel.X, cvModel.Y}, {x, y}); 806s assert (cvModel.NumObservations, 4); 806s assert (cvModel.ModelParameters.NumNeighbors, k); 806s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 806s assert (cvModel.ModelParameters.Distance, "euclidean"); 806s assert (! cvModel.ModelParameters.Standardize); 806s ***** test 806s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 806s y = {"a"; "a"; "b"; "b"}; 806s a = fitcnet (x, y, "IterationLimit", 50); 806s cvModel = crossval (a, "KFold", 5); 806s assert (class (cvModel), "ClassificationPartitionedModel"); 806s assert (cvModel.NumObservations, 4); 806s assert (numel (cvModel.Trained), 5); 806s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 806s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 806s assert (cvModel.KFold, 5); 806s ***** test 806s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 806s y = {"a"; "a"; "b"; "b"}; 806s a = fitcnet (x, y, "LayerSizes", [5, 3]); 806s cvModel = crossval (a, "LeaveOut", "on"); 806s assert (class (cvModel), "ClassificationPartitionedModel"); 806s assert ({cvModel.X, cvModel.Y}, {x, y}); 806s assert (cvModel.NumObservations, 4); 806s assert (numel (cvModel.Trained), 4); 806s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 806s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 806s ***** test 806s load fisheriris 806s inds = ! strcmp (species, 'setosa'); 806s x = meas(inds, 3:4); 806s y = grp2idx (species(inds)); 806s SVMModel = fitcsvm (x,y); 806s CVMdl = crossval (SVMModel, "KFold", 5); 806s assert (class (CVMdl), "ClassificationPartitionedModel") 806s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 806s assert (CVMdl.KFold == 5) 806s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 806s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 806s ***** test 806s load fisheriris 806s inds = ! strcmp (species, 'setosa'); 806s x = meas(inds, 3:4); 806s y = grp2idx (species(inds)); 806s obj = fitcsvm (x, y); 806s CVMdl = crossval (obj, "HoldOut", 0.2); 806s assert (class (CVMdl), "ClassificationPartitionedModel") 806s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 806s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 806s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 806s ***** test 806s load fisheriris 806s inds = ! strcmp (species, 'setosa'); 806s x = meas(inds, 3:4); 806s y = grp2idx (species(inds)); 806s obj = fitcsvm (x, y); 806s CVMdl = crossval (obj, "LeaveOut", 'on'); 806s assert (class (CVMdl), "ClassificationPartitionedModel") 806s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 806s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 806s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 807s ***** error<ClassificationPartitionedModel: too few input arguments.> ... 807s ClassificationPartitionedModel () 807s ***** error<ClassificationPartitionedModel: too few input arguments.> ... 807s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 807s ***** error<ClassificationPartitionedModel: unsupported model type.> ... 807s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 807s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 807s ***** error<ClassificationPartitionedModel: invalid 'cvpartition' object.> ... 807s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 807s ones (4,1)), 'Holdout') 807s ***** test 807s load fisheriris 807s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 807s cvModel = crossval (a, "Kfold", 4); 807s [label, score, cost] = kfoldPredict (cvModel); 807s assert (class(cvModel), "ClassificationPartitionedModel"); 807s assert ({cvModel.X, cvModel.Y}, {meas, species}); 807s assert (cvModel.NumObservations, 150); 807s ***** # assert (label, {"b"; "b"; "a"; "a"}); 807s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 807s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 807s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 807s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 807s ***** test 807s x = ones(4, 11); 807s y = {"a"; "a"; "b"; "b"}; 807s k = 3; 807s a = fitcknn (x, y, "NumNeighbors", k); 807s partition = cvpartition (y, "LeaveOut"); 807s cvModel = ClassificationPartitionedModel (a, partition); 807s [label, score, cost] = kfoldPredict (cvModel); 807s assert (class(cvModel), "ClassificationPartitionedModel"); 807s assert ({cvModel.X, cvModel.Y}, {x, y}); 807s assert (cvModel.NumObservations, 4); 807s assert (cvModel.ModelParameters.NumNeighbors, k); 807s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 807s assert (cvModel.ModelParameters.Distance, "euclidean"); 807s assert (! cvModel.ModelParameters.Standardize); 807s assert (label, {"b"; "b"; "a"; "a"}); 807s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 807s 0.6667, 0.3333], 1e-4); 807s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 807s 0.3333, 0.6667], 1e-4); 807s ***** error<ClassificationPartitionedModel.kfoldPredict: 'Cost' output is not supported for ClassificationSVM cross validated models.> ... 807s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 808s ***** error<ClassificationPartitionedModel.kfoldPredict: 'Cost' output is not supported for ClassificationNeuralNetwork cross validated models.> ... 808s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 810s 20 tests, 20 passed, 0 known failure, 0 skipped 810s [inst/Classification/ClassificationSVM.m] 810s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/Classification/ClassificationSVM.m 810s ***** demo 810s ## Create a Support Vector Machine classifier and determine margin for test 810s ## data. 810s load fisheriris 810s rng(1); ## For reproducibility 810s 810s ## Select indices of the non-setosa species 810s inds = !strcmp(species, 'setosa'); 810s 810s ## Select features and labels for non-setosa species 810s X = meas(inds, 3:4); 810s Y = grp2idx(species(inds)); 810s 810s ## Convert labels to +1 and -1 810s unique_classes = unique(Y); 810s Y(Y == unique_classes(1)) = -1; 810s Y(Y == unique_classes(2)) = 1; 810s 810s ## Partition data for training and testing 810s cv = cvpartition(Y, 'HoldOut', 0.15); 810s X_train = X(training(cv), :); 810s Y_train = Y(training(cv)); 810s X_test = X(test(cv), :); 810s Y_test = Y(test(cv)); 810s 810s ## Train the SVM model 810s CVSVMModel = fitcsvm(X_train, Y_train); 810s 810s ## Calculate margins 810s m = margin(CVSVMModel, X_test, Y_test); 810s disp(m); 810s ***** demo 810s ## Create a Support Vector Machine classifier and determine loss for test 810s ## data. 810s load fisheriris 810s rng(1); ## For reproducibility 810s 810s ## Select indices of the non-setosa species 810s inds = !strcmp(species, 'setosa'); 810s 810s ## Select features and labels for non-setosa species 810s X = meas(inds, 3:4); 810s Y = grp2idx(species(inds)); 810s 810s ## Convert labels to +1 and -1 810s unique_classes = unique(Y); 810s Y(Y == unique_classes(1)) = -1; 810s Y(Y == unique_classes(2)) = 1; 810s 810s ## Randomly partition the data into training and testing sets 810s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 810s 810s X_train = X(training(cv), :); 810s Y_train = Y(training(cv)); 810s 810s X_test = X(test(cv), :); 810s Y_test = Y(test(cv)); 810s 810s ## Train the SVM model 810s SVMModel = fitcsvm(X_train, Y_train); 810s 810s ## Calculate loss 810s 810s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 810s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 810s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 810s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 810s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 810s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 810s ***** test 810s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 810s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 810s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 810s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 810s assert (class (a), "ClassificationSVM"); 810s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 810s assert ({a.X, a.Y}, {x, y}) 810s assert (a.NumObservations, 5) 810s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 810s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 810s ***** test 810s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 810s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 810s a = ClassificationSVM (x, y); 810s assert (class (a), "ClassificationSVM"); 810s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 810s assert (a.ModelParameters.BoxConstraint, 1) 810s assert (a.ClassNames, [1; -1]) 810s assert (a.ModelParameters.KernelOffset, 0) 810s ***** test 810s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 810s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 810s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 810s "KernelOffset", 2); 810s assert (class (a), "ClassificationSVM"); 810s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 810s assert (a.ModelParameters.BoxConstraint, 2) 810s assert (a.ModelParameters.KernelOffset, 2) 810s ***** test 810s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 810s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 810s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 810s "PolynomialOrder", 3); 810s assert (class (a), "ClassificationSVM"); 810s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 810s assert (a.ModelParameters.PolynomialOrder, 3) 810s ***** error<ClassificationSVM: too few input arguments.> ClassificationSVM () 810s ***** error<ClassificationSVM: too few input arguments.> ... 810s ClassificationSVM (ones(10,2)) 810s ***** error<ClassificationSVM: number of rows in X and Y must be equal.> ... 810s ClassificationSVM (ones(10,2), ones (5,1)) 810s ***** error<ClassificationSVM: 'Standardize' must be either true or false.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 810s ***** error<ClassificationSVM: 'PredictorNames' must be supplied as a cellstring array.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 810s ***** error<ClassificationSVM: 'PredictorNames' must have the same number of columns as X.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 810s ***** error<ClassificationSVM: 'ResponseName' must be a character vector.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 810s ***** error<ClassificationSVM: 'ResponseName' must be a character vector.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 810s ***** error<ClassificationSVM: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 810s ***** error<ClassificationSVM: 'ClassNames' must be a cellstring, logical or numeric vector.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 810s ***** error<ClassificationSVM: not all 'ClassNames' are present in Y.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 810s ***** error<ClassificationSVM: not all 'ClassNames' are present in Y.> ... 810s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 810s ***** error<ClassificationSVM: not all 'ClassNames' are present in Y.> ... 810s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 810s ***** error<ClassificationSVM: 'Prior' must be either a numeric vector or a character vector.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 810s ***** error<ClassificationSVM: 'Prior' must be either a numeric vector or a character vector.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 810s ***** error<ClassificationSVM: 'Cost' must be a numeric square matrix.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 810s ***** error<ClassificationSVM: 'Cost' must be a numeric square matrix.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 810s ***** error<ClassificationSVM: 'Cost' must be a numeric square matrix.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 810s ***** error<ClassificationSVM: 'SVMtype' must be 'c_svc', 'nu_svc', or 'one_class_svm'.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 810s ***** error<ClassificationSVM: 'SVMtype' must be 'c_svc', 'nu_svc', or 'one_class_svm'.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 810s ***** error<ClassificationSVM: 'OutlierFraction' must be a positive scalar in the range 0 =< OutlierFraction < 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 810s ***** error<ClassificationSVM: 'KernelFunction' must be a character vector.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 810s ***** error<ClassificationSVM: unsupported Kernel function.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 810s ***** error<ClassificationSVM: 'PolynomialOrder' must be a positive integer.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 810s ***** error<ClassificationSVM: 'PolynomialOrder' must be a positive integer.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 810s ***** error<ClassificationSVM: 'PolynomialOrder' must be a positive integer.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 810s ***** error<ClassificationSVM: 'KernelScale' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 810s ***** error<ClassificationSVM: 'KernelScale' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 810s ***** error<ClassificationSVM: 'KernelScale' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 810s ***** error<ClassificationSVM: 'KernelScale' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 810s ***** error<ClassificationSVM: 'KernelOffset' must be a non-negative scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 810s ***** error<ClassificationSVM: 'KernelOffset' must be a non-negative scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 810s ***** error<ClassificationSVM: 'BoxConstraint' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 810s ***** error<ClassificationSVM: 'BoxConstraint' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 810s ***** error<ClassificationSVM: 'BoxConstraint' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 810s ***** error<ClassificationSVM: 'BoxConstraint' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 810s ***** error<ClassificationSVM: 'Nu' must be a positive scalar in the range 0 < Nu <= 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 810s ***** error<ClassificationSVM: 'Nu' must be a positive scalar in the range 0 < Nu <= 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 810s ***** error<ClassificationSVM: 'Nu' must be a positive scalar in the range 0 < Nu <= 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 810s ***** error<ClassificationSVM: 'CacheSize' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 810s ***** error<ClassificationSVM: 'CacheSize' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 810s ***** error<ClassificationSVM: 'Tolerance' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 810s ***** error<ClassificationSVM: 'Tolerance' must be a positive scalar.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 810s ***** error<ClassificationSVM: 'Shrinking' must be either 0 or 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 810s ***** error<ClassificationSVM: 'Shrinking' must be either 0 or 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 810s ***** error<ClassificationSVM: 'Shrinking' must be either 0 or 1.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 810s ***** error<ClassificationSVM: invalid parameter name in optional pair arguments.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 810s ***** error<ClassificationSVM: cannot train a binary problem with only one class available.> ... 810s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 810s ***** error<ClassificationSVM: can only be used for one-class or two-class learning.> ... 810s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 810s ***** error<ClassificationSVM: invalid values in X.> ... 810s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 810s ***** error<ClassificationSVM: the elements in 'Prior' do not correspond to selected classes in Y.> ... 810s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 810s ***** error<ClassificationSVM: the elements in 'Prior' do not correspond to selected classes in Y.> ... 810s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 810s ***** error<ClassificationSVM: the number of rows and columns in 'Cost' must correspond to the selected classes in Y.> ... 810s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 810s ***** shared x, y, x_train, x_test, y_train, y_test, objST 810s load fisheriris 810s inds = ! strcmp (species, 'setosa'); 810s x = meas(inds, 3:4); 810s y = grp2idx (species(inds)); 810s ***** test 810s xc = [min(x); mean(x); max(x)]; 810s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 810s assert (isempty (obj.Alpha), true) 810s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 810s [label, score] = predict (obj, xc); 810s assert (label, [1; 2; 2]); 810s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 810s assert (score(:,1), -score(:,2), eps) 810s obj = fitPosterior (obj); 810s [label, probs] = predict (obj, xc); 810s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 2e-5); 810s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 811s ***** test 811s obj = fitcsvm (x, y); 811s assert (isempty (obj.Beta), true) 811s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 811s assert (numel (obj.Alpha), 24) 811s assert (obj.Bias, -14.415, 1e-3) 811s xc = [min(x); mean(x); max(x)]; 811s label = predict (obj, xc); 811s assert (label, [1; 2; 2]); 811s ***** error<ClassificationSVM.predict: too few input arguments.> ... 811s predict (ClassificationSVM (ones (40,2), ones (40,1))) 811s ***** error<ClassificationSVM.predict: XC is empty.> ... 811s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 811s ***** error<ClassificationSVM.predict: XC must have the same number of predictors as the trained model.> ... 811s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 811s ***** test 811s objST = fitcsvm (x, y); 811s objST.ScoreTransform = "a"; 811s ***** error<ClassificationSVM.predict: 'ScoreTransform' must be a 'function_handle' object.> ... 811s [labels, scores] = predict (objST, x); 811s ***** error<ClassificationSVM.resubPredict: 'ScoreTransform' must be a 'function_handle' object.> ... 811s [labels, scores] = resubPredict (objST); 811s ***** test 811s rand ("seed", 1); 811s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 811s 'Tolerance', 1e-7); 811s obj = CVSVMModel.Trained{1}; 811s testInds = test (CVSVMModel.Partition); 811s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 811s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 811s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 811s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 811s assert (computed_margin, expected_margin, 1e-4); 811s ***** error<ClassificationSVM.margin: too few input arguments.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 811s ***** error<ClassificationSVM.margin: too few input arguments.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 811s ***** error<ClassificationSVM.margin: X is empty.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 811s ***** error<ClassificationSVM.margin: X must have the same number of predictors as the trained model.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 811s ***** error<ClassificationSVM.margin: Y is empty.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 811s ***** error<ClassificationSVM.margin: Y must have the same number of rows as X.> ... 811s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 811s ***** test 811s rand ("seed", 1); 811s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 811s obj = CVSVMModel.Trained{1}; 811s testInds = test (CVSVMModel.Partition); 811s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 811s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 811s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 811s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 811s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 811s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 811s assert (L1, 2.8711, 1e-4); 811s assert (L2, 0.5333, 1e-4); 811s assert (L3, 10.9685, 1e-4); 811s assert (L4, 1.9827, 1e-4); 811s assert (L5, 1.5849, 1e-4); 811s assert (L6, 7.6739, 1e-4); 811s ***** error<ClassificationSVM.loss: too few input arguments.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 811s ***** error<ClassificationSVM.loss: too few input arguments.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 811s ***** error<ClassificationSVM.loss: Name-Value arguments must be in pairs.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones(2,1), "LossFun") 811s ***** error<ClassificationSVM.loss: X is empty.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 811s ***** error<ClassificationSVM.loss: X must have the same number of predictors as the trained model.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 811s ***** error<ClassificationSVM.loss: Y is empty.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 811s ***** error<ClassificationSVM.loss: Y must have the same number of rows as X.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 811s ***** error<ClassificationSVM.loss: 'LossFun' must be a character vector.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "LossFun", 1) 811s ***** error<ClassificationSVM.loss: unsupported Loss function.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "LossFun", "some") 811s ***** error<ClassificationSVM.loss: 'Weights' must be a numeric vector.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "Weights", ['a','b']) 811s ***** error<ClassificationSVM.loss: 'Weights' must be a numeric vector.> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "Weights", 'a') 811s ***** error<ClassificationSVM.loss: size of 'Weights' must be equal to the number> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "Weights", [1,2,3]) 811s ***** error<ClassificationSVM.loss: size of 'Weights' must be equal to the number> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "Weights", 3) 811s ***** error<ClassificationSVM.loss: invalid parameter name in optional pair arg> ... 811s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 811s ones (2,1), "some", "some") 811s ***** error<ClassificationSVM.resubLoss: Name-Value arguments must be in pairs.> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 811s ***** error<ClassificationSVM.resubLoss: 'LossFun' must be a character vector.> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 811s ***** error<ClassificationSVM.resubLoss: unsupported Loss function.> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 811s ***** error<ClassificationSVM.resubLoss: 'Weights' must be a numeric vector.> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 811s ***** error<ClassificationSVM.resubLoss: 'Weights' must be a numeric vector.> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 811s ***** error<ClassificationSVM.resubLoss: size of 'Weights' must be equal to the n> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 811s ***** error<ClassificationSVM.resubLoss: size of 'Weights' must be equal to the n> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 811s ***** error<ClassificationSVM.resubLoss: invalid parameter name in optional pai> ... 811s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 811s ***** test 811s SVMModel = fitcsvm (x, y); 811s CVMdl = crossval (SVMModel, "KFold", 5); 811s assert (class (CVMdl), "ClassificationPartitionedModel") 811s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 811s assert (CVMdl.KFold == 5) 811s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 811s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 811s ***** test 811s obj = fitcsvm (x, y); 811s CVMdl = crossval (obj, "HoldOut", 0.2); 811s assert (class (CVMdl), "ClassificationPartitionedModel") 811s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 811s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 811s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 811s ***** test 811s obj = fitcsvm (x, y); 811s CVMdl = crossval (obj, "LeaveOut", 'on'); 811s assert (class (CVMdl), "ClassificationPartitionedModel") 811s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 811s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 811s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 812s ***** error<ClassificationSVM.crossval: Name-Value arguments must be in pairs.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 812s ***** error<ClassificationSVM.crossval: specify only one of the optional Name-Value paired arguments.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 812s "KFold", 5, "leaveout", 'on') 812s ***** error<ClassificationSVM.crossval: 'KFold' must be an integer value greater than 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 812s ***** error<ClassificationSVM.crossval: 'KFold' must be an integer value greater than 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 812s ***** error<ClassificationSVM.crossval: 'KFold' must be an integer value greater than 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 812s ***** error<ClassificationSVM.crossval: 'KFold' must be an integer value greater than 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 812s ***** error<ClassificationSVM.crossval: 'KFold' must be an integer value greater than 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 812s ***** error<ClassificationSVM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 812s ***** error<ClassificationSVM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 812s ***** error<ClassificationSVM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 812s ***** error<ClassificationSVM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 812s ***** error<ClassificationSVM.crossval: 'Holdout' must be a numeric value between 0 and 1.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 812s ***** error<ClassificationSVM.crossval: 'Leaveout' must be either 'on' or 'off'.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 812s ***** error<ClassificationSVM.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 812s ***** error<ClassificationSVM.crossval: 'CVPartition' must be a 'cvpartition' object.> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 812s ***** error<ClassificationSVM.crossval: invalid parameter name in optional paired arguments> ... 812s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 812s 114 tests, 114 passed, 0 known failure, 0 skipped 812s [inst/cluster.m] 812s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cluster.m 812s ***** error cluster () 812s ***** error <Z must be .* generated by the linkage .*> cluster ([1 1], "Cutoff", 1) 812s ***** error <unknown option .*> cluster ([1 2 1], "Bogus", 1) 812s ***** error <C must be a positive scalar .*> cluster ([1 2 1], "Cutoff", -1) 812s ***** error <unknown property .*> cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 812s ***** test 812s 6 tests, 6 passed, 0 known failure, 0 skipped 812s [inst/violin.m] 812s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/violin.m 812s ***** demo 812s clf 812s x = zeros (9e2, 10); 812s for i=1:10 812s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 812s endfor 812s h = violin (x, "color", "c"); 812s axis tight 812s set (h.violin, "linewidth", 2); 812s set (gca, "xgrid", "on"); 812s xlabel ("Variables") 812s ylabel ("Values") 812s ***** demo 812s clf 812s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 812s subplot (1,2,1) 812s title ("Grade 3 heights - vertical"); 812s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 812s violin (data, "Nbins", 10); 812s axis tight 812s 812s subplot(1,2,2) 812s title ("Grade 3 heights - horizontal"); 812s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 812s violin (data, "horizontal", "Nbins", 10); 812s axis tight 812s ***** demo 812s clf 812s data = exprnd (0.1, 500,4); 812s violin (data, "nbins", {5,10,50,100}); 812s axis ([0 5 0 max(data(:))]) 812s ***** demo 812s clf 812s data = exprnd (0.1, 500,4); 812s violin (data, "color", jet(4)); 812s axis ([0 5 0 max(data(:))]) 812s ***** demo 812s clf 812s data = repmat(exprnd (0.1, 500,1), 1, 4); 812s violin (data, "width", linspace (0.1,0.5,4)); 812s axis ([0 5 0 max(data(:))]) 812s ***** demo 812s clf 812s data = repmat(exprnd (0.1, 500,1), 1, 4); 812s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 812s axis ([0 5 0 max(data(:))]) 812s ***** test 812s hf = figure ("visible", "off"); 812s unwind_protect 812s data = exprnd (0.1, 500,4); 812s violin (data, "color", jet(4)); 812s axis ([0 5 0 max(data(:))]) 812s unwind_protect_cleanup 812s close (hf); 812s end_unwind_protect 812s ***** test 812s hf = figure ("visible", "off"); 812s unwind_protect 812s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 812s subplot (1,2,1) 812s title ("Grade 3 heights - vertical"); 812s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 812s violin (data, "Nbins", 10); 812s axis tight 812s unwind_protect_cleanup 812s close (hf); 812s end_unwind_protect 813s ***** test 813s hf = figure ("visible", "off"); 813s unwind_protect 813s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 813s subplot (1,2,1) 813s title ("Grade 3 heights - vertical"); 813s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 813s violin (data, "Nbins", 10); 813s axis tight 813s subplot(1,2,2) 813s title ("Grade 3 heights - horizontal"); 813s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 813s violin (data, "horizontal", "Nbins", 10); 813s axis tight 813s unwind_protect_cleanup 813s close (hf); 813s end_unwind_protect 813s ***** test 813s hf = figure ("visible", "off"); 813s unwind_protect 813s data = repmat(exprnd (0.1, 500,1), 1, 4); 813s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 813s axis ([0 5 0 max(data(:))]) 813s unwind_protect_cleanup 813s close (hf); 813s end_unwind_protect 813s ***** test 813s hf = figure ("visible", "off"); 813s unwind_protect 813s data = repmat(exprnd (0.1, 500,1), 1, 4); 813s violin (data, "width", linspace (0.1,0.5,4)); 813s axis ([0 5 0 max(data(:))]) 813s unwind_protect_cleanup 813s close (hf); 813s end_unwind_protect 814s 5 tests, 5 passed, 0 known failure, 0 skipped 814s [inst/manova1.m] 814s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/manova1.m 814s ***** demo 814s load carbig 814s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 814s ***** test 814s load carbig 814s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 814s assert (d, 3); 814s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 814s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 814s ***** test 814s load carbig 814s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 814s assert (d, 2); 814s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 814s [1e-12, 1e-12, 1e-12]'); 814s 2 tests, 2 passed, 0 known failure, 0 skipped 814s [inst/fitgmdist.m] 814s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitgmdist.m 814s ***** demo 814s ## Generate a two-cluster problem 814s C1 = randn (100, 2) + 2; 814s C2 = randn (100, 2) - 2; 814s data = [C1; C2]; 814s 814s ## Perform clustering 814s GMModel = fitgmdist (data, 2); 814s 814s ## Plot the result 814s figure 814s [heights, bins] = hist3([C1; C2]); 814s [xx, yy] = meshgrid(bins{1}, bins{2}); 814s bbins = [xx(:), yy(:)]; 814s contour (reshape (GMModel.pdf (bbins), size (heights))); 814s ***** demo 814s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 814s nbOrientations = 2; 814s initial_orientations = [38.0; 18.0]; 814s initial_weights = ones (1, nbOrientations) / nbOrientations; 814s initial_Sigma = 10 * ones (1, 1, nbOrientations); 814s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 814s "ComponentProportion", initial_weights); 814s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 814s "RegularizationValue", 0.0001) 814s ***** test 814s load fisheriris 814s classes = unique (species); 814s [~, score] = pca (meas, "NumComponents", 2); 814s options.MaxIter = 1000; 814s options.TolFun = 1e-6; 814s options.Display = "off"; 814s GMModel = fitgmdist (score, 2, "Options", options); 814s assert (isa (GMModel, "gmdistribution"), true); 814s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 814s 1 test, 1 passed, 0 known failure, 0 skipped 814s [inst/einstein.m] 814s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/einstein.m 814s ***** demo 814s einstein (0.4, 0.6) 814s ***** demo 814s einstein (0.2, 0.5) 814s ***** demo 814s einstein (0.6, 0.1) 814s ***** test 814s hf = figure ("visible", "off"); 814s unwind_protect 814s tiles = einstein (0.4, 0.6); 814s assert (isstruct (tiles), true); 814s unwind_protect_cleanup 814s close (hf); 814s end_unwind_protect 814s ***** error<Invalid call to einstein. Correct usage is> einstein 814s ***** error<Invalid call to einstein. Correct usage is> einstein (0.5) 814s ***** error<einstein: A and B must be within the open interval> einstein (0, 0.9) 814s ***** error<einstein: A and B must be within the open interval> einstein (0.4, 1) 814s ***** error<einstein: A and B must be within the open interval> einstein (-0.4, 1) 814s 6 tests, 6 passed, 0 known failure, 0 skipped 814s [inst/harmmean.m] 814s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/harmmean.m 814s ***** test 814s x = [0:10]; 814s y = [x;x+5;x+10]; 814s assert (harmmean (x), 0); 814s m = [0 8.907635160795225 14.30854471766802]; 814s assert (harmmean (y, 2), m', 4e-14); 814s assert (harmmean (y, "all"), 0); 814s y(2,4) = NaN; 814s m(2) = 9.009855936313949; 814s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 814s assert (harmmean (y', "omitnan"), m, 4e-14); 814s z = y + 20; 814s assert (harmmean (z, "all"), NaN); 814s assert (harmmean (z, "all", "includenan"), NaN); 814s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 814s m = [24.59488458841874 NaN 34.71244385944397]; 814s assert (harmmean (z'), m, 4e-14); 814s assert (harmmean (z', "includenan"), m, 4e-14); 814s m(2) = 29.84104075528277; 814s assert (harmmean (z', "omitnan"), m, 4e-14); 814s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 814s ***** test 814s x = repmat ([1:20;6:25], [5 2 6 3]); 814s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 814s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 814s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 814s assert (size (harmmean (x, [1 4 3])), [1 40]); 814s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 814s ***** test 814s x = repmat ([1:20;6:25], [5 2 6 3]); 814s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 814s assert (harmmean (x, [3 2]), m, 4e-14); 814s x(2,5,6,3) = NaN; 814s m(2,3) = NaN; 814s assert (harmmean (x, [3 2]), m, 4e-14); 814s m(2,3) = 13.06617961315406; 814s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 814s ***** error <harmmean: X must contain real nonnegative values.> harmmean ("char") 814s ***** error <harmmean: X must contain real nonnegative values.> harmmean ([1 -1 3]) 814s ***** error <harmmean: DIM must be a positive integer scalar or vector.> ... 814s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 814s ***** error <harmmean: DIM must be a positive integer scalar or vector.> ... 814s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 814s ***** error <harmmean: VECDIM must contain non-repeating positive integers.> ... 814s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 814s 8 tests, 8 passed, 0 known failure, 0 skipped 814s [inst/chi2test.m] 814s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/chi2test.m 814s ***** error chi2test (); 815s ***** error chi2test ([1, 2, 3, 4, 5]); 815s ***** error chi2test ([1, 2; 2, 1+3i]); 815s ***** error chi2test ([NaN, 6; 34, 12]); 815s ***** error<chi2test: optional arguments are not supported for 2-way> ... 815s p = chi2test (ones (3, 3), "mutual", []); 815s ***** error<chi2test: invalid model name for testing a 3-way table.> ... 815s p = chi2test (ones (3, 3, 3), "testtype", 2); 815s ***** error<chi2test: optional arguments must be in pairs.> ... 815s p = chi2test (ones (3, 3, 3), "mutual"); 815s ***** error<chi2test: value must be numeric in optional argument> ... 815s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 815s ***** error<chi2test: value must be empty or scalar in optional argument> ... 815s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 815s ***** error<chi2test: optional arguments are not supported for k> ... 815s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 815s ***** warning<chi2test: Expected values less than 5.> p = chi2test (ones (2)); 815s ***** warning<chi2test: Expected values less than 5.> p = chi2test (ones (3, 2)); 815s ***** warning<chi2test: Expected values less than 1.> p = chi2test (0.4 * ones (3)); 815s ***** test 815s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 815s p = chi2test (x); 815s assert (p, 0.017787, 1e-6); 815s ***** test 815s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 815s [p, chisq] = chi2test (x); 815s assert (chisq, 11.9421, 1e-4); 815s ***** test 815s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 815s [p, chisq, df] = chi2test (x); 815s assert (df, 4); 815s ***** test 815s ***** shared x 815s x(:,:,1) = [59, 32; 9,16]; 815s x(:,:,2) = [55, 24;12,33]; 815s x(:,:,3) = [107,80;17,56];%! 815s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 815s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 815s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 815s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 815s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 815s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 815s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 815s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 815s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 815s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 815s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 815s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 815s ***** test 815s [pval, chisq, df, E] = chi2test (x); 815s assert (chisq, 64.0982, 1e-4); 815s assert (df, 7); 815s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 815s ***** test 815s [pval, chisq, df, E] = chi2test (x, "joint", 2); 815s assert (chisq, 56.0943, 1e-4); 815s assert (df, 5); 815s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 815s ***** test 815s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 815s assert (chisq, 146.6058, 1e-4); 815s assert (df, 9); 815s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 815s ***** test 815s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 815s assert (chisq, 52.2509, 1e-4); 815s assert (df, 3); 815s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 815s ***** test 815s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 815s assert (chisq, 1.6034, 1e-4); 815s assert (df, 2); 815s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 815s 34 tests, 34 passed, 0 known failure, 0 skipped 815s [inst/squareform.m] 815s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/squareform.m 815s ***** shared v, m 815s v = 1:6; 815s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 815s ***** assert (squareform (v), m) 815s ***** assert (squareform (squareform (v)), v) 815s ***** assert (squareform (m), v) 815s ***** assert (squareform (v'), m) 815s ***** assert (squareform (1), [0 1;1 0]) 815s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 815s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 815s ***** warning <not a symmetric matrix> squareform ([0 1 2; 3 0 4; 5 6 0]); 815s ***** test 815s for c = {@single, @double, @uint8, @uint32, @uint64} 815s f = c{1}; 815s assert (squareform (f (v)), f (m)) 815s assert (squareform (f (m)), f (v)) 815s endfor 815s 9 tests, 9 passed, 0 known failure, 0 skipped 815s [inst/confusionmat.m] 815s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/confusionmat.m 815s ***** test 815s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 815s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 815s 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; ... 815s 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]; 815s assert (confusionmat (Yt, Yp), C) 815s 1 test, 1 passed, 0 known failure, 0 skipped 815s [inst/shadow9/var.m] 815s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/shadow9/var.m 815s ***** assert (var (13), 0) 815s ***** assert (var (single (13)), single (0)) 815s ***** assert (var ([1,2,3]), 1) 815s ***** assert (var ([1,2,3], 1), 2/3, eps) 815s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 815s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 815s ***** assert (var (5, 99), 0) 815s ***** assert (var (5, 99, 1), 0) 815s ***** assert (var (5, 99, 2), 0) 815s ***** assert (var ([5 3], [99 99], 2), 1) 815s ***** assert (var ([1:7], [1:7]), 3) 815s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 815s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 815s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 815s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 815s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 815s ***** test 815s x = [-10:10]; 815s y = [x;x+5;x-5]; 815s assert (var (x), 38.5); 815s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 815s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 815s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 815s assert (var (y, "all"), 54.19354838709678, 1e-14); 815s y(2,4) = NaN; 815s assert (var (y, "all"), NaN); 815s assert (var (y, "all", "includenan"), NaN); 815s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 815s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 815s assert (var (y, [], 2), [38.5; NaN; 38.5]); 815s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 815s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 815s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 815s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 815s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 815s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 815s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 815s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 815s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 815s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 815s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 815s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 815s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 815s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 815s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 815s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 815s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 815s 60 * ones(1,1,2)) 815s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 815s 6 * ones(1,3,2)) 815s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 815s ***** test 815s x = reshape(1:18, [3 3 2]); 815s x([2, 14]) = NaN; 815s w = ones (3,3,2); 815s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 815s ***** test 815s x = reshape(1:18, [3 3 2]); 815s w = ones (3,3,2); 815s w([2, 14]) = NaN; 815s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 815s ***** assert (var ([1 2 3], "aLl"), 1); 815s ***** assert (var ([1 2 3], "OmitNan"), 1); 815s ***** assert (var ([1 2 3], "IncludeNan"), 1); 815s ***** test 815s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 815s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 815s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 815s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 815s assert (size (var (x, 0, [1 4 3])), [1, 40]); 815s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 815s ***** assert (var (3*magic(3)), [63 144 63]) 815s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 815s ***** assert (var (3*magic(3), 1), [42 96 42]) 815s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 815s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 815s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 815s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 815s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 815s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 815s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 815s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 815s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 815s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 815s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 815s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 815s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 815s ***** test 815s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 815s v = repmat (33.38912133891213, [10, 1, 1, 3]); 815s assert (var (x, 0, [3, 2]), v, 1e-14); 815s v = repmat (33.250, [10, 1, 1, 3]); 815s assert (var (x, 1, [3, 2]), v, 1e-14); 815s x(2,5,6,3) = NaN; 815s v(2,1,1,3) = NaN; 815s assert (var (x, 1, [3, 2]), v, 4e-14); 815s v = repmat (33.38912133891213, [10 1 1 3]); 815s v(2,1,1,3) = NaN; 815s assert (var (x, [], [3, 2]), v, 4e-14); 815s v(2,1,1,3) = 33.40177912169048; 815s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 815s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 815s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 815s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 815s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 815s ***** assert (var (magic (3), [], 3), zeros (3,3)) 815s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 815s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 815s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 815s ***** assert (var ([]), NaN) 815s ***** assert (class (var (single ([]))), "single") 815s ***** assert (var ([],[],1), NaN(1,0)) 815s ***** assert (var ([],[],2), NaN(0,1)) 815s ***** assert (var ([],[],3), []) 815s ***** assert (class (var (single ([]), [], 1)), "single") 815s ***** assert (var (ones (1,0)), NaN) 815s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 815s ***** assert (var (ones (1,0), [], 2), NaN) 815s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 815s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 815s ***** assert (var (ones (0,1)), NaN) 815s ***** assert (var (ones (0,1), [], 1), NaN) 815s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 815s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 815s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 815s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 815s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 815s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 815s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 815s ***** test 815s [~, m] = var ([]); 815s assert (m, NaN); 815s ***** test <*62395> 815s [~, m] = var (13); 815s assert (m, 13); 815s [~, m] = var (single(13)); 815s assert (m, single(13)); 815s [~, m] = var ([1, 2, 3; 3 2 1], []); 815s assert (m, [2 2 2]); 815s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 815s assert (m, [2 2 2]); 815s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 815s assert (m, [2 2]'); 815s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 815s assert (m, [1 2 3; 3 2 1]); 815s ***** test <*62395> 815s [~, m] = var (5,99); 815s assert (m, 5); 815s [~, m] = var ([1:7], [1:7]); 815s assert (m, 5); 815s [~, m] = var ([eye(3)], [1:3]); 815s assert (m, [1/6, 1/3, 0.5], eps); 815s [~, m] = var (ones (2,2,2), [1:2], 3); 815s assert (m, ones (2,2)); 815s [~, m] = var ([1 2; 3 4], 0, 'all'); 815s assert (m, 2.5, eps); 815s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 815s assert (m, [3.5, 5.5], eps); 815s ***** test 815s [v, m] = var (4 * eye (2), [1, 3]); 815s assert (v, [3, 3]); 815s assert (m, [1, 3]); 815s ***** test <*62395> 815s [~, m] = var ([]); 815s assert (m, NaN); 815s ***** test <*62395> 815s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 815s [~, m] = var (x, 0, [3 2]); 815s assert (m, mean (x, [3 2])); 815s [~, m] = var (x, 0, [1 2]); 815s assert (m, mean (x, [1 2])); 815s [~, m] = var (x, 0, [1 3 4]); 815s assert (m, mean (x, [1 3 4])); 815s ***** test 815s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 815s x(2,5,6,3) = NaN; 815s [~, m] = var (x, 0, [3 2], "omitnan"); 815s assert (m, mean (x, [3 2], "omitnan")); 815s ***** test <*63203> 815s [v, m] = var (Inf); 815s assert (v, NaN); 815s assert (m, Inf); 815s ***** test <*63203> 815s [v, m] = var (NaN); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3]); 815s assert (v, NaN); 815s assert (m, Inf); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3]'); 815s assert (v, NaN); 815s assert (m, Inf); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3]); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3]'); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3], [], 1); 815s assert (v, [0, NaN, 0]); 815s assert (m, [1, Inf, 3]); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3], [], 2); 815s assert (v, NaN); 815s assert (m, Inf); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3], [], 3); 815s assert (v, [0, NaN, 0]); 815s assert (m, [1, Inf, 3]); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3], [], 1); 815s assert (v, [0, NaN, 0]); 815s assert (m, [1, NaN, 3]); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3], [], 2); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3], [], 3); 815s assert (v, [0, NaN, 0]); 815s assert (m, [1, NaN, 3]); 815s ***** test <*63203> 815s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 815s assert (v, [2, NaN, 2]); 815s assert (m, [2, Inf, 4]); 815s ***** test <*63203> 815s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 815s assert (v, [2, NaN, 2]); 815s assert (m, [2, Inf, 4]); 815s ***** test <*63203> 815s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 815s assert (v, [2, NaN, 2]); 815s assert (m, [2, NaN, 4]); 815s ***** test <*63203> 815s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 815s assert (v, [2, NaN, 2]); 815s assert (m, [2, NaN, 4]); 815s ***** test <*63203> 815s [v, m] = var ([Inf, 2, NaN]); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([Inf, 2, NaN]'); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([NaN, 2, Inf]); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([NaN, 2, Inf]'); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([Inf, 2, NaN], [], 1); 815s assert (v, [NaN, 0, NaN]); 815s assert (m, [Inf, 2, NaN]); 815s ***** test <*63203> 815s [v, m] = var ([Inf, 2, NaN], [], 2); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([NaN, 2, Inf], [], 1); 815s assert (v, [NaN, 0, NaN]); 815s assert (m, [NaN, 2, Inf]); 815s ***** test <*63203> 815s [v, m] = var ([NaN, 2, Inf], [], 2); 815s assert (v, NaN); 815s assert (m, NaN); 815s ***** test <*63203> 815s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 815s assert (v, [2, 2, NaN]); 815s assert (m, [2, 4, NaN]); 815s ***** test <*63203> 815s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 815s assert (v, [2, 2, NaN]); 815s assert (m, [2, 4, NaN]); 815s ***** test <*63291> 815s [v, m] = var (2 * eye (2)); 815s assert (v, [2, 2]); 815s assert (m, [1, 1]); 815s ***** test <*63291> 815s [v, m] = var (4 * eye (2), [1, 3]); 815s assert (v, [3, 3]); 815s assert (m, [1, 3]); 815s ***** test <*63291> 815s [v, m] = var (sparse (2 * eye (2))); 815s assert (full (v), [2, 2]); 815s assert (full (m), [1, 1]); 815s ***** test <*63291> 815s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 815s assert (full (v), [3, 3]); 815s assert (full (m), [1, 3]); 815s ***** test<*63291> 815s [v, m] = var (sparse (eye (2))); 815s assert (issparse (v)); 815s assert (issparse (m)); 815s ***** test<*63291> 815s [v, m] = var (sparse (eye (2)), [1, 3]); 815s assert (issparse (v)); 815s assert (issparse (m)); 815s ***** error <Invalid call> var () 816s ***** error <Invalid call> var (1, 2, "omitnan", 3) 816s ***** error <Invalid call> var (1, 2, 3, 4) 816s ***** error <Invalid call> var (1, 2, 3, 4, 5) 816s ***** error <Invalid call> var (1, "foo") 816s ***** error <Invalid call> var (1, [], "foo") 816s ***** error <normalization scalar must be either 0 or 1> var ([1 2 3], 2) 816s ***** error <normalization scalar must be either 0 or 1> var ([1 2], 2, "all") 816s ***** error <normalization scalar must be either 0 or 1> var ([1 2],0.5, "all") 816s ***** error <weights must not contain any negative values> var (1, -1) 816s ***** error <weights must not contain any negative values> var (1, [1 -1]) 816s ***** error <weights must not contain any negative values> ... 816s var ([1 2 3], [1 -1 0]) 816s ***** error <X must be a numeric vector or matrix> var ({1:5}) 816s ***** error <X must be a numeric vector or matrix> var ("char") 816s ***** error <X must be a numeric vector or matrix> var (['A'; 'B']) 816s ***** error <DIM must be a positive integer> var (1, [], ones (2,2)) 816s ***** error <DIM must be a positive integer> var (1, 0, 1.5) 816s ***** error <DIM must be a positive integer> var (1, [], 0) 816s ***** error <DIM must be a positive integer> var (1, [], 1.5) 816s ***** error <DIM must be a positive integer> var ([1 2 3], [], [-1 1]) 816s ***** error <VECDIM must contain non-repeating positive integers> ... 816s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 816s ***** error <weight matrix or array does not match X in size> ... 816s var ([1 2], eye (2)) 816s ***** error <weight matrix or array does not match X in size> ... 816s var ([1 2 3 4], [1 2; 3 4]) 816s ***** error <weight matrix or array does not match X in size> ... 816s var ([1 2 3 4], [1 2; 3 4], 1) 816s ***** error <weight matrix or array does not match X in size> ... 816s var ([1 2 3 4], [1 2; 3 4], [2 3]) 816s ***** error <weight matrix or array does not match X in size> ... 816s var (ones (2, 2), [1 2], [1 2]) 816s ***** error <weight matrix or array does not match X in size> ... 816s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 816s ***** error <weight matrix or array does not match X in size> ... 816s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 816s ***** error <weight vector length does not match> var ([1 2 3; 2 3 4], [1 3 4]) 816s ***** error <weight vector length does not match> var ([1 2], [1 2 3]) 816s ***** error <weight vector length does not match> var (1, [1 2]) 816s ***** error <weight vector length does not match> var ([1 2 3; 2 3 4], [1 3 4], 1) 817s ***** error <weight vector length does not match> var ([1 2 3; 2 3 4], [1 3], 2) 817s ***** error <weight vector length does not match> var ([1 2], [1 2], 1) 817s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 817s var (1, [], 1, "all") 817s ***** error <weight vector element count does not match X> ... 817s var ([1 2 3; 2 3 4], [1 3], "all") 817s ***** error <weight matrix or array does not match X in size> ... 817s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 817s 162 tests, 162 passed, 0 known failure, 0 skipped 817s [inst/shadow9/std.m] 817s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/shadow9/std.m 817s ***** assert (std (13), 0) 817s ***** assert (std (single (13)), single (0)) 817s ***** assert (std ([1,2,3]), 1) 817s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 817s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 817s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 817s ***** assert (std (5, 99), 0) 817s ***** assert (std (5, 99, 1), 0) 817s ***** assert (std (5, 99, 2), 0) 817s ***** assert (std ([5 3], [99 99], 2), 1) 817s ***** assert (std ([1:7], [1:7]), sqrt (3)) 817s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 817s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 817s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 817s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 817s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 817s ***** test 817s x = [-10:10]; 817s y = [x;x+5;x-5]; 817s assert (std (x), sqrt (38.5), 1e-14); 817s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 817s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 817s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 817s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 817s y(2,4) = NaN; 817s assert (std (y, "all"), NaN); 817s assert (std (y, "all", "includenan"), NaN); 817s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 817s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 817s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 817s assert (std (y, [], 2, "omitnan"), ... 817s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 817s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 817s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 817s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 817s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 817s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 817s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 817s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 817s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 817s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 817s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 817s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 817s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 817s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 817s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 817s sqrt(5)*ones(1,3,2), eps) 817s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 817s sqrt(5)*ones(3,1,2), eps) 817s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 817s sqrt(60)*ones(1,1,2),eps) 817s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 817s sqrt(6)*ones(1,3,2),eps) 817s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 817s sqrt(969),eps) 817s ***** test 817s x = reshape(1:18, [3 3 2]); 817s x([2, 14]) = NaN; 817s w = ones (3,3,2); 817s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 817s ***** test 817s x = reshape(1:18, [3 3 2]); 817s w = ones (3,3,2); 817s w([2, 14]) = NaN; 817s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 817s ***** assert (std ([1 2 3], "aLl"), 1); 817s ***** assert (std ([1 2 3], "OmitNan"), 1); 817s ***** assert (std ([1 2 3], "IncludeNan"), 1); 817s ***** test 817s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 817s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 817s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 817s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 817s assert (size (std (x, 0, [1 4 3])), [1, 40]); 817s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 817s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 817s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 817s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 817s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 817s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 817s sqrt([42 36 42]), eps) 817s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 817s sqrt([42 36 42]), eps) 817s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 817s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 817s sqrt([42 36 42]), eps) 817s ***** test 817s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 817s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 817s assert (std (x, 0, [3, 2]), v, 1e-14); 817s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 817s assert (std (x, 1, [3, 2]), v, 1e-14); 817s x(2,5,6,3) = NaN; 817s v(2,1,1,3) = NaN; 817s assert (std (x, 1, [3, 2]), v, 1e-14); 817s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 817s v(2,1,1,3) = NaN; 817s assert (std (x, [], [3, 2]), v, 1e-14); 817s v(2,1,1,3) = sqrt (33.40177912169048); 817s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 817s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 817s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 817s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 817s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 817s ***** assert (std (magic (3), [], 3), zeros (3,3)) 817s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 817s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 817s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 817s ***** assert (std ([]), NaN) 817s ***** assert (class (var (single ([]))), "single") 817s ***** assert (std ([],[],1), NaN(1,0)) 817s ***** assert (std ([],[],2), NaN(0,1)) 817s ***** assert (std ([],[],3), []) 817s ***** assert (class (var (single ([]), [], 1)), "single") 817s ***** assert (std (ones (1,0)), NaN) 817s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 817s ***** assert (std (ones (1,0), [], 2), NaN) 817s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 817s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 817s ***** assert (std (ones (0,1)), NaN) 817s ***** assert (std (ones (0,1), [], 1), NaN) 817s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 817s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 817s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 817s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 817s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 817s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 817s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 817s ***** test 817s [~, m] = std ([]); 817s assert (m, NaN); 817s ***** test <*62395> 817s [~, m] = std (13); 817s assert (m, 13); 817s [~, m] = std (single(13)); 817s assert (m, single(13)); 817s [~, m] = std ([1, 2, 3; 3 2 1], []); 817s assert (m, [2 2 2]); 817s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 817s assert (m, [2 2 2]); 817s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 817s assert (m, [2 2]'); 817s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 817s assert (m, [1 2 3; 3 2 1]); 817s ***** test <*62395> 817s [~, m] = std (5,99); 817s assert (m, 5); 817s [~, m] = std ([1:7], [1:7]); 817s assert (m, 5); 817s [~, m] = std ([eye(3)], [1:3]); 817s assert (m, [1/6, 1/3, 0.5], eps); 817s [~, m] = std (ones (2,2,2), [1:2], 3); 817s assert (m, ones (2,2)); 817s [~, m] = std ([1 2; 3 4], 0, 'all'); 817s assert (m, 2.5, eps); 817s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 817s assert (m, [3.5, 5.5], eps); 817s ***** test 817s [v, m] = std (4 * eye (2), [1, 3]); 817s assert (v, sqrt ([3, 3]), 1e-14); 817s assert (m, [1, 3]); 817s ***** test <*62395> 817s [~, m] = std ([]); 817s assert (m, NaN); 817s ***** test 817s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 817s [~, m] = std (x, 0, [3 2]); 817s assert (m, mean (x, [3 2])); 817s [~, m] = std (x, 0, [1 2]); 817s assert (m, mean (x, [1 2])); 817s [~, m] = std (x, 0, [1 3 4]); 817s assert (m, mean (x, [1 3 4])); 817s ***** test 817s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 817s x(2,5,6,3) = NaN; 817s [~, m] = std (x, 0, [3 2], "omitnan"); 817s assert (m, mean (x, [3 2], "omitnan")); 817s ***** test <*63203> 817s [v, m] = std (Inf); 817s assert (v, NaN); 817s assert (m, Inf); 817s ***** test <*63203> 817s [v, m] = std (NaN); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3]); 817s assert (v, NaN); 817s assert (m, Inf); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3]'); 817s assert (v, NaN); 817s assert (m, Inf); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3]); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3]'); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3], [], 1); 817s assert (v, [0, NaN, 0]); 817s assert (m, [1, Inf, 3]); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3], [], 2); 817s assert (v, NaN); 817s assert (m, Inf); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3], [], 3); 817s assert (v, [0, NaN, 0]); 817s assert (m, [1, Inf, 3]); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3], [], 1); 817s assert (v, [0, NaN, 0]); 817s assert (m, [1, NaN, 3]); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3], [], 2); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3], [], 3); 817s assert (v, [0, NaN, 0]); 817s assert (m, [1, NaN, 3]); 817s ***** test <*63203> 817s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 817s assert (v, sqrt ([2, NaN, 2])); 817s assert (m, [2, Inf, 4]); 817s ***** test <*63203> 817s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 817s assert (v, sqrt ([2, NaN, 2])); 817s assert (m, [2, Inf, 4]); 817s ***** test <*63203> 817s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 817s assert (v, sqrt ([2, NaN, 2])); 817s assert (m, [2, NaN, 4]); 817s ***** test <*63203> 817s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 817s assert (v, sqrt ([2, NaN, 2])); 817s assert (m, [2, NaN, 4]); 817s ***** test <*63203> 817s [v, m] = std ([Inf, 2, NaN]); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([Inf, 2, NaN]'); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([NaN, 2, Inf]); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([NaN, 2, Inf]'); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([Inf, 2, NaN], [], 1); 817s assert (v, [NaN, 0, NaN]); 817s assert (m, [Inf, 2, NaN]); 817s ***** test <*63203> 817s [v, m] = std ([Inf, 2, NaN], [], 2); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([NaN, 2, Inf], [], 1); 817s assert (v, [NaN, 0, NaN]); 817s assert (m, [NaN, 2, Inf]); 817s ***** test <*63203> 817s [v, m] = std ([NaN, 2, Inf], [], 2); 817s assert (v, NaN); 817s assert (m, NaN); 817s ***** test <*63203> 817s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 817s assert (v, sqrt ([2, 2, NaN])); 817s assert (m, [2, 4, NaN]); 817s ***** test <*63203> 817s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 817s assert (v, sqrt ([2, 2, NaN])); 817s assert (m, [2, 4, NaN]); 817s ***** test <*63291> 817s [v, m] = std (2 * eye (2)); 817s assert (v, sqrt ([2, 2])); 817s assert (m, [1, 1]); 817s ***** test <*63291> 817s [v, m] = std (4 * eye (2), [1, 3]); 817s assert (v, sqrt ([3, 3])); 817s assert (m, [1, 3]); 817s ***** test <*63291> 817s [v, m] = std (sparse (2 * eye (2))); 817s assert (full (v), sqrt ([2, 2])); 817s assert (full (m), [1, 1]); 817s ***** test <*63291> 817s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 817s assert (full (v), sqrt ([3, 3])); 817s assert (full (m), [1, 3]); 817s ***** test <*63291> 817s [v, m] = std (sparse (eye (2))); 817s assert (issparse (v)); 817s assert (issparse (m)); 817s ***** test <*63291> 817s [v, m] = std (sparse (eye (2)), [1, 3]); 817s assert (issparse (v)); 817s assert (issparse (m)); 817s ***** error <Invalid call> std () 817s ***** error <Invalid call> std (1, 2, "omitnan", 3) 817s ***** error <Invalid call> std (1, 2, 3, 4) 818s ***** error <Invalid call> std (1, 2, 3, 4, 5) 818s ***** error <Invalid call> std (1, "foo") 818s ***** error <Invalid call> std (1, [], "foo") 818s ***** error <normalization scalar must be either 0 or 1> std ([1 2 3], 2) 818s ***** error <normalization scalar must be either 0 or 1> std ([1 2], 2, "all") 818s ***** error <normalization scalar must be either 0 or 1> std ([1 2],0.5, "all") 818s ***** error <weights must not contain any negative values> std (1, -1) 818s ***** error <weights must not contain any negative values> std (1, [1 -1]) 818s ***** error <weights must not contain any negative values> ... 818s std ([1 2 3], [1 -1 0]) 818s ***** error <X must be a numeric vector or matrix> std ({1:5}) 818s ***** error <X must be a numeric vector or matrix> std ("char") 818s ***** error <X must be a numeric vector or matrix> std (['A'; 'B']) 818s ***** error <DIM must be a positive integer> std (1, [], ones (2,2)) 818s ***** error <DIM must be a positive integer> std (1, 0, 1.5) 818s ***** error <DIM must be a positive integer> std (1, [], 0) 818s ***** error <DIM must be a positive integer> std (1, [], 1.5) 818s ***** error <DIM must be a positive integer> std ([1 2 3], [], [-1 1]) 818s ***** error <VECDIM must contain non-repeating positive integers> ... 818s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 818s ***** error <weight matrix or array does not match X in size> ... 818s std ([1 2], eye (2)) 818s ***** error <weight matrix or array does not match X in size> ... 818s std ([1 2 3 4], [1 2; 3 4]) 818s ***** error <weight matrix or array does not match X in size> ... 818s std ([1 2 3 4], [1 2; 3 4], 1) 818s ***** error <weight matrix or array does not match X in size> ... 818s std ([1 2 3 4], [1 2; 3 4], [2 3]) 818s ***** error <weight matrix or array does not match X in size> ... 818s std (ones (2, 2), [1 2], [1 2]) 818s ***** error <weight matrix or array does not match X in size> ... 818s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 818s ***** error <weight matrix or array does not match X in size> ... 818s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 818s ***** error <weight vector length does not match> std ([1 2 3; 2 3 4], [1 3 4]) 818s ***** error <weight vector length does not match> std ([1 2], [1 2 3]) 818s ***** error <weight vector length does not match> std (1, [1 2]) 818s ***** error <weight vector length does not match> std ([1 2 3; 2 3 4], [1 3 4], 1) 818s ***** error <weight vector length does not match> std ([1 2 3; 2 3 4], [1 3], 2) 818s ***** error <weight vector length does not match> std ([1 2], [1 2], 1) 818s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 818s std (1, [], 1, "all") 818s ***** error <weight vector element count does not match X> ... 818s std ([1 2 3; 2 3 4], [1 3], "all") 818s ***** error <weight matrix or array does not match X in size> ... 818s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 818s 162 tests, 162 passed, 0 known failure, 0 skipped 818s [inst/shadow9/mean.m] 818s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/shadow9/mean.m 818s ***** test 818s x = -10:10; 818s y = x'; 818s z = [y, y+10]; 818s assert (mean (x), 0); 818s assert (mean (y), 0); 818s assert (mean (z), [0, 10]); 818s ***** assert (mean (magic (3), 1), [5, 5, 5]) 818s ***** assert (mean (magic (3), 2), [5; 5; 5]) 818s ***** assert (mean (logical ([1 0 1 1])), 0.75) 818s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 818s ***** assert (mean ([1 2], 3), [1 2]) 818s ***** test 818s in = [1 2 3]; 818s out = 2; 818s assert (mean (in, "default"), mean (in)); 818s assert (mean (in, "default"), out); 818s assert (mean (in, "double"), out); 818s assert (mean (in, "native"), out); 818s ***** test 818s in = single ([1 2 3]); 818s out = 2; 818s assert (mean (in, "default"), mean (in)); 818s assert (mean (in, "default"), single (out)); 818s assert (mean (in, "double"), out); 818s assert (mean (in, "native"), single (out)); 818s ***** test 818s in = logical ([1 0 1]); 818s out = 2/3; 818s assert (mean (in, "default"), mean (in), eps); 818s assert (mean (in, "default"), out, eps); 818s assert (mean (in, "double"), out, eps); 818s assert (mean (in, "native"), out, eps); 818s ***** test 818s in = char ("ab"); 818s out = 97.5; 818s assert (mean (in, "default"), mean (in), eps); 818s assert (mean (in, "default"), out, eps); 818s assert (mean (in, "double"), out, eps); 818s ***** test 818s in = uint8 ([1 2 3]); 818s out = 2; 818s assert (mean (in, "default"), mean (in)); 818s assert (mean (in, "default"), out); 818s assert (mean (in, "double"), out); 818s assert (mean (in, "native"), uint8 (out)); 818s ***** test 818s in = uint8 ([0 1 2 3]); 818s out = 1.5; 818s out_u8 = 2; 818s assert (mean (in, "default"), mean (in), eps); 818s assert (mean (in, "default"), out, eps); 818s assert (mean (in, "double"), out, eps); 818s assert (mean (in, "native"), uint8 (out_u8)); 818s assert (class (mean (in, "native")), "uint8"); 818s ***** test # internal sum exceeding intmax 818s in = uint8 ([3 141 141 255]); 818s out = 135; 818s assert (mean (in, "default"), mean (in)); 818s assert (mean (in, "default"), out); 818s assert (mean (in, "double"), out); 818s assert (mean (in, "native"), uint8 (out)); 818s assert (class (mean (in, "native")), "uint8"); 818s ***** test # fractional answer with internal sum exceeding intmax 818s in = uint8 ([1 141 141 255]); 818s out = 134.5; 818s out_u8 = 135; 818s assert (mean (in, "default"), mean (in)); 818s assert (mean (in, "default"), out); 818s assert (mean (in, "double"), out); 818s assert (mean (in, "native"), uint8 (out_u8)); 818s assert (class (mean (in, "native")), "uint8"); 818s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 818s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 818s out_same = intmax ("uint64")-1; 818s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 818s out_opp = -1; 818s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 818s out_neg = intmin ("int64")+1; 818s 818s ## both positive 818s assert (mean (in_same, "default"), mean (in_same)); 818s assert (mean (in_same, "default"), double (out_same)); 818s assert (mean (in_same, "double"), double (out_same)); 818s assert (mean (in_same, "native"), uint64 (out_same)); 818s assert (class (mean (in_same, "native")), "uint64"); 818s 818s ## opposite signs 818s assert (mean (in_opp, "default"), mean (in_opp)); 818s assert (mean (in_opp, "default"), double (out_opp)); 818s assert (mean (in_opp, "double"), double (out_opp)); 818s assert (mean (in_opp, "native"), int64 (out_opp)); 818s assert (class (mean (in_opp, "native")), "int64"); 818s 818s ## both negative 818s assert (mean (in_neg, "default"), mean (in_neg)); 818s assert (mean (in_neg, "default"), double(out_neg)); 818s assert (mean (in_neg, "double"), double(out_neg)); 818s assert (mean (in_neg, "native"), int64(out_neg)); 818s assert (class (mean (in_neg, "native")), "int64"); 818s ***** test <54567> 818s in = [(intmin('int64')+5), (intmax('int64'))-5]; 818s assert (mean (in, "native"), int64(-1)); 818s assert (class (mean (in, "native")), "int64"); 818s assert (mean (double(in)), double(0) ); 818s assert (mean (in), double(-0.5) ); 818s assert (mean (in, "default"), double(-0.5) ); 818s assert (mean (in, "double"), double(-0.5) ); 818s assert (mean (in, "all", "native"), int64(-1)); 818s assert (mean (in, 2, "native"), int64(-1)); 818s assert (mean (in, [1 2], "native"), int64(-1)); 818s assert (mean (in, [2 3], "native"), int64(-1)); 818s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 818s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 818s ***** test 818s x = [-10:10]; 818s y = [x;x+5;x-5]; 818s assert (mean (x), 0); 818s assert (mean (y, 2), [0, 5, -5]'); 818s assert (mean (y, "all"), 0); 818s y(2,4) = NaN; 818s assert (mean (y', "omitnan"), [0 5.35 -5]); 818s z = y + 20; 818s assert (mean (z, "all"), NaN); 818s assert (mean (z, "all", "includenan"), NaN); 818s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 818s m = [20 NaN 15]; 818s assert (mean (z'), m); 818s assert (mean (z', "includenan"), m); 818s m = [20 25.35 15]; 818s assert (mean (z', "omitnan"), m); 818s assert (mean (z, 2, "omitnan"), m'); 818s assert (mean (z, 2, "native", "omitnan"), m'); 818s assert (mean (z, 2, "omitnan", "native"), m'); 818s ***** test 818s assert (mean (true, "all"), 1); 818s assert (mean (false), 0); 818s assert (mean ([true false true]), 2/3, 4e-14); 818s assert (mean ([true false true], 1), [1 0 1]); 818s assert (mean ([true false NaN], 1), [1 0 NaN]); 818s assert (mean ([true false NaN], 2), NaN); 818s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 818s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 818s ***** assert (mean ("abc"), double (98)) 818s ***** assert (mean ("ab"), double (97.5), eps) 818s ***** assert (mean ("abc", "double"), double (98)) 818s ***** assert (mean ("abc", "default"), double (98)) 818s ***** test 818s x = magic (4); 818s x([2, 9:12]) = NaN; 818s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 818s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 818s assert (mean (x,2), NaN(4,1), eps); 818s assert (mean (x,3), x, eps); 818s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 818s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 818s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 818s assert (mean (x, 3, 'omitnan'), x, eps); 818s ***** assert (mean ([]), NaN(1,1)) 818s ***** assert (mean (single([])), NaN(1,1,"single")) 818s ***** assert (mean ([], 1), NaN(1,0)) 818s ***** assert (mean ([], 2), NaN(0,1)) 818s ***** assert (mean ([], 3), NaN(0,0)) 818s ***** assert (mean (ones(1,0)), NaN(1,1)) 818s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 818s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 818s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 818s ***** assert (mean (ones(0,1)), NaN(1,1)) 818s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 818s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 818s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 818s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 818s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 818s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 818s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 818s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 819s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 819s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 819s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 819s ***** test 819s x = repmat ([1:20;6:25], [5 2 6 3]); 819s assert (size (mean (x, [3 2])), [10 1 1 3]); 819s assert (size (mean (x, [1 2])), [1 1 6 3]); 819s assert (size (mean (x, [1 2 4])), [1 1 6]); 819s assert (size (mean (x, [1 4 3])), [1 40]); 819s assert (size (mean (x, [1 2 3 4])), [1 1]); 819s ***** assert (mean (ones (2,2), 3), ones (2,2)) 819s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 819s ***** assert (mean (magic (3), 3), magic (3)) 819s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 819s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 819s ***** test 819s x = repmat ([1:20;6:25], [5 2 6 3]); 819s m = repmat ([10.5;15.5], [5 1 1 3]); 819s assert (mean (x, [3 2]), m, 4e-14); 819s x(2,5,6,3) = NaN; 819s m(2,1,1,3) = NaN; 819s assert (mean (x, [3 2]), m, 4e-14); 819s m(2,1,1,3) = 15.52301255230125; 819s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 819s ***** assert (mean ([1 2 3], "aLL"), 2) 819s ***** assert (mean ([1 2 3], "OmitNan"), 2) 819s ***** assert (mean ([1 2 3], "DOUBle"), 2) 819s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 819s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 819s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 819s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 819s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 820s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 820s 35184372088833-1/(2^8), eps(35184372088833)) 820s !!!!! known bug: https://octave.org/testfailure/?63848 820s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 820s 820s Location | Observed | Expected | Reason 820s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 820s ***** error <Invalid call to mean. Correct usage is> mean () 820s ***** error <Invalid call to mean. Correct usage is> mean (1, 2, 3) 820s ***** error <Invalid call to mean. Correct usage is> mean (1, 2, 3, 4) 821s ***** error <Invalid call to mean. Correct usage is> mean (1, "all", 3) 821s ***** error <Invalid call to mean. Correct usage is> mean (1, "b") 821s ***** error <Invalid call to mean. Correct usage is> mean (1, 1, "foo") 821s ***** error <OUTTYPE 'native' cannot be used with char> mean ("abc", "native") 821s ***** error <X must be either a numeric, boolean, or character> mean ({1:5}) 821s ***** error <DIM must be a positive integer> mean (1, ones (2,2)) 821s ***** error <DIM must be a positive integer> mean (1, 1.5) 821s ***** error <DIM must be a positive integer> mean (1, 0) 821s ***** error <DIM must be a positive integer> mean (1, []) 821s ***** error <DIM must be a positive integer> mean (1, -1) 821s ***** error <DIM must be a positive integer> mean (1, -1.5) 821s ***** error <DIM must be a positive integer> mean (1, NaN) 821s ***** error <DIM must be a positive integer> mean (1, Inf) 821s ***** error <DIM must be a positive integer> mean (repmat ([1:20;6:25], [5 2]), -1) 821s ***** error <DIM must be a positive integer> mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 821s ***** error <DIM must be a positive integer> mean (1, ones(1,0)) 821s ***** error <VECDIM must contain non-repeating> mean (1, [2 2]) 821s 80 tests, 79 passed, 0 known failure, 1 skipped 821s [inst/shadow9/median.m] 821s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/shadow9/median.m 821s ***** assert (median (1), 1) 821s ***** assert (median ([1,2,3]), 2) 821s ***** assert (median ([1,2,3]'), 2) 821s ***** assert (median (cat(3,3,1,2)), 2) 821s ***** assert (median ([3,1,2]), 2) 821s ***** assert (median ([2,4,6,8]), 5) 821s ***** assert (median ([8,2,6,4]), 5) 821s ***** assert (median (single ([1,2,3])), single (2)) 821s ***** assert (median ([1,2], 3), [1,2]) 821s ***** test 821s x = [1, 2, 3, 4, 5, 6]; 821s x2 = x'; 821s y = [1, 2, 3, 4, 5, 6, 7]; 821s y2 = y'; 821s 821s assert (median (x) == median (x2) && median (x) == 3.5); 821s assert (median (y) == median (y2) && median (y) == 4); 821s assert (median ([x2, 2 * x2]), [3.5, 7]); 821s assert (median ([y2, 3 * y2]), [4, 12]); 821s ***** test 821s in = [1 2 3]; 821s out = 2; 821s assert (median (in, "default"), median (in)); 821s assert (median (in, "default"), out); 821s ***** test 821s in = single ([1 2 3]); 821s out = 2; 821s assert (median (in, "default"), single (median (in))); 821s assert (median (in, "default"), single (out)); 821s assert (median (in, "double"), double (out)); 821s assert (median (in, "native"), single (out)); 821s ***** test 821s in = uint8 ([1 2 3]); 821s out = 2; 821s assert (median (in, "default"), double (median (in))); 821s assert (median (in, "default"), double (out)); 821s assert (median (in, "double"), out); 821s assert (median (in, "native"), uint8 (out)); 821s ***** test 821s in = logical ([1 0 1]); 821s out = 1; 821s assert (median (in, "default"), double (median (in))); 821s assert (median (in, "default"), double (out)); 821s assert (median (in, "double"), double (out)); 821s assert (median (in, "native"), double (out)); 821s ***** test 821s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 821s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 821s assert (median (x), y); 821s assert (median (x, 1), y); 821s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 821s assert (median (x, "omitnan"), y); 821s assert (median (x, 1, "omitnan"), y); 821s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 821s assert (median (x, 2, "omitnan"), y); 821s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 821s assert (median (x, 2), y); 821s assert (median (x, "all"), NaN); 821s assert (median (x, "all", "omitnan"), 2); 821s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 821s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 821s ***** test 821s assert (median (true, "all"), logical (1)); 821s assert (median (false), logical (0)); 821s assert (median ([true false true]), true); 821s assert (median ([true false true], 2), true); 821s assert (median ([true false true], 1), logical ([1 0 1])); 821s assert (median ([true false NaN], 1), [1 0 NaN]); 821s assert (median ([true false NaN], 2), NaN); 821s assert (median ([true false NaN], 2, "omitnan"), 0.5); 821s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 821s ***** test 821s x = repmat ([1:20;6:25], [5 2 6 3]); 821s assert (size (median (x, [3 2])), [10 1 1 3]); 821s assert (size (median (x, [1 2])), [1 1 6 3]); 821s assert (size (median (x, [1 2 4])), [1 1 6]); 821s assert (size (median (x, [1 4 3])), [1 40]); 821s assert (size (median (x, [1 2 3 4])), [1 1]); 821s ***** assert (median (ones (2,2), 3), ones (2,2)) 821s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 821s ***** assert (median (magic (3), 3), magic (3)) 821s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 821s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 821s ***** test 821s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 821s assert (median (x, [3 2]), [NaN NaN 1.4]'); 821s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 821s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 821s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 821s ***** assert (median (NaN), NaN) 821s ***** assert (median (NaN, "omitnan"), NaN) 821s ***** assert (median (NaN (2)), [NaN NaN]) 821s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 821s ***** assert (median ([1 NaN 3]), NaN) 821s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 821s ***** assert (median ([1 NaN 3], 2), NaN) 821s ***** assert (median ([1 NaN 3]'), NaN) 821s ***** assert (median ([1 NaN 3]', 1), NaN) 821s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 821s ***** assert (median ([1 NaN 3], "omitnan"), 2) 821s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 821s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 821s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 821s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 821s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 821s ***** assert (median ([1 2 NaN 3]), NaN) 821s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 821s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 821s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 821s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 821s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 821s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 821s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 821s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 821s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 821s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 821s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 821s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 821s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 821s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 821s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 821s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 821s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 821s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 821s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 821s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 821s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 821s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 821s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 821s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 821s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 821s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 821s ***** assert (median (NaN("single")), NaN("single")) 821s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 821s ***** assert (median (NaN("single"), "double"), NaN("double")) 821s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 821s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 821s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 821s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 821s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 821s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 821s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 821s ***** test <*64011> 821s x = [magic(3), magic(3)]; 821s x([3, 7, 11, 12, 16, 17]) = NaN; 821s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 821s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 821s assert (median (x), ynan); 821s assert (median (x, "omitnan"), yomitnan, eps); 821s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 821s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 821s ***** assert (median (Inf), Inf) 821s ***** assert (median (-Inf), -Inf) 821s ***** assert (median ([-Inf Inf]), NaN) 821s ***** assert (median ([3 Inf]), Inf) 821s ***** assert (median ([3 4 Inf]), 4) 821s ***** assert (median ([Inf 3 4]), 4) 821s ***** assert (median ([Inf 3 Inf]), Inf) 821s ***** assert (median ([1, 2, Inf]), 2) 821s ***** assert (median ([1, 2, Inf, Inf]), Inf) 821s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 821s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 821s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 821s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 821s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 821s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 821s ***** assert (median ([]), NaN) 821s ***** assert (median (ones(1,0)), NaN) 821s ***** assert (median (ones(0,1)), NaN) 821s ***** assert (median ([], 1), NaN(1,0)) 821s ***** assert (median ([], 2), NaN(0,1)) 821s ***** assert (median ([], 3), NaN(0,0)) 821s ***** assert (median (ones(1,0), 1), NaN(1,0)) 821s ***** assert (median (ones(1,0), 2), NaN(1,1)) 821s ***** assert (median (ones(1,0), 3), NaN(1,0)) 821s ***** assert (median (ones(0,1), 1), NaN(1,1)) 821s ***** assert (median (ones(0,1), 2), NaN(0,1)) 821s ***** assert (median (ones(0,1), 3), NaN(0,1)) 821s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 821s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 821s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 821s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 822s ***** assert (median([1 3 3i 2 1i]), 2) 822s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 822s ***** shared a, b, x, y 822s old_state = rand ("state"); 822s restore_state = onCleanup (@() rand ("state", old_state)); 822s rand ("state", 2); 822s a = rand (2,3,4,5); 822s b = rand (3,4,6,5); 822s x = sort (a, 4); 822s y = sort (b, 3); 822s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 822s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 822s ***** shared ## Clear shared to prevent variable echo for any later test failures 822s ***** test 822s x = ones(15,1,4); 822s x([13,15],1,:) = NaN; 822s assert (median (x, 1, "omitnan"), ones (1,1,4)) 822s ***** assert (median ([true, false]), true) 822s ***** assert (median (logical ([])), false) 822s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 822s ***** assert (median (uint8 ([])), uint8 (NaN)) 822s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 822s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 822s ***** assert (median (int8 ([])), int8 (NaN)) 822s ***** assert (median (single ([1, 3, 4])), single (3)) 822s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 822s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 822s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 822s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 822s int8 ([64 65 65 67])) 822s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 822s int8 ([126; 4])) 822s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 822s intmax ("int64") - 1) 822s ***** assert <54567> (median ( ... 822s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 822s int64([intmax("int64") - 1; 2])) 822s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 822s intmax ("uint64") - 1) 822s ***** assert <54567> (median ( ... 822s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 822s uint64([intmax("uint64") - 1; 2])) 822s ***** assert <54567> (median (... 822s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 822s int8(-1)) 822s ***** assert <54567> (median ([int8([1 2 3 4]); ... 822s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 822s int8([3;-1])) 822s ***** assert <54567> (median (... 822s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 822s int64(-1)) 822s ***** assert <54567> (median ([int64([1 2 3 4]); ... 822s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 822s int64([3;-1])) 822s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 822s intmax("uint64")-1) 822s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 822s double(intmax("uint64")-1)) 822s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 822s double(intmax("uint64")-1)) 822s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 822s intmax("uint64")-1) 822s ***** assert (median ([1 2 3], "aLL"), 2) 822s ***** assert (median ([1 2 3], "OmitNan"), 2) 822s ***** assert (median ([1 2 3], "DOUBle"), 2) 822s ***** error <Invalid call> median () 822s ***** error <Invalid call> median (1, 2, 3) 822s ***** error <Invalid call> median (1, 2, 3, 4) 822s ***** error <Invalid call> median (1, "all", 3) 822s ***** error <Invalid call> median (1, "b") 822s ***** error <Invalid call> median (1, 1, "foo") 823s ***** error <'all' cannot be used with> median (1, 3, "all") 823s ***** error <'all' cannot be used with> median (1, [2 3], "all") 823s ***** error <X must be either numeric or logical> median ({1:5}) 823s ***** error <X must be either numeric or logical> median ("char") 823s ***** error <only one OUTTYPE can be specified> median(1, "double", "native") 823s ***** error <DIM must be a positive integer> median (1, ones (2,2)) 823s ***** error <DIM must be a positive integer> median (1, 1.5) 823s ***** error <DIM must be a positive integer> median (1, 0) 823s ***** error <DIM must be a positive integer> median ([1 2 3], [-1 1]) 823s ***** error <VECDIM must contain non-repeating> median(1, [1 2 2]) 823s 159 tests, 159 passed, 0 known failure, 0 skipped 823s [inst/adtest.m] 823s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/adtest.m 823s ***** error<Invalid call to adtest. Correct usage is:> adtest (); 823s ***** error<adtest: X must be a vector of real numbers.> adtest (ones (20,2)); 823s ***** error<adtest: X must be a vector of real numbers.> adtest ([1+i,0-3i]); 823s ***** error<adtest: invalid distribution family in char string.> ... 823s adtest (ones (20,1), "Distribution", "normal"); 823s ***** error<adtest: invalid distribution family in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 823s ***** error<adtest: invalid distribution parameters in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"norm", 5}); 823s ***** error<adtest: invalid distribution parameters in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 823s ***** error<adtest: invalid distribution parameters in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"ev", 5}); 823s ***** error<adtest: invalid distribution parameters in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 823s ***** error<adtest: invalid distribution parameters in cell array.> ... 823s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 823s ***** error<adtest: invalid distribution option.> ... 823s adtest (rand (20,1), "Distribution", 35); 823s ***** error<adtest: invalid Name argument.> ... 823s adtest (rand (20,1), "Name", "norm"); 823s ***** error<adtest: invalid Name argument.> ... 823s adtest (rand (20,1), "Name", {"norm", 75, 10}); 823s ***** error<adtest: asymptotic option is not valid for the composite> ... 823s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 823s ***** error<adtest: asymptotic option is not valid for the composite> ... 823s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 823s ***** error<adtest: asymptotic option is not valid for the Monte Carlo> ... 823s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 823s "Asymptotic", true); 823s ***** error<adtest: out of range invalid alpha - lower limit: 0.0005 upper> ... 823s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 823s "Alpha", 0.000000001); 823s ***** error<adtest: out of range invalid alpha - lower limit: 0.0005 upper> ... 823s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 823s "Alpha", 0.999999999); 823s ***** error<adtest: not enough data for composite testing.> ... 823s adtest (10); 823s ***** warning<adtest: out of range min p-value:> ... 823s randn ("seed", 34); 823s adtest (ones (20,1), "Alpha", 0.000001); 823s ***** warning<adtest: alpha not within the lookup table.> ... 823s randn ("seed", 34); 823s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 823s ***** warning<adtest: alpha not within the lookup table.> ... 823s randn ("seed", 34); 823s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 823s ***** test 823s load examgrades 823s x = grades(:,1); 823s [h, pval, adstat, cv] = adtest (x); 823s assert (h, false); 823s assert (pval, 0.1854, 1e-4); 823s assert (adstat, 0.5194, 1e-4); 823s assert (cv, 0.7470, 1e-4); 823s ***** test 823s load examgrades 823s x = grades(:,1); 823s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 823s assert (h, false); 823s assert (pval, 0.071363, 1e-6); 823s ***** test 823s load examgrades 823s x = grades(:,1); 823s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 823s assert (h, false); 823s assert (pval, 0.4687, 1e-4); 823s 25 tests, 25 passed, 0 known failure, 0 skipped 823s [inst/cdfcalc.m] 823s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/cdfcalc.m 823s ***** test 823s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 823s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 823s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 823s assert (xCDF, [2, 3, 4, 5, 6]'); 823s assert (n, 10); 823s ***** shared x 823s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 823s ***** error yCDF = cdfcalc (x); 823s ***** error [yCDF, xCDF] = cdfcalc (); 823s ***** error [yCDF, xCDF] = cdfcalc (x, x); 823s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 823s 5 tests, 5 passed, 0 known failure, 0 skipped 823s [inst/sampsizepwr.m] 823s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/sampsizepwr.m 823s ***** demo 823s ## Compute the mean closest to 100 that can be determined to be 823s ## significantly different from 100 using a t-test with a sample size 823s ## of 60 and a power of 0.8. 823s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 823s disp (mu1); 823s ***** demo 823s ## Compute the sample sizes required to distinguish mu0 = 100 from 823s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 823s ## smaller sample sizes of 1.5 and a power of 0.6. 823s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 823s ***** demo 823s ## Compute the sample size N required to distinguish p=.26 from p=.2 823s ## with a binomial test. The result is approximate, so make a plot to 823s ## see if any smaller N values also have the required power of 0.6. 823s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 823s nn = 1:250; 823s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 823s Nexact = min (nn(pwr >= 0.6)); 823s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 823s grid on 823s ***** demo 823s ## The company must test 52 bottles to detect the difference between a mean 823s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 823s ## to visualize how the sample size affects the power of the test. 823s 823s nout = sampsizepwr('t',[100 5],102,0.80); 823s nn = 1:100; 823s pwrout = sampsizepwr('t',[100 5],102,[],nn); 823s 823s figure; 823s plot (nn, pwrout, "b-", nout, 0.8, "ro") 823s title ("Power versus Sample Size") 823s xlabel ("Sample Size") 823s ylabel ("Power") 823s ***** error<sampsizepwr: test type must be a non-empty string.> ... 823s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: test type must be a non-empty string.> ... 823s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: test type must be a non-empty string.> ... 823s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: invalid test type.> ... 823s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: parameters must be numeric.> ... 823s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("z", 100, [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("t", 100, [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("t2", 60, [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: invalid size of parameters for this test type.> ... 823s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: wrong number of output arguments for this test type.> ... 823s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: wrong number of output arguments for this test type.> ... 823s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 823s ***** error<sampsizepwr: wrong number of output arguments for this test type.> ... 823s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 823s ***** error<sampsizepwr: wrong number of output arguments for this test type.> ... 823s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 823s ***** error<sampsizepwr: wrong number of output arguments for this test type.> ... 823s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("var", 0, [], 0.8, 60); 823s ***** error<sampsizepwr: negative or zero variance.> ... 823s out = sampsizepwr ("var", -5, [], 0.8, 60); 823s ***** error<sampsizepwr: out of range probability.> ... 823s out = sampsizepwr ("p", 0, [], 0.8, 60); 823s ***** error<sampsizepwr: out of range probability.> ... 823s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 823s ***** error<sampsizepwr: out of range regression coefficient.> ... 823s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 823s ***** error<sampsizepwr: out of range regression coefficient.> ... 823s out = sampsizepwr ("r", -1, [], 0.8, 60); 823s ***** error<sampsizepwr: out of range regression coefficient.> ... 823s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 823s ***** error<sampsizepwr: regression coefficient must not be 0.> ... 823s out = sampsizepwr ("r", 0, [], 0.8, 60); 823s ***** error<sampsizepwr: invalid value for 'alpha' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 823s ***** error<sampsizepwr: invalid value for 'alpha' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 823s ***** error<sampsizepwr: invalid value for 'alpha' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 823s ***** error<sampsizepwr: invalid value for 'alpha' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 823s ***** error<sampsizepwr: 'tail' parameter must be a non-empty string.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 823s ***** error<sampsizepwr: 'tail' parameter must be a non-empty string.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 823s ***** error<sampsizepwr: invalid value for 'tail' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 823s ***** error<sampsizepwr: invalid value for 'ratio' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 823s ***** error<sampsizepwr: invalid value for 'ratio' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 823s ***** error<sampsizepwr: invalid value for 'ratio' parameter.> ... 823s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 823s ***** error<sampsizepwr: only one of either p1, power, or n must be missing.> ... 823s out = sampsizepwr ("z", [100, 5], [], [], 60); 823s ***** error<sampsizepwr: only one of either p1, power, or n must be missing.> ... 823s out = sampsizepwr ("z", [100, 5], 110, [], []); 823s ***** error<sampsizepwr: only one of either p1, power, or n must be missing.> ... 823s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 823s ***** error<sampsizepwr: only one of either p1, power, or n must be missing.> ... 823s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 823s ***** error<sampsizepwr: alternative hypothesis parameter must be numeric.> ... 823s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 823s ***** error<sampsizepwr: alternative hypothesis parameter out of range.> ... 823s out = sampsizepwr ("var", 5, -1, [], 60); 823s ***** error<sampsizepwr: alternative hypothesis parameter out of range.> ... 823s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 823s ***** error<sampsizepwr: alternative hypothesis parameter out of range.> ... 823s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 823s ***** error<sampsizepwr: alternative hypothesis parameter out of range.> ... 823s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 823s ***** error<sampsizepwr: invalid value for POWER.> ... 823s out = sampsizepwr ("z", [100, 5], 110, 1.2); 823s ***** error<sampsizepwr: invalid value for POWER.> ... 823s out = sampsizepwr ("z", [100, 5], 110, 0); 823s ***** error<sampsizepwr: Cannot compute N or P1 unless POWER> ... 823s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 823s ***** error<sampsizepwr: input arguments size mismatch.> ... 823s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 823s ***** error<sampsizepwr: Same value for null and alternative hypothesis.> ... 823s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 823s ***** error<sampsizepwr: Invalid P1 for testing left tail.> ... 823s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 823s ***** error<sampsizepwr: Invalid P1 for testing right tail.> ... 823s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 823s ***** warning<sampsizepwr: approximate N.> ... 823s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 823s ***** warning<sampsizepwr: approximate N.> ... 823s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 823s ***** test 823s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 823s assert (mu1, 103.67704316, 1e-8); 824s ***** test 824s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 824s assert (N1, 9); 824s assert (N2, 14); 824s ***** test 824s nn = 1:250; 824s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 824s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 824s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 824s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 824s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 824s ***** test 824s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 824s assert (nout, 52); 824s ***** test 824s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 824s assert (power, 0.5797373588621888, 1e-14); 824s ***** test 824s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 824s assert (nout, 18); 824s ***** test 824s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 824s assert (p1out, 25.65317979360237, 1e-14); 825s ***** test 825s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 825s assert (pwr, 0.716504004686586, 1e-14); 825s ***** test 825s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 825s assert (n, 11); 825s ***** test 825s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 825s assert ([n1, n2], [8, 16]); 826s 68 tests, 68 passed, 0 known failure, 0 skipped 826s [inst/procrustes.m] 826s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/procrustes.m 826s ***** demo 826s ## Create some random points in two dimensions 826s n = 10; 826s randn ("seed", 1); 826s X = normrnd (0, 1, [n, 2]); 826s 826s ## Those same points, rotated, scaled, translated, plus some noise 826s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 826s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 826s 826s ## Conform Y to X, plot original X and Y, and transformed Y 826s [d, Z] = procrustes (X, Y); 826s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 826s ***** demo 826s ## Find Procrustes distance and plot superimposed shape 826s 826s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 826s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 826s plot (X(:,1),X(:,2),"x"); 826s hold on 826s plot (Y(:,1),Y(:,2),"o"); 826s xlim ([0 100]); 826s ylim ([0 100]); 826s legend ("Target shape (X)", "Source shape (Y)"); 826s [d, Z] = procrustes (X, Y) 826s plot (Z(:,1), Z(:,2), "s"); 826s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 826s hold off 826s ***** demo 826s ## Apply Procrustes transformation to larger set of points 826s 826s ## Create matrices with landmark points for two triangles 826s X = [5, 0; 5, 5; 8, 5]; # target 826s Y = [0, 0; 1, 0; 1, 1]; # source 826s 826s ## Create a matrix with more points on the source triangle 826s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 826s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 826s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 826s 826s ## Plot both shapes, including the larger set of points for the source shape 826s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 826s hold on 826s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 826s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 826s xlim ([-1 10]); 826s ylim ([-1 6]); 826s legend ("Target shape (X)", "Source shape (Y)", ... 826s "More points on Y", "Location", "northwest"); 826s hold off 826s 826s ## Obtain the Procrustes transformation 826s [d, Z, transform] = procrustes (X, Y) 826s 826s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 826s ## on the source shape onto the target shape, and then visualize the results. 826s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 826s figure 826s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 826s hold on 826s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 826s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 826s xlim ([-1 10]); 826s ylim ([-1 6]); 826s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 826s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 826s legend ("Target shape (X)", "Source shape (Y)", ... 826s "More points on Y", "Transformed source shape (Z)", ... 826s "Transformed additional points", "Location", "northwest"); 826s hold off 826s ***** demo 826s ## Compare shapes without reflection 826s 826s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 826s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 826s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 826s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 826s plot (T(:,1), T(:,2), "x-"); 826s hold on 826s plot (S(:,1), S(:,2), "o-"); 826s legend ("Target shape (d)", "Source shape (b)"); 826s hold off 826s d_false = procrustes (T, S, "reflection", false); 826s printf ("Procrustes distance without reflection: %f\n", d_false); 826s d_true = procrustes (T, S, "reflection", true); 826s printf ("Procrustes distance with reflection: %f\n", d_true); 826s d_best = procrustes (T, S, "reflection", "best"); 826s printf ("Procrustes distance with best fit: %f\n", d_true); 826s ***** error procrustes (); 826s ***** error procrustes (1, 2, 3, 4, 5, 6); 826s ***** error<procrustes: X and Y must be 2-dimensional matrices.> ... 826s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 826s ***** error<procrustes: values in X and Y must be real.> ... 826s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 826s ***** error<procrustes: values in X and Y must be real.> ... 826s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 826s ***** error<procrustes: values in X and Y must be real.> ... 826s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 826s ***** error<procrustes: X and Y must have equal number of rows.> ... 826s procrustes (ones (10 ,3), ones (11, 3)); 826s ***** error<procrustes: X must have at least as many columns as Y.> ... 826s procrustes (ones (10 ,3), ones (10, 4)); 826s ***** error<procrustes: optional arguments must be in Name-Value pairs.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 826s ***** error<procrustes: optional arguments must be in Name-Value pairs.> ... 826s procrustes (ones (10 ,3), ones (10, 3), true); 826s ***** error<procrustes: invalid value for scaling.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 826s ***** error<procrustes: invalid value for scaling.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 826s ***** error<procrustes: invalid value for reflection.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 826s ***** error<procrustes: invalid value for reflection.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 826s ***** error<procrustes: invalid name for optional arguments.> ... 826s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 826s 15 tests, 15 passed, 0 known failure, 0 skipped 826s [inst/vartestn.m] 826s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/vartestn.m 826s ***** demo 826s ## Test the null hypothesis that the variances are equal across the five 826s ## columns of data in the students’ exam grades matrix, grades. 826s 826s load examgrades 826s vartestn (grades) 826s ***** demo 826s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 826s ## equal across different model years. 826s 826s load carsmall 826s vartestn (MPG, Model_Year) 826s ***** demo 826s ## Use Levene’s test to test the null hypothesis that the variances in miles 826s ## per gallon (MPG) are equal across different model years. 826s 826s load carsmall 826s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 826s ***** demo 826s ## Test the null hypothesis that the variances are equal across the five 826s ## columns of data in the students’ exam grades matrix, grades, using the 826s ## Brown-Forsythe test. Suppress the display of the summary table of 826s ## statistics and the box plot. 826s 826s load examgrades 826s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 826s ***** error<vartestn: too few input arguments.> vartestn (); 826s ***** error<vartestn: X must be a vector or a matrix.> vartestn (1); 826s ***** error<vartestn: if X is a vector then a group vector is required.> ... 826s vartestn ([1, 2, 3, 4, 5, 6, 7]); 826s ***** error<vartestn: if X is a vector then a group vector is required.> ... 826s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 826s ***** error<vartestn: if X is a vector then a group vector is required.> ... 826s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 826s ***** error<vartestn: if X is a vector then a group vector is required.> ... 826s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 826s ***** error<vartestn: invalid value for display.> ... 826s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 826s ***** error<vartestn: invalid value for display.> ... 826s vartestn (ones (50,3), "Display", "some"); 826s ***** error<vartestn: invalid value for testtype.> ... 826s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 826s ***** error<vartestn: optional arguments must be in name/value pairs.> ... 826s vartestn (ones (50,3), [], "som"); 826s ***** error<vartestn: invalid name for optional arguments.> ... 826s vartestn (ones (50,3), [], "some", "some"); 826s ***** error<vartestn: columns in X and GROUP length do not match.> ... 826s vartestn (ones (50,3), [1, 2], "Display", "off"); 826s ***** test 826s load examgrades 826s [p, stat] = vartestn (grades, "Display", "off"); 826s assert (p, 7.908647337018238e-08, 1e-14); 826s assert (stat.chisqstat, 38.7332, 1e-4); 826s assert (stat.df, 4); 826s ***** test 826s load examgrades 826s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 826s assert (p, 9.523239714592791e-07, 1e-14); 826s assert (stat.fstat, 8.5953, 1e-4); 826s assert (stat.df, [4, 595]); 826s ***** test 826s load examgrades 826s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 826s assert (p, 7.219514351897161e-07, 1e-14); 826s assert (stat.fstat, 8.7503, 1e-4); 826s assert (stat.df, [4, 595]); 826s ***** test 826s load examgrades 826s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 826s assert (p, 1.312093241723211e-06, 1e-14); 826s assert (stat.fstat, 8.4160, 1e-4); 826s assert (stat.df, [4, 595]); 826s ***** test 826s load examgrades 826s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 826s assert (p, 8.235660885480556e-07, 1e-14); 826s assert (stat.fstat, 8.6766, 1e-4); 826s assert (stat.df, [4, 595]); 826s 17 tests, 17 passed, 0 known failure, 0 skipped 826s [inst/regress_gp.m] 826s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/regress_gp.m 826s ***** demo 826s ## Linear fitting of 1D Data 826s rand ("seed", 125); 826s X = 2 * rand (5, 1) - 1; 826s randn ("seed", 25); 826s Y = 2 * X - 1 + 0.3 * randn (5, 1); 826s 826s ## Points for interpolation/extrapolation 826s Xfit = linspace (-2, 2, 10)'; 826s 826s ## Fit regression model 826s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 826s 826s ## Plot fitted data 826s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 826s title ("Gaussian process regression with linear kernel"); 826s ***** demo 826s ## Linear fitting of 2D Data 826s rand ("seed", 135); 826s X = 2 * rand (4, 2) - 1; 826s randn ("seed", 35); 826s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 826s 826s ## Mesh for interpolation/extrapolation 826s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 826s Xfit = [x1(:), x2(:)]; 826s 826s ## Fit regression model 826s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 826s Ypred = reshape (Ypred, 10, 10); 826s YintU = reshape (Yint(:,1), 10, 10); 826s YintL = reshape (Yint(:,2), 10, 10); 826s 826s ## Plot fitted data 826s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 826s hold on; 826s h = mesh (x1, x2, Ypred, zeros (10, 10)); 826s set (h, "facecolor", "none", "edgecolor", "yellow"); 826s h = mesh (x1, x2, YintU, ones (10, 10)); 826s set (h, "facecolor", "none", "edgecolor", "cyan"); 826s h = mesh (x1, x2, YintL, ones (10, 10)); 826s set (h, "facecolor", "none", "edgecolor", "cyan"); 826s hold off 826s axis tight 826s view (75, 25) 826s title ("Gaussian process regression with linear kernel"); 826s ***** demo 826s ## Projection over basis function with linear kernel 826s pp = [2, 2, 0.3, 1]; 826s n = 10; 826s rand ("seed", 145); 826s X = 2 * rand (n, 1) - 1; 826s randn ("seed", 45); 826s Y = polyval (pp, X) + 0.3 * randn (n, 1); 826s 826s ## Powers 826s px = [sqrt(abs(X)), X, X.^2, X.^3]; 826s 826s ## Points for interpolation/extrapolation 826s Xfit = linspace (-1, 1, 100)'; 826s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 826s 826s ## Define a prior covariance assuming that the sqrt component is not present 826s Sp = 100 * eye (size (px, 2) + 1); 826s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 826s 826s ## Fit regression model 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 826s 826s ## Plot fitted data 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("Linear kernel over basis function with prior covariance"); 826s ***** demo 826s ## Projection over basis function with linear kernel 826s pp = [2, 2, 0.3, 1]; 826s n = 10; 826s rand ("seed", 145); 826s X = 2 * rand (n, 1) - 1; 826s randn ("seed", 45); 826s Y = polyval (pp, X) + 0.3 * randn (n, 1); 826s 826s ## Powers 826s px = [sqrt(abs(X)), X, X.^2, X.^3]; 826s 826s ## Points for interpolation/extrapolation 826s Xfit = linspace (-1, 1, 100)'; 826s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 826s 826s ## Fit regression model without any assumption on prior covariance 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 826s 826s ## Plot fitted data 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("Linear kernel over basis function without prior covariance"); 826s ***** demo 826s ## Projection over basis function with rbf kernel 826s pp = [2, 2, 0.3, 1]; 826s n = 10; 826s rand ("seed", 145); 826s X = 2 * rand (n, 1) - 1; 826s randn ("seed", 45); 826s Y = polyval (pp, X) + 0.3 * randn (n, 1); 826s 826s ## Powers 826s px = [sqrt(abs(X)), X, X.^2, X.^3]; 826s 826s ## Points for interpolation/extrapolation 826s Xfit = linspace (-1, 1, 100)'; 826s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 826s 826s ## Fit regression model with RBF kernel (standard parameters) 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 826s 826s ## Plot fitted data 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("RBF kernel over basis function with standard parameters"); 826s text (-0.5, 4, "theta = 5\n g = 0.01"); 826s ***** demo 826s ## Projection over basis function with rbf kernel 826s pp = [2, 2, 0.3, 1]; 826s n = 10; 826s rand ("seed", 145); 826s X = 2 * rand (n, 1) - 1; 826s randn ("seed", 45); 826s Y = polyval (pp, X) + 0.3 * randn (n, 1); 826s 826s ## Powers 826s px = [sqrt(abs(X)), X, X.^2, X.^3]; 826s 826s ## Points for interpolation/extrapolation 826s Xfit = linspace (-1, 1, 100)'; 826s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 826s 826s ## Fit regression model with RBF kernel with different parameters 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 826s 826s ## Plot fitted data 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("GP regression with RBF kernel and non default parameters"); 826s text (-0.5, 4, "theta = 10\n g = 0.01"); 826s 826s ## Fit regression model with RBF kernel with different parameters 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 826s 826s ## Plot fitted data 826s figure 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("GP regression with RBF kernel and non default parameters"); 826s text (-0.5, 4, "theta = 50\n g = 0.01"); 826s 826s ## Fit regression model with RBF kernel with different parameters 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 826s 826s ## Plot fitted data 826s figure 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("GP regression with RBF kernel and non default parameters"); 826s text (-0.5, 4, "theta = 50\n g = 0.001"); 826s 826s ## Fit regression model with RBF kernel with different parameters 826s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 826s 826s ## Plot fitted data 826s figure 826s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 826s Xfit, polyval (pp, Xfit), "g-;True;"); 826s axis tight 826s axis manual 826s hold on 826s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 826s hold off 826s title ("GP regression with RBF kernel and non default parameters"); 826s text (-0.5, 4, "theta = 50\n g = 0.05"); 826s ***** demo 826s ## RBF fitting on noiseless 1D Data 826s x = [0:2*pi/7:2*pi]'; 826s y = 5 * sin (x); 826s 826s ## Predictive grid of 500 equally spaced locations 826s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 826s 826s ## Fit regression model with RBF kernel 826s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 826s 826s ## Plot fitted data 826s r = mvnrnd (Yfit, diag (Ysd)', 50); 826s plot (xi, r', "c-"); 826s hold on 826s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 826s plot (x, y, ".k;Predictor points;", "markersize", 20) 826s plot (xi, 5 * sin (xi), "-y;True Function;"); 826s xlim ([-0.5,2*pi+0.5]); 826s ylim ([-10,10]); 826s hold off 826s title ("GP regression with RBF kernel on noiseless 1D data"); 826s text (0, -7, "theta = 5\n g = 0.01"); 826s ***** demo 826s ## RBF fitting on noisy 1D Data 826s x = [0:2*pi/7:2*pi]'; 826s x = [x; x]; 826s y = 5 * sin (x) + randn (size (x)); 826s 826s ## Predictive grid of 500 equally spaced locations 826s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 826s 826s ## Fit regression model with RBF kernel 826s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 826s 826s ## Plot fitted data 826s r = mvnrnd (Yfit, diag (Ysd)', 50); 826s plot (xi, r', "c-"); 826s hold on 826s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 826s plot (x, y, ".k;Predictor points;", "markersize", 20) 826s plot (xi, 5 * sin (xi), "-y;True Function;"); 826s xlim ([-0.5,2*pi+0.5]); 826s ylim ([-10,10]); 826s hold off 826s title ("GP regression with RBF kernel on noisy 1D data"); 826s text (0, -7, "theta = 5\n g = 0.01"); 826s ***** error<Invalid call to regress_gp.> regress_gp (ones (20, 2)) 826s ***** error<Invalid call to regress_gp.> regress_gp (ones (20, 2), ones (20, 1)) 826s ***** error<regress_gp: X must be a 2-D matrix.> ... 826s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 826s ***** error<regress_gp: Y must be a column vector.> ... 826s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 826s ***** error<regress_gp: rows in X must equal the length of Y.> ... 826s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 826s ***** error<regress_gp: X and XI must have the same number of columns.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 826s ***** error<regress_gp: invalid 4th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 826s ***** error<regress_gp: invalid 4th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 826s ***** error<regress_gp: theta must be a scalar when using RBF kernel.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 826s ***** error<regress_gp: wrong size for prior covariance matrix Sp.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 826s ***** error<regress_gp: invalid 5th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 826s ***** error<regress_gp: invalid 5th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 826s ***** error<regress_gp: invalid 5th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 826s ***** error<regress_gp: wrong size for prior covariance matrix Sp.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 826s ***** error<regress_gp: invalid 6th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 826s ***** error<regress_gp: invalid 6th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 826s ***** error<regress_gp: invalid 6th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 826s ***** error<regress_gp: invalid 6th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 826s ***** error<regress_gp: invalid 6th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 826s ***** error<regress_gp: invalid 7th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 826s ***** error<regress_gp: invalid 7th argument.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 826s ***** error<regress_gp: wrong size for prior covariance matrix Sp.> ... 826s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 826s 22 tests, 22 passed, 0 known failure, 0 skipped 826s [inst/fitcdiscr.m] 826s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitcdiscr.m 826s ***** demo 826s ## Train a linear discriminant classifier for Gamma = 0.5 826s ## and plot the decision boundaries. 826s 826s load fisheriris 826s idx = ! strcmp (species, "setosa"); 826s X = meas(idx,3:4); 826s Y = cast (strcmpi (species(idx), "virginica"), "double"); 826s obj = fitcdiscr (X, Y, "Gamma", 0.5) 826s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 826s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 826s [x1G, x2G] = meshgrid (x1, x2); 826s XGrid = [x1G(:), x2G(:)]; 826s pred = predict (obj, XGrid); 826s gidx = logical (str2num (cell2mat (pred))); 826s 826s figure 826s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 826s hold on 826s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 826s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 826s xlabel ("Petal length (cm)"); 826s ylabel ("Petal width (cm)"); 826s title ("Linear Discriminant Analysis Decision Boundary"); 826s legend ({"Versicolor Region", "Virginica Region", ... 826s "Sampled Versicolor", "Sampled Virginica"}, ... 826s "location", "northwest") 826s axis tight 826s hold off 826s ***** test 826s load fisheriris 826s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 826s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 826s assert (label, {'versicolor'}) 826s assert (score, [0, 0.9999, 0.0001], 1e-4) 826s assert (cost, [1, 0.0001, 0.9999], 1e-4) 826s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 826s assert (label, {'versicolor'}) 826s assert (score, [0, 0.6368, 0.3632], 1e-4) 826s assert (cost, [1, 0.3632, 0.6368], 1e-4) 826s assert (class (Mdl), "ClassificationDiscriminant"); 826s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 826s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 826s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 826s assert (Mdl.ClassNames, unique (species)) 826s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 826s 0.046361, 0.115388, 0.027622, 0.016355; ... 826s 0.083757, 0.027622, 0.185188, 0.021333; ... 826s 0.019201, 0.016355, 0.021333, 0.041882]; 826s assert (Mdl.Sigma, sigma, 1e-6) 826s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 826s 5.9360, 2.7700, 4.2600, 1.3260; ... 826s 6.5880, 2.9740, 5.5520, 2.0260]; 826s assert (Mdl.Mu, mu, 1e-14) 826s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 827s ***** error<fitcdiscr: too few arguments.> fitcdiscr () 827s ***** error<fitcdiscr: too few arguments.> fitcdiscr (ones (4,1)) 827s ***** error<fitcdiscr: name-value arguments must be in pairs.> 827s fitcdiscr (ones (4,2), ones (4, 1), "K") 827s ***** error<fitcdiscr: number of rows in X and Y must be equal.> 827s fitcdiscr (ones (4,2), ones (3, 1)) 827s ***** error<fitcdiscr: number of rows in X and Y must be equal.> 827s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 827s 6 tests, 6 passed, 0 known failure, 0 skipped 827s [inst/hmmestimate.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/hmmestimate.m 827s ***** test 827s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 827s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 827s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 827s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 827s [transprobest, outprobest] = hmmestimate (sequence, states); 827s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 827s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 827s assert (transprobest, expectedtransprob, 0.001); 827s assert (outprobest, expectedoutprob, 0.001); 827s ***** test 827s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 827s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 827s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 827s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 827s "Two", "One", "One", "One", "One", "One", "One"}; 827s symbols = {"A", "B", "C"}; 827s statenames = {"One", "Two"}; 827s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 827s symbols, "statenames", statenames); 827s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 827s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 827s assert (transprobest, expectedtransprob, 0.001); 827s assert (outprobest, expectedoutprob, 0.001); 827s ***** test 827s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 827s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 827s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 827s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 827s pseudotransitions = [8, 2; 4, 6]; 827s pseudoemissions = [2, 4, 4; 7, 2, 1]; 827s [transprobest, outprobest] = hmmestimate (sequence, states, ... 827s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 827s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 827s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 827s 0.823529, 0.117647, 0.058824]; 827s assert (transprobest, expectedtransprob, 0.001); 827s assert (outprobest, expectedoutprob, 0.001); 827s 3 tests, 3 passed, 0 known failure, 0 skipped 827s [inst/bartlett_test.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/bartlett_test.m 827s ***** error<bartlett_test: invalid number of input arguments.> bartlett_test () 827s ***** error<bartlett_test: invalid number of input arguments.> ... 827s bartlett_test (1, 2, 3, 4); 827s ***** error<bartlett_test: wrong value for alpha.> bartlett_test (randn (50, 2), 0); 827s ***** error<bartlett_test: GROUP and X mismatch.> ... 827s bartlett_test (randn (50, 2), [1, 2, 3]); 827s ***** error<bartlett_test: GROUP and X mismatch.> ... 827s bartlett_test (randn (50, 1), ones (55, 1)); 827s ***** error<bartlett_test: invalid second input argument.> ... 827s bartlett_test (randn (50, 1), ones (50, 2)); 827s ***** error<bartlett_test: wrong value for alpha.> ... 827s bartlett_test (randn (50, 2), [], 1.2); 827s ***** error<bartlett_test: wrong value for alpha.> ... 827s bartlett_test (randn (50, 2), [], "alpha"); 827s ***** error<bartlett_test: wrong value for alpha.> ... 827s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 827s ***** error<bartlett_test: wrong value for alpha.> ... 827s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 827s ***** warning<bartlett_test: GROUP> ... 827s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 827s ***** test 827s load examgrades 827s [h, pval, chisq, df] = bartlett_test (grades); 827s assert (h, 1); 827s assert (pval, 7.908647337018238e-08, 1e-14); 827s assert (chisq, 38.73324, 1e-5); 827s assert (df, 4); 827s ***** test 827s load examgrades 827s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 827s assert (h, 1); 827s assert (pval, 0.01172, 1e-5); 827s assert (chisq, 8.89274, 1e-5); 827s assert (df, 2); 827s ***** test 827s load examgrades 827s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 827s assert (h, 0); 827s assert (pval, 0.88118, 1e-5); 827s assert (chisq, 0.02234, 1e-5); 827s assert (df, 1); 827s ***** test 827s load examgrades 827s grades = [grades; nan(10, 5)]; 827s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 827s assert (h, 0); 827s assert (pval, 0.88118, 1e-5); 827s assert (chisq, 0.02234, 1e-5); 827s assert (df, 1); 827s ***** test 827s load examgrades 827s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 827s assert (h, 0); 827s assert (pval, 0.01791, 1e-5); 827s assert (chisq, 5.60486, 1e-5); 827s assert (df, 1); 827s 16 tests, 16 passed, 0 known failure, 0 skipped 827s [inst/kmeans.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/kmeans.m 827s ***** demo 827s ## Generate a two-cluster problem 827s randn ("seed", 31) # for reproducibility 827s C1 = randn (100, 2) + 1; 827s randn ("seed", 32) # for reproducibility 827s C2 = randn (100, 2) - 1; 827s data = [C1; C2]; 827s 827s ## Perform clustering 827s rand ("seed", 1) # for reproducibility 827s [idx, centers] = kmeans (data, 2); 827s 827s ## Plot the result 827s figure; 827s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 827s hold on; 827s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 827s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 827s hold off; 827s ***** demo 827s ## Cluster data using k-means clustering, then plot the cluster regions 827s ## Load Fisher's iris data set and use the petal lengths and widths as 827s ## predictors 827s 827s load fisheriris 827s X = meas(:,3:4); 827s 827s figure; 827s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 827s title ("Fisher's Iris Data"); 827s xlabel ("Petal Lengths (cm)"); 827s ylabel ("Petal Widths (cm)"); 827s 827s ## Cluster the data. Specify k = 3 clusters 827s rand ("seed", 1) # for reproducibility 827s [idx, C] = kmeans (X, 3); 827s x1 = min (X(:,1)):0.01:max (X(:,1)); 827s x2 = min (X(:,2)):0.01:max (X(:,2)); 827s [x1G, x2G] = meshgrid (x1, x2); 827s XGrid = [x1G(:), x2G(:)]; 827s 827s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 827s figure; 827s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 827s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 827s hold on; 827s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 827s title ("Fisher's Iris Data"); 827s xlabel ("Petal Lengths (cm)"); 827s ylabel ("Petal Widths (cm)"); 827s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 827s hold off 827s ***** demo 827s ## Partition Data into Two Clusters 827s 827s randn ("seed", 1) # for reproducibility 827s r1 = randn (100, 2) * 0.75 + ones (100, 2); 827s randn ("seed", 2) # for reproducibility 827s r2 = randn (100, 2) * 0.5 - ones (100, 2); 827s X = [r1; r2]; 827s 827s figure; 827s plot (X(:,1), X(:,2), "."); 827s title ("Randomly Generated Data"); 827s rand ("seed", 1) # for reproducibility 827s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 827s "Replicates", 5, "Display", "final"); 827s figure; 827s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 827s hold on 827s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 827s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 827s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 827s title ("Cluster Assignments and Centroids"); 827s hold off 827s ***** demo 827s ## Assign New Data to Existing Clusters 827s 827s ## Generate a training data set using three distributions 827s randn ("seed", 5) # for reproducibility 827s r1 = randn (100, 2) * 0.75 + ones (100, 2); 827s randn ("seed", 7) # for reproducibility 827s r2 = randn (100, 2) * 0.5 - ones (100, 2); 827s randn ("seed", 9) # for reproducibility 827s r3 = randn (100, 2) * 0.75; 827s X = [r1; r2; r3]; 827s 827s ## Partition the training data into three clusters by using kmeans 827s 827s rand ("seed", 1) # for reproducibility 827s [idx, C] = kmeans (X, 3); 827s 827s ## Plot the clusters and the cluster centroids 827s 827s figure 827s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 827s hold on 827s plot (C(:,1), C(:,2), "kx"); 827s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 827s 827s ## Generate a test data set 827s randn ("seed", 25) # for reproducibility 827s r1 = randn (100, 2) * 0.75 + ones (100, 2); 827s randn ("seed", 27) # for reproducibility 827s r2 = randn (100, 2) * 0.5 - ones (100, 2); 827s randn ("seed", 29) # for reproducibility 827s r3 = randn (100, 2) * 0.75; 827s Xtest = [r1; r2; r3]; 827s 827s ## Classify the test data set using the existing clusters 827s ## Find the nearest centroid from each test data point by using pdist2 827s 827s D = pdist2 (C, Xtest, "euclidean"); 827s [group, ~] = find (D == min (D)); 827s 827s ## Plot the test data and label the test data using idx_test with gscatter 827s 827s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 827s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 827s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 827s "Data classified to Cluster 3", "Location", "NorthWest"); 827s title ("Assign New Data to Existing Clusters"); 827s ***** test 827s samples = 4; 827s dims = 3; 827s k = 2; 827s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 827s "emptyAction", "singleton"); 827s assert (size (cls), [samples, 1]); 827s assert (size (c), [k, dims]); 827s assert (size (d), [k, 1]); 827s assert (size (z), [samples, k]); 827s ***** test 827s samples = 4; 827s dims = 3; 827s k = 2; 827s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 827s "emptyAction", "singleton"); 827s assert (size (cls), [samples, 1]); 827s assert (size (c), [k, dims]); 827s assert (size (d), [k, 1]); 827s assert (size (z), [samples, k]); 827s ***** test 827s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 827s assert (cls, [1; 1]); 827s assert (c, [1.5, 0; NA, NA]); 827s ***** test 827s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 827s "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 827s ***** test 827s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 827s ***** test 827s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 827s ***** error kmeans (rand (3,2), 4); 827s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 827s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 827s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 827s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 827s ***** error kmeans (rand (3,4), 2, "start", "normal"); 827s ***** error kmeans (rand (4,3), 2, "replicates", i); 827s ***** error kmeans (rand (4,3), 2, "replicates", -1); 827s ***** error kmeans (rand (4,3), 2, "replicates", []); 827s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 827s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 827s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 827s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 827s ***** error kmeans (rand (4,3), 2, "maxiter", []); 827s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 827s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 827s ***** error <empty cluster created> kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 827s 31 tests, 31 passed, 0 known failure, 0 skipped 827s [inst/dcov.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/dcov.m 827s ***** demo 827s base=@(x) (x- min(x))./(max(x)-min(x)); 827s N = 5e2; 827s x = randn (N,1); x = base (x); 827s z = randn (N,1); z = base (z); 827s # Linear relations 827s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 827s ly = x .* cy; 827s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 827s # Correlated Gaussian 827s cz = 1 - abs (cy); 827s gy = base ( ly + cz.*z); 827s # Shapes 827s sx = repmat (x,1,7); 827s sy = zeros (size (ly)); 827s v = 2 * rand (size(x,1),2) - 1; 827s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 827s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 827s tmp = R(35) * v.'; 827s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 827s tmp = R(45) * v.'; 827s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 827s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 827s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 827s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 827s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 827s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 827s sy = base (sy); 827s sx = base (sx); 827s # scaled shape 827s sc = 1/3; 827s ssy = (sy-0.5) * sc + 0.5; 827s n = size (ly,2); 827s ym = 1.2; 827s xm = 0.5; 827s fmt={'horizontalalignment','center'}; 827s ff = "% .2f"; 827s figure (1) 827s for i=1:n 827s subplot(4,n,i); 827s plot (x, gy(:,i), '.b'); 827s axis tight 827s axis off 827s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 827s 827s subplot(4,n,i+n); 827s plot (x, ly(:,i), '.b'); 827s axis tight 827s axis off 827s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 827s 827s subplot(4,n,i+2*n); 827s plot (sx(:,i), sy(:,i), '.b'); 827s axis tight 827s axis off 827s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 827s v = axis (); 827s 827s subplot(4,n,i+3*n); 827s plot (sx(:,i), ssy(:,i), '.b'); 827s axis (v) 827s axis off 827s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 827s endfor 827s ***** error dcov (randn (30, 5), randn (25,5)) 827s 1 test, 1 passed, 0 known failure, 0 skipped 827s [inst/ismissing.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/ismissing.m 827s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 827s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 827s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 827s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 827s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 827s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 827s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 827s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 827s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 827s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 827s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 827s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 827s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 827s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 827s ***** assert (ismissing (double (NaN)), true) 827s ***** assert (ismissing (single (NaN)), true) 827s ***** assert (ismissing (' '), true) 827s ***** assert (ismissing ({''}), true) 827s ***** assert (ismissing ({' '}), false) 827s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 827s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 827s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 827s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 827s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 827s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 827s ***** assert (ismissing ({'123', '', 123}), [false false false]) 827s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 827s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 827s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 827s ***** assert (ismissing ({1, 2, 3}), [false false false]) 827s ***** assert (ismissing ([struct struct struct]), [false false false]) 827s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 827s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 827s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 827s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 827s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 827s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 827s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 827s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 827s ***** assert (ismissing ([]), logical([])) 827s ***** assert (ismissing (''), logical([])) 827s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 827s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 827s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 827s ***** error ismissing () 827s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 827s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 827s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 827s ***** error <indicators not supported for data type> ismissing (struct, 1) 827s 49 tests, 49 passed, 0 known failure, 0 skipped 827s [inst/fitlm.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/fitlm.m 827s ***** demo 827s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 827s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 827s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 827s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 827s 25.694 ]'; 827s 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]'; 827s 827s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 827s ***** demo 827s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 827s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 827s brands = {'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'}; 827s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 827s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 827s 827s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 827s "CategoricalVars",[1,2],"display","on"); 827s ***** test 827s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 827s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 827s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 827s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 827s 25.694 ]'; 827s 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]'; 827s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 827s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 827s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 827s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 827s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 827s assert (TAB{2,2}, 10, 1e-04); 827s assert (TAB{3,2}, 7.99999999999999, 1e-09); 827s assert (TAB{4,2}, 8.99999999999999, 1e-09); 827s assert (TAB{5,2}, 11.0001428571429, 1e-09); 827s assert (TAB{6,2}, 19.0001111111111, 1e-09); 827s assert (TAB{2,3}, 1.01775379540949, 1e-09); 827s assert (TAB{3,3}, 1.64107868458008, 1e-09); 827s assert (TAB{4,3}, 1.43932122062479, 1e-09); 827s assert (TAB{5,3}, 1.48983900477565, 1e-09); 827s assert (TAB{6,3}, 1.3987687997822, 1e-09); 827s assert (TAB{2,6}, 9.82555903510687, 1e-09); 827s assert (TAB{3,6}, 4.87484242844031, 1e-09); 827s assert (TAB{4,6}, 6.25294748040552, 1e-09); 827s assert (TAB{5,6}, 7.38344399756088, 1e-09); 827s assert (TAB{6,6}, 13.5834536158296, 1e-09); 827s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 827s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 827s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 827s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 827s ***** test 827s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 827s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 827s brands = bsxfun (@times, ones(6,1), [1,2,3]); 827s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 827s 827s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 827s "categoricalvars",[1,2],"display","off"); 827s assert (TAB{2,2}, 5.66666666666667, 1e-09); 827s assert (TAB{3,2}, -1.33333333333333, 1e-09); 827s assert (TAB{4,2}, -2.16666666666667, 1e-09); 827s assert (TAB{5,2}, 1.16666666666667, 1e-09); 827s assert (TAB{6,2}, -0.333333333333334, 1e-09); 827s assert (TAB{7,2}, -0.166666666666667, 1e-09); 827s assert (TAB{2,3}, 0.215165741455965, 1e-09); 827s assert (TAB{3,3}, 0.304290309725089, 1e-09); 827s assert (TAB{4,3}, 0.304290309725089, 1e-09); 827s assert (TAB{5,3}, 0.304290309725089, 1e-09); 827s assert (TAB{6,3}, 0.43033148291193, 1e-09); 827s assert (TAB{7,3}, 0.43033148291193, 1e-09); 827s assert (TAB{2,6}, 26.3362867542108, 1e-09); 827s assert (TAB{3,6}, -4.38178046004138, 1e-09); 827s assert (TAB{4,6}, -7.12039324756724, 1e-09); 827s assert (TAB{5,6}, 3.83405790253621, 1e-09); 827s assert (TAB{6,6}, -0.774596669241495, 1e-09); 827s assert (TAB{7,6}, -0.387298334620748, 1e-09); 827s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 827s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 827s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 827s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 827s assert (TAB{6,7}, 0.453570536021938, 1e-09); 827s assert (TAB{7,7}, 0.705316781644046, 1e-09); 827s ## Test with string ids for categorical variables 827s brands = {'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'; ... 827s 'Gourmet', 'National', 'Generic'}; 827s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 827s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 827s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 827s "categoricalvars",[1,2],"display","off"); 827s ***** test 827s load carsmall 827s X = [Weight,Horsepower,Acceleration]; 827s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 827s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 827s assert (TAB{2,2}, 47.9767628118615, 1e-09); 827s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 827s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 827s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 827s assert (TAB{2,3}, 3.87851641748551, 1e-09); 827s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 827s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 827s assert (TAB{5,3}, 0.193325043113178, 1e-09); 827s assert (TAB{2,6}, 12.369874881944, 1e-09); 827s assert (TAB{3,6}, -5.80228828790225, 1e-09); 827s assert (TAB{4,6}, -1.76626492228599, 1e-09); 827s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 827s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 827s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 827s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 827s assert (TAB{5,7}, 0.952359384151778, 1e-09); 827s 3 tests, 3 passed, 0 known failure, 0 skipped 827s [inst/binotest.m] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/inst/binotest.m 827s ***** demo 827s % flip a coin 1000 times, showing 475 heads 827s % Hypothesis: coin is fair, i.e. p=1/2 827s [h,p_val,ci] = binotest(475,1000,0.5) 827s % Result: h = 0 : null hypothesis not rejected, coin could be fair 827s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 827s % 0.444 <= p <= 0.506 with 95% confidence 827s ***** demo 827s % flip a coin 100 times, showing 65 heads 827s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 827s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 827s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 827s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 827s % 0 <= p <= 0.76 with 99% confidence 827s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 827s [h,p_val,ci] = binotest (51,235,1/6); 827s assert (p_val, 0.0437, 0.00005) 827s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 827s assert (p_val, 0.027, 0.0005) 827s 1 test, 1 passed, 0 known failure, 0 skipped 827s Checking C++ files ... 827s [src/libsvmread.cc] 827s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/libsvmread.cc 827s ***** error <libsvmread: filename must be a string.> [L, D] = libsvmread (24); 828s ***** error <libsvmread: wrong number of input or output arguments.> ... 828s D = libsvmread ("filename"); 828s ***** test 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s assert (size (L), [270, 1]); 828s assert (size (D), [270, 13]); 828s ***** test 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s assert (issparse (L), false); 828s assert (issparse (D), true); 828s 4 tests, 4 passed, 0 known failure, 0 skipped 828s [src/svmpredict.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/svmpredict.cc 828s ***** test 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s model = svmtrain (L, D, '-c 1 -g 0.07'); 828s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 828s assert (size (predict_label), size (dec_values)); 828s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 828s assert (dec_values(1), 1.225836001973273, 1e-14); 828s assert (dec_values(2), -0.3212992933043805, 1e-14); 828s assert (predict_label(1), 1); 828s ***** shared L, D, model 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s model = svmtrain (L, D, '-c 1 -g 0.07'); 828s ***** error <svmpredict: wrong number of output arguments.> ... 828s [p, a] = svmpredict (L, D, model); 828s ***** error <svmpredict: wrong number of input arguments.> p = svmpredict (L, D); 828s ***** error <svmpredict: label vector and instance matrix must be double.> ... 828s p = svmpredict (single (L), D, model); 828s ***** error <svmpredict: model should be a struct array.> p = svmpredict (L, D, 123); 828s 5 tests, 5 passed, 0 known failure, 0 skipped 828s [src/editDistance.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/editDistance.cc 828s ***** error <editDistance: too many input arguments.> d = editDistance (1, 2, 3, 4); 828s ***** error <editDistance: too many output arguments.> ... 828s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 828s ***** error <editDistance: too many output arguments.> ... 828s [C, IA] = editDistance ({"AS","SD","AD"}); 828s ***** error <editDistance: minDist must be a scalar value.> ... 828s d = editDistance ({"AS","SD","AD"}, [1, 2]); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ({"AS","SD","AD"}, -2); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ({"AS","SD","AD"}, 1.25); 828s ***** error <editDistance: minDist must be a scalar value.> ... 828s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 828s ***** error <editDistance: minDist must be a scalar value.> ... 828s d = editDistance ("string1", "string2", [1, 2]); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ("string1", "string2", -2); 828s ***** error <editDistance: minDist must be a nonnegative integer.> ... 828s d = editDistance ("string1", "string2", 1.25); 828s ***** error <editDistance: tokenizedDocument must contain cellstr arrays.> ... 828s d = editDistance ({{"string1", "string2"}, 2}); 828s ***** error <editDistance: tokenizedDocument must contain cellstr arrays.> ... 828s d = editDistance ({{"string1", "string2"}, 2}, 2); 828s ***** error <editDistance: STR1 must be a cellstr.> ... 828s d = editDistance ([1, 2, 3]); 828s ***** error <editDistance: STR1 must be a cellstr.> ... 828s d = editDistance (["AS","SD","AD","AS"]); 828s ***** error <editDistance: STR1 must be a cellstr.> ... 828s d = editDistance (["AS","SD","AD"], 2); 828s ***** error <editDistance: STR1 and STR2 must be either strings or cellstr.> ... 828s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 828s ***** error <editDistance: STR1 and STR2 must be either strings or cellstr.> ... 828s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 828s ***** error <editDistance: STR1 and STR2 must be either strings or cellstr.> ... 828s d = editDistance ([1,2,3], {"AS","AS","AD"}); 828s ***** error <editDistance: first tokenizedDocument does not contain cellstr arrays.> ... 828s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 828s ***** error <editDistance: second tokenizedDocument does not contain cellstr arrays.> ... 828s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 828s ***** error <editDistance: cellstr input arguments size mismatch.> ... 828s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 828s ***** test 828s d = editDistance ({"AS","SD","AD"}); 828s assert (d, [2; 1; 1]); 828s assert (class (d), "double"); 828s ***** test 828s C = editDistance ({"AS","SD","AD"}, 1); 828s assert (iscellstr (C), true); 828s assert (C, {"AS";"SD"}); 828s ***** test 828s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 828s assert (class (IA), "double"); 828s assert (IA, [1;2]); 828s ***** test 828s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 828s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 828s assert (class (IA), "double"); 828s assert (A(IA), C); 828s ***** test 828s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 828s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 828s assert (class (IA), "cell"); 828s assert (C, {"ASS"; "FDE"; "OPA"}); 828s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 828s assert (A(IA{2}), {"FDE"; "EDS"}); 828s assert (A(IA{3}), {"OPA"}); 828s ***** test 828s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 828s [C, IA, IC] = editDistance (A, 2); 828s assert (class (IA), "double"); 828s assert (A(IA), C); 828s assert (IC, [1; 1; 3; 1; 5]); 828s ***** test 828s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 828s assert (d, [0; 1; 2]); 828s assert (class (d), "double"); 828s ***** test 828s d = editDistance ({"AS","SD","AD"}, {"AS"}); 828s assert (d, [0; 2; 1]); 828s assert (class (d), "double"); 828s ***** test 828s d = editDistance ({"AS"}, {"AS","SD","AD"}); 828s assert (d, [0; 2; 1]); 828s assert (class (d), "double"); 828s ***** test 828s b = editDistance ("Octave", "octave"); 828s assert (b, 1); 828s assert (class (b), "double"); 828s 33 tests, 33 passed, 0 known failure, 0 skipped 828s [src/svmtrain.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/svmtrain.cc 828s ***** test 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s model = svmtrain(L, D, '-c 1 -g 0.07'); 828s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 828s assert (isstruct (model), true); 828s assert (isfield (model, "Parameters"), true); 828s assert (model.totalSV, 130); 828s assert (model.nr_class, 2); 828s assert (size (model.Label), [2, 1]); 828s ***** shared L, D 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s ***** error <svmtrain: wrong number of output arguments.> [L, D] = svmtrain (L, D); 828s ***** error <svmtrain: label vector and instance matrix must be double.> ... 828s model = svmtrain (single (L), D); 828s ***** error <svmtrain: wrong number of input arguments.> ... 828s model = svmtrain (L, D, "", ""); 828s 4 tests, 4 passed, 0 known failure, 0 skipped 828s [src/fcnntrain.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/fcnntrain.cc 828s ***** shared X, Y, MODEL 828s load fisheriris 828s X = meas; 828s Y = grp2idx (species); 828s ***** error <fcnntrain: too few input arguments.> ... 828s model = fcnntrain (X, Y); 828s ***** error <fcnntrain: too many output arguments.> ... 828s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: X must be a real numeric matrix.> ... 828s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: X must be a real numeric matrix.> ... 828s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: X cannot be empty.> ... 828s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: Y must be a real numeric matrix.> ... 828s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 828s ***** error <fcnntrain: Y must be a real numeric matrix.> ... 828s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: Y cannot be empty.> ... 828s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: X and Y must have the same number of rows.> ... 828s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: labels in Y must be positive integers.> ... 828s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'LayerSizes' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'LayerSizes' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'LayerSizes' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'LayerSizes' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Activations' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Activations' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Activations' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Activations' must be a row vector of integer values.> ... 828s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Activations' do not match LayerSizes.> ... 828s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: cannot have a layer of zero size.> ... 828s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: invalid 'Activations' code.> ... 828s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: invalid 'Activations' code.> ... 828s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'NumThreads' must be a positive integer scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'Alpha' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 828s ***** error <fcnntrain: 'LearningRate' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 828s ***** error <fcnntrain: 'LearningRate' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 828s ***** error <fcnntrain: 'LearningRate' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 828s ***** error <fcnntrain: 'LearningRate' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 828s ***** error <fcnntrain: 'Epochs' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 828s ***** error <fcnntrain: 'Epochs' must be a positive scalar value.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 828s ***** error <fcnntrain: 'DisplayInfo' must be a boolean scalar.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 828s ***** error <fcnntrain: 'DisplayInfo' must be a boolean scalar.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 828s ***** error <fcnntrain: 'DisplayInfo' must be a boolean scalar.> ... 828s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 828s 33 tests, 33 passed, 0 known failure, 0 skipped 828s [src/libsvmwrite.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/libsvmwrite.cc 828s ***** shared L, D 828s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 828s ***** error <libsvmwrite: error opening file for write.> libsvmwrite ("", L, D); 828s ***** error <libsvmwrite: length of label vector does not match instances.> ... 828s libsvmwrite (tempname (), [L;L], D); 828s ***** error <libsvmwrite: wrong number of output arguments.> ... 828s OUT = libsvmwrite (tempname (), L, D); 828s ***** error <libsvmwrite: label vector and instance matrix must be double.> ... 828s libsvmwrite (tempname (), single (L), D); 828s ***** error <libsvmwrite: filename must be a string.> libsvmwrite (13412, L, D); 828s ***** error <libsvmwrite: instance_matrix must be sparse.> ... 828s libsvmwrite (tempname (), L, full (D)); 828s ***** error <libsvmwrite: wrong number of input arguments.> ... 828s libsvmwrite (tempname (), L, D, D); 828s 7 tests, 7 passed, 0 known failure, 0 skipped 828s [src/fcnnpredict.cc] 828s >>>>> /tmp/autopkgtest.YRSg9l/build.lsI/src/src/fcnnpredict.cc 828s ***** shared X, Y, MODEL 828s load fisheriris 828s X = meas; 828s Y = grp2idx (species); 828s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 828s ***** test 828s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 828s assert (numel (Y_pred), numel (Y)); 828s assert (isequal (size (Y_pred), size (Y)), true); 828s assert (columns (Y_scores), numel (unique (Y))); 828s assert (rows (Y_scores), numel (Y)); 828s ***** error <fcnnpredict: too few input arguments.> ... 828s fcnnpredict (MODEL); 828s ***** error <fcnnpredict: too many output arguments.> ... 828s [Q, W, E] = fcnnpredict (MODEL, X); 828s ***** error <fcnnpredict: first argument must be a scalar structure.> ... 828s fcnnpredict (1, X); 828s ***** error <fcnnpredict: first argument must be a scalar structure.> ... 828s fcnnpredict (struct ("L", {1, 2, 3}), X); 828s ***** error <fcnnpredict: model does not have a 'LayerWeights' field.> ... 828s fcnnpredict (struct ("L", 1), X); 828s ***** error <fcnnpredict: 'LayerWeights' must be a cell row vector.> ... 828s fcnnpredict (struct ("LayerWeights", 1), X); 828s ***** error <fcnnpredict: 'LayerWeights' must be a cell row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {1}), X); 828s ***** error <fcnnpredict: 'LayerWeights' must be a cell row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 828s ***** error <fcnnpredict: model does not have an 'Activations' field.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 828s ***** error <fcnnpredict: 'Activations' must be a numeric row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 828s "Activations", [2]), X); 828s ***** error <fcnnpredict: 'Activations' must be a numeric row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 828s "Activations", [2; 2]), X); 828s ***** error <fcnnpredict: 'Activations' must be a numeric row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 828s "Activations", {{2, 2}}), X); 828s ***** error <fcnnpredict: 'Activations' must be a numeric row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 828s "Activations", {{"sigmoid", "softmax"}}), X); 828s ***** error <fcnnpredict: 'Activations' must be a numeric row vector.> ... 828s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 828s "Activations", "sigmoid"), X); 828s ***** error <fcnnpredict: XC must be a real numeric matrix.> ... 828s fcnnpredict (MODEL, complex (X)); 828s ***** error <fcnnpredict: XC must be a real numeric matrix.> ... 828s fcnnpredict (MODEL, {1, 2, 3, 4}); 828s ***** error <fcnnpredict: XC must be a real numeric matrix.> ... 828s fcnnpredict (MODEL, "asd"); 828s ***** error <fcnnpredict: XC cannot be empty.> ... 828s fcnnpredict (MODEL, []); 828s ***** error <fcnnpredict: the features in XC do not match the trained model.> ... 828s fcnnpredict (MODEL, X(:,[1:3])); 828s 20 tests, 20 passed, 0 known failure, 0 skipped 828s Done running the unit tests. 828s Summary: 11162 tests, 11159 passed, 1 known failures, 2 skipped 829s autopkgtest [14:05:01]: test command1: -----------------------] 830s autopkgtest [14:05:02]: test command1: - - - - - - - - - - results - - - - - - - - - - 830s command1 PASS 830s autopkgtest [14:05:02]: @@@@@@@@@@@@@@@@@@@@ summary 830s command1 PASS 848s nova [W] Using flock in prodstack6-arm64 848s Creating nova instance adt-plucky-arm64-octave-statistics-20250315-135110-juju-7f2275-prod-proposed-migration-environment-15-3125edf7-fdda-4d31-b120-7ce2f1404de9 from image adt/ubuntu-plucky-arm64-server-20250315.img (UUID bd6e766c-b51f-4b53-86d6-23aa4d18f524)... 848s nova [W] Timed out waiting for b88647f6-a941-4d10-afdd-5d0b555e4dcd to get deleted.