0s autopkgtest [21:11:52]: starting date and time: 2025-02-15 21:11:52+0000 0s autopkgtest [21:11:52]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [21:11:52]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work._9axzcbf/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc,src:iproute2,src:php-twig,src:postgresql-17,src:postgresql-common,src:roundcube --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu1 iproute2/6.13.0-1ubuntu1 php-twig/3.19.0-1 postgresql-17/17.3-2 postgresql-common/273 roundcube/1.6.10+dfsg-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@bos03-11.secgroup --name adt-plucky-amd64-octave-statistics-20250215-211152-juju-7f2275-prod-proposed-migration-environment-15-6a4a5952-c15f-43c5-9f53-6286c3818846 --image adt/ubuntu-plucky-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-proposed-migration-amd64 -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 59s autopkgtest [21:12:49]: testbed dpkg architecture: amd64 59s autopkgtest [21:12:49]: testbed apt version: 2.9.28 59s autopkgtest [21:12:50]: @@@@@@@@@@@@@@@@@@@@ test bed setup 59s autopkgtest [21:12:50]: testbed release detected to be: None 59s autopkgtest [21:12:51]: updating testbed package index (apt update) 59s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 59s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 59s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 59s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 60s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [13.1 kB] 60s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [3120 B] 60s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [62.8 kB] 60s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [820 kB] 60s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [82.9 kB] 60s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [65.0 kB] 60s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 Packages [7984 B] 60s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/restricted i386 Packages [2412 B] 60s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [844 kB] 60s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [303 kB] 60s Get:15 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [10.3 kB] 60s Get:16 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [3520 B] 60s Fetched 2329 kB in 1s (2334 kB/s) 61s Reading package lists... 61s + lsb_release --codename --short 61s + RELEASE=plucky 61s + cat 61s + [ plucky != trusty ] 61s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::=--force-confnew dist-upgrade 61s Reading package lists... 62s Building dependency tree... 62s Reading state information... 62s Calculating upgrade... 62s The following packages will be upgraded: 62s libtasn1-6 62s 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 62s Need to get 51.2 kB of archives. 62s After this operation, 22.5 kB of additional disk space will be used. 62s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 libtasn1-6 amd64 4.20.0-2 [51.2 kB] 62s Fetched 51.2 kB in 0s (185 kB/s) 63s (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 ... 108914 files and directories currently installed.) 63s Preparing to unpack .../libtasn1-6_4.20.0-2_amd64.deb ... 63s Unpacking libtasn1-6:amd64 (4.20.0-2) over (4.19.0-3build1) ... 63s Setting up libtasn1-6:amd64 (4.20.0-2) ... 63s Processing triggers for libc-bin (2.40-4ubuntu1) ... 63s + rm /etc/apt/preferences.d/force-downgrade-to-release.pref 63s + /usr/lib/apt/apt-helper analyze-pattern ?true 63s + uname -r 63s + sed s/\./\\./g 63s + running_kernel_pattern=^linux-.*6\.12\.0-15-generic.* 63s + apt list ?obsolete 63s + tail -n+2 63s + cut -d/ -f1 63s + grep -v ^linux-.*6\.12\.0-15-generic.* 63s + true 63s + obsolete_pkgs= 63s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y purge --autoremove 63s Reading package lists... 63s Building dependency tree... 63s Reading state information... 64s 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. 64s + grep -q trusty /etc/lsb-release 64s + [ ! -d /usr/share/doc/unattended-upgrades ] 64s + [ ! -d /usr/share/doc/lxd ] 64s + [ ! -d /usr/share/doc/lxd-client ] 64s + [ ! -d /usr/share/doc/snapd ] 64s + type iptables 64s + cat 64s + chmod 755 /etc/rc.local 64s + . /etc/rc.local 64s + iptables -w -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 64s + iptables -A OUTPUT -d 10.255.255.1/32 -p tcp -j DROP 64s + iptables -A OUTPUT -d 10.255.255.2/32 -p tcp -j DROP 64s + uname -m 64s + [ x86_64 = ppc64le ] 64s + [ -d /run/systemd/system ] 64s + systemd-detect-virt --quiet --vm 64s + mkdir -p /etc/systemd/system/systemd-random-seed.service.d/ 64s + cat 64s + grep -q lz4 /etc/initramfs-tools/initramfs.conf 64s + echo COMPRESS=lz4 64s autopkgtest [21:12:56]: upgrading testbed (apt dist-upgrade and autopurge) 64s Reading package lists... 64s Building dependency tree... 64s Reading state information... 65s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 65s Starting 2 pkgProblemResolver with broken count: 0 65s Done 65s Entering ResolveByKeep 65s 65s The following packages will be upgraded: 65s iproute2 libc-bin libc-dev-bin libc6 libc6-dev locales 66s 6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 66s Need to get 11.8 MB of archives. 66s After this operation, 746 kB of additional disk space will be used. 66s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-dev-bin amd64 2.41-1ubuntu1 [24.7 kB] 66s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6-dev amd64 2.41-1ubuntu1 [2182 kB] 66s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 locales all 2.41-1ubuntu1 [4246 kB] 66s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6 amd64 2.41-1ubuntu1 [3327 kB] 66s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-bin amd64 2.41-1ubuntu1 [701 kB] 66s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 iproute2 amd64 6.13.0-1ubuntu1 [1277 kB] 67s Preconfiguring packages ... 67s Fetched 11.8 MB in 1s (11.4 MB/s) 67s (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 ... 108914 files and directories currently installed.) 67s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu1_amd64.deb ... 67s Unpacking libc-dev-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 67s Preparing to unpack .../libc6-dev_2.41-1ubuntu1_amd64.deb ... 67s Unpacking libc6-dev:amd64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 67s Preparing to unpack .../locales_2.41-1ubuntu1_all.deb ... 67s Unpacking locales (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 67s Preparing to unpack .../libc6_2.41-1ubuntu1_amd64.deb ... 67s Checking for services that may need to be restarted... 67s Checking init scripts... 67s Checking for services that may need to be restarted... 67s Checking init scripts... 68s Stopping some services possibly affected by the upgrade (will be restarted later): 68s cron: stopping...done. 68s 68s Unpacking libc6:amd64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 68s Setting up libc6:amd64 (2.41-1ubuntu1) ... 68s Checking for services that may need to be restarted... 68s Checking init scripts... 68s Restarting services possibly affected by the upgrade: 68s cron: restarting...done. 68s 68s Services restarted successfully. 68s (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 ... 108915 files and directories currently installed.) 68s Preparing to unpack .../libc-bin_2.41-1ubuntu1_amd64.deb ... 68s Unpacking libc-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 68s Setting up libc-bin (2.41-1ubuntu1) ... 68s (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 ... 108915 files and directories currently installed.) 68s Preparing to unpack .../iproute2_6.13.0-1ubuntu1_amd64.deb ... 68s Unpacking iproute2 (6.13.0-1ubuntu1) over (6.10.0-2ubuntu1) ... 69s Setting up iproute2 (6.13.0-1ubuntu1) ... 69s Setting up locales (2.41-1ubuntu1) ... 69s Installing new version of config file /etc/locale.alias ... 69s Generating locales (this might take a while)... 70s en_US.UTF-8... done 70s Generation complete. 71s Setting up libc-dev-bin (2.41-1ubuntu1) ... 71s Setting up libc6-dev:amd64 (2.41-1ubuntu1) ... 71s Processing triggers for man-db (2.13.0-1) ... 72s Processing triggers for systemd (257.2-3ubuntu1) ... 73s Reading package lists... 73s Building dependency tree... 73s Reading state information... 73s Starting pkgProblemResolver with broken count: 0 73s Starting 2 pkgProblemResolver with broken count: 0 73s Done 74s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 76s autopkgtest [21:13:08]: testbed running kernel: Linux 6.12.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 4 16:02:16 UTC 2025 76s autopkgtest [21:13:08]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 79s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (dsc) [2436 B] 79s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (tar) [1296 kB] 79s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (diff) [10.9 kB] 79s gpgv: Signature made Thu Feb 6 05:39:34 2025 UTC 79s gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 79s gpgv: issuer "rafael@debian.org" 79s gpgv: Can't check signature: No public key 79s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.2-1.dsc: no acceptable signature found 79s autopkgtest [21:13:11]: testing package octave-statistics version 1.7.2-1 79s autopkgtest [21:13:11]: build not needed 80s autopkgtest [21:13:12]: test command1: preparing testbed 81s Reading package lists... 81s Building dependency tree... 81s Reading state information... 81s Starting pkgProblemResolver with broken count: 0 81s Starting 2 pkgProblemResolver with broken count: 0 81s Done 82s The following NEW packages will be installed: 82s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 82s cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu debhelper debugedit 82s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 82s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 82s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-x86-64-linux-gnu 82s g++-x86-64-linux-gnu gcc gcc-14 gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu 82s gettext gfortran gfortran-14 gfortran-14-x86-64-linux-gnu 82s gfortran-x86-64-linux-gnu gnuplot-data gnuplot-nox hdf5-helpers 82s intltool-debian krb5-multidev libaec-dev libaec0 libalgorithm-c3-perl 82s libaliased-perl libamd3 libaom3 libapp-cmd-perl libappstream5 82s libapt-pkg-perl libarchive-zip-perl libarpack2t64 libarray-intspan-perl 82s libasan8 libasound2-data libasound2t64 libavahi-client3 libavahi-common-data 82s libavahi-common3 libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 82s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 82s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 82s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 82s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 82s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 82s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 82s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 82s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 82s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 82s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 82s libdata-validate-domain-perl libdata-validate-ip-perl 82s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 82s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 82s libdevel-stacktrace-perl libdouble-conversion3 libdrm-intel1 libdrm-radeon1 82s libduktape207 libdynaloader-functions-perl libegl-mesa0 libegl1 82s libemail-address-xs-perl libencode-locale-perl liberror-perl 82s libevent-2.1-7t64 libexception-class-perl libexporter-lite-perl 82s libexporter-tiny-perl libfftw3-bin libfftw3-dev libfftw3-double3 82s libfftw3-long3 libfftw3-quad3 libfftw3-single3 libfile-basedir-perl 82s libfile-find-rule-perl libfile-homedir-perl libfile-listing-perl 82s libfile-sharedir-perl libfile-stripnondeterminism-perl libfile-which-perl 82s libflac12t64 libfltk-gl1.3t64 libfltk1.3t64 libfont-ttf-perl libfontconfig1 82s libfontenc1 libgbm1 libgcc-14-dev libgd3 libgetopt-long-descriptive-perl 82s libgfortran-14-dev libgfortran5 libgl-dev libgl1 libgl1-mesa-dri libgl2ps1.4 82s libglapi-mesa libglpk40 libglu1-mesa libglvnd0 libglx-dev libglx-mesa0 82s libglx0 libgmp-dev libgmpxx4ldbl libgnutls-dane0t64 libgnutls-openssl27t64 82s libgnutls28-dev libgomp1 libgraphicsmagick++-q16-12t64 82s libgraphicsmagick-q16-3t64 libgraphite2-3 libgssrpc4t64 libharfbuzz0b 82s libhash-merge-perl libhdf5-310 libhdf5-cpp-310 libhdf5-dev 82s libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 libhdf5-hl-fortran-310 82s libheif-plugin-aomdec libheif-plugin-libde265 libheif1 libhtml-form-perl 82s libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl 82s libhtml-tokeparser-simple-perl libhtml-tree-perl libhttp-cookies-perl 82s libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhwasan0 82s libhwy1t64 libice6 libidn2-dev libimagequant0 libimport-into-perl 82s libindirect-perl libinput-bin libinput10 libio-html-perl 82s libio-interactive-perl libio-socket-ssl-perl libio-string-perl 82s libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 82s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 82s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 82s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 82s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 82s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 82s liblist-compare-perl liblist-moreutils-perl liblist-moreutils-xs-perl 82s liblist-someutils-perl liblist-utilsby-perl liblog-any-adapter-screen-perl 82s liblog-any-perl liblog-log4perl-perl liblsan0 libltdl7 liblua5.4-0 82s liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl 82s libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 82s libmodule-implementation-perl libmodule-pluggable-perl 82s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 82s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 82s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 82s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 82s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 82s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 82s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 82s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 82s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 82s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 82s libpath-iterator-rule-perl libpath-tiny-perl libpciaccess0 libpcre2-16-0 82s libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 libpkgconf3 82s libpod-constants-perl libpod-parser-perl libpod-pom-perl libportaudio2 82s libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 libqrupdate1 82s libqscintilla2-qt6-15 libqscintilla2-qt6-l10n libqt6core5compat6 82s libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 libqt6network6 82s libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 libqt6sql6 82s libqt6widgets6 libqt6xml6 libquadmath0 libraqm0 libreadline-dev 82s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 82s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 82s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 82s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 82s libsoftware-license-perl libsoftware-licensemoreutils-perl 82s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 82s libstemmer0d libstrictures-perl libstring-copyright-perl 82s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 82s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 82s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 82s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 82s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 82s libtext-glob-perl libtext-levenshtein-damerau-perl 82s libtext-levenshteinxs-perl libtext-markdown-discount-perl 82s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 82s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 82s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 82s libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 libunbound8 82s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 82s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 82s libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 82s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 82s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 82s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 82s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 82s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 82s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 82s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 82s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 82s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 82s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 82s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 82s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 82s octave-common octave-dev octave-io octave-statistics 82s octave-statistics-common patchutils perl-openssl-defaults pkgconf 82s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 82s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 82s xtrans-dev xvfb zlib1g-dev 82s 0 upgraded, 479 newly installed, 0 to remove and 0 not upgraded. 82s Need to get 206 MB of archives. 82s After this operation, 728 MB of additional disk space will be used. 82s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 libstemmer0d amd64 2.2.0-4build1 [161 kB] 83s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libappstream5 amd64 1.0.4-1 [247 kB] 83s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 appstream amd64 1.0.4-1 [74.8 kB] 83s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 m4 amd64 1.4.19-5 [263 kB] 83s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 autoconf all 2.72-3 [382 kB] 83s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 autotools-dev all 20220109.1 [44.9 kB] 83s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 automake all 1:1.17-3 [572 kB] 83s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 autopoint all 0.23.1-1 [619 kB] 83s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libcapture-tiny-perl all 0.50-1 [20.7 kB] 83s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-util-perl amd64 1.102-3build1 [21.4 kB] 83s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-install-perl all 0.929-1 [9764 B] 83s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-optlist-perl all 0.114-1 [9708 B] 83s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-op-check-perl amd64 0.22-3build2 [9624 B] 83s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 83s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-callchecker-perl amd64 0.009-1build1 [14.2 kB] 83s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-classify-perl amd64 0.015-2build6 [20.1 kB] 83s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 83s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 libtry-tiny-perl all 0.32-1 [21.2 kB] 83s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-implementation-perl all 0.09-2 [12.0 kB] 83s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libpackage-stash-perl all 0.40-1 [19.5 kB] 83s Get:21 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclass-load-perl all 0.25-2 [12.7 kB] 83s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-stringy-perl all 2.113-2 [45.3 kB] 83s Get:23 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparams-validate-perl amd64 1.31-2build4 [53.7 kB] 83s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-exporter-perl all 0.990-1 [49.0 kB] 83s Get:25 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 83s Get:26 http://ftpmaster.internal/ubuntu plucky/universe amd64 libio-tiecombine-perl all 1.005-3 [9464 B] 83s Get:27 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmodule-pluggable-perl all 5.2-5 [19.5 kB] 83s Get:28 http://ftpmaster.internal/ubuntu plucky/universe amd64 libstring-rewriteprefix-perl all 0.009-1 [6310 B] 83s Get:29 http://ftpmaster.internal/ubuntu plucky/universe amd64 libapp-cmd-perl all 0.337-2 [58.3 kB] 83s Get:30 http://ftpmaster.internal/ubuntu plucky/universe amd64 libboolean-perl all 0.46-3 [8430 B] 83s Get:31 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsub-uplevel-perl all 0.2800-3 [11.6 kB] 83s Get:32 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtest-exception-perl all 0.43-3 [13.4 kB] 83s Get:33 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 83s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-which-perl all 1.27-2 [12.5 kB] 83s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-homedir-perl all 1.006-2 [37.0 kB] 83s Get:36 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclone-choose-perl all 0.010-2 [7738 B] 83s Get:37 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhash-merge-perl all 0.302-1 [13.0 kB] 83s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libjson-perl all 4.10000-1 [81.9 kB] 83s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libexporter-tiny-perl all 1.006002-1 [36.8 kB] 83s Get:40 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblist-moreutils-xs-perl amd64 0.430-4build1 [42.9 kB] 83s Get:41 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblist-moreutils-perl all 0.430-2 [38.2 kB] 83s Get:42 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblog-log4perl-perl all 1.57-1 [345 kB] 83s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libmouse-perl amd64 2.5.11-1build1 [134 kB] 83s Get:44 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 83s Get:45 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmousex-strictconstructor-perl all 0.02-3 [4582 B] 83s Get:46 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 83s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libpath-tiny-perl all 0.146-1 [47.5 kB] 83s Get:48 http://ftpmaster.internal/ubuntu plucky/universe amd64 libpod-pom-perl all 2.01-4 [61.3 kB] 83s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-common-perl all 2024080801-1 [162 kB] 83s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libyaml-tiny-perl all 1.76-1 [24.2 kB] 83s Get:51 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-perl all 2.155-1 [356 kB] 83s Get:52 http://ftpmaster.internal/ubuntu plucky/universe amd64 libyaml-pp-perl all 0.38.1-2 [107 kB] 83s Get:53 http://ftpmaster.internal/ubuntu plucky/universe amd64 cme all 1.041-1 [65.4 kB] 83s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 libisl23 amd64 0.27-1 [685 kB] 83s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpc3 amd64 1.3.1-1build2 [55.3 kB] 83s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu1 [11.9 MB] 84s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14 amd64 14.2.0-17ubuntu1 [1032 B] 84s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [5586 B] 84s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp amd64 4:14.2.0-1ubuntu1 [22.4 kB] 84s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 84s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 libcc1-0 amd64 14.2.0-17ubuntu1 [47.6 kB] 84s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 libgomp1 amd64 14.2.0-17ubuntu1 [148 kB] 84s Get:63 http://ftpmaster.internal/ubuntu plucky/main amd64 libitm1 amd64 14.2.0-17ubuntu1 [28.9 kB] 84s Get:64 http://ftpmaster.internal/ubuntu plucky/main amd64 libasan8 amd64 14.2.0-17ubuntu1 [2998 kB] 84s Get:65 http://ftpmaster.internal/ubuntu plucky/main amd64 liblsan0 amd64 14.2.0-17ubuntu1 [1317 kB] 84s Get:66 http://ftpmaster.internal/ubuntu plucky/main amd64 libtsan2 amd64 14.2.0-17ubuntu1 [2733 kB] 84s Get:67 http://ftpmaster.internal/ubuntu plucky/main amd64 libubsan1 amd64 14.2.0-17ubuntu1 [1177 kB] 84s Get:68 http://ftpmaster.internal/ubuntu plucky/main amd64 libhwasan0 amd64 14.2.0-17ubuntu1 [1634 kB] 84s Get:69 http://ftpmaster.internal/ubuntu plucky/main amd64 libquadmath0 amd64 14.2.0-17ubuntu1 [153 kB] 84s Get:70 http://ftpmaster.internal/ubuntu plucky/main amd64 libgcc-14-dev amd64 14.2.0-17ubuntu1 [2814 kB] 84s Get:71 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu1 [23.3 MB] 85s Get:72 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14 amd64 14.2.0-17ubuntu1 [536 kB] 85s Get:73 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1208 B] 85s Get:74 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc amd64 4:14.2.0-1ubuntu1 [5004 B] 85s Get:75 http://ftpmaster.internal/ubuntu plucky/main amd64 libtool all 2.5.4-3build1 [168 kB] 85s Get:76 http://ftpmaster.internal/ubuntu plucky/main amd64 dh-autoreconf all 20 [16.1 kB] 85s Get:77 http://ftpmaster.internal/ubuntu plucky/main amd64 libarchive-zip-perl all 1.68-1 [90.2 kB] 85s Get:78 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 85s Get:79 http://ftpmaster.internal/ubuntu plucky/main amd64 dh-strip-nondeterminism all 1.14.1-2 [5064 B] 85s Get:80 http://ftpmaster.internal/ubuntu plucky/main amd64 debugedit amd64 1:5.1-2 [47.0 kB] 85s Get:81 http://ftpmaster.internal/ubuntu plucky/main amd64 dwz amd64 0.15-1build6 [115 kB] 85s Get:82 http://ftpmaster.internal/ubuntu plucky/main amd64 gettext amd64 0.23.1-1 [1086 kB] 85s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 intltool-debian all 0.35.0+20060710.6 [23.2 kB] 85s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 po-debconf all 1.0.21+nmu1 [233 kB] 85s Get:85 http://ftpmaster.internal/ubuntu plucky/main amd64 debhelper all 13.24.1ubuntu2 [895 kB] 85s Get:86 http://ftpmaster.internal/ubuntu plucky/universe amd64 aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 85s Get:87 http://ftpmaster.internal/ubuntu plucky/universe amd64 gnuplot-data all 6.0.0+dfsg1-1ubuntu3 [75.3 kB] 85s Get:88 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 85s Get:89 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 85s Get:90 http://ftpmaster.internal/ubuntu plucky/universe amd64 fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 85s Get:91 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig-config amd64 2.15.0-1.1ubuntu2 [37.3 kB] 85s Get:92 http://ftpmaster.internal/ubuntu plucky/main amd64 libfontconfig1 amd64 2.15.0-1.1ubuntu2 [139 kB] 85s Get:93 http://ftpmaster.internal/ubuntu plucky/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 85s Get:94 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-render0 amd64 1.17.0-2 [16.2 kB] 85s Get:95 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-shm0 amd64 1.17.0-2 [5758 B] 85s Get:96 http://ftpmaster.internal/ubuntu plucky/main amd64 libxrender1 amd64 1:0.9.10-1.1build1 [19.0 kB] 85s Get:97 http://ftpmaster.internal/ubuntu plucky/main amd64 libcairo2 amd64 1.18.2-2 [569 kB] 85s Get:98 http://ftpmaster.internal/ubuntu plucky/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 85s Get:99 http://ftpmaster.internal/ubuntu plucky/main amd64 libaom3 amd64 3.12.0-1 [2742 kB] 85s Get:100 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif-plugin-aomdec amd64 1.19.5-1build1 [11.6 kB] 85s Get:101 http://ftpmaster.internal/ubuntu plucky/main amd64 libde265-0 amd64 1.0.15-1build4 [168 kB] 85s Get:102 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif-plugin-libde265 amd64 1.19.5-1build1 [9074 B] 85s Get:103 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif1 amd64 1.19.5-1build1 [422 kB] 86s Get:104 http://ftpmaster.internal/ubuntu plucky/main amd64 libimagequant0 amd64 2.18.0-1build1 [36.3 kB] 86s Get:105 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 86s Get:106 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 86s Get:107 http://ftpmaster.internal/ubuntu plucky/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 86s Get:108 http://ftpmaster.internal/ubuntu plucky/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 86s Get:109 http://ftpmaster.internal/ubuntu plucky/main amd64 libraqm0 amd64 0.10.2-1 [17.2 kB] 86s Get:110 http://ftpmaster.internal/ubuntu plucky/main amd64 libdeflate0 amd64 1.23-1 [64.1 kB] 86s Get:111 http://ftpmaster.internal/ubuntu plucky/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 86s Get:112 http://ftpmaster.internal/ubuntu plucky/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 86s Get:113 http://ftpmaster.internal/ubuntu plucky/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 86s Get:114 http://ftpmaster.internal/ubuntu plucky/main amd64 libtiff6 amd64 4.5.1+git230720-4ubuntu4 [200 kB] 86s Get:115 http://ftpmaster.internal/ubuntu plucky/main amd64 libxpm4 amd64 1:3.5.17-1build2 [36.5 kB] 86s Get:116 http://ftpmaster.internal/ubuntu plucky/main amd64 libgd3 amd64 2.3.3-12ubuntu3 [127 kB] 86s Get:117 http://ftpmaster.internal/ubuntu plucky/main amd64 liblua5.4-0 amd64 5.4.7-1 [196 kB] 86s Get:118 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig amd64 2.15.0-1.1ubuntu2 [180 kB] 86s Get:119 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai-data all 0.1.29-2build1 [158 kB] 86s Get:120 http://ftpmaster.internal/ubuntu plucky/main amd64 libdatrie1 amd64 0.2.13-3build1 [19.0 kB] 86s Get:121 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai0 amd64 0.1.29-2build1 [18.9 kB] 86s Get:122 http://ftpmaster.internal/ubuntu plucky/main amd64 libpango-1.0-0 amd64 1.56.1-1 [255 kB] 86s Get:123 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangoft2-1.0-0 amd64 1.56.1-1 [52.6 kB] 86s Get:124 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangocairo-1.0-0 amd64 1.56.1-1 [29.1 kB] 86s Get:125 http://ftpmaster.internal/ubuntu plucky/main amd64 libwebpmux3 amd64 1.5.0-0.1 [27.6 kB] 86s Get:126 http://ftpmaster.internal/ubuntu plucky/universe amd64 gnuplot-nox amd64 6.0.0+dfsg1-1ubuntu3 [989 kB] 86s Get:127 http://ftpmaster.internal/ubuntu plucky/universe amd64 dh-octave-autopkgtest all 1.8.0 [10.1 kB] 86s Get:128 http://ftpmaster.internal/ubuntu plucky/main amd64 libapt-pkg-perl amd64 0.1.40build8 [70.2 kB] 86s Get:129 http://ftpmaster.internal/ubuntu plucky/main amd64 libarray-intspan-perl all 2.004-2 [25.0 kB] 86s Get:130 http://ftpmaster.internal/ubuntu plucky/main amd64 libyaml-libyaml-perl amd64 0.903.0+ds-1 [31.0 kB] 86s Get:131 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 86s Get:132 http://ftpmaster.internal/ubuntu plucky/universe amd64 libexporter-lite-perl all 0.09-2 [9748 B] 86s Get:133 http://ftpmaster.internal/ubuntu plucky/main amd64 libencode-locale-perl all 1.05-3 [11.6 kB] 86s Get:134 http://ftpmaster.internal/ubuntu plucky/main amd64 libtimedate-perl all 2.3300-2 [34.0 kB] 86s Get:135 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-date-perl all 6.06-1 [10.2 kB] 86s Get:136 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-listing-perl all 6.16-1 [11.3 kB] 86s Get:137 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 86s Get:138 http://ftpmaster.internal/ubuntu plucky/main amd64 liburi-perl all 5.30-1 [94.4 kB] 86s Get:139 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-parser-perl amd64 3.83-1build1 [86.2 kB] 86s Get:140 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tree-perl all 5.07-3 [200 kB] 86s Get:141 http://ftpmaster.internal/ubuntu plucky/main amd64 libclone-perl amd64 0.47-1 [10.7 kB] 86s Get:142 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-html-perl all 1.004-3 [15.9 kB] 86s Get:143 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 86s Get:144 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 86s Get:145 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 86s Get:146 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 86s Get:147 http://ftpmaster.internal/ubuntu plucky/main amd64 perl-openssl-defaults amd64 7build3 [6626 B] 86s Get:148 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ssleay-perl amd64 1.94-2 [317 kB] 86s Get:149 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-socket-ssl-perl all 2.089-1 [200 kB] 86s Get:150 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-http-perl all 6.23-1 [22.3 kB] 86s Get:151 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 86s Get:152 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 86s Get:153 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-perl all 6.77-1 [138 kB] 86s Get:154 http://ftpmaster.internal/ubuntu plucky/main amd64 liberror-perl all 0.17029-2 [25.6 kB] 86s Get:155 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparse-debcontrol-perl all 2.005-6 [20.4 kB] 86s Get:156 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-copyright-perl all 0.012-2 [17.4 kB] 86s Get:157 http://ftpmaster.internal/ubuntu plucky/universe amd64 libalgorithm-c3-perl all 0.11-2 [10.2 kB] 86s Get:158 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclass-c3-perl all 0.35-2 [18.4 kB] 86s Get:159 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmro-compat-perl all 0.15-2 [10.1 kB] 86s Get:160 http://ftpmaster.internal/ubuntu plucky/universe amd64 libdata-section-perl all 0.200008-1 [11.6 kB] 86s Get:161 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-template-perl all 1.61-1 [48.5 kB] 86s Get:162 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-license-perl all 0.104006-1 [117 kB] 86s Get:163 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 86s Get:164 http://ftpmaster.internal/ubuntu plucky/main amd64 libsort-versions-perl all 1.62-3 [7378 B] 86s Get:165 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-reform-perl all 1.20-5 [35.4 kB] 86s Get:166 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-autoformat-perl all 1.750000-2 [29.8 kB] 86s Get:167 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 86s Get:168 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtoml-tiny-perl all 0.18-1 [21.6 kB] 86s Get:169 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-inspector-perl all 1.36-3 [15.4 kB] 86s Get:170 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-sharedir-perl all 1.118-3 [14.0 kB] 86s Get:171 http://ftpmaster.internal/ubuntu plucky/main amd64 libindirect-perl amd64 0.39-2build5 [22.2 kB] 87s Get:172 http://ftpmaster.internal/ubuntu plucky/main amd64 libxs-parse-keyword-perl amd64 0.48-2 [63.0 kB] 87s Get:173 http://ftpmaster.internal/ubuntu plucky/main amd64 libxs-parse-sublike-perl amd64 0.36-1 [45.0 kB] 87s Get:174 http://ftpmaster.internal/ubuntu plucky/main amd64 libobject-pad-perl amd64 0.819-1 [133 kB] 87s Get:175 http://ftpmaster.internal/ubuntu plucky/main amd64 libsyntax-keyword-try-perl amd64 0.30-1 [24.4 kB] 87s Get:176 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-interactive-perl all 1.026-1 [10.8 kB] 87s Get:177 http://ftpmaster.internal/ubuntu plucky/main amd64 liblog-any-perl all 1.717-1 [73.2 kB] 87s Get:178 http://ftpmaster.internal/ubuntu plucky/main amd64 liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 87s Get:179 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 87s Get:180 http://ftpmaster.internal/ubuntu plucky/main amd64 libvariable-magic-perl amd64 0.64-1build1 [36.3 kB] 87s Get:181 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 87s Get:182 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-identify-perl amd64 0.14-3build4 [9904 B] 87s Get:183 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-name-perl amd64 0.28-1 [10.7 kB] 87s Get:184 http://ftpmaster.internal/ubuntu plucky/main amd64 libnamespace-clean-perl all 0.27-2 [14.0 kB] 87s Get:185 http://ftpmaster.internal/ubuntu plucky/main amd64 libnumber-compare-perl all 0.03-3 [5974 B] 87s Get:186 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-glob-perl all 0.11-3 [6780 B] 87s Get:187 http://ftpmaster.internal/ubuntu plucky/main amd64 libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 87s Get:188 http://ftpmaster.internal/ubuntu plucky/main amd64 libpod-parser-perl all 1.67-1 [80.6 kB] 87s Get:189 http://ftpmaster.internal/ubuntu plucky/main amd64 libpod-constants-perl all 0.19-2 [16.3 kB] 87s Get:190 http://ftpmaster.internal/ubuntu plucky/main amd64 libset-intspan-perl all 1.19-3 [24.8 kB] 87s Get:191 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-copyright-perl all 0.003014-1 [20.5 kB] 87s Get:192 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-escape-perl all 2010.002-3 [16.1 kB] 87s Get:193 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 87s Get:194 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 87s Get:195 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 87s Get:196 http://ftpmaster.internal/ubuntu plucky/main amd64 licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 87s Get:197 http://ftpmaster.internal/ubuntu plucky/main amd64 diffstat amd64 1.67-1 [33.1 kB] 87s Get:198 http://ftpmaster.internal/ubuntu plucky/main amd64 libberkeleydb-perl amd64 0.66-1 [119 kB] 87s Get:199 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-xsaccessor-perl amd64 1.19-4build5 [33.0 kB] 87s Get:200 http://ftpmaster.internal/ubuntu plucky/main amd64 libconfig-tiny-perl all 2.30-1 [14.7 kB] 87s Get:201 http://ftpmaster.internal/ubuntu plucky/main amd64 libconst-fast-perl all 0.014-2 [8034 B] 87s Get:202 http://ftpmaster.internal/ubuntu plucky/main amd64 libcpanel-json-xs-perl amd64 4.39-1 [116 kB] 87s Get:203 http://ftpmaster.internal/ubuntu plucky/main amd64 libaliased-perl all 0.34-3 [12.8 kB] 87s Get:204 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-data-inheritable-perl all 0.10-1 [8038 B] 87s Get:205 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 87s Get:206 http://ftpmaster.internal/ubuntu plucky/main amd64 libexception-class-perl all 1.45-1 [28.6 kB] 87s Get:207 http://ftpmaster.internal/ubuntu plucky/main amd64 libiterator-perl all 0.03+ds1-2 [18.8 kB] 87s Get:208 http://ftpmaster.internal/ubuntu plucky/main amd64 libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 87s Get:209 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-dpath-perl all 0.60-1 [37.3 kB] 87s Get:210 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-domain-tld-perl all 1.75-4 [29.0 kB] 87s Get:211 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-domain-perl all 0.15-1 [10.4 kB] 87s Get:212 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 87s Get:213 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-netmask-perl all 2.0002-2 [24.8 kB] 87s Get:214 http://ftpmaster.internal/ubuntu plucky/main amd64 libnetaddr-ip-perl amd64 4.079+dfsg-2build5 [80.0 kB] 87s Get:215 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-ip-perl all 0.31-1 [17.2 kB] 87s Get:216 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-uri-perl all 0.07-3 [10.8 kB] 87s Get:217 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-size-perl amd64 0.84-1build1 [19.6 kB] 87s Get:218 http://ftpmaster.internal/ubuntu plucky/main amd64 libemail-address-xs-perl amd64 1.05-1build5 [29.5 kB] 87s Get:219 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-system-simple-perl all 1.30-2 [22.3 kB] 87s Get:220 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-basedir-perl all 0.09-2 [14.4 kB] 87s Get:221 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-find-rule-perl all 0.34-3 [24.4 kB] 87s Get:222 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-string-perl all 1.08-4 [11.1 kB] 87s Get:223 http://ftpmaster.internal/ubuntu plucky/main amd64 libfont-ttf-perl all 1.06-2 [323 kB] 88s Get:224 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 88s Get:225 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 88s Get:226 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-run3-perl all 0.049-1 [28.8 kB] 88s Get:227 http://ftpmaster.internal/ubuntu plucky/main amd64 libjson-maybexs-perl all 1.004008-1 [11.1 kB] 88s Get:228 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-compare-perl all 0.55-2 [62.9 kB] 88s Get:229 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-someutils-perl all 0.59-1 [30.4 kB] 88s Get:230 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-utilsby-perl all 0.12-2 [14.9 kB] 88s Get:231 http://ftpmaster.internal/ubuntu plucky/main amd64 libmldbm-perl all 2.05-4 [16.0 kB] 88s Get:232 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 88s Get:233 http://ftpmaster.internal/ubuntu plucky/main amd64 libimport-into-perl all 1.002005-2 [10.7 kB] 88s Get:234 http://ftpmaster.internal/ubuntu plucky/main amd64 librole-tiny-perl all 2.002004-1 [16.3 kB] 88s Get:235 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 88s Get:236 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoo-perl all 2.005005-1 [47.4 kB] 88s Get:237 http://ftpmaster.internal/ubuntu plucky/main amd64 libstrictures-perl all 2.000006-1 [16.3 kB] 88s Get:238 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoox-aliases-perl all 0.001006-2 [6796 B] 88s Get:239 http://ftpmaster.internal/ubuntu plucky/main amd64 libperlio-gzip-perl amd64 0.20-1build5 [14.8 kB] 88s Get:240 http://ftpmaster.internal/ubuntu plucky/main amd64 libperlio-utf8-strict-perl amd64 0.010-1build4 [11.1 kB] 88s Get:241 http://ftpmaster.internal/ubuntu plucky/main amd64 libproc-processtable-perl amd64 0.636-1build4 [35.9 kB] 88s Get:242 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-wildcards-perl all 1.05-3 [12.9 kB] 88s Get:243 http://ftpmaster.internal/ubuntu plucky/main amd64 libsereal-decoder-perl amd64 5.004+ds-1build4 [101 kB] 88s Get:244 http://ftpmaster.internal/ubuntu plucky/main amd64 libsereal-encoder-perl amd64 5.004+ds-1build4 [105 kB] 88s Get:245 http://ftpmaster.internal/ubuntu plucky/main amd64 libterm-readkey-perl amd64 2.38-2build5 [23.2 kB] 88s Get:246 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-levenshteinxs-perl amd64 0.03-5build5 [8116 B] 88s Get:247 http://ftpmaster.internal/ubuntu plucky/main amd64 libmarkdown2 amd64 2.2.7-2ubuntu1 [38.1 kB] 88s Get:248 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-markdown-discount-perl amd64 0.18-1 [12.4 kB] 88s Get:249 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-messagepack-perl amd64 1.02-1build5 [31.6 kB] 88s Get:250 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-xslate-perl amd64 3.5.9-2build1 [161 kB] 88s Get:251 http://ftpmaster.internal/ubuntu plucky/main amd64 libtime-duration-perl all 1.21-2 [12.3 kB] 88s Get:252 http://ftpmaster.internal/ubuntu plucky/main amd64 libtime-moment-perl amd64 0.44-2build5 [71.6 kB] 88s Get:253 http://ftpmaster.internal/ubuntu plucky/main amd64 libunicode-utf8-perl amd64 0.62-2build4 [18.3 kB] 88s Get:254 http://ftpmaster.internal/ubuntu plucky/main amd64 libcgi-pm-perl all 4.67-1 [185 kB] 88s Get:255 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-form-perl all 6.12-1 [31.1 kB] 88s Get:256 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-mechanize-perl all 2.18-1ubuntu1 [93.1 kB] 88s Get:257 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 88s Get:258 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-sax-base-perl all 1.09-3 [18.9 kB] 88s Get:259 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 88s Get:260 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-libxml-perl amd64 2.0207+dfsg+really+2.0134-5build1 [305 kB] 88s Get:261 http://ftpmaster.internal/ubuntu plucky/main amd64 lzip amd64 1.25-1 [87.1 kB] 88s Get:262 http://ftpmaster.internal/ubuntu plucky/main amd64 lzop amd64 1.04-2build3 [82.2 kB] 88s Get:263 http://ftpmaster.internal/ubuntu plucky/main amd64 patchutils amd64 0.4.2-1build3 [77.0 kB] 88s Get:264 http://ftpmaster.internal/ubuntu plucky/main amd64 t1utils amd64 1.41-4build3 [61.3 kB] 88s Get:265 http://ftpmaster.internal/ubuntu plucky/main amd64 unzip amd64 6.0-28ubuntu6 [181 kB] 88s Get:266 http://ftpmaster.internal/ubuntu plucky/main amd64 lintian all 2.121.1ubuntu1 [1073 kB] 88s Get:267 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-dpkg-perl all 3.010 [176 kB] 88s Get:268 http://ftpmaster.internal/ubuntu plucky/main amd64 libconvert-binhex-perl all 1.125-3 [27.1 kB] 88s Get:269 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-smtp-ssl-perl all 1.04-2 [6218 B] 88s Get:270 http://ftpmaster.internal/ubuntu plucky/main amd64 libmailtools-perl all 2.22-1 [77.1 kB] 88s Get:271 http://ftpmaster.internal/ubuntu plucky/main amd64 libmime-tools-perl all 5.515-1 [187 kB] 88s Get:272 http://ftpmaster.internal/ubuntu plucky/main amd64 libsuitesparseconfig7 amd64 1:7.8.3+dfsg-3 [13.5 kB] 88s Get:273 http://ftpmaster.internal/ubuntu plucky/universe amd64 libamd3 amd64 1:7.8.3+dfsg-3 [31.0 kB] 88s Get:274 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas3 amd64 3.12.1-2 [359 kB] 88s Get:275 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran5 amd64 14.2.0-17ubuntu1 [910 kB] 88s Get:276 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack3 amd64 3.12.1-2 [3179 kB] 88s Get:277 http://ftpmaster.internal/ubuntu plucky/universe amd64 libarpack2t64 amd64 3.9.1-4 [120 kB] 88s Get:278 http://ftpmaster.internal/ubuntu plucky/universe amd64 libccolamd3 amd64 1:7.8.3+dfsg-3 [27.5 kB] 88s Get:279 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcamd3 amd64 1:7.8.3+dfsg-3 [27.6 kB] 88s Get:280 http://ftpmaster.internal/ubuntu plucky/main amd64 libcolamd3 amd64 1:7.8.3+dfsg-3 [19.5 kB] 88s Get:281 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcholmod5 amd64 1:7.8.3+dfsg-3 [876 kB] 88s Get:282 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcxsparse4 amd64 1:7.8.3+dfsg-3 [83.2 kB] 88s Get:283 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-double3 amd64 3.3.10-2fakesync1build1 [839 kB] 88s Get:284 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-single3 amd64 3.3.10-2fakesync1build1 [871 kB] 88s Get:285 http://ftpmaster.internal/ubuntu plucky/main amd64 libxfixes3 amd64 1:6.0.0-2build1 [10.8 kB] 88s Get:286 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcursor1 amd64 1:1.2.3-1 [23.1 kB] 89s Get:287 http://ftpmaster.internal/ubuntu plucky/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 89s Get:288 http://ftpmaster.internal/ubuntu plucky/main amd64 libxinerama1 amd64 2:1.1.4-3build1 [6396 B] 89s Get:289 http://ftpmaster.internal/ubuntu plucky/universe amd64 libfltk1.3t64 amd64 1.3.8-6.1build2 [606 kB] 89s Get:290 http://ftpmaster.internal/ubuntu plucky/main amd64 libglvnd0 amd64 1.7.0-1build1 [69.6 kB] 89s Get:291 http://ftpmaster.internal/ubuntu plucky/main amd64 libglapi-mesa amd64 24.3.4-3ubuntu1 [42.9 kB] 89s Get:292 http://ftpmaster.internal/ubuntu plucky/main amd64 libx11-xcb1 amd64 2:1.8.10-2 [7944 B] 89s Get:293 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-dri3-0 amd64 1.17.0-2 [7508 B] 89s Get:294 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-glx0 amd64 1.17.0-2 [24.8 kB] 89s Get:295 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-present0 amd64 1.17.0-2 [6064 B] 89s Get:296 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xfixes0 amd64 1.17.0-2 [10.2 kB] 89s Get:297 http://ftpmaster.internal/ubuntu plucky/main amd64 libxxf86vm1 amd64 1:1.1.4-1build4 [9282 B] 89s Get:298 http://ftpmaster.internal/ubuntu plucky/main amd64 libpciaccess0 amd64 0.17-3build1 [18.6 kB] 89s Get:299 http://ftpmaster.internal/ubuntu plucky/main amd64 libdrm-intel1 amd64 2.4.123-1 [68.8 kB] 89s Get:300 http://ftpmaster.internal/ubuntu plucky/main amd64 libdrm-radeon1 amd64 2.4.123-1 [25.3 kB] 89s Get:301 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-randr0 amd64 1.17.0-2 [17.9 kB] 89s Get:302 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-sync1 amd64 1.17.0-2 [9312 B] 89s Get:303 http://ftpmaster.internal/ubuntu plucky/main amd64 libxshmfence1 amd64 1.3-1build5 [4764 B] 89s Get:304 http://ftpmaster.internal/ubuntu plucky/main amd64 mesa-libgallium amd64 24.3.4-3ubuntu1 [11.9 MB] 90s Get:305 http://ftpmaster.internal/ubuntu plucky/main amd64 libwayland-server0 amd64 1.23.1-1 [36.6 kB] 90s Get:306 http://ftpmaster.internal/ubuntu plucky/main amd64 libgbm1 amd64 24.3.4-3ubuntu1 [33.3 kB] 90s Get:307 http://ftpmaster.internal/ubuntu plucky/main amd64 libvulkan1 amd64 1.4.304.0-1 [147 kB] 90s Get:308 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl1-mesa-dri amd64 24.3.4-3ubuntu1 [34.7 kB] 90s Get:309 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx-mesa0 amd64 24.3.4-3ubuntu1 [146 kB] 90s Get:310 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx0 amd64 1.7.0-1build1 [38.6 kB] 90s Get:311 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl1 amd64 1.7.0-1build1 [102 kB] 90s Get:312 http://ftpmaster.internal/ubuntu plucky/universe amd64 libfltk-gl1.3t64 amd64 1.3.8-6.1build2 [43.0 kB] 90s Get:313 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgl2ps1.4 amd64 1.4.2+dfsg1-2build1 [41.9 kB] 90s Get:314 http://ftpmaster.internal/ubuntu plucky/main amd64 libltdl7 amd64 2.5.4-3build1 [46.2 kB] 90s Get:315 http://ftpmaster.internal/ubuntu plucky/universe amd64 libglpk40 amd64 5.0-1build2 [369 kB] 90s Get:316 http://ftpmaster.internal/ubuntu plucky/main amd64 libopengl0 amd64 1.7.0-1build1 [32.8 kB] 90s Get:317 http://ftpmaster.internal/ubuntu plucky/main amd64 libglu1-mesa amd64 9.0.2-1.1build1 [152 kB] 90s Get:318 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhwy1t64 amd64 1.2.0-3ubuntu3 [734 kB] 90s Get:319 http://ftpmaster.internal/ubuntu plucky/main amd64 liblcms2-2 amd64 2.16-2 [212 kB] 90s Get:320 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjxl0.11 amd64 0.11.1-1 [1363 kB] 90s Get:321 http://ftpmaster.internal/ubuntu plucky/main amd64 libwmflite-0.2-7 amd64 0.2.13-1.1build3 [68.6 kB] 90s Get:322 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgraphicsmagick-q16-3t64 amd64 1.4+really1.3.45-1build2 [1580 kB] 90s Get:323 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgraphicsmagick++-q16-12t64 amd64 1.4+really1.3.45-1build2 [116 kB] 90s Get:324 http://ftpmaster.internal/ubuntu plucky/universe amd64 libaec0 amd64 1.1.3-1 [22.7 kB] 90s Get:325 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsz2 amd64 1.1.3-1 [5456 B] 90s Get:326 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-310 amd64 1.14.5+repack-3 [1519 kB] 90s Get:327 http://ftpmaster.internal/ubuntu plucky/main amd64 libasound2-data all 1.2.13-1build1 [21.1 kB] 90s Get:328 http://ftpmaster.internal/ubuntu plucky/main amd64 libasound2t64 amd64 1.2.13-1build1 [437 kB] 90s Get:329 http://ftpmaster.internal/ubuntu plucky/main amd64 libopus0 amd64 1.5.2-2 [2913 kB] 90s Get:330 http://ftpmaster.internal/ubuntu plucky/main amd64 libsamplerate0 amd64 0.2.2-4build1 [1344 kB] 90s Get:331 http://ftpmaster.internal/ubuntu plucky/main amd64 libjack-jackd2-0 amd64 1.9.22~dfsg-4 [312 kB] 90s Get:332 http://ftpmaster.internal/ubuntu plucky/universe amd64 libportaudio2 amd64 19.6.0-1.2build3 [67.9 kB] 90s Get:333 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqhull-r8.0 amd64 2020.2-6build1 [193 kB] 90s Get:334 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqrupdate1 amd64 1.1.5-1 [50.7 kB] 90s Get:335 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 90s Get:336 http://ftpmaster.internal/ubuntu plucky/universe amd64 libb2-1 amd64 0.98.1-1.1build1 [45.0 kB] 90s Get:337 http://ftpmaster.internal/ubuntu plucky/universe amd64 libdouble-conversion3 amd64 3.3.0-1build1 [40.3 kB] 90s Get:338 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-16-0 amd64 10.42-4ubuntu3 [214 kB] 90s Get:339 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6core6t64 amd64 6.8.1+dfsg-0ubuntu4 [2131 kB] 90s Get:340 http://ftpmaster.internal/ubuntu plucky/main amd64 libwayland-client0 amd64 1.23.1-1 [29.1 kB] 90s Get:341 http://ftpmaster.internal/ubuntu plucky/main amd64 libegl-mesa0 amd64 24.3.4-3ubuntu1 [136 kB] 90s Get:342 http://ftpmaster.internal/ubuntu plucky/main amd64 libegl1 amd64 1.7.0-1build1 [28.7 kB] 90s Get:343 http://ftpmaster.internal/ubuntu plucky/main amd64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 90s Get:344 http://ftpmaster.internal/ubuntu plucky/main amd64 libice6 amd64 2:1.1.1-1 [44.1 kB] 90s Get:345 http://ftpmaster.internal/ubuntu plucky/main amd64 libmtdev1t64 amd64 1.1.7-1 [16.3 kB] 90s Get:346 http://ftpmaster.internal/ubuntu plucky/main amd64 libwacom-common all 2.14.0-1 [103 kB] 90s Get:347 http://ftpmaster.internal/ubuntu plucky/main amd64 libwacom9 amd64 2.14.0-1 [27.3 kB] 90s Get:348 http://ftpmaster.internal/ubuntu plucky/main amd64 libinput-bin amd64 1.27.1-1 [23.4 kB] 91s Get:349 http://ftpmaster.internal/ubuntu plucky/main amd64 libinput10 amd64 1.27.1-1 [155 kB] 91s Get:350 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmd4c0 amd64 0.5.2-2 [50.1 kB] 91s Get:351 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6dbus6 amd64 6.8.1+dfsg-0ubuntu4 [288 kB] 91s Get:352 http://ftpmaster.internal/ubuntu plucky/main amd64 libsm6 amd64 2:1.2.4-1 [17.4 kB] 91s Get:353 http://ftpmaster.internal/ubuntu plucky/universe amd64 libts0t64 amd64 1.22-1.1build1 [63.8 kB] 91s Get:354 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-util1 amd64 0.4.1-1 [11.2 kB] 91s Get:355 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-image0 amd64 0.4.0-2build1 [10.8 kB] 91s Get:356 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-render-util0 amd64 0.3.10-1 [10.8 kB] 91s Get:357 http://ftpmaster.internal/ubuntu plucky/universe amd64 libxcb-cursor0 amd64 0.1.5-1 [10.8 kB] 91s Get:358 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-icccm4 amd64 0.4.2-1 [11.1 kB] 91s Get:359 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-keysyms1 amd64 0.4.1-1 [8738 B] 91s Get:360 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-shape0 amd64 1.17.0-2 [6092 B] 91s Get:361 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xinput0 amd64 1.17.0-2 [33.2 kB] 91s Get:362 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xkb1 amd64 1.17.0-2 [32.3 kB] 91s Get:363 http://ftpmaster.internal/ubuntu plucky/main amd64 libxkbcommon-x11-0 amd64 1.7.0-2 [15.2 kB] 91s Get:364 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6gui6 amd64 6.8.1+dfsg-0ubuntu4 [3812 kB] 91s Get:365 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-common-data amd64 0.8-14ubuntu1 [30.5 kB] 91s Get:366 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-common3 amd64 0.8-14ubuntu1 [23.3 kB] 91s Get:367 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-client3 amd64 0.8-14ubuntu1 [27.5 kB] 91s Get:368 http://ftpmaster.internal/ubuntu plucky/main amd64 libcups2t64 amd64 2.4.11-0ubuntu2 [292 kB] 91s Get:369 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6widgets6 amd64 6.8.1+dfsg-0ubuntu4 [2987 kB] 91s Get:370 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6printsupport6 amd64 6.8.1+dfsg-0ubuntu4 [232 kB] 91s Get:371 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqscintilla2-qt6-15 amd64 2.14.1+dfsg-1build4 [1160 kB] 91s Get:372 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6core5compat6 amd64 6.8.1-0ubuntu2 [160 kB] 91s Get:373 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6sql6 amd64 6.8.1+dfsg-0ubuntu4 [150 kB] 91s Get:374 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6help6 amd64 6.8.1-0ubuntu1 [207 kB] 91s Get:375 http://ftpmaster.internal/ubuntu plucky/main amd64 libduktape207 amd64 2.7.0+tests-0ubuntu3 [143 kB] 91s Get:376 http://ftpmaster.internal/ubuntu plucky/main amd64 libproxy1v5 amd64 0.5.9-1 [27.9 kB] 91s Get:377 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6network6 amd64 6.8.1+dfsg-0ubuntu4 [896 kB] 91s Get:378 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6opengl6 amd64 6.8.1+dfsg-0ubuntu4 [463 kB] 91s Get:379 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6openglwidgets6 amd64 6.8.1+dfsg-0ubuntu4 [43.6 kB] 91s Get:380 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6xml6 amd64 6.8.1+dfsg-0ubuntu4 [84.0 kB] 91s Get:381 http://ftpmaster.internal/ubuntu plucky/main amd64 libogg0 amd64 1.3.5-3build1 [22.7 kB] 91s Get:382 http://ftpmaster.internal/ubuntu plucky/main amd64 libflac12t64 amd64 1.4.3+ds-4 [268 kB] 91s Get:383 http://ftpmaster.internal/ubuntu plucky/main amd64 libmp3lame0 amd64 3.100-6build1 [142 kB] 91s Get:384 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpg123-0t64 amd64 1.32.10-1 [191 kB] 91s Get:385 http://ftpmaster.internal/ubuntu plucky/main amd64 libvorbis0a amd64 1.3.7-2 [98.4 kB] 91s Get:386 http://ftpmaster.internal/ubuntu plucky/main amd64 libvorbisenc2 amd64 1.3.7-2 [80.8 kB] 91s Get:387 http://ftpmaster.internal/ubuntu plucky/main amd64 libsndfile1 amd64 1.2.2-2 [275 kB] 91s Get:388 http://ftpmaster.internal/ubuntu plucky/universe amd64 libspqr4 amd64 1:7.8.3+dfsg-3 [169 kB] 91s Get:389 http://ftpmaster.internal/ubuntu plucky/universe amd64 libumfpack6 amd64 1:7.8.3+dfsg-3 [337 kB] 91s Get:390 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-unidecode-perl all 1.30-3 [105 kB] 91s Get:391 http://ftpmaster.internal/ubuntu plucky/universe amd64 texinfo-lib amd64 7.1.1-1 [136 kB] 91s Get:392 http://ftpmaster.internal/ubuntu plucky/universe amd64 tex-common all 6.18 [32.8 kB] 91s Get:393 http://ftpmaster.internal/ubuntu plucky/universe amd64 texinfo all 7.1.1-1 [1272 kB] 91s Get:394 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-common all 9.4.0-1 [6087 kB] 92s Get:395 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave amd64 9.4.0-1 [10.8 MB] 92s Get:396 http://ftpmaster.internal/ubuntu plucky/main amd64 libncurses-dev amd64 6.5+20250125-2 [425 kB] 92s Get:397 http://ftpmaster.internal/ubuntu plucky/main amd64 libreadline-dev amd64 8.2-6 [184 kB] 92s Get:398 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-fortran-310 amd64 1.14.5+repack-3 [108 kB] 92s Get:399 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-310 amd64 1.14.5+repack-3 [62.6 kB] 92s Get:400 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-fortran-310 amd64 1.14.5+repack-3 [32.4 kB] 92s Get:401 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-cpp-310 amd64 1.14.5+repack-3 [129 kB] 92s Get:402 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-cpp-310 amd64 1.14.5+repack-3 [11.7 kB] 92s Get:403 http://ftpmaster.internal/ubuntu plucky/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1ubuntu1 [895 kB] 92s Get:404 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8-dev amd64 2.1.5-3ubuntu2 [324 kB] 93s Get:405 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8-dev amd64 8c-2ubuntu11 [1484 B] 93s Get:406 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-dev amd64 8c-2ubuntu11 [1482 B] 93s Get:407 http://ftpmaster.internal/ubuntu plucky/universe amd64 libaec-dev amd64 1.1.3-1 [19.8 kB] 93s Get:408 http://ftpmaster.internal/ubuntu plucky/main amd64 libbrotli-dev amd64 1.1.0-2build3 [381 kB] 93s Get:409 http://ftpmaster.internal/ubuntu plucky/main amd64 libidn2-dev amd64 2.3.7-2build2 [120 kB] 93s Get:410 http://ftpmaster.internal/ubuntu plucky/main amd64 comerr-dev amd64 2.1-1.47.2-1ubuntu1 [44.9 kB] 93s Get:411 http://ftpmaster.internal/ubuntu plucky/main amd64 libgssrpc4t64 amd64 1.21.3-4ubuntu1 [58.1 kB] 93s Get:412 http://ftpmaster.internal/ubuntu plucky/main amd64 libkadm5clnt-mit12 amd64 1.21.3-4ubuntu1 [41.3 kB] 93s Get:413 http://ftpmaster.internal/ubuntu plucky/main amd64 libkdb5-10t64 amd64 1.21.3-4ubuntu1 [41.8 kB] 93s Get:414 http://ftpmaster.internal/ubuntu plucky/main amd64 libkadm5srv-mit12 amd64 1.21.3-4ubuntu1 [55.5 kB] 93s Get:415 http://ftpmaster.internal/ubuntu plucky/main amd64 krb5-multidev amd64 1.21.3-4ubuntu1 [125 kB] 93s Get:416 http://ftpmaster.internal/ubuntu plucky/main amd64 libkrb5-dev amd64 1.21.3-4ubuntu1 [11.9 kB] 93s Get:417 http://ftpmaster.internal/ubuntu plucky/main amd64 libldap-dev amd64 2.6.9+dfsg-1~exp2ubuntu1 [335 kB] 93s Get:418 http://ftpmaster.internal/ubuntu plucky/main amd64 libpkgconf3 amd64 1.8.1-4 [32.3 kB] 93s Get:419 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf-bin amd64 1.8.1-4 [21.6 kB] 93s Get:420 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf amd64 1.8.1-4 [16.8 kB] 93s Get:421 http://ftpmaster.internal/ubuntu plucky/main amd64 libnghttp2-dev amd64 1.64.0-1 [123 kB] 93s Get:422 http://ftpmaster.internal/ubuntu plucky/main amd64 libpsl-dev amd64 0.21.2-1.1build1 [76.4 kB] 93s Get:423 http://ftpmaster.internal/ubuntu plucky/main amd64 libgmpxx4ldbl amd64 2:6.3.0+dfsg-2ubuntu7 [10.0 kB] 93s Get:424 http://ftpmaster.internal/ubuntu plucky/main amd64 libgmp-dev amd64 2:6.3.0+dfsg-2ubuntu7 [341 kB] 93s Get:425 http://ftpmaster.internal/ubuntu plucky/main amd64 libevent-2.1-7t64 amd64 2.1.12-stable-10 [144 kB] 93s Get:426 http://ftpmaster.internal/ubuntu plucky/main amd64 libunbound8 amd64 1.22.0-1ubuntu1 [519 kB] 93s Get:427 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls-dane0t64 amd64 3.8.9-2ubuntu1 [24.4 kB] 93s Get:428 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls-openssl27t64 amd64 3.8.9-2ubuntu1 [24.6 kB] 93s Get:429 http://ftpmaster.internal/ubuntu plucky/main amd64 libp11-kit-dev amd64 0.25.5-2ubuntu1 [22.7 kB] 93s Get:430 http://ftpmaster.internal/ubuntu plucky/main amd64 libtasn1-6-dev amd64 4.20.0-2 [98.1 kB] 93s Get:431 http://ftpmaster.internal/ubuntu plucky/main amd64 nettle-dev amd64 3.10-1 [1172 kB] 93s Get:432 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls28-dev amd64 3.8.9-2ubuntu1 [1114 kB] 93s Get:433 http://ftpmaster.internal/ubuntu plucky/main amd64 librtmp-dev amd64 2.4+20151223.gitfa8646d.1-2build7 [66.7 kB] 93s Get:434 http://ftpmaster.internal/ubuntu plucky/main amd64 libssl-dev amd64 3.4.0-1ubuntu2 [2874 kB] 93s Get:435 http://ftpmaster.internal/ubuntu plucky/main amd64 libssh2-1-dev amd64 1.11.1-1 [292 kB] 93s Get:436 http://ftpmaster.internal/ubuntu plucky/main amd64 libzstd-dev amd64 1.5.6+dfsg-2 [444 kB] 94s Get:437 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4-openssl-dev amd64 8.12.0+git20250209.89ed161+ds-1ubuntu1 [522 kB] 94s Get:438 http://ftpmaster.internal/ubuntu plucky/universe amd64 hdf5-helpers amd64 1.14.5+repack-3 [17.0 kB] 94s Get:439 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-dev amd64 1.14.5+repack-3 [3505 kB] 94s Get:440 http://ftpmaster.internal/ubuntu plucky/main amd64 xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 94s Get:441 http://ftpmaster.internal/ubuntu plucky/main amd64 x11proto-dev all 2024.1-1 [606 kB] 94s Get:442 http://ftpmaster.internal/ubuntu plucky/main amd64 libxau-dev amd64 1:1.0.11-1 [9798 B] 94s Get:443 http://ftpmaster.internal/ubuntu plucky/main amd64 libxdmcp-dev amd64 1:1.1.5-1 [26.7 kB] 94s Get:444 http://ftpmaster.internal/ubuntu plucky/main amd64 xtrans-dev all 1.4.0-1 [68.9 kB] 94s Get:445 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb1-dev amd64 1.17.0-2 [86.4 kB] 94s Get:446 http://ftpmaster.internal/ubuntu plucky/main amd64 libx11-dev amd64 2:1.8.10-2 [777 kB] 94s Get:447 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx-dev amd64 1.7.0-1build1 [14.2 kB] 94s Get:448 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl-dev amd64 1.7.0-1build1 [102 kB] 94s Get:449 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas-dev amd64 3.12.1-2 [338 kB] 94s Get:450 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack-dev amd64 3.12.1-2 [6489 kB] 94s Get:451 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-long3 amd64 3.3.10-2fakesync1build1 [378 kB] 94s Get:452 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-quad3 amd64 3.3.10-2fakesync1build1 [669 kB] 94s Get:453 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-bin amd64 3.3.10-2fakesync1build1 [39.2 kB] 94s Get:454 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-dev amd64 3.3.10-2fakesync1build1 [2349 kB] 94s Get:455 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran-14-dev amd64 14.2.0-17ubuntu1 [966 kB] 94s Get:456 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu1 [12.5 MB] 95s Get:457 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14 amd64 14.2.0-17ubuntu1 [13.6 kB] 95s Get:458 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1022 B] 95s Get:459 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran amd64 4:14.2.0-1ubuntu1 [1174 B] 95s Get:460 http://ftpmaster.internal/ubuntu plucky/main amd64 libstdc++-14-dev amd64 14.2.0-17ubuntu1 [2507 kB] 95s Get:461 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu1 [13.4 MB] 95s Get:462 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14 amd64 14.2.0-17ubuntu1 [21.8 kB] 95s Get:463 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [968 B] 95s Get:464 http://ftpmaster.internal/ubuntu plucky/main amd64 g++ amd64 4:14.2.0-1ubuntu1 [1100 B] 95s Get:465 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-dev amd64 9.4.0-1 [463 kB] 95s Get:466 http://ftpmaster.internal/ubuntu plucky/universe amd64 dh-octave all 1.8.0 [19.7 kB] 95s Get:467 http://ftpmaster.internal/ubuntu plucky/main amd64 libfontenc1 amd64 1:1.1.8-1build1 [14.0 kB] 95s Get:468 http://ftpmaster.internal/ubuntu plucky/main amd64 libxt6t64 amd64 1:1.2.1-1.2build1 [171 kB] 95s Get:469 http://ftpmaster.internal/ubuntu plucky/main amd64 libxmu6 amd64 2:1.1.3-3build2 [47.6 kB] 95s Get:470 http://ftpmaster.internal/ubuntu plucky/main amd64 libxaw7 amd64 2:1.0.16-1 [207 kB] 95s Get:471 http://ftpmaster.internal/ubuntu plucky/main amd64 libxfont2 amd64 1:2.0.6-1build1 [93.0 kB] 95s Get:472 http://ftpmaster.internal/ubuntu plucky/main amd64 libxkbfile1 amd64 1:1.1.0-1build4 [70.0 kB] 95s Get:473 http://ftpmaster.internal/ubuntu plucky/main amd64 libxrandr2 amd64 2:1.5.4-1 [19.6 kB] 95s Get:474 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-io amd64 2.6.4-3build2 [223 kB] 95s Get:475 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-statistics-common all 1.7.2-1 [926 kB] 95s Get:476 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-statistics amd64 1.7.2-1 [206 kB] 95s Get:477 http://ftpmaster.internal/ubuntu plucky/main amd64 x11-xkb-utils amd64 7.7+9 [169 kB] 95s Get:478 http://ftpmaster.internal/ubuntu plucky/main amd64 xserver-common all 2:21.1.14-2ubuntu1 [33.7 kB] 95s Get:479 http://ftpmaster.internal/ubuntu plucky/universe amd64 xvfb amd64 2:21.1.14-2ubuntu1 [965 kB] 96s Fetched 206 MB in 14s (14.8 MB/s) 96s Selecting previously unselected package libstemmer0d:amd64. 96s (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 ... 108916 files and directories currently installed.) 96s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_amd64.deb ... 96s Unpacking libstemmer0d:amd64 (2.2.0-4build1) ... 96s Selecting previously unselected package libappstream5:amd64. 96s Preparing to unpack .../001-libappstream5_1.0.4-1_amd64.deb ... 96s Unpacking libappstream5:amd64 (1.0.4-1) ... 96s Selecting previously unselected package appstream. 96s Preparing to unpack .../002-appstream_1.0.4-1_amd64.deb ... 96s Unpacking appstream (1.0.4-1) ... 96s Selecting previously unselected package m4. 96s Preparing to unpack .../003-m4_1.4.19-5_amd64.deb ... 96s Unpacking m4 (1.4.19-5) ... 96s Selecting previously unselected package autoconf. 96s Preparing to unpack .../004-autoconf_2.72-3_all.deb ... 96s Unpacking autoconf (2.72-3) ... 96s Selecting previously unselected package autotools-dev. 96s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 96s Unpacking autotools-dev (20220109.1) ... 96s Selecting previously unselected package automake. 97s Preparing to unpack .../006-automake_1%3a1.17-3_all.deb ... 97s Unpacking automake (1:1.17-3) ... 97s Selecting previously unselected package autopoint. 97s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 97s Unpacking autopoint (0.23.1-1) ... 97s Selecting previously unselected package libcapture-tiny-perl. 97s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 97s Unpacking libcapture-tiny-perl (0.50-1) ... 97s Selecting previously unselected package libparams-util-perl. 97s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_amd64.deb ... 97s Unpacking libparams-util-perl (1.102-3build1) ... 97s Selecting previously unselected package libsub-install-perl. 97s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 97s Unpacking libsub-install-perl (0.929-1) ... 97s Selecting previously unselected package libdata-optlist-perl. 97s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 97s Unpacking libdata-optlist-perl (0.114-1) ... 97s Selecting previously unselected package libb-hooks-op-check-perl:amd64. 97s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_amd64.deb ... 97s Unpacking libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 97s Selecting previously unselected package libdynaloader-functions-perl. 97s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 97s Unpacking libdynaloader-functions-perl (0.004-1) ... 97s Selecting previously unselected package libdevel-callchecker-perl:amd64. 97s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_amd64.deb ... 97s Unpacking libdevel-callchecker-perl:amd64 (0.009-1build1) ... 97s Selecting previously unselected package libparams-classify-perl:amd64. 97s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_amd64.deb ... 97s Unpacking libparams-classify-perl:amd64 (0.015-2build6) ... 97s Selecting previously unselected package libmodule-runtime-perl. 97s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 97s Unpacking libmodule-runtime-perl (0.016-2) ... 97s Selecting previously unselected package libtry-tiny-perl. 97s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 97s Unpacking libtry-tiny-perl (0.32-1) ... 97s Selecting previously unselected package libmodule-implementation-perl. 97s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 97s Unpacking libmodule-implementation-perl (0.09-2) ... 97s Selecting previously unselected package libpackage-stash-perl. 97s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 97s Unpacking libpackage-stash-perl (0.40-1) ... 97s Selecting previously unselected package libclass-load-perl. 97s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 97s Unpacking libclass-load-perl (0.25-2) ... 97s Selecting previously unselected package libio-stringy-perl. 97s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 97s Unpacking libio-stringy-perl (2.113-2) ... 97s Selecting previously unselected package libparams-validate-perl:amd64. 97s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_amd64.deb ... 97s Unpacking libparams-validate-perl:amd64 (1.31-2build4) ... 97s Selecting previously unselected package libsub-exporter-perl. 97s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 97s Unpacking libsub-exporter-perl (0.990-1) ... 97s Selecting previously unselected package libgetopt-long-descriptive-perl. 97s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 97s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 97s Selecting previously unselected package libio-tiecombine-perl. 97s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 97s Unpacking libio-tiecombine-perl (1.005-3) ... 97s Selecting previously unselected package libmodule-pluggable-perl. 97s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 97s Unpacking libmodule-pluggable-perl (5.2-5) ... 97s Selecting previously unselected package libstring-rewriteprefix-perl. 97s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 97s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 97s Selecting previously unselected package libapp-cmd-perl. 97s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 97s Unpacking libapp-cmd-perl (0.337-2) ... 97s Selecting previously unselected package libboolean-perl. 97s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 97s Unpacking libboolean-perl (0.46-3) ... 97s Selecting previously unselected package libsub-uplevel-perl. 97s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 97s Unpacking libsub-uplevel-perl (0.2800-3) ... 97s Selecting previously unselected package libtest-exception-perl. 97s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 97s Unpacking libtest-exception-perl (0.43-3) ... 97s Selecting previously unselected package libcarp-assert-more-perl. 97s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 97s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 97s Selecting previously unselected package libfile-which-perl. 97s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 97s Unpacking libfile-which-perl (1.27-2) ... 97s Selecting previously unselected package libfile-homedir-perl. 97s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 97s Unpacking libfile-homedir-perl (1.006-2) ... 97s Selecting previously unselected package libclone-choose-perl. 97s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 97s Unpacking libclone-choose-perl (0.010-2) ... 97s Selecting previously unselected package libhash-merge-perl. 97s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 97s Unpacking libhash-merge-perl (0.302-1) ... 97s Selecting previously unselected package libjson-perl. 97s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 97s Unpacking libjson-perl (4.10000-1) ... 97s Selecting previously unselected package libexporter-tiny-perl. 97s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 97s Unpacking libexporter-tiny-perl (1.006002-1) ... 97s Selecting previously unselected package liblist-moreutils-xs-perl. 97s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_amd64.deb ... 97s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 97s Selecting previously unselected package liblist-moreutils-perl. 97s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 97s Unpacking liblist-moreutils-perl (0.430-2) ... 97s Selecting previously unselected package liblog-log4perl-perl. 97s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 97s Unpacking liblog-log4perl-perl (1.57-1) ... 97s Selecting previously unselected package libmouse-perl:amd64. 97s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_amd64.deb ... 97s Unpacking libmouse-perl:amd64 (2.5.11-1build1) ... 98s Selecting previously unselected package libmousex-nativetraits-perl. 98s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 98s Unpacking libmousex-nativetraits-perl (1.09-3) ... 98s Selecting previously unselected package libmousex-strictconstructor-perl. 98s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 98s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 98s Selecting previously unselected package libparse-recdescent-perl. 98s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 98s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 98s Selecting previously unselected package libpath-tiny-perl. 98s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 98s Unpacking libpath-tiny-perl (0.146-1) ... 98s Selecting previously unselected package libpod-pom-perl. 98s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 98s Unpacking libpod-pom-perl (2.01-4) ... 98s Selecting previously unselected package libregexp-common-perl. 98s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 98s Unpacking libregexp-common-perl (2024080801-1) ... 98s Selecting previously unselected package libyaml-tiny-perl. 98s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 98s Unpacking libyaml-tiny-perl (1.76-1) ... 98s Selecting previously unselected package libconfig-model-perl. 98s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 98s Unpacking libconfig-model-perl (2.155-1) ... 98s Selecting previously unselected package libyaml-pp-perl. 98s Preparing to unpack .../051-libyaml-pp-perl_0.38.1-2_all.deb ... 98s Unpacking libyaml-pp-perl (0.38.1-2) ... 98s Selecting previously unselected package cme. 98s Preparing to unpack .../052-cme_1.041-1_all.deb ... 98s Unpacking cme (1.041-1) ... 98s Selecting previously unselected package libisl23:amd64. 98s Preparing to unpack .../053-libisl23_0.27-1_amd64.deb ... 98s Unpacking libisl23:amd64 (0.27-1) ... 98s Selecting previously unselected package libmpc3:amd64. 98s Preparing to unpack .../054-libmpc3_1.3.1-1build2_amd64.deb ... 98s Unpacking libmpc3:amd64 (1.3.1-1build2) ... 98s Selecting previously unselected package cpp-14-x86-64-linux-gnu. 98s Preparing to unpack .../055-cpp-14-x86-64-linux-gnu_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package cpp-14. 98s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking cpp-14 (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package cpp-x86-64-linux-gnu. 98s Preparing to unpack .../057-cpp-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 98s Unpacking cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 98s Selecting previously unselected package cpp. 98s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_amd64.deb ... 98s Unpacking cpp (4:14.2.0-1ubuntu1) ... 98s Selecting previously unselected package libdebhelper-perl. 98s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 98s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 98s Selecting previously unselected package libcc1-0:amd64. 98s Preparing to unpack .../060-libcc1-0_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking libcc1-0:amd64 (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package libgomp1:amd64. 98s Preparing to unpack .../061-libgomp1_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking libgomp1:amd64 (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package libitm1:amd64. 98s Preparing to unpack .../062-libitm1_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking libitm1:amd64 (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package libasan8:amd64. 98s Preparing to unpack .../063-libasan8_14.2.0-17ubuntu1_amd64.deb ... 98s Unpacking libasan8:amd64 (14.2.0-17ubuntu1) ... 98s Selecting previously unselected package liblsan0:amd64. 99s Preparing to unpack .../064-liblsan0_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking liblsan0:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package libtsan2:amd64. 99s Preparing to unpack .../065-libtsan2_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking libtsan2:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package libubsan1:amd64. 99s Preparing to unpack .../066-libubsan1_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking libubsan1:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package libhwasan0:amd64. 99s Preparing to unpack .../067-libhwasan0_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking libhwasan0:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package libquadmath0:amd64. 99s Preparing to unpack .../068-libquadmath0_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking libquadmath0:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package libgcc-14-dev:amd64. 99s Preparing to unpack .../069-libgcc-14-dev_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking libgcc-14-dev:amd64 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package gcc-14-x86-64-linux-gnu. 99s Preparing to unpack .../070-gcc-14-x86-64-linux-gnu_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package gcc-14. 99s Preparing to unpack .../071-gcc-14_14.2.0-17ubuntu1_amd64.deb ... 99s Unpacking gcc-14 (14.2.0-17ubuntu1) ... 99s Selecting previously unselected package gcc-x86-64-linux-gnu. 99s Preparing to unpack .../072-gcc-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 99s Unpacking gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 99s Selecting previously unselected package gcc. 99s Preparing to unpack .../073-gcc_4%3a14.2.0-1ubuntu1_amd64.deb ... 99s Unpacking gcc (4:14.2.0-1ubuntu1) ... 99s Selecting previously unselected package libtool. 99s Preparing to unpack .../074-libtool_2.5.4-3build1_all.deb ... 99s Unpacking libtool (2.5.4-3build1) ... 99s Selecting previously unselected package dh-autoreconf. 99s Preparing to unpack .../075-dh-autoreconf_20_all.deb ... 99s Unpacking dh-autoreconf (20) ... 99s Selecting previously unselected package libarchive-zip-perl. 99s Preparing to unpack .../076-libarchive-zip-perl_1.68-1_all.deb ... 99s Unpacking libarchive-zip-perl (1.68-1) ... 99s Selecting previously unselected package libfile-stripnondeterminism-perl. 99s Preparing to unpack .../077-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 99s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 100s Selecting previously unselected package dh-strip-nondeterminism. 100s Preparing to unpack .../078-dh-strip-nondeterminism_1.14.1-2_all.deb ... 100s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 100s Selecting previously unselected package debugedit. 100s Preparing to unpack .../079-debugedit_1%3a5.1-2_amd64.deb ... 100s Unpacking debugedit (1:5.1-2) ... 100s Selecting previously unselected package dwz. 100s Preparing to unpack .../080-dwz_0.15-1build6_amd64.deb ... 100s Unpacking dwz (0.15-1build6) ... 100s Selecting previously unselected package gettext. 100s Preparing to unpack .../081-gettext_0.23.1-1_amd64.deb ... 100s Unpacking gettext (0.23.1-1) ... 100s Selecting previously unselected package intltool-debian. 100s Preparing to unpack .../082-intltool-debian_0.35.0+20060710.6_all.deb ... 100s Unpacking intltool-debian (0.35.0+20060710.6) ... 100s Selecting previously unselected package po-debconf. 100s Preparing to unpack .../083-po-debconf_1.0.21+nmu1_all.deb ... 100s Unpacking po-debconf (1.0.21+nmu1) ... 100s Selecting previously unselected package debhelper. 100s Preparing to unpack .../084-debhelper_13.24.1ubuntu2_all.deb ... 100s Unpacking debhelper (13.24.1ubuntu2) ... 100s Selecting previously unselected package aglfn. 100s Preparing to unpack .../085-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 100s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 100s Selecting previously unselected package gnuplot-data. 100s Preparing to unpack .../086-gnuplot-data_6.0.0+dfsg1-1ubuntu3_all.deb ... 100s Unpacking gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 100s Selecting previously unselected package fonts-dejavu-mono. 100s Preparing to unpack .../087-fonts-dejavu-mono_2.37-8_all.deb ... 100s Unpacking fonts-dejavu-mono (2.37-8) ... 100s Selecting previously unselected package fonts-dejavu-core. 100s Preparing to unpack .../088-fonts-dejavu-core_2.37-8_all.deb ... 100s Unpacking fonts-dejavu-core (2.37-8) ... 100s Selecting previously unselected package fonts-freefont-otf. 100s Preparing to unpack .../089-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 100s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 100s Selecting previously unselected package fontconfig-config. 100s Preparing to unpack .../090-fontconfig-config_2.15.0-1.1ubuntu2_amd64.deb ... 100s Unpacking fontconfig-config (2.15.0-1.1ubuntu2) ... 100s Selecting previously unselected package libfontconfig1:amd64. 100s Preparing to unpack .../091-libfontconfig1_2.15.0-1.1ubuntu2_amd64.deb ... 100s Unpacking libfontconfig1:amd64 (2.15.0-1.1ubuntu2) ... 100s Selecting previously unselected package libpixman-1-0:amd64. 100s Preparing to unpack .../092-libpixman-1-0_0.44.0-3_amd64.deb ... 100s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 100s Selecting previously unselected package libxcb-render0:amd64. 100s Preparing to unpack .../093-libxcb-render0_1.17.0-2_amd64.deb ... 100s Unpacking libxcb-render0:amd64 (1.17.0-2) ... 100s Selecting previously unselected package libxcb-shm0:amd64. 100s Preparing to unpack .../094-libxcb-shm0_1.17.0-2_amd64.deb ... 100s Unpacking libxcb-shm0:amd64 (1.17.0-2) ... 100s Selecting previously unselected package libxrender1:amd64. 100s Preparing to unpack .../095-libxrender1_1%3a0.9.10-1.1build1_amd64.deb ... 100s Unpacking libxrender1:amd64 (1:0.9.10-1.1build1) ... 100s Selecting previously unselected package libcairo2:amd64. 100s Preparing to unpack .../096-libcairo2_1.18.2-2_amd64.deb ... 100s Unpacking libcairo2:amd64 (1.18.2-2) ... 100s Selecting previously unselected package libsharpyuv0:amd64. 101s Preparing to unpack .../097-libsharpyuv0_1.5.0-0.1_amd64.deb ... 101s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 101s Selecting previously unselected package libaom3:amd64. 101s Preparing to unpack .../098-libaom3_3.12.0-1_amd64.deb ... 101s Unpacking libaom3:amd64 (3.12.0-1) ... 101s Selecting previously unselected package libheif-plugin-aomdec:amd64. 101s Preparing to unpack .../099-libheif-plugin-aomdec_1.19.5-1build1_amd64.deb ... 101s Unpacking libheif-plugin-aomdec:amd64 (1.19.5-1build1) ... 101s Selecting previously unselected package libde265-0:amd64. 101s Preparing to unpack .../100-libde265-0_1.0.15-1build4_amd64.deb ... 101s Unpacking libde265-0:amd64 (1.0.15-1build4) ... 101s Selecting previously unselected package libheif-plugin-libde265:amd64. 101s Preparing to unpack .../101-libheif-plugin-libde265_1.19.5-1build1_amd64.deb ... 101s Unpacking libheif-plugin-libde265:amd64 (1.19.5-1build1) ... 101s Selecting previously unselected package libheif1:amd64. 101s Preparing to unpack .../102-libheif1_1.19.5-1build1_amd64.deb ... 101s Unpacking libheif1:amd64 (1.19.5-1build1) ... 101s Selecting previously unselected package libimagequant0:amd64. 101s Preparing to unpack .../103-libimagequant0_2.18.0-1build1_amd64.deb ... 101s Unpacking libimagequant0:amd64 (2.18.0-1build1) ... 101s Selecting previously unselected package libjpeg-turbo8:amd64. 101s Preparing to unpack .../104-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 101s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 101s Selecting previously unselected package libjpeg8:amd64. 101s Preparing to unpack .../105-libjpeg8_8c-2ubuntu11_amd64.deb ... 101s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 101s Selecting previously unselected package libgraphite2-3:amd64. 101s Preparing to unpack .../106-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 101s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 101s Selecting previously unselected package libharfbuzz0b:amd64. 101s Preparing to unpack .../107-libharfbuzz0b_10.2.0-1_amd64.deb ... 101s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 101s Selecting previously unselected package libraqm0:amd64. 101s Preparing to unpack .../108-libraqm0_0.10.2-1_amd64.deb ... 101s Unpacking libraqm0:amd64 (0.10.2-1) ... 101s Selecting previously unselected package libdeflate0:amd64. 101s Preparing to unpack .../109-libdeflate0_1.23-1_amd64.deb ... 101s Unpacking libdeflate0:amd64 (1.23-1) ... 101s Selecting previously unselected package libjbig0:amd64. 101s Preparing to unpack .../110-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 101s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 101s Selecting previously unselected package liblerc4:amd64. 101s Preparing to unpack .../111-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 101s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 101s Selecting previously unselected package libwebp7:amd64. 101s Preparing to unpack .../112-libwebp7_1.5.0-0.1_amd64.deb ... 101s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 101s Selecting previously unselected package libtiff6:amd64. 101s Preparing to unpack .../113-libtiff6_4.5.1+git230720-4ubuntu4_amd64.deb ... 101s Unpacking libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 101s Selecting previously unselected package libxpm4:amd64. 101s Preparing to unpack .../114-libxpm4_1%3a3.5.17-1build2_amd64.deb ... 101s Unpacking libxpm4:amd64 (1:3.5.17-1build2) ... 101s Selecting previously unselected package libgd3:amd64. 101s Preparing to unpack .../115-libgd3_2.3.3-12ubuntu3_amd64.deb ... 101s Unpacking libgd3:amd64 (2.3.3-12ubuntu3) ... 101s Selecting previously unselected package liblua5.4-0:amd64. 101s Preparing to unpack .../116-liblua5.4-0_5.4.7-1_amd64.deb ... 101s Unpacking liblua5.4-0:amd64 (5.4.7-1) ... 101s Selecting previously unselected package fontconfig. 101s Preparing to unpack .../117-fontconfig_2.15.0-1.1ubuntu2_amd64.deb ... 101s Unpacking fontconfig (2.15.0-1.1ubuntu2) ... 101s Selecting previously unselected package libthai-data. 101s Preparing to unpack .../118-libthai-data_0.1.29-2build1_all.deb ... 101s Unpacking libthai-data (0.1.29-2build1) ... 101s Selecting previously unselected package libdatrie1:amd64. 101s Preparing to unpack .../119-libdatrie1_0.2.13-3build1_amd64.deb ... 101s Unpacking libdatrie1:amd64 (0.2.13-3build1) ... 101s Selecting previously unselected package libthai0:amd64. 101s Preparing to unpack .../120-libthai0_0.1.29-2build1_amd64.deb ... 101s Unpacking libthai0:amd64 (0.1.29-2build1) ... 101s Selecting previously unselected package libpango-1.0-0:amd64. 101s Preparing to unpack .../121-libpango-1.0-0_1.56.1-1_amd64.deb ... 101s Unpacking libpango-1.0-0:amd64 (1.56.1-1) ... 101s Selecting previously unselected package libpangoft2-1.0-0:amd64. 101s Preparing to unpack .../122-libpangoft2-1.0-0_1.56.1-1_amd64.deb ... 101s Unpacking libpangoft2-1.0-0:amd64 (1.56.1-1) ... 101s Selecting previously unselected package libpangocairo-1.0-0:amd64. 101s Preparing to unpack .../123-libpangocairo-1.0-0_1.56.1-1_amd64.deb ... 101s Unpacking libpangocairo-1.0-0:amd64 (1.56.1-1) ... 102s Selecting previously unselected package libwebpmux3:amd64. 102s Preparing to unpack .../124-libwebpmux3_1.5.0-0.1_amd64.deb ... 102s Unpacking libwebpmux3:amd64 (1.5.0-0.1) ... 102s Selecting previously unselected package gnuplot-nox. 102s Preparing to unpack .../125-gnuplot-nox_6.0.0+dfsg1-1ubuntu3_amd64.deb ... 102s Unpacking gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 102s Selecting previously unselected package dh-octave-autopkgtest. 102s Preparing to unpack .../126-dh-octave-autopkgtest_1.8.0_all.deb ... 102s Unpacking dh-octave-autopkgtest (1.8.0) ... 102s Selecting previously unselected package libapt-pkg-perl. 102s Preparing to unpack .../127-libapt-pkg-perl_0.1.40build8_amd64.deb ... 102s Unpacking libapt-pkg-perl (0.1.40build8) ... 102s Selecting previously unselected package libarray-intspan-perl. 102s Preparing to unpack .../128-libarray-intspan-perl_2.004-2_all.deb ... 102s Unpacking libarray-intspan-perl (2.004-2) ... 102s Selecting previously unselected package libyaml-libyaml-perl. 102s Preparing to unpack .../129-libyaml-libyaml-perl_0.903.0+ds-1_amd64.deb ... 102s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 102s Selecting previously unselected package libconfig-model-backend-yaml-perl. 102s Preparing to unpack .../130-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 102s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 102s Selecting previously unselected package libexporter-lite-perl. 102s Preparing to unpack .../131-libexporter-lite-perl_0.09-2_all.deb ... 102s Unpacking libexporter-lite-perl (0.09-2) ... 102s Selecting previously unselected package libencode-locale-perl. 102s Preparing to unpack .../132-libencode-locale-perl_1.05-3_all.deb ... 102s Unpacking libencode-locale-perl (1.05-3) ... 102s Selecting previously unselected package libtimedate-perl. 102s Preparing to unpack .../133-libtimedate-perl_2.3300-2_all.deb ... 102s Unpacking libtimedate-perl (2.3300-2) ... 102s Selecting previously unselected package libhttp-date-perl. 102s Preparing to unpack .../134-libhttp-date-perl_6.06-1_all.deb ... 102s Unpacking libhttp-date-perl (6.06-1) ... 102s Selecting previously unselected package libfile-listing-perl. 102s Preparing to unpack .../135-libfile-listing-perl_6.16-1_all.deb ... 102s Unpacking libfile-listing-perl (6.16-1) ... 102s Selecting previously unselected package libhtml-tagset-perl. 102s Preparing to unpack .../136-libhtml-tagset-perl_3.24-1_all.deb ... 102s Unpacking libhtml-tagset-perl (3.24-1) ... 102s Selecting previously unselected package liburi-perl. 102s Preparing to unpack .../137-liburi-perl_5.30-1_all.deb ... 102s Unpacking liburi-perl (5.30-1) ... 102s Selecting previously unselected package libhtml-parser-perl:amd64. 102s Preparing to unpack .../138-libhtml-parser-perl_3.83-1build1_amd64.deb ... 102s Unpacking libhtml-parser-perl:amd64 (3.83-1build1) ... 102s Selecting previously unselected package libhtml-tree-perl. 102s Preparing to unpack .../139-libhtml-tree-perl_5.07-3_all.deb ... 102s Unpacking libhtml-tree-perl (5.07-3) ... 102s Selecting previously unselected package libclone-perl:amd64. 102s Preparing to unpack .../140-libclone-perl_0.47-1_amd64.deb ... 102s Unpacking libclone-perl:amd64 (0.47-1) ... 102s Selecting previously unselected package libio-html-perl. 102s Preparing to unpack .../141-libio-html-perl_1.004-3_all.deb ... 102s Unpacking libio-html-perl (1.004-3) ... 102s Selecting previously unselected package liblwp-mediatypes-perl. 102s Preparing to unpack .../142-liblwp-mediatypes-perl_6.04-2_all.deb ... 102s Unpacking liblwp-mediatypes-perl (6.04-2) ... 102s Selecting previously unselected package libhttp-message-perl. 102s Preparing to unpack .../143-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 102s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 102s Selecting previously unselected package libhttp-cookies-perl. 102s Preparing to unpack .../144-libhttp-cookies-perl_6.11-1_all.deb ... 102s Unpacking libhttp-cookies-perl (6.11-1) ... 102s Selecting previously unselected package libhttp-negotiate-perl. 102s Preparing to unpack .../145-libhttp-negotiate-perl_6.01-2_all.deb ... 102s Unpacking libhttp-negotiate-perl (6.01-2) ... 102s Selecting previously unselected package perl-openssl-defaults:amd64. 102s Preparing to unpack .../146-perl-openssl-defaults_7build3_amd64.deb ... 102s Unpacking perl-openssl-defaults:amd64 (7build3) ... 102s Selecting previously unselected package libnet-ssleay-perl:amd64. 102s Preparing to unpack .../147-libnet-ssleay-perl_1.94-2_amd64.deb ... 102s Unpacking libnet-ssleay-perl:amd64 (1.94-2) ... 102s Selecting previously unselected package libio-socket-ssl-perl. 102s Preparing to unpack .../148-libio-socket-ssl-perl_2.089-1_all.deb ... 102s Unpacking libio-socket-ssl-perl (2.089-1) ... 102s Selecting previously unselected package libnet-http-perl. 102s Preparing to unpack .../149-libnet-http-perl_6.23-1_all.deb ... 102s Unpacking libnet-http-perl (6.23-1) ... 102s Selecting previously unselected package liblwp-protocol-https-perl. 102s Preparing to unpack .../150-liblwp-protocol-https-perl_6.14-1_all.deb ... 102s Unpacking liblwp-protocol-https-perl (6.14-1) ... 103s Selecting previously unselected package libwww-robotrules-perl. 103s Preparing to unpack .../151-libwww-robotrules-perl_6.02-1_all.deb ... 103s Unpacking libwww-robotrules-perl (6.02-1) ... 103s Selecting previously unselected package libwww-perl. 103s Preparing to unpack .../152-libwww-perl_6.77-1_all.deb ... 103s Unpacking libwww-perl (6.77-1) ... 103s Selecting previously unselected package liberror-perl. 103s Preparing to unpack .../153-liberror-perl_0.17029-2_all.deb ... 103s Unpacking liberror-perl (0.17029-2) ... 103s Selecting previously unselected package libparse-debcontrol-perl. 103s Preparing to unpack .../154-libparse-debcontrol-perl_2.005-6_all.deb ... 103s Unpacking libparse-debcontrol-perl (2.005-6) ... 103s Selecting previously unselected package libsoftware-copyright-perl. 103s Preparing to unpack .../155-libsoftware-copyright-perl_0.012-2_all.deb ... 103s Unpacking libsoftware-copyright-perl (0.012-2) ... 103s Selecting previously unselected package libalgorithm-c3-perl. 103s Preparing to unpack .../156-libalgorithm-c3-perl_0.11-2_all.deb ... 103s Unpacking libalgorithm-c3-perl (0.11-2) ... 103s Selecting previously unselected package libclass-c3-perl. 103s Preparing to unpack .../157-libclass-c3-perl_0.35-2_all.deb ... 103s Unpacking libclass-c3-perl (0.35-2) ... 103s Selecting previously unselected package libmro-compat-perl. 103s Preparing to unpack .../158-libmro-compat-perl_0.15-2_all.deb ... 103s Unpacking libmro-compat-perl (0.15-2) ... 103s Selecting previously unselected package libdata-section-perl. 103s Preparing to unpack .../159-libdata-section-perl_0.200008-1_all.deb ... 103s Unpacking libdata-section-perl (0.200008-1) ... 103s Selecting previously unselected package libtext-template-perl. 103s Preparing to unpack .../160-libtext-template-perl_1.61-1_all.deb ... 103s Unpacking libtext-template-perl (1.61-1) ... 103s Selecting previously unselected package libsoftware-license-perl. 103s Preparing to unpack .../161-libsoftware-license-perl_0.104006-1_all.deb ... 103s Unpacking libsoftware-license-perl (0.104006-1) ... 103s Selecting previously unselected package libsoftware-licensemoreutils-perl. 103s Preparing to unpack .../162-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 103s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 103s Selecting previously unselected package libsort-versions-perl. 103s Preparing to unpack .../163-libsort-versions-perl_1.62-3_all.deb ... 103s Unpacking libsort-versions-perl (1.62-3) ... 103s Selecting previously unselected package libtext-reform-perl. 103s Preparing to unpack .../164-libtext-reform-perl_1.20-5_all.deb ... 103s Unpacking libtext-reform-perl (1.20-5) ... 103s Selecting previously unselected package libtext-autoformat-perl. 103s Preparing to unpack .../165-libtext-autoformat-perl_1.750000-2_all.deb ... 103s Unpacking libtext-autoformat-perl (1.750000-2) ... 103s Selecting previously unselected package libtext-levenshtein-damerau-perl. 103s Preparing to unpack .../166-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 103s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 103s Selecting previously unselected package libtoml-tiny-perl. 103s Preparing to unpack .../167-libtoml-tiny-perl_0.18-1_all.deb ... 103s Unpacking libtoml-tiny-perl (0.18-1) ... 103s Selecting previously unselected package libclass-inspector-perl. 103s Preparing to unpack .../168-libclass-inspector-perl_1.36-3_all.deb ... 103s Unpacking libclass-inspector-perl (1.36-3) ... 103s Selecting previously unselected package libfile-sharedir-perl. 103s Preparing to unpack .../169-libfile-sharedir-perl_1.118-3_all.deb ... 103s Unpacking libfile-sharedir-perl (1.118-3) ... 103s Selecting previously unselected package libindirect-perl. 103s Preparing to unpack .../170-libindirect-perl_0.39-2build5_amd64.deb ... 103s Unpacking libindirect-perl (0.39-2build5) ... 103s Selecting previously unselected package libxs-parse-keyword-perl. 103s Preparing to unpack .../171-libxs-parse-keyword-perl_0.48-2_amd64.deb ... 103s Unpacking libxs-parse-keyword-perl (0.48-2) ... 103s Selecting previously unselected package libxs-parse-sublike-perl:amd64. 103s Preparing to unpack .../172-libxs-parse-sublike-perl_0.36-1_amd64.deb ... 103s Unpacking libxs-parse-sublike-perl:amd64 (0.36-1) ... 103s Selecting previously unselected package libobject-pad-perl. 103s Preparing to unpack .../173-libobject-pad-perl_0.819-1_amd64.deb ... 103s Unpacking libobject-pad-perl (0.819-1) ... 103s Selecting previously unselected package libsyntax-keyword-try-perl. 103s Preparing to unpack .../174-libsyntax-keyword-try-perl_0.30-1_amd64.deb ... 103s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 103s Selecting previously unselected package libio-interactive-perl. 103s Preparing to unpack .../175-libio-interactive-perl_1.026-1_all.deb ... 103s Unpacking libio-interactive-perl (1.026-1) ... 103s Selecting previously unselected package liblog-any-perl. 103s Preparing to unpack .../176-liblog-any-perl_1.717-1_all.deb ... 103s Unpacking liblog-any-perl (1.717-1) ... 103s Selecting previously unselected package liblog-any-adapter-screen-perl. 103s Preparing to unpack .../177-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 103s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 103s Selecting previously unselected package libsub-exporter-progressive-perl. 103s Preparing to unpack .../178-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 103s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 103s Selecting previously unselected package libvariable-magic-perl. 103s Preparing to unpack .../179-libvariable-magic-perl_0.64-1build1_amd64.deb ... 103s Unpacking libvariable-magic-perl (0.64-1build1) ... 103s Selecting previously unselected package libb-hooks-endofscope-perl. 103s Preparing to unpack .../180-libb-hooks-endofscope-perl_0.28-1_all.deb ... 103s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 103s Selecting previously unselected package libsub-identify-perl. 103s Preparing to unpack .../181-libsub-identify-perl_0.14-3build4_amd64.deb ... 103s Unpacking libsub-identify-perl (0.14-3build4) ... 103s Selecting previously unselected package libsub-name-perl:amd64. 103s Preparing to unpack .../182-libsub-name-perl_0.28-1_amd64.deb ... 103s Unpacking libsub-name-perl:amd64 (0.28-1) ... 103s Selecting previously unselected package libnamespace-clean-perl. 103s Preparing to unpack .../183-libnamespace-clean-perl_0.27-2_all.deb ... 103s Unpacking libnamespace-clean-perl (0.27-2) ... 103s Selecting previously unselected package libnumber-compare-perl. 104s Preparing to unpack .../184-libnumber-compare-perl_0.03-3_all.deb ... 104s Unpacking libnumber-compare-perl (0.03-3) ... 104s Selecting previously unselected package libtext-glob-perl. 104s Preparing to unpack .../185-libtext-glob-perl_0.11-3_all.deb ... 104s Unpacking libtext-glob-perl (0.11-3) ... 104s Selecting previously unselected package libpath-iterator-rule-perl. 104s Preparing to unpack .../186-libpath-iterator-rule-perl_1.015-2_all.deb ... 104s Unpacking libpath-iterator-rule-perl (1.015-2) ... 104s Selecting previously unselected package libpod-parser-perl. 104s Preparing to unpack .../187-libpod-parser-perl_1.67-1_all.deb ... 104s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 104s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 104s Unpacking libpod-parser-perl (1.67-1) ... 104s Selecting previously unselected package libpod-constants-perl. 104s Preparing to unpack .../188-libpod-constants-perl_0.19-2_all.deb ... 104s Unpacking libpod-constants-perl (0.19-2) ... 104s Selecting previously unselected package libset-intspan-perl. 104s Preparing to unpack .../189-libset-intspan-perl_1.19-3_all.deb ... 104s Unpacking libset-intspan-perl (1.19-3) ... 104s Selecting previously unselected package libstring-copyright-perl. 104s Preparing to unpack .../190-libstring-copyright-perl_0.003014-1_all.deb ... 104s Unpacking libstring-copyright-perl (0.003014-1) ... 104s Selecting previously unselected package libstring-escape-perl. 104s Preparing to unpack .../191-libstring-escape-perl_2010.002-3_all.deb ... 104s Unpacking libstring-escape-perl (2010.002-3) ... 104s Selecting previously unselected package libregexp-pattern-license-perl. 104s Preparing to unpack .../192-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 104s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 104s Selecting previously unselected package libregexp-pattern-perl. 104s Preparing to unpack .../193-libregexp-pattern-perl_0.2.14-2_all.deb ... 104s Unpacking libregexp-pattern-perl (0.2.14-2) ... 104s Selecting previously unselected package libstring-license-perl. 104s Preparing to unpack .../194-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 104s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 104s Selecting previously unselected package licensecheck. 104s Preparing to unpack .../195-licensecheck_3.3.9-1ubuntu1_all.deb ... 104s Unpacking licensecheck (3.3.9-1ubuntu1) ... 104s Selecting previously unselected package diffstat. 104s Preparing to unpack .../196-diffstat_1.67-1_amd64.deb ... 104s Unpacking diffstat (1.67-1) ... 104s Selecting previously unselected package libberkeleydb-perl:amd64. 104s Preparing to unpack .../197-libberkeleydb-perl_0.66-1_amd64.deb ... 104s Unpacking libberkeleydb-perl:amd64 (0.66-1) ... 104s Selecting previously unselected package libclass-xsaccessor-perl. 104s Preparing to unpack .../198-libclass-xsaccessor-perl_1.19-4build5_amd64.deb ... 104s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 104s Selecting previously unselected package libconfig-tiny-perl. 104s Preparing to unpack .../199-libconfig-tiny-perl_2.30-1_all.deb ... 104s Unpacking libconfig-tiny-perl (2.30-1) ... 104s Selecting previously unselected package libconst-fast-perl. 104s Preparing to unpack .../200-libconst-fast-perl_0.014-2_all.deb ... 104s Unpacking libconst-fast-perl (0.014-2) ... 104s Selecting previously unselected package libcpanel-json-xs-perl:amd64. 104s Preparing to unpack .../201-libcpanel-json-xs-perl_4.39-1_amd64.deb ... 104s Unpacking libcpanel-json-xs-perl:amd64 (4.39-1) ... 104s Selecting previously unselected package libaliased-perl. 104s Preparing to unpack .../202-libaliased-perl_0.34-3_all.deb ... 104s Unpacking libaliased-perl (0.34-3) ... 104s Selecting previously unselected package libclass-data-inheritable-perl. 104s Preparing to unpack .../203-libclass-data-inheritable-perl_0.10-1_all.deb ... 104s Unpacking libclass-data-inheritable-perl (0.10-1) ... 104s Selecting previously unselected package libdevel-stacktrace-perl. 104s Preparing to unpack .../204-libdevel-stacktrace-perl_2.0500-1_all.deb ... 104s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 104s Selecting previously unselected package libexception-class-perl. 104s Preparing to unpack .../205-libexception-class-perl_1.45-1_all.deb ... 104s Unpacking libexception-class-perl (1.45-1) ... 104s Selecting previously unselected package libiterator-perl. 104s Preparing to unpack .../206-libiterator-perl_0.03+ds1-2_all.deb ... 104s Unpacking libiterator-perl (0.03+ds1-2) ... 104s Selecting previously unselected package libiterator-util-perl. 104s Preparing to unpack .../207-libiterator-util-perl_0.02+ds1-2_all.deb ... 104s Unpacking libiterator-util-perl (0.02+ds1-2) ... 104s Selecting previously unselected package libdata-dpath-perl. 104s Preparing to unpack .../208-libdata-dpath-perl_0.60-1_all.deb ... 104s Unpacking libdata-dpath-perl (0.60-1) ... 104s Selecting previously unselected package libnet-domain-tld-perl. 104s Preparing to unpack .../209-libnet-domain-tld-perl_1.75-4_all.deb ... 104s Unpacking libnet-domain-tld-perl (1.75-4) ... 104s Selecting previously unselected package libdata-validate-domain-perl. 104s Preparing to unpack .../210-libdata-validate-domain-perl_0.15-1_all.deb ... 104s Unpacking libdata-validate-domain-perl (0.15-1) ... 104s Selecting previously unselected package libnet-ipv6addr-perl. 104s Preparing to unpack .../211-libnet-ipv6addr-perl_1.02-1_all.deb ... 104s Unpacking libnet-ipv6addr-perl (1.02-1) ... 104s Selecting previously unselected package libnet-netmask-perl. 104s Preparing to unpack .../212-libnet-netmask-perl_2.0002-2_all.deb ... 104s Unpacking libnet-netmask-perl (2.0002-2) ... 104s Selecting previously unselected package libnetaddr-ip-perl. 104s Preparing to unpack .../213-libnetaddr-ip-perl_4.079+dfsg-2build5_amd64.deb ... 104s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 104s Selecting previously unselected package libdata-validate-ip-perl. 104s Preparing to unpack .../214-libdata-validate-ip-perl_0.31-1_all.deb ... 104s Unpacking libdata-validate-ip-perl (0.31-1) ... 104s Selecting previously unselected package libdata-validate-uri-perl. 104s Preparing to unpack .../215-libdata-validate-uri-perl_0.07-3_all.deb ... 104s Unpacking libdata-validate-uri-perl (0.07-3) ... 104s Selecting previously unselected package libdevel-size-perl. 104s Preparing to unpack .../216-libdevel-size-perl_0.84-1build1_amd64.deb ... 104s Unpacking libdevel-size-perl (0.84-1build1) ... 104s Selecting previously unselected package libemail-address-xs-perl. 105s Preparing to unpack .../217-libemail-address-xs-perl_1.05-1build5_amd64.deb ... 105s Unpacking libemail-address-xs-perl (1.05-1build5) ... 105s Selecting previously unselected package libipc-system-simple-perl. 105s Preparing to unpack .../218-libipc-system-simple-perl_1.30-2_all.deb ... 105s Unpacking libipc-system-simple-perl (1.30-2) ... 105s Selecting previously unselected package libfile-basedir-perl. 105s Preparing to unpack .../219-libfile-basedir-perl_0.09-2_all.deb ... 105s Unpacking libfile-basedir-perl (0.09-2) ... 105s Selecting previously unselected package libfile-find-rule-perl. 105s Preparing to unpack .../220-libfile-find-rule-perl_0.34-3_all.deb ... 105s Unpacking libfile-find-rule-perl (0.34-3) ... 105s Selecting previously unselected package libio-string-perl. 105s Preparing to unpack .../221-libio-string-perl_1.08-4_all.deb ... 105s Unpacking libio-string-perl (1.08-4) ... 105s Selecting previously unselected package libfont-ttf-perl. 105s Preparing to unpack .../222-libfont-ttf-perl_1.06-2_all.deb ... 105s Unpacking libfont-ttf-perl (1.06-2) ... 105s Selecting previously unselected package libhtml-html5-entities-perl. 105s Preparing to unpack .../223-libhtml-html5-entities-perl_0.004-3_all.deb ... 105s Unpacking libhtml-html5-entities-perl (0.004-3) ... 105s Selecting previously unselected package libhtml-tokeparser-simple-perl. 105s Preparing to unpack .../224-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 105s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 105s Selecting previously unselected package libipc-run3-perl. 105s Preparing to unpack .../225-libipc-run3-perl_0.049-1_all.deb ... 105s Unpacking libipc-run3-perl (0.049-1) ... 105s Selecting previously unselected package libjson-maybexs-perl. 105s Preparing to unpack .../226-libjson-maybexs-perl_1.004008-1_all.deb ... 105s Unpacking libjson-maybexs-perl (1.004008-1) ... 105s Selecting previously unselected package liblist-compare-perl. 105s Preparing to unpack .../227-liblist-compare-perl_0.55-2_all.deb ... 105s Unpacking liblist-compare-perl (0.55-2) ... 105s Selecting previously unselected package liblist-someutils-perl. 105s Preparing to unpack .../228-liblist-someutils-perl_0.59-1_all.deb ... 105s Unpacking liblist-someutils-perl (0.59-1) ... 105s Selecting previously unselected package liblist-utilsby-perl. 105s Preparing to unpack .../229-liblist-utilsby-perl_0.12-2_all.deb ... 105s Unpacking liblist-utilsby-perl (0.12-2) ... 105s Selecting previously unselected package libmldbm-perl. 105s Preparing to unpack .../230-libmldbm-perl_2.05-4_all.deb ... 105s Unpacking libmldbm-perl (2.05-4) ... 105s Selecting previously unselected package libclass-method-modifiers-perl. 105s Preparing to unpack .../231-libclass-method-modifiers-perl_2.15-1_all.deb ... 105s Unpacking libclass-method-modifiers-perl (2.15-1) ... 105s Selecting previously unselected package libimport-into-perl. 105s Preparing to unpack .../232-libimport-into-perl_1.002005-2_all.deb ... 105s Unpacking libimport-into-perl (1.002005-2) ... 105s Selecting previously unselected package librole-tiny-perl. 105s Preparing to unpack .../233-librole-tiny-perl_2.002004-1_all.deb ... 105s Unpacking librole-tiny-perl (2.002004-1) ... 105s Selecting previously unselected package libsub-quote-perl. 105s Preparing to unpack .../234-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 105s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 105s Selecting previously unselected package libmoo-perl. 105s Preparing to unpack .../235-libmoo-perl_2.005005-1_all.deb ... 105s Unpacking libmoo-perl (2.005005-1) ... 105s Selecting previously unselected package libstrictures-perl. 105s Preparing to unpack .../236-libstrictures-perl_2.000006-1_all.deb ... 105s Unpacking libstrictures-perl (2.000006-1) ... 105s Selecting previously unselected package libmoox-aliases-perl. 105s Preparing to unpack .../237-libmoox-aliases-perl_0.001006-2_all.deb ... 105s Unpacking libmoox-aliases-perl (0.001006-2) ... 105s Selecting previously unselected package libperlio-gzip-perl. 105s Preparing to unpack .../238-libperlio-gzip-perl_0.20-1build5_amd64.deb ... 105s Unpacking libperlio-gzip-perl (0.20-1build5) ... 105s Selecting previously unselected package libperlio-utf8-strict-perl. 105s Preparing to unpack .../239-libperlio-utf8-strict-perl_0.010-1build4_amd64.deb ... 105s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 105s Selecting previously unselected package libproc-processtable-perl:amd64. 105s Preparing to unpack .../240-libproc-processtable-perl_0.636-1build4_amd64.deb ... 105s Unpacking libproc-processtable-perl:amd64 (0.636-1build4) ... 105s Selecting previously unselected package libregexp-wildcards-perl. 105s Preparing to unpack .../241-libregexp-wildcards-perl_1.05-3_all.deb ... 105s Unpacking libregexp-wildcards-perl (1.05-3) ... 105s Selecting previously unselected package libsereal-decoder-perl. 105s Preparing to unpack .../242-libsereal-decoder-perl_5.004+ds-1build4_amd64.deb ... 105s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 105s Selecting previously unselected package libsereal-encoder-perl. 105s Preparing to unpack .../243-libsereal-encoder-perl_5.004+ds-1build4_amd64.deb ... 105s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 105s Selecting previously unselected package libterm-readkey-perl. 105s Preparing to unpack .../244-libterm-readkey-perl_2.38-2build5_amd64.deb ... 105s Unpacking libterm-readkey-perl (2.38-2build5) ... 105s Selecting previously unselected package libtext-levenshteinxs-perl. 105s Preparing to unpack .../245-libtext-levenshteinxs-perl_0.03-5build5_amd64.deb ... 105s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 105s Selecting previously unselected package libmarkdown2:amd64. 105s Preparing to unpack .../246-libmarkdown2_2.2.7-2ubuntu1_amd64.deb ... 105s Unpacking libmarkdown2:amd64 (2.2.7-2ubuntu1) ... 105s Selecting previously unselected package libtext-markdown-discount-perl. 105s Preparing to unpack .../247-libtext-markdown-discount-perl_0.18-1_amd64.deb ... 105s Unpacking libtext-markdown-discount-perl (0.18-1) ... 105s Selecting previously unselected package libdata-messagepack-perl. 105s Preparing to unpack .../248-libdata-messagepack-perl_1.02-1build5_amd64.deb ... 105s Unpacking libdata-messagepack-perl (1.02-1build5) ... 105s Selecting previously unselected package libtext-xslate-perl:amd64. 105s Preparing to unpack .../249-libtext-xslate-perl_3.5.9-2build1_amd64.deb ... 105s Unpacking libtext-xslate-perl:amd64 (3.5.9-2build1) ... 105s Selecting previously unselected package libtime-duration-perl. 105s Preparing to unpack .../250-libtime-duration-perl_1.21-2_all.deb ... 105s Unpacking libtime-duration-perl (1.21-2) ... 105s Selecting previously unselected package libtime-moment-perl. 105s Preparing to unpack .../251-libtime-moment-perl_0.44-2build5_amd64.deb ... 105s Unpacking libtime-moment-perl (0.44-2build5) ... 105s Selecting previously unselected package libunicode-utf8-perl. 105s Preparing to unpack .../252-libunicode-utf8-perl_0.62-2build4_amd64.deb ... 105s Unpacking libunicode-utf8-perl (0.62-2build4) ... 105s Selecting previously unselected package libcgi-pm-perl. 106s Preparing to unpack .../253-libcgi-pm-perl_4.67-1_all.deb ... 106s Unpacking libcgi-pm-perl (4.67-1) ... 106s Selecting previously unselected package libhtml-form-perl. 106s Preparing to unpack .../254-libhtml-form-perl_6.12-1_all.deb ... 106s Unpacking libhtml-form-perl (6.12-1) ... 106s Selecting previously unselected package libwww-mechanize-perl. 106s Preparing to unpack .../255-libwww-mechanize-perl_2.18-1ubuntu1_all.deb ... 106s Unpacking libwww-mechanize-perl (2.18-1ubuntu1) ... 106s Selecting previously unselected package libxml-namespacesupport-perl. 106s Preparing to unpack .../256-libxml-namespacesupport-perl_1.12-2_all.deb ... 106s Unpacking libxml-namespacesupport-perl (1.12-2) ... 106s Selecting previously unselected package libxml-sax-base-perl. 106s Preparing to unpack .../257-libxml-sax-base-perl_1.09-3_all.deb ... 106s Unpacking libxml-sax-base-perl (1.09-3) ... 106s Selecting previously unselected package libxml-sax-perl. 106s Preparing to unpack .../258-libxml-sax-perl_1.02+dfsg-4_all.deb ... 106s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 106s Selecting previously unselected package libxml-libxml-perl. 106s Preparing to unpack .../259-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_amd64.deb ... 106s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 106s Selecting previously unselected package lzip. 106s Preparing to unpack .../260-lzip_1.25-1_amd64.deb ... 106s Unpacking lzip (1.25-1) ... 106s Selecting previously unselected package lzop. 106s Preparing to unpack .../261-lzop_1.04-2build3_amd64.deb ... 106s Unpacking lzop (1.04-2build3) ... 106s Selecting previously unselected package patchutils. 106s Preparing to unpack .../262-patchutils_0.4.2-1build3_amd64.deb ... 106s Unpacking patchutils (0.4.2-1build3) ... 106s Selecting previously unselected package t1utils. 106s Preparing to unpack .../263-t1utils_1.41-4build3_amd64.deb ... 106s Unpacking t1utils (1.41-4build3) ... 106s Selecting previously unselected package unzip. 106s Preparing to unpack .../264-unzip_6.0-28ubuntu6_amd64.deb ... 106s Unpacking unzip (6.0-28ubuntu6) ... 106s Selecting previously unselected package lintian. 106s Preparing to unpack .../265-lintian_2.121.1ubuntu1_all.deb ... 106s Unpacking lintian (2.121.1ubuntu1) ... 106s Selecting previously unselected package libconfig-model-dpkg-perl. 106s Preparing to unpack .../266-libconfig-model-dpkg-perl_3.010_all.deb ... 106s Unpacking libconfig-model-dpkg-perl (3.010) ... 106s Selecting previously unselected package libconvert-binhex-perl. 106s Preparing to unpack .../267-libconvert-binhex-perl_1.125-3_all.deb ... 106s Unpacking libconvert-binhex-perl (1.125-3) ... 106s Selecting previously unselected package libnet-smtp-ssl-perl. 106s Preparing to unpack .../268-libnet-smtp-ssl-perl_1.04-2_all.deb ... 106s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 106s Selecting previously unselected package libmailtools-perl. 106s Preparing to unpack .../269-libmailtools-perl_2.22-1_all.deb ... 106s Unpacking libmailtools-perl (2.22-1) ... 107s Selecting previously unselected package libmime-tools-perl. 107s Preparing to unpack .../270-libmime-tools-perl_5.515-1_all.deb ... 107s Unpacking libmime-tools-perl (5.515-1) ... 107s Selecting previously unselected package libsuitesparseconfig7:amd64. 107s Preparing to unpack .../271-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libsuitesparseconfig7:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libamd3:amd64. 107s Preparing to unpack .../272-libamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libamd3:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libblas3:amd64. 107s Preparing to unpack .../273-libblas3_3.12.1-2_amd64.deb ... 107s Unpacking libblas3:amd64 (3.12.1-2) ... 107s Selecting previously unselected package libgfortran5:amd64. 107s Preparing to unpack .../274-libgfortran5_14.2.0-17ubuntu1_amd64.deb ... 107s Unpacking libgfortran5:amd64 (14.2.0-17ubuntu1) ... 107s Selecting previously unselected package liblapack3:amd64. 107s Preparing to unpack .../275-liblapack3_3.12.1-2_amd64.deb ... 107s Unpacking liblapack3:amd64 (3.12.1-2) ... 107s Selecting previously unselected package libarpack2t64:amd64. 107s Preparing to unpack .../276-libarpack2t64_3.9.1-4_amd64.deb ... 107s Unpacking libarpack2t64:amd64 (3.9.1-4) ... 107s Selecting previously unselected package libccolamd3:amd64. 107s Preparing to unpack .../277-libccolamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libccolamd3:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libcamd3:amd64. 107s Preparing to unpack .../278-libcamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libcamd3:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libcolamd3:amd64. 107s Preparing to unpack .../279-libcolamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libcolamd3:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libcholmod5:amd64. 107s Preparing to unpack .../280-libcholmod5_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libcholmod5:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libcxsparse4:amd64. 107s Preparing to unpack .../281-libcxsparse4_1%3a7.8.3+dfsg-3_amd64.deb ... 107s Unpacking libcxsparse4:amd64 (1:7.8.3+dfsg-3) ... 107s Selecting previously unselected package libfftw3-double3:amd64. 107s Preparing to unpack .../282-libfftw3-double3_3.3.10-2fakesync1build1_amd64.deb ... 107s Unpacking libfftw3-double3:amd64 (3.3.10-2fakesync1build1) ... 107s Selecting previously unselected package libfftw3-single3:amd64. 107s Preparing to unpack .../283-libfftw3-single3_3.3.10-2fakesync1build1_amd64.deb ... 107s Unpacking libfftw3-single3:amd64 (3.3.10-2fakesync1build1) ... 107s Selecting previously unselected package libxfixes3:amd64. 107s Preparing to unpack .../284-libxfixes3_1%3a6.0.0-2build1_amd64.deb ... 107s Unpacking libxfixes3:amd64 (1:6.0.0-2build1) ... 107s Selecting previously unselected package libxcursor1:amd64. 107s Preparing to unpack .../285-libxcursor1_1%3a1.2.3-1_amd64.deb ... 107s Unpacking libxcursor1:amd64 (1:1.2.3-1) ... 107s Selecting previously unselected package libxft2:amd64. 107s Preparing to unpack .../286-libxft2_2.3.6-1build1_amd64.deb ... 107s Unpacking libxft2:amd64 (2.3.6-1build1) ... 107s Selecting previously unselected package libxinerama1:amd64. 107s Preparing to unpack .../287-libxinerama1_2%3a1.1.4-3build1_amd64.deb ... 107s Unpacking libxinerama1:amd64 (2:1.1.4-3build1) ... 107s Selecting previously unselected package libfltk1.3t64:amd64. 107s Preparing to unpack .../288-libfltk1.3t64_1.3.8-6.1build2_amd64.deb ... 107s Unpacking libfltk1.3t64:amd64 (1.3.8-6.1build2) ... 107s Selecting previously unselected package libglvnd0:amd64. 107s Preparing to unpack .../289-libglvnd0_1.7.0-1build1_amd64.deb ... 107s Unpacking libglvnd0:amd64 (1.7.0-1build1) ... 107s Selecting previously unselected package libglapi-mesa:amd64. 107s Preparing to unpack .../290-libglapi-mesa_24.3.4-3ubuntu1_amd64.deb ... 107s Unpacking libglapi-mesa:amd64 (24.3.4-3ubuntu1) ... 107s Selecting previously unselected package libx11-xcb1:amd64. 107s Preparing to unpack .../291-libx11-xcb1_2%3a1.8.10-2_amd64.deb ... 107s Unpacking libx11-xcb1:amd64 (2:1.8.10-2) ... 107s Selecting previously unselected package libxcb-dri3-0:amd64. 107s Preparing to unpack .../292-libxcb-dri3-0_1.17.0-2_amd64.deb ... 107s Unpacking libxcb-dri3-0:amd64 (1.17.0-2) ... 107s Selecting previously unselected package libxcb-glx0:amd64. 107s Preparing to unpack .../293-libxcb-glx0_1.17.0-2_amd64.deb ... 107s Unpacking libxcb-glx0:amd64 (1.17.0-2) ... 107s Selecting previously unselected package libxcb-present0:amd64. 107s Preparing to unpack .../294-libxcb-present0_1.17.0-2_amd64.deb ... 107s Unpacking libxcb-present0:amd64 (1.17.0-2) ... 107s Selecting previously unselected package libxcb-xfixes0:amd64. 107s Preparing to unpack .../295-libxcb-xfixes0_1.17.0-2_amd64.deb ... 107s Unpacking libxcb-xfixes0:amd64 (1.17.0-2) ... 107s Selecting previously unselected package libxxf86vm1:amd64. 107s Preparing to unpack .../296-libxxf86vm1_1%3a1.1.4-1build4_amd64.deb ... 107s Unpacking libxxf86vm1:amd64 (1:1.1.4-1build4) ... 107s Selecting previously unselected package libpciaccess0:amd64. 107s Preparing to unpack .../297-libpciaccess0_0.17-3build1_amd64.deb ... 107s Unpacking libpciaccess0:amd64 (0.17-3build1) ... 107s Selecting previously unselected package libdrm-intel1:amd64. 107s Preparing to unpack .../298-libdrm-intel1_2.4.123-1_amd64.deb ... 107s Unpacking libdrm-intel1:amd64 (2.4.123-1) ... 107s Selecting previously unselected package libdrm-radeon1:amd64. 107s Preparing to unpack .../299-libdrm-radeon1_2.4.123-1_amd64.deb ... 107s Unpacking libdrm-radeon1:amd64 (2.4.123-1) ... 107s Selecting previously unselected package libxcb-randr0:amd64. 107s Preparing to unpack .../300-libxcb-randr0_1.17.0-2_amd64.deb ... 107s Unpacking libxcb-randr0:amd64 (1.17.0-2) ... 108s Selecting previously unselected package libxcb-sync1:amd64. 108s Preparing to unpack .../301-libxcb-sync1_1.17.0-2_amd64.deb ... 108s Unpacking libxcb-sync1:amd64 (1.17.0-2) ... 108s Selecting previously unselected package libxshmfence1:amd64. 108s Preparing to unpack .../302-libxshmfence1_1.3-1build5_amd64.deb ... 108s Unpacking libxshmfence1:amd64 (1.3-1build5) ... 108s Selecting previously unselected package mesa-libgallium:amd64. 108s Preparing to unpack .../303-mesa-libgallium_24.3.4-3ubuntu1_amd64.deb ... 108s Unpacking mesa-libgallium:amd64 (24.3.4-3ubuntu1) ... 108s Selecting previously unselected package libwayland-server0:amd64. 108s Preparing to unpack .../304-libwayland-server0_1.23.1-1_amd64.deb ... 108s Unpacking libwayland-server0:amd64 (1.23.1-1) ... 108s Selecting previously unselected package libgbm1:amd64. 108s Preparing to unpack .../305-libgbm1_24.3.4-3ubuntu1_amd64.deb ... 108s Unpacking libgbm1:amd64 (24.3.4-3ubuntu1) ... 108s Selecting previously unselected package libvulkan1:amd64. 108s Preparing to unpack .../306-libvulkan1_1.4.304.0-1_amd64.deb ... 108s Unpacking libvulkan1:amd64 (1.4.304.0-1) ... 108s Selecting previously unselected package libgl1-mesa-dri:amd64. 108s Preparing to unpack .../307-libgl1-mesa-dri_24.3.4-3ubuntu1_amd64.deb ... 108s Unpacking libgl1-mesa-dri:amd64 (24.3.4-3ubuntu1) ... 108s Selecting previously unselected package libglx-mesa0:amd64. 108s Preparing to unpack .../308-libglx-mesa0_24.3.4-3ubuntu1_amd64.deb ... 108s Unpacking libglx-mesa0:amd64 (24.3.4-3ubuntu1) ... 108s Selecting previously unselected package libglx0:amd64. 108s Preparing to unpack .../309-libglx0_1.7.0-1build1_amd64.deb ... 108s Unpacking libglx0:amd64 (1.7.0-1build1) ... 108s Selecting previously unselected package libgl1:amd64. 108s Preparing to unpack .../310-libgl1_1.7.0-1build1_amd64.deb ... 108s Unpacking libgl1:amd64 (1.7.0-1build1) ... 108s Selecting previously unselected package libfltk-gl1.3t64:amd64. 108s Preparing to unpack .../311-libfltk-gl1.3t64_1.3.8-6.1build2_amd64.deb ... 108s Unpacking libfltk-gl1.3t64:amd64 (1.3.8-6.1build2) ... 108s Selecting previously unselected package libgl2ps1.4. 108s Preparing to unpack .../312-libgl2ps1.4_1.4.2+dfsg1-2build1_amd64.deb ... 108s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 108s Selecting previously unselected package libltdl7:amd64. 108s Preparing to unpack .../313-libltdl7_2.5.4-3build1_amd64.deb ... 108s Unpacking libltdl7:amd64 (2.5.4-3build1) ... 108s Selecting previously unselected package libglpk40:amd64. 108s Preparing to unpack .../314-libglpk40_5.0-1build2_amd64.deb ... 108s Unpacking libglpk40:amd64 (5.0-1build2) ... 108s Selecting previously unselected package libopengl0:amd64. 108s Preparing to unpack .../315-libopengl0_1.7.0-1build1_amd64.deb ... 108s Unpacking libopengl0:amd64 (1.7.0-1build1) ... 108s Selecting previously unselected package libglu1-mesa:amd64. 108s Preparing to unpack .../316-libglu1-mesa_9.0.2-1.1build1_amd64.deb ... 108s Unpacking libglu1-mesa:amd64 (9.0.2-1.1build1) ... 108s Selecting previously unselected package libhwy1t64:amd64. 108s Preparing to unpack .../317-libhwy1t64_1.2.0-3ubuntu3_amd64.deb ... 108s Unpacking libhwy1t64:amd64 (1.2.0-3ubuntu3) ... 108s Selecting previously unselected package liblcms2-2:amd64. 108s Preparing to unpack .../318-liblcms2-2_2.16-2_amd64.deb ... 108s Unpacking liblcms2-2:amd64 (2.16-2) ... 108s Selecting previously unselected package libjxl0.11:amd64. 108s Preparing to unpack .../319-libjxl0.11_0.11.1-1_amd64.deb ... 108s Unpacking libjxl0.11:amd64 (0.11.1-1) ... 108s Selecting previously unselected package libwmflite-0.2-7:amd64. 108s Preparing to unpack .../320-libwmflite-0.2-7_0.2.13-1.1build3_amd64.deb ... 108s Unpacking libwmflite-0.2-7:amd64 (0.2.13-1.1build3) ... 108s Selecting previously unselected package libgraphicsmagick-q16-3t64. 108s Preparing to unpack .../321-libgraphicsmagick-q16-3t64_1.4+really1.3.45-1build2_amd64.deb ... 108s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 108s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 108s Preparing to unpack .../322-libgraphicsmagick++-q16-12t64_1.4+really1.3.45-1build2_amd64.deb ... 108s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 108s Selecting previously unselected package libaec0:amd64. 108s Preparing to unpack .../323-libaec0_1.1.3-1_amd64.deb ... 108s Unpacking libaec0:amd64 (1.1.3-1) ... 108s Selecting previously unselected package libsz2:amd64. 108s Preparing to unpack .../324-libsz2_1.1.3-1_amd64.deb ... 108s Unpacking libsz2:amd64 (1.1.3-1) ... 108s Selecting previously unselected package libhdf5-310:amd64. 108s Preparing to unpack .../325-libhdf5-310_1.14.5+repack-3_amd64.deb ... 108s Unpacking libhdf5-310:amd64 (1.14.5+repack-3) ... 109s Selecting previously unselected package libasound2-data. 109s Preparing to unpack .../326-libasound2-data_1.2.13-1build1_all.deb ... 109s Unpacking libasound2-data (1.2.13-1build1) ... 109s Selecting previously unselected package libasound2t64:amd64. 109s Preparing to unpack .../327-libasound2t64_1.2.13-1build1_amd64.deb ... 109s Unpacking libasound2t64:amd64 (1.2.13-1build1) ... 109s Selecting previously unselected package libopus0:amd64. 109s Preparing to unpack .../328-libopus0_1.5.2-2_amd64.deb ... 109s Unpacking libopus0:amd64 (1.5.2-2) ... 109s Selecting previously unselected package libsamplerate0:amd64. 109s Preparing to unpack .../329-libsamplerate0_0.2.2-4build1_amd64.deb ... 109s Unpacking libsamplerate0:amd64 (0.2.2-4build1) ... 109s Selecting previously unselected package libjack-jackd2-0:amd64. 109s Preparing to unpack .../330-libjack-jackd2-0_1.9.22~dfsg-4_amd64.deb ... 109s Unpacking libjack-jackd2-0:amd64 (1.9.22~dfsg-4) ... 109s Selecting previously unselected package libportaudio2:amd64. 109s Preparing to unpack .../331-libportaudio2_19.6.0-1.2build3_amd64.deb ... 109s Unpacking libportaudio2:amd64 (19.6.0-1.2build3) ... 109s Selecting previously unselected package libqhull-r8.0:amd64. 109s Preparing to unpack .../332-libqhull-r8.0_2020.2-6build1_amd64.deb ... 109s Unpacking libqhull-r8.0:amd64 (2020.2-6build1) ... 109s Selecting previously unselected package libqrupdate1:amd64. 109s Preparing to unpack .../333-libqrupdate1_1.1.5-1_amd64.deb ... 109s Unpacking libqrupdate1:amd64 (1.1.5-1) ... 109s Selecting previously unselected package libqscintilla2-qt6-l10n. 109s Preparing to unpack .../334-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 109s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 109s Selecting previously unselected package libb2-1:amd64. 109s Preparing to unpack .../335-libb2-1_0.98.1-1.1build1_amd64.deb ... 109s Unpacking libb2-1:amd64 (0.98.1-1.1build1) ... 109s Selecting previously unselected package libdouble-conversion3:amd64. 109s Preparing to unpack .../336-libdouble-conversion3_3.3.0-1build1_amd64.deb ... 109s Unpacking libdouble-conversion3:amd64 (3.3.0-1build1) ... 109s Selecting previously unselected package libpcre2-16-0:amd64. 109s Preparing to unpack .../337-libpcre2-16-0_10.42-4ubuntu3_amd64.deb ... 109s Unpacking libpcre2-16-0:amd64 (10.42-4ubuntu3) ... 109s Selecting previously unselected package libqt6core6t64:amd64. 109s Preparing to unpack .../338-libqt6core6t64_6.8.1+dfsg-0ubuntu4_amd64.deb ... 109s Unpacking libqt6core6t64:amd64 (6.8.1+dfsg-0ubuntu4) ... 109s Selecting previously unselected package libwayland-client0:amd64. 109s Preparing to unpack .../339-libwayland-client0_1.23.1-1_amd64.deb ... 109s Unpacking libwayland-client0:amd64 (1.23.1-1) ... 109s Selecting previously unselected package libegl-mesa0:amd64. 109s Preparing to unpack .../340-libegl-mesa0_24.3.4-3ubuntu1_amd64.deb ... 109s Unpacking libegl-mesa0:amd64 (24.3.4-3ubuntu1) ... 109s Selecting previously unselected package libegl1:amd64. 109s Preparing to unpack .../341-libegl1_1.7.0-1build1_amd64.deb ... 109s Unpacking libegl1:amd64 (1.7.0-1build1) ... 109s Selecting previously unselected package x11-common. 109s Preparing to unpack .../342-x11-common_1%3a7.7+23ubuntu3_all.deb ... 109s Unpacking x11-common (1:7.7+23ubuntu3) ... 109s Selecting previously unselected package libice6:amd64. 109s Preparing to unpack .../343-libice6_2%3a1.1.1-1_amd64.deb ... 109s Unpacking libice6:amd64 (2:1.1.1-1) ... 109s Selecting previously unselected package libmtdev1t64:amd64. 109s Preparing to unpack .../344-libmtdev1t64_1.1.7-1_amd64.deb ... 109s Unpacking libmtdev1t64:amd64 (1.1.7-1) ... 109s Selecting previously unselected package libwacom-common. 109s Preparing to unpack .../345-libwacom-common_2.14.0-1_all.deb ... 109s Unpacking libwacom-common (2.14.0-1) ... 109s Selecting previously unselected package libwacom9:amd64. 109s Preparing to unpack .../346-libwacom9_2.14.0-1_amd64.deb ... 109s Unpacking libwacom9:amd64 (2.14.0-1) ... 109s Selecting previously unselected package libinput-bin. 109s Preparing to unpack .../347-libinput-bin_1.27.1-1_amd64.deb ... 109s Unpacking libinput-bin (1.27.1-1) ... 109s Selecting previously unselected package libinput10:amd64. 109s Preparing to unpack .../348-libinput10_1.27.1-1_amd64.deb ... 109s Unpacking libinput10:amd64 (1.27.1-1) ... 109s Selecting previously unselected package libmd4c0:amd64. 109s Preparing to unpack .../349-libmd4c0_0.5.2-2_amd64.deb ... 109s Unpacking libmd4c0:amd64 (0.5.2-2) ... 109s Selecting previously unselected package libqt6dbus6:amd64. 109s Preparing to unpack .../350-libqt6dbus6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 109s Unpacking libqt6dbus6:amd64 (6.8.1+dfsg-0ubuntu4) ... 109s Selecting previously unselected package libsm6:amd64. 109s Preparing to unpack .../351-libsm6_2%3a1.2.4-1_amd64.deb ... 109s Unpacking libsm6:amd64 (2:1.2.4-1) ... 109s Selecting previously unselected package libts0t64:amd64. 109s Preparing to unpack .../352-libts0t64_1.22-1.1build1_amd64.deb ... 109s Unpacking libts0t64:amd64 (1.22-1.1build1) ... 110s Selecting previously unselected package libxcb-util1:amd64. 110s Preparing to unpack .../353-libxcb-util1_0.4.1-1_amd64.deb ... 110s Unpacking libxcb-util1:amd64 (0.4.1-1) ... 110s Selecting previously unselected package libxcb-image0:amd64. 110s Preparing to unpack .../354-libxcb-image0_0.4.0-2build1_amd64.deb ... 110s Unpacking libxcb-image0:amd64 (0.4.0-2build1) ... 110s Selecting previously unselected package libxcb-render-util0:amd64. 110s Preparing to unpack .../355-libxcb-render-util0_0.3.10-1_amd64.deb ... 110s Unpacking libxcb-render-util0:amd64 (0.3.10-1) ... 110s Selecting previously unselected package libxcb-cursor0:amd64. 110s Preparing to unpack .../356-libxcb-cursor0_0.1.5-1_amd64.deb ... 110s Unpacking libxcb-cursor0:amd64 (0.1.5-1) ... 110s Selecting previously unselected package libxcb-icccm4:amd64. 110s Preparing to unpack .../357-libxcb-icccm4_0.4.2-1_amd64.deb ... 110s Unpacking libxcb-icccm4:amd64 (0.4.2-1) ... 110s Selecting previously unselected package libxcb-keysyms1:amd64. 110s Preparing to unpack .../358-libxcb-keysyms1_0.4.1-1_amd64.deb ... 110s Unpacking libxcb-keysyms1:amd64 (0.4.1-1) ... 110s Selecting previously unselected package libxcb-shape0:amd64. 110s Preparing to unpack .../359-libxcb-shape0_1.17.0-2_amd64.deb ... 110s Unpacking libxcb-shape0:amd64 (1.17.0-2) ... 110s Selecting previously unselected package libxcb-xinput0:amd64. 110s Preparing to unpack .../360-libxcb-xinput0_1.17.0-2_amd64.deb ... 110s Unpacking libxcb-xinput0:amd64 (1.17.0-2) ... 110s Selecting previously unselected package libxcb-xkb1:amd64. 110s Preparing to unpack .../361-libxcb-xkb1_1.17.0-2_amd64.deb ... 110s Unpacking libxcb-xkb1:amd64 (1.17.0-2) ... 110s Selecting previously unselected package libxkbcommon-x11-0:amd64. 110s Preparing to unpack .../362-libxkbcommon-x11-0_1.7.0-2_amd64.deb ... 110s Unpacking libxkbcommon-x11-0:amd64 (1.7.0-2) ... 110s Selecting previously unselected package libqt6gui6:amd64. 110s Preparing to unpack .../363-libqt6gui6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6gui6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libavahi-common-data:amd64. 110s Preparing to unpack .../364-libavahi-common-data_0.8-14ubuntu1_amd64.deb ... 110s Unpacking libavahi-common-data:amd64 (0.8-14ubuntu1) ... 110s Selecting previously unselected package libavahi-common3:amd64. 110s Preparing to unpack .../365-libavahi-common3_0.8-14ubuntu1_amd64.deb ... 110s Unpacking libavahi-common3:amd64 (0.8-14ubuntu1) ... 110s Selecting previously unselected package libavahi-client3:amd64. 110s Preparing to unpack .../366-libavahi-client3_0.8-14ubuntu1_amd64.deb ... 110s Unpacking libavahi-client3:amd64 (0.8-14ubuntu1) ... 110s Selecting previously unselected package libcups2t64:amd64. 110s Preparing to unpack .../367-libcups2t64_2.4.11-0ubuntu2_amd64.deb ... 110s Unpacking libcups2t64:amd64 (2.4.11-0ubuntu2) ... 110s Selecting previously unselected package libqt6widgets6:amd64. 110s Preparing to unpack .../368-libqt6widgets6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6widgets6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqt6printsupport6:amd64. 110s Preparing to unpack .../369-libqt6printsupport6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6printsupport6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqscintilla2-qt6-15:amd64. 110s Preparing to unpack .../370-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_amd64.deb ... 110s Unpacking libqscintilla2-qt6-15:amd64 (2.14.1+dfsg-1build4) ... 110s Selecting previously unselected package libqt6core5compat6:amd64. 110s Preparing to unpack .../371-libqt6core5compat6_6.8.1-0ubuntu2_amd64.deb ... 110s Unpacking libqt6core5compat6:amd64 (6.8.1-0ubuntu2) ... 110s Selecting previously unselected package libqt6sql6:amd64. 110s Preparing to unpack .../372-libqt6sql6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6sql6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqt6help6:amd64. 110s Preparing to unpack .../373-libqt6help6_6.8.1-0ubuntu1_amd64.deb ... 110s Unpacking libqt6help6:amd64 (6.8.1-0ubuntu1) ... 110s Selecting previously unselected package libduktape207:amd64. 110s Preparing to unpack .../374-libduktape207_2.7.0+tests-0ubuntu3_amd64.deb ... 110s Unpacking libduktape207:amd64 (2.7.0+tests-0ubuntu3) ... 110s Selecting previously unselected package libproxy1v5:amd64. 110s Preparing to unpack .../375-libproxy1v5_0.5.9-1_amd64.deb ... 110s Unpacking libproxy1v5:amd64 (0.5.9-1) ... 110s Selecting previously unselected package libqt6network6:amd64. 110s Preparing to unpack .../376-libqt6network6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6network6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqt6opengl6:amd64. 110s Preparing to unpack .../377-libqt6opengl6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6opengl6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqt6openglwidgets6:amd64. 110s Preparing to unpack .../378-libqt6openglwidgets6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6openglwidgets6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libqt6xml6:amd64. 110s Preparing to unpack .../379-libqt6xml6_6.8.1+dfsg-0ubuntu4_amd64.deb ... 110s Unpacking libqt6xml6:amd64 (6.8.1+dfsg-0ubuntu4) ... 110s Selecting previously unselected package libogg0:amd64. 110s Preparing to unpack .../380-libogg0_1.3.5-3build1_amd64.deb ... 110s Unpacking libogg0:amd64 (1.3.5-3build1) ... 111s Selecting previously unselected package libflac12t64:amd64. 111s Preparing to unpack .../381-libflac12t64_1.4.3+ds-4_amd64.deb ... 111s Unpacking libflac12t64:amd64 (1.4.3+ds-4) ... 111s Selecting previously unselected package libmp3lame0:amd64. 111s Preparing to unpack .../382-libmp3lame0_3.100-6build1_amd64.deb ... 111s Unpacking libmp3lame0:amd64 (3.100-6build1) ... 111s Selecting previously unselected package libmpg123-0t64:amd64. 111s Preparing to unpack .../383-libmpg123-0t64_1.32.10-1_amd64.deb ... 111s Unpacking libmpg123-0t64:amd64 (1.32.10-1) ... 111s Selecting previously unselected package libvorbis0a:amd64. 111s Preparing to unpack .../384-libvorbis0a_1.3.7-2_amd64.deb ... 111s Unpacking libvorbis0a:amd64 (1.3.7-2) ... 111s Selecting previously unselected package libvorbisenc2:amd64. 111s Preparing to unpack .../385-libvorbisenc2_1.3.7-2_amd64.deb ... 111s Unpacking libvorbisenc2:amd64 (1.3.7-2) ... 111s Selecting previously unselected package libsndfile1:amd64. 111s Preparing to unpack .../386-libsndfile1_1.2.2-2_amd64.deb ... 111s Unpacking libsndfile1:amd64 (1.2.2-2) ... 111s Selecting previously unselected package libspqr4:amd64. 111s Preparing to unpack .../387-libspqr4_1%3a7.8.3+dfsg-3_amd64.deb ... 111s Unpacking libspqr4:amd64 (1:7.8.3+dfsg-3) ... 111s Selecting previously unselected package libumfpack6:amd64. 111s Preparing to unpack .../388-libumfpack6_1%3a7.8.3+dfsg-3_amd64.deb ... 111s Unpacking libumfpack6:amd64 (1:7.8.3+dfsg-3) ... 111s Selecting previously unselected package libtext-unidecode-perl. 111s Preparing to unpack .../389-libtext-unidecode-perl_1.30-3_all.deb ... 111s Unpacking libtext-unidecode-perl (1.30-3) ... 111s Selecting previously unselected package texinfo-lib. 111s Preparing to unpack .../390-texinfo-lib_7.1.1-1_amd64.deb ... 111s Unpacking texinfo-lib (7.1.1-1) ... 111s Selecting previously unselected package tex-common. 111s Preparing to unpack .../391-tex-common_6.18_all.deb ... 111s Unpacking tex-common (6.18) ... 111s Selecting previously unselected package texinfo. 111s Preparing to unpack .../392-texinfo_7.1.1-1_all.deb ... 111s Unpacking texinfo (7.1.1-1) ... 111s Selecting previously unselected package octave-common. 111s Preparing to unpack .../393-octave-common_9.4.0-1_all.deb ... 111s Unpacking octave-common (9.4.0-1) ... 111s Selecting previously unselected package octave. 111s Preparing to unpack .../394-octave_9.4.0-1_amd64.deb ... 111s Unpacking octave (9.4.0-1) ... 111s Selecting previously unselected package libncurses-dev:amd64. 111s Preparing to unpack .../395-libncurses-dev_6.5+20250125-2_amd64.deb ... 111s Unpacking libncurses-dev:amd64 (6.5+20250125-2) ... 112s Selecting previously unselected package libreadline-dev:amd64. 112s Preparing to unpack .../396-libreadline-dev_8.2-6_amd64.deb ... 112s Unpacking libreadline-dev:amd64 (8.2-6) ... 112s Selecting previously unselected package libhdf5-fortran-310:amd64. 112s Preparing to unpack .../397-libhdf5-fortran-310_1.14.5+repack-3_amd64.deb ... 112s Unpacking libhdf5-fortran-310:amd64 (1.14.5+repack-3) ... 112s Selecting previously unselected package libhdf5-hl-310:amd64. 112s Preparing to unpack .../398-libhdf5-hl-310_1.14.5+repack-3_amd64.deb ... 112s Unpacking libhdf5-hl-310:amd64 (1.14.5+repack-3) ... 112s Selecting previously unselected package libhdf5-hl-fortran-310:amd64. 112s Preparing to unpack .../399-libhdf5-hl-fortran-310_1.14.5+repack-3_amd64.deb ... 112s Unpacking libhdf5-hl-fortran-310:amd64 (1.14.5+repack-3) ... 112s Selecting previously unselected package libhdf5-cpp-310:amd64. 112s Preparing to unpack .../400-libhdf5-cpp-310_1.14.5+repack-3_amd64.deb ... 112s Unpacking libhdf5-cpp-310:amd64 (1.14.5+repack-3) ... 112s Selecting previously unselected package libhdf5-hl-cpp-310:amd64. 112s Preparing to unpack .../401-libhdf5-hl-cpp-310_1.14.5+repack-3_amd64.deb ... 112s Unpacking libhdf5-hl-cpp-310:amd64 (1.14.5+repack-3) ... 112s Selecting previously unselected package zlib1g-dev:amd64. 112s Preparing to unpack .../402-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_amd64.deb ... 112s Unpacking zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 112s Selecting previously unselected package libjpeg-turbo8-dev:amd64. 112s Preparing to unpack .../403-libjpeg-turbo8-dev_2.1.5-3ubuntu2_amd64.deb ... 112s Unpacking libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 112s Selecting previously unselected package libjpeg8-dev:amd64. 112s Preparing to unpack .../404-libjpeg8-dev_8c-2ubuntu11_amd64.deb ... 112s Unpacking libjpeg8-dev:amd64 (8c-2ubuntu11) ... 112s Selecting previously unselected package libjpeg-dev:amd64. 112s Preparing to unpack .../405-libjpeg-dev_8c-2ubuntu11_amd64.deb ... 112s Unpacking libjpeg-dev:amd64 (8c-2ubuntu11) ... 112s Selecting previously unselected package libaec-dev:amd64. 112s Preparing to unpack .../406-libaec-dev_1.1.3-1_amd64.deb ... 112s Unpacking libaec-dev:amd64 (1.1.3-1) ... 112s Selecting previously unselected package libbrotli-dev:amd64. 112s Preparing to unpack .../407-libbrotli-dev_1.1.0-2build3_amd64.deb ... 112s Unpacking libbrotli-dev:amd64 (1.1.0-2build3) ... 112s Selecting previously unselected package libidn2-dev:amd64. 112s Preparing to unpack .../408-libidn2-dev_2.3.7-2build2_amd64.deb ... 112s Unpacking libidn2-dev:amd64 (2.3.7-2build2) ... 112s Selecting previously unselected package comerr-dev:amd64. 112s Preparing to unpack .../409-comerr-dev_2.1-1.47.2-1ubuntu1_amd64.deb ... 112s Unpacking comerr-dev:amd64 (2.1-1.47.2-1ubuntu1) ... 112s Selecting previously unselected package libgssrpc4t64:amd64. 112s Preparing to unpack .../410-libgssrpc4t64_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking libgssrpc4t64:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package libkadm5clnt-mit12:amd64. 112s Preparing to unpack .../411-libkadm5clnt-mit12_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking libkadm5clnt-mit12:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package libkdb5-10t64:amd64. 112s Preparing to unpack .../412-libkdb5-10t64_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking libkdb5-10t64:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package libkadm5srv-mit12:amd64. 112s Preparing to unpack .../413-libkadm5srv-mit12_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking libkadm5srv-mit12:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package krb5-multidev:amd64. 112s Preparing to unpack .../414-krb5-multidev_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking krb5-multidev:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package libkrb5-dev:amd64. 112s Preparing to unpack .../415-libkrb5-dev_1.21.3-4ubuntu1_amd64.deb ... 112s Unpacking libkrb5-dev:amd64 (1.21.3-4ubuntu1) ... 112s Selecting previously unselected package libldap-dev:amd64. 112s Preparing to unpack .../416-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_amd64.deb ... 112s Unpacking libldap-dev:amd64 (2.6.9+dfsg-1~exp2ubuntu1) ... 112s Selecting previously unselected package libpkgconf3:amd64. 112s Preparing to unpack .../417-libpkgconf3_1.8.1-4_amd64.deb ... 112s Unpacking libpkgconf3:amd64 (1.8.1-4) ... 112s Selecting previously unselected package pkgconf-bin. 112s Preparing to unpack .../418-pkgconf-bin_1.8.1-4_amd64.deb ... 112s Unpacking pkgconf-bin (1.8.1-4) ... 112s Selecting previously unselected package pkgconf:amd64. 112s Preparing to unpack .../419-pkgconf_1.8.1-4_amd64.deb ... 112s Unpacking pkgconf:amd64 (1.8.1-4) ... 112s Selecting previously unselected package libnghttp2-dev:amd64. 112s Preparing to unpack .../420-libnghttp2-dev_1.64.0-1_amd64.deb ... 112s Unpacking libnghttp2-dev:amd64 (1.64.0-1) ... 112s Selecting previously unselected package libpsl-dev:amd64. 112s Preparing to unpack .../421-libpsl-dev_0.21.2-1.1build1_amd64.deb ... 112s Unpacking libpsl-dev:amd64 (0.21.2-1.1build1) ... 112s Selecting previously unselected package libgmpxx4ldbl:amd64. 112s Preparing to unpack .../422-libgmpxx4ldbl_2%3a6.3.0+dfsg-2ubuntu7_amd64.deb ... 112s Unpacking libgmpxx4ldbl:amd64 (2:6.3.0+dfsg-2ubuntu7) ... 112s Selecting previously unselected package libgmp-dev:amd64. 112s Preparing to unpack .../423-libgmp-dev_2%3a6.3.0+dfsg-2ubuntu7_amd64.deb ... 112s Unpacking libgmp-dev:amd64 (2:6.3.0+dfsg-2ubuntu7) ... 113s Selecting previously unselected package libevent-2.1-7t64:amd64. 113s Preparing to unpack .../424-libevent-2.1-7t64_2.1.12-stable-10_amd64.deb ... 113s Unpacking libevent-2.1-7t64:amd64 (2.1.12-stable-10) ... 113s Selecting previously unselected package libunbound8:amd64. 113s Preparing to unpack .../425-libunbound8_1.22.0-1ubuntu1_amd64.deb ... 113s Unpacking libunbound8:amd64 (1.22.0-1ubuntu1) ... 113s Selecting previously unselected package libgnutls-dane0t64:amd64. 113s Preparing to unpack .../426-libgnutls-dane0t64_3.8.9-2ubuntu1_amd64.deb ... 113s Unpacking libgnutls-dane0t64:amd64 (3.8.9-2ubuntu1) ... 113s Selecting previously unselected package libgnutls-openssl27t64:amd64. 113s Preparing to unpack .../427-libgnutls-openssl27t64_3.8.9-2ubuntu1_amd64.deb ... 113s Unpacking libgnutls-openssl27t64:amd64 (3.8.9-2ubuntu1) ... 113s Selecting previously unselected package libp11-kit-dev:amd64. 113s Preparing to unpack .../428-libp11-kit-dev_0.25.5-2ubuntu1_amd64.deb ... 113s Unpacking libp11-kit-dev:amd64 (0.25.5-2ubuntu1) ... 113s Selecting previously unselected package libtasn1-6-dev:amd64. 113s Preparing to unpack .../429-libtasn1-6-dev_4.20.0-2_amd64.deb ... 113s Unpacking libtasn1-6-dev:amd64 (4.20.0-2) ... 113s Selecting previously unselected package nettle-dev:amd64. 113s Preparing to unpack .../430-nettle-dev_3.10-1_amd64.deb ... 113s Unpacking nettle-dev:amd64 (3.10-1) ... 113s Selecting previously unselected package libgnutls28-dev:amd64. 113s Preparing to unpack .../431-libgnutls28-dev_3.8.9-2ubuntu1_amd64.deb ... 113s Unpacking libgnutls28-dev:amd64 (3.8.9-2ubuntu1) ... 113s Selecting previously unselected package librtmp-dev:amd64. 113s Preparing to unpack .../432-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_amd64.deb ... 113s Unpacking librtmp-dev:amd64 (2.4+20151223.gitfa8646d.1-2build7) ... 113s Selecting previously unselected package libssl-dev:amd64. 113s Preparing to unpack .../433-libssl-dev_3.4.0-1ubuntu2_amd64.deb ... 113s Unpacking libssl-dev:amd64 (3.4.0-1ubuntu2) ... 113s Selecting previously unselected package libssh2-1-dev:amd64. 113s Preparing to unpack .../434-libssh2-1-dev_1.11.1-1_amd64.deb ... 113s Unpacking libssh2-1-dev:amd64 (1.11.1-1) ... 113s Selecting previously unselected package libzstd-dev:amd64. 113s Preparing to unpack .../435-libzstd-dev_1.5.6+dfsg-2_amd64.deb ... 113s Unpacking libzstd-dev:amd64 (1.5.6+dfsg-2) ... 113s Selecting previously unselected package libcurl4-openssl-dev:amd64. 113s Preparing to unpack .../436-libcurl4-openssl-dev_8.12.0+git20250209.89ed161+ds-1ubuntu1_amd64.deb ... 113s Unpacking libcurl4-openssl-dev:amd64 (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 113s Selecting previously unselected package hdf5-helpers. 113s Preparing to unpack .../437-hdf5-helpers_1.14.5+repack-3_amd64.deb ... 113s Unpacking hdf5-helpers (1.14.5+repack-3) ... 113s Selecting previously unselected package libhdf5-dev. 113s Preparing to unpack .../438-libhdf5-dev_1.14.5+repack-3_amd64.deb ... 113s Unpacking libhdf5-dev (1.14.5+repack-3) ... 113s Selecting previously unselected package xorg-sgml-doctools. 113s Preparing to unpack .../439-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 113s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 113s Selecting previously unselected package x11proto-dev. 113s Preparing to unpack .../440-x11proto-dev_2024.1-1_all.deb ... 113s Unpacking x11proto-dev (2024.1-1) ... 113s Selecting previously unselected package libxau-dev:amd64. 113s Preparing to unpack .../441-libxau-dev_1%3a1.0.11-1_amd64.deb ... 113s Unpacking libxau-dev:amd64 (1:1.0.11-1) ... 113s Selecting previously unselected package libxdmcp-dev:amd64. 113s Preparing to unpack .../442-libxdmcp-dev_1%3a1.1.5-1_amd64.deb ... 113s Unpacking libxdmcp-dev:amd64 (1:1.1.5-1) ... 113s Selecting previously unselected package xtrans-dev. 113s Preparing to unpack .../443-xtrans-dev_1.4.0-1_all.deb ... 113s Unpacking xtrans-dev (1.4.0-1) ... 113s Selecting previously unselected package libxcb1-dev:amd64. 113s Preparing to unpack .../444-libxcb1-dev_1.17.0-2_amd64.deb ... 113s Unpacking libxcb1-dev:amd64 (1.17.0-2) ... 113s Selecting previously unselected package libx11-dev:amd64. 113s Preparing to unpack .../445-libx11-dev_2%3a1.8.10-2_amd64.deb ... 113s Unpacking libx11-dev:amd64 (2:1.8.10-2) ... 113s Selecting previously unselected package libglx-dev:amd64. 113s Preparing to unpack .../446-libglx-dev_1.7.0-1build1_amd64.deb ... 113s Unpacking libglx-dev:amd64 (1.7.0-1build1) ... 114s Selecting previously unselected package libgl-dev:amd64. 114s Preparing to unpack .../447-libgl-dev_1.7.0-1build1_amd64.deb ... 114s Unpacking libgl-dev:amd64 (1.7.0-1build1) ... 114s Selecting previously unselected package libblas-dev:amd64. 114s Preparing to unpack .../448-libblas-dev_3.12.1-2_amd64.deb ... 114s Unpacking libblas-dev:amd64 (3.12.1-2) ... 114s Selecting previously unselected package liblapack-dev:amd64. 114s Preparing to unpack .../449-liblapack-dev_3.12.1-2_amd64.deb ... 114s Unpacking liblapack-dev:amd64 (3.12.1-2) ... 114s Selecting previously unselected package libfftw3-long3:amd64. 114s Preparing to unpack .../450-libfftw3-long3_3.3.10-2fakesync1build1_amd64.deb ... 114s Unpacking libfftw3-long3:amd64 (3.3.10-2fakesync1build1) ... 114s Selecting previously unselected package libfftw3-quad3:amd64. 114s Preparing to unpack .../451-libfftw3-quad3_3.3.10-2fakesync1build1_amd64.deb ... 114s Unpacking libfftw3-quad3:amd64 (3.3.10-2fakesync1build1) ... 114s Selecting previously unselected package libfftw3-bin. 114s Preparing to unpack .../452-libfftw3-bin_3.3.10-2fakesync1build1_amd64.deb ... 114s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 114s Selecting previously unselected package libfftw3-dev:amd64. 114s Preparing to unpack .../453-libfftw3-dev_3.3.10-2fakesync1build1_amd64.deb ... 114s Unpacking libfftw3-dev:amd64 (3.3.10-2fakesync1build1) ... 114s Selecting previously unselected package libgfortran-14-dev:amd64. 114s Preparing to unpack .../454-libgfortran-14-dev_14.2.0-17ubuntu1_amd64.deb ... 114s Unpacking libgfortran-14-dev:amd64 (14.2.0-17ubuntu1) ... 114s Selecting previously unselected package gfortran-14-x86-64-linux-gnu. 114s Preparing to unpack .../455-gfortran-14-x86-64-linux-gnu_14.2.0-17ubuntu1_amd64.deb ... 114s Unpacking gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 114s Selecting previously unselected package gfortran-14. 114s Preparing to unpack .../456-gfortran-14_14.2.0-17ubuntu1_amd64.deb ... 114s Unpacking gfortran-14 (14.2.0-17ubuntu1) ... 114s Selecting previously unselected package gfortran-x86-64-linux-gnu. 114s Preparing to unpack .../457-gfortran-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 114s Unpacking gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 114s Selecting previously unselected package gfortran. 114s Preparing to unpack .../458-gfortran_4%3a14.2.0-1ubuntu1_amd64.deb ... 114s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 114s Selecting previously unselected package libstdc++-14-dev:amd64. 114s Preparing to unpack .../459-libstdc++-14-dev_14.2.0-17ubuntu1_amd64.deb ... 114s Unpacking libstdc++-14-dev:amd64 (14.2.0-17ubuntu1) ... 115s Selecting previously unselected package g++-14-x86-64-linux-gnu. 115s Preparing to unpack .../460-g++-14-x86-64-linux-gnu_14.2.0-17ubuntu1_amd64.deb ... 115s Unpacking g++-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 115s Selecting previously unselected package g++-14. 115s Preparing to unpack .../461-g++-14_14.2.0-17ubuntu1_amd64.deb ... 115s Unpacking g++-14 (14.2.0-17ubuntu1) ... 115s Selecting previously unselected package g++-x86-64-linux-gnu. 115s Preparing to unpack .../462-g++-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 115s Unpacking g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 115s Selecting previously unselected package g++. 115s Preparing to unpack .../463-g++_4%3a14.2.0-1ubuntu1_amd64.deb ... 115s Unpacking g++ (4:14.2.0-1ubuntu1) ... 115s Selecting previously unselected package octave-dev. 115s Preparing to unpack .../464-octave-dev_9.4.0-1_amd64.deb ... 115s Unpacking octave-dev (9.4.0-1) ... 115s Selecting previously unselected package dh-octave. 115s Preparing to unpack .../465-dh-octave_1.8.0_all.deb ... 115s Unpacking dh-octave (1.8.0) ... 115s Selecting previously unselected package libfontenc1:amd64. 115s Preparing to unpack .../466-libfontenc1_1%3a1.1.8-1build1_amd64.deb ... 115s Unpacking libfontenc1:amd64 (1:1.1.8-1build1) ... 115s Selecting previously unselected package libxt6t64:amd64. 115s Preparing to unpack .../467-libxt6t64_1%3a1.2.1-1.2build1_amd64.deb ... 115s Unpacking libxt6t64:amd64 (1:1.2.1-1.2build1) ... 115s Selecting previously unselected package libxmu6:amd64. 115s Preparing to unpack .../468-libxmu6_2%3a1.1.3-3build2_amd64.deb ... 115s Unpacking libxmu6:amd64 (2:1.1.3-3build2) ... 115s Selecting previously unselected package libxaw7:amd64. 115s Preparing to unpack .../469-libxaw7_2%3a1.0.16-1_amd64.deb ... 115s Unpacking libxaw7:amd64 (2:1.0.16-1) ... 115s Selecting previously unselected package libxfont2:amd64. 115s Preparing to unpack .../470-libxfont2_1%3a2.0.6-1build1_amd64.deb ... 115s Unpacking libxfont2:amd64 (1:2.0.6-1build1) ... 115s Selecting previously unselected package libxkbfile1:amd64. 115s Preparing to unpack .../471-libxkbfile1_1%3a1.1.0-1build4_amd64.deb ... 115s Unpacking libxkbfile1:amd64 (1:1.1.0-1build4) ... 115s Selecting previously unselected package libxrandr2:amd64. 115s Preparing to unpack .../472-libxrandr2_2%3a1.5.4-1_amd64.deb ... 115s Unpacking libxrandr2:amd64 (2:1.5.4-1) ... 115s Selecting previously unselected package octave-io. 115s Preparing to unpack .../473-octave-io_2.6.4-3build2_amd64.deb ... 115s Unpacking octave-io (2.6.4-3build2) ... 115s Selecting previously unselected package octave-statistics-common. 115s Preparing to unpack .../474-octave-statistics-common_1.7.2-1_all.deb ... 115s Unpacking octave-statistics-common (1.7.2-1) ... 115s Selecting previously unselected package octave-statistics. 115s Preparing to unpack .../475-octave-statistics_1.7.2-1_amd64.deb ... 115s Unpacking octave-statistics (1.7.2-1) ... 115s Selecting previously unselected package x11-xkb-utils. 116s Preparing to unpack .../476-x11-xkb-utils_7.7+9_amd64.deb ... 116s Unpacking x11-xkb-utils (7.7+9) ... 116s Selecting previously unselected package xserver-common. 116s Preparing to unpack .../477-xserver-common_2%3a21.1.14-2ubuntu1_all.deb ... 116s Unpacking xserver-common (2:21.1.14-2ubuntu1) ... 116s Selecting previously unselected package xvfb. 116s Preparing to unpack .../478-xvfb_2%3a21.1.14-2ubuntu1_amd64.deb ... 116s Unpacking xvfb (2:21.1.14-2ubuntu1) ... 116s Setting up libapt-pkg-perl (0.1.40build8) ... 116s Setting up libhwy1t64:amd64 (1.2.0-3ubuntu3) ... 116s Setting up libmodule-pluggable-perl (5.2-5) ... 116s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 116s Setting up libstring-escape-perl (2010.002-3) ... 116s Setting up libgnutls-openssl27t64:amd64 (3.8.9-2ubuntu1) ... 116s Setting up libxcb-dri3-0:amd64 (1.17.0-2) ... 116s Setting up liblcms2-2:amd64 (2.16-2) ... 116s Setting up libberkeleydb-perl:amd64 (0.66-1) ... 116s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 116s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 116s Setting up libwayland-server0:amd64 (1.23.1-1) ... 116s Setting up libaom3:amd64 (3.12.0-1) ... 116s Setting up libx11-xcb1:amd64 (2:1.8.10-2) ... 116s Setting up libpciaccess0:amd64 (0.17-3build1) ... 116s Setting up libfile-which-perl (1.27-2) ... 116s Setting up libdouble-conversion3:amd64 (3.3.0-1build1) ... 116s Setting up libncurses-dev:amd64 (6.5+20250125-2) ... 116s Setting up libunicode-utf8-perl (0.62-2build4) ... 116s Setting up libset-intspan-perl (1.19-3) ... 116s Setting up libxcb-xfixes0:amd64 (1.17.0-2) ... 116s Setting up libogg0:amd64 (1.3.5-3build1) ... 116s Setting up libmouse-perl:amd64 (2.5.11-1build1) ... 116s Setting up libzstd-dev:amd64 (1.5.6+dfsg-2) ... 116s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 116s Setting up libpod-pom-perl (2.01-4) ... 116s Setting up libxpm4:amd64 (1:3.5.17-1build2) ... 116s Setting up hdf5-helpers (1.14.5+repack-3) ... 116s Setting up libwmflite-0.2-7:amd64 (0.2.13-1.1build3) ... 116s Setting up libregexp-pattern-perl (0.2.14-2) ... 116s Setting up libdata-messagepack-perl (1.02-1build5) ... 116s Setting up libclass-inspector-perl (1.36-3) ... 116s Setting up libxcb-xinput0:amd64 (1.17.0-2) ... 116s Setting up libxrender1:amd64 (1:0.9.10-1.1build1) ... 116s Setting up libdynaloader-functions-perl (0.004-1) ... 116s Setting up libdatrie1:amd64 (0.2.13-3build1) ... 116s Setting up libtext-glob-perl (0.11-3) ... 116s Setting up libclass-method-modifiers-perl (2.15-1) ... 116s Setting up liblist-compare-perl (0.55-2) ... 116s Setting up libxcb-render0:amd64 (1.17.0-2) ... 116s Setting up libclone-perl:amd64 (0.47-1) ... 116s Setting up libarchive-zip-perl (1.68-1) ... 116s Setting up libsub-identify-perl (0.14-3build4) ... 116s Setting up libdrm-radeon1:amd64 (2.4.123-1) ... 116s Setting up libcpanel-json-xs-perl:amd64 (4.39-1) ... 116s Setting up libglvnd0:amd64 (1.7.0-1build1) ... 116s Setting up libio-stringy-perl (2.113-2) ... 116s Setting up libhtml-tagset-perl (3.24-1) ... 116s Setting up libts0t64:amd64 (1.22-1.1build1) ... 116s Setting up liblog-any-perl (1.717-1) ... 116s Setting up libyaml-pp-perl (0.38.1-2) ... 116s Setting up libxcb-glx0:amd64 (1.17.0-2) ... 116s Setting up libdevel-size-perl (0.84-1build1) ... 116s Setting up unzip (6.0-28ubuntu6) ... 116s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 116s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 116s Setting up libconvert-binhex-perl (1.125-3) ... 116s Setting up libdrm-intel1:amd64 (2.4.123-1) ... 116s Setting up liblwp-mediatypes-perl (6.04-2) ... 116s Setting up libyaml-libyaml-perl (0.903.0+ds-1) ... 116s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 116s Setting up libio-interactive-perl (1.026-1) ... 116s Setting up libxcb-keysyms1:amd64 (0.4.1-1) ... 116s Setting up libxcb-shape0:amd64 (1.17.0-2) ... 116s Setting up x11-common (1:7.7+23ubuntu3) ... 116s Setting up libtry-tiny-perl (0.32-1) ... 116s Setting up libdeflate0:amd64 (1.23-1) ... 116s Setting up perl-openssl-defaults:amd64 (7build3) ... 116s Setting up libmldbm-perl (2.05-4) ... 116s Setting up libxml-namespacesupport-perl (1.12-2) ... 116s Setting up m4 (1.4.19-5) ... 116s Setting up libevent-2.1-7t64:amd64 (2.1.12-stable-10) ... 116s Setting up libclone-choose-perl (0.010-2) ... 116s Setting up libqhull-r8.0:amd64 (2020.2-6build1) ... 116s Setting up libxcb-render-util0:amd64 (0.3.10-1) ... 116s Setting up libtime-moment-perl (0.44-2build5) ... 116s Setting up libencode-locale-perl (1.05-3) ... 116s Setting up libxcb-shm0:amd64 (1.17.0-2) ... 116s Setting up libxcb-icccm4:amd64 (0.4.2-1) ... 116s Setting up texinfo-lib (7.1.1-1) ... 116s Setting up libreadline-dev:amd64 (8.2-6) ... 116s Setting up libmpg123-0t64:amd64 (1.32.10-1) ... 116s Setting up libgomp1:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libconfig-tiny-perl (2.30-1) ... 116s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 116s Setting up liblist-utilsby-perl (0.12-2) ... 116s Setting up libyaml-tiny-perl (1.76-1) ... 116s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 116s Setting up octave-common (9.4.0-1) ... 116s Setting up libregexp-common-perl (2024080801-1) ... 116s Setting up libpcre2-16-0:amd64 (10.42-4ubuntu3) ... 116s Setting up libaec0:amd64 (1.1.3-1) ... 116s Setting up libnet-netmask-perl (2.0002-2) ... 116s Setting up libopengl0:amd64 (1.7.0-1build1) ... 116s Setting up libsub-install-perl (0.929-1) ... 116s Setting up libxcb-util1:amd64 (0.4.1-1) ... 116s Setting up libpsl-dev:amd64 (0.21.2-1.1build1) ... 116s Setting up libxxf86vm1:amd64 (1:1.1.4-1build4) ... 116s Setting up libindirect-perl (0.39-2build5) ... 116s Setting up libxcb-xkb1:amd64 (1.17.0-2) ... 116s Setting up libxcb-image0:amd64 (0.4.0-2build1) ... 116s Setting up libnumber-compare-perl (0.03-3) ... 116s Setting up libxcb-present0:amd64 (1.17.0-2) ... 116s Setting up liberror-perl (0.17029-2) ... 116s Setting up libasound2-data (1.2.13-1build1) ... 116s Setting up patchutils (0.4.2-1build3) ... 116s Setting up tex-common (6.18) ... 116s update-language: texlive-base not installed and configured, doing nothing! 116s Setting up libjson-maybexs-perl (1.004008-1) ... 116s Setting up libxml-sax-base-perl (1.09-3) ... 116s Setting up libio-string-perl (1.08-4) ... 116s Setting up libboolean-perl (0.46-3) ... 116s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 116s Setting up xtrans-dev (1.4.0-1) ... 116s Setting up libfontenc1:amd64 (1:1.1.8-1build1) ... 116s Setting up autotools-dev (20220109.1) ... 116s Setting up libblas3:amd64 (3.12.1-2) ... 116s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 116s Setting up libclass-data-inheritable-perl (0.10-1) ... 116s Setting up libunbound8:amd64 (1.22.0-1ubuntu1) ... 116s Setting up libpkgconf3:amd64 (1.8.1-4) ... 116s Setting up libgmpxx4ldbl:amd64 (2:6.3.0+dfsg-2ubuntu7) ... 116s Setting up libalgorithm-c3-perl (0.11-2) ... 116s Setting up libasound2t64:amd64 (1.2.13-1build1) ... 116s Setting up liblog-log4perl-perl (1.57-1) ... 116s Setting up libtext-reform-perl (1.20-5) ... 116s Setting up libgnutls-dane0t64:amd64 (3.8.9-2ubuntu1) ... 116s Setting up libfile-find-rule-perl (0.34-3) ... 116s Setting up libxfixes3:amd64 (1:6.0.0-2build1) ... 116s Setting up libxcb-sync1:amd64 (1.17.0-2) ... 116s Setting up libipc-system-simple-perl (1.30-2) ... 116s Setting up libio-tiecombine-perl (1.005-3) ... 116s Setting up libnet-domain-tld-perl (1.75-4) ... 116s Setting up libgssrpc4t64:amd64 (1.21.3-4ubuntu1) ... 116s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 116s Setting up libldap-dev:amd64 (2.6.9+dfsg-1~exp2ubuntu1) ... 116s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 116s Setting up libxcb-cursor0:amd64 (0.1.5-1) ... 116s Setting up lzip (1.25-1) ... 116s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 116s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 116s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 116s Setting up libavahi-common-data:amd64 (0.8-14ubuntu1) ... 116s Setting up libopus0:amd64 (1.5.2-2) ... 116s Setting up t1utils (1.41-4build3) ... 116s Setting up libquadmath0:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libxinerama1:amd64 (2:1.1.4-3build1) ... 116s Setting up diffstat (1.67-1) ... 116s Setting up libimagequant0:amd64 (2.18.0-1build1) ... 116s Setting up comerr-dev:amd64 (2.1-1.47.2-1ubuntu1) ... 116s Setting up libxkbcommon-x11-0:amd64 (1.7.0-2) ... 116s Setting up fonts-dejavu-mono (2.37-8) ... 116s Setting up libssl-dev:amd64 (3.4.0-1ubuntu2) ... 116s Setting up libmpc3:amd64 (1.3.1-1build2) ... 116s Setting up libvorbis0a:amd64 (1.3.7-2) ... 116s Setting up libvariable-magic-perl (0.64-1build1) ... 116s Setting up libio-html-perl (1.004-3) ... 116s Setting up libxrandr2:amd64 (2:1.5.4-1) ... 116s Setting up libtext-template-perl (1.61-1) ... 116s Setting up libpod-parser-perl (1.67-1) ... 116s Setting up autopoint (0.23.1-1) ... 116s Setting up libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 116s Setting up fonts-dejavu-core (2.37-8) ... 116s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 116s Setting up pkgconf-bin (1.8.1-4) ... 116s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 116s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 116s Setting up libltdl7:amd64 (2.5.4-3build1) ... 116s Setting up libidn2-dev:amd64 (2.3.7-2build2) ... 116s Setting up libfftw3-double3:amd64 (3.3.10-2fakesync1build1) ... 116s Setting up libglapi-mesa:amd64 (24.3.4-3ubuntu1) ... 116s Setting up libparams-util-perl (1.102-3build1) ... 116s Setting up libgfortran5:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libvulkan1:amd64 (1.4.304.0-1) ... 116s Setting up libtime-duration-perl (1.21-2) ... 116s Setting up autoconf (2.72-3) ... 116s Setting up libtext-xslate-perl:amd64 (3.5.9-2build1) ... 116s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 116s Setting up libwebp7:amd64 (1.5.0-0.1) ... 116s Setting up libarray-intspan-perl (2.004-2) ... 116s Setting up libcapture-tiny-perl (0.50-1) ... 116s Setting up libtimedate-perl (2.3300-2) ... 116s Setting up libexporter-lite-perl (0.09-2) ... 116s Setting up libubsan1:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libsub-name-perl:amd64 (0.28-1) ... 116s Setting up zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 116s Setting up dwz (0.15-1build6) ... 116s Setting up libdata-validate-domain-perl (0.15-1) ... 116s Setting up libproc-processtable-perl:amd64 (0.636-1build4) ... 116s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 116s Setting up libmtdev1t64:amd64 (1.1.7-1) ... 116s Setting up libduktape207:amd64 (2.7.0+tests-0ubuntu3) ... 116s Setting up libxshmfence1:amd64 (1.3-1build5) ... 116s Setting up libhwasan0:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libxcb-randr0:amd64 (1.17.0-2) ... 116s Setting up libpath-tiny-perl (0.146-1) ... 116s Setting up libasan8:amd64 (14.2.0-17ubuntu1) ... 116s Setting up lzop (1.04-2build3) ... 116s Setting up libjson-perl (4.10000-1) ... 116s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 116s Setting up librole-tiny-perl (2.002004-1) ... 116s Setting up debugedit (1:5.1-2) ... 116s Setting up libipc-run3-perl (0.049-1) ... 116s Setting up libmd4c0:amd64 (0.5.2-2) ... 116s Setting up libregexp-wildcards-perl (1.05-3) ... 116s Setting up libmousex-strictconstructor-perl (0.02-3) ... 116s Setting up libfile-sharedir-perl (1.118-3) ... 116s Setting up libsub-uplevel-perl (0.2800-3) ... 116s Setting up libsuitesparseconfig7:amd64 (1:7.8.3+dfsg-3) ... 116s Setting up liblua5.4-0:amd64 (5.4.7-1) ... 116s Setting up libaliased-perl (0.34-3) ... 116s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 116s Setting up libthai-data (0.1.29-2build1) ... 116s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 116s Setting up libstrictures-perl (2.000006-1) ... 116s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 116s Setting up libdevel-stacktrace-perl (2.0500-1) ... 116s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 116s Setting up libtext-autoformat-perl (1.750000-2) ... 116s Setting up libglu1-mesa:amd64 (9.0.2-1.1build1) ... 116s Setting up libflac12t64:amd64 (1.4.3+ds-4) ... 116s Setting up libtoml-tiny-perl (0.18-1) ... 116s Setting up libstemmer0d:amd64 (2.2.0-4build1) ... 116s Setting up libxkbfile1:amd64 (1:1.1.0-1build4) ... 116s Setting up libsort-versions-perl (1.62-3) ... 116s Setting up libtsan2:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libexporter-tiny-perl (1.006002-1) ... 116s Setting up libterm-readkey-perl (2.38-2build5) ... 116s Setting up libisl23:amd64 (0.27-1) ... 116s Setting up libtext-unidecode-perl (1.30-3) ... 116s Setting up libde265-0:amd64 (1.0.15-1build4) ... 116s Setting up libfont-ttf-perl (1.06-2) ... 116s Setting up libfile-homedir-perl (1.006-2) ... 116s Setting up libsamplerate0:amd64 (0.2.2-4build1) ... 116s Setting up libtasn1-6-dev:amd64 (4.20.0-2) ... 116s Setting up libwebpmux3:amd64 (1.5.0-0.1) ... 116s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 116s Setting up libperlio-gzip-perl (0.20-1build5) ... 116s Setting up libjxl0.11:amd64 (0.11.1-1) ... 116s Setting up libxfont2:amd64 (1:2.0.6-1build1) ... 116s Setting up libhtml-html5-entities-perl (0.004-3) ... 116s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 116s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 116s Setting up libmarkdown2:amd64 (2.2.7-2ubuntu1) ... 116s Setting up libcc1-0:amd64 (14.2.0-17ubuntu1) ... 116s Setting up liburi-perl (5.30-1) ... 116s Setting up libnet-ipv6addr-perl (1.02-1) ... 116s Setting up libbrotli-dev:amd64 (1.1.0-2build3) ... 116s Setting up liblsan0:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libp11-kit-dev:amd64 (0.25.5-2ubuntu1) ... 116s Setting up libmp3lame0:amd64 (3.100-6build1) ... 116s Setting up libblas-dev:amd64 (3.12.1-2) ... 116s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so to provide /usr/lib/x86_64-linux-gnu/libblas.so (libblas.so-x86_64-linux-gnu) in auto mode 116s Setting up libsz2:amd64 (1.1.3-1) ... 116s Setting up libitm1:amd64 (14.2.0-17ubuntu1) ... 116s Setting up libvorbisenc2:amd64 (1.3.7-2) ... 116s Setting up libkadm5clnt-mit12:amd64 (1.21.3-4ubuntu1) ... 116s Setting up libdata-validate-ip-perl (0.31-1) ... 116s Setting up libwacom-common (2.14.0-1) ... 116s Setting up libmousex-nativetraits-perl (1.09-3) ... 116s Setting up libemail-address-xs-perl (1.05-1build5) ... 116s Setting up libwayland-client0:amd64 (1.23.1-1) ... 116s Setting up libnet-ssleay-perl:amd64 (1.94-2) ... 116s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 116s Setting up automake (1:1.17-3) ... 116s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 116s Setting up libb2-1:amd64 (0.98.1-1.1build1) ... 116s Setting up x11proto-dev (2024.1-1) ... 116s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 116s Setting up gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 116s Setting up libice6:amd64 (2:1.1.1-1) ... 116s Setting up libqt6core6t64:amd64 (6.8.1+dfsg-0ubuntu4) ... 116s Setting up libhttp-date-perl (6.06-1) ... 116s Setting up mesa-libgallium:amd64 (24.3.4-3ubuntu1) ... 116s Setting up libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 116s Setting up liblapack3:amd64 (3.12.1-2) ... 116s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 116s Setting up libproxy1v5:amd64 (0.5.9-1) ... 116s Setting up libfile-basedir-perl (0.09-2) ... 116s Setting up gettext (0.23.1-1) ... 116s Setting up libarpack2t64:amd64 (3.9.1-4) ... 116s Setting up libfftw3-single3:amd64 (3.3.10-2fakesync1build1) ... 116s Setting up libgmp-dev:amd64 (2:6.3.0+dfsg-2ubuntu7) ... 116s Setting up libamd3:amd64 (1:7.8.3+dfsg-3) ... 116s Setting up libfile-listing-perl (6.16-1) ... 116s Setting up libxau-dev:amd64 (1:1.0.11-1) ... 116s Setting up nettle-dev:amd64 (3.10-1) ... 116s Setting up libkdb5-10t64:amd64 (1.21.3-4ubuntu1) ... 116s Setting up libgbm1:amd64 (24.3.4-3ubuntu1) ... 116s Setting up libcolamd3:amd64 (1:7.8.3+dfsg-3) ... 116s Setting up libwacom9:amd64 (2.14.0-1) ... 116s Setting up fontconfig-config (2.15.0-1.1ubuntu2) ... 117s Setting up liblist-moreutils-perl (0.430-2) ... 117s Setting up libxcursor1:amd64 (1:1.2.3-1) ... 117s Setting up libpod-constants-perl (0.19-2) ... 117s Setting up libgl1-mesa-dri:amd64 (24.3.4-3ubuntu1) ... 117s Setting up libhash-merge-perl (0.302-1) ... 117s Setting up libsoftware-copyright-perl (0.012-2) ... 117s Setting up libaec-dev:amd64 (1.1.3-1) ... 117s Setting up libavahi-common3:amd64 (0.8-14ubuntu1) ... 117s Setting up libcxsparse4:amd64 (1:7.8.3+dfsg-3) ... 117s Setting up libfftw3-long3:amd64 (3.3.10-2fakesync1build1) ... 117s Setting up libnet-http-perl (6.23-1) ... 117s Setting up libpath-iterator-rule-perl (1.015-2) ... 117s Setting up libtext-markdown-discount-perl (0.18-1) ... 117s Setting up libappstream5:amd64 (1.0.4-1) ... 117s Setting up libexception-class-perl (1.45-1) ... 117s Setting up libclass-c3-perl (0.35-2) ... 117s Setting up libqrupdate1:amd64 (1.1.5-1) ... 117s Setting up libdevel-callchecker-perl:amd64 (0.009-1build1) ... 117s Setting up libxml-sax-perl (1.02+dfsg-4) ... 117s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 117s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 117s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 117s Setting up libcamd3:amd64 (1:7.8.3+dfsg-3) ... 117s Setting up pkgconf:amd64 (1.8.1-4) ... 117s Setting up libinput-bin (1.27.1-1) ... 117s Setting up libxs-parse-sublike-perl:amd64 (0.36-1) ... 117s Setting up intltool-debian (0.35.0+20060710.6) ... 117s Setting up libthai0:amd64 (0.1.29-2build1) ... 117s Setting up libxdmcp-dev:amd64 (1:1.1.5-1) ... 117s Setting up libegl-mesa0:amd64 (24.3.4-3ubuntu1) ... 117s Setting up libdata-validate-uri-perl (0.07-3) ... 117s Setting up libxs-parse-keyword-perl (0.48-2) ... 117s Setting up libtest-exception-perl (0.43-3) ... 117s Setting up appstream (1.0.4-1) ... 117s ✔ Metadata cache was updated successfully. 117s Setting up libqt6xml6:amd64 (6.8.1+dfsg-0ubuntu4) ... 117s Setting up libglpk40:amd64 (5.0-1build2) ... 117s Setting up libqt6sql6:amd64 (6.8.1+dfsg-0ubuntu4) ... 117s Setting up libstring-copyright-perl (0.003014-1) ... 117s Setting up libraqm0:amd64 (0.10.2-1) ... 117s Setting up libfftw3-quad3:amd64 (3.3.10-2fakesync1build1) ... 117s Setting up liblapack-dev:amd64 (3.12.1-2) ... 117s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so to provide /usr/lib/x86_64-linux-gnu/liblapack.so (liblapack.so-x86_64-linux-gnu) in auto mode 117s Setting up libdata-optlist-perl (0.114-1) ... 117s Setting up cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 117s Setting up libssh2-1-dev:amd64 (1.11.1-1) ... 117s Setting up cpp-14 (14.2.0-17ubuntu1) ... 117s Setting up libccolamd3:amd64 (1:7.8.3+dfsg-3) ... 117s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 117s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 117s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 117s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 117s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 117s Setting up dh-strip-nondeterminism (1.14.1-2) ... 117s Setting up libwww-robotrules-perl (6.02-1) ... 117s Setting up libsyntax-keyword-try-perl (0.30-1) ... 117s Setting up libjack-jackd2-0:amd64 (1.9.22~dfsg-4) ... 117s Setting up libhdf5-310:amd64 (1.14.5+repack-3) ... 117s Setting up libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 117s Setting up libhtml-parser-perl:amd64 (3.83-1build1) ... 117s Setting up libkadm5srv-mit12:amd64 (1.21.3-4ubuntu1) ... 117s Setting up libegl1:amd64 (1.7.0-1build1) ... 117s Setting up libqt6core5compat6:amd64 (6.8.1-0ubuntu2) ... 117s Setting up libfontconfig1:amd64 (2.15.0-1.1ubuntu2) ... 117s Setting up libsndfile1:amd64 (1.2.2-2) ... 117s Setting up libmro-compat-perl (0.15-2) ... 117s Setting up libgcc-14-dev:amd64 (14.2.0-17ubuntu1) ... 117s Setting up libjpeg8-dev:amd64 (8c-2ubuntu11) ... 117s Setting up libhdf5-fortran-310:amd64 (1.14.5+repack-3) ... 117s Setting up libstdc++-14-dev:amd64 (14.2.0-17ubuntu1) ... 117s Setting up libsm6:amd64 (2:1.2.4-1) ... 117s Setting up libavahi-client3:amd64 (0.8-14ubuntu1) ... 117s Setting up libio-socket-ssl-perl (2.089-1) ... 117s Setting up libsub-exporter-perl (0.990-1) ... 117s Setting up libqt6dbus6:amd64 (6.8.1+dfsg-0ubuntu4) ... 117s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 117s Setting up libhtml-form-perl (6.12-1) ... 117s Setting up krb5-multidev:amd64 (1.21.3-4ubuntu1) ... 117s Setting up libhdf5-cpp-310:amd64 (1.14.5+repack-3) ... 117s Setting up cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 117s Setting up libgfortran-14-dev:amd64 (14.2.0-17ubuntu1) ... 117s Setting up libiterator-perl (0.03+ds1-2) ... 117s Setting up libgnutls28-dev:amd64 (3.8.9-2ubuntu1) ... 117s Setting up libinput10:amd64 (1.27.1-1) ... 117s Setting up libnghttp2-dev:amd64 (1.64.0-1) ... 117s Setting up libhdf5-hl-310:amd64 (1.14.5+repack-3) ... 117s Setting up libportaudio2:amd64 (19.6.0-1.2build3) ... 117s Setting up libhttp-negotiate-perl (6.01-2) ... 117s Setting up fontconfig (2.15.0-1.1ubuntu2) ... 119s Regenerating fonts cache... done. 119s Setting up libcarp-assert-more-perl (2.8.0-1) ... 119s Setting up libcholmod5:amd64 (1:7.8.3+dfsg-3) ... 119s Setting up libxft2:amd64 (2.3.6-1build1) ... 119s Setting up libglx-mesa0:amd64 (24.3.4-3ubuntu1) ... 119s Setting up libxcb1-dev:amd64 (1.17.0-2) ... 119s Setting up libiterator-util-perl (0.02+ds1-2) ... 120s Setting up libglx0:amd64 (1.7.0-1build1) ... 120s Setting up libhttp-cookies-perl (6.11-1) ... 120s Setting up libspqr4:amd64 (1:7.8.3+dfsg-3) ... 120s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 120s Setting up po-debconf (1.0.21+nmu1) ... 120s Setting up libhtml-tree-perl (5.07-3) ... 120s Setting up libparams-classify-perl:amd64 (0.015-2build6) ... 120s Setting up libpango-1.0-0:amd64 (1.56.1-1) ... 120s Setting up libcgi-pm-perl (4.67-1) ... 120s Setting up libjpeg-dev:amd64 (8c-2ubuntu11) ... 120s Setting up libx11-dev:amd64 (2:1.8.10-2) ... 120s Setting up libcairo2:amd64 (1.18.2-2) ... 120s Setting up libobject-pad-perl (0.819-1) ... 120s Setting up libkrb5-dev:amd64 (1.21.3-4ubuntu1) ... 120s Setting up libgl1:amd64 (1.7.0-1build1) ... 120s Setting up libqt6gui6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up libnet-smtp-ssl-perl (1.04-2) ... 120s Setting up libmodule-runtime-perl (0.016-2) ... 120s Setting up libmailtools-perl (2.22-1) ... 120s Setting up libconfig-model-perl (2.155-1) ... 120s Setting up libxt6t64:amd64 (1:1.2.1-1.2build1) ... 120s Setting up librtmp-dev:amd64 (2.4+20151223.gitfa8646d.1-2build7) ... 120s Setting up texinfo (7.1.1-1) ... 120s Setting up libumfpack6:amd64 (1:7.8.3+dfsg-3) ... 120s Setting up libconst-fast-perl (0.014-2) ... 120s Setting up libqt6network6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up cpp (4:14.2.0-1ubuntu1) ... 120s Setting up libdata-section-perl (0.200008-1) ... 120s Setting up libglx-dev:amd64 (1.7.0-1build1) ... 120s Setting up gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 120s Setting up libpangoft2-1.0-0:amd64 (1.56.1-1) ... 120s Setting up libdata-dpath-perl (0.60-1) ... 120s Setting up libfltk1.3t64:amd64 (1.3.8-6.1build2) ... 120s Setting up libfftw3-dev:amd64 (3.3.10-2fakesync1build1) ... 120s Setting up libcups2t64:amd64 (2.4.11-0ubuntu2) ... 120s Setting up libgl-dev:amd64 (1.7.0-1build1) ... 120s Setting up libstring-rewriteprefix-perl (0.009-1) ... 120s Setting up libpangocairo-1.0-0:amd64 (1.56.1-1) ... 120s Setting up libhdf5-hl-cpp-310:amd64 (1.14.5+repack-3) ... 120s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 120s Setting up libhdf5-hl-fortran-310:amd64 (1.14.5+repack-3) ... 120s Setting up libxmu6:amd64 (2:1.1.3-3build2) ... 120s Setting up gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 120s Setting up libmodule-implementation-perl (0.09-2) ... 120s Setting up libpackage-stash-perl (0.40-1) ... 120s Setting up libimport-into-perl (1.002005-2) ... 120s Setting up libmoo-perl (2.005005-1) ... 120s Setting up libqt6opengl6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up liblist-someutils-perl (0.59-1) ... 120s Setting up libxaw7:amd64 (2:1.0.16-1) ... 120s Setting up libmime-tools-perl (5.515-1) ... 120s Setting up libsoftware-license-perl (0.104006-1) ... 120s Setting up libclass-load-perl (0.25-2) ... 120s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 120s Setting up gcc-14 (14.2.0-17ubuntu1) ... 120s Setting up gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 120s Setting up libqt6widgets6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up libfltk-gl1.3t64:amd64 (1.3.8-6.1build2) ... 120s Setting up libcurl4-openssl-dev:amd64 (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 120s Setting up libhdf5-dev (1.14.5+repack-3) ... 120s update-alternatives: using /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 120s Setting up g++-14-x86-64-linux-gnu (14.2.0-17ubuntu1) ... 120s Setting up g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 120s Setting up g++-14 (14.2.0-17ubuntu1) ... 120s Setting up libmoox-aliases-perl (0.001006-2) ... 120s Setting up gfortran-14 (14.2.0-17ubuntu1) ... 120s Setting up libparams-validate-perl:amd64 (1.31-2build4) ... 120s Setting up libqt6openglwidgets6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up libb-hooks-endofscope-perl (0.28-1) ... 120s Setting up libqt6printsupport6:amd64 (6.8.1+dfsg-0ubuntu4) ... 120s Setting up libtool (2.5.4-3build1) ... 120s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 120s Setting up x11-xkb-utils (7.7+9) ... 120s Setting up libqt6help6:amd64 (6.8.1-0ubuntu1) ... 120s Setting up libqscintilla2-qt6-15:amd64 (2.14.1+dfsg-1build4) ... 120s Setting up gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 120s Setting up gcc (4:14.2.0-1ubuntu1) ... 120s Setting up dh-autoreconf (20) ... 120s Setting up libnamespace-clean-perl (0.27-2) ... 120s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 120s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 120s Setting up g++ (4:14.2.0-1ubuntu1) ... 120s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 120s Setting up xserver-common (2:21.1.14-2ubuntu1) ... 120s Setting up licensecheck (3.3.9-1ubuntu1) ... 120s Setting up libapp-cmd-perl (0.337-2) ... 120s Setting up xvfb (2:21.1.14-2ubuntu1) ... 120s Setting up debhelper (13.24.1ubuntu2) ... 120s Setting up gfortran (4:14.2.0-1ubuntu1) ... 120s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 120s 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 120s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 120s 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 120s Setting up cme (1.041-1) ... 120s Setting up libheif-plugin-aomdec:amd64 (1.19.5-1build1) ... 120s Setting up libwww-perl (6.77-1) ... 120s Setting up libheif1:amd64 (1.19.5-1build1) ... 120s Setting up libparse-debcontrol-perl (2.005-6) ... 120s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 120s Setting up libwww-mechanize-perl (2.18-1ubuntu1) ... 120s Setting up libgd3:amd64 (2.3.3-12ubuntu3) ... 120s Setting up gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 120s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 120s Setting up liblwp-protocol-https-perl (6.14-1) ... 120s Setting up libheif-plugin-libde265:amd64 (1.19.5-1build1) ... 120s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 120s Setting up lintian (2.121.1ubuntu1) ... 120s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 120s Setting up libconfig-model-dpkg-perl (3.010) ... 120s Setting up dh-octave-autopkgtest (1.8.0) ... 120s Setting up octave (9.4.0-1) ... 120s Setting up octave-dev (9.4.0-1) ... 120s Setting up octave-io (2.6.4-3build2) ... 120s Setting up octave-statistics-common (1.7.2-1) ... 120s Setting up octave-statistics (1.7.2-1) ... 120s Setting up dh-octave (1.8.0) ... 120s Processing triggers for libc-bin (2.41-1ubuntu1) ... 120s Processing triggers for man-db (2.13.0-1) ... 121s Processing triggers for udev (257.2-3ubuntu1) ... 121s Processing triggers for install-info (7.1.1-1) ... 123s autopkgtest [21:13:55]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 123s autopkgtest [21:13:55]: test command1: [----------------------- 123s Checking package... 124s Run the unit tests... 124s Checking m files ... 124s [inst/mahal.m] 124s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/mahal.m 124s ***** error mahal () 124s ***** error mahal (1, 2, 3) 124s ***** error mahal ("A", "B") 124s ***** error mahal ([1, 2], ["A", "B"]) 124s ***** error mahal (ones (2, 2, 2)) 125s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 125s ***** error mahal (ones (2, 2), ones (2, 3)) 125s ***** test 125s X = [1 0; 0 1; 1 1; 0 0]; 125s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 125s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 125s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 125s 9 tests, 9 passed, 0 known failure, 0 skipped 125s [inst/fitcknn.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitcknn.m 125s ***** demo 125s ## Train a k-nearest neighbor classifier for k = 10 125s ## and plot the decision boundaries. 125s 125s load fisheriris 125s idx = ! strcmp (species, "setosa"); 125s X = meas(idx,3:4); 125s Y = cast (strcmpi (species(idx), "virginica"), "double"); 125s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 125s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 125s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 125s [x1G, x2G] = meshgrid (x1, x2); 125s XGrid = [x1G(:), x2G(:)]; 125s pred = predict (obj, XGrid); 125s gidx = logical (str2num (cell2mat (pred))); 125s 125s figure 125s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 125s hold on 125s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 125s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 125s xlabel ("Petal length (cm)"); 125s ylabel ("Petal width (cm)"); 125s title ("5-Nearest Neighbor Classifier Decision Boundary"); 125s legend ({"Versicolor Region", "Virginica Region", ... 125s "Sampled Versicolor", "Sampled Virginica"}, ... 125s "location", "northwest") 125s axis tight 125s hold off 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "NSMethod", "exhaustive"); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s k = 10; 125s a = fitcknn (x, y, "NumNeighbors" ,k); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = ones (4, 11); 125s y = ["a"; "a"; "b"; "b"]; 125s k = 10; 125s a = fitcknn (x, y, "NumNeighbors" ,k); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s k = 10; 125s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s k = 10; 125s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s weights = ones (4,1); 125s a = fitcknn (x, y, "Standardize", 1); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.Standardize}, {true}) 125s assert ({a.Sigma}, {std(x, [], 1)}) 125s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s weights = ones (4,1); 125s a = fitcknn (x, y, "Standardize", false); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.Standardize}, {false}) 125s assert ({a.Sigma}, {[]}) 125s assert ({a.Mu}, {[]}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s s = ones (1, 3); 125s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.DistParameter}, {s}) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 125s assert (class (a), "ClassificationKNN"); 125s assert (a.DistParameter, 5) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 125s "NSMethod", "exhaustive"); 125s assert (class (a), "ClassificationKNN"); 125s assert (a.DistParameter, 5) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 125s assert (class (a), "ClassificationKNN"); 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 125s assert ({a.BucketSize}, {20}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "IncludeTies", true); 125s assert (class (a), "ClassificationKNN"); 125s assert (a.IncludeTies, true); 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y); 125s assert (class (a), "ClassificationKNN"); 125s assert (a.IncludeTies, false); 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Prior, [0.5; 0.5]) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s prior = [0.5; 0.5]; 125s a = fitcknn (x, y, "Prior", "empirical"); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Prior, prior) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "a"; "b"]; 125s prior = [0.75; 0.25]; 125s a = fitcknn (x, y, "Prior", "empirical"); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Prior, prior) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "a"; "b"]; 125s prior = [0.5; 0.5]; 125s a = fitcknn (x, y, "Prior", "uniform"); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Prior, prior) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s cost = eye (2); 125s a = fitcknn (x, y, "Cost", cost); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Cost, [1, 0; 0, 1]) 125s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s cost = eye (2); 125s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 125s assert (class (a), "ClassificationKNN") 125s assert (a.Cost, [1, 0; 0, 1]) 125s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 125s assert ({a.BucketSize}, {50}) 125s ***** test 125s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 125s y = ["a"; "a"; "b"; "b"]; 125s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 125s assert (class (a), "ClassificationPartitionedModel"); 125s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 125s assert (a.ModelParameters.NSMethod, "exhaustive") 125s assert (a.ModelParameters.Distance, "euclidean") 125s assert ({a.Trained{1}.BucketSize}, {50}) 125s ***** error fitcknn () 125s ***** error fitcknn (ones (4,1)) 125s ***** error 125s fitcknn (ones (4,2), ones (4, 1), "K") 125s ***** error 125s fitcknn (ones (4,2), ones (3, 1)) 125s ***** error 125s fitcknn (ones (4,2), ones (3, 1), "K", 2) 125s ***** error 125s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 125s ***** error 125s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 125s ***** error ... 125s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 125s 29 tests, 29 passed, 0 known failure, 0 skipped 125s [inst/chi2gof.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/chi2gof.m 125s ***** demo 125s x = normrnd (50, 5, 100, 1); 125s [h, p, stats] = chi2gof (x) 125s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 125s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 125s ***** demo 125s x = rand (100,1 ); 125s n = length (x); 125s binedges = linspace (0, 1, 11); 125s expectedCounts = n * diff (binedges); 125s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 125s ***** demo 125s bins = 0:5; 125s obsCounts = [6 16 10 12 4 2]; 125s n = sum(obsCounts); 125s lambdaHat = sum(bins.*obsCounts) / n; 125s expCounts = n * poisspdf(bins,lambdaHat); 125s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 125s "expected", expCounts, "nparams",1) 125s ***** error chi2gof () 125s ***** error chi2gof ([2,3;3,4]) 125s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 125s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 125s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 125s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 125s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 125s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 125s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 125s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 125s ***** test 125s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 125s [h, p, stats] = chi2gof (x); 125s assert (h, 0); 125s assert (p, NaN); 125s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 125s assert (stats.df, 0); 125s assert (stats.edges, [1, 2.5, 4], 1e-14); 125s assert (stats.O, [7, 5], 1e-14); 125s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 125s 11 tests, 11 passed, 0 known failure, 0 skipped 125s [inst/vartest.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/vartest.m 125s ***** error vartest (); 125s ***** error vartest ([1, 2, 3, 4], -0.5); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 0); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "tail", "val"); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "dim", 3); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 125s ***** error ... 125s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 125s ***** test 125s load carsmall 125s [h, pval, ci] = vartest (MPG, 7^2); 125s assert (h, 1); 125s assert (pval, 0.04335086742174443, 1e-14); 125s assert (ci, [49.397; 88.039], 1e-3); 125s 12 tests, 12 passed, 0 known failure, 0 skipped 125s [inst/vartest2.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/vartest2.m 125s ***** error vartest2 (); 125s ***** error vartest2 (ones (20,1)); 125s ***** error ... 125s vartest2 (rand (20,1), 5); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 125s ***** error ... 125s vartest2 (rand (20,1), rand (25,1)*2, "some"); 125s ***** test 125s load carsmall 125s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 125s assert (h, 0); 125s assert (pval, 0.6288022362718455, 1e-13); 125s assert (ci, [0.4139; 1.7193], 1e-4); 125s assert (stat.fstat, 0.8384, 1e-4); 125s assert (stat.df1, 30); 125s assert (stat.df2, 33); 125s 14 tests, 14 passed, 0 known failure, 0 skipped 125s [inst/ztest.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ztest.m 125s ***** error ztest (); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 2, -0.5); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 125s ***** error ... 125s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 125s ***** test 125s load carsmall 125s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 125s assert (h, 0); 125s assert (pval, 1, 1e-14); 125s assert (ci, [22.094; 25.343], 1e-3); 125s ***** test 125s load carsmall 125s [h, pval, ci] = ztest (MPG, 26, 8); 125s assert (h, 1); 125s assert (pval, 0.00568359158544743, 1e-14); 125s assert (ci, [22.101; 25.335], 1e-3); 125s ***** test 125s load carsmall 125s [h, pval, ci] = ztest (MPG, 26, 4); 125s assert (h, 1); 125s assert (pval, 3.184168011941316e-08, 1e-14); 125s assert (ci, [22.909; 24.527], 1e-3); 125s 13 tests, 13 passed, 0 known failure, 0 skipped 125s [inst/bar3.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/bar3.m 125s ***** demo 125s ## Ploting 5 bars in the same series. 125s 125s z = [50; 40; 30; 20; 10]; 125s bar3 (z); 125s ***** demo 125s ## Ploting 5 bars in different groups. 125s 125s z = [50, 40, 30, 20, 10]; 125s bar3 (z); 125s ***** demo 125s ## A 3D bar graph with each series corresponding to a column in z. 125s 125s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 125s bar3 (z); 125s ***** demo 125s ## Specify y-axis locations as tick names. y must be a column vector! 125s 125s y = [1950, 1960, 1970, 1980, 1990]'; 125s z = [16, 8, 4, 2, 1]'; 125s bar3 (y, z); 125s ***** demo 125s ## Plot 3 series as a grouped plot without any space between the grouped bars 125s 125s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 125s bar3 (z, 1, 'grouped'); 125s ***** demo 125s ## Plot a stacked style 3D bar graph 125s 125s z = [19, 30, 21, 30; 40, 16, 32, 12]; 125s b = bar3 (z, 0.5, 'stacked'); 125s ***** error bar3 ("A") 125s ***** error bar3 ({2,3,4,5}) 125s ***** error ... 125s bar3 ([1,2,3]', ones (2)) 125s ***** error ... 125s bar3 ([1:5], 1.2) 125s ***** error ... 125s bar3 ([1:5]', ones (5), 1.2) 125s ***** error ... 125s bar3 ([1:5]', ones (5), [0.8, 0.7]) 125s ***** error ... 125s bar3 (ones (5), 'width') 125s ***** error ... 125s bar3 (ones (5), 'width', 1.2) 125s ***** error ... 125s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 125s ***** error ... 125s bar3 (ones (5), 'color') 125s ***** error ... 125s bar3 (ones (5), 'color', [0.8, 0.8]) 125s ***** error ... 125s bar3 (ones (5), 'color', "brown") 125s ***** error ... 125s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 125s ***** error ... 125s bar3 (ones (5), 'xlabel') 125s ***** error ... 125s bar3 (ones (5), 'xlabel', 4) 125s ***** error ... 125s bar3 (ones (5), 'ylabel') 125s ***** error ... 125s bar3 (ones (5), 'ylabel', 4) 125s ***** error bar3 (ones (5), 'this', 4) 125s ***** error ... 125s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 125s ***** error ... 125s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 125s 20 tests, 20 passed, 0 known failure, 0 skipped 125s [inst/binotest.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/binotest.m 125s ***** demo 125s % flip a coin 1000 times, showing 475 heads 125s % Hypothesis: coin is fair, i.e. p=1/2 125s [h,p_val,ci] = binotest(475,1000,0.5) 125s % Result: h = 0 : null hypothesis not rejected, coin could be fair 125s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 125s % 0.444 <= p <= 0.506 with 95% confidence 125s ***** demo 125s % flip a coin 100 times, showing 65 heads 125s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 125s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 125s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 125s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 125s % 0 <= p <= 0.76 with 99% confidence 125s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 125s [h,p_val,ci] = binotest (51,235,1/6); 125s assert (p_val, 0.0437, 0.00005) 125s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 125s assert (p_val, 0.027, 0.0005) 125s 1 test, 1 passed, 0 known failure, 0 skipped 125s [inst/crossval.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/crossval.m 125s ***** test 125s load fisheriris 125s y = meas(:, 1); 125s X = [ones(size(y)) meas(:, 2:4)]; 125s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 125s results0 = crossval (f, X, y); 125s results1 = crossval (f, X, y, 'KFold', 10); 125s folds = 5; 125s results2 = crossval (f, X, y, 'KFold', folds); 125s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 125s results4 = crossval (f, X, y, 'LeaveOut', 1); 125s mcreps = 2; n_holdout = 20; 125s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 125s 125s ## ensure equal representation of iris species in the training set -- tends 125s ## to slightly reduce cross-validation mean square error 125s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 125s 125s assert (results0, results1, 2e-15); 125s assert (results2, results3, 5e-17); 125s assert (size(results4), [1 numel(y)]); 125s assert (mean(results4), 0.1018, 1e-4); 125s assert (size(results5), [mcreps 1]); 125s warning: strmatch is obsolete; use strncmp or strcmp instead 125s 1 test, 1 passed, 0 known failure, 0 skipped 125s [inst/procrustes.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/procrustes.m 125s ***** demo 125s ## Create some random points in two dimensions 125s n = 10; 125s randn ("seed", 1); 125s X = normrnd (0, 1, [n, 2]); 125s 125s ## Those same points, rotated, scaled, translated, plus some noise 125s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 125s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 125s 125s ## Conform Y to X, plot original X and Y, and transformed Y 125s [d, Z] = procrustes (X, Y); 125s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 125s ***** demo 125s ## Find Procrustes distance and plot superimposed shape 125s 125s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 125s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 125s plot (X(:,1),X(:,2),"x"); 125s hold on 125s plot (Y(:,1),Y(:,2),"o"); 125s xlim ([0 100]); 125s ylim ([0 100]); 125s legend ("Target shape (X)", "Source shape (Y)"); 125s [d, Z] = procrustes (X, Y) 125s plot (Z(:,1), Z(:,2), "s"); 125s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 125s hold off 125s ***** demo 125s ## Apply Procrustes transformation to larger set of points 125s 125s ## Create matrices with landmark points for two triangles 125s X = [5, 0; 5, 5; 8, 5]; # target 125s Y = [0, 0; 1, 0; 1, 1]; # source 125s 125s ## Create a matrix with more points on the source triangle 125s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 125s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 125s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 125s 125s ## Plot both shapes, including the larger set of points for the source shape 125s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 125s hold on 125s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 125s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 125s xlim ([-1 10]); 125s ylim ([-1 6]); 125s legend ("Target shape (X)", "Source shape (Y)", ... 125s "More points on Y", "Location", "northwest"); 125s hold off 125s 125s ## Obtain the Procrustes transformation 125s [d, Z, transform] = procrustes (X, Y) 125s 125s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 125s ## on the source shape onto the target shape, and then visualize the results. 125s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 125s figure 125s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 125s hold on 125s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 125s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 125s xlim ([-1 10]); 125s ylim ([-1 6]); 125s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 125s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 125s legend ("Target shape (X)", "Source shape (Y)", ... 125s "More points on Y", "Transformed source shape (Z)", ... 125s "Transformed additional points", "Location", "northwest"); 125s hold off 125s ***** demo 125s ## Compare shapes without reflection 125s 125s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 125s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 125s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 125s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 125s plot (T(:,1), T(:,2), "x-"); 125s hold on 125s plot (S(:,1), S(:,2), "o-"); 125s legend ("Target shape (d)", "Source shape (b)"); 125s hold off 125s d_false = procrustes (T, S, "reflection", false); 125s printf ("Procrustes distance without reflection: %f\n", d_false); 125s d_true = procrustes (T, S, "reflection", true); 125s printf ("Procrustes distance with reflection: %f\n", d_true); 125s d_best = procrustes (T, S, "reflection", "best"); 125s printf ("Procrustes distance with best fit: %f\n", d_true); 125s ***** error procrustes (); 125s ***** error procrustes (1, 2, 3, 4, 5, 6); 125s ***** error ... 125s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 125s ***** error ... 125s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 125s ***** error ... 125s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 125s ***** error ... 125s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (11, 3)); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 4)); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), true); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 125s ***** error ... 125s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 125s 15 tests, 15 passed, 0 known failure, 0 skipped 125s [inst/barttest.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/barttest.m 125s ***** error barttest () 125s ***** error barttest ([2,NaN;3,4]) 125s ***** error barttest (ones (30, 4), "alpha") 125s ***** error barttest (ones (30, 4), 0) 125s ***** error barttest (ones (30, 4), 1.2) 125s ***** error barttest (ones (30, 4), [0.2, 0.05]) 125s ***** error barttest (ones (30, 1)) 125s ***** error barttest (ones (30, 1), 0.05) 125s ***** test 125s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 125s [ndim, pval, chisq] = barttest (x); 125s assert (ndim, 2); 125s assert (pval, 0); 125s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 125s ***** test 125s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 125s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 125s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 125s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 125s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 125s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 125s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 125s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 125s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 125s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 125s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 125s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 125s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 125s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 125s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 125s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 125s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 125s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 125s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 125s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 125s [ndim, pval, chisq] = barttest (x); 125s assert (ndim, 3); 125s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 125s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 125s assert (chisq, chisq_out, 1e-4); 125s 10 tests, 10 passed, 0 known failure, 0 skipped 125s [inst/signrank.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/signrank.m 125s ***** test 125s load gradespaired.mat 125s [p, h, stats] = signrank (gradespaired(:,1), ... 125s gradespaired(:,2), 'tail', 'left'); 125s assert (p, 0.0047, 1e-4); 125s assert (h, true); 125s assert (stats.zval, -2.5982, 1e-4); 125s assert (stats.signedrank, 2017.5); 125s ***** test 125s load ('gradespaired.mat'); 125s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 125s 'tail', 'left', 'method', 'exact'); 125s assert (p, 0.0045, 1e-4); 125s assert (h, true); 125s assert (stats.zval, NaN); 125s assert (stats.signedrank, 2017.5); 125s ***** test 125s load mileage 125s [p, h, stats] = signrank (mileage(:,2), 33); 125s assert (p, 0.0312, 1e-4); 125s assert (h, true); 125s assert (stats.zval, NaN); 125s assert (stats.signedrank, 21); 125s ***** test 125s load mileage 125s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 125s assert (p, 0.0156, 1e-4); 125s assert (h, true); 125s assert (stats.zval, NaN); 125s assert (stats.signedrank, 21); 125s ***** test 125s load mileage 125s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 125s 'alpha', 0.01, 'method', 'approximate'); 125s assert (p, 0.0180, 1e-4); 125s assert (h, false); 125s assert (stats.zval, 2.0966, 1e-4); 125s assert (stats.signedrank, 21); 125s ***** error signrank (ones (2)) 125s ***** error ... 125s signrank ([1, 2, 3, 4], ones (2)) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [1, 2, 3]) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'tail') 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'alpha', 0) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'alpha', "a") 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'tail', "some") 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'method', 0.01) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'method', "some") 125s ***** error ... 125s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 125s 22 tests, 22 passed, 0 known failure, 0 skipped 125s [inst/histfit.m] 125s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/histfit.m 125s ***** demo 125s histfit (randn (100, 1)) 125s ***** demo 125s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 125s ***** demo 125s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 125s ***** test 125s hf = figure ("visible", "off"); 125s unwind_protect 125s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 125s histfit (x); 125s unwind_protect_cleanup 125s close (hf); 125s end_unwind_protect 125s warning: using the gnuplot graphics toolkit is discouraged 125s 125s The gnuplot graphics toolkit is not actively maintained and has a number 125s of limitations that are unlikely to be fixed. Communication with gnuplot 125s uses a one-directional pipe and limited information is passed back to the 125s Octave interpreter so most changes made interactively in the plot window 125s will not be reflected in the graphics properties managed by Octave. For 125s example, if the plot window is closed with a mouse click, Octave will not 125s be notified and will not update its internal list of open figure windows. 125s The qt toolkit is recommended instead. 125s ***** test 125s hf = figure ("visible", "off"); 125s unwind_protect 125s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 125s histfit (x); 125s unwind_protect_cleanup 125s close (hf); 125s end_unwind_protect 125s ***** test 125s hf = figure ("visible", "off"); 125s unwind_protect 125s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 125s histfit (x, 3); 125s unwind_protect_cleanup 125s close (hf); 125s end_unwind_protect 125s ***** test 125s hf = figure ("visible", "off"); 125s unwind_protect 125s histfit (randn (100, 1)); 125s unwind_protect_cleanup 125s close (hf); 125s end_unwind_protect 125s ***** test 125s hf = figure ("visible", "off"); 125s unwind_protect 125s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 125s unwind_protect_cleanup 125s close (hf); 125s end_unwind_protect 126s ***** test 126s hf = figure ("visible", "off"); 126s unwind_protect 126s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 126s unwind_protect_cleanup 126s close (hf); 126s end_unwind_protect 126s ***** test 126s hf = figure ("visible", "off"); 126s unwind_protect 126s ax = gca (); 126s histfit (ax, randn (100, 1)); 126s unwind_protect_cleanup 126s close (hf); 126s end_unwind_protect 126s ***** test 126s hf = figure ("visible", "off"); 126s unwind_protect 126s ax = gca (); 126s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 126s unwind_protect_cleanup 126s close (hf); 126s end_unwind_protect 126s ***** test 126s hf = figure ("visible", "off"); 126s unwind_protect 126s ax = gca (); 126s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 126s unwind_protect_cleanup 126s close (hf); 126s end_unwind_protect 126s ***** test 126s hf = figure ("visible", "off"); 126s unwind_protect 126s ax = axes ("parent", hf); 126s fail ("histfit (ax)", "histfit: too few input arguments."); 126s unwind_protect_cleanup 126s close (hf); 126s end_unwind_protect 126s ***** error ... 126s histfit ('wer') 126s ***** error histfit ([NaN, NaN, NaN]); 126s ***** error ... 126s histfit (randn (100, 1), 5.6) 126s ***** error ... 126s histfit (randn (100, 1), 8, 5) 126s ***** error ... 126s histfit (randn (100, 1), 8, {'normal'}) 126s ***** error ... 126s histfit (randn (100, 1), 8, 'Kernel') 126s ***** error ... 126s histfit (randn (100, 1), 8, 'ASDASDASD') 126s 17 tests, 17 passed, 0 known failure, 0 skipped 126s [inst/sampsizepwr.m] 126s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/sampsizepwr.m 126s ***** demo 126s ## Compute the mean closest to 100 that can be determined to be 126s ## significantly different from 100 using a t-test with a sample size 126s ## of 60 and a power of 0.8. 126s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 126s disp (mu1); 126s ***** demo 126s ## Compute the sample sizes required to distinguish mu0 = 100 from 126s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 126s ## smaller sample sizes of 1.5 and a power of 0.6. 126s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 126s ***** demo 126s ## Compute the sample size N required to distinguish p=.26 from p=.2 126s ## with a binomial test. The result is approximate, so make a plot to 126s ## see if any smaller N values also have the required power of 0.6. 126s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 126s nn = 1:250; 126s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 126s Nexact = min (nn(pwr >= 0.6)); 126s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 126s grid on 126s ***** demo 126s ## The company must test 52 bottles to detect the difference between a mean 126s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 126s ## to visualize how the sample size affects the power of the test. 126s 126s nout = sampsizepwr('t',[100 5],102,0.80); 126s nn = 1:100; 126s pwrout = sampsizepwr('t',[100 5],102,[],nn); 126s 126s figure; 126s plot (nn, pwrout, "b-", nout, 0.8, "ro") 126s title ("Power versus Sample Size") 126s xlabel ("Sample Size") 126s ylabel ("Power") 126s ***** error ... 126s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("z", 100, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("t", 100, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("t2", 60, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 126s ***** error ... 126s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("var", 0, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("var", -5, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("p", 0, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", -1, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", 0, [], 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 126s ***** error ... 126s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], [], [], 60); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], 110, [], []); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 126s ***** error ... 126s out = sampsizepwr ("var", 5, -1, [], 60); 126s ***** error ... 126s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 126s ***** error ... 126s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 126s ***** error ... 126s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], 110, 1.2); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], 110, 0); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 126s ***** error ... 126s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 126s ***** error ... 126s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 126s ***** error ... 126s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 126s ***** error ... 126s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 126s ***** warning ... 126s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 126s ***** warning ... 126s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 126s ***** test 126s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 126s assert (mu1, 103.67704316, 1e-8); 126s ***** test 126s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 126s assert (N1, 9); 126s assert (N2, 14); 127s ***** test 127s nn = 1:250; 127s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 127s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 127s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 127s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 127s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 127s ***** test 127s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 127s assert (nout, 52); 127s ***** test 127s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 127s assert (power, 0.5797373588621888, 1e-14); 127s ***** test 127s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 127s assert (nout, 18); 127s ***** test 127s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 127s assert (p1out, 25.65317979360237, 1e-14); 127s ***** test 127s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 127s assert (pwr, 0.716504004686586, 1e-14); 127s ***** test 127s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 127s assert (n, 11); 127s ***** test 127s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 127s assert ([n1, n2], [8, 16]); 128s 68 tests, 68 passed, 0 known failure, 0 skipped 128s [inst/fitcdiscr.m] 128s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitcdiscr.m 128s ***** demo 128s ## Train a linear discriminant classifier for Gamma = 0.5 128s ## and plot the decision boundaries. 128s 128s load fisheriris 128s idx = ! strcmp (species, "setosa"); 128s X = meas(idx,3:4); 128s Y = cast (strcmpi (species(idx), "virginica"), "double"); 128s obj = fitcdiscr (X, Y, "Gamma", 0.5) 128s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 128s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 128s [x1G, x2G] = meshgrid (x1, x2); 128s XGrid = [x1G(:), x2G(:)]; 128s pred = predict (obj, XGrid); 128s gidx = logical (str2num (cell2mat (pred))); 128s 128s figure 128s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 128s hold on 128s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 128s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 128s xlabel ("Petal length (cm)"); 128s ylabel ("Petal width (cm)"); 128s title ("Linear Discriminant Analysis Decision Boundary"); 128s legend ({"Versicolor Region", "Virginica Region", ... 128s "Sampled Versicolor", "Sampled Virginica"}, ... 128s "location", "northwest") 128s axis tight 128s hold off 128s ***** test 128s load fisheriris 128s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 128s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 128s assert (label, {'versicolor'}) 128s assert (score, [0, 0.9999, 0.0001], 1e-4) 128s assert (cost, [1, 0.0001, 0.9999], 1e-4) 128s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 128s assert (label, {'versicolor'}) 128s assert (score, [0, 0.6368, 0.3632], 1e-4) 128s assert (cost, [1, 0.3632, 0.6368], 1e-4) 128s assert (class (Mdl), "ClassificationDiscriminant"); 128s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 128s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 128s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 128s assert (Mdl.ClassNames, unique (species)) 128s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 128s 0.046361, 0.115388, 0.027622, 0.016355; ... 128s 0.083757, 0.027622, 0.185188, 0.021333; ... 128s 0.019201, 0.016355, 0.021333, 0.041882]; 128s assert (Mdl.Sigma, sigma, 1e-6) 128s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 128s 5.9360, 2.7700, 4.2600, 1.3260; ... 128s 6.5880, 2.9740, 5.5520, 2.0260]; 128s assert (Mdl.Mu, mu, 1e-14) 128s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 128s ***** error fitcdiscr () 128s ***** error fitcdiscr (ones (4,1)) 128s ***** error 128s fitcdiscr (ones (4,2), ones (4, 1), "K") 128s ***** error 128s fitcdiscr (ones (4,2), ones (3, 1)) 128s ***** error 128s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 128s 6 tests, 6 passed, 0 known failure, 0 skipped 128s [inst/dist_obj/RicianDistribution.m] 128s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/RicianDistribution.m 128s ***** shared pd, t 128s pd = RicianDistribution; 128s t = truncate (pd, 2, 4); 128s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 128s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 128s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 128s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 128s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 128s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 128s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 128s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 128s ***** assert (iqr (pd), 1.0890, 1e-4); 128s ***** assert (iqr (t), 0.5928, 1e-4); 128s ***** assert (mean (pd), 1.5486, 1e-4); 128s ***** assert (mean (t), 2.5380, 1e-4); 128s ***** assert (median (pd), 1.4755, 1e-4); 128s ***** assert (median (t), 2.4341, 1e-4); 128s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 128s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 128s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 128s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 128s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 128s ***** assert (any (random (t, 1000, 1) < 2), false); 128s ***** assert (any (random (t, 1000, 1) > 4), false); 128s ***** assert (std (pd), 0.7758, 1e-4); 128s ***** assert (std (t), 0.4294, 1e-4); 128s ***** assert (var (pd), 0.6019, 1e-4); 128s ***** assert (var (t), 0.1844, 1e-4); 128s ***** error ... 128s RicianDistribution(-eps, 1) 128s ***** error ... 128s RicianDistribution(-1, 1) 128s ***** error ... 128s RicianDistribution(Inf, 1) 128s ***** error ... 128s RicianDistribution(i, 1) 128s ***** error ... 128s RicianDistribution("a", 1) 128s ***** error ... 128s RicianDistribution([1, 2], 1) 128s ***** error ... 128s RicianDistribution(NaN, 1) 128s ***** error ... 128s RicianDistribution(1, 0) 128s ***** error ... 128s RicianDistribution(1, -1) 128s ***** error ... 128s RicianDistribution(1, Inf) 128s ***** error ... 128s RicianDistribution(1, i) 128s ***** error ... 128s RicianDistribution(1, "a") 128s ***** error ... 128s RicianDistribution(1, [1, 2]) 128s ***** error ... 128s RicianDistribution(1, NaN) 128s ***** error ... 128s cdf (RicianDistribution, 2, "uper") 128s ***** error ... 128s cdf (RicianDistribution, 2, 3) 128s ***** shared x 128s x = gevrnd (1, 1, 1, [1, 100]); 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha") 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", 0) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", 1) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", "") 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 128s "parameter", {"s", "sigma", "param"}) 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "parameter", "param") 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 128s ***** error ... 128s paramci (RicianDistribution.fit (x), "NAME", "value") 129s ***** error ... 129s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 129s ***** error ... 129s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 129s "NAME", "value") 129s ***** error ... 129s plot (RicianDistribution, "Parent") 129s ***** error ... 129s plot (RicianDistribution, "PlotType", 12) 129s ***** error ... 129s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 129s ***** error ... 129s plot (RicianDistribution, "PlotType", "pdfcdf") 129s ***** error ... 129s plot (RicianDistribution, "Discrete", "pdfcdf") 129s ***** error ... 129s plot (RicianDistribution, "Discrete", [1, 0]) 129s ***** error ... 129s plot (RicianDistribution, "Discrete", {true}) 129s ***** error ... 129s plot (RicianDistribution, "Parent", 12) 129s ***** error ... 129s plot (RicianDistribution, "Parent", "hax") 129s ***** error ... 129s plot (RicianDistribution, "invalidNAME", "pdf") 129s ***** error ... 129s plot (RicianDistribution, "PlotType", "probability") 129s ***** error ... 129s proflik (RicianDistribution, 2) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 3) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), [1, 2]) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), {1}) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, ones (2)) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display") 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display", 1) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 129s ***** error ... 129s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 129s ***** error ... 129s truncate (RicianDistribution) 129s ***** error ... 129s truncate (RicianDistribution, 2) 129s ***** error ... 129s truncate (RicianDistribution, 4, 2) 129s ***** shared pd 129s pd = RicianDistribution(1, 1); 129s pd(2) = RicianDistribution(1, 3); 129s ***** error cdf (pd, 1) 129s ***** error icdf (pd, 0.5) 129s ***** error iqr (pd) 129s ***** error mean (pd) 129s ***** error median (pd) 129s ***** error negloglik (pd) 129s ***** error paramci (pd) 129s ***** error pdf (pd, 1) 129s ***** error plot (pd) 129s ***** error proflik (pd, 2) 129s ***** error random (pd) 129s ***** error std (pd) 129s ***** error ... 129s truncate (pd, 2, 4) 129s ***** error var (pd) 129s 97 tests, 97 passed, 0 known failure, 0 skipped 129s [inst/dist_obj/GammaDistribution.m] 129s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/GammaDistribution.m 129s ***** shared pd, t 129s pd = GammaDistribution (1, 1); 129s t = truncate (pd, 2, 4); 129s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 129s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 129s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 129s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 129s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 129s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 129s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 129s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 129s ***** assert (iqr (pd), 1.0986, 1e-4); 129s ***** assert (iqr (t), 0.8020, 1e-4); 129s ***** assert (mean (pd), 1); 129s ***** assert (mean (t), 2.6870, 1e-4); 129s ***** assert (median (pd), 0.6931, 1e-4); 129s ***** assert (median (t), 2.5662, 1e-4); 129s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 129s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 129s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 129s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 129s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 129s ***** assert (any (random (t, 1000, 1) < 2), false); 129s ***** assert (any (random (t, 1000, 1) > 4), false); 129s ***** assert (std (pd), 1); 129s ***** assert (std (t), 0.5253, 1e-4); 129s ***** assert (var (pd), 1); 129s ***** assert (var (t), 0.2759, 1e-4); 129s ***** error ... 129s GammaDistribution(0, 1) 129s ***** error ... 129s GammaDistribution(Inf, 1) 129s ***** error ... 129s GammaDistribution(i, 1) 129s ***** error ... 129s GammaDistribution("a", 1) 129s ***** error ... 129s GammaDistribution([1, 2], 1) 129s ***** error ... 129s GammaDistribution(NaN, 1) 129s ***** error ... 129s GammaDistribution(1, 0) 129s ***** error ... 129s GammaDistribution(1, -1) 129s ***** error ... 129s GammaDistribution(1, Inf) 129s ***** error ... 129s GammaDistribution(1, i) 129s ***** error ... 129s GammaDistribution(1, "a") 129s ***** error ... 129s GammaDistribution(1, [1, 2]) 129s ***** error ... 129s GammaDistribution(1, NaN) 129s ***** error ... 129s cdf (GammaDistribution, 2, "uper") 129s ***** error ... 129s cdf (GammaDistribution, 2, 3) 129s ***** shared x 129s x = gamrnd (1, 1, [100, 1]); 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 0) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 1) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", "") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 129s "parameter", {"a", "b", "param"}) 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "parameter", "param") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "NAME", "value") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 129s ***** error ... 129s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 129s "NAME", "value") 129s ***** error ... 129s plot (GammaDistribution, "Parent") 129s ***** error ... 129s plot (GammaDistribution, "PlotType", 12) 129s ***** error ... 129s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 129s ***** error ... 129s plot (GammaDistribution, "PlotType", "pdfcdf") 129s ***** error ... 129s plot (GammaDistribution, "Discrete", "pdfcdf") 129s ***** error ... 129s plot (GammaDistribution, "Discrete", [1, 0]) 129s ***** error ... 129s plot (GammaDistribution, "Discrete", {true}) 129s ***** error ... 129s plot (GammaDistribution, "Parent", 12) 130s ***** error ... 130s plot (GammaDistribution, "Parent", "hax") 130s ***** error ... 130s plot (GammaDistribution, "invalidNAME", "pdf") 130s ***** error ... 130s plot (GammaDistribution, "PlotType", "probability") 130s ***** error ... 130s proflik (GammaDistribution, 2) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 3) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), [1, 2]) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), {1}) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, ones (2)) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display") 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display", 1) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 130s ***** error ... 130s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 130s ***** error ... 130s truncate (GammaDistribution) 130s ***** error ... 130s truncate (GammaDistribution, 2) 130s ***** error ... 130s truncate (GammaDistribution, 4, 2) 130s ***** shared pd 130s pd = GammaDistribution(1, 1); 130s pd(2) = GammaDistribution(1, 3); 130s ***** error cdf (pd, 1) 130s ***** error icdf (pd, 0.5) 130s ***** error iqr (pd) 130s ***** error mean (pd) 130s ***** error median (pd) 130s ***** error negloglik (pd) 130s ***** error paramci (pd) 130s ***** error pdf (pd, 1) 130s ***** error plot (pd) 130s ***** error proflik (pd, 2) 130s ***** error random (pd) 130s ***** error std (pd) 130s ***** error ... 130s truncate (pd, 2, 4) 130s ***** error var (pd) 130s 96 tests, 96 passed, 0 known failure, 0 skipped 130s [inst/dist_obj/RayleighDistribution.m] 130s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/RayleighDistribution.m 130s ***** shared pd, t 130s pd = RayleighDistribution; 130s t = truncate (pd, 2, 4); 130s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 130s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 130s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 130s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 130s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 130s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 130s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 130s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 130s ***** assert (iqr (pd), 0.9066, 1e-4); 130s ***** assert (iqr (t), 0.4609, 1e-4); 130s ***** assert (mean (pd), 1.2533, 1e-4); 130s ***** assert (mean (t), 2.4169, 1e-4); 130s ***** assert (median (pd), 1.1774, 1e-4); 130s ***** assert (median (t), 2.3198, 1e-4); 130s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 130s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 130s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 130s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 130s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 130s ***** assert (any (random (t, 1000, 1) < 2), false); 130s ***** assert (any (random (t, 1000, 1) > 4), false); 130s ***** assert (std (pd), 0.6551, 1e-4); 130s ***** assert (std (t), 0.3591, 1e-4); 130s ***** assert (var (pd), 0.4292, 1e-4); 130s ***** assert (var (t), 0.1290, 1e-4); 130s ***** error ... 130s RayleighDistribution(0) 130s ***** error ... 130s RayleighDistribution(-1) 130s ***** error ... 130s RayleighDistribution(Inf) 130s ***** error ... 130s RayleighDistribution(i) 130s ***** error ... 130s RayleighDistribution("a") 130s ***** error ... 130s RayleighDistribution([1, 2]) 130s ***** error ... 130s RayleighDistribution(NaN) 130s ***** error ... 130s cdf (RayleighDistribution, 2, "uper") 130s ***** error ... 130s cdf (RayleighDistribution, 2, 3) 130s ***** shared x 130s x = raylrnd (1, [1, 100]); 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 0) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 1) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", "") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 130s "parameter", {"sigma", "param"}) 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "parameter", "param") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "NAME", "value") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 130s ***** error ... 130s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 130s "parameter", "sigma", "NAME", "value") 130s ***** error ... 130s plot (RayleighDistribution, "Parent") 130s ***** error ... 130s plot (RayleighDistribution, "PlotType", 12) 130s ***** error ... 130s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 130s ***** error ... 130s plot (RayleighDistribution, "PlotType", "pdfcdf") 130s ***** error ... 130s plot (RayleighDistribution, "Discrete", "pdfcdf") 130s ***** error ... 130s plot (RayleighDistribution, "Discrete", [1, 0]) 130s ***** error ... 130s plot (RayleighDistribution, "Discrete", {true}) 130s ***** error ... 130s plot (RayleighDistribution, "Parent", 12) 130s ***** error ... 130s plot (RayleighDistribution, "Parent", "hax") 130s ***** error ... 130s plot (RayleighDistribution, "invalidNAME", "pdf") 130s ***** error ... 130s plot (RayleighDistribution, "PlotType", "probability") 130s ***** error ... 130s proflik (RayleighDistribution, 2) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 3) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), [1, 2]) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), {1}) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, ones (2)) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display") 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 130s ***** error ... 130s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 130s ***** error ... 130s truncate (RayleighDistribution) 130s ***** error ... 130s truncate (RayleighDistribution, 2) 130s ***** error ... 130s truncate (RayleighDistribution, 4, 2) 130s ***** shared pd 130s pd = RayleighDistribution(1); 130s pd(2) = RayleighDistribution(3); 130s ***** error cdf (pd, 1) 130s ***** error icdf (pd, 0.5) 130s ***** error iqr (pd) 130s ***** error mean (pd) 130s ***** error median (pd) 130s ***** error negloglik (pd) 130s ***** error paramci (pd) 130s ***** error pdf (pd, 1) 130s ***** error plot (pd) 130s ***** error proflik (pd, 2) 130s ***** error random (pd) 130s ***** error std (pd) 130s ***** error ... 130s truncate (pd, 2, 4) 130s ***** error var (pd) 130s 90 tests, 90 passed, 0 known failure, 0 skipped 130s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 130s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 130s ***** shared pd, t 130s pd = GeneralizedExtremeValueDistribution; 130s t = truncate (pd, 2, 4); 130s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 130s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 130s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 130s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 130s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 130s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 130s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 130s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 130s ***** assert (iqr (pd), 1.5725, 1e-4); 130s ***** assert (iqr (t), 0.8164, 1e-4); 130s ***** assert (mean (pd), 0.5772, 1e-4); 130s ***** assert (mean (t), 2.7043, 1e-4); 130s ***** assert (median (pd), 0.3665, 1e-4); 130s ***** assert (median (t), 2.5887, 1e-4); 130s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 130s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 130s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 130s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 130s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 130s ***** assert (any (random (t, 1000, 1) < 2), false); 130s ***** assert (any (random (t, 1000, 1) > 4), false); 130s ***** assert (std (pd), 1.2825, 1e-4); 130s ***** assert (std (t), 0.5289, 1e-4); 130s ***** assert (var (pd), 1.6449, 1e-4); 130s ***** assert (var (t), 0.2798, 1e-4); 130s ***** error ... 130s GeneralizedExtremeValueDistribution(Inf, 1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(i, 1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution("a", 1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(NaN, 1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 0, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, -1, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, Inf, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, i, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, "a", 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, NaN, 1) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 1, Inf) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 1, i) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 1, "a") 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 130s ***** error ... 130s GeneralizedExtremeValueDistribution(1, 1, NaN) 130s ***** error ... 130s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 130s ***** error ... 130s cdf (GeneralizedExtremeValueDistribution, 2, 3) 130s ***** shared x 130s x = gevrnd (1, 1, 1, [1, 100]); 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 130s ***** error ... 130s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 131s "parameter", "sigma", "alpha", {0.05}) 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 131s "parameter", {"k", "sigma", "mu", "param"}) 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 131s "parameter", {"k", "sigma", "mu", "param"}) 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 131s "parameter", "param") 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 131s "NAME", "value") 131s ***** error ... 131s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 131s "parameter", "sigma", "NAME", "value") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Parent") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 131s ***** error ... 131s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution, 2) 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 131s ***** error ... 131s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 132s "Display", ["on"; "on"]) 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 132s ***** error ... 132s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 132s "Display", "on") 132s ***** error ... 132s truncate (GeneralizedExtremeValueDistribution) 132s ***** error ... 132s truncate (GeneralizedExtremeValueDistribution, 2) 132s ***** error ... 132s truncate (GeneralizedExtremeValueDistribution, 4, 2) 132s ***** shared pd 132s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 132s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 132s ***** error cdf (pd, 1) 132s ***** error icdf (pd, 0.5) 132s ***** error iqr (pd) 132s ***** error mean (pd) 132s ***** error median (pd) 132s ***** error negloglik (pd) 132s ***** error paramci (pd) 132s ***** error pdf (pd, 1) 132s ***** error plot (pd) 132s ***** error proflik (pd, 2) 132s ***** error random (pd) 132s ***** error std (pd) 132s ***** error ... 132s truncate (pd, 2, 4) 132s ***** error var (pd) 132s 100 tests, 100 passed, 0 known failure, 0 skipped 132s [inst/dist_obj/WeibullDistribution.m] 132s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/WeibullDistribution.m 132s ***** shared pd, t 132s pd = WeibullDistribution; 132s t = truncate (pd, 2, 4); 132s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 132s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 132s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 132s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 132s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 132s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 132s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 132s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 132s ***** assert (iqr (pd), 1.0986, 1e-4); 132s ***** assert (iqr (t), 0.8020, 1e-4); 132s ***** assert (mean (pd), 1, 1e-14); 132s ***** assert (mean (t), 2.6870, 1e-4); 132s ***** assert (median (pd), 0.6931, 1e-4); 132s ***** assert (median (t), 2.5662, 1e-4); 132s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 132s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 132s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 132s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 132s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 132s ***** assert (any (random (t, 1000, 1) < 2), false); 132s ***** assert (any (random (t, 1000, 1) > 4), false); 132s ***** assert (std (pd), 1, 1e-14); 132s ***** assert (std (t), 0.5253, 1e-4); 132s ***** assert (var (pd), 1, 1e-14); 132s ***** assert (var (t), 0.2759, 1e-4); 132s ***** error ... 132s WeibullDistribution(0, 1) 132s ***** error ... 132s WeibullDistribution(-1, 1) 132s ***** error ... 132s WeibullDistribution(Inf, 1) 132s ***** error ... 132s WeibullDistribution(i, 1) 132s ***** error ... 132s WeibullDistribution("a", 1) 132s ***** error ... 132s WeibullDistribution([1, 2], 1) 132s ***** error ... 132s WeibullDistribution(NaN, 1) 132s ***** error ... 132s WeibullDistribution(1, 0) 132s ***** error ... 132s WeibullDistribution(1, -1) 132s ***** error ... 132s WeibullDistribution(1, Inf) 132s ***** error ... 132s WeibullDistribution(1, i) 132s ***** error ... 132s WeibullDistribution(1, "a") 132s ***** error ... 132s WeibullDistribution(1, [1, 2]) 132s ***** error ... 132s WeibullDistribution(1, NaN) 132s ***** error ... 132s cdf (WeibullDistribution, 2, "uper") 132s ***** error ... 132s cdf (WeibullDistribution, 2, 3) 132s ***** shared x 132s x = wblrnd (1, 1, [1, 100]); 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 0) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 1) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", "") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 132s "parameter", {"lambda", "k", "param"}) 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "parameter", "param") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "NAME", "value") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 132s ***** error ... 132s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 132s "NAME", "value") 132s ***** error ... 132s plot (WeibullDistribution, "Parent") 132s ***** error ... 132s plot (WeibullDistribution, "PlotType", 12) 132s ***** error ... 132s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 132s ***** error ... 132s plot (WeibullDistribution, "PlotType", "pdfcdf") 132s ***** error ... 132s plot (WeibullDistribution, "Discrete", "pdfcdf") 132s ***** error ... 132s plot (WeibullDistribution, "Discrete", [1, 0]) 132s ***** error ... 132s plot (WeibullDistribution, "Discrete", {true}) 132s ***** error ... 132s plot (WeibullDistribution, "Parent", 12) 132s ***** error ... 132s plot (WeibullDistribution, "Parent", "hax") 132s ***** error ... 132s plot (WeibullDistribution, "invalidNAME", "pdf") 132s ***** error ... 132s plot (WeibullDistribution, "PlotType", "probability") 132s ***** error ... 132s proflik (WeibullDistribution, 2) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 3) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), [1, 2]) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), {1}) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, ones (2)) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display") 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 132s ***** error ... 132s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 132s ***** error ... 132s truncate (WeibullDistribution) 132s ***** error ... 132s truncate (WeibullDistribution, 2) 132s ***** error ... 132s truncate (WeibullDistribution, 4, 2) 132s ***** shared pd 132s pd = WeibullDistribution(1, 1); 132s pd(2) = WeibullDistribution(1, 3); 132s ***** error cdf (pd, 1) 132s ***** error icdf (pd, 0.5) 132s ***** error iqr (pd) 132s ***** error mean (pd) 132s ***** error median (pd) 132s ***** error negloglik (pd) 132s ***** error paramci (pd) 132s ***** error pdf (pd, 1) 132s ***** error plot (pd) 132s ***** error proflik (pd, 2) 132s ***** error random (pd) 132s ***** error std (pd) 132s ***** error ... 132s truncate (pd, 2, 4) 132s ***** error var (pd) 132s 97 tests, 97 passed, 0 known failure, 0 skipped 132s [inst/dist_obj/BinomialDistribution.m] 132s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/BinomialDistribution.m 132s ***** shared pd, t, t_inf 132s pd = BinomialDistribution (5, 0.5); 132s t = truncate (pd, 2, 4); 132s t_inf = truncate (pd, 2, Inf); 132s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 132s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 132s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 132s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 132s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 132s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 132s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 132s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 132s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 132s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 132s ***** assert (iqr (pd), 1); 132s ***** assert (iqr (t), 1); 132s ***** assert (mean (pd), 2.5, 1e-10); 132s ***** assert (mean (t), 2.8, 1e-10); 132s ***** assert (mean (t_inf), 2.8846, 1e-4); 132s ***** assert (median (pd), 2.5); 132s ***** assert (median (t), 3); 132s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 132s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 132s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 132s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 132s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 132s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 132s ***** assert (any (random (t, 1000, 1) < 2), false); 132s ***** assert (any (random (t, 1000, 1) > 4), false); 132s ***** assert (std (pd), 1.1180, 1e-4); 132s ***** assert (std (t), 0.7483, 1e-4); 132s ***** assert (std (t_inf), 0.8470, 1e-4); 132s ***** assert (var (pd), 1.2500, 1e-4); 132s ***** assert (var (t), 0.5600, 1e-4); 132s ***** assert (var (t_inf), 0.7175, 1e-4); 132s ***** error ... 132s BinomialDistribution(Inf, 0.5) 132s ***** error ... 132s BinomialDistribution(i, 0.5) 132s ***** error ... 132s BinomialDistribution("a", 0.5) 132s ***** error ... 132s BinomialDistribution([1, 2], 0.5) 132s ***** error ... 132s BinomialDistribution(NaN, 0.5) 132s ***** error ... 132s BinomialDistribution(1, 1.01) 132s ***** error ... 132s BinomialDistribution(1, -0.01) 132s ***** error ... 132s BinomialDistribution(1, Inf) 132s ***** error ... 132s BinomialDistribution(1, i) 132s ***** error ... 132s BinomialDistribution(1, "a") 132s ***** error ... 132s BinomialDistribution(1, [1, 2]) 132s ***** error ... 132s BinomialDistribution(1, NaN) 132s ***** error ... 132s cdf (BinomialDistribution, 2, "uper") 132s ***** error ... 132s cdf (BinomialDistribution, 2, 3) 132s ***** shared x 132s rand ("seed", 2); 132s x = binornd (5, 0.5, [1, 100]); 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 132s "alpha", {0.05}) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), ... 132s "parameter", {"N", "p", "param"}) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 132s "parameter", {"N", "p", "param"}) 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 132s "parameter", "param") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 132s "NAME", "value") 132s ***** error ... 132s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 132s "parameter", "p", "NAME", "value") 132s ***** error ... 132s plot (BinomialDistribution, "Parent") 132s ***** error ... 132s plot (BinomialDistribution, "PlotType", 12) 132s ***** error ... 132s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 132s ***** error ... 132s plot (BinomialDistribution, "PlotType", "pdfcdf") 132s ***** error ... 132s plot (BinomialDistribution, "Discrete", "pdfcdf") 132s ***** error ... 132s plot (BinomialDistribution, "Discrete", [1, 0]) 132s ***** error ... 132s plot (BinomialDistribution, "Discrete", {true}) 132s ***** error ... 132s plot (BinomialDistribution, "Parent", 12) 132s ***** error ... 132s plot (BinomialDistribution, "Parent", "hax") 132s ***** error ... 132s plot (BinomialDistribution, "invalidNAME", "pdf") 132s ***** error ... 132s plot (BinomialDistribution, "PlotType", "probability") 132s ***** error ... 132s proflik (BinomialDistribution, 2) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 3) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), {1}) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 132s ***** error ... 132s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 133s ***** error ... 133s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 133s ***** error ... 133s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 133s ***** error ... 133s truncate (BinomialDistribution) 133s ***** error ... 133s truncate (BinomialDistribution, 2) 133s ***** error ... 133s truncate (BinomialDistribution, 4, 2) 133s ***** shared pd 133s pd = BinomialDistribution(1, 0.5); 133s pd(2) = BinomialDistribution(1, 0.6); 133s ***** error cdf (pd, 1) 133s ***** error icdf (pd, 0.5) 133s ***** error iqr (pd) 133s ***** error mean (pd) 133s ***** error median (pd) 133s ***** error negloglik (pd) 133s ***** error paramci (pd) 133s ***** error pdf (pd, 1) 133s ***** error plot (pd) 133s ***** error proflik (pd, 2) 133s ***** error random (pd) 133s ***** error std (pd) 133s ***** error ... 133s truncate (pd, 2, 4) 133s ***** error var (pd) 133s 102 tests, 102 passed, 0 known failure, 0 skipped 133s [inst/dist_obj/GeneralizedParetoDistribution.m] 133s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/GeneralizedParetoDistribution.m 133s ***** shared pd, t 133s pd = GeneralizedParetoDistribution (1, 1, 1); 133s t = truncate (pd, 2, 4); 133s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 133s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 133s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 133s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 133s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 133s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 133s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 133s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 133s ***** assert (iqr (pd), 2.6667, 1e-4); 133s ***** assert (iqr (t), 0.9143, 1e-4); 133s ***** assert (mean (pd), Inf); 133s ***** assert (mean (t), 2.7726, 1e-4); 133s ***** assert (median (pd), 2); 133s ***** assert (median (t), 2.6667, 1e-4); 133s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 133s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 133s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 133s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 133s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 133s ***** assert (any (random (t, 1000, 1) < 2), false); 133s ***** assert (any (random (t, 1000, 1) > 4), false); 133s ***** assert (std (pd), Inf); 133s ***** assert (std (t), 0.5592, 1e-4); 133s ***** assert (var (pd), Inf); 133s ***** assert (var (t), 0.3128, 1e-4); 133s ***** error ... 133s GeneralizedParetoDistribution(Inf, 1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(i, 1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution("a", 1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution([1, 2], 1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(NaN, 1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, 0, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, -1, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, Inf, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, i, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, "a", 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, [1, 2], 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, NaN, 1) 133s ***** error ... 133s GeneralizedParetoDistribution(1, 1, Inf) 133s ***** error ... 133s GeneralizedParetoDistribution(1, 1, i) 133s ***** error ... 133s GeneralizedParetoDistribution(1, 1, "a") 133s ***** error ... 133s GeneralizedParetoDistribution(1, 1, [1, 2]) 133s ***** error ... 133s GeneralizedParetoDistribution(1, 1, NaN) 133s ***** error ... 133s cdf (GeneralizedParetoDistribution, 2, "uper") 133s ***** error ... 133s cdf (GeneralizedParetoDistribution, 2, 3) 133s ***** shared x 133s x = gprnd (1, 1, 1, [1, 100]); 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 133s "parameter", "sigma", "alpha", {0.05}) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 133s "parameter", {"k", "sigma", "param"}) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 133s "parameter", {"k", "sigma", "param"}) 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 133s "parameter", "param") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 133s "NAME", "value") 133s ***** error ... 133s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 133s "parameter", "sigma", "NAME", "value") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Parent") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "PlotType", 12) 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Discrete", {true}) 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Parent", 12) 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "Parent", "hax") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 133s ***** error ... 133s plot (GeneralizedParetoDistribution, "PlotType", "probability") 133s ***** error ... 133s proflik (GeneralizedParetoDistribution, 2) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 133s "Display", ["on"; "on"]) 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 133s ***** error ... 133s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 133s "Display", "on") 133s ***** error ... 133s truncate (GeneralizedParetoDistribution) 133s ***** error ... 133s truncate (GeneralizedParetoDistribution, 2) 133s ***** error ... 133s truncate (GeneralizedParetoDistribution, 4, 2) 133s ***** shared pd 133s pd = GeneralizedParetoDistribution(1, 1, 1); 133s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 133s ***** error cdf (pd, 1) 133s ***** error icdf (pd, 0.5) 133s ***** error iqr (pd) 133s ***** error mean (pd) 133s ***** error median (pd) 133s ***** error negloglik (pd) 133s ***** error paramci (pd) 133s ***** error pdf (pd, 1) 133s ***** error plot (pd) 133s ***** error proflik (pd, 2) 133s ***** error random (pd) 133s ***** error std (pd) 133s ***** error ... 133s truncate (pd, 2, 4) 133s ***** error var (pd) 133s 100 tests, 100 passed, 0 known failure, 0 skipped 133s [inst/dist_obj/BirnbaumSaundersDistribution.m] 133s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/BirnbaumSaundersDistribution.m 133s ***** demo 133s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 133s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 133s ## distribution to this data and plot a PDF of the fitted distribution 133s ## superimposed on a histogram of the data 133s 133s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 133s randg ("seed", 21); 133s data = random (pd, 5000, 1); 133s pd = fitdist (data, "BirnbaumSaunders") 133s plot (pd) 133s msg = "Fitted Birnbaum-Saunders distribution with a = %0.2f and b = %0.2f"; 133s title (sprintf (msg, pd.beta, pd.gamma)) 133s ***** demo 133s ## Plot the PDF of a Birnbaum-Saunders distribution, with parameters beta = 1 133s ## and gamma = 0.5, truncated at [0, 2] intervals. Generate 10000 random 133s ## samples from this truncated distribution and superimpose a histogram with 133s ## 100 bins scaled accordingly 133s 133s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 133s t = truncate (pd, 0, 2) 133s randg ("seed", 21); 133s data = random (t, 10000, 1); 133s plot (t) 133s title ("Birnbaum-Saunders distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 133s hold on 133s hist (data, 100, 50) 133s hold off 133s ***** demo 133s ## Generate a data set of 100 random samples from a Birnbaum-Saunders 133s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 133s ## distribution to this data and plot its CDF superimposed over an empirical 133s ## CDF of the data 133s 133s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 133s randg ("seed", 21); 133s data = random (pd, 100, 1); 133s pd = fitdist (data, "BirnbaumSaunders") 133s plot (pd, "plottype", "cdf") 133s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 133s pd.beta, pd.gamma)) 133s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 133s ***** shared pd, t 133s pd = BirnbaumSaundersDistribution; 133s t = truncate (pd, 2, 4); 133s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 133s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 133s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 133s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 133s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 133s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 133s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 133s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 133s ***** assert (iqr (pd), 1.4236, 1e-4); 133s ***** assert (iqr (t), 0.8968, 1e-4); 133s ***** assert (mean (pd), 1.5, eps); 133s ***** assert (mean (t), 2.7723, 1e-4); 133s ***** assert (median (pd), 1, 1e-4); 133s ***** assert (median (t), 2.6711, 1e-4); 133s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 133s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 133s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 133s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 133s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 133s ***** assert (any (random (t, 1000, 1) < 2), false); 133s ***** assert (any (random (t, 1000, 1) > 4), false); 133s ***** assert (std (pd), 1.5, eps); 133s ***** assert (std (t), 0.5528, 1e-4); 133s ***** assert (var (pd), 2.25, eps); 133s ***** assert (var (t), 0.3056, 1e-4); 133s ***** error ... 133s BirnbaumSaundersDistribution(0, 1) 133s ***** error ... 133s BirnbaumSaundersDistribution(Inf, 1) 133s ***** error ... 133s BirnbaumSaundersDistribution(i, 1) 133s ***** error ... 133s BirnbaumSaundersDistribution("beta", 1) 133s ***** error ... 133s BirnbaumSaundersDistribution([1, 2], 1) 133s ***** error ... 133s BirnbaumSaundersDistribution(NaN, 1) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, 0) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, -1) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, Inf) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, i) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, "beta") 133s ***** error ... 133s BirnbaumSaundersDistribution(1, [1, 2]) 133s ***** error ... 133s BirnbaumSaundersDistribution(1, NaN) 133s ***** error ... 133s cdf (BirnbaumSaundersDistribution, 2, "uper") 133s ***** error ... 133s cdf (BirnbaumSaundersDistribution, 2, 3) 133s ***** shared x 133s rand ("seed", 5); 133s x = bisarnd (1, 1, [100, 1]); 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 133s "beta", "alpha", {0.05}) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), ... 133s "parameter", {"beta", "gamma", "param"}) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 133s "parameter", {"beta", "gamma", "param"}) 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 133s "parameter", "param") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 133s "NAME", "value") 133s ***** error ... 133s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 133s "parameter", "beta", "NAME", "value") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Parent") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "PlotType", 12) 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Parent", 12) 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "Parent", "hax") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 133s ***** error ... 133s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution, 2) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), 3) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 133s ***** error ... 133s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 134s ***** error ... 134s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 134s ***** error ... 134s truncate (BirnbaumSaundersDistribution) 134s ***** error ... 134s truncate (BirnbaumSaundersDistribution, 2) 134s ***** error ... 134s truncate (BirnbaumSaundersDistribution, 4, 2) 134s ***** shared pd 134s pd = BirnbaumSaundersDistribution(1, 1); 134s pd(2) = BirnbaumSaundersDistribution(1, 3); 134s ***** error cdf (pd, 1) 134s ***** error icdf (pd, 0.5) 134s ***** error iqr (pd) 134s ***** error mean (pd) 134s ***** error median (pd) 134s ***** error negloglik (pd) 134s ***** error paramci (pd) 134s ***** error pdf (pd, 1) 134s ***** error plot (pd) 134s ***** error proflik (pd, 2) 134s ***** error random (pd) 134s ***** error std (pd) 134s ***** error ... 134s truncate (pd, 2, 4) 134s ***** error var (pd) 134s 96 tests, 96 passed, 0 known failure, 0 skipped 134s [inst/dist_obj/MultinomialDistribution.m] 134s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/MultinomialDistribution.m 134s ***** shared pd, t 134s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 134s t = truncate (pd, 2, 4); 134s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 134s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 134s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 134s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 134s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 134s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 134s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 134s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 134s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 134s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 134s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 134s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 134s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 134s ***** assert (iqr (pd), 2); 134s ***** assert (iqr (t), 2); 134s ***** assert (mean (pd), 3.3, 1e-14); 134s ***** assert (mean (t), 3, eps); 134s ***** assert (median (pd), 3); 134s ***** assert (median (t), 3); 134s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 134s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 134s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 134s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 134s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 134s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 134s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 134s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 134s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 134s ***** assert (std (pd), 1.4177, 1e-4); 134s ***** assert (std (t), 0.7559, 1e-4); 134s ***** assert (var (pd), 2.0100, 1e-4); 134s ***** assert (var (t), 0.5714, 1e-4); 134s ***** error ... 134s MultinomialDistribution(0) 134s ***** error ... 134s MultinomialDistribution(-1) 134s ***** error ... 134s MultinomialDistribution(Inf) 134s ***** error ... 134s MultinomialDistribution(i) 134s ***** error ... 134s MultinomialDistribution("a") 134s ***** error ... 134s MultinomialDistribution([1, 2]) 134s ***** error ... 134s MultinomialDistribution(NaN) 134s ***** error ... 134s cdf (MultinomialDistribution, 2, "uper") 134s ***** error ... 134s cdf (MultinomialDistribution, 2, 3) 134s ***** error ... 134s cdf (MultinomialDistribution, i) 134s ***** error ... 134s plot (MultinomialDistribution, "Parent") 134s ***** error ... 134s plot (MultinomialDistribution, "PlotType", 12) 134s ***** error ... 134s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 134s ***** error ... 134s plot (MultinomialDistribution, "PlotType", "pdfcdf") 134s ***** error ... 134s plot (MultinomialDistribution, "Discrete", "pdfcdf") 134s ***** error ... 134s plot (MultinomialDistribution, "Discrete", [1, 0]) 134s ***** error ... 134s plot (MultinomialDistribution, "Discrete", {true}) 134s ***** error ... 134s plot (MultinomialDistribution, "Parent", 12) 134s ***** error ... 134s plot (MultinomialDistribution, "Parent", "hax") 134s ***** error ... 134s plot (MultinomialDistribution, "invalidNAME", "pdf") 134s ***** error ... 134s plot (MultinomialDistribution, "PlotType", "probability") 134s ***** error ... 134s truncate (MultinomialDistribution) 134s ***** error ... 134s truncate (MultinomialDistribution, 2) 134s ***** error ... 134s truncate (MultinomialDistribution, 4, 2) 134s ***** shared pd 134s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 134s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 134s ***** error cdf (pd, 1) 134s ***** error icdf (pd, 0.5) 134s ***** error iqr (pd) 134s ***** error mean (pd) 134s ***** error median (pd) 134s ***** error pdf (pd, 1) 134s ***** error plot (pd) 134s ***** error random (pd) 134s ***** error std (pd) 134s ***** error ... 134s truncate (pd, 2, 4) 134s ***** error var (pd) 134s 64 tests, 64 passed, 0 known failure, 0 skipped 134s [inst/dist_obj/NakagamiDistribution.m] 134s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/NakagamiDistribution.m 134s ***** shared pd, t 134s pd = NakagamiDistribution; 134s t = truncate (pd, 2, 4); 134s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 134s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 134s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 134s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 134s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 134s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 134s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 134s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 134s ***** assert (iqr (pd), 0.6411, 1e-4); 134s ***** assert (iqr (t), 0.2502, 1e-4); 134s ***** assert (mean (pd), 0.8862, 1e-4); 134s ***** assert (mean (t), 2.2263, 1e-4); 134s ***** assert (median (pd), 0.8326, 1e-4); 134s ***** assert (median (t), 2.1664, 1e-4); 134s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 134s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 134s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 134s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 134s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 134s ***** assert (any (random (t, 1000, 1) < 2), false); 134s ***** assert (any (random (t, 1000, 1) > 4), false); 134s ***** assert (std (pd), 0.4633, 1e-4); 134s ***** assert (std (t), 0.2083, 1e-4); 134s ***** assert (var (pd), 0.2146, 1e-4); 134s ***** assert (var (t), 0.0434, 1e-4); 134s ***** error ... 134s NakagamiDistribution(Inf, 1) 134s ***** error ... 134s NakagamiDistribution(i, 1) 134s ***** error ... 134s NakagamiDistribution("a", 1) 134s ***** error ... 134s NakagamiDistribution([1, 2], 1) 134s ***** error ... 134s NakagamiDistribution(NaN, 1) 134s ***** error ... 134s NakagamiDistribution(1, 0) 134s ***** error ... 134s NakagamiDistribution(1, -1) 134s ***** error ... 134s NakagamiDistribution(1, Inf) 134s ***** error ... 134s NakagamiDistribution(1, i) 134s ***** error ... 134s NakagamiDistribution(1, "a") 134s ***** error ... 134s NakagamiDistribution(1, [1, 2]) 134s ***** error ... 134s NakagamiDistribution(1, NaN) 134s ***** error ... 134s cdf (NakagamiDistribution, 2, "uper") 134s ***** error ... 134s cdf (NakagamiDistribution, 2, 3) 134s ***** shared x 134s x = nakarnd (1, 0.5, [1, 100]); 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 0) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 1) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", "") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 134s "parameter", {"mu", "omega", "param"}) 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "parameter", "param") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "NAME", "value") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 134s ***** error ... 134s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 134s "NAME", "value") 134s ***** error ... 134s plot (NakagamiDistribution, "Parent") 134s ***** error ... 134s plot (NakagamiDistribution, "PlotType", 12) 134s ***** error ... 134s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 134s ***** error ... 134s plot (NakagamiDistribution, "PlotType", "pdfcdf") 134s ***** error ... 134s plot (NakagamiDistribution, "Discrete", "pdfcdf") 134s ***** error ... 134s plot (NakagamiDistribution, "Discrete", [1, 0]) 134s ***** error ... 134s plot (NakagamiDistribution, "Discrete", {true}) 134s ***** error ... 134s plot (NakagamiDistribution, "Parent", 12) 134s ***** error ... 134s plot (NakagamiDistribution, "Parent", "hax") 134s ***** error ... 134s plot (NakagamiDistribution, "invalidNAME", "pdf") 134s ***** error ... 134s plot (NakagamiDistribution, "PlotType", "probability") 134s ***** error ... 134s proflik (NakagamiDistribution, 2) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 3) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), [1, 2]) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), {1}) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display") 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 134s ***** error ... 134s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 134s ***** error ... 134s truncate (NakagamiDistribution) 134s ***** error ... 134s truncate (NakagamiDistribution, 2) 134s ***** error ... 134s truncate (NakagamiDistribution, 4, 2) 134s ***** shared pd 134s pd = NakagamiDistribution(1, 0.5); 134s pd(2) = NakagamiDistribution(1, 0.6); 134s ***** error cdf (pd, 1) 134s ***** error icdf (pd, 0.5) 134s ***** error iqr (pd) 134s ***** error mean (pd) 134s ***** error median (pd) 134s ***** error negloglik (pd) 134s ***** error paramci (pd) 134s ***** error pdf (pd, 1) 134s ***** error plot (pd) 134s ***** error proflik (pd, 2) 134s ***** error random (pd) 134s ***** error std (pd) 134s ***** error ... 134s truncate (pd, 2, 4) 134s ***** error var (pd) 134s 95 tests, 95 passed, 0 known failure, 0 skipped 134s [inst/dist_obj/LogisticDistribution.m] 134s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/LogisticDistribution.m 134s ***** shared pd, t 134s pd = LogisticDistribution (0, 1); 134s t = truncate (pd, 2, 4); 134s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 134s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 134s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 134s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 134s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 134s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 134s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 134s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 134s ***** assert (iqr (pd), 2.1972, 1e-4); 134s ***** assert (iqr (t), 0.8286, 1e-4); 134s ***** assert (mean (pd), 0, 1e-4); 134s ***** assert (mean (t), 2.7193, 1e-4); 134s ***** assert (median (pd), 0); 134s ***** assert (median (t), 2.6085, 1e-4); 134s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 134s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 134s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 134s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 134s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 134s ***** assert (any (random (t, 1000, 1) < 2), false); 134s ***** assert (any (random (t, 1000, 1) > 4), false); 134s ***** assert (std (pd), 1.8138, 1e-4); 134s ***** assert (std (t), 0.5320, 1e-4); 134s ***** assert (var (pd), 3.2899, 1e-4); 134s ***** assert (var (t), 0.2830, 1e-4); 134s ***** error ... 134s LogisticDistribution(Inf, 1) 134s ***** error ... 134s LogisticDistribution(i, 1) 134s ***** error ... 134s LogisticDistribution("a", 1) 134s ***** error ... 134s LogisticDistribution([1, 2], 1) 134s ***** error ... 134s LogisticDistribution(NaN, 1) 134s ***** error ... 134s LogisticDistribution(1, 0) 134s ***** error ... 134s LogisticDistribution(1, -1) 134s ***** error ... 134s LogisticDistribution(1, Inf) 134s ***** error ... 134s LogisticDistribution(1, i) 134s ***** error ... 134s LogisticDistribution(1, "a") 134s ***** error ... 134s LogisticDistribution(1, [1, 2]) 134s ***** error ... 134s LogisticDistribution(1, NaN) 134s ***** error ... 134s cdf (LogisticDistribution, 2, "uper") 134s ***** error ... 134s cdf (LogisticDistribution, 2, 3) 134s ***** shared x 134s x = logirnd (1, 1, [1, 100]); 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha") 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha", 0) 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha", 1) 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha", "") 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 134s ***** error ... 134s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 135s "parameter", {"mu", "sigma", "param"}) 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "parameter", "param") 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "NAME", "value") 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 135s ***** error ... 135s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 135s "NAME", "value") 135s ***** error ... 135s plot (LogisticDistribution, "Parent") 135s ***** error ... 135s plot (LogisticDistribution, "PlotType", 12) 135s ***** error ... 135s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 135s ***** error ... 135s plot (LogisticDistribution, "PlotType", "pdfcdf") 135s ***** error ... 135s plot (LogisticDistribution, "Discrete", "pdfcdf") 135s ***** error ... 135s plot (LogisticDistribution, "Discrete", [1, 0]) 135s ***** error ... 135s plot (LogisticDistribution, "Discrete", {true}) 135s ***** error ... 135s plot (LogisticDistribution, "Parent", 12) 135s ***** error ... 135s plot (LogisticDistribution, "Parent", "hax") 135s ***** error ... 135s plot (LogisticDistribution, "invalidNAME", "pdf") 135s ***** error ... 135s plot (LogisticDistribution, "PlotType", "probability") 135s ***** error ... 135s proflik (LogisticDistribution, 2) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 3) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), [1, 2]) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), {1}) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, ones (2)) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display") 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 135s ***** error ... 135s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 135s ***** error ... 135s truncate (LogisticDistribution) 135s ***** error ... 135s truncate (LogisticDistribution, 2) 135s ***** error ... 135s truncate (LogisticDistribution, 4, 2) 135s ***** shared pd 135s pd = LogisticDistribution(1, 1); 135s pd(2) = LogisticDistribution(1, 3); 135s ***** error cdf (pd, 1) 135s ***** error icdf (pd, 0.5) 135s ***** error iqr (pd) 135s ***** error mean (pd) 135s ***** error median (pd) 135s ***** error negloglik (pd) 135s ***** error paramci (pd) 135s ***** error pdf (pd, 1) 135s ***** error plot (pd) 135s ***** error proflik (pd, 2) 135s ***** error random (pd) 135s ***** error std (pd) 135s ***** error ... 135s truncate (pd, 2, 4) 135s ***** error var (pd) 135s 95 tests, 95 passed, 0 known failure, 0 skipped 135s [inst/dist_obj/UniformDistribution.m] 135s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/UniformDistribution.m 135s ***** shared pd, t 135s pd = UniformDistribution (0, 5); 135s t = truncate (pd, 2, 4); 135s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 135s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 135s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 135s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 135s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 135s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 135s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 135s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 135s ***** assert (iqr (pd), 2.5, 1e-14); 135s ***** assert (iqr (t), 1, 1e-14); 135s ***** assert (mean (pd), 2.5, 1e-14); 135s ***** assert (mean (t), 3, 1e-14); 135s ***** assert (median (pd), 2.5, 1e-14); 135s ***** assert (median (t), 3, 1e-14); 135s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 135s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 135s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 135s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 135s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 135s ***** assert (any (random (t, 1000, 1) < 2), false); 135s ***** assert (any (random (t, 1000, 1) > 4), false); 135s ***** assert (std (pd), 1.4434, 1e-4); 135s ***** assert (std (t), 0.5774, 1e-4); 135s ***** assert (var (pd), 2.0833, 1e-4); 135s ***** assert (var (t), 0.3333, 1e-4); 135s ***** error ... 135s UniformDistribution (i, 1) 135s ***** error ... 135s UniformDistribution (Inf, 1) 135s ***** error ... 135s UniformDistribution ([1, 2], 1) 135s ***** error ... 135s UniformDistribution ("a", 1) 135s ***** error ... 135s UniformDistribution (NaN, 1) 135s ***** error ... 135s UniformDistribution (1, i) 135s ***** error ... 135s UniformDistribution (1, Inf) 135s ***** error ... 135s UniformDistribution (1, [1, 2]) 135s ***** error ... 135s UniformDistribution (1, "a") 135s ***** error ... 135s UniformDistribution (1, NaN) 135s ***** error ... 135s UniformDistribution (2, 1) 135s ***** error ... 135s cdf (UniformDistribution, 2, "uper") 135s ***** error ... 135s cdf (UniformDistribution, 2, 3) 135s ***** error ... 135s plot (UniformDistribution, "Parent") 135s ***** error ... 135s plot (UniformDistribution, "PlotType", 12) 135s ***** error ... 135s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 135s ***** error ... 135s plot (UniformDistribution, "PlotType", "pdfcdf") 135s ***** error ... 135s plot (UniformDistribution, "Discrete", "pdfcdf") 135s ***** error ... 135s plot (UniformDistribution, "Discrete", [1, 0]) 135s ***** error ... 135s plot (UniformDistribution, "Discrete", {true}) 135s ***** error ... 135s plot (UniformDistribution, "Parent", 12) 135s ***** error ... 135s plot (UniformDistribution, "Parent", "hax") 135s ***** error ... 135s plot (UniformDistribution, "invalidNAME", "pdf") 135s ***** error ... 135s plot (UniformDistribution, "PlotType", "probability") 135s ***** error ... 135s truncate (UniformDistribution) 135s ***** error ... 135s truncate (UniformDistribution, 2) 135s ***** error ... 135s truncate (UniformDistribution, 4, 2) 135s ***** shared pd 135s pd = UniformDistribution (0, 1); 135s pd(2) = UniformDistribution (0, 2); 135s ***** error cdf (pd, 1) 135s ***** error icdf (pd, 0.5) 135s ***** error iqr (pd) 135s ***** error mean (pd) 135s ***** error median (pd) 135s ***** error pdf (pd, 1) 135s ***** error plot (pd) 135s ***** error random (pd) 135s ***** error std (pd) 135s ***** error ... 135s truncate (pd, 2, 4) 135s ***** error var (pd) 135s 63 tests, 63 passed, 0 known failure, 0 skipped 135s [inst/dist_obj/BurrDistribution.m] 135s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/BurrDistribution.m 135s ***** demo 135s ## Generate a data set of 5000 random samples from a Burr type XII 135s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 135s ## XII distribution to this data and plot a PDF of the fitted distribution 135s ## superimposed on a histogram of the data 135s 135s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 135s rand ("seed", 21); 135s data = random (pd, 5000, 1); 135s pd = fitdist (data, "Burr") 135s plot (pd) 135s msg = strcat (["Fitted Burr type XII distribution with"], ... 135s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 135s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 135s ***** demo 135s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 135s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 135s ## samples from this truncated distribution and superimpose a histogram with 135s ## 100 bins scaled accordingly 135s 135s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 135s t = truncate (pd, 0.5, 2.5) 135s rand ("seed", 21); 135s data = random (t, 10000, 1); 135s plot (t) 135s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 135s hold on 135s hist (data, 100, 50) 135s hold off 135s ***** demo 135s ## Generate a data set of 100 random samples from a Burr type XII 135s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 135s ## XII distribution to this data and plot its CDF superimposed over an 135s ## empirical CDF of the data 135s 135s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 135s rand ("seed", 21); 135s data = random (pd, 100, 1); 135s pd = fitdist (data, "Burr") 135s plot (pd, "plottype", "cdf") 135s msg = strcat (["Fitted Burr type XII distribution with"], ... 135s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 135s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 135s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 135s ***** shared pd, t 135s pd = BurrDistribution; 135s t = truncate (pd, 2, 4); 135s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 135s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 135s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 135s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 135s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 135s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 135s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 135s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 135s ***** assert (iqr (pd), 2.6667, 1e-4); 135s ***** assert (iqr (t), 0.9524, 1e-4); 135s ***** assert (mean (pd), Inf); 135s ***** assert (mean (t), 2.8312, 1e-4); 135s ***** assert (median (pd), 1, 1e-4); 135s ***** assert (median (t), 2.75, 1e-4); 135s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 135s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 135s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 135s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 135s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 135s ***** assert (any (random (t, 1000, 1) < 2), false); 135s ***** assert (any (random (t, 1000, 1) > 4), false); 135s ***** assert (std (pd), Inf); 135s ***** assert (std (t), 0.5674, 1e-4); 135s ***** assert (var (pd), Inf); 135s ***** assert (var (t), 0.3220, 1e-4); 135s ***** error ... 135s BurrDistribution(0, 1, 1) 135s ***** error ... 135s BurrDistribution(-1, 1, 1) 135s ***** error ... 135s BurrDistribution(Inf, 1, 1) 135s ***** error ... 135s BurrDistribution(i, 1, 1) 135s ***** error ... 135s BurrDistribution("a", 1, 1) 135s ***** error ... 135s BurrDistribution([1, 2], 1, 1) 135s ***** error ... 135s BurrDistribution(NaN, 1, 1) 135s ***** error ... 135s BurrDistribution(1, 0, 1) 135s ***** error ... 135s BurrDistribution(1, -1, 1) 135s ***** error ... 135s BurrDistribution(1, Inf, 1) 135s ***** error ... 135s BurrDistribution(1, i, 1) 135s ***** error ... 135s BurrDistribution(1, "a", 1) 135s ***** error ... 135s BurrDistribution(1, [1, 2], 1) 135s ***** error ... 135s BurrDistribution(1, NaN, 1) 135s ***** error ... 135s BurrDistribution(1, 1, 0) 135s ***** error ... 135s BurrDistribution(1, 1, -1) 135s ***** error ... 135s BurrDistribution(1, 1, Inf) 135s ***** error ... 135s BurrDistribution(1, 1, i) 135s ***** error ... 135s BurrDistribution(1, 1, "a") 135s ***** error ... 135s BurrDistribution(1, 1, [1, 2]) 135s ***** error ... 135s BurrDistribution(1, 1, NaN) 135s ***** error ... 135s cdf (BurrDistribution, 2, "uper") 135s ***** error ... 135s cdf (BurrDistribution, 2, 3) 135s ***** shared x 135s rand ("seed", 4); 135s x = burrrnd (1, 1, 1, [1, 100]); 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha") 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha", 0) 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha", 1) 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha", "") 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 135s ***** error ... 135s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 136s "parameter", {"alpha", "c", "k", "param"}) 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "parameter", "param") 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "NAME", "value") 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 136s ***** error ... 136s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 136s "NAME", "value") 136s ***** error ... 136s plot (BurrDistribution, "Parent") 136s ***** error ... 136s plot (BurrDistribution, "PlotType", 12) 136s ***** error ... 136s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 136s ***** error ... 136s plot (BurrDistribution, "PlotType", "pdfcdf") 136s ***** error ... 136s plot (BurrDistribution, "Discrete", "pdfcdf") 136s ***** error ... 136s plot (BurrDistribution, "Discrete", [1, 0]) 136s ***** error ... 136s plot (BurrDistribution, "Discrete", {true}) 136s ***** error ... 136s plot (BurrDistribution, "Parent", 12) 136s ***** error ... 136s plot (BurrDistribution, "Parent", "hax") 136s ***** error ... 136s plot (BurrDistribution, "invalidNAME", "pdf") 136s ***** error ... 136s plot (BurrDistribution, "PlotType", "probability") 136s ***** error ... 136s proflik (BurrDistribution, 2) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 4) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), [1, 2]) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), {1}) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, ones (2)) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display") 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display", 1) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 136s ***** error ... 136s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 136s ***** error ... 136s truncate (BurrDistribution) 136s ***** error ... 136s truncate (BurrDistribution, 2) 136s ***** error ... 136s truncate (BurrDistribution, 4, 2) 136s ***** shared pd 136s pd = BurrDistribution(1, 1, 1); 136s pd(2) = BurrDistribution(1, 3, 1); 136s ***** error cdf (pd, 1) 136s ***** error icdf (pd, 0.5) 136s ***** error iqr (pd) 136s ***** error mean (pd) 136s ***** error median (pd) 136s ***** error negloglik (pd) 136s ***** error paramci (pd) 136s ***** error pdf (pd, 1) 136s ***** error plot (pd) 136s ***** error proflik (pd, 2) 136s ***** error random (pd) 136s ***** error std (pd) 136s ***** error ... 136s truncate (pd, 2, 4) 136s ***** error var (pd) 136s 104 tests, 104 passed, 0 known failure, 0 skipped 136s [inst/dist_obj/TriangularDistribution.m] 136s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/TriangularDistribution.m 136s ***** shared pd, t 136s pd = TriangularDistribution (0, 3, 5); 136s t = truncate (pd, 2, 4); 137s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 137s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 137s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 137s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 137s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 137s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 137s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 137s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 137s ***** assert (iqr (pd), 1.4824, 1e-4); 137s ***** assert (iqr (t), 0.8678, 1e-4); 137s ***** assert (mean (pd), 2.6667, 1e-4); 137s ***** assert (mean (t), 2.9649, 1e-4); 137s ***** assert (median (pd), 2.7386, 1e-4); 137s ***** assert (median (t), 2.9580, 1e-4); 137s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 137s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 137s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 137s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 137s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 137s ***** assert (any (random (t, 1000, 1) < 2), false); 137s ***** assert (any (random (t, 1000, 1) > 4), false); 137s ***** assert (std (pd), 1.0274, 1e-4); 137s ***** assert (std (t), 0.5369, 1e-4); 137s ***** assert (var (pd), 1.0556, 1e-4); 137s ***** assert (var (t), 0.2882, 1e-4); 137s ***** error ... 137s TriangularDistribution (i, 1, 2) 137s ***** error ... 137s TriangularDistribution (Inf, 1, 2) 137s ***** error ... 137s TriangularDistribution ([1, 2], 1, 2) 137s ***** error ... 137s TriangularDistribution ("a", 1, 2) 137s ***** error ... 137s TriangularDistribution (NaN, 1, 2) 137s ***** error ... 137s TriangularDistribution (1, i, 2) 137s ***** error ... 137s TriangularDistribution (1, Inf, 2) 137s ***** error ... 137s TriangularDistribution (1, [1, 2], 2) 137s ***** error ... 137s TriangularDistribution (1, "a", 2) 137s ***** error ... 137s TriangularDistribution (1, NaN, 2) 137s ***** error ... 137s TriangularDistribution (1, 2, i) 137s ***** error ... 137s TriangularDistribution (1, 2, Inf) 137s ***** error ... 137s TriangularDistribution (1, 2, [1, 2]) 137s ***** error ... 137s TriangularDistribution (1, 2, "a") 137s ***** error ... 137s TriangularDistribution (1, 2, NaN) 137s ***** error ... 137s TriangularDistribution (1, 1, 1) 137s ***** error ... 137s TriangularDistribution (1, 0.5, 2) 137s ***** error ... 137s cdf (TriangularDistribution, 2, "uper") 137s ***** error ... 137s cdf (TriangularDistribution, 2, 3) 137s ***** error ... 137s plot (TriangularDistribution, "Parent") 137s ***** error ... 137s plot (TriangularDistribution, "PlotType", 12) 137s ***** error ... 137s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 137s ***** error ... 137s plot (TriangularDistribution, "PlotType", "pdfcdf") 137s ***** error ... 137s plot (TriangularDistribution, "Discrete", "pdfcdf") 137s ***** error ... 137s plot (TriangularDistribution, "Discrete", [1, 0]) 137s ***** error ... 137s plot (TriangularDistribution, "Discrete", {true}) 137s ***** error ... 137s plot (TriangularDistribution, "Parent", 12) 137s ***** error ... 137s plot (TriangularDistribution, "Parent", "hax") 137s ***** error ... 137s plot (TriangularDistribution, "invalidNAME", "pdf") 137s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 137s plot (TriangularDistribution, "PlotType", "probability") 137s ***** error ... 137s truncate (TriangularDistribution) 137s ***** error ... 137s truncate (TriangularDistribution, 2) 137s ***** error ... 137s truncate (TriangularDistribution, 4, 2) 137s ***** shared pd 137s pd = TriangularDistribution (0, 1, 2); 137s pd(2) = TriangularDistribution (0, 1, 2); 137s ***** error cdf (pd, 1) 137s ***** error icdf (pd, 0.5) 137s ***** error iqr (pd) 137s ***** error mean (pd) 137s ***** error median (pd) 137s ***** error pdf (pd, 1) 137s ***** error plot (pd) 137s ***** error random (pd) 137s ***** error std (pd) 137s ***** error ... 137s truncate (pd, 2, 4) 137s ***** error var (pd) 137s 69 tests, 69 passed, 0 known failure, 0 skipped 137s [inst/dist_obj/PiecewiseLinearDistribution.m] 137s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/PiecewiseLinearDistribution.m 137s ***** shared pd, t 137s load patients 137s [f, x] = ecdf (Weight); 137s f = f(1:5:end); 137s x = x(1:5:end); 137s pd = PiecewiseLinearDistribution (x, f); 137s t = truncate (pd, 130, 180); 137s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 137s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 137s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 137s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 137s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 137s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 137s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 137s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 137s ***** assert (iqr (pd), 50.0833, 1e-4); 137s ***** assert (iqr (t), 36.8077, 1e-4); 137s ***** assert (mean (pd), 153.61, 1e-10); 137s ***** assert (mean (t), 152.311, 1e-3); 139s ***** assert (median (pd), 142, 1e-10); 139s ***** assert (median (t), 141.9462, 1e-4); 139s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 139s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 139s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 139s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 139s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 139s ***** assert (any (random (t, 1000, 1) < 130), false); 139s ***** assert (any (random (t, 1000, 1) > 180), false); 139s ***** assert (std (pd), 26.5196, 1e-4); 139s ***** assert (std (t), 18.2941, 1e-4); 144s ***** assert (var (pd), 703.2879, 1e-4); 144s ***** assert (var (t), 334.6757, 1e-4); 149s ***** error ... 149s PiecewiseLinearDistribution ([0, i], [0, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 1], [0, i]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0], [1]) 149s ***** error ... 149s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 149s ***** error ... 149s cdf (PiecewiseLinearDistribution, 2, "uper") 149s ***** error ... 149s cdf (PiecewiseLinearDistribution, 2, 3) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Parent") 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "PlotType", 12) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Discrete", {true}) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Parent", 12) 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "Parent", "hax") 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 149s ***** error ... 149s plot (PiecewiseLinearDistribution, "PlotType", "probability") 149s ***** error ... 149s truncate (PiecewiseLinearDistribution) 149s ***** error ... 149s truncate (PiecewiseLinearDistribution, 2) 149s ***** error ... 149s truncate (PiecewiseLinearDistribution, 4, 2) 149s ***** shared pd 149s pd = PiecewiseLinearDistribution (); 149s pd(2) = PiecewiseLinearDistribution (); 149s ***** error cdf (pd, 1) 149s ***** error icdf (pd, 0.5) 149s ***** error iqr (pd) 149s ***** error mean (pd) 149s ***** error median (pd) 149s ***** error pdf (pd, 1) 149s ***** error plot (pd) 149s ***** error random (pd) 149s ***** error std (pd) 149s ***** error ... 149s truncate (pd, 2, 4) 149s ***** error var (pd) 149s 63 tests, 63 passed, 0 known failure, 0 skipped 149s [inst/dist_obj/NegativeBinomialDistribution.m] 149s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/NegativeBinomialDistribution.m 149s ***** shared pd, t, t_inf 149s pd = NegativeBinomialDistribution (5, 0.5); 149s t = truncate (pd, 2, 4); 149s t_inf = truncate (pd, 2, Inf); 149s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 149s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 149s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 149s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 149s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 149s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 149s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 149s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 149s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 149s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 149s ***** assert (iqr (pd), 4); 149s ***** assert (iqr (t), 2); 149s ***** assert (mean (pd), 5); 149s ***** assert (mean (t), 3.0500, 1e-4); 149s ***** assert (mean (t_inf), 5.5263, 1e-4); 149s ***** assert (median (pd), 4); 149s ***** assert (median (t), 3); 149s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 149s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 149s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 149s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 149s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 149s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 149s ***** assert (any (random (t, 1000, 1) < 2), false); 149s ***** assert (any (random (t, 1000, 1) > 4), false); 149s ***** assert (std (pd), 3.1623, 1e-4); 149s ***** assert (std (t), 0.8047, 1e-4); 149s ***** assert (std (t_inf), 2.9445, 1e-4); 149s ***** assert (var (pd), 10); 149s ***** assert (var (t), 0.6475, 1e-4); 149s ***** assert (var (t_inf), 8.6704, 1e-4); 149s ***** error ... 149s NegativeBinomialDistribution(Inf, 1) 149s ***** error ... 149s NegativeBinomialDistribution(i, 1) 149s ***** error ... 149s NegativeBinomialDistribution("a", 1) 149s ***** error ... 149s NegativeBinomialDistribution([1, 2], 1) 149s ***** error ... 149s NegativeBinomialDistribution(NaN, 1) 149s ***** error ... 149s NegativeBinomialDistribution(1, 0) 149s ***** error ... 149s NegativeBinomialDistribution(1, -1) 149s ***** error ... 149s NegativeBinomialDistribution(1, Inf) 149s ***** error ... 149s NegativeBinomialDistribution(1, i) 149s ***** error ... 149s NegativeBinomialDistribution(1, "a") 149s ***** error ... 149s NegativeBinomialDistribution(1, [1, 2]) 149s ***** error ... 149s NegativeBinomialDistribution(1, NaN) 149s ***** error ... 149s NegativeBinomialDistribution(1, 1.2) 149s ***** error ... 149s cdf (NegativeBinomialDistribution, 2, "uper") 149s ***** error ... 149s cdf (NegativeBinomialDistribution, 2, 3) 149s ***** shared x 149s x = nbinrnd (1, 0.5, [1, 100]); 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 149s "alpha", {0.05}) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), ... 149s "parameter", {"R", "P", "param"}) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 149s "parameter", {"R", "P", "param"}) 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 149s "parameter", "param") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 149s "NAME", "value") 149s ***** error ... 149s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 149s "parameter", "R", "NAME", "value") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Parent") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "PlotType", 12) 149s ***** error ... 149s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 149s ***** error ... 149s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Discrete", {true}) 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Parent", 12) 149s ***** error ... 149s plot (NegativeBinomialDistribution, "Parent", "hax") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 149s ***** error ... 149s plot (NegativeBinomialDistribution, "PlotType", "probability") 149s ***** error ... 149s proflik (NegativeBinomialDistribution, 2) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 3) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), {1}) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 149s ***** error ... 149s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 149s ***** error ... 149s truncate (NegativeBinomialDistribution) 149s ***** error ... 149s truncate (NegativeBinomialDistribution, 2) 149s ***** error ... 149s truncate (NegativeBinomialDistribution, 4, 2) 149s ***** shared pd 149s pd = NegativeBinomialDistribution(1, 0.5); 149s pd(2) = NegativeBinomialDistribution(1, 0.6); 149s ***** error cdf (pd, 1) 149s ***** error icdf (pd, 0.5) 149s ***** error iqr (pd) 149s ***** error mean (pd) 149s ***** error median (pd) 149s ***** error negloglik (pd) 149s ***** error paramci (pd) 149s ***** error pdf (pd, 1) 149s ***** error plot (pd) 149s ***** error proflik (pd, 2) 149s ***** error random (pd) 149s ***** error std (pd) 149s ***** error ... 149s truncate (pd, 2, 4) 149s ***** error var (pd) 150s 102 tests, 102 passed, 0 known failure, 0 skipped 150s [inst/dist_obj/LognormalDistribution.m] 150s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/LognormalDistribution.m 150s ***** shared pd, t 150s pd = LognormalDistribution; 150s t = truncate (pd, 2, 4); 150s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 150s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 150s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 150s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 150s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 150s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 150s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 150s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 150s ***** assert (iqr (pd), 1.4536, 1e-4); 150s ***** assert (iqr (t), 0.8989, 1e-4); 150s ***** assert (mean (pd), 1.6487, 1e-4); 150s ***** assert (mean (t), 2.7692, 1e-4); 150s ***** assert (median (pd), 1, 1e-4); 150s ***** assert (median (t), 2.6653, 1e-4); 150s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 150s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 150s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 150s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 150s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 150s ***** assert (any (random (t, 1000, 1) < 2), false); 150s ***** assert (any (random (t, 1000, 1) > 4), false); 150s ***** assert (std (pd), 2.1612, 1e-4); 150s ***** assert (std (t), 0.5540, 1e-4); 150s ***** assert (var (pd), 4.6708, 1e-4); 150s ***** assert (var (t), 0.3069, 1e-4); 150s ***** error ... 150s LognormalDistribution(Inf, 1) 150s ***** error ... 150s LognormalDistribution(i, 1) 150s ***** error ... 150s LognormalDistribution("a", 1) 150s ***** error ... 150s LognormalDistribution([1, 2], 1) 150s ***** error ... 150s LognormalDistribution(NaN, 1) 150s ***** error ... 150s LognormalDistribution(1, 0) 150s ***** error ... 150s LognormalDistribution(1, -1) 150s ***** error ... 150s LognormalDistribution(1, Inf) 150s ***** error ... 150s LognormalDistribution(1, i) 150s ***** error ... 150s LognormalDistribution(1, "a") 150s ***** error ... 150s LognormalDistribution(1, [1, 2]) 150s ***** error ... 150s LognormalDistribution(1, NaN) 150s ***** error ... 150s cdf (LognormalDistribution, 2, "uper") 150s ***** error ... 150s cdf (LognormalDistribution, 2, 3) 150s ***** shared x 150s randn ("seed", 1); 150s x = lognrnd (1, 1, [1, 100]); 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 0) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 1) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", "") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 150s "parameter", {"mu", "sigma", "param"}) 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "parameter", "param") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "NAME", "value") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 150s ***** error ... 150s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 150s "NAME", "value") 150s ***** error ... 150s plot (LognormalDistribution, "Parent") 150s ***** error ... 150s plot (LognormalDistribution, "PlotType", 12) 150s ***** error ... 150s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 150s ***** error ... 150s plot (LognormalDistribution, "PlotType", "pdfcdf") 150s ***** error ... 150s plot (LognormalDistribution, "Discrete", "pdfcdf") 150s ***** error ... 150s plot (LognormalDistribution, "Discrete", [1, 0]) 150s ***** error ... 150s plot (LognormalDistribution, "Discrete", {true}) 150s ***** error ... 150s plot (LognormalDistribution, "Parent", 12) 150s ***** error ... 150s plot (LognormalDistribution, "Parent", "hax") 150s ***** error ... 150s plot (LognormalDistribution, "invalidNAME", "pdf") 150s ***** error ... 150s plot (LognormalDistribution, "PlotType", "probability") 150s ***** error ... 150s proflik (LognormalDistribution, 2) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 3) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), [1, 2]) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), {1}) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, ones (2)) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, "Display") 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 150s ***** error ... 150s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 151s ***** error ... 151s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 151s ***** error ... 151s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 151s ***** error ... 151s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 151s ***** error ... 151s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 151s ***** error ... 151s truncate (LognormalDistribution) 151s ***** error ... 151s truncate (LognormalDistribution, 2) 151s ***** error ... 151s truncate (LognormalDistribution, 4, 2) 151s ***** shared pd 151s pd = LognormalDistribution(1, 1); 151s pd(2) = LognormalDistribution(1, 3); 151s ***** error cdf (pd, 1) 151s ***** error icdf (pd, 0.5) 151s ***** error iqr (pd) 151s ***** error mean (pd) 151s ***** error median (pd) 151s ***** error negloglik (pd) 151s ***** error paramci (pd) 151s ***** error pdf (pd, 1) 151s ***** error plot (pd) 151s ***** error proflik (pd, 2) 151s ***** error random (pd) 151s ***** error std (pd) 151s ***** error ... 151s truncate (pd, 2, 4) 151s ***** error var (pd) 151s 95 tests, 95 passed, 0 known failure, 0 skipped 151s [inst/dist_obj/NormalDistribution.m] 151s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/NormalDistribution.m 151s ***** shared pd, t 151s pd = NormalDistribution; 151s t = truncate (pd, -2, 2); 151s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 151s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 151s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 151s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 151s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 151s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 151s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 151s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 151s ***** assert (iqr (pd), 1.3490, 1e-4); 151s ***** assert (iqr (t), 1.2782, 1e-4); 151s ***** assert (mean (pd), 0); 151s ***** assert (mean (t), 0, 3e-16); 151s ***** assert (median (pd), 0); 151s ***** assert (median (t), 0, 3e-16); 151s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 151s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 151s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 151s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 151s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 151s ***** assert (any (random (t, 1000, 1) < -2), false); 151s ***** assert (any (random (t, 1000, 1) > 2), false); 151s ***** assert (std (pd), 1); 151s ***** assert (std (t), 0.8796, 1e-4); 151s ***** assert (var (pd), 1); 151s ***** assert (var (t), 0.7737, 1e-4); 151s ***** error ... 151s NormalDistribution(Inf, 1) 151s ***** error ... 151s NormalDistribution(i, 1) 151s ***** error ... 151s NormalDistribution("a", 1) 151s ***** error ... 151s NormalDistribution([1, 2], 1) 151s ***** error ... 151s NormalDistribution(NaN, 1) 151s ***** error ... 151s NormalDistribution(1, 0) 151s ***** error ... 151s NormalDistribution(1, -1) 151s ***** error ... 151s NormalDistribution(1, Inf) 151s ***** error ... 151s NormalDistribution(1, i) 151s ***** error ... 151s NormalDistribution(1, "a") 151s ***** error ... 151s NormalDistribution(1, [1, 2]) 151s ***** error ... 151s NormalDistribution(1, NaN) 151s ***** error ... 151s cdf (NormalDistribution, 2, "uper") 151s ***** error ... 151s cdf (NormalDistribution, 2, 3) 151s ***** shared x 151s x = normrnd (1, 1, [1, 100]); 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 0) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 1) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", "") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 151s "parameter", {"mu", "sigma", "param"}) 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "parameter", "param") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "NAME", "value") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 151s ***** error ... 151s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 151s "NAME", "value") 151s ***** error ... 151s plot (NormalDistribution, "Parent") 151s ***** error ... 151s plot (NormalDistribution, "PlotType", 12) 151s ***** error ... 151s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 151s ***** error ... 151s plot (NormalDistribution, "PlotType", "pdfcdf") 151s ***** error ... 151s plot (NormalDistribution, "Discrete", "pdfcdf") 151s ***** error ... 151s plot (NormalDistribution, "Discrete", [1, 0]) 151s ***** error ... 151s plot (NormalDistribution, "Discrete", {true}) 151s ***** error ... 151s plot (NormalDistribution, "Parent", 12) 151s ***** error ... 151s plot (NormalDistribution, "Parent", "hax") 151s ***** error ... 151s plot (NormalDistribution, "invalidNAME", "pdf") 151s ***** error ... 151s plot (NormalDistribution, "PlotType", "probability") 151s ***** error ... 151s proflik (NormalDistribution, 2) 151s ***** error ... 151s proflik (NormalDistribution.fit (x), 3) 151s ***** error ... 151s proflik (NormalDistribution.fit (x), [1, 2]) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), {1}) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, ones (2)) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display") 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display", 1) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 152s ***** error ... 152s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 152s ***** error ... 152s truncate (NormalDistribution) 152s ***** error ... 152s truncate (NormalDistribution, 2) 152s ***** error ... 152s truncate (NormalDistribution, 4, 2) 152s ***** shared pd 152s pd = NormalDistribution(1, 1); 152s pd(2) = NormalDistribution(1, 3); 152s ***** error cdf (pd, 1) 152s ***** error icdf (pd, 0.5) 152s ***** error iqr (pd) 152s ***** error mean (pd) 152s ***** error median (pd) 152s ***** error negloglik (pd) 152s ***** error paramci (pd) 152s ***** error pdf (pd, 1) 152s ***** error plot (pd) 152s ***** error proflik (pd, 2) 152s ***** error random (pd) 152s ***** error std (pd) 152s ***** error ... 152s truncate (pd, 2, 4) 152s ***** error var (pd) 152s 95 tests, 95 passed, 0 known failure, 0 skipped 152s [inst/dist_obj/LoglogisticDistribution.m] 152s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/LoglogisticDistribution.m 152s ***** shared pd, t 152s pd = LoglogisticDistribution; 152s t = truncate (pd, 2, 4); 152s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 152s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 152s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 152s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 152s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 152s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 152s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 152s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 152s ***** assert (iqr (pd), 2.6667, 1e-4); 152s ***** assert (iqr (t), 0.9524, 1e-4); 152s ***** assert (mean (pd), Inf); 152s ***** assert (mean (t), 2.8312, 1e-4); 152s ***** assert (median (pd), 1, 1e-4); 152s ***** assert (median (t), 2.75, 1e-4); 152s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 152s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 152s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 152s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 152s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 152s ***** assert (any (random (t, 1000, 1) < 2), false); 152s ***** assert (any (random (t, 1000, 1) > 4), false); 152s ***** assert (std (pd), Inf); 152s ***** assert (std (t), 0.5674, 1e-4); 152s ***** assert (var (pd), Inf); 152s ***** assert (var (t), 0.3220, 1e-4); 152s ***** error ... 152s LoglogisticDistribution(Inf, 1) 152s ***** error ... 152s LoglogisticDistribution(i, 1) 152s ***** error ... 152s LoglogisticDistribution("a", 1) 152s ***** error ... 152s LoglogisticDistribution([1, 2], 1) 152s ***** error ... 152s LoglogisticDistribution(NaN, 1) 152s ***** error ... 152s LoglogisticDistribution(1, 0) 152s ***** error ... 152s LoglogisticDistribution(1, -1) 152s ***** error ... 152s LoglogisticDistribution(1, Inf) 152s ***** error ... 152s LoglogisticDistribution(1, i) 152s ***** error ... 152s LoglogisticDistribution(1, "a") 152s ***** error ... 152s LoglogisticDistribution(1, [1, 2]) 152s ***** error ... 152s LoglogisticDistribution(1, NaN) 152s ***** error ... 152s cdf (LoglogisticDistribution, 2, "uper") 152s ***** error ... 152s cdf (LoglogisticDistribution, 2, 3) 152s ***** shared x 152s x = loglrnd (1, 1, [1, 100]); 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", "") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 152s "parameter", {"mu", "sigma", "param"}) 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 152s ***** error ... 152s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 152s "parameter", "mu", "NAME", "value") 152s ***** error ... 152s plot (LoglogisticDistribution, "Parent") 152s ***** error ... 152s plot (LoglogisticDistribution, "PlotType", 12) 152s ***** error ... 152s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 152s ***** error ... 152s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 152s ***** error ... 152s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 152s ***** error ... 152s plot (LoglogisticDistribution, "Discrete", [1, 0]) 152s ***** error ... 152s plot (LoglogisticDistribution, "Discrete", {true}) 152s ***** error ... 152s plot (LoglogisticDistribution, "Parent", 12) 152s ***** error ... 152s plot (LoglogisticDistribution, "Parent", "hax") 152s ***** error ... 152s plot (LoglogisticDistribution, "invalidNAME", "pdf") 152s ***** error ... 152s plot (LoglogisticDistribution, "PlotType", "probability") 152s ***** error ... 152s proflik (LoglogisticDistribution, 2) 152s ***** error ... 152s proflik (LoglogisticDistribution.fit (x), 3) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), [1, 2]) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), {1}) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display") 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 153s ***** error ... 153s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 153s ***** error ... 153s truncate (LoglogisticDistribution) 153s ***** error ... 153s truncate (LoglogisticDistribution, 2) 153s ***** error ... 153s truncate (LoglogisticDistribution, 4, 2) 153s ***** shared pd 153s pd = LoglogisticDistribution(1, 1); 153s pd(2) = LoglogisticDistribution(1, 3); 153s ***** error cdf (pd, 1) 153s ***** error icdf (pd, 0.5) 153s ***** error iqr (pd) 153s ***** error mean (pd) 153s ***** error median (pd) 153s ***** error negloglik (pd) 153s ***** error paramci (pd) 153s ***** error pdf (pd, 1) 153s ***** error plot (pd) 153s ***** error proflik (pd, 2) 153s ***** error random (pd) 153s ***** error std (pd) 153s ***** error ... 153s truncate (pd, 2, 4) 153s ***** error var (pd) 153s 95 tests, 95 passed, 0 known failure, 0 skipped 153s [inst/dist_obj/tLocationScaleDistribution.m] 153s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/tLocationScaleDistribution.m 153s ***** shared pd, t 153s pd = tLocationScaleDistribution; 153s t = truncate (pd, 2, 4); 153s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 153s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 153s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 153s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 153s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 153s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 153s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 153s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 153s ***** assert (iqr (pd), 1.4534, 1e-4); 153s ***** assert (iqr (t), 0.7139, 1e-4); 153s ***** assert (mean (pd), 0, eps); 153s ***** assert (mean (t), 2.6099, 1e-4); 153s ***** assert (median (pd), 0, eps); 153s ***** assert (median (t), 2.4758, 1e-4); 153s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 153s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 153s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 153s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 153s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 153s ***** assert (any (random (t, 1000, 1) < 2), false); 153s ***** assert (any (random (t, 1000, 1) > 4), false); 153s ***** assert (std (pd), 1.2910, 1e-4); 153s ***** assert (std (t), 0.4989, 1e-4); 153s ***** assert (var (pd), 1.6667, 1e-4); 153s ***** assert (var (t), 0.2489, 1e-4); 153s ***** error ... 153s tLocationScaleDistribution(i, 1, 1) 153s ***** error ... 153s tLocationScaleDistribution(Inf, 1, 1) 153s ***** error ... 153s tLocationScaleDistribution([1, 2], 1, 1) 153s ***** error ... 153s tLocationScaleDistribution("a", 1, 1) 153s ***** error ... 153s tLocationScaleDistribution(NaN, 1, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, 0, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, -1, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, Inf, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, i, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, "a", 1) 153s ***** error ... 153s tLocationScaleDistribution(0, [1, 2], 1) 153s ***** error ... 153s tLocationScaleDistribution(0, NaN, 1) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, 0) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, -1) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, Inf) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, i) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, "a") 153s ***** error ... 153s tLocationScaleDistribution(0, 1, [1, 2]) 153s ***** error ... 153s tLocationScaleDistribution(0, 1, NaN) 153s ***** error ... 153s cdf (tLocationScaleDistribution, 2, "uper") 153s ***** error ... 153s cdf (tLocationScaleDistribution, 2, 3) 153s ***** shared x 153s x = tlsrnd (0, 1, 1, [1, 100]); 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha") 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 153s "alpha", {0.05}) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), ... 153s "parameter", {"mu", "sigma", "nu", "param"}) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 153s "parameter", {"mu", "sigma", "nu", "param"}) 153s ***** error ... 153s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 154s ***** error ... 154s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 154s "parameter", "param") 154s ***** error ... 154s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 154s ***** error ... 154s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 154s ***** error ... 154s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 154s "parameter", "mu", "NAME", "value") 154s ***** error ... 154s plot (tLocationScaleDistribution, "Parent") 154s ***** error ... 154s plot (tLocationScaleDistribution, "PlotType", 12) 154s ***** error ... 154s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 154s ***** error ... 154s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 154s ***** error ... 154s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 154s ***** error ... 154s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 154s ***** error ... 154s plot (tLocationScaleDistribution, "Discrete", {true}) 154s ***** error ... 154s plot (tLocationScaleDistribution, "Parent", 12) 154s ***** error ... 154s plot (tLocationScaleDistribution, "Parent", "hax") 154s ***** error ... 154s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 154s ***** error ... 154s plot (tLocationScaleDistribution, "PlotType", "probability") 154s ***** error ... 154s proflik (tLocationScaleDistribution, 2) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 4) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), {1}) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 154s ***** error ... 154s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 154s ***** error ... 154s truncate (tLocationScaleDistribution) 154s ***** error ... 154s truncate (tLocationScaleDistribution, 2) 154s ***** error ... 154s truncate (tLocationScaleDistribution, 4, 2) 154s ***** shared pd 154s pd = tLocationScaleDistribution (0, 1, 1); 154s pd(2) = tLocationScaleDistribution (0, 1, 3); 154s ***** error cdf (pd, 1) 154s ***** error icdf (pd, 0.5) 154s ***** error iqr (pd) 154s ***** error mean (pd) 154s ***** error median (pd) 154s ***** error negloglik (pd) 154s ***** error paramci (pd) 154s ***** error pdf (pd, 1) 154s ***** error plot (pd) 154s ***** error proflik (pd, 2) 154s ***** error random (pd) 154s ***** error std (pd) 154s ***** error ... 154s truncate (pd, 2, 4) 154s ***** error var (pd) 154s 102 tests, 102 passed, 0 known failure, 0 skipped 154s [inst/dist_obj/LoguniformDistribution.m] 154s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/LoguniformDistribution.m 154s ***** shared pd, t 154s pd = LoguniformDistribution (1, 4); 154s t = truncate (pd, 2, 4); 154s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 154s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 154s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 154s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 154s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 154s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 154s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 154s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 154s ***** assert (iqr (pd), 1.4142, 1e-4); 154s ***** assert (iqr (t), 0.9852, 1e-4); 154s ***** assert (mean (pd), 2.1640, 1e-4); 154s ***** assert (mean (t), 2.8854, 1e-4); 154s ***** assert (median (pd), 2); 154s ***** assert (median (t), 2.8284, 1e-4); 154s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 154s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 154s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 154s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 154s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 154s ***** assert (any (random (pd, 1000, 1) < 1), false); 154s ***** assert (any (random (pd, 1000, 1) > 4), false); 154s ***** assert (any (random (t, 1000, 1) < 2), false); 154s ***** assert (any (random (t, 1000, 1) > 4), false); 154s ***** assert (std (pd), 0.8527, 1e-4); 154s ***** assert (std (t), 0.5751, 1e-4); 154s ***** assert (var (pd), 0.7270, 1e-4); 154s ***** assert (var (t), 0.3307, 1e-4); 154s ***** error ... 154s LoguniformDistribution (i, 1) 154s ***** error ... 154s LoguniformDistribution (Inf, 1) 154s ***** error ... 154s LoguniformDistribution ([1, 2], 1) 154s ***** error ... 154s LoguniformDistribution ("a", 1) 154s ***** error ... 154s LoguniformDistribution (NaN, 1) 154s ***** error ... 154s LoguniformDistribution (1, i) 154s ***** error ... 154s LoguniformDistribution (1, Inf) 154s ***** error ... 154s LoguniformDistribution (1, [1, 2]) 154s ***** error ... 154s LoguniformDistribution (1, "a") 154s ***** error ... 154s LoguniformDistribution (1, NaN) 154s ***** error ... 154s LoguniformDistribution (2, 1) 154s ***** error ... 154s cdf (LoguniformDistribution, 2, "uper") 154s ***** error ... 154s cdf (LoguniformDistribution, 2, 3) 154s ***** error ... 154s plot (LoguniformDistribution, "Parent") 154s ***** error ... 154s plot (LoguniformDistribution, "PlotType", 12) 154s ***** error ... 154s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 154s ***** error ... 154s plot (LoguniformDistribution, "PlotType", "pdfcdf") 154s ***** error ... 154s plot (LoguniformDistribution, "Discrete", "pdfcdf") 154s ***** error ... 154s plot (LoguniformDistribution, "Discrete", [1, 0]) 154s ***** error ... 154s plot (LoguniformDistribution, "Discrete", {true}) 154s ***** error ... 154s plot (LoguniformDistribution, "Parent", 12) 154s ***** error ... 154s plot (LoguniformDistribution, "Parent", "hax") 154s ***** error ... 154s plot (LoguniformDistribution, "invalidNAME", "pdf") 154s ***** error ... 154s plot (LoguniformDistribution, "PlotType", "probability") 154s ***** error ... 154s truncate (LoguniformDistribution) 154s ***** error ... 154s truncate (LoguniformDistribution, 2) 154s ***** error ... 154s truncate (LoguniformDistribution, 4, 2) 154s ***** shared pd 154s pd = LoguniformDistribution(1, 4); 154s pd(2) = LoguniformDistribution(2, 5); 154s ***** error cdf (pd, 1) 154s ***** error icdf (pd, 0.5) 154s ***** error iqr (pd) 154s ***** error mean (pd) 154s ***** error median (pd) 154s ***** error pdf (pd, 1) 154s ***** error plot (pd) 154s ***** error random (pd) 154s ***** error std (pd) 154s ***** error ... 154s truncate (pd, 2, 4) 154s ***** error var (pd) 154s 65 tests, 65 passed, 0 known failure, 0 skipped 154s [inst/dist_obj/HalfNormalDistribution.m] 154s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/HalfNormalDistribution.m 154s ***** shared pd, t 154s pd = HalfNormalDistribution (0, 1); 154s t = truncate (pd, 2, 4); 154s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 154s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 154s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 154s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 154s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 154s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 154s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 154s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 154s ***** assert (iqr (pd), 0.8317, 1e-4); 154s ***** assert (iqr (t), 0.4111, 1e-4); 154s ***** assert (mean (pd), 0.7979, 1e-4); 154s ***** assert (mean (t), 2.3706, 1e-4); 154s ***** assert (median (pd), 0.6745, 1e-4); 154s ***** assert (median (t), 2.2771, 1e-4); 155s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 155s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 155s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 155s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 155s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 155s ***** assert (any (random (t, 1000, 1) < 2), false); 155s ***** assert (any (random (t, 1000, 1) > 4), false); 155s ***** assert (std (pd), 0.6028, 1e-4); 155s ***** assert (std (t), 0.3310, 1e-4); 155s ***** assert (var (pd), 0.3634, 1e-4); 155s ***** assert (var (t), 0.1096, 1e-4); 155s ***** error ... 155s HalfNormalDistribution(Inf, 1) 155s ***** error ... 155s HalfNormalDistribution(i, 1) 155s ***** error ... 155s HalfNormalDistribution("a", 1) 155s ***** error ... 155s HalfNormalDistribution([1, 2], 1) 155s ***** error ... 155s HalfNormalDistribution(NaN, 1) 155s ***** error ... 155s HalfNormalDistribution(1, 0) 155s ***** error ... 155s HalfNormalDistribution(1, -1) 155s ***** error ... 155s HalfNormalDistribution(1, Inf) 155s ***** error ... 155s HalfNormalDistribution(1, i) 155s ***** error ... 155s HalfNormalDistribution(1, "a") 155s ***** error ... 155s HalfNormalDistribution(1, [1, 2]) 155s ***** error ... 155s HalfNormalDistribution(1, NaN) 155s ***** error ... 155s cdf (HalfNormalDistribution, 2, "uper") 155s ***** error ... 155s cdf (HalfNormalDistribution, 2, 3) 155s ***** shared x 155s x = hnrnd (1, 1, [1, 100]); 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 155s "alpha", {0.05}) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), ... 155s "parameter", {"mu", "sigma", "param"}) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 155s "parameter", {"mu", "sigma", "param"}) 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 155s "parameter", "param") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 155s "NAME", "value") 155s ***** error ... 155s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 155s "parameter", "sigma", "NAME", "value") 155s ***** error ... 155s plot (HalfNormalDistribution, "Parent") 155s ***** error ... 155s plot (HalfNormalDistribution, "PlotType", 12) 155s ***** error ... 155s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 155s ***** error ... 155s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 155s ***** error ... 155s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 155s ***** error ... 155s plot (HalfNormalDistribution, "Discrete", [1, 0]) 155s ***** error ... 155s plot (HalfNormalDistribution, "Discrete", {true}) 155s ***** error ... 155s plot (HalfNormalDistribution, "Parent", 12) 155s ***** error ... 155s plot (HalfNormalDistribution, "Parent", "hax") 155s ***** error ... 155s plot (HalfNormalDistribution, "invalidNAME", "pdf") 155s ***** error ... 155s plot (HalfNormalDistribution, "PlotType", "probability") 155s ***** error ... 155s proflik (HalfNormalDistribution, 2) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 3) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), {1}) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 1) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 155s ***** error ... 155s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 155s "Display", "on") 155s ***** error ... 155s truncate (HalfNormalDistribution) 155s ***** error ... 155s truncate (HalfNormalDistribution, 2) 155s ***** error ... 155s truncate (HalfNormalDistribution, 4, 2) 155s ***** shared pd 155s pd = HalfNormalDistribution(1, 1); 155s pd(2) = HalfNormalDistribution(1, 3); 155s ***** error cdf (pd, 1) 155s ***** error icdf (pd, 0.5) 155s ***** error iqr (pd) 155s ***** error mean (pd) 155s ***** error median (pd) 155s ***** error negloglik (pd) 155s ***** error paramci (pd) 155s ***** error pdf (pd, 1) 155s ***** error plot (pd) 155s ***** error proflik (pd, 2) 155s ***** error random (pd) 155s ***** error std (pd) 155s ***** error ... 155s truncate (pd, 2, 4) 155s ***** error var (pd) 155s 96 tests, 96 passed, 0 known failure, 0 skipped 155s [inst/dist_obj/ExponentialDistribution.m] 155s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/ExponentialDistribution.m 155s ***** shared pd, t 155s pd = ExponentialDistribution (1); 155s t = truncate (pd, 2, 4); 155s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 155s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 155s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 155s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 155s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 155s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 155s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 155s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 155s ***** assert (iqr (pd), 1.0986, 1e-4); 155s ***** assert (iqr (t), 0.8020, 1e-4); 155s ***** assert (mean (pd), 1); 155s ***** assert (mean (t), 2.6870, 1e-4); 155s ***** assert (median (pd), 0.6931, 1e-4); 155s ***** assert (median (t), 2.5662, 1e-4); 155s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 155s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 155s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 155s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 155s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 155s ***** assert (any (random (t, 1000, 1) < 2), false); 155s ***** assert (any (random (t, 1000, 1) > 4), false); 155s ***** assert (std (pd), 1); 155s ***** assert (std (t), 0.5253, 1e-4); 155s ***** assert (var (pd), 1); 155s ***** assert (var (t), 0.2759, 1e-4); 155s ***** error ... 155s ExponentialDistribution(0) 155s ***** error ... 155s ExponentialDistribution(-1) 155s ***** error ... 155s ExponentialDistribution(Inf) 155s ***** error ... 155s ExponentialDistribution(i) 155s ***** error ... 155s ExponentialDistribution("a") 155s ***** error ... 155s ExponentialDistribution([1, 2]) 155s ***** error ... 155s ExponentialDistribution(NaN) 155s ***** error ... 155s cdf (ExponentialDistribution, 2, "uper") 155s ***** error ... 155s cdf (ExponentialDistribution, 2, 3) 155s ***** shared x 155s x = exprnd (1, [100, 1]); 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 0) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 1) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", "") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 155s "alpha", {0.05}) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 155s "parameter", {"mu", "param"}) 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "parameter", "param") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "NAME", "value") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 155s ***** error ... 155s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 155s "parameter", "mu", "NAME", "value") 155s ***** error ... 155s plot (ExponentialDistribution, "Parent") 155s ***** error ... 155s plot (ExponentialDistribution, "PlotType", 12) 155s ***** error ... 155s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 155s ***** error ... 155s plot (ExponentialDistribution, "PlotType", "pdfcdf") 155s ***** error ... 155s plot (ExponentialDistribution, "Discrete", "pdfcdf") 155s ***** error ... 155s plot (ExponentialDistribution, "Discrete", [1, 0]) 155s ***** error ... 155s plot (ExponentialDistribution, "Discrete", {true}) 155s ***** error ... 155s plot (ExponentialDistribution, "Parent", 12) 155s ***** error ... 155s plot (ExponentialDistribution, "Parent", "hax") 155s ***** error ... 155s plot (ExponentialDistribution, "invalidNAME", "pdf") 155s ***** error ... 155s plot (ExponentialDistribution, "PlotType", "probability") 155s ***** error ... 155s proflik (ExponentialDistribution, 2) 155s ***** error ... 155s proflik (ExponentialDistribution.fit (x), 3) 155s ***** error ... 155s proflik (ExponentialDistribution.fit (x), [1, 2]) 155s ***** error ... 155s proflik (ExponentialDistribution.fit (x), {1}) 155s ***** error ... 155s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display") 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 156s ***** error ... 156s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 156s ***** error ... 156s truncate (ExponentialDistribution) 156s ***** error ... 156s truncate (ExponentialDistribution, 2) 156s ***** error ... 156s truncate (ExponentialDistribution, 4, 2) 156s ***** shared pd 156s pd = ExponentialDistribution(1); 156s pd(2) = ExponentialDistribution(3); 156s ***** error cdf (pd, 1) 156s ***** error icdf (pd, 0.5) 156s ***** error iqr (pd) 156s ***** error mean (pd) 156s ***** error median (pd) 156s ***** error negloglik (pd) 156s ***** error paramci (pd) 156s ***** error pdf (pd, 1) 156s ***** error plot (pd) 156s ***** error proflik (pd, 2) 156s ***** error random (pd) 156s ***** error std (pd) 156s ***** error ... 156s truncate (pd, 2, 4) 156s ***** error var (pd) 156s 90 tests, 90 passed, 0 known failure, 0 skipped 156s [inst/dist_obj/PoissonDistribution.m] 156s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/PoissonDistribution.m 156s ***** shared pd, t, t_inf 156s pd = PoissonDistribution; 156s t = truncate (pd, 2, 4); 156s t_inf = truncate (pd, 2, Inf); 156s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 156s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 156s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 156s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 156s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 156s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 156s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 156s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 156s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 156s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 156s ***** assert (iqr (pd), 2); 156s ***** assert (iqr (t), 1); 156s ***** assert (mean (pd), 1); 156s ***** assert (mean (t), 2.3529, 1e-4); 156s ***** assert (mean (t_inf), 2.3922, 1e-4); 156s ***** assert (median (pd), 1); 156s ***** assert (median (t), 2); 156s ***** assert (median (t_inf), 2); 156s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 156s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 156s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 156s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 156s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 156s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 156s ***** assert (any (random (t, 1000, 1) < 2), false); 156s ***** assert (any (random (t, 1000, 1) > 4), false); 156s ***** assert (std (pd), 1); 156s ***** assert (std (t), 0.5882, 1e-4); 156s ***** assert (std (t_inf), 0.6738, 1e-4); 156s ***** assert (var (pd), 1); 156s ***** assert (var (t), 0.3460, 1e-4); 156s ***** assert (var (t_inf), 0.4540, 1e-4); 156s ***** error ... 156s PoissonDistribution(0) 156s ***** error ... 156s PoissonDistribution(-1) 156s ***** error ... 156s PoissonDistribution(Inf) 156s ***** error ... 156s PoissonDistribution(i) 156s ***** error ... 156s PoissonDistribution("a") 156s ***** error ... 156s PoissonDistribution([1, 2]) 156s ***** error ... 156s PoissonDistribution(NaN) 156s ***** error ... 156s cdf (PoissonDistribution, 2, "uper") 156s ***** error ... 156s cdf (PoissonDistribution, 2, 3) 156s ***** shared x 156s x = poissrnd (1, [1, 100]); 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 0) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 1) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", "") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 156s "parameter", {"lambda", "param"}) 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "parameter", "param") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "NAME", "value") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 156s ***** error ... 156s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 156s "parameter", "lambda", "NAME", "value") 156s ***** error ... 156s plot (PoissonDistribution, "Parent") 156s ***** error ... 156s plot (PoissonDistribution, "PlotType", 12) 156s ***** error ... 156s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 156s ***** error ... 156s plot (PoissonDistribution, "PlotType", "pdfcdf") 156s ***** error ... 156s plot (PoissonDistribution, "Discrete", "pdfcdf") 156s ***** error ... 156s plot (PoissonDistribution, "Discrete", [1, 0]) 156s ***** error ... 156s plot (PoissonDistribution, "Discrete", {true}) 156s ***** error ... 156s plot (PoissonDistribution, "Parent", 12) 156s ***** error ... 156s plot (PoissonDistribution, "Parent", "hax") 156s ***** error ... 156s plot (PoissonDistribution, "invalidNAME", "pdf") 156s ***** error ... 156s plot (PoissonDistribution, "PlotType", "probability") 156s ***** error ... 156s proflik (PoissonDistribution, 2) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 3) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), [1, 2]) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), {1}) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, ones (2)) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display") 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 156s ***** error ... 156s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 156s ***** error ... 156s truncate (PoissonDistribution) 156s ***** error ... 156s truncate (PoissonDistribution, 2) 156s ***** error ... 156s truncate (PoissonDistribution, 4, 2) 156s ***** shared pd 156s pd = PoissonDistribution(1); 156s pd(2) = PoissonDistribution(3); 156s ***** error cdf (pd, 1) 156s ***** error icdf (pd, 0.5) 156s ***** error iqr (pd) 156s ***** error mean (pd) 156s ***** error median (pd) 156s ***** error negloglik (pd) 156s ***** error paramci (pd) 156s ***** error pdf (pd, 1) 156s ***** error plot (pd) 156s ***** error proflik (pd, 2) 156s ***** error random (pd) 156s ***** error std (pd) 156s ***** error ... 156s truncate (pd, 2, 4) 156s ***** error var (pd) 156s 97 tests, 97 passed, 0 known failure, 0 skipped 156s [inst/dist_obj/InverseGaussianDistribution.m] 156s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/InverseGaussianDistribution.m 156s ***** shared pd, t 156s pd = InverseGaussianDistribution (1, 1); 156s t = truncate (pd, 2, 4); 156s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 156s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 156s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 156s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 156s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 156s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 156s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 156s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 156s ***** assert (iqr (pd), 0.8643, 1e-4); 156s ***** assert (iqr (t), 0.8222, 1e-4); 156s ***** assert (mean (pd), 1); 156s ***** assert (mean (t), 2.6953, 1e-4); 156s ***** assert (median (pd), 0.6758, 1e-4); 156s ***** assert (median (t), 2.5716, 1e-4); 156s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 156s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 156s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 156s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 156s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 156s ***** assert (any (random (t, 1000, 1) < 2), false); 156s ***** assert (any (random (t, 1000, 1) > 4), false); 156s ***** assert (std (pd), 1); 156s ***** assert (std (t), 0.5332, 1e-4); 156s ***** assert (var (pd), 1); 156s ***** assert (var (t), 0.2843, 1e-4); 156s ***** error ... 156s InverseGaussianDistribution(0, 1) 156s ***** error ... 156s InverseGaussianDistribution(Inf, 1) 156s ***** error ... 156s InverseGaussianDistribution(i, 1) 156s ***** error ... 156s InverseGaussianDistribution("a", 1) 156s ***** error ... 156s InverseGaussianDistribution([1, 2], 1) 156s ***** error ... 156s InverseGaussianDistribution(NaN, 1) 156s ***** error ... 156s InverseGaussianDistribution(1, 0) 156s ***** error ... 156s InverseGaussianDistribution(1, -1) 156s ***** error ... 156s InverseGaussianDistribution(1, Inf) 156s ***** error ... 156s InverseGaussianDistribution(1, i) 156s ***** error ... 156s InverseGaussianDistribution(1, "a") 156s ***** error ... 156s InverseGaussianDistribution(1, [1, 2]) 156s ***** error ... 156s InverseGaussianDistribution(1, NaN) 156s ***** error ... 156s cdf (InverseGaussianDistribution, 2, "uper") 156s ***** error ... 156s cdf (InverseGaussianDistribution, 2, 3) 156s ***** shared x 156s x = invgrnd (1, 1, [1, 100]); 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 156s "alpha", {0.05}) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), ... 156s "parameter", {"mu", "lambda", "param"}) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 156s "parameter", {"mu", "lambda", "param"}) 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 156s "parameter", "param") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 156s ***** error ... 156s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 156s "parameter", "mu", "NAME", "value") 156s ***** error ... 156s plot (InverseGaussianDistribution, "Parent") 156s ***** error ... 156s plot (InverseGaussianDistribution, "PlotType", 12) 156s ***** error ... 156s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 156s ***** error ... 156s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 156s ***** error ... 156s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 156s ***** error ... 156s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 156s ***** error ... 156s plot (InverseGaussianDistribution, "Discrete", {true}) 156s ***** error ... 156s plot (InverseGaussianDistribution, "Parent", 12) 156s ***** error ... 156s plot (InverseGaussianDistribution, "Parent", "hax") 156s ***** error ... 156s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 156s ***** error ... 156s plot (InverseGaussianDistribution, "PlotType", "probability") 156s ***** error ... 156s proflik (InverseGaussianDistribution, 2) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 3) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), {1}) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 156s ***** error ... 156s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 156s ***** error ... 156s truncate (InverseGaussianDistribution) 156s ***** error ... 156s truncate (InverseGaussianDistribution, 2) 156s ***** error ... 156s truncate (InverseGaussianDistribution, 4, 2) 156s ***** shared pd 156s pd = InverseGaussianDistribution(1, 1); 156s pd(2) = InverseGaussianDistribution(1, 3); 156s ***** error cdf (pd, 1) 156s ***** error icdf (pd, 0.5) 156s ***** error iqr (pd) 156s ***** error mean (pd) 156s ***** error median (pd) 156s ***** error negloglik (pd) 156s ***** error paramci (pd) 156s ***** error pdf (pd, 1) 156s ***** error plot (pd) 156s ***** error proflik (pd, 2) 156s ***** error random (pd) 156s ***** error std (pd) 156s ***** error ... 156s truncate (pd, 2, 4) 156s ***** error var (pd) 156s 96 tests, 96 passed, 0 known failure, 0 skipped 156s [inst/dist_obj/ExtremeValueDistribution.m] 156s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/ExtremeValueDistribution.m 156s ***** shared pd, t 156s pd = ExtremeValueDistribution (0, 1); 156s t = truncate (pd, 2, 4); 156s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 156s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 156s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 156s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 156s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 156s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 156s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 156s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 156s ***** assert (iqr (pd), 1.5725, 1e-4); 156s ***** assert (iqr (t), 0.1338, 1e-4); 156s ***** assert (mean (pd), -0.5772, 1e-4); 156s ***** assert (mean (t), 2.1206, 1e-4); 156s ***** assert (median (pd), -0.3665, 1e-4); 156s ***** assert (median (t), 2.0897, 1e-4); 156s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 156s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 156s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 156s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 156s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 156s ***** assert (any (random (t, 1000, 1) < 2), false); 157s ***** assert (any (random (t, 1000, 1) > 4), false); 157s ***** assert (std (pd), 1.2825, 1e-4); 157s ***** assert (std (t), 0.1091, 1e-4); 157s ***** assert (var (pd), 1.6449, 1e-4); 157s ***** assert (var (t), 0.0119, 1e-4); 157s ***** error ... 157s ExtremeValueDistribution(Inf, 1) 157s ***** error ... 157s ExtremeValueDistribution(i, 1) 157s ***** error ... 157s ExtremeValueDistribution("a", 1) 157s ***** error ... 157s ExtremeValueDistribution([1, 2], 1) 157s ***** error ... 157s ExtremeValueDistribution(NaN, 1) 157s ***** error ... 157s ExtremeValueDistribution(1, 0) 157s ***** error ... 157s ExtremeValueDistribution(1, -1) 157s ***** error ... 157s ExtremeValueDistribution(1, Inf) 157s ***** error ... 157s ExtremeValueDistribution(1, i) 157s ***** error ... 157s ExtremeValueDistribution(1, "a") 157s ***** error ... 157s ExtremeValueDistribution(1, [1, 2]) 157s ***** error ... 157s ExtremeValueDistribution(1, NaN) 157s ***** error ... 157s cdf (ExtremeValueDistribution, 2, "uper") 157s ***** error ... 157s cdf (ExtremeValueDistribution, 2, 3) 157s ***** shared x 157s rand ("seed", 1); 157s x = evrnd (1, 1, [1000, 1]); 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), ... 157s "parameter", "mu", "alpha", {0.05}) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), ... 157s "parameter", {"mu", "sigma", "param"}) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 157s "parameter", {"mu", "sigma", "param"}) 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 157s "parameter", "param") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 157s ***** error ... 157s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 157s "parameter", "mu", "NAME", "value") 157s ***** error ... 157s plot (ExtremeValueDistribution, "Parent") 157s ***** error ... 157s plot (ExtremeValueDistribution, "PlotType", 12) 157s ***** error ... 157s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 157s ***** error ... 157s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 157s ***** error ... 157s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 157s ***** error ... 157s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 157s ***** error ... 157s plot (ExtremeValueDistribution, "Discrete", {true}) 157s ***** error ... 157s plot (ExtremeValueDistribution, "Parent", 12) 157s ***** error ... 157s plot (ExtremeValueDistribution, "Parent", "hax") 157s ***** error ... 157s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 157s ***** error ... 157s plot (ExtremeValueDistribution, "PlotType", "probability") 157s ***** error ... 157s proflik (ExtremeValueDistribution, 2) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 3) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), {1}) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 157s ***** error ... 157s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 157s ***** error ... 157s truncate (ExtremeValueDistribution) 157s ***** error ... 157s truncate (ExtremeValueDistribution, 2) 157s ***** error ... 157s truncate (ExtremeValueDistribution, 4, 2) 157s ***** shared pd 157s pd = ExtremeValueDistribution(1, 1); 157s pd(2) = ExtremeValueDistribution(1, 3); 157s ***** error cdf (pd, 1) 157s ***** error icdf (pd, 0.5) 157s ***** error iqr (pd) 157s ***** error mean (pd) 157s ***** error median (pd) 157s ***** error negloglik (pd) 157s ***** error paramci (pd) 157s ***** error pdf (pd, 1) 157s ***** error plot (pd) 157s ***** error proflik (pd, 2) 157s ***** error random (pd) 157s ***** error std (pd) 157s ***** error ... 157s truncate (pd, 2, 4) 157s ***** error var (pd) 157s 95 tests, 95 passed, 0 known failure, 0 skipped 157s [inst/dist_obj/BetaDistribution.m] 157s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_obj/BetaDistribution.m 157s ***** demo 157s ## Generate a data set of 5000 random samples from a Beta distribution with 157s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 157s ## a PDF of the fitted distribution superimposed on a histogram of the data 157s 157s pd = makedist ("Beta", "a", 2, "b", 4) 157s randg ("seed", 21); 157s data = random (pd, 5000, 1); 157s pd = fitdist (data, "Beta") 157s plot (pd) 157s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 157s pd.a, pd.b)) 157s ***** demo 157s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 157s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 157s ## this truncated distribution and superimpose a histogram with 100 bins 157s ## scaled accordingly 157s 157s pd = makedist ("Beta", "a", 2, "b", 4) 157s t = truncate (pd, 0.1, 0.8) 157s randg ("seed", 21); 157s data = random (t, 10000, 1); 157s plot (t) 157s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 157s hold on 157s hist (data, 100, 140) 157s hold off 157s ***** demo 157s ## Generate a data set of 100 random samples from a Beta distribution with 157s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 157s ## its CDF superimposed over an empirical CDF of the data 157s 157s pd = makedist ("Beta", "a", 2, "b", 4) 157s randg ("seed", 21); 157s data = random (pd, 100, 1); 157s pd = fitdist (data, "Beta") 157s plot (pd, "plottype", "cdf") 157s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 157s pd.a, pd.b)) 157s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 157s ***** demo 157s ## Generate a data set of 200 random samples from a Beta distribution with 157s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 157s ## distribution fit to the data. 157s 157s pd = makedist ("Beta", "a", 2, "b", 4) 157s randg ("seed", 21); 157s data = random (pd, 200, 1); 157s pd = fitdist (data, "Beta") 157s plot (pd, "plottype", "probability") 157s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 157s pd.a, pd.b)) 157s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 157s ***** shared pd, t 157s pd = BetaDistribution; 157s t = truncate (pd, 0.2, 0.8); 157s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 157s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 157s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 157s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 157s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 157s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 157s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 157s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 157s ***** assert (iqr (pd), 0.5, 1e-4); 157s ***** assert (iqr (t), 0.3, 1e-4); 157s ***** assert (mean (pd), 0.5); 157s ***** assert (mean (t), 0.5, 1e-6); 157s ***** assert (median (pd), 0.5); 157s ***** assert (median (t), 0.5, 1e-6); 157s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 157s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 157s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 157s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 157s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 157s ***** assert (any (random (t, 1000, 1) < 0.2), false); 157s ***** assert (any (random (t, 1000, 1) > 0.8), false); 157s ***** assert (std (pd), 0.2887, 1e-4); 157s ***** assert (std (t), 0.1732, 1e-4); 157s ***** assert (var (pd), 0.0833, 1e-4); 157s ***** assert (var (t), 0.0300, 1e-4); 157s ***** error ... 157s BetaDistribution(0, 1) 157s ***** error ... 157s BetaDistribution(Inf, 1) 157s ***** error ... 157s BetaDistribution(i, 1) 157s ***** error ... 157s BetaDistribution("a", 1) 157s ***** error ... 157s BetaDistribution([1, 2], 1) 157s ***** error ... 157s BetaDistribution(NaN, 1) 157s ***** error ... 157s BetaDistribution(1, 0) 157s ***** error ... 157s BetaDistribution(1, -1) 157s ***** error ... 157s BetaDistribution(1, Inf) 157s ***** error ... 157s BetaDistribution(1, i) 157s ***** error ... 157s BetaDistribution(1, "a") 157s ***** error ... 157s BetaDistribution(1, [1, 2]) 157s ***** error ... 157s BetaDistribution(1, NaN) 157s ***** error ... 157s cdf (BetaDistribution, 2, "uper") 157s ***** error ... 157s cdf (BetaDistribution, 2, 3) 157s ***** shared x 157s randg ("seed", 1); 157s x = betarnd (1, 1, [100, 1]); 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha") 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", 0) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", 1) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", "") 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 157s "parameter", {"a", "b", "param"}) 157s ***** error ... 157s paramci (BetaDistribution.fit (x), "parameter", "param") 158s ***** error ... 158s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 158s ***** error ... 158s paramci (BetaDistribution.fit (x), "NAME", "value") 158s ***** error ... 158s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 158s ***** error ... 158s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 158s "NAME", "value") 158s ***** error ... 158s plot (BetaDistribution, "Parent") 158s ***** error ... 158s plot (BetaDistribution, "PlotType", 12) 158s ***** error ... 158s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 158s ***** error ... 158s plot (BetaDistribution, "PlotType", "pdfcdf") 158s ***** error ... 158s plot (BetaDistribution, "Discrete", "pdfcdf") 158s ***** error ... 158s plot (BetaDistribution, "Discrete", [1, 0]) 158s ***** error ... 158s plot (BetaDistribution, "Discrete", {true}) 158s ***** error ... 158s plot (BetaDistribution, "Parent", 12) 158s ***** error ... 158s plot (BetaDistribution, "Parent", "hax") 158s ***** error ... 158s plot (BetaDistribution, "invalidNAME", "pdf") 158s ***** error ... 158s plot (BetaDistribution, "PlotType", "probability") 158s ***** error ... 158s proflik (BetaDistribution, 2) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 3) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), [1, 2]) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), {1}) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, ones (2)) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display") 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display", 1) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 158s ***** error ... 158s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 158s ***** error ... 158s truncate (BetaDistribution) 158s ***** error ... 158s truncate (BetaDistribution, 2) 158s ***** error ... 158s truncate (BetaDistribution, 4, 2) 158s ***** shared pd 158s pd = BetaDistribution(1, 1); 158s pd(2) = BetaDistribution(1, 3); 158s ***** error cdf (pd, 1) 158s ***** error icdf (pd, 0.5) 158s ***** error iqr (pd) 158s ***** error mean (pd) 158s ***** error median (pd) 158s ***** error negloglik (pd) 158s ***** error paramci (pd) 158s ***** error pdf (pd, 1) 158s ***** error plot (pd) 158s ***** error proflik (pd, 2) 158s ***** error random (pd) 158s ***** error std (pd) 158s ***** error ... 158s truncate (pd, 2, 4) 158s ***** error var (pd) 158s 96 tests, 96 passed, 0 known failure, 0 skipped 158s [inst/einstein.m] 158s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/einstein.m 158s ***** demo 158s einstein (0.4, 0.6) 158s ***** demo 158s einstein (0.2, 0.5) 158s ***** demo 158s einstein (0.6, 0.1) 158s ***** test 158s hf = figure ("visible", "off"); 158s unwind_protect 158s tiles = einstein (0.4, 0.6); 158s assert (isstruct (tiles), true); 158s unwind_protect_cleanup 158s close (hf); 158s end_unwind_protect 158s ***** error einstein 158s ***** error einstein (0.5) 158s ***** error einstein (0, 0.9) 158s ***** error einstein (0.4, 1) 158s ***** error einstein (-0.4, 1) 158s 6 tests, 6 passed, 0 known failure, 0 skipped 158s [inst/geomean.m] 158s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/geomean.m 158s ***** test 158s x = [0:10]; 158s y = [x;x+5;x+10]; 158s assert (geomean (x), 0); 158s m = [0 9.462942809849169 14.65658770861967]; 158s assert (geomean (y, 2), m', 4e-14); 158s assert (geomean (y, "all"), 0); 158s y(2,4) = NaN; 158s m(2) = 9.623207231679554; 158s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 158s assert (geomean (y', "omitnan"), m, 4e-14); 158s z = y + 20; 158s assert (geomean (z, "all"), NaN); 158s assert (geomean (z, "all", "includenan"), NaN); 158s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 158s m = [24.79790781765634 NaN 34.85638839503932]; 158s assert (geomean (z'), m, 4e-14); 158s assert (geomean (z', "includenan"), m, 4e-14); 158s m(2) = 30.02181156156319; 158s assert (geomean (z', "omitnan"), m, 4e-14); 158s assert (geomean (z, 2, "omitnan"), m', 4e-14); 158s ***** test 158s x = repmat ([1:20;6:25], [5 2 6 3]); 158s assert (size (geomean (x, [3 2])), [10 1 1 3]); 158s assert (size (geomean (x, [1 2])), [1 1 6 3]); 158s assert (size (geomean (x, [1 2 4])), [1 1 6]); 158s assert (size (geomean (x, [1 4 3])), [1 40]); 158s assert (size (geomean (x, [1 2 3 4])), [1 1]); 158s ***** test 158s x = repmat ([1:20;6:25], [5 2 6 3]); 158s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 158s assert (geomean (x, [3 2]), m, 4e-13); 158s x(2,5,6,3) = NaN; 158s m(2,3) = NaN; 158s assert (geomean (x, [3 2]), m, 4e-13); 158s m(2,3) = 14.3292729579901; 158s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 158s ***** error geomean ("char") 158s ***** error geomean ([1 -1 3]) 158s ***** error ... 158s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 158s ***** error ... 158s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 158s ***** error ... 158s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 158s 8 tests, 8 passed, 0 known failure, 0 skipped 158s [inst/regress_gp.m] 158s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/regress_gp.m 158s ***** demo 158s ## Linear fitting of 1D Data 158s rand ("seed", 125); 158s X = 2 * rand (5, 1) - 1; 158s randn ("seed", 25); 158s Y = 2 * X - 1 + 0.3 * randn (5, 1); 158s 158s ## Points for interpolation/extrapolation 158s Xfit = linspace (-2, 2, 10)'; 158s 158s ## Fit regression model 158s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 158s 158s ## Plot fitted data 158s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 158s title ("Gaussian process regression with linear kernel"); 158s ***** demo 158s ## Linear fitting of 2D Data 158s rand ("seed", 135); 158s X = 2 * rand (4, 2) - 1; 158s randn ("seed", 35); 158s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 158s 158s ## Mesh for interpolation/extrapolation 158s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 158s Xfit = [x1(:), x2(:)]; 158s 158s ## Fit regression model 158s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 158s Ypred = reshape (Ypred, 10, 10); 158s YintU = reshape (Yint(:,1), 10, 10); 158s YintL = reshape (Yint(:,2), 10, 10); 158s 158s ## Plot fitted data 158s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 158s hold on; 158s h = mesh (x1, x2, Ypred, zeros (10, 10)); 158s set (h, "facecolor", "none", "edgecolor", "yellow"); 158s h = mesh (x1, x2, YintU, ones (10, 10)); 158s set (h, "facecolor", "none", "edgecolor", "cyan"); 158s h = mesh (x1, x2, YintL, ones (10, 10)); 158s set (h, "facecolor", "none", "edgecolor", "cyan"); 158s hold off 158s axis tight 158s view (75, 25) 158s title ("Gaussian process regression with linear kernel"); 158s ***** demo 158s ## Projection over basis function with linear kernel 158s pp = [2, 2, 0.3, 1]; 158s n = 10; 158s rand ("seed", 145); 158s X = 2 * rand (n, 1) - 1; 158s randn ("seed", 45); 158s Y = polyval (pp, X) + 0.3 * randn (n, 1); 158s 158s ## Powers 158s px = [sqrt(abs(X)), X, X.^2, X.^3]; 158s 158s ## Points for interpolation/extrapolation 158s Xfit = linspace (-1, 1, 100)'; 158s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 158s 158s ## Define a prior covariance assuming that the sqrt component is not present 158s Sp = 100 * eye (size (px, 2) + 1); 158s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 158s 158s ## Fit regression model 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 158s 158s ## Plot fitted data 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("Linear kernel over basis function with prior covariance"); 158s ***** demo 158s ## Projection over basis function with linear kernel 158s pp = [2, 2, 0.3, 1]; 158s n = 10; 158s rand ("seed", 145); 158s X = 2 * rand (n, 1) - 1; 158s randn ("seed", 45); 158s Y = polyval (pp, X) + 0.3 * randn (n, 1); 158s 158s ## Powers 158s px = [sqrt(abs(X)), X, X.^2, X.^3]; 158s 158s ## Points for interpolation/extrapolation 158s Xfit = linspace (-1, 1, 100)'; 158s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 158s 158s ## Fit regression model without any assumption on prior covariance 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 158s 158s ## Plot fitted data 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("Linear kernel over basis function without prior covariance"); 158s ***** demo 158s ## Projection over basis function with rbf kernel 158s pp = [2, 2, 0.3, 1]; 158s n = 10; 158s rand ("seed", 145); 158s X = 2 * rand (n, 1) - 1; 158s randn ("seed", 45); 158s Y = polyval (pp, X) + 0.3 * randn (n, 1); 158s 158s ## Powers 158s px = [sqrt(abs(X)), X, X.^2, X.^3]; 158s 158s ## Points for interpolation/extrapolation 158s Xfit = linspace (-1, 1, 100)'; 158s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 158s 158s ## Fit regression model with RBF kernel (standard parameters) 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 158s 158s ## Plot fitted data 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("RBF kernel over basis function with standard parameters"); 158s text (-0.5, 4, "theta = 5\n g = 0.01"); 158s ***** demo 158s ## Projection over basis function with rbf kernel 158s pp = [2, 2, 0.3, 1]; 158s n = 10; 158s rand ("seed", 145); 158s X = 2 * rand (n, 1) - 1; 158s randn ("seed", 45); 158s Y = polyval (pp, X) + 0.3 * randn (n, 1); 158s 158s ## Powers 158s px = [sqrt(abs(X)), X, X.^2, X.^3]; 158s 158s ## Points for interpolation/extrapolation 158s Xfit = linspace (-1, 1, 100)'; 158s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 158s 158s ## Fit regression model with RBF kernel with different parameters 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 158s 158s ## Plot fitted data 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("GP regression with RBF kernel and non default parameters"); 158s text (-0.5, 4, "theta = 10\n g = 0.01"); 158s 158s ## Fit regression model with RBF kernel with different parameters 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 158s 158s ## Plot fitted data 158s figure 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("GP regression with RBF kernel and non default parameters"); 158s text (-0.5, 4, "theta = 50\n g = 0.01"); 158s 158s ## Fit regression model with RBF kernel with different parameters 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 158s 158s ## Plot fitted data 158s figure 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("GP regression with RBF kernel and non default parameters"); 158s text (-0.5, 4, "theta = 50\n g = 0.001"); 158s 158s ## Fit regression model with RBF kernel with different parameters 158s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 158s 158s ## Plot fitted data 158s figure 158s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 158s Xfit, polyval (pp, Xfit), "g-;True;"); 158s axis tight 158s axis manual 158s hold on 158s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 158s hold off 158s title ("GP regression with RBF kernel and non default parameters"); 158s text (-0.5, 4, "theta = 50\n g = 0.05"); 158s ***** demo 158s ## RBF fitting on noiseless 1D Data 158s x = [0:2*pi/7:2*pi]'; 158s y = 5 * sin (x); 158s 158s ## Predictive grid of 500 equally spaced locations 158s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 158s 158s ## Fit regression model with RBF kernel 158s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 158s 158s ## Plot fitted data 158s r = mvnrnd (Yfit, diag (Ysd)', 50); 158s plot (xi, r', "c-"); 158s hold on 158s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 158s plot (x, y, ".k;Predictor points;", "markersize", 20) 158s plot (xi, 5 * sin (xi), "-y;True Function;"); 158s xlim ([-0.5,2*pi+0.5]); 158s ylim ([-10,10]); 158s hold off 158s title ("GP regression with RBF kernel on noiseless 1D data"); 158s text (0, -7, "theta = 5\n g = 0.01"); 158s ***** demo 158s ## RBF fitting on noisy 1D Data 158s x = [0:2*pi/7:2*pi]'; 158s x = [x; x]; 158s y = 5 * sin (x) + randn (size (x)); 158s 158s ## Predictive grid of 500 equally spaced locations 158s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 158s 158s ## Fit regression model with RBF kernel 158s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 158s 158s ## Plot fitted data 158s r = mvnrnd (Yfit, diag (Ysd)', 50); 158s plot (xi, r', "c-"); 158s hold on 158s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 158s plot (x, y, ".k;Predictor points;", "markersize", 20) 158s plot (xi, 5 * sin (xi), "-y;True Function;"); 158s xlim ([-0.5,2*pi+0.5]); 158s ylim ([-10,10]); 158s hold off 158s title ("GP regression with RBF kernel on noisy 1D data"); 158s text (0, -7, "theta = 5\n g = 0.01"); 158s ***** error regress_gp (ones (20, 2)) 158s ***** error regress_gp (ones (20, 2), ones (20, 1)) 158s ***** error ... 158s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 158s ***** error ... 158s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 158s 22 tests, 22 passed, 0 known failure, 0 skipped 158s [inst/ecdf.m] 158s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ecdf.m 158s ***** demo 158s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 158s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 158s t = min (y, d); ## we observe the minimum of these times 158s censored = (y > d); ## we also observe whether the subject failed 158s 158s ## Calculate and plot the empirical cdf and confidence bounds 158s [f, x, flo, fup] = ecdf (t, "censoring", censored); 158s stairs (x, f); 158s hold on; 158s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 158s 158s ## Superimpose a plot of the known true cdf 158s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 158s hold off; 158s ***** demo 158s R = wblrnd (100, 2, 100, 1); 158s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 158s hold on 158s x = 1:1:250; 158s wblsurv = 1 - cdf ("weibull", x, 100, 2); 158s plot (x, wblsurv, "g-", "LineWidth", 2) 158s legend ("Empirical survivor function", "Lower confidence bound", ... 158s "Upper confidence bound", "Weibull survivor function", ... 158s "Location", "northeast"); 158s hold off 158s ***** error ecdf (); 158s ***** error ecdf (randi (15,2)); 158s ***** error ecdf ([3,2,4,3+2i,5]); 158s ***** error kstest ([2,3,4,5,6],"tail"); 158s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 158s ***** error kstest ([2,3,4,5,6],"function", ""); 158s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 158s ***** error kstest ([2,3,4,5,6],"tail", 0); 158s ***** error kstest ([2,3,4,5,6],"alpha", 0); 158s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 158s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 158s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 158s ***** test 158s hf = figure ("visible", "off"); 158s unwind_protect 158s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 158s [F, x, Flo, Fup] = ecdf (x); 158s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 158s assert (F, F_out, ones (10,1) * 1e-4); 158s x_out = [0 0 2 3 4 5 6 7 8 9]'; 158s assert (x, x_out); 158s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 158s assert (Flo, Flo_out, ones (10,1) * 1e-4); 158s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 158s assert (Fup, Fup_out, ones (10,1) * 1e-4); 158s unwind_protect_cleanup 158s close (hf); 158s end_unwind_protect 158s ***** test 158s hf = figure ("visible", "off"); 158s unwind_protect 158s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 158s ecdf (x); 158s unwind_protect_cleanup 158s close (hf); 158s end_unwind_protect 159s 14 tests, 14 passed, 0 known failure, 0 skipped 159s [inst/trimmean.m] 159s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/trimmean.m 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s out = trimmean (x, 10, [1, 2]); 159s assert (out(1,1,1), 10.3889, 1e-4); 159s assert (out(1,1,2), 29.6111, 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s out = trimmean (x, 10, 1); 159s assert (out(:,:,1), [-17.6, 8, 13, 18]); 159s assert (out(:,:,2), [23, 28, 33, 10.6]); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, 1); 159s assert (out(:,:,1), [-23, 8, 13, 18]); 159s assert (out(:,:,2), [23, 28, 33, 3.75]); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s out = trimmean (x, 10, 2); 159s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 159s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, 2); 159s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 159s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s out = trimmean (x, 10, [1, 2, 3]); 159s assert (out, trimmean (x, 10, "all")); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, [1, 2]); 159s assert (out(1,1,1), 10.7647, 1e-4); 159s assert (out(1,1,2), 29.1176, 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, [1, 3]); 159s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, [2, 3]); 159s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, [1, 2, 3]); 159s assert (out, trimmean (x, 10, "all")); 159s ***** test 159s x = reshape (1:40, [5, 4, 2]); 159s x([3, 37]) = -100; 159s x([4, 38]) = NaN; 159s out = trimmean (x, 10, [2, 3, 5]); 159s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 159s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 159s ***** assert (trimmean ([], 10), NaN) 159s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 159s ***** error trimmean (1) 159s ***** error trimmean (1,2,3,4,5) 159s ***** error trimmean ([1 2 3 4], -10) 159s ***** error trimmean ([1 2 3 4], 100) 159s ***** error trimmean ([1 2 3 4], 10, "flag") 159s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 159s ***** error ... 159s trimmean ([1 2 3 4], 10, -1) 159s ***** error ... 159s trimmean ([1 2 3 4], 10, "floor", -1) 159s ***** error ... 159s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 159s ***** error ... 159s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 159s 26 tests, 26 passed, 0 known failure, 0 skipped 159s [inst/gmdistribution.m] 159s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/gmdistribution.m 159s ***** test 159s mu = eye(2); 159s Sigma = eye(2); 159s GM = gmdistribution (mu, Sigma); 159s density = GM.pdf ([0 0; 1 1]); 159s assert (density(1) - density(2), 0, 1e-6); 159s 159s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 159s assert (idx, [1; 2]); 159s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 159s assert (nlogl - nlogl2, 0, 1e-6); 159s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 159s assert (P - P3, zeros (2), 1e-6); 159s [idx4,nlogl4] = cluster (GM, eye(2)); 159s assert (size (nlogl4), [1 1]); 159s idx5 = cluster (GM, eye(2)); 159s assert (idx - idx5, zeros (2,1)); 159s 159s D = GM.mahal ([1;0]); 159s assert (D - M(1,:), zeros (1,2), 1e-6); 159s 159s P = GM.posterior ([0 1]); 159s assert (P - P2(2,:), zeros (1,2), 1e-6); 159s 159s R = GM.random(20); 159s assert (size(R), [20, 2]); 159s 159s R = GM.random(); 159s assert (size(R), [1, 2]); 159s 1 test, 1 passed, 0 known failure, 0 skipped 159s [inst/hmmestimate.m] 159s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hmmestimate.m 159s ***** test 159s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 159s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 159s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 159s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 159s [transprobest, outprobest] = hmmestimate (sequence, states); 159s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 159s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 159s assert (transprobest, expectedtransprob, 0.001); 159s assert (outprobest, expectedoutprob, 0.001); 159s ***** test 159s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 159s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 159s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 159s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 159s "Two", "One", "One", "One", "One", "One", "One"}; 159s symbols = {"A", "B", "C"}; 159s statenames = {"One", "Two"}; 159s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 159s symbols, "statenames", statenames); 159s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 159s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 159s assert (transprobest, expectedtransprob, 0.001); 159s assert (outprobest, expectedoutprob, 0.001); 159s ***** test 159s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 159s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 159s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 159s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 159s pseudotransitions = [8, 2; 4, 6]; 159s pseudoemissions = [2, 4, 4; 7, 2, 1]; 159s [transprobest, outprobest] = hmmestimate (sequence, states, ... 159s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 159s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 159s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 159s 0.823529, 0.117647, 0.058824]; 159s assert (transprobest, expectedtransprob, 0.001); 159s assert (outprobest, expectedoutprob, 0.001); 159s 3 tests, 3 passed, 0 known failure, 0 skipped 159s [inst/kstest2.m] 159s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/kstest2.m 159s ***** error kstest2 ([1,2,3,4,5,5]) 159s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 159s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 159s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 159s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 159s ***** test 159s load examgrades 159s [h, p] = kstest2 (grades(:,1), grades(:,2)); 159s assert (h, false); 159s assert (p, 0.1222791870137312, 1e-14); 159s ***** test 159s load examgrades 159s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 159s assert (h, false); 159s assert (p, 0.1844421391011258, 1e-14); 159s ***** test 159s load examgrades 159s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 159s assert (h, false); 159s assert (p, 0.06115357930171663, 1e-14); 159s ***** test 159s load examgrades 159s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 159s assert (h, true); 159s assert (p, 0.06115357930171663, 1e-14); 159s 14 tests, 14 passed, 0 known failure, 0 skipped 159s [inst/shadow9/var.m] 159s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/shadow9/var.m 159s ***** assert (var (13), 0) 159s ***** assert (var (single (13)), single (0)) 159s ***** assert (var ([1,2,3]), 1) 159s ***** assert (var ([1,2,3], 1), 2/3, eps) 159s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 159s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 159s ***** assert (var (5, 99), 0) 159s ***** assert (var (5, 99, 1), 0) 159s ***** assert (var (5, 99, 2), 0) 159s ***** assert (var ([5 3], [99 99], 2), 1) 159s ***** assert (var ([1:7], [1:7]), 3) 159s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 159s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 159s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 159s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 159s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 159s ***** test 159s x = [-10:10]; 159s y = [x;x+5;x-5]; 159s assert (var (x), 38.5); 159s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 159s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 159s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 159s assert (var (y, "all"), 54.19354838709678, 1e-14); 159s y(2,4) = NaN; 159s assert (var (y, "all"), NaN); 159s assert (var (y, "all", "includenan"), NaN); 159s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 159s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 159s assert (var (y, [], 2), [38.5; NaN; 38.5]); 159s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 159s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 159s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 159s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 159s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 159s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 159s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 159s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 159s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 159s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 159s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 159s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 159s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 159s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 159s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 159s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 159s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 159s 60 * ones(1,1,2)) 159s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 159s 6 * ones(1,3,2)) 159s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 159s ***** test 159s x = reshape(1:18, [3 3 2]); 159s x([2, 14]) = NaN; 159s w = ones (3,3,2); 159s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 159s ***** test 159s x = reshape(1:18, [3 3 2]); 159s w = ones (3,3,2); 159s w([2, 14]) = NaN; 159s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 159s ***** assert (var ([1 2 3], "aLl"), 1); 159s ***** assert (var ([1 2 3], "OmitNan"), 1); 159s ***** assert (var ([1 2 3], "IncludeNan"), 1); 159s ***** test 159s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 159s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 159s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 159s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 159s assert (size (var (x, 0, [1 4 3])), [1, 40]); 159s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 159s ***** assert (var (3*magic(3)), [63 144 63]) 159s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 159s ***** assert (var (3*magic(3), 1), [42 96 42]) 159s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 159s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 159s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 159s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 159s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 159s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 159s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 159s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 159s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 159s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 159s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 159s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 159s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 159s ***** test 159s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 159s v = repmat (33.38912133891213, [10, 1, 1, 3]); 159s assert (var (x, 0, [3, 2]), v, 1e-14); 159s v = repmat (33.250, [10, 1, 1, 3]); 159s assert (var (x, 1, [3, 2]), v, 1e-14); 159s x(2,5,6,3) = NaN; 159s v(2,1,1,3) = NaN; 159s assert (var (x, 1, [3, 2]), v, 4e-14); 159s v = repmat (33.38912133891213, [10 1 1 3]); 159s v(2,1,1,3) = NaN; 159s assert (var (x, [], [3, 2]), v, 4e-14); 159s v(2,1,1,3) = 33.40177912169048; 159s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 159s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 159s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 159s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 159s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 159s ***** assert (var (magic (3), [], 3), zeros (3,3)) 159s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 159s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 159s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 159s ***** assert (var ([]), NaN) 159s ***** assert (class (var (single ([]))), "single") 159s ***** assert (var ([],[],1), NaN(1,0)) 159s ***** assert (var ([],[],2), NaN(0,1)) 159s ***** assert (var ([],[],3), []) 159s ***** assert (class (var (single ([]), [], 1)), "single") 159s ***** assert (var (ones (1,0)), NaN) 159s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 159s ***** assert (var (ones (1,0), [], 2), NaN) 159s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 159s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 159s ***** assert (var (ones (0,1)), NaN) 159s ***** assert (var (ones (0,1), [], 1), NaN) 159s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 159s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 159s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 159s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 159s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 159s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 159s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 159s ***** test 159s [~, m] = var ([]); 159s assert (m, NaN); 159s ***** test <*62395> 159s [~, m] = var (13); 159s assert (m, 13); 159s [~, m] = var (single(13)); 159s assert (m, single(13)); 159s [~, m] = var ([1, 2, 3; 3 2 1], []); 159s assert (m, [2 2 2]); 159s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 159s assert (m, [2 2 2]); 159s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 159s assert (m, [2 2]'); 159s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 159s assert (m, [1 2 3; 3 2 1]); 159s ***** test <*62395> 159s [~, m] = var (5,99); 159s assert (m, 5); 159s [~, m] = var ([1:7], [1:7]); 159s assert (m, 5); 159s [~, m] = var ([eye(3)], [1:3]); 159s assert (m, [1/6, 1/3, 0.5], eps); 159s [~, m] = var (ones (2,2,2), [1:2], 3); 159s assert (m, ones (2,2)); 159s [~, m] = var ([1 2; 3 4], 0, 'all'); 159s assert (m, 2.5, eps); 159s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 159s assert (m, [3.5, 5.5], eps); 159s ***** test 159s [v, m] = var (4 * eye (2), [1, 3]); 159s assert (v, [3, 3]); 159s assert (m, [1, 3]); 159s ***** test <*62395> 159s [~, m] = var ([]); 159s assert (m, NaN); 159s ***** test <*62395> 159s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 159s [~, m] = var (x, 0, [3 2]); 159s assert (m, mean (x, [3 2])); 159s [~, m] = var (x, 0, [1 2]); 159s assert (m, mean (x, [1 2])); 159s [~, m] = var (x, 0, [1 3 4]); 159s assert (m, mean (x, [1 3 4])); 159s ***** test 159s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 159s x(2,5,6,3) = NaN; 159s [~, m] = var (x, 0, [3 2], "omitnan"); 159s assert (m, mean (x, [3 2], "omitnan")); 159s ***** test <*63203> 159s [v, m] = var (Inf); 159s assert (v, NaN); 159s assert (m, Inf); 159s ***** test <*63203> 159s [v, m] = var (NaN); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3]); 159s assert (v, NaN); 159s assert (m, Inf); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3]'); 159s assert (v, NaN); 159s assert (m, Inf); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3]); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3]'); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3], [], 1); 159s assert (v, [0, NaN, 0]); 159s assert (m, [1, Inf, 3]); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3], [], 2); 159s assert (v, NaN); 159s assert (m, Inf); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3], [], 3); 159s assert (v, [0, NaN, 0]); 159s assert (m, [1, Inf, 3]); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3], [], 1); 159s assert (v, [0, NaN, 0]); 159s assert (m, [1, NaN, 3]); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3], [], 2); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3], [], 3); 159s assert (v, [0, NaN, 0]); 159s assert (m, [1, NaN, 3]); 159s ***** test <*63203> 159s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 159s assert (v, [2, NaN, 2]); 159s assert (m, [2, Inf, 4]); 159s ***** test <*63203> 159s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 159s assert (v, [2, NaN, 2]); 159s assert (m, [2, Inf, 4]); 159s ***** test <*63203> 159s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 159s assert (v, [2, NaN, 2]); 159s assert (m, [2, NaN, 4]); 159s ***** test <*63203> 159s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 159s assert (v, [2, NaN, 2]); 159s assert (m, [2, NaN, 4]); 159s ***** test <*63203> 159s [v, m] = var ([Inf, 2, NaN]); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([Inf, 2, NaN]'); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([NaN, 2, Inf]); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([NaN, 2, Inf]'); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([Inf, 2, NaN], [], 1); 159s assert (v, [NaN, 0, NaN]); 159s assert (m, [Inf, 2, NaN]); 159s ***** test <*63203> 159s [v, m] = var ([Inf, 2, NaN], [], 2); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([NaN, 2, Inf], [], 1); 159s assert (v, [NaN, 0, NaN]); 159s assert (m, [NaN, 2, Inf]); 159s ***** test <*63203> 159s [v, m] = var ([NaN, 2, Inf], [], 2); 159s assert (v, NaN); 159s assert (m, NaN); 159s ***** test <*63203> 159s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 159s assert (v, [2, 2, NaN]); 159s assert (m, [2, 4, NaN]); 159s ***** test <*63203> 159s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 159s assert (v, [2, 2, NaN]); 159s assert (m, [2, 4, NaN]); 159s ***** test <*63291> 159s [v, m] = var (2 * eye (2)); 159s assert (v, [2, 2]); 159s assert (m, [1, 1]); 159s ***** test <*63291> 159s [v, m] = var (4 * eye (2), [1, 3]); 159s assert (v, [3, 3]); 159s assert (m, [1, 3]); 159s ***** test <*63291> 159s [v, m] = var (sparse (2 * eye (2))); 159s assert (full (v), [2, 2]); 159s assert (full (m), [1, 1]); 159s ***** test <*63291> 159s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 159s assert (full (v), [3, 3]); 159s assert (full (m), [1, 3]); 159s ***** test<*63291> 159s [v, m] = var (sparse (eye (2))); 159s assert (issparse (v)); 159s assert (issparse (m)); 159s ***** test<*63291> 159s [v, m] = var (sparse (eye (2)), [1, 3]); 159s assert (issparse (v)); 159s assert (issparse (m)); 159s ***** error var () 159s ***** error var (1, 2, "omitnan", 3) 160s ***** error var (1, 2, 3, 4) 160s ***** error var (1, 2, 3, 4, 5) 160s ***** error var (1, "foo") 160s ***** error var (1, [], "foo") 160s ***** error var ([1 2 3], 2) 160s ***** error var ([1 2], 2, "all") 160s ***** error var ([1 2],0.5, "all") 160s ***** error var (1, -1) 160s ***** error var (1, [1 -1]) 160s ***** error ... 160s var ([1 2 3], [1 -1 0]) 160s ***** error var ({1:5}) 160s ***** error var ("char") 160s ***** error var (['A'; 'B']) 160s ***** error var (1, [], ones (2,2)) 160s ***** error var (1, 0, 1.5) 160s ***** error var (1, [], 0) 160s ***** error var (1, [], 1.5) 160s ***** error var ([1 2 3], [], [-1 1]) 160s ***** error ... 160s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 160s ***** error ... 160s var ([1 2], eye (2)) 160s ***** error ... 160s var ([1 2 3 4], [1 2; 3 4]) 160s ***** error ... 160s var ([1 2 3 4], [1 2; 3 4], 1) 160s ***** error ... 160s var ([1 2 3 4], [1 2; 3 4], [2 3]) 160s ***** error ... 160s var (ones (2, 2), [1 2], [1 2]) 160s ***** error ... 160s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 160s ***** error ... 160s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 160s ***** error var ([1 2 3; 2 3 4], [1 3 4]) 160s ***** error var ([1 2], [1 2 3]) 160s ***** error var (1, [1 2]) 160s ***** error var ([1 2 3; 2 3 4], [1 3 4], 1) 160s ***** error var ([1 2 3; 2 3 4], [1 3], 2) 160s ***** error var ([1 2], [1 2], 1) 160s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 160s var (1, [], 1, "all") 160s ***** error ... 160s var ([1 2 3; 2 3 4], [1 3], "all") 160s ***** error ... 160s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 160s 162 tests, 162 passed, 0 known failure, 0 skipped 160s [inst/shadow9/mean.m] 160s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/shadow9/mean.m 160s ***** test 160s x = -10:10; 160s y = x'; 160s z = [y, y+10]; 160s assert (mean (x), 0); 160s assert (mean (y), 0); 160s assert (mean (z), [0, 10]); 160s ***** assert (mean (magic (3), 1), [5, 5, 5]) 160s ***** assert (mean (magic (3), 2), [5; 5; 5]) 160s ***** assert (mean (logical ([1 0 1 1])), 0.75) 160s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 160s ***** assert (mean ([1 2], 3), [1 2]) 160s ***** test 160s in = [1 2 3]; 160s out = 2; 160s assert (mean (in, "default"), mean (in)); 160s assert (mean (in, "default"), out); 160s assert (mean (in, "double"), out); 160s assert (mean (in, "native"), out); 160s ***** test 160s in = single ([1 2 3]); 160s out = 2; 160s assert (mean (in, "default"), mean (in)); 160s assert (mean (in, "default"), single (out)); 160s assert (mean (in, "double"), out); 160s assert (mean (in, "native"), single (out)); 160s ***** test 160s in = logical ([1 0 1]); 160s out = 2/3; 160s assert (mean (in, "default"), mean (in), eps); 160s assert (mean (in, "default"), out, eps); 160s assert (mean (in, "double"), out, eps); 160s assert (mean (in, "native"), out, eps); 160s ***** test 160s in = char ("ab"); 160s out = 97.5; 160s assert (mean (in, "default"), mean (in), eps); 160s assert (mean (in, "default"), out, eps); 160s assert (mean (in, "double"), out, eps); 160s ***** test 160s in = uint8 ([1 2 3]); 160s out = 2; 160s assert (mean (in, "default"), mean (in)); 160s assert (mean (in, "default"), out); 160s assert (mean (in, "double"), out); 160s assert (mean (in, "native"), uint8 (out)); 160s ***** test 160s in = uint8 ([0 1 2 3]); 160s out = 1.5; 160s out_u8 = 2; 160s assert (mean (in, "default"), mean (in), eps); 160s assert (mean (in, "default"), out, eps); 160s assert (mean (in, "double"), out, eps); 160s assert (mean (in, "native"), uint8 (out_u8)); 160s assert (class (mean (in, "native")), "uint8"); 160s ***** test # internal sum exceeding intmax 160s in = uint8 ([3 141 141 255]); 160s out = 135; 160s assert (mean (in, "default"), mean (in)); 160s assert (mean (in, "default"), out); 160s assert (mean (in, "double"), out); 160s assert (mean (in, "native"), uint8 (out)); 160s assert (class (mean (in, "native")), "uint8"); 160s ***** test # fractional answer with internal sum exceeding intmax 160s in = uint8 ([1 141 141 255]); 160s out = 134.5; 160s out_u8 = 135; 160s assert (mean (in, "default"), mean (in)); 160s assert (mean (in, "default"), out); 160s assert (mean (in, "double"), out); 160s assert (mean (in, "native"), uint8 (out_u8)); 160s assert (class (mean (in, "native")), "uint8"); 160s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 160s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 160s out_same = intmax ("uint64")-1; 160s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 160s out_opp = -1; 160s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 160s out_neg = intmin ("int64")+1; 160s 160s ## both positive 160s assert (mean (in_same, "default"), mean (in_same)); 160s assert (mean (in_same, "default"), double (out_same)); 160s assert (mean (in_same, "double"), double (out_same)); 160s assert (mean (in_same, "native"), uint64 (out_same)); 160s assert (class (mean (in_same, "native")), "uint64"); 160s 160s ## opposite signs 160s assert (mean (in_opp, "default"), mean (in_opp)); 160s assert (mean (in_opp, "default"), double (out_opp)); 160s assert (mean (in_opp, "double"), double (out_opp)); 160s assert (mean (in_opp, "native"), int64 (out_opp)); 160s assert (class (mean (in_opp, "native")), "int64"); 160s 160s ## both negative 160s assert (mean (in_neg, "default"), mean (in_neg)); 160s assert (mean (in_neg, "default"), double(out_neg)); 160s assert (mean (in_neg, "double"), double(out_neg)); 160s assert (mean (in_neg, "native"), int64(out_neg)); 160s assert (class (mean (in_neg, "native")), "int64"); 160s ***** test <54567> 160s in = [(intmin('int64')+5), (intmax('int64'))-5]; 160s assert (mean (in, "native"), int64(-1)); 160s assert (class (mean (in, "native")), "int64"); 160s assert (mean (double(in)), double(0) ); 160s assert (mean (in), double(-0.5) ); 160s assert (mean (in, "default"), double(-0.5) ); 160s assert (mean (in, "double"), double(-0.5) ); 160s assert (mean (in, "all", "native"), int64(-1)); 160s assert (mean (in, 2, "native"), int64(-1)); 160s assert (mean (in, [1 2], "native"), int64(-1)); 160s assert (mean (in, [2 3], "native"), int64(-1)); 160s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 160s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 160s ***** test 160s x = [-10:10]; 160s y = [x;x+5;x-5]; 160s assert (mean (x), 0); 160s assert (mean (y, 2), [0, 5, -5]'); 160s assert (mean (y, "all"), 0); 160s y(2,4) = NaN; 160s assert (mean (y', "omitnan"), [0 5.35 -5]); 160s z = y + 20; 160s assert (mean (z, "all"), NaN); 160s assert (mean (z, "all", "includenan"), NaN); 160s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 160s m = [20 NaN 15]; 160s assert (mean (z'), m); 160s assert (mean (z', "includenan"), m); 160s m = [20 25.35 15]; 160s assert (mean (z', "omitnan"), m); 160s assert (mean (z, 2, "omitnan"), m'); 160s assert (mean (z, 2, "native", "omitnan"), m'); 160s assert (mean (z, 2, "omitnan", "native"), m'); 160s ***** test 160s assert (mean (true, "all"), 1); 160s assert (mean (false), 0); 160s assert (mean ([true false true]), 2/3, 4e-14); 160s assert (mean ([true false true], 1), [1 0 1]); 160s assert (mean ([true false NaN], 1), [1 0 NaN]); 160s assert (mean ([true false NaN], 2), NaN); 160s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 160s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 160s ***** assert (mean ("abc"), double (98)) 160s ***** assert (mean ("ab"), double (97.5), eps) 160s ***** assert (mean ("abc", "double"), double (98)) 160s ***** assert (mean ("abc", "default"), double (98)) 160s ***** test 160s x = magic (4); 160s x([2, 9:12]) = NaN; 160s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 160s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 160s assert (mean (x,2), NaN(4,1), eps); 160s assert (mean (x,3), x, eps); 160s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 160s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 160s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 160s assert (mean (x, 3, 'omitnan'), x, eps); 160s ***** assert (mean ([]), NaN(1,1)) 160s ***** assert (mean (single([])), NaN(1,1,"single")) 160s ***** assert (mean ([], 1), NaN(1,0)) 160s ***** assert (mean ([], 2), NaN(0,1)) 160s ***** assert (mean ([], 3), NaN(0,0)) 160s ***** assert (mean (ones(1,0)), NaN(1,1)) 160s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 160s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 160s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 160s ***** assert (mean (ones(0,1)), NaN(1,1)) 160s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 160s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 160s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 160s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 160s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 160s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 160s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 160s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 160s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 160s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 160s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 160s ***** test 160s x = repmat ([1:20;6:25], [5 2 6 3]); 160s assert (size (mean (x, [3 2])), [10 1 1 3]); 160s assert (size (mean (x, [1 2])), [1 1 6 3]); 160s assert (size (mean (x, [1 2 4])), [1 1 6]); 160s assert (size (mean (x, [1 4 3])), [1 40]); 160s assert (size (mean (x, [1 2 3 4])), [1 1]); 160s ***** assert (mean (ones (2,2), 3), ones (2,2)) 160s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 160s ***** assert (mean (magic (3), 3), magic (3)) 160s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 160s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 160s ***** test 160s x = repmat ([1:20;6:25], [5 2 6 3]); 160s m = repmat ([10.5;15.5], [5 1 1 3]); 160s assert (mean (x, [3 2]), m, 4e-14); 160s x(2,5,6,3) = NaN; 160s m(2,1,1,3) = NaN; 160s assert (mean (x, [3 2]), m, 4e-14); 160s m(2,1,1,3) = 15.52301255230125; 160s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 160s ***** assert (mean ([1 2 3], "aLL"), 2) 160s ***** assert (mean ([1 2 3], "OmitNan"), 2) 160s ***** assert (mean ([1 2 3], "DOUBle"), 2) 160s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 161s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 161s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 161s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 161s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 162s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 162s 35184372088833-1/(2^8), eps(35184372088833)) 162s !!!!! known bug: https://octave.org/testfailure/?63848 162s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 162s 162s Location | Observed | Expected | Reason 162s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 162s ***** error mean () 162s ***** error mean (1, 2, 3) 162s ***** error mean (1, 2, 3, 4) 162s ***** error mean (1, "all", 3) 163s ***** error mean (1, "b") 163s ***** error mean (1, 1, "foo") 163s ***** error mean ("abc", "native") 163s ***** error mean ({1:5}) 163s ***** error mean (1, ones (2,2)) 163s ***** error mean (1, 1.5) 163s ***** error mean (1, 0) 163s ***** error mean (1, []) 163s ***** error mean (1, -1) 163s ***** error mean (1, -1.5) 163s ***** error mean (1, NaN) 163s ***** error mean (1, Inf) 163s ***** error mean (repmat ([1:20;6:25], [5 2]), -1) 163s ***** error mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 163s ***** error mean (1, ones(1,0)) 163s ***** error mean (1, [2 2]) 163s 80 tests, 79 passed, 0 known failure, 1 skipped 163s [inst/shadow9/median.m] 163s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/shadow9/median.m 163s ***** assert (median (1), 1) 163s ***** assert (median ([1,2,3]), 2) 163s ***** assert (median ([1,2,3]'), 2) 163s ***** assert (median (cat(3,3,1,2)), 2) 163s ***** assert (median ([3,1,2]), 2) 163s ***** assert (median ([2,4,6,8]), 5) 163s ***** assert (median ([8,2,6,4]), 5) 163s ***** assert (median (single ([1,2,3])), single (2)) 163s ***** assert (median ([1,2], 3), [1,2]) 163s ***** test 163s x = [1, 2, 3, 4, 5, 6]; 163s x2 = x'; 163s y = [1, 2, 3, 4, 5, 6, 7]; 163s y2 = y'; 163s 163s assert (median (x) == median (x2) && median (x) == 3.5); 163s assert (median (y) == median (y2) && median (y) == 4); 163s assert (median ([x2, 2 * x2]), [3.5, 7]); 163s assert (median ([y2, 3 * y2]), [4, 12]); 163s ***** test 163s in = [1 2 3]; 163s out = 2; 163s assert (median (in, "default"), median (in)); 163s assert (median (in, "default"), out); 163s ***** test 163s in = single ([1 2 3]); 163s out = 2; 163s assert (median (in, "default"), single (median (in))); 163s assert (median (in, "default"), single (out)); 163s assert (median (in, "double"), double (out)); 163s assert (median (in, "native"), single (out)); 163s ***** test 163s in = uint8 ([1 2 3]); 163s out = 2; 163s assert (median (in, "default"), double (median (in))); 163s assert (median (in, "default"), double (out)); 163s assert (median (in, "double"), out); 163s assert (median (in, "native"), uint8 (out)); 163s ***** test 163s in = logical ([1 0 1]); 163s out = 1; 163s assert (median (in, "default"), double (median (in))); 163s assert (median (in, "default"), double (out)); 163s assert (median (in, "double"), double (out)); 163s assert (median (in, "native"), double (out)); 163s ***** test 163s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 163s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 163s assert (median (x), y); 163s assert (median (x, 1), y); 163s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 163s assert (median (x, "omitnan"), y); 163s assert (median (x, 1, "omitnan"), y); 163s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 163s assert (median (x, 2, "omitnan"), y); 163s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 163s assert (median (x, 2), y); 163s assert (median (x, "all"), NaN); 163s assert (median (x, "all", "omitnan"), 2); 163s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 163s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 163s ***** test 163s assert (median (true, "all"), logical (1)); 163s assert (median (false), logical (0)); 163s assert (median ([true false true]), true); 163s assert (median ([true false true], 2), true); 163s assert (median ([true false true], 1), logical ([1 0 1])); 163s assert (median ([true false NaN], 1), [1 0 NaN]); 163s assert (median ([true false NaN], 2), NaN); 163s assert (median ([true false NaN], 2, "omitnan"), 0.5); 163s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 163s ***** test 163s x = repmat ([1:20;6:25], [5 2 6 3]); 163s assert (size (median (x, [3 2])), [10 1 1 3]); 163s assert (size (median (x, [1 2])), [1 1 6 3]); 163s assert (size (median (x, [1 2 4])), [1 1 6]); 163s assert (size (median (x, [1 4 3])), [1 40]); 163s assert (size (median (x, [1 2 3 4])), [1 1]); 163s ***** assert (median (ones (2,2), 3), ones (2,2)) 163s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 163s ***** assert (median (magic (3), 3), magic (3)) 163s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 163s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 163s ***** test 163s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 163s assert (median (x, [3 2]), [NaN NaN 1.4]'); 163s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 163s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 163s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 163s ***** assert (median (NaN), NaN) 163s ***** assert (median (NaN, "omitnan"), NaN) 163s ***** assert (median (NaN (2)), [NaN NaN]) 163s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 163s ***** assert (median ([1 NaN 3]), NaN) 163s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 163s ***** assert (median ([1 NaN 3], 2), NaN) 163s ***** assert (median ([1 NaN 3]'), NaN) 163s ***** assert (median ([1 NaN 3]', 1), NaN) 163s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 163s ***** assert (median ([1 NaN 3], "omitnan"), 2) 163s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 163s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 163s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 163s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 163s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 163s ***** assert (median ([1 2 NaN 3]), NaN) 163s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 163s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 163s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 163s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 163s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 163s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 163s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 163s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 163s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 163s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 163s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 163s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 163s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 163s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 163s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 163s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 163s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 163s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 163s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 163s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 163s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 163s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 163s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 163s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 163s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 163s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 163s ***** assert (median (NaN("single")), NaN("single")) 163s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 163s ***** assert (median (NaN("single"), "double"), NaN("double")) 163s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 163s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 163s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 163s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 163s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 163s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 163s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 163s ***** test <*64011> 163s x = [magic(3), magic(3)]; 163s x([3, 7, 11, 12, 16, 17]) = NaN; 163s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 163s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 163s assert (median (x), ynan); 163s assert (median (x, "omitnan"), yomitnan, eps); 163s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 163s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 163s ***** assert (median (Inf), Inf) 163s ***** assert (median (-Inf), -Inf) 163s ***** assert (median ([-Inf Inf]), NaN) 163s ***** assert (median ([3 Inf]), Inf) 163s ***** assert (median ([3 4 Inf]), 4) 163s ***** assert (median ([Inf 3 4]), 4) 163s ***** assert (median ([Inf 3 Inf]), Inf) 163s ***** assert (median ([1, 2, Inf]), 2) 163s ***** assert (median ([1, 2, Inf, Inf]), Inf) 163s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 163s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 163s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 163s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 163s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 163s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 163s ***** assert (median ([]), NaN) 163s ***** assert (median (ones(1,0)), NaN) 163s ***** assert (median (ones(0,1)), NaN) 163s ***** assert (median ([], 1), NaN(1,0)) 163s ***** assert (median ([], 2), NaN(0,1)) 163s ***** assert (median ([], 3), NaN(0,0)) 163s ***** assert (median (ones(1,0), 1), NaN(1,0)) 163s ***** assert (median (ones(1,0), 2), NaN(1,1)) 163s ***** assert (median (ones(1,0), 3), NaN(1,0)) 163s ***** assert (median (ones(0,1), 1), NaN(1,1)) 163s ***** assert (median (ones(0,1), 2), NaN(0,1)) 163s ***** assert (median (ones(0,1), 3), NaN(0,1)) 163s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 163s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 163s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 163s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 163s ***** assert (median([1 3 3i 2 1i]), 2) 163s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 163s ***** shared a, b, x, y 163s old_state = rand ("state"); 163s restore_state = onCleanup (@() rand ("state", old_state)); 163s rand ("state", 2); 163s a = rand (2,3,4,5); 163s b = rand (3,4,6,5); 163s x = sort (a, 4); 163s y = sort (b, 3); 163s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 163s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 163s ***** shared ## Clear shared to prevent variable echo for any later test failures 163s ***** test 163s x = ones(15,1,4); 163s x([13,15],1,:) = NaN; 163s assert (median (x, 1, "omitnan"), ones (1,1,4)) 163s ***** assert (median ([true, false]), true) 163s ***** assert (median (logical ([])), false) 163s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 163s ***** assert (median (uint8 ([])), uint8 (NaN)) 163s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 163s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 163s ***** assert (median (int8 ([])), int8 (NaN)) 163s ***** assert (median (single ([1, 3, 4])), single (3)) 163s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 163s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 163s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 163s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 163s int8 ([64 65 65 67])) 163s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 163s int8 ([126; 4])) 163s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 163s intmax ("int64") - 1) 163s ***** assert <54567> (median ( ... 163s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 163s int64([intmax("int64") - 1; 2])) 163s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 163s intmax ("uint64") - 1) 163s ***** assert <54567> (median ( ... 163s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 163s uint64([intmax("uint64") - 1; 2])) 163s ***** assert <54567> (median (... 163s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 163s int8(-1)) 163s ***** assert <54567> (median ([int8([1 2 3 4]); ... 163s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 163s int8([3;-1])) 163s ***** assert <54567> (median (... 163s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 163s int64(-1)) 163s ***** assert <54567> (median ([int64([1 2 3 4]); ... 163s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 163s int64([3;-1])) 163s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 163s intmax("uint64")-1) 163s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 163s double(intmax("uint64")-1)) 163s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 163s double(intmax("uint64")-1)) 163s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 163s intmax("uint64")-1) 163s ***** assert (median ([1 2 3], "aLL"), 2) 163s ***** assert (median ([1 2 3], "OmitNan"), 2) 163s ***** assert (median ([1 2 3], "DOUBle"), 2) 163s ***** error median () 163s ***** error median (1, 2, 3) 163s ***** error median (1, 2, 3, 4) 164s ***** error median (1, "all", 3) 164s ***** error median (1, "b") 164s ***** error median (1, 1, "foo") 164s ***** error <'all' cannot be used with> median (1, 3, "all") 164s ***** error <'all' cannot be used with> median (1, [2 3], "all") 164s ***** error median ({1:5}) 164s ***** error median ("char") 164s ***** error median(1, "double", "native") 164s ***** error median (1, ones (2,2)) 164s ***** error median (1, 1.5) 164s ***** error median (1, 0) 164s ***** error median ([1 2 3], [-1 1]) 164s ***** error median(1, [1 2 2]) 164s 159 tests, 159 passed, 0 known failure, 0 skipped 164s [inst/shadow9/std.m] 164s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/shadow9/std.m 164s ***** assert (std (13), 0) 164s ***** assert (std (single (13)), single (0)) 164s ***** assert (std ([1,2,3]), 1) 164s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 164s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 164s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 164s ***** assert (std (5, 99), 0) 164s ***** assert (std (5, 99, 1), 0) 164s ***** assert (std (5, 99, 2), 0) 164s ***** assert (std ([5 3], [99 99], 2), 1) 164s ***** assert (std ([1:7], [1:7]), sqrt (3)) 164s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 164s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 164s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 164s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 164s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 164s ***** test 164s x = [-10:10]; 164s y = [x;x+5;x-5]; 164s assert (std (x), sqrt (38.5), 1e-14); 164s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 164s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 164s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 164s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 164s y(2,4) = NaN; 164s assert (std (y, "all"), NaN); 164s assert (std (y, "all", "includenan"), NaN); 164s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 164s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 164s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 164s assert (std (y, [], 2, "omitnan"), ... 164s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 164s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 164s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 164s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 164s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 164s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 164s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 164s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 164s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 164s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 164s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 164s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 164s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 164s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 164s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 164s sqrt(5)*ones(1,3,2), eps) 164s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 164s sqrt(5)*ones(3,1,2), eps) 164s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 164s sqrt(60)*ones(1,1,2),eps) 164s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 164s sqrt(6)*ones(1,3,2),eps) 164s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 164s sqrt(969),eps) 164s ***** test 164s x = reshape(1:18, [3 3 2]); 164s x([2, 14]) = NaN; 164s w = ones (3,3,2); 164s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 164s ***** test 164s x = reshape(1:18, [3 3 2]); 164s w = ones (3,3,2); 164s w([2, 14]) = NaN; 164s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 164s ***** assert (std ([1 2 3], "aLl"), 1); 164s ***** assert (std ([1 2 3], "OmitNan"), 1); 164s ***** assert (std ([1 2 3], "IncludeNan"), 1); 164s ***** test 164s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 164s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 164s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 164s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 164s assert (size (std (x, 0, [1 4 3])), [1, 40]); 164s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 164s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 164s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 164s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 164s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 164s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 164s sqrt([42 36 42]), eps) 164s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 164s sqrt([42 36 42]), eps) 164s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 164s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 164s sqrt([42 36 42]), eps) 164s ***** test 164s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 164s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 164s assert (std (x, 0, [3, 2]), v, 1e-14); 164s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 164s assert (std (x, 1, [3, 2]), v, 1e-14); 164s x(2,5,6,3) = NaN; 164s v(2,1,1,3) = NaN; 164s assert (std (x, 1, [3, 2]), v, 1e-14); 164s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 164s v(2,1,1,3) = NaN; 164s assert (std (x, [], [3, 2]), v, 1e-14); 164s v(2,1,1,3) = sqrt (33.40177912169048); 164s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 164s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 164s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 164s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 164s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 164s ***** assert (std (magic (3), [], 3), zeros (3,3)) 164s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 164s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 164s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 164s ***** assert (std ([]), NaN) 164s ***** assert (class (var (single ([]))), "single") 164s ***** assert (std ([],[],1), NaN(1,0)) 164s ***** assert (std ([],[],2), NaN(0,1)) 164s ***** assert (std ([],[],3), []) 164s ***** assert (class (var (single ([]), [], 1)), "single") 164s ***** assert (std (ones (1,0)), NaN) 164s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 164s ***** assert (std (ones (1,0), [], 2), NaN) 164s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 164s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 164s ***** assert (std (ones (0,1)), NaN) 164s ***** assert (std (ones (0,1), [], 1), NaN) 164s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 164s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 164s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 164s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 164s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 164s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 164s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 164s ***** test 164s [~, m] = std ([]); 164s assert (m, NaN); 164s ***** test <*62395> 164s [~, m] = std (13); 164s assert (m, 13); 164s [~, m] = std (single(13)); 164s assert (m, single(13)); 164s [~, m] = std ([1, 2, 3; 3 2 1], []); 164s assert (m, [2 2 2]); 164s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 164s assert (m, [2 2 2]); 164s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 164s assert (m, [2 2]'); 164s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 164s assert (m, [1 2 3; 3 2 1]); 164s ***** test <*62395> 164s [~, m] = std (5,99); 164s assert (m, 5); 164s [~, m] = std ([1:7], [1:7]); 164s assert (m, 5); 164s [~, m] = std ([eye(3)], [1:3]); 164s assert (m, [1/6, 1/3, 0.5], eps); 164s [~, m] = std (ones (2,2,2), [1:2], 3); 164s assert (m, ones (2,2)); 164s [~, m] = std ([1 2; 3 4], 0, 'all'); 164s assert (m, 2.5, eps); 164s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 164s assert (m, [3.5, 5.5], eps); 164s ***** test 164s [v, m] = std (4 * eye (2), [1, 3]); 164s assert (v, sqrt ([3, 3]), 1e-14); 164s assert (m, [1, 3]); 164s ***** test <*62395> 164s [~, m] = std ([]); 164s assert (m, NaN); 164s ***** test 164s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 164s [~, m] = std (x, 0, [3 2]); 164s assert (m, mean (x, [3 2])); 164s [~, m] = std (x, 0, [1 2]); 164s assert (m, mean (x, [1 2])); 164s [~, m] = std (x, 0, [1 3 4]); 164s assert (m, mean (x, [1 3 4])); 164s ***** test 164s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 164s x(2,5,6,3) = NaN; 164s [~, m] = std (x, 0, [3 2], "omitnan"); 164s assert (m, mean (x, [3 2], "omitnan")); 164s ***** test <*63203> 164s [v, m] = std (Inf); 164s assert (v, NaN); 164s assert (m, Inf); 164s ***** test <*63203> 164s [v, m] = std (NaN); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3]); 164s assert (v, NaN); 164s assert (m, Inf); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3]'); 164s assert (v, NaN); 164s assert (m, Inf); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3]); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3]'); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3], [], 1); 164s assert (v, [0, NaN, 0]); 164s assert (m, [1, Inf, 3]); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3], [], 2); 164s assert (v, NaN); 164s assert (m, Inf); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3], [], 3); 164s assert (v, [0, NaN, 0]); 164s assert (m, [1, Inf, 3]); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3], [], 1); 164s assert (v, [0, NaN, 0]); 164s assert (m, [1, NaN, 3]); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3], [], 2); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3], [], 3); 164s assert (v, [0, NaN, 0]); 164s assert (m, [1, NaN, 3]); 164s ***** test <*63203> 164s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 164s assert (v, sqrt ([2, NaN, 2])); 164s assert (m, [2, Inf, 4]); 164s ***** test <*63203> 164s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 164s assert (v, sqrt ([2, NaN, 2])); 164s assert (m, [2, Inf, 4]); 164s ***** test <*63203> 164s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 164s assert (v, sqrt ([2, NaN, 2])); 164s assert (m, [2, NaN, 4]); 164s ***** test <*63203> 164s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 164s assert (v, sqrt ([2, NaN, 2])); 164s assert (m, [2, NaN, 4]); 164s ***** test <*63203> 164s [v, m] = std ([Inf, 2, NaN]); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([Inf, 2, NaN]'); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([NaN, 2, Inf]); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([NaN, 2, Inf]'); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([Inf, 2, NaN], [], 1); 164s assert (v, [NaN, 0, NaN]); 164s assert (m, [Inf, 2, NaN]); 164s ***** test <*63203> 164s [v, m] = std ([Inf, 2, NaN], [], 2); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([NaN, 2, Inf], [], 1); 164s assert (v, [NaN, 0, NaN]); 164s assert (m, [NaN, 2, Inf]); 164s ***** test <*63203> 164s [v, m] = std ([NaN, 2, Inf], [], 2); 164s assert (v, NaN); 164s assert (m, NaN); 164s ***** test <*63203> 164s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 164s assert (v, sqrt ([2, 2, NaN])); 164s assert (m, [2, 4, NaN]); 164s ***** test <*63203> 164s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 164s assert (v, sqrt ([2, 2, NaN])); 164s assert (m, [2, 4, NaN]); 164s ***** test <*63291> 164s [v, m] = std (2 * eye (2)); 164s assert (v, sqrt ([2, 2])); 164s assert (m, [1, 1]); 164s ***** test <*63291> 164s [v, m] = std (4 * eye (2), [1, 3]); 164s assert (v, sqrt ([3, 3])); 164s assert (m, [1, 3]); 164s ***** test <*63291> 164s [v, m] = std (sparse (2 * eye (2))); 164s assert (full (v), sqrt ([2, 2])); 164s assert (full (m), [1, 1]); 164s ***** test <*63291> 164s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 164s assert (full (v), sqrt ([3, 3])); 164s assert (full (m), [1, 3]); 164s ***** test <*63291> 164s [v, m] = std (sparse (eye (2))); 164s assert (issparse (v)); 164s assert (issparse (m)); 164s ***** test <*63291> 164s [v, m] = std (sparse (eye (2)), [1, 3]); 164s assert (issparse (v)); 164s assert (issparse (m)); 164s ***** error std () 164s ***** error std (1, 2, "omitnan", 3) 164s ***** error std (1, 2, 3, 4) 165s ***** error std (1, 2, 3, 4, 5) 165s ***** error std (1, "foo") 165s ***** error std (1, [], "foo") 165s ***** error std ([1 2 3], 2) 165s ***** error std ([1 2], 2, "all") 165s ***** error std ([1 2],0.5, "all") 165s ***** error std (1, -1) 165s ***** error std (1, [1 -1]) 165s ***** error ... 165s std ([1 2 3], [1 -1 0]) 165s ***** error std ({1:5}) 165s ***** error std ("char") 165s ***** error std (['A'; 'B']) 165s ***** error std (1, [], ones (2,2)) 165s ***** error std (1, 0, 1.5) 165s ***** error std (1, [], 0) 165s ***** error std (1, [], 1.5) 165s ***** error std ([1 2 3], [], [-1 1]) 165s ***** error ... 165s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 165s ***** error ... 165s std ([1 2], eye (2)) 165s ***** error ... 165s std ([1 2 3 4], [1 2; 3 4]) 165s ***** error ... 165s std ([1 2 3 4], [1 2; 3 4], 1) 165s ***** error ... 165s std ([1 2 3 4], [1 2; 3 4], [2 3]) 165s ***** error ... 165s std (ones (2, 2), [1 2], [1 2]) 165s ***** error ... 165s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 165s ***** error ... 165s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 165s ***** error std ([1 2 3; 2 3 4], [1 3 4]) 165s ***** error std ([1 2], [1 2 3]) 165s ***** error std (1, [1 2]) 165s ***** error std ([1 2 3; 2 3 4], [1 3 4], 1) 165s ***** error std ([1 2 3; 2 3 4], [1 3], 2) 165s ***** error std ([1 2], [1 2], 1) 165s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 165s std (1, [], 1, "all") 165s ***** error ... 165s std ([1 2 3; 2 3 4], [1 3], "all") 165s ***** error ... 165s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 165s 162 tests, 162 passed, 0 known failure, 0 skipped 165s [inst/hotelling_t2test.m] 165s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hotelling_t2test.m 165s ***** error hotelling_t2test (); 165s ***** error ... 165s hotelling_t2test (1); 165s ***** error ... 165s hotelling_t2test (ones(2,2,2)); 165s ***** error ... 165s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 165s ***** error ... 165s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 165s ***** error ... 165s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 165s ***** error ... 165s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 165s ***** error ... 165s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 165s ***** error ... 165s hotelling_t2test (ones(20,1), [0, 0]); 165s ***** error ... 165s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 165s ***** error ... 165s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 165s ***** test 165s randn ("seed", 1); 165s x = randn (50000, 5); 165s [h, pval, stats] = hotelling_t2test (x); 165s assert (h, 0); 165s assert (stats.df1, 5); 165s assert (stats.df2, 49995); 165s ***** test 165s randn ("seed", 1); 165s x = randn (50000, 5); 165s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 165s assert (h, 1); 165s assert (stats.df1, 5); 165s assert (stats.df2, 49995); 165s 13 tests, 13 passed, 0 known failure, 0 skipped 165s [inst/Classification/ClassificationPartitionedModel.m] 165s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationPartitionedModel.m 165s ***** demo 165s 165s load fisheriris 165s x = meas; 165s y = species; 165s 165s ## Create a KNN classifier model 165s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 165s 165s ## Create a partition for 5-fold cross-validation 165s partition = cvpartition (y, "KFold", 5); 165s 165s ## Create the ClassificationPartitionedModel object 165s cvModel = crossval (obj, 'cvPartition', partition) 165s ***** demo 165s 165s load fisheriris 165s x = meas; 165s y = species; 165s 165s ## Create a KNN classifier model 165s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 165s 165s ## Create the ClassificationPartitionedModel object 165s cvModel = crossval (obj); 165s 165s ## Predict the class labels for the observations not used for training 165s [label, score, cost] = kfoldPredict (cvModel); 165s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 165s sum (strcmp (label, y)) / numel (y) *100, ... 165s sum (strcmp (label, y)), numel (y)) 165s ***** test 165s load fisheriris 165s a = fitcdiscr (meas, species, "gamma", 0.3); 165s cvModel = crossval (a, "KFold", 5); 165s assert (class (cvModel), "ClassificationPartitionedModel"); 165s assert (cvModel.NumObservations, 150); 165s assert (numel (cvModel.Trained), 5); 165s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 165s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 165s assert (cvModel.KFold, 5); 165s ***** test 165s load fisheriris 165s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 165s cvModel = crossval (a, "HoldOut", 0.3); 165s assert (class (cvModel), "ClassificationPartitionedModel"); 165s assert ({cvModel.X, cvModel.Y}, {meas, species}); 165s assert (cvModel.NumObservations, 150); 165s assert (numel (cvModel.Trained), 1); 165s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 165s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 165s ***** test 165s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 165s y = ["a"; "a"; "b"; "b"]; 165s a = fitcgam (x, y, "Interactions", "all"); 165s cvModel = crossval (a, "KFold", 5); 165s assert (class (cvModel), "ClassificationPartitionedModel"); 165s assert (cvModel.NumObservations, 4); 165s assert (numel (cvModel.Trained), 5); 165s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 165s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 165s assert (cvModel.KFold, 5); 181s ***** test 181s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 181s y = ["a"; "a"; "b"; "b"]; 181s a = fitcgam (x, y); 181s cvModel = crossval (a, "LeaveOut", "on"); 181s assert (class (cvModel), "ClassificationPartitionedModel"); 181s assert ({cvModel.X, cvModel.Y}, {x, y}); 181s assert (cvModel.NumObservations, 4); 181s assert (numel (cvModel.Trained), 4); 181s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 181s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 185s ***** test 185s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 185s y = ["a"; "a"; "b"; "b"]; 185s a = fitcknn (x, y); 185s partition = cvpartition (y, "KFold", 5); 185s cvModel = ClassificationPartitionedModel (a, partition); 185s assert (class (cvModel), "ClassificationPartitionedModel"); 185s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 185s assert (cvModel.NumObservations, 4); 185s assert (cvModel.ModelParameters.NumNeighbors, 1); 185s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 185s assert (cvModel.ModelParameters.Distance, "euclidean"); 185s assert (! cvModel.ModelParameters.Standardize); 185s ***** test 185s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 185s y = ["a"; "a"; "b"; "b"]; 185s a = fitcknn (x, y, "NSMethod", "exhaustive"); 185s partition = cvpartition (y, "HoldOut", 0.2); 185s cvModel = ClassificationPartitionedModel (a, partition); 185s assert (class (cvModel), "ClassificationPartitionedModel"); 185s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 185s assert ({cvModel.X, cvModel.Y}, {x, y}); 185s assert (cvModel.NumObservations, 4); 185s assert (cvModel.ModelParameters.NumNeighbors, 1); 185s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 185s assert (cvModel.ModelParameters.Distance, "euclidean"); 185s assert (! cvModel.ModelParameters.Standardize); 185s ***** test 185s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 185s y = ["a"; "a"; "b"; "b"]; 185s k = 3; 185s a = fitcknn (x, y, "NumNeighbors" ,k); 185s partition = cvpartition (y, "LeaveOut"); 185s cvModel = ClassificationPartitionedModel (a, partition); 185s assert (class (cvModel), "ClassificationPartitionedModel"); 185s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 185s assert ({cvModel.X, cvModel.Y}, {x, y}); 185s assert (cvModel.NumObservations, 4); 185s assert (cvModel.ModelParameters.NumNeighbors, k); 185s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 185s assert (cvModel.ModelParameters.Distance, "euclidean"); 185s assert (! cvModel.ModelParameters.Standardize); 185s ***** test 185s load fisheriris 185s inds = ! strcmp (species, 'setosa'); 185s x = meas(inds, 3:4); 185s y = grp2idx (species(inds)); 185s SVMModel = fitcsvm (x,y); 185s CVMdl = crossval (SVMModel, "KFold", 5); 185s assert (class (CVMdl), "ClassificationPartitionedModel") 185s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 185s assert (CVMdl.KFold == 5) 185s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 185s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 185s ***** test 185s load fisheriris 185s inds = ! strcmp (species, 'setosa'); 185s x = meas(inds, 3:4); 185s y = grp2idx (species(inds)); 185s obj = fitcsvm (x, y); 185s CVMdl = crossval (obj, "HoldOut", 0.2); 185s assert (class (CVMdl), "ClassificationPartitionedModel") 185s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 185s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 185s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 185s ***** test 185s load fisheriris 185s inds = ! strcmp (species, 'setosa'); 185s x = meas(inds, 3:4); 185s y = grp2idx (species(inds)); 185s obj = fitcsvm (x, y); 185s CVMdl = crossval (obj, "LeaveOut", 'on'); 185s assert (class (CVMdl), "ClassificationPartitionedModel") 185s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 185s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 185s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 185s ***** error ... 185s ClassificationPartitionedModel () 185s ***** error ... 185s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 185s ***** error ... 185s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 185s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 186s ***** error ... 186s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 186s ones (4,1)), 'Holdout') 186s ***** test 186s load fisheriris 186s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 186s cvModel = crossval (a, "Kfold", 4); 186s [label, score, cost] = kfoldPredict (cvModel); 186s assert (class(cvModel), "ClassificationPartitionedModel"); 186s assert ({cvModel.X, cvModel.Y}, {meas, species}); 186s assert (cvModel.NumObservations, 150); 186s ***** # assert (label, {"b"; "b"; "a"; "a"}); 186s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 186s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 186s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 186s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 186s ***** test 186s x = ones(4, 11); 186s y = {"a"; "a"; "b"; "b"}; 186s k = 3; 186s a = fitcknn (x, y, "NumNeighbors", k); 186s partition = cvpartition (y, "LeaveOut"); 186s cvModel = ClassificationPartitionedModel (a, partition); 186s [label, score, cost] = kfoldPredict (cvModel); 186s assert (class(cvModel), "ClassificationPartitionedModel"); 186s assert ({cvModel.X, cvModel.Y}, {x, y}); 186s assert (cvModel.NumObservations, 4); 186s assert (cvModel.ModelParameters.NumNeighbors, k); 186s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 186s assert (cvModel.ModelParameters.Distance, "euclidean"); 186s assert (! cvModel.ModelParameters.Standardize); 186s assert (label, {"b"; "b"; "a"; "a"}); 186s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 186s 0.6667, 0.3333], 1e-4); 186s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 186s 0.3333, 0.6667], 1e-4); 186s ***** error ... 186s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 186s 17 tests, 17 passed, 0 known failure, 0 skipped 186s [inst/Classification/CompactClassificationSVM.m] 186s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/CompactClassificationSVM.m 186s ***** demo 186s ## Create a support vectors machine classifier and its compact version 186s # and compare their size 186s 186s load fisheriris 186s X = meas; 186s Y = species; 186s 186s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 186s CMdl = crossval (Mdl); 186s 186s whos ('Mdl', 'CMdl') 186s ***** error ... 186s CompactClassificationSVM (1) 186s ***** shared x, y, CMdl 186s load fisheriris 186s inds = ! strcmp (species, 'setosa'); 186s x = meas(inds, 3:4); 186s y = grp2idx (species(inds)); 186s ***** test 186s xc = [min(x); mean(x); max(x)]; 186s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 186s CMdl = compact (Mdl); 186s assert (isempty (CMdl.Alpha), true) 186s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 186s [label, score] = predict (CMdl, xc); 186s assert (label, [1; 2; 2]); 186s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 186s assert (score(:,1), -score(:,2), eps) 186s ***** test 186s Mdl = fitcsvm (x, y); 186s CMdl = compact (Mdl); 186s assert (isempty (CMdl.Beta), true) 186s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 186s assert (numel (CMdl.Alpha), 24) 186s assert (CMdl.Bias, -14.415, 1e-3) 186s xc = [min(x); mean(x); max(x)]; 186s label = predict (CMdl, xc); 186s assert (label, [1; 2; 2]); 186s ***** error ... 186s predict (CMdl) 186s ***** error ... 186s predict (CMdl, []) 186s ***** error ... 186s predict (CMdl, 1) 186s ***** test 186s CMdl.ScoreTransform = "a"; 186s ***** error ... 186s [labels, scores] = predict (CMdl, x); 186s ***** test 186s rand ("seed", 1); 186s C = cvpartition (y, 'HoldOut', 0.15); 186s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 186s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 186s CMdl = compact (Mdl); 186s testInds = test (C); 186s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 186s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 186s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 186s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 186s assert (computed_margin, expected_margin, 1e-4); 186s ***** error ... 186s margin (CMdl) 186s ***** error ... 186s margin (CMdl, zeros (2)) 186s ***** error ... 186s margin (CMdl, [], 1) 186s ***** error ... 186s margin (CMdl, 1, 1) 186s ***** error ... 186s margin (CMdl, [1, 2], []) 186s ***** error ... 186s margin (CMdl, [1, 2], [1; 2]) 186s ***** test 186s rand ("seed", 1); 186s C = cvpartition (y, 'HoldOut', 0.15); 186s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 186s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 186s CMdl = compact (Mdl); 186s testInds = test (C); 186s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 186s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 186s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 186s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 186s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 186s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 186s assert (L1, 2.8711, 1e-4); 186s assert (L2, 0.5333, 1e-4); 186s assert (L3, 10.9685, 1e-4); 186s assert (L4, 1.9827, 1e-4); 186s assert (L5, 1.5849, 1e-4); 186s assert (L6, 7.6739, 1e-4); 186s ***** error ... 186s loss (CMdl) 186s ***** error ... 186s loss (CMdl, zeros (2)) 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "LossFun") 186s ***** error ... 186s loss (CMdl, [], zeros (2)) 186s ***** error ... 186s loss (CMdl, 1, zeros (2)) 186s ***** error ... 186s loss (CMdl, [1, 2], []) 186s ***** error ... 186s loss (CMdl, [1, 2], [1; 2]) 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "LossFun", 1) 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "LossFun", "some") 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "Weights", 'a') 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 186s ***** error ... 186s loss (CMdl, [1, 2], 1, "some", "some") 186s 29 tests, 29 passed, 0 known failure, 0 skipped 186s [inst/Classification/ConfusionMatrixChart.m] 186s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ConfusionMatrixChart.m 186s ***** demo 186s ## Create a simple ConfusionMatrixChart Object 186s 186s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 186s NormalizedValues = cm.NormalizedValues 186s ClassLabels = cm.ClassLabels 186s ***** test 186s hf = figure ("visible", "off"); 186s unwind_protect 186s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 186s assert (isa (cm, "ConfusionMatrixChart"), true); 186s unwind_protect_cleanup 186s close (hf); 186s end_unwind_protect 186s 1 test, 1 passed, 0 known failure, 0 skipped 186s [inst/Classification/ClassificationKNN.m] 186s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationKNN.m 186s ***** demo 186s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 186s ## Evaluate some model predictions on new data. 186s 186s load fisheriris 186s x = meas; 186s y = species; 186s xc = [min(x); mean(x); max(x)]; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 186s [label, score, cost] = predict (obj, xc) 186s ***** demo 186s load fisheriris 186s x = meas; 186s y = species; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 186s 186s ## Create a cross-validated model 186s CVMdl = crossval (obj) 186s ***** demo 186s load fisheriris 186s x = meas; 186s y = species; 186s covMatrix = cov (x); 186s 186s ## Fit the k-NN model using the 'mahalanobis' distance 186s ## and the custom covariance matrix 186s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 186s 'Cov', covMatrix); 186s 186s ## Create a partition model using cvpartition 186s Partition = cvpartition (size (x, 1), 'kfold', 12); 186s 186s ## Create cross-validated model using 'cvPartition' name-value argument 186s CVMdl = crossval (obj, 'cvPartition', Partition) 186s 186s ## Access the trained model from first fold of cross-validation 186s CVMdl.Trained{1} 186s ***** demo 186s X = [1, 2; 3, 4; 5, 6]; 186s Y = {'A'; 'B'; 'A'}; 186s model = fitcknn (X, Y); 186s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 186s ## Calculate loss using custom loss function 186s L = loss (model, X, Y, 'LossFun', customLossFun) 186s ***** demo 186s X = [1, 2; 3, 4; 5, 6]; 186s Y = {'A'; 'B'; 'A'}; 186s model = fitcknn (X, Y); 186s ## Calculate loss using 'mincost' loss function 186s L = loss (model, X, Y, 'LossFun', 'mincost') 186s ***** demo 186s X = [1, 2; 3, 4; 5, 6]; 186s Y = ['1'; '2'; '3']; 186s model = fitcknn (X, Y); 186s X_test = [3, 3; 5, 7]; 186s Y_test = ['1'; '2']; 186s ## Specify custom Weights 186s W = [1; 2]; 186s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 186s ***** demo 186s load fisheriris 186s mdl = fitcknn (meas, species); 186s X = mean (meas); 186s Y = {'versicolor'}; 186s m = margin (mdl, X, Y) 186s ***** demo 186s X = [1, 2; 4, 5; 7, 8; 3, 2]; 186s Y = [2; 1; 3; 2]; 186s ## Train the model 186s mdl = fitcknn (X, Y); 186s ## Specify Vars and Labels 186s Vars = 1; 186s Labels = 2; 186s ## Calculate partialDependence 186s [pd, x, y] = partialDependence (mdl, Vars, Labels); 186s ***** demo 186s X = [1, 2; 4, 5; 7, 8; 3, 2]; 186s Y = [2; 1; 3; 2]; 186s ## Train the model 186s mdl = fitcknn (X, Y); 186s ## Specify Vars and Labels 186s Vars = 1; 186s Labels = 1; 186s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 186s ## Calculate partialDependence using queryPoints 186s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 186s queryPoints) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s k = 10; 186s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = ones (4, 11); 186s y = ["a"; "a"; "b"; "b"]; 186s k = 10; 186s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s k = 10; 186s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s k = 10; 186s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s weights = ones (4,1); 186s a = ClassificationKNN (x, y, "Standardize", 1); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.Standardize}, {true}) 186s assert ({a.Sigma}, {std(x, [], 1)}) 186s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s weights = ones (4,1); 186s a = ClassificationKNN (x, y, "Standardize", false); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.Standardize}, {false}) 186s assert ({a.Sigma}, {[]}) 186s assert ({a.Mu}, {[]}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s s = ones (1, 3); 186s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.DistParameter}, {s}) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 186s assert (class (a), "ClassificationKNN"); 186s assert (a.DistParameter, 5) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 186s "NSMethod", "exhaustive"); 186s assert (class (a), "ClassificationKNN"); 186s assert (a.DistParameter, 5) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 186s assert (class (a), "ClassificationKNN"); 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 186s assert ({a.BucketSize}, {20}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y, "IncludeTies", true); 186s assert (class (a), "ClassificationKNN"); 186s assert (a.IncludeTies, true); 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y); 186s assert (class (a), "ClassificationKNN"); 186s assert (a.IncludeTies, false); 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s a = ClassificationKNN (x, y); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Prior, [0.5; 0.5]) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s prior = [0.5; 0.5]; 186s a = ClassificationKNN (x, y, "Prior", "empirical"); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Prior, prior) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "a"; "b"]; 186s prior = [0.75; 0.25]; 186s a = ClassificationKNN (x, y, "Prior", "empirical"); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Prior, prior) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "a"; "b"]; 186s prior = [0.5; 0.5]; 186s a = ClassificationKNN (x, y, "Prior", "uniform"); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Prior, prior) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s cost = eye (2); 186s a = ClassificationKNN (x, y, "Cost", cost); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Cost, [1, 0; 0, 1]) 186s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 186s y = ["a"; "a"; "b"; "b"]; 186s cost = eye (2); 186s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 186s assert (class (a), "ClassificationKNN") 186s assert (a.Cost, [1, 0; 0, 1]) 186s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 186s assert ({a.BucketSize}, {50}) 186s ***** test 186s x = [1, 2; 3, 4; 5,6; 5, 8]; 186s y = {'9'; '9'; '6'; '7'}; 186s a = ClassificationKNN (x, y); 186s assert (a.Prior, [0.5; 0.25; 0.25]) 186s ***** test 186s load fisheriris 186s x = meas; 186s y = species; 186s ClassNames = {'setosa', 'versicolor', 'virginica'}; 186s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 186s assert (a.ClassNames, ClassNames') 186s ***** error ClassificationKNN () 186s ***** error ... 186s ClassificationKNN (ones(4, 1)) 186s ***** error ... 186s ClassificationKNN (ones (4,2), ones (1,4)) 186s ***** error ... 186s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 186s ***** error ... 186s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 186s ***** error ... 186s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 186s ***** error ... 186s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 186s ***** error ... 186s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 186s ***** error ... 186s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 186s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 186s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 186s ***** error ... 186s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 186s ***** error ... 186s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 186s ***** error ... 186s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 186s ***** shared x, y 186s load fisheriris 186s x = meas; 186s y = species; 186s ***** test 186s xc = [min(x); mean(x); max(x)]; 186s obj = fitcknn (x, y, "NumNeighbors", 5); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"; "versicolor"; "virginica"}) 186s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 186s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 186s ***** test 186s xc = [min(x); mean(x); max(x)]; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"; "versicolor"; "virginica"}) 186s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 186s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 186s ***** test 186s xc = [min(x); mean(x); max(x)]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 186s [l, s, c] = predict (obj, xc); 186s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 186s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 186s ***** test 186s xc = [min(x); mean(x); max(x)]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"; "versicolor"; "virginica"}) 186s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 186s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 186s ***** test 186s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 186s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 186s obj = fitcknn (x, y, "NumNeighbors", 5); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 186s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 186s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 5); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 0.6, 0.4], 1e-4) 186s assert (c, [1, 0.4, 0.6], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 0.5, 0.5], 1e-4) 186s assert (c, [1, 0.5, 0.5], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"}) 186s assert (s, [0.9, 0.1, 0], 1e-4) 186s assert (c, [0.1, 0.9, 1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 186s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"}) 186s assert (s, [0.8, 0.2, 0], 1e-4) 186s assert (c, [0.2, 0.8, 1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 1, 0], 1e-4) 186s assert (c, [1, 0, 1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 0.7, 0.3], 1e-4) 186s assert (c, [1, 0.3, 0.7], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 0.6, 0.4], 1e-4) 186s assert (c, [1, 0.4, 0.6], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"virginica"}) 186s assert (s, [0, 0.1, 0.9], 1e-4) 186s assert (c, [1, 0.9, 0.1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"virginica"}) 186s assert (s, [0, 0.1, 0.9], 1e-4) 186s assert (c, [1, 0.9, 0.1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"versicolor"}) 186s assert (s, [0, 1, 0], 1e-4) 186s assert (c, [1, 0, 1], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"}) 186s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 186s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 186s ***** test 186s xc = [5, 3, 5, 1.45]; 186s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 186s [l, s, c] = predict (obj, xc); 186s assert (l, {"setosa"}) 186s assert (s, [0.8, 0.2, 0], 1e-4) 186s assert (c, [0.2, 0.8, 1], 1e-4) 187s ***** test 187s xc = [min(x); mean(x); max(x)]; 187s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 187s [l, s, c] = predict (obj, xc); 187s assert (l, {"setosa"; "versicolor"; "virginica"}) 187s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 187s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 187s ***** test 187s xc = [min(x); mean(x); max(x)]; 187s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 187s [l, s, c] = predict (obj, xc); 187s assert (l, {"setosa";"setosa";"setosa"}) 187s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 187s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 187s ***** error ... 187s predict (ClassificationKNN (ones (4,2), ones (4,1))) 187s ***** error ... 187s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 187s ***** error ... 187s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 187s ***** test 187s load fisheriris 187s model = fitcknn (meas, species, 'NumNeighbors', 5); 187s X = mean (meas); 187s Y = {'versicolor'}; 187s L = loss (model, X, Y); 187s assert (L, 0) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = {'A'; 'B'; 'A'}; 187s model = fitcknn (X, Y); 187s X_test = [1, 6; 3, 3]; 187s Y_test = {'A'; 'B'}; 187s L = loss (model, X_test, Y_test); 187s assert (abs (L - 0.6667) > 1e-5) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = {'A'; 'B'; 'A'}; 187s model = fitcknn (X, Y); 187s X_with_nan = [1, 2; NaN, 4]; 187s Y_test = {'A'; 'B'}; 187s L = loss (model, X_with_nan, Y_test); 187s assert (abs (L - 0.3333) < 1e-4) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = {'A'; 'B'; 'A'}; 187s model = fitcknn (X, Y); 187s X_with_nan = [1, 2; NaN, 4]; 187s Y_test = {'A'; 'B'}; 187s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 187s assert (isnan (L)) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = {'A'; 'B'; 'A'}; 187s model = fitcknn (X, Y); 187s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 187s L = loss (model, X, Y, 'LossFun', customLossFun); 187s assert (L, 0) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = [1; 2; 1]; 187s model = fitcknn (X, Y); 187s L = loss (model, X, Y, 'LossFun', 'classiferror'); 187s assert (L, 0) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = [true; false; true]; 187s model = fitcknn (X, Y); 187s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 187s assert (abs (L - 0.1269) < 1e-4) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = ['1'; '2'; '1']; 187s model = fitcknn (X, Y); 187s L = loss (model, X, Y, 'LossFun', 'classiferror'); 187s assert (L, 0) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = ['1'; '2'; '3']; 187s model = fitcknn (X, Y); 187s X_test = [3, 3]; 187s Y_test = ['1']; 187s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 187s assert (L, 1) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = ['1'; '2'; '3']; 187s model = fitcknn (X, Y); 187s X_test = [3, 3; 5, 7]; 187s Y_test = ['1'; '2']; 187s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 187s assert (L, 1) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = ['1'; '2'; '3']; 187s model = fitcknn (X, Y); 187s X_test = [3, 3; 5, 7]; 187s Y_test = ['1'; '2']; 187s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 187s assert (L, 1) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = ['1'; '2'; '3']; 187s model = fitcknn (X, Y); 187s X_test = [3, 3; 5, 7]; 187s Y_test = ['1'; '2']; 187s W = [1; 2]; 187s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 187s assert (abs (L - 0.6931) < 1e-4) 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1))) 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 187s ***** error ... 187s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 187s ***** error ... 187s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 187s ones (4,1), 'LossFun') 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 187s ones (4,1), 'LossFun', 'a') 187s ***** error ... 187s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 187s ones (4,1), 'Weights', 'w') 187s ***** test 187s load fisheriris 187s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 187s X = mean (meas); 187s Y = {'versicolor'}; 187s m = margin (mdl, X, Y); 187s assert (m, 1) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = [1; 2; 3]; 187s mdl = fitcknn (X, Y); 187s m = margin (mdl, X, Y); 187s assert (m, [1; 1; 1]) 187s ***** test 187s X = [7, 8; 9, 10]; 187s Y = ['1'; '2']; 187s mdl = fitcknn (X, Y); 187s m = margin (mdl, X, Y); 187s assert (m, [1; 1]) 187s ***** test 187s X = [11, 12]; 187s Y = {'1'}; 187s mdl = fitcknn (X, Y); 187s m = margin (mdl, X, Y); 187s assert (isnan (m)) 187s ***** test 187s X = [1, 2; 3, 4; 5, 6]; 187s Y = [1; 2; 3]; 187s mdl = fitcknn (X, Y); 187s X1 = [15, 16]; 187s Y1 = [1]; 187s m = margin (mdl, X1, Y1); 187s assert (m, -1) 187s ***** error ... 187s margin (ClassificationKNN (ones (4,2), ones (4,1))) 187s ***** error ... 187s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 187s ***** error ... 187s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 187s ***** error ... 187s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 187s ***** error ... 187s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 187s ***** shared X, Y, mdl 187s X = [1, 2; 4, 5; 7, 8; 3, 2]; 187s Y = [2; 1; 3; 2]; 187s mdl = fitcknn (X, Y); 187s ***** test 187s Vars = 1; 187s Labels = 2; 187s [pd, x, y] = partialDependence (mdl, Vars, Labels); 187s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000]; 187s assert (pd, pdm) 187s ***** test 187s Vars = 1; 187s Labels = 2; 187s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 187s 'NumObservationsToSample', 5); 187s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 187s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 187s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 187s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 187s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 187s assert (abs (pdm - pd) < 1) 187s ***** test 187s Vars = 1; 187s Labels = 2; 187s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 187s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000]; 187s assert (pd, pdm) 187s ***** test 187s Vars = [1, 2]; 187s Labels = 1; 187s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 187s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 187s queryPoints, 'UseParallel', true); 187s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 187s assert (pd, pdm) 187s ***** test 187s Vars = 1; 187s Labels = [1; 2]; 187s [pd, x, y] = partialDependence (mdl, Vars, Labels); 187s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 187s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 187s 0.5000, 0.5000, 0.5000]; 187s assert (pd, pdm) 188s ***** test 188s Vars = [1, 2]; 188s Labels = [1; 2]; 188s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 188s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 188s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 188s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 188s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 188s assert (pd, pdm) 188s ***** test 188s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 188s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 188s X = [X1, double(X2)]; 188s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 188s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 188s Vars = 1; 188s Labels = 1; 188s [pd, x, y] = partialDependence (mdl, Vars, Labels); 188s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 188s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 188s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 188s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 188s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 188s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 188s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 188s 0.7500, 0.7500, 0.7500]; 188s assert (pd, pdm) 188s ***** test 188s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 188s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 188s X = [X1, double(X2)]; 188s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 188s predictorNames = {'Feature1', 'Feature2'}; 188s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 188s Vars = 'Feature1'; 188s Labels = 1; 188s [pd, x, y] = partialDependence (mdl, Vars, Labels); 188s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 188s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 188s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 188s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 188s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 188s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 188s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 188s 0.7500, 0.7500, 0.7500]; 188s assert (pd, pdm) 188s ***** test 188s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 188s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 188s X = [X1, double(X2)]; 188s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 188s predictorNames = {'Feature1', 'Feature2'}; 188s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 188s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 188s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 188s new_X = [new_X1, double(new_X2)]; 188s Vars = 'Feature1'; 188s Labels = 1; 188s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 188s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 188s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 188s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 188s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 188s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 188s 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]; 188s assert (pd, pdm) 189s ***** error ... 189s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 189s ***** error ... 189s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 189s ***** error ... 189s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 189s ones (4,1), 'NumObservationsToSample') 189s ***** error ... 189s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 189s ones (4,1), 2) 189s ***** shared x, y, obj 189s load fisheriris 189s x = meas; 189s y = species; 189s covMatrix = cov (x); 189s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 189s 'mahalanobis', 'Cov', covMatrix); 189s ***** test 189s CVMdl = crossval (obj); 189s assert (class (CVMdl), "ClassificationPartitionedModel") 189s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 189s assert (CVMdl.KFold == 10) 189s assert (CVMdl.ModelParameters.NumNeighbors == 5) 189s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 189s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 189s assert (!CVMdl.ModelParameters.Standardize) 189s ***** test 189s CVMdl = crossval (obj, "KFold", 5); 189s assert (class (CVMdl), "ClassificationPartitionedModel") 189s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 189s assert (CVMdl.KFold == 5) 189s assert (CVMdl.ModelParameters.NumNeighbors == 5) 189s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 189s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 189s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 189s ***** test 189s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 189s CVMdl = crossval (obj, "HoldOut", 0.2); 189s assert (class (CVMdl), "ClassificationPartitionedModel") 189s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 189s assert (CVMdl.ModelParameters.NumNeighbors == 5) 189s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 189s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 189s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 189s ***** test 189s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 189s CVMdl = crossval (obj, "LeaveOut", 'on'); 189s assert (class (CVMdl), "ClassificationPartitionedModel") 189s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 189s assert (CVMdl.ModelParameters.NumNeighbors == 10) 189s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 189s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 189s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 189s ***** test 189s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 189s partition = cvpartition (y, 'KFold', 3); 189s CVMdl = crossval (obj, 'cvPartition', partition); 189s assert (class (CVMdl), "ClassificationPartitionedModel") 189s assert (CVMdl.KFold == 3) 189s assert (CVMdl.ModelParameters.NumNeighbors == 10) 189s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 189s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 189s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 189s ***** error ... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 189s ***** error... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 189s ***** error ... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 189s ***** error ... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 189s ***** error ... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 189s ***** error ... 189s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 189s 162 tests, 162 passed, 0 known failure, 0 skipped 189s [inst/Classification/ClassificationDiscriminant.m] 189s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationDiscriminant.m 189s ***** demo 189s ## Create discriminant classifier 189s ## Evaluate some model predictions on new data. 189s 189s load fisheriris 189s x = meas; 189s y = species; 189s xc = [min(x); mean(x); max(x)]; 189s obj = fitcdiscr (x, y); 189s [label, score, cost] = predict (obj, xc); 189s ***** demo 189s load fisheriris 189s model = fitcdiscr (meas, species); 189s X = mean (meas); 189s Y = {'versicolor'}; 189s ## Compute loss for discriminant model 189s L = loss (model, X, Y) 189s ***** demo 189s load fisheriris 189s mdl = fitcdiscr (meas, species); 189s X = mean (meas); 189s Y = {'versicolor'}; 189s ## Margin for discriminant model 189s m = margin (mdl, X, Y) 189s ***** demo 189s load fisheriris 189s x = meas; 189s y = species; 189s obj = fitcdiscr (x, y, "gamma", 0.4); 189s ## Cross-validation for discriminant model 189s CVMdl = crossval (obj) 189s ***** test 189s load fisheriris 189s x = meas; 189s y = species; 189s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 189s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 189s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 189s 0.092721, 0.115388, 0.055244, 0.032710; ... 189s 0.167514, 0.055244, 0.185188, 0.042665; ... 189s 0.038401, 0.032710, 0.042665, 0.041882]; 189s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 189s 5.9360, 2.7700, 4.2600, 1.3260; ... 189s 6.5880, 2.9740, 5.5520, 2.0260]; 189s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 189s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 189s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 189s assert (class (Mdl), "ClassificationDiscriminant"); 189s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 189s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 189s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 189s assert (Mdl.ClassNames, unique (species)) 189s assert (Mdl.Sigma, sigma, 1e-6) 189s assert (Mdl.Mu, mu, 1e-14) 189s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 189s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 189s assert (Mdl.PredictorNames, PredictorNames) 189s ***** test 189s load fisheriris 189s x = meas; 189s y = species; 189s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 189s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 189s 0.046361, 0.115388, 0.027622, 0.016355; ... 189s 0.083757, 0.027622, 0.185188, 0.021333; ... 189s 0.019201, 0.016355, 0.021333, 0.041882]; 189s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 189s 5.9360, 2.7700, 4.2600, 1.3260; ... 189s 6.5880, 2.9740, 5.5520, 2.0260]; 189s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 189s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 189s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 189s assert (class (Mdl), "ClassificationDiscriminant"); 189s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 189s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 189s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 189s assert (Mdl.ClassNames, unique (species)) 189s assert (Mdl.Sigma, sigma, 1e-6) 189s assert (Mdl.Mu, mu, 1e-14) 189s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 189s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 189s ***** shared X, Y, MODEL 189s X = rand (10,2); 189s Y = [ones(5,1);2*ones(5,1)]; 189s MODEL = ClassificationDiscriminant (X, Y); 189s ***** error ClassificationDiscriminant () 189s ***** error ... 189s ClassificationDiscriminant (ones(4, 1)) 189s ***** error ... 189s ClassificationDiscriminant (ones (4,2), ones (1,4)) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "ResponseName", 1) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 189s ***** error ... 189s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 189s ***** error ... 189s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 189s ***** error ... 189s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 189s ***** error ... 189s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "Cost", "string") 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 189s ***** error ... 189s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 189s ***** error ... 189s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 189s ***** error ... 189s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 189s ***** error ... 189s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 189s ***** error ... 189s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 189s ***** test 189s load fisheriris 189s x = meas; 189s y = species; 189s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 189s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 189s assert (label, {'versicolor'}) 189s assert (score, [0, 0.9999, 0.0001], 1e-4) 189s assert (cost, [1, 0.0001, 0.9999], 1e-4) 189s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 189s assert (label, {'versicolor'}) 189s assert (score, [0, 0.6368, 0.3632], 1e-4) 189s assert (cost, [1, 0.3632, 0.6368], 1e-4) 189s ***** test 189s load fisheriris 189s x = meas; 189s y = species; 189s xc = [min(x); mean(x); max(x)]; 189s Mdl = fitcdiscr (x, y); 189s [label, score, cost] = predict (Mdl, xc); 189s l = {'setosa'; 'versicolor'; 'virginica'}; 189s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 189s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 189s assert (label, l) 189s assert (score, s, 1e-4) 189s assert (cost, c, 1e-4) 189s ***** error ... 189s predict (MODEL) 189s ***** error ... 189s predict (MODEL, []) 189s ***** error ... 189s predict (MODEL, 1) 189s ***** test 189s load fisheriris 189s model = fitcdiscr (meas, species); 189s x = mean (meas); 189s y = {'versicolor'}; 189s L = loss (model, x, y); 189s assert (L, 0) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6]; 189s y = {'A'; 'B'; 'A'}; 189s model = fitcdiscr (x, y, "Gamma", 0.4); 189s x_test = [1, 6; 3, 3]; 189s y_test = {'A'; 'B'}; 189s L = loss (model, x_test, y_test); 189s assert (L, 0.3333, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6; 7, 8]; 189s y = ['1'; '2'; '3'; '1']; 189s model = fitcdiscr (x, y, "gamma" , 0.5); 189s x_test = [3, 3]; 189s y_test = ['1']; 189s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 189s assert (L, 0.2423, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6; 7, 8]; 189s y = ['1'; '2'; '3'; '1']; 189s model = fitcdiscr (x, y, "gamma" , 0.5); 189s x_test = [3, 3; 5, 7]; 189s y_test = ['1'; '2']; 189s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 189s assert (L, 0.3333, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6; 7, 8]; 189s y = ['1'; '2'; '3'; '1']; 189s model = fitcdiscr (x, y, "gamma" , 0.5); 189s x_test = [3, 3; 5, 7]; 189s y_test = ['1'; '2']; 189s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 189s assert (L, 0.5886, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6; 7, 8]; 189s y = ['1'; '2'; '3'; '1']; 189s model = fitcdiscr (x, y, "gamma" , 0.5); 189s x_test = [3, 3; 5, 7]; 189s y_test = ['1'; '2']; 189s W = [1; 2]; 189s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 189s assert (L, 0.5107, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6]; 189s y = {'A'; 'B'; 'A'}; 189s model = fitcdiscr (x, y, "gamma" , 0.5); 189s x_with_nan = [1, 2; NaN, 4]; 189s y_test = {'A'; 'B'}; 189s L = loss (model, x_with_nan, y_test); 189s assert (L, 0.3333, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6]; 189s y = {'A'; 'B'; 'A'}; 189s model = fitcdiscr (x, y); 189s x_with_nan = [1, 2; NaN, 4]; 189s y_test = {'A'; 'B'}; 189s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 189s assert (isnan (L)) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6]; 189s y = {'A'; 'B'; 'A'}; 189s model = fitcdiscr (x, y); 189s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 189s L = loss (model, x, y, 'LossFun', customLossFun); 189s assert (L, 0.8889, 1e-4) 189s ***** test 189s x = [1, 2; 3, 4; 5, 6]; 189s y = [1; 2; 1]; 189s model = fitcdiscr (x, y); 189s L = loss (model, x, y, 'LossFun', 'classiferror'); 189s assert (L, 0.3333, 1e-4) 189s ***** error ... 189s loss (MODEL) 189s ***** error ... 189s loss (MODEL, ones (4,2)) 189s ***** error ... 189s loss (MODEL, [], zeros (2)) 189s ***** error ... 189s loss (MODEL, 1, zeros (2)) 189s ***** error ... 189s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 189s ***** error ... 189s loss (MODEL, ones (4,2), ones (3,1)) 189s ***** error ... 189s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 189s ***** error ... 189s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 189s load fisheriris 189s mdl = fitcdiscr (meas, species); 189s X = mean (meas); 189s Y = {'versicolor'}; 189s m = margin (mdl, X, Y); 189s assert (m, 1, 1e-6) 189s ***** test 189s X = [1, 2; 3, 4; 5, 6]; 189s Y = [1; 2; 1]; 189s mdl = fitcdiscr (X, Y, "gamma", 0.5); 189s m = margin (mdl, X, Y); 189s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 190s ***** error ... 190s margin (MODEL) 190s ***** error ... 190s margin (MODEL, ones (4,2)) 190s ***** error ... 190s margin (MODEL, [], zeros (2)) 190s ***** error ... 190s margin (MODEL, 1, zeros (2)) 190s ***** error ... 190s margin (MODEL, ones (4,2), ones (3,1)) 190s ***** shared x, y, obj 190s load fisheriris 190s x = meas; 190s y = species; 190s obj = fitcdiscr (x, y, "gamma", 0.4); 190s ***** test 190s CVMdl = crossval (obj); 190s assert (class (CVMdl), "ClassificationPartitionedModel") 190s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 190s assert (CVMdl.KFold == 10) 190s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 190s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 190s ***** test 190s CVMdl = crossval (obj, "KFold", 3); 190s assert (class (CVMdl), "ClassificationPartitionedModel") 190s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 190s assert (CVMdl.KFold == 3) 190s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 190s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 190s ***** test 190s CVMdl = crossval (obj, "HoldOut", 0.2); 190s assert (class (CVMdl), "ClassificationPartitionedModel") 190s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 190s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 190s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 190s ***** test 190s CVMdl = crossval (obj, "LeaveOut", 'on'); 190s assert (class (CVMdl), "ClassificationPartitionedModel") 190s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 190s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 190s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 191s ***** test 191s partition = cvpartition (y, 'KFold', 3); 191s CVMdl = crossval (obj, 'cvPartition', partition); 191s assert (class (CVMdl), "ClassificationPartitionedModel") 191s assert (CVMdl.KFold == 3) 191s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 191s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 191s ***** error ... 191s crossval (obj, "kfold") 191s ***** error... 191s crossval (obj, "kfold", 12, "holdout", 0.2) 191s ***** error ... 191s crossval (obj, "kfold", 'a') 191s ***** error ... 191s crossval (obj, "holdout", 2) 191s ***** error ... 191s crossval (obj, "leaveout", 1) 191s ***** error ... 191s crossval (obj, "cvpartition", 1) 191s 65 tests, 65 passed, 0 known failure, 0 skipped 191s [inst/Classification/ClassificationSVM.m] 191s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationSVM.m 191s ***** demo 191s ## Create a Support Vector Machine classifier and determine margin for test 191s ## data. 191s load fisheriris 191s rng(1); ## For reproducibility 191s 191s ## Select indices of the non-setosa species 191s inds = !strcmp(species, 'setosa'); 191s 191s ## Select features and labels for non-setosa species 191s X = meas(inds, 3:4); 191s Y = grp2idx(species(inds)); 191s 191s ## Convert labels to +1 and -1 191s unique_classes = unique(Y); 191s Y(Y == unique_classes(1)) = -1; 191s Y(Y == unique_classes(2)) = 1; 191s 191s ## Partition data for training and testing 191s cv = cvpartition(Y, 'HoldOut', 0.15); 191s X_train = X(training(cv), :); 191s Y_train = Y(training(cv)); 191s X_test = X(test(cv), :); 191s Y_test = Y(test(cv)); 191s 191s ## Train the SVM model 191s CVSVMModel = fitcsvm(X_train, Y_train); 191s 191s ## Calculate margins 191s m = margin(CVSVMModel, X_test, Y_test); 191s disp(m); 191s ***** demo 191s ## Create a Support Vector Machine classifier and determine loss for test 191s ## data. 191s load fisheriris 191s rng(1); ## For reproducibility 191s 191s ## Select indices of the non-setosa species 191s inds = !strcmp(species, 'setosa'); 191s 191s ## Select features and labels for non-setosa species 191s X = meas(inds, 3:4); 191s Y = grp2idx(species(inds)); 191s 191s ## Convert labels to +1 and -1 191s unique_classes = unique(Y); 191s Y(Y == unique_classes(1)) = -1; 191s Y(Y == unique_classes(2)) = 1; 191s 191s ## Randomly partition the data into training and testing sets 191s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 191s 191s X_train = X(training(cv), :); 191s Y_train = Y(training(cv)); 191s 191s X_test = X(test(cv), :); 191s Y_test = Y(test(cv)); 191s 191s ## Train the SVM model 191s SVMModel = fitcsvm(X_train, Y_train); 191s 191s ## Calculate loss 191s 191s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 191s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 191s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 191s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 191s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 191s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 191s ***** test 191s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 191s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 191s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 191s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 191s assert (class (a), "ClassificationSVM"); 191s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 191s assert ({a.X, a.Y}, {x, y}) 191s assert (a.NumObservations, 5) 191s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 191s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 191s ***** test 191s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 191s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 191s a = ClassificationSVM (x, y); 191s assert (class (a), "ClassificationSVM"); 191s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 191s assert (a.ModelParameters.BoxConstraint, 1) 191s assert (a.ClassNames, [1; -1]) 191s assert (a.ModelParameters.KernelOffset, 0) 191s ***** test 191s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 191s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 191s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 191s "KernelOffset", 2); 191s assert (class (a), "ClassificationSVM"); 191s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 191s assert (a.ModelParameters.BoxConstraint, 2) 191s assert (a.ModelParameters.KernelOffset, 2) 191s ***** test 191s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 191s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 191s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 191s "PolynomialOrder", 3); 191s assert (class (a), "ClassificationSVM"); 191s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 191s assert (a.ModelParameters.PolynomialOrder, 3) 191s ***** error ClassificationSVM () 191s ***** error ... 191s ClassificationSVM (ones(10,2)) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (5,1)) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 191s ***** error ... 191s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 191s ***** error ... 191s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 191s ***** error ... 191s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 191s ***** error ... 191s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 191s ***** error ... 191s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 191s ***** error ... 191s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 191s ***** error ... 191s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 191s ***** error ... 191s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 191s ***** shared x, y, x_train, x_test, y_train, y_test, objST 191s load fisheriris 191s inds = ! strcmp (species, 'setosa'); 191s x = meas(inds, 3:4); 191s y = grp2idx (species(inds)); 191s ***** test 191s xc = [min(x); mean(x); max(x)]; 191s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 191s assert (isempty (obj.Alpha), true) 191s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 191s [label, score] = predict (obj, xc); 191s assert (label, [1; 2; 2]); 191s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 191s assert (score(:,1), -score(:,2), eps) 191s obj = fitPosterior (obj); 191s [label, probs] = predict (obj, xc); 191s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 1e-5); 191s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 191s ***** test 191s obj = fitcsvm (x, y); 191s assert (isempty (obj.Beta), true) 191s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 191s assert (numel (obj.Alpha), 24) 191s assert (obj.Bias, -14.415, 1e-3) 191s xc = [min(x); mean(x); max(x)]; 191s label = predict (obj, xc); 191s assert (label, [1; 2; 2]); 191s ***** error ... 191s predict (ClassificationSVM (ones (40,2), ones (40,1))) 191s ***** error ... 191s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 191s ***** error ... 191s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 191s ***** test 191s objST = fitcsvm (x, y); 191s objST.ScoreTransform = "a"; 191s ***** error ... 191s [labels, scores] = predict (objST, x); 191s ***** error ... 191s [labels, scores] = resubPredict (objST); 191s ***** test 191s rand ("seed", 1); 191s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 191s 'Tolerance', 1e-7); 191s obj = CVSVMModel.Trained{1}; 191s testInds = test (CVSVMModel.Partition); 191s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 191s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 191s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 191s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 191s assert (computed_margin, expected_margin, 1e-4); 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 191s ***** error ... 191s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 191s ***** test 191s rand ("seed", 1); 191s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 191s obj = CVSVMModel.Trained{1}; 191s testInds = test (CVSVMModel.Partition); 191s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 191s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 191s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 191s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 191s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 191s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 191s assert (L1, 2.8711, 1e-4); 191s assert (L2, 0.5333, 1e-4); 191s assert (L3, 10.9685, 1e-4); 191s assert (L4, 1.9827, 1e-4); 191s assert (L5, 1.5849, 1e-4); 191s assert (L6, 7.6739, 1e-4); 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones(2,1), "LossFun") 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "LossFun", 1) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "LossFun", "some") 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "Weights", ['a','b']) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "Weights", 'a') 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "Weights", [1,2,3]) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "Weights", 3) 191s ***** error ... 191s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 191s ones (2,1), "some", "some") 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 191s ***** error ... 191s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 191s ***** test 191s SVMModel = fitcsvm (x, y); 191s CVMdl = crossval (SVMModel, "KFold", 5); 191s assert (class (CVMdl), "ClassificationPartitionedModel") 191s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 191s assert (CVMdl.KFold == 5) 191s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 191s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 191s ***** test 191s obj = fitcsvm (x, y); 191s CVMdl = crossval (obj, "HoldOut", 0.2); 191s assert (class (CVMdl), "ClassificationPartitionedModel") 191s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 191s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 191s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 191s ***** test 191s obj = fitcsvm (x, y); 191s CVMdl = crossval (obj, "LeaveOut", 'on'); 191s assert (class (CVMdl), "ClassificationPartitionedModel") 191s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 191s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 191s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 191s ***** error ... 191s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 191s ***** error ... 191s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 191s "KFold", 5, "leaveout", 'on') 191s ***** error ... 191s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 191s ***** error ... 191s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 192s ***** error ... 192s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 192s 114 tests, 114 passed, 0 known failure, 0 skipped 192s [inst/Classification/ClassificationGAM.m] 192s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationGAM.m 192s ***** demo 192s ## Train a GAM classifier for binary classification 192s ## using specific data and plot the decision boundaries. 192s 192s ## Define specific data 192s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 192s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 192s Y = [0; 0; 0; 0; 0; ... 192s 1; 1; 1; 1; 1]; 192s 192s ## Train the GAM model 192s obj = fitcgam (X, Y, "Interactions", "all") 192s 192s ## Create a grid of values for prediction 192s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 192s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 192s [x1G, x2G] = meshgrid (x1, x2); 192s XGrid = [x1G(:), x2G(:)]; 192s [labels, score] = predict (obj, XGrid); 192s ***** test 192s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 192s y = [0; 0; 1; 1]; 192s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 192s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 192s assert (class (a), "ClassificationGAM"); 192s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 192s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 192s assert (a.ClassNames, {'0'; '1'}) 192s assert (a.PredictorNames, PredictorNames) 192s assert (a.BaseModel.Intercept, 0) 192s ***** test 192s load fisheriris 192s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 192s X = meas(inds, :); 192s Y = species(inds, :)'; 192s Y = strcmp (Y, 'virginica')'; 192s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 192s assert (class (a), "ClassificationGAM"); 192s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 192s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 192s assert (a.ClassNames, {'0'; '1'}) 192s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 192s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 192s assert (a.ModelwInt.Intercept, 0) 195s ***** test 195s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 195s Y = [0; 1; 0; 1; 1]; 195s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 195s assert (class (a), "ClassificationGAM"); 195s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 195s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 195s assert (a.ClassNames, {'0'; '1'}) 195s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 195s assert (a.Knots, [4, 4, 4]) 195s assert (a.Order, [3, 3, 3]) 195s assert (a.DoF, [7, 7, 7]) 195s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 196s ***** error ClassificationGAM () 196s ***** error ... 196s ClassificationGAM (ones(4, 1)) 196s ***** error ... 196s ClassificationGAM (ones (4,2), ones (1,4)) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 196s ***** error ... 196s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 196s ***** error ... 196s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 196s ***** error ... 196s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 196s ***** error ... 196s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 196s ***** error ... 196s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 196s ***** error ... 196s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 196s ***** test 196s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 196s y = [1; 0; 1; 0; 1]; 196s a = ClassificationGAM (x, y, "interactions", "all"); 196s l = {'0'; '0'; '0'; '0'; '0'}; 196s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 196s 0.4259, 0.5741; 0.3760, 0.6240]; 196s [labels, scores] = predict (a, x); 196s assert (class (a), "ClassificationGAM"); 196s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 196s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 196s assert (a.ClassNames, {'1'; '0'}) 196s assert (a.PredictorNames, {'x1', 'x2'}) 196s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 196s assert (labels, l) 196s assert (scores, s, 1e-1) 198s ***** test 198s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 198s y = [0; 0; 1; 1]; 198s interactions = [false, true, false; true, false, true; false, true, false]; 198s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 198s [label, score] = predict (a, x, "includeinteractions", true); 198s l = {'0'; '0'; '1'; '1'}; 198s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 198s assert (class (a), "ClassificationGAM"); 198s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 198s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 198s assert (a.ClassNames, {'0'; '1'}) 198s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 198s assert (a.ModelwInt.Intercept, 0) 198s assert (label, l) 198s assert (score, s, 1e-1) 200s ***** error ... 200s predict (ClassificationGAM (ones (4,2), ones (4,1))) 200s ***** error ... 200s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 201s ***** error ... 201s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 201s ***** shared x, y, obj 201s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 201s y = [0; 0; 1; 1]; 201s obj = fitcgam (x, y); 202s ***** test 202s CVMdl = crossval (obj); 202s assert (class (CVMdl), "ClassificationPartitionedModel") 202s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 202s assert (CVMdl.KFold == 10) 202s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 202s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 209s ***** test 209s CVMdl = crossval (obj, "KFold", 5); 209s assert (class (CVMdl), "ClassificationPartitionedModel") 209s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 209s assert (CVMdl.KFold == 5) 209s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 209s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 213s ***** test 213s CVMdl = crossval (obj, "HoldOut", 0.2); 213s assert (class (CVMdl), "ClassificationPartitionedModel") 213s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 213s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 213s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 214s ***** test 214s partition = cvpartition (y, 'KFold', 3); 214s CVMdl = crossval (obj, 'cvPartition', partition); 214s assert (class (CVMdl), "ClassificationPartitionedModel") 214s assert (CVMdl.KFold == 3) 214s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 214s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 216s ***** error ... 216s crossval (obj, "kfold") 216s ***** error... 216s crossval (obj, "kfold", 12, "holdout", 0.2) 216s ***** error ... 216s crossval (obj, "kfold", 'a') 216s ***** error ... 216s crossval (obj, "holdout", 2) 216s ***** error ... 216s crossval (obj, "leaveout", 1) 216s ***** error ... 216s crossval (obj, "cvpartition", 1) 216s 34 tests, 34 passed, 0 known failure, 0 skipped 216s [inst/Classification/CompactClassificationNeuralNetwork.m] 216s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/CompactClassificationNeuralNetwork.m 216s ***** demo 216s ## Create a neural network classifier and its compact version 216s # and compare their size 216s 216s load fisheriris 216s X = meas; 216s Y = species; 216s 216s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 216s CMdl = crossval (Mdl); 216s 216s whos ('Mdl', 'CMdl') 216s ***** error ... 216s CompactClassificationDiscriminant (1) 216s 1 test, 1 passed, 0 known failure, 0 skipped 216s [inst/Classification/CompactClassificationGAM.m] 216s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/CompactClassificationGAM.m 216s ***** demo 216s ## Create a generalized additive model classifier and its compact version 216s # and compare their size 216s 216s load fisheriris 216s X = meas; 216s Y = species; 216s 216s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 216s CMdl = crossval (Mdl); 216s 216s whos ('Mdl', 'CMdl') 216s ***** test 216s Mdl = CompactClassificationGAM (); 216s assert (class (Mdl), "CompactClassificationGAM") 216s ***** test 216s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 216s y = [0; 0; 1; 1]; 216s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 216s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 216s CMdl = compact (Mdl); 216s assert (class (CMdl), "CompactClassificationGAM"); 216s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 216s assert (CMdl.ClassNames, {'0'; '1'}) 216s assert (CMdl.PredictorNames, PredictorNames) 216s assert (CMdl.BaseModel.Intercept, 0) 217s ***** test 217s load fisheriris 217s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 217s X = meas(inds, :); 217s Y = species(inds, :)'; 217s Y = strcmp (Y, 'virginica')'; 217s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 217s CMdl = compact (Mdl); 217s assert (class (CMdl), "CompactClassificationGAM"); 217s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 217s assert (CMdl.ClassNames, {'0'; '1'}) 217s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 217s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 217s assert (CMdl.ModelwInt.Intercept, 0) 220s ***** test 220s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 220s Y = [0; 1; 0; 1; 1]; 220s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 220s CMdl = compact (Mdl); 220s assert (class (CMdl), "CompactClassificationGAM"); 220s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 220s assert (CMdl.ClassNames, {'0'; '1'}) 220s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 220s assert (CMdl.Knots, [4, 4, 4]) 220s assert (CMdl.Order, [3, 3, 3]) 220s assert (CMdl.DoF, [7, 7, 7]) 220s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 221s ***** error ... 221s CompactClassificationGAM (1) 221s ***** test 221s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 221s y = [1; 0; 1; 0; 1]; 221s Mdl = fitcgam (x, y, "interactions", "all"); 221s CMdl = compact (Mdl); 221s l = {'0'; '0'; '0'; '0'; '0'}; 221s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 221s 0.4259, 0.5741; 0.3760, 0.6240]; 221s [labels, scores] = predict (CMdl, x); 221s assert (class (CMdl), "CompactClassificationGAM"); 221s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 221s assert (CMdl.ClassNames, {'1'; '0'}) 221s assert (CMdl.PredictorNames, {'x1', 'x2'}) 221s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 221s assert (labels, l) 221s assert (scores, s, 1e-1) 222s ***** test 222s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 222s y = [0; 0; 1; 1]; 222s interactions = [false, true, false; true, false, true; false, true, false]; 222s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 222s CMdl = compact (Mdl); 222s [label, score] = predict (CMdl, x, "includeinteractions", true); 222s l = {'0'; '0'; '1'; '1'}; 222s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 222s assert (class (CMdl), "CompactClassificationGAM"); 222s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 222s assert (CMdl.ClassNames, {'0'; '1'}) 222s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 222s assert (CMdl.ModelwInt.Intercept, 0) 222s assert (label, l) 222s assert (score, s, 1e-1) 224s ***** shared CMdl 224s Mdl = fitcgam (ones (4,2), ones (4,1)); 224s CMdl = compact (Mdl); 225s ***** error ... 225s predict (CMdl) 225s ***** error ... 225s predict (CMdl, []) 225s ***** error ... 225s predict (CMdl, 1) 225s 10 tests, 10 passed, 0 known failure, 0 skipped 225s [inst/Classification/CompactClassificationDiscriminant.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/CompactClassificationDiscriminant.m 225s ***** demo 225s ## Create a discriminant analysis classifier and its compact version 225s # and compare their size 225s 225s load fisheriris 225s X = meas; 225s Y = species; 225s 225s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 225s CMdl = crossval (Mdl); 225s 225s whos ('Mdl', 'CMdl') 225s ***** test 225s load fisheriris 225s x = meas; 225s y = species; 225s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 225s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 225s CMdl = compact (Mdl); 225s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 225s 0.092721, 0.115388, 0.055244, 0.032710; ... 225s 0.167514, 0.055244, 0.185188, 0.042665; ... 225s 0.038401, 0.032710, 0.042665, 0.041882]; 225s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 225s 5.9360, 2.7700, 4.2600, 1.3260; ... 225s 6.5880, 2.9740, 5.5520, 2.0260]; 225s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 225s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 225s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 225s assert (class (CMdl), "CompactClassificationDiscriminant"); 225s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 225s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 225s assert (CMdl.ClassNames, unique (species)) 225s assert (CMdl.Sigma, sigma, 1e-6) 225s assert (CMdl.Mu, mu, 1e-14) 225s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 225s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 225s assert (CMdl.PredictorNames, PredictorNames) 225s ***** test 225s load fisheriris 225s x = meas; 225s y = species; 225s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 225s CMdl = compact (Mdl); 225s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 225s 0.046361, 0.115388, 0.027622, 0.016355; ... 225s 0.083757, 0.027622, 0.185188, 0.021333; ... 225s 0.019201, 0.016355, 0.021333, 0.041882]; 225s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 225s 5.9360, 2.7700, 4.2600, 1.3260; ... 225s 6.5880, 2.9740, 5.5520, 2.0260]; 225s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 225s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 225s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 225s assert (class (CMdl), "CompactClassificationDiscriminant"); 225s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 225s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 225s assert (CMdl.ClassNames, unique (species)) 225s assert (CMdl.Sigma, sigma, 1e-6) 225s assert (CMdl.Mu, mu, 1e-14) 225s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 225s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 225s ***** error ... 225s CompactClassificationDiscriminant (1) 225s ***** test 225s load fisheriris 225s x = meas; 225s y = species; 225s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 225s CMdl = compact (Mdl); 225s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 225s assert (label, {'versicolor'}) 225s assert (score, [0, 0.9999, 0.0001], 1e-4) 225s assert (cost, [1, 0.0001, 0.9999], 1e-4) 225s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 225s assert (label, {'versicolor'}) 225s assert (score, [0, 0.6368, 0.3632], 1e-4) 225s assert (cost, [1, 0.3632, 0.6368], 1e-4) 225s ***** test 225s load fisheriris 225s x = meas; 225s y = species; 225s xc = [min(x); mean(x); max(x)]; 225s Mdl = fitcdiscr (x, y); 225s CMdl = compact (Mdl); 225s [label, score, cost] = predict (CMdl, xc); 225s l = {'setosa'; 'versicolor'; 'virginica'}; 225s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 225s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 225s assert (label, l) 225s assert (score, s, 1e-4) 225s assert (cost, c, 1e-4) 225s ***** shared MODEL 225s X = rand (10,2); 225s Y = [ones(5,1);2*ones(5,1)]; 225s MODEL = compact (ClassificationDiscriminant (X, Y)); 225s ***** error ... 225s predict (MODEL) 225s ***** error ... 225s predict (MODEL, []) 225s ***** error ... 225s predict (MODEL, 1) 225s ***** test 225s load fisheriris 225s model = fitcdiscr (meas, species); 225s x = mean (meas); 225s y = {'versicolor'}; 225s L = loss (model, x, y); 225s assert (L, 0) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6]; 225s y = {'A'; 'B'; 'A'}; 225s model = fitcdiscr (x, y, "Gamma", 0.4); 225s x_test = [1, 6; 3, 3]; 225s y_test = {'A'; 'B'}; 225s L = loss (model, x_test, y_test); 225s assert (L, 0.3333, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6; 7, 8]; 225s y = ['1'; '2'; '3'; '1']; 225s model = fitcdiscr (x, y, "gamma" , 0.5); 225s x_test = [3, 3]; 225s y_test = ['1']; 225s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 225s assert (L, 0.2423, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6; 7, 8]; 225s y = ['1'; '2'; '3'; '1']; 225s model = fitcdiscr (x, y, "gamma" , 0.5); 225s x_test = [3, 3; 5, 7]; 225s y_test = ['1'; '2']; 225s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 225s assert (L, 0.3333, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6; 7, 8]; 225s y = ['1'; '2'; '3'; '1']; 225s model = fitcdiscr (x, y, "gamma" , 0.5); 225s x_test = [3, 3; 5, 7]; 225s y_test = ['1'; '2']; 225s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 225s assert (L, 0.5886, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6; 7, 8]; 225s y = ['1'; '2'; '3'; '1']; 225s model = fitcdiscr (x, y, "gamma" , 0.5); 225s x_test = [3, 3; 5, 7]; 225s y_test = ['1'; '2']; 225s W = [1; 2]; 225s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 225s assert (L, 0.5107, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6]; 225s y = {'A'; 'B'; 'A'}; 225s model = fitcdiscr (x, y, "gamma" , 0.5); 225s x_with_nan = [1, 2; NaN, 4]; 225s y_test = {'A'; 'B'}; 225s L = loss (model, x_with_nan, y_test); 225s assert (L, 0.3333, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6]; 225s y = {'A'; 'B'; 'A'}; 225s model = fitcdiscr (x, y); 225s x_with_nan = [1, 2; NaN, 4]; 225s y_test = {'A'; 'B'}; 225s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 225s assert (isnan (L)) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6]; 225s y = {'A'; 'B'; 'A'}; 225s model = fitcdiscr (x, y); 225s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 225s L = loss (model, x, y, 'LossFun', customLossFun); 225s assert (L, 0.8889, 1e-4) 225s ***** test 225s x = [1, 2; 3, 4; 5, 6]; 225s y = [1; 2; 1]; 225s model = fitcdiscr (x, y); 225s L = loss (model, x, y, 'LossFun', 'classiferror'); 225s assert (L, 0.3333, 1e-4) 225s ***** error ... 225s loss (MODEL) 225s ***** error ... 225s loss (MODEL, ones (4,2)) 225s ***** error ... 225s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 225s ***** error ... 225s loss (MODEL, ones (4,2), ones (3,1)) 225s ***** error ... 225s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 225s ***** error ... 225s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 225s load fisheriris 225s mdl = fitcdiscr (meas, species); 225s X = mean (meas); 225s Y = {'versicolor'}; 225s m = margin (mdl, X, Y); 225s assert (m, 1, 1e-6) 225s ***** test 225s X = [1, 2; 3, 4; 5, 6]; 225s Y = [1; 2; 1]; 225s mdl = fitcdiscr (X, Y, "gamma", 0.5); 225s m = margin (mdl, X, Y); 225s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 225s ***** error ... 225s margin (MODEL) 225s ***** error ... 225s margin (MODEL, ones (4,2)) 225s ***** error ... 225s margin (MODEL, ones (4,2), ones (3,1)) 225s 28 tests, 28 passed, 0 known failure, 0 skipped 225s [inst/Classification/ClassificationNeuralNetwork.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Classification/ClassificationNeuralNetwork.m 225s ***** error ... 225s ClassificationNeuralNetwork () 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2)) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 225s ***** error ... 225s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 225s "Activations", {"sigmoid", "unsupported_type"}) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 225s ***** error ... 225s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 225s ***** error ... 225s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 225s ***** error ... 225s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 225s 35 tests, 35 passed, 0 known failure, 0 skipped 225s [inst/grpstats.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/grpstats.m 225s ***** demo 225s load carsmall; 225s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 225s n = length(m); 225s errorbar((1:n)',m,p(:,2)-m); 225s set (gca, "xtick", 1:n, "xticklabel", g); 225s title ("95% prediction intervals for mean weight by year"); 225s ***** demo 225s load carsmall; 225s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 225s {"mean", "meanci", "gname"}, 0.05) 225s [c,r] = size (m); 225s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 225s set (gca, "xtick", 1:c, "xticklabel", g); 225s title ("95% prediction intervals for mean weight by year"); 225s ***** test 225s load carsmall 225s means = grpstats (Acceleration, Origin); 225s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 225s ***** test 225s load carsmall 225s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 225s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 225s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 225s ***** test 225s load carsmall 225s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 225s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 225s ***** test 225s load carsmall 225s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 225s {"mean", "meanci", "gname"}, 0.05); 225s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 225s [1e-14, 2e-14, 1e-14]'); 225s 4 tests, 4 passed, 0 known failure, 0 skipped 225s [inst/bartlett_test.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/bartlett_test.m 225s ***** error bartlett_test () 225s ***** error ... 225s bartlett_test (1, 2, 3, 4); 225s ***** error bartlett_test (randn (50, 2), 0); 225s ***** error ... 225s bartlett_test (randn (50, 2), [1, 2, 3]); 225s ***** error ... 225s bartlett_test (randn (50, 1), ones (55, 1)); 225s ***** error ... 225s bartlett_test (randn (50, 1), ones (50, 2)); 225s ***** error ... 225s bartlett_test (randn (50, 2), [], 1.2); 225s ***** error ... 225s bartlett_test (randn (50, 2), [], "alpha"); 225s ***** error ... 225s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 225s ***** error ... 225s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 225s ***** warning ... 225s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 225s ***** test 225s load examgrades 225s [h, pval, chisq, df] = bartlett_test (grades); 225s assert (h, 1); 225s assert (pval, 7.908647337018238e-08, 1e-14); 225s assert (chisq, 38.73324, 1e-5); 225s assert (df, 4); 225s ***** test 225s load examgrades 225s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 225s assert (h, 1); 225s assert (pval, 0.01172, 1e-5); 225s assert (chisq, 8.89274, 1e-5); 225s assert (df, 2); 225s ***** test 225s load examgrades 225s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 225s assert (h, 0); 225s assert (pval, 0.88118, 1e-5); 225s assert (chisq, 0.02234, 1e-5); 225s assert (df, 1); 225s ***** test 225s load examgrades 225s grades = [grades; nan(10, 5)]; 225s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 225s assert (h, 0); 225s assert (pval, 0.88118, 1e-5); 225s assert (chisq, 0.02234, 1e-5); 225s assert (df, 1); 225s ***** test 225s load examgrades 225s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 225s assert (h, 0); 225s assert (pval, 0.01791, 1e-5); 225s assert (chisq, 5.60486, 1e-5); 225s assert (df, 1); 225s 16 tests, 16 passed, 0 known failure, 0 skipped 225s [inst/ppplot.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ppplot.m 225s ***** test 225s hf = figure ("visible", "off"); 225s unwind_protect 225s 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]); 225s unwind_protect_cleanup 225s close (hf); 225s end_unwind_protect 225s ***** error ppplot () 225s ***** error ppplot (ones (2,2)) 225s ***** error ppplot (1, 2) 225s ***** error ppplot ([1 2 3 4], 2) 225s 5 tests, 5 passed, 0 known failure, 0 skipped 225s [inst/adtest.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/adtest.m 225s ***** error adtest (); 225s ***** error adtest (ones (20,2)); 225s ***** error adtest ([1+i,0-3i]); 225s ***** error ... 225s adtest (ones (20,1), "Distribution", "normal"); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"norm", 5}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"ev", 5}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", 35); 225s ***** error ... 225s adtest (rand (20,1), "Name", "norm"); 225s ***** error ... 225s adtest (rand (20,1), "Name", {"norm", 75, 10}); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 225s ***** error ... 225s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 225s ***** error ... 225s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 225s "Asymptotic", true); 225s ***** error ... 225s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 225s "Alpha", 0.000000001); 225s ***** error ... 225s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 225s "Alpha", 0.999999999); 225s ***** error ... 225s adtest (10); 225s ***** warning ... 225s randn ("seed", 34); 225s adtest (ones (20,1), "Alpha", 0.000001); 225s ***** warning ... 225s randn ("seed", 34); 225s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 225s ***** warning ... 225s randn ("seed", 34); 225s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 225s ***** test 225s load examgrades 225s x = grades(:,1); 225s [h, pval, adstat, cv] = adtest (x); 225s assert (h, false); 225s assert (pval, 0.1854, 1e-4); 225s assert (adstat, 0.5194, 1e-4); 225s assert (cv, 0.7470, 1e-4); 225s ***** test 225s load examgrades 225s x = grades(:,1); 225s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 225s assert (h, false); 225s assert (pval, 0.071363, 1e-6); 225s ***** test 225s load examgrades 225s x = grades(:,1); 225s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 225s assert (h, false); 225s assert (pval, 0.4687, 1e-4); 225s 25 tests, 25 passed, 0 known failure, 0 skipped 225s [inst/monotone_smooth.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/monotone_smooth.m 225s ***** error ... 225s monotone_smooth (1) 225s ***** error ... 225s monotone_smooth ("char", 1) 225s ***** error ... 225s monotone_smooth ({1,2,3}, 1) 225s ***** error ... 225s monotone_smooth (ones(20,3), 1) 225s ***** error ... 225s monotone_smooth (1, "char") 225s ***** error ... 225s monotone_smooth (1, {1,2,3}) 225s ***** error ... 225s monotone_smooth (1, ones(20,3)) 225s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 225s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 225s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 225s 10 tests, 10 passed, 0 known failure, 0 skipped 225s [inst/manova1.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/manova1.m 225s ***** demo 225s load carbig 225s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 225s ***** test 225s load carbig 225s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 225s assert (d, 3); 225s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 225s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 225s ***** test 225s load carbig 225s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 225s assert (d, 2); 225s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 225s [1e-12, 1e-12, 1e-12]'); 225s 2 tests, 2 passed, 0 known failure, 0 skipped 225s [inst/knnsearch.m] 225s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/knnsearch.m 225s ***** demo 225s ## find 10 nearest neighbour of a point using different distance metrics 225s ## and compare the results by plotting 225s load fisheriris 225s X = meas(:,3:4); 225s Y = species; 225s point = [5, 1.45]; 225s 225s ## calculate 10 nearest-neighbours by minkowski distance 225s [id, d] = knnsearch (X, point, "K", 10); 225s 225s ## calculate 10 nearest-neighbours by minkowski distance 225s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 225s 225s ## calculate 10 nearest-neighbours by chebychev distance 225s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 225s 225s ## plotting the results 225s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 225s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 225s xlabel("Petal length (cm)"); 225s ylabel("Petal width (cm)"); 225s 225s line (point(1), point(2), "marker", "X", "color", "k", ... 225s "linewidth", 2, "displayname", "query point") 225s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 225s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 225s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 225s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 225s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 225s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 225s xlim ([4.5 5.5]); 225s ylim ([1 2]); 225s axis square; 225s ***** demo 225s ## knnsearch on iris dataset using kdtree method 225s load fisheriris 225s X = meas(:,3:4); 225s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 225s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 225s 225s ## new point to be predicted 225s point = [5 1.45]; 225s 225s line (point(1), point(2), "marker", "X", "color", "k", ... 225s "linewidth", 2, "displayname", "query point") 225s 225s ## knnsearch using kdtree method 225s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 225s 225s ## plotting predicted neighbours 225s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 225s "linestyle", "none", "markersize", 10, ... 225s "displayname", "nearest neighbour") 225s xlim ([4 6]) 225s ylim ([1 3]) 225s axis square 225s ## details of predicted labels 225s tabulate (species(idx)) 225s 225s ctr = point - d(end); 225s diameter = 2 * d(end); 225s ## Draw a circle around the 10 nearest neighbors. 225s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 225s 225s ## here only 8 neighbours are plotted instead of 10 since the dataset 225s ## contains duplicate values 225s ***** shared X, Y 225s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 225s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 225s ***** test 225s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 225s assert (idx, [1; 1]); 225s assert (D, ones (2, 1) * sqrt (2)); 225s ***** test 225s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 225s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 225s assert (idx, [1; 1]); 225s assert (D, ones (2, 1) * sqrt (2)); 225s ***** test 225s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 225s assert (iscell (idx), true); 225s assert (iscell (D), true) 225s assert (idx {1}, [1]); 225s assert (idx {2}, [1, 2]); 225s assert (D{1}, ones (1, 1) * sqrt (2)); 225s assert (D{2}, ones (1, 2) * sqrt (2)); 225s ***** test 225s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 225s assert (idx, [1, 2; 1, 2]); 225s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 225s ***** test 225s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 225s assert (idx, [1; 1]); 225s assert (D, ones (2, 1) * sqrt (2)); 225s ***** test 225s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 225s assert (idx, [1, 2; 1, 2]); 225s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 226s ***** test 226s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 226s yy = [2, 4; 2, 6]; 226s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 226s assert (idx, [3; 2]); 226s assert (D, [0; 3.162277660168377], 1e-14); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 226s assert (idx, [1; 1]); 226s assert (D, ones (2, 1) * sqrt (2)); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 226s assert (idx, [1; 1]); 226s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 226s assert (idx, [1; 1]); 226s assert (D, [2; 2]); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 226s assert (idx, [1; 1]); 226s assert (D, [1; 1]); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 226s assert (idx, [2; 3]); 226s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 226s assert (idx, [1; 1]); 226s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 226s assert (idx, [1; 1]); 226s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 226s assert (idx, [1; 1]); 226s assert (D, [0.5; 0.5]); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 226s assert (idx, [1; 1]); 226s assert (D, [0.5; 0.5]); 226s ***** test 226s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 226s assert (idx, [1, 2; 1, 2]); 226s assert (D, [0.5, 1; 0.5, 0.5]); 226s ***** test 226s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 226s b = [1, 1]; 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 226s assert (iscell (idx), true); 226s assert (iscell (D), true) 226s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 226s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 226s ***** test 226s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 226s b = [1, 1]; 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 226s assert (iscell (idx), true); 226s assert (iscell (D), true) 226s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 226s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 226s ***** test 226s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 226s b = [1, 1]; 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 226s assert (iscell (idx), false); 226s assert (iscell (D), false) 226s assert (idx, [4, 2, 3, 6, 1]); 226s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 226s ***** test 226s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 226s b = [1, 1]; 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 226s assert (iscell (idx), false); 226s assert (iscell (D), false) 226s assert (idx, [4, 2, 3, 6, 1]); 226s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 226s ***** test 226s load fisheriris 226s a = meas; 226s b = min(meas); 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 226s assert (idx, [42, 9, 14, 39, 13]); 226s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 226s ***** test 226s load fisheriris 226s a = meas; 226s b = mean(meas); 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 226s assert (idx, [65, 83, 89, 72, 100]); 226s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 226s ***** test 226s load fisheriris 226s a = meas; 226s b = max(meas); 226s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 226s assert (idx, [118, 132, 110, 106, 136]); 226s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 226s 226s ***** test 226s load fisheriris 226s a = meas; 226s b = max(meas); 226s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 226s assert ( iscell (idx), true); 226s assert ( iscell (D), true); 226s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 226s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 226s ***** error knnsearch (1) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (4)) 226s ***** error ... 226s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 226s ***** error ... 226s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 226s 42 tests, 42 passed, 0 known failure, 0 skipped 226s [inst/linkage.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/linkage.m 226s ***** shared x, t 226s x = reshape (mod (magic (6),5), [], 3); 226s t = 1e-6; 226s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 226s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 226s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 226s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 226s lastwarn(); # Clear last warning before the test 226s ***** warning linkage (pdist (x), "centroid"); 226s ***** test 226s warning off Octave:clustering 226s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 226s warning on Octave:clustering 226s ***** warning linkage (pdist (x), "median"); 226s ***** test 226s warning off Octave:clustering 226s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 226s warning on Octave:clustering 226s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 226s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 226s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 226s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 226s 12 tests, 12 passed, 0 known failure, 0 skipped 226s [inst/ttest.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ttest.m 226s ***** test 226s x = 8:0.1:12; 226s [h, pval, ci] = ttest (x, 10); 226s assert (h, 0) 226s assert (pval, 1, 10*eps) 226s assert (ci, [9.6219 10.3781], 1E-5) 226s [h, pval, ci0] = ttest (x, 0); 226s assert (h, 1) 226s assert (pval, 0) 226s assert (ci0, ci, 2e-15) 226s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 226s assert (h, 0) 226s assert (pval, 0.5, 10*eps) 226s assert (ci, [9.68498 Inf], 1E-5) 226s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 226s ***** error ttest ([8:0.1:12], 10, "tail", 25); 226s 3 tests, 3 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/set.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/set.m 226s ***** shared C 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s ***** test 226s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 226s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 226s ***** error set (C) 226s ***** error set (C, "NumObservations") 226s ***** error set (C, "some", 15) 226s ***** error set (C, 15, 15) 226s 5 tests, 5 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/display.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/display.m 226s ***** test 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s s = evalc ("display (C)"); 226s sout = "K-fold cross validation partition"; 226s assert (strcmpi (s(1:length (sout)), sout), true); 226s ***** test 226s C = cvpartition (ones (10, 1), "HoldOut", 5); 226s s = evalc ("display (C)"); 226s sout = "HoldOut cross validation partition"; 226s assert (strcmpi (s(1:length (sout)), sout), true); 226s ***** test 226s C = cvpartition (ones (10, 1), "LeaveOut", 5); 226s s = evalc ("display (C)"); 226s sout = "Leave-One-Out cross validation partition"; 226s assert (strcmpi (s(1:length (sout)), sout), true); 226s ***** test 226s C = cvpartition (ones (10, 1), "resubstitution", 5); 226s s = evalc ("display (C)"); 226s sout = "Resubstitution cross validation partition"; 226s assert (strcmpi (s(1:length (sout)), sout), true); 226s ***** test 226s C = cvpartition (ones (10, 1), "Given", 5); 226s s = evalc ("display (C)"); 226s sout = "Given cross validation partition"; 226s assert (strcmpi (s(1:length (sout)), sout), true); 226s ***** error display () 226s 6 tests, 6 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/get.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/get.m 226s ***** shared C 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s ***** assert (get (C, "NumObservations"), 10); 226s ***** assert (get (C, "NumTestSets"), 5); 226s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 226s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 226s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 226s ***** assert (get (C, "Type"), "kfold"); 226s ***** error get (C, "some") 226s ***** error get (C, 25) 226s ***** error get (C, {25}) 226s 9 tests, 9 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/repartition.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/repartition.m 226s ***** test 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s Cnew = repartition (C); 226s assert (isa (Cnew, "cvpartition"), true); 226s ***** test 226s C = cvpartition (ones (100, 1), "HoldOut", 5); 226s Cnew = repartition (C); 226s indC = get (C, "inds"); 226s indCnew = get (Cnew, "inds"); 226s assert (isequal (indC, indCnew), false); 226s 2 tests, 2 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/test.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/test.m 226s ***** shared C 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 226s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 226s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 226s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 226s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 226s ***** test 226s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 226s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 226s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 226s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 226s 9 tests, 9 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/training.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/training.m 226s ***** shared C 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 226s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 226s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 226s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 226s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 226s ***** test 226s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 226s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 226s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 226s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 226s 9 tests, 9 passed, 0 known failure, 0 skipped 226s [inst/@cvpartition/cvpartition.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/@cvpartition/cvpartition.m 226s ***** demo 226s ## Partition with Fisher iris dataset (n = 150) 226s ## Stratified by species 226s load fisheriris 226s y = species; 226s ## 10-fold cross-validation partition 226s c = cvpartition (species, 'KFold', 10) 226s ## leave-10-out partition 226s c1 = cvpartition (species, 'HoldOut', 10) 226s idx1 = test (c, 2); 226s idx2 = training (c, 2); 226s ## another leave-10-out partition 226s c2 = repartition (c1) 226s ***** test 226s C = cvpartition (ones (10, 1)); 226s assert (isa (C, "cvpartition"), true); 226s ***** test 226s C = cvpartition (ones (10, 1), "KFold", 5); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 5); 226s assert (get (C, "TrainSize"), ones(5,1) * 8); 226s assert (get (C, "TestSize"), ones (5,1) * 2); 226s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 226s assert (get (C, "Type"), "kfold"); 226s ***** test 226s C = cvpartition (ones (10, 1), "KFold", 2); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 2); 226s assert (get (C, "TrainSize"), [5; 5]); 226s assert (get (C, "TestSize"), [5; 5]); 226s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 226s assert (get (C, "Type"), "kfold"); 226s ***** test 226s C = cvpartition (ones (10, 1), "HoldOut", 5); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 1); 226s assert (get (C, "TrainSize"), 5); 226s assert (get (C, "TestSize"), 5); 226s assert (class (get (C, "inds")), "logical"); 226s assert (length (get (C, "inds")), 10); 226s assert (get (C, "Type"), "holdout"); 226s ***** test 226s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 10); 226s assert (get (C, "TrainSize"), ones (10, 1)); 226s assert (get (C, "TestSize"), ones (10, 1) * 9); 226s assert (get (C, "inds"), []); 226s assert (get (C, "Type"), "leaveout"); 226s ***** test 226s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 1); 226s assert (get (C, "TrainSize"), 10); 226s assert (get (C, "TestSize"), 10); 226s assert (get (C, "inds"), []); 226s assert (get (C, "Type"), "resubstitution"); 226s ***** test 226s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 226s assert (get (C, "NumObservations"), 10); 226s assert (get (C, "NumTestSets"), 10); 226s assert (get (C, "TrainSize"), ones (10, 1) * 9); 226s assert (get (C, "TestSize"), ones (10, 1)); 226s assert (get (C, "inds"), [1:10]'); 226s assert (get (C, "Type"), "given"); 226s ***** warning ... 226s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 226s 8 tests, 8 passed, 0 known failure, 0 skipped 226s [inst/fitcsvm.m] 226s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitcsvm.m 226s ***** demo 226s ## Use a subset of Fisher's iris data set 226s 226s load fisheriris 226s inds = ! strcmp (species, 'setosa'); 226s X = meas(inds, [3,4]); 226s Y = species(inds); 226s 226s ## Train a linear SVM classifier 226s SVMModel = fitcsvm (X, Y) 226s 226s ## Plot a scatter diagram of the data and circle the support vectors. 226s sv = SVMModel.SupportVectors; 226s figure 226s gscatter (X(:,1), X(:,2), Y) 226s hold on 226s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 226s legend ('versicolor', 'virginica', 'Support Vector') 226s hold off 226s ***** test 226s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 226s y = {"a"; "a"; "b"; "b"}; 226s a = fitcsvm (x, y); 226s assert (class (a), "ClassificationSVM"); 226s assert ({a.X, a.Y}, {x, y}) 226s assert (a.NumObservations, 4) 226s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 226s assert (a.ModelParameters.SVMtype, "c_svc") 226s assert (a.ClassNames, {"a"; "b"}) 226s ***** test 226s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 226s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 226s a = fitcsvm (x, y); 226s assert (class (a), "ClassificationSVM"); 226s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 226s assert (a.ModelParameters.BoxConstraint, 1) 226s assert (a.ModelParameters.KernelOffset, 0) 226s assert (a.ClassNames, [1; -1]) 226s ***** test 226s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 226s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 226s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 226s "KernelOffset", 2); 226s assert (class (a), "ClassificationSVM"); 226s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 226s assert (a.ModelParameters.BoxConstraint, 2) 226s assert (a.ModelParameters.KernelOffset, 2) 226s assert (isempty (a.Alpha), true) 226s assert (isempty (a.Beta), false) 226s ***** test 226s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 226s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 226s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 226s assert (class (a), "ClassificationSVM"); 226s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 226s assert (a.ModelParameters.PolynomialOrder, 3) 226s assert (isempty (a.Alpha), true) 226s assert (isempty (a.Beta), false) 226s ***** test 226s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 226s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 226s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 226s assert (class (a), "ClassificationSVM"); 226s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 226s assert (a.ModelParameters.PolynomialOrder, 3) 226s assert (isempty (a.Alpha), false) 226s assert (isempty (a.Beta), true) 226s ***** test 226s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 226s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 226s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 226s assert (class (a), "ClassificationPartitionedModel"); 226s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 226s assert (a.ModelParameters.PolynomialOrder, 3) 226s assert (isempty (a.Trained{1}.Alpha), false) 226s assert (isempty (a.Trained{1}.Beta), true) 227s ***** error fitcsvm () 227s ***** error fitcsvm (ones (4,1)) 227s ***** error 227s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 227s ***** error 227s fitcsvm (ones (4,2), ones (3, 1)) 227s ***** error 227s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 227s ***** error 227s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 227s ***** error 227s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 227s ***** error ... 227s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 227s 14 tests, 14 passed, 0 known failure, 0 skipped 227s [inst/grp2idx.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/grp2idx.m 227s ***** test 227s in = [true false false true]; 227s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 227s assert (nthargout (1:3, @grp2idx, in), out) 227s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 227s ***** test 227s assert (nthargout (1:3, @grp2idx, [false, true]), 227s {[1; 2] {"0"; "1"} [false; true]}); 227s assert (nthargout (1:3, @grp2idx, [true, false]), 227s {[1; 2] {"1"; "0"} [true; false]}); 227s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 227s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 227s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 227s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 227s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 227s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 227s [1; -3; -2; 2; -1; 3]}); 227s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 227s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 227s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 227s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 227s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 227s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 227s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 227s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 227s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 227s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 227s 10 tests, 10 passed, 0 known failure, 0 skipped 227s [inst/pdist.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/pdist.m 227s ***** shared xy, t, eucl, x 227s xy = [0 1; 0 2; 7 6; 5 6]; 227s t = 1e-3; 227s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 227s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 227s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 227s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 227s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 227s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 227s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 227s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 227s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 227s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 227s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 227s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 227s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 227s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 227s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 227s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 227s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 227s ***** assert (pdist (x, "euclidean"), ... 227s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 227s ***** assert (pdist (x, eucl), ... 227s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 227s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 227s ***** assert (pdist (x, "seuclidean"), ... 227s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 227s ***** warning ... 227s pdist (x, "mahalanobis"); 227s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 227s ***** assert (pdist (x, "minkowski"), ... 227s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 227s ***** assert (pdist (x, "minkowski", 3), ... 227s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 227s ***** assert (pdist (x, "cosine"), ... 227s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 227s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 227s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 227s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 227s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 227s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 227s 29 tests, 29 passed, 0 known failure, 0 skipped 227s [inst/canoncorr.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/canoncorr.m 227s ***** shared X,Y,A,B,r,U,V,k 227s k = 10; 227s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 227s [A,B,r,U,V,stats] = canoncorr (X,Y); 227s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 227s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 227s ***** assert (r, [0.99590 0.26754], 1E-5); 227s ***** assert (U, center(X) * A, 10*eps); 227s ***** assert (V, center(Y) * B, 10*eps); 227s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 227s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 227s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 227s ***** assert (r, ones(1, 5), 10*eps); 227s 8 tests, 8 passed, 0 known failure, 0 skipped 227s [inst/friedman.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/friedman.m 227s ***** demo 227s load popcorn; 227s friedman (popcorn, 3); 227s ***** demo 227s load popcorn; 227s [p, atab] = friedman (popcorn, 3, "off"); 227s disp (p); 227s ***** test 227s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 227s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 227s [p, atab] = friedman (popcorn, 3, "off"); 227s assert (p, 0.001028853354594794, 1e-14); 227s assert (atab{2,2}, 99.75, 1e-14); 227s assert (atab{2,3}, 2, 0); 227s assert (atab{2,4}, 49.875, 1e-14); 227s assert (atab{2,5}, 13.75862068965517, 1e-14); 227s assert (atab{2,6}, 0.001028853354594794, 1e-14); 227s assert (atab{3,2}, 0.08333333333333215, 1e-14); 227s assert (atab{3,4}, 0.04166666666666607, 1e-14); 227s assert (atab{4,3}, 12, 0); 227s ***** test 227s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 227s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 227s [p, atab, stats] = friedman (popcorn, 3, "off"); 227s assert (atab{5,2}, 116, 0); 227s assert (atab{5,3}, 17, 0); 227s assert (stats.source, "friedman"); 227s assert (stats.n, 2); 227s assert (stats.meanranks, [8, 4.75, 2.25], 0); 227s assert (stats.sigma, 2.692582403567252, 1e-14); 227s 2 tests, 2 passed, 0 known failure, 0 skipped 227s [inst/pcacov.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/pcacov.m 227s ***** demo 227s x = [ 7 26 6 60; 227s 1 29 15 52; 227s 11 56 8 20; 227s 11 31 8 47; 227s 7 52 6 33; 227s 11 55 9 22; 227s 3 71 17 6; 227s 1 31 22 44; 227s 2 54 18 22; 227s 21 47 4 26; 227s 1 40 23 34; 227s 11 66 9 12; 227s 10 68 8 12 227s ]; 227s Kxx = cov (x); 227s [coeff, latent, explained] = pcacov (Kxx) 227s ***** test 227s load hald 227s Kxx = cov (ingredients); 227s [coeff,latent,explained] = pcacov(Kxx); 227s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 227s -0.6785, -0.0200, -0.5440, 0.4933; ... 227s 0.0290, 0.7553, 0.4036, 0.5156; ... 227s 0.7309, -0.1085, -0.4684, 0.4844]; 227s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 227s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 227s assert (coeff, c_out, 1e-4); 227s assert (latent, l_out, 1e-4); 227s assert (explained, e_out, 1e-4); 227s ***** error pcacov (ones (2,3)) 227s ***** error pcacov (ones (3,3,3)) 227s 3 tests, 3 passed, 0 known failure, 0 skipped 227s [inst/pdist2.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/pdist2.m 227s ***** shared x, y, xx 227s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 227s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 227s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 227s ***** test 227s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 227s assert (pdist2 (x, y), d); 227s ***** test 227s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 227s 3.4641, 2.2361, 3.3166, 5.4772]; 227s i = [3, 1, 1, 1; 2, 3, 3, 2]; 227s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 227s 3.4641, 2.2361, 3.3166, 5.4772]; 227s i = [1, 2, 2, 3;2, 1, 1, 2]; 227s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s yy = [1 2 3;5 6 7;9 5 1]; 227s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 227s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 227s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 227s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s yy = [1 2 3;5 6 7;9 5 1]; 227s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 227s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 227s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s yy = [1 2 3;5 6 7;9 5 1]; 227s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 227s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 227s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 227s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 227s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 227s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 227s ***** test 227s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 227s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 227s i = [2, 2, 2; 3, 4, 4]; 227s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 227s i = [1, 1, 3; 4, 3, 1]; 227s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 227s assert ({D, I}, {d, i}, 1e-4); 227s ***** test 227s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 227s assert (pdist2 (x, y, "cityblock"), d); 227s ***** test 227s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 227s assert (pdist2 (x, y, "chebychev"), d); 227s ***** test 227s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 227s assert (pdist2 (x, y, "cosine"), d, 1e-4); 227s ***** test 227s yy = [1 2 3;5 6 7;9 5 1]; 227s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 227s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 227s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 227s assert ({D, I}, {d, i}, eps); 227s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 227s assert ({D, I}, {d, i}, eps); 227s ***** test 227s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 227s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 227s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 227s assert ({D, I}, {d, i}, eps); 227s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 227s assert ({D, I}, {d, i}, eps); 227s ***** test 227s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 227s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 227s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 227s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 227s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 227s assert ({D, I}, {d, i}); 227s ***** warning ... 227s pdist2 (xx, xx, "mahalanobis"); 227s ***** error pdist2 (1) 227s ***** error ... 227s pdist2 (ones (4, 5), ones (4)) 227s ***** error ... 227s pdist2 (ones (4, 2, 3), ones (3, 2)) 227s ***** error ... 227s pdist2 (ones (3), ones (3), "euclidean", "Largest") 227s ***** error ... 227s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 227s ***** error ... 227s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 227s ***** error ... 227s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 227s ***** error ... 227s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 227s ***** error ... 227s pdist2 (ones (3), ones (3), "seuclidean", 3) 227s ***** error ... 227s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 227s ***** error ... 227s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 227s ***** error ... 227s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 227s ***** error ... 227s pdist2 (ones (3), eye (3), "minkowski", 0) 227s ***** error ... 227s pdist2 (ones (3), eye (3), "minkowski", -5) 227s ***** error ... 227s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 227s ***** error ... 227s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 227s ***** error ... 227s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 227s 33 tests, 33 passed, 0 known failure, 0 skipped 227s [inst/anovan.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/anovan.m 227s ***** demo 227s 227s # Two-sample unpaired test on independent samples (equivalent to Student's 227s # t-test). Note that the absolute value of t-statistic can be obtained by 227s # taking the square root of the reported F statistic. In this example, 227s # t = sqrt (1.44) = 1.20. 227s 227s score = [54 23 45 54 45 43 34 65 77 46 65]'; 227s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 227s "female" "female" "female"}'; 227s 227s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 227s ***** demo 227s 227s # Two-sample paired test on dependent or matched samples equivalent to a 227s # paired t-test. As for the first example, the t-statistic can be obtained by 227s # taking the square root of the reported F statistic. Note that the interaction 227s # between treatment x subject was dropped from the full model by assigning 227s # subject as a random factor ('). 227s 227s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 227s treatment = {"before" "after"; "before" "after"; "before" "after"; 227s "before" "after"; "before" "after"}'; 227s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 227s 227s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 227s "model", "full", "random", 2, "sstype", 2, ... 227s "varnames", {"treatment", "subject"}, ... 227s "display", "on"); 227s ***** demo 227s 227s # One-way ANOVA on the data from a study on the strength of structural beams, 227s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 227s 227s strength = [82 86 79 83 84 85 86 87 74 82 ... 227s 78 75 76 77 79 79 77 78 82 79]'; 227s alloy = {"st","st","st","st","st","st","st","st", ... 227s "al1","al1","al1","al1","al1","al1", ... 227s "al2","al2","al2","al2","al2","al2"}'; 227s 227s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 227s "varnames", "alloy"); 227s ***** demo 227s 227s # One-way repeated measures ANOVA on the data from a study on the number of 227s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 227s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 227s # between seconds x subject was dropped from the full model by assigning 227s # subject as a random factor ('). 227s 227s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 227s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 227s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 227s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 227s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 227s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 227s 227s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 227s "model", "full", "random", 2, "sstype", 2, ... 227s "display", "on", "varnames", {"seconds", "subject"}); 227s ***** demo 227s 227s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 227s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 227s # New York: MacMillan 227s 227s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 227s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 227s brands = {"Gourmet", "National", "Generic"; ... 227s "Gourmet", "National", "Generic"; ... 227s "Gourmet", "National", "Generic"; ... 227s "Gourmet", "National", "Generic"; ... 227s "Gourmet", "National", "Generic"; ... 227s "Gourmet", "National", "Generic"}; 227s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 227s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 227s 227s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 227s "display", "on", "model", "full", ... 227s "varnames", {"brands", "popper"}); 227s ***** demo 227s 227s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 227s # gender and having a college degree on salaries of company employees, 227s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 227s 227s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 227s 25 29 27 19 18 21 20 21 22 19]'; 227s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 227s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 227s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 227s 227s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 227s "sstype", 3, "display", "on", "varnames", ... 227s {"gender", "degree"}); 227s ***** demo 227s 227s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 227s # adding sugar and/or milk on the tendency of coffee to make people babble, 227s # in from Navarro (2019): 16.10 227s 227s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 227s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 227s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 227s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 227s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 227s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 227s 227s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 227s "sstype", 3, "display", "on", ... 227s "varnames", {"sugar", "milk"}); 227s ***** demo 227s 227s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 227s # of three different drugs, biofeedback and diet on patient blood pressure, 227s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 227s # * Missing values introduced to make the sample sizes unequal to test the 227s # calculation of different types of sums-of-squares 227s 227s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 227s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 227s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 227s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 227s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 227s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 227s 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; 227s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 227s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 227s 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; 227s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 227s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 227s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 227s 173 194 197 190 176 198 164 190 169 164 176 175; 227s 186 194 201 215 219 209 164 166 159 182 187 174 ... 227s 189 194 217 206 199 195 171 173 196 199 180 NaN; 227s 180 187 199 170 204 194 162 184 183 156 180 173 ... 227s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 227s 227s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 227s "model", "full", "sstype", 3, ... 227s "display", "on", ... 227s "varnames", {"drug", "feedback", "diet"}); 227s ***** demo 227s 227s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 227s # factor. The data is from a randomized block design study on the effects 227s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 227s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 227s # Note that all interactions involving block were dropped from the full model 227s # by assigning block as a random factor ('). 227s 227s measurement = [444 614 423 625 408 856 447 719 ... 227s 764 831 586 782 609 1002 606 766]'; 227s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 227s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 227s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 227s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 227s 227s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 227s "sstype", 2, "model", "full", "random", 3, ... 227s "display", "on", ... 227s "varnames", {"strain", "treatment", "block"}); 227s ***** demo 227s 227s # One-way ANCOVA on data from a study of the additive effects of species 227s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 227s # Text eveR 227s 227s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 227s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 227s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 227s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 227s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 227s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 227s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 227s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 227s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 227s 227s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 227s "continuous", 2, "sstype", "h", "display", "on", ... 227s "varnames", {"species", "temp"}); 227s ***** demo 227s 227s # Factorial ANCOVA on data from a study of the effects of treatment and 227s # exercise on stress reduction score after adjusting for age. Data from R 227s # datarium package). 227s 227s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 227s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 227s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 227s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 227s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 227s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 227s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 227s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 227s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 227s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 227s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 227s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 227s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 227s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 227s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 227s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 227s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 227s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 227s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 227s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 227s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 227s 227s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 227s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 227s "continuous", 3, "sstype", "h", "display", "on", ... 227s "varnames", {"treatment", "exercise", "age"}); 227s ***** demo 227s 227s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 227s # relating to the contrasts are shown in the table of model parameters, and 227s # can be retrieved from the STATS.coeffs output. 227s 227s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 227s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 227s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 227s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 227s 25.694 ]'; 227s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 227s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 227s C = [ 0.4001601 0.3333333 0.5 0.0 227s 0.4001601 0.3333333 -0.5 0.0 227s 0.4001601 -0.6666667 0.0 0.0 227s -0.6002401 0.0000000 0.0 0.5 227s -0.6002401 0.0000000 0.0 -0.5]; 227s 227s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 227s "alpha", 0.05, "display", "on"); 227s ***** demo 227s 227s # One-way ANOVA with the linear model fit by weighted least squares to 227s # account for heteroskedasticity. In this example, the variance appears 227s # proportional to the outcome, so weights have been estimated by initially 227s # fitting the model without weights and regressing the absolute residuals on 227s # the fitted values. Although this data could have been analysed by Welch's 227s # ANOVA test, the approach here can generalize to ANOVA models with more than 227s # one factor. 227s 227s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 227s 2, 2, 2, 2, 2, 2, 2, 2, ... 227s 3, 3, 3, 3, 3, 3, 3, 3]'; 227s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 227s 10, 25, 66, 43, 47, 56, 6, 39, ... 227s 11, 39, 26, 35, 25, 14, 24, 17]'; 227s 227s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 227s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 227s b = polyfit (fitted, abs (STATS.resid), 1); 227s v = polyval (b, fitted); # Variance as a function of the fitted values 227s figure("Name", "Regression of the absolute residuals on the fitted values"); 227s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 227s xlabel("Fitted values"); ylabel("Absolute residuals"); 227s 227s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 227s ***** test 227s score = [54 23 45 54 45 43 34 65 77 46 65]'; 227s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 227s 'female' 'female' 'female'}'; 227s 227s [P, T, STATS] = anovan (score,gender,'display','off'); 227s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 227s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 227s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 227s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 227s ***** test 227s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 227s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 227s 'before' 'after'; 'before' 'after'}'; 227s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 227s 227s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 227s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 227s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 227s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 227s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 227s ***** test 227s strength = [82 86 79 83 84 85 86 87 74 82 ... 227s 78 75 76 77 79 79 77 78 82 79]'; 227s alloy = {'st','st','st','st','st','st','st','st', ... 227s 'al1','al1','al1','al1','al1','al1', ... 227s 'al2','al2','al2','al2','al2','al2'}'; 227s 227s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 227s assert (P(1), 0.000152643638830491, 1e-09); 227s assert (ATAB{2,6}, 15.4, 1e-09); 227s ***** test 227s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 227s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 227s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 227s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 227s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 227s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 227s 227s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 227s assert (P(1), 1.51865926758752e-07, 1e-09); 227s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 227s assert (ATAB{3,2}, 942.533333333333, 1e-09); 227s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 227s ***** test 227s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 227s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 227s brands = {'Gourmet', 'National', 'Generic'; ... 227s 'Gourmet', 'National', 'Generic'; ... 227s 'Gourmet', 'National', 'Generic'; ... 227s 'Gourmet', 'National', 'Generic'; ... 227s 'Gourmet', 'National', 'Generic'; ... 227s 'Gourmet', 'National', 'Generic'}; 227s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 227s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 227s 227s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 227s assert (P(1), 7.67895738278171e-07, 1e-09); 227s assert (P(2), 0.000100373896304998, 1e-09); 227s assert (P(3), 0.746215396636649, 1e-09); 227s assert (ATAB{2,6}, 56.7, 1e-09); 227s assert (ATAB{3,6}, 32.4, 1e-09); 227s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 227s ***** test 227s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 227s 25 29 27 19 18 21 20 21 22 19]'; 227s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 227s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 227s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 227s 227s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 227s assert (P(1), 0.747462549227232, 1e-09); 227s assert (P(2), 1.03809316857694e-08, 1e-09); 227s assert (P(3), 0.523689833702691, 1e-09); 227s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 227s assert (ATAB{3,2}, 272.391841491841, 1e-09); 227s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 227s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 227s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 227s assert (P(1), 2.53445097305047e-08, 1e-09); 227s assert (P(2), 0.00388133678528749, 1e-09); 227s assert (P(3), 0.523689833702671, 1e-09); 227s assert (ATAB{2,2}, 242.227272727273, 1e-09); 227s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 227s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 227s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 227s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 227s assert (P(1), 0.00388133678528743, 1e-09); 227s assert (P(2), 1.03809316857694e-08, 1e-09); 227s assert (P(3), 0.523689833702691, 1e-09); 227s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 227s assert (ATAB{3,2}, 272.391841491841, 1e-09); 227s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 227s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 227s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 227s assert (P(1), 0.00442898146583742, 1e-09); 227s assert (P(2), 1.30634252053587e-08, 1e-09); 227s assert (P(3), 0.523689833702691, 1e-09); 227s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 227s assert (ATAB{3,2}, 264.335664335664, 1e-09); 227s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 227s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 227s ***** test 227s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 227s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 227s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 227s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 227s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 227s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 227s 227s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 227s assert (P(1), 0.0108632139833963, 1e-09); 227s assert (P(2), 0.0810606976703546, 1e-09); 227s assert (P(3), 0.00175433329935627, 1e-09); 227s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 227s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 227s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 227s assert (ATAB{5,2}, 3.1625, 1e-09); 227s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 227s assert (P(1), 0.0373333189297505, 1e-09); 227s assert (P(2), 0.017075098787169, 1e-09); 227s assert (P(3), 0.00175433329935627, 1e-09); 227s assert (ATAB{2,2}, 1.444, 1e-09); 227s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 227s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 227s assert (ATAB{5,2}, 3.1625, 1e-09); 227s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 227s assert (P(1), 0.017075098787169, 1e-09); 227s assert (P(2), 0.0810606976703546, 1e-09); 227s assert (P(3), 0.00175433329935627, 1e-09); 227s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 227s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 227s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 227s assert (ATAB{5,2}, 3.1625, 1e-09); 227s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 227s assert (P(1), 0.0454263063473954, 1e-09); 227s assert (P(2), 0.0746719907091438, 1e-09); 227s assert (P(3), 0.00175433329935627, 1e-09); 227s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 227s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 227s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 227s assert (ATAB{5,2}, 3.1625, 1e-09); 227s ***** test 227s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 227s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 227s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 227s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 227s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 227s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 227s 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; 227s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 227s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 227s 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; 227s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 227s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 227s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 227s 173 194 197 190 176 198 164 190 169 164 176 175; 227s 186 194 201 215 219 209 164 166 159 182 187 174 ... 227s 189 194 217 206 199 195 171 173 196 199 180 NaN; 227s 180 187 199 170 204 194 162 184 183 156 180 173 ... 227s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 227s 227s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 227s assert (P(1), 7.02561843825325e-05, 1e-09); 227s assert (P(2), 0.000425806013389362, 1e-09); 227s assert (P(3), 6.16780773446401e-07, 1e-09); 227s assert (P(4), 0.261347622678438, 1e-09); 227s assert (P(5), 0.0542278432357043, 1e-09); 227s assert (P(6), 0.590353225626655, 1e-09); 227s assert (P(7), 0.0861628249564267, 1e-09); 227s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 227s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 227s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 227s assert (ATAB{5,2}, 437.066007908781, 1e-09); 227s assert (ATAB{6,2}, 976.180770397332, 1e-09); 227s assert (ATAB{7,2}, 46.616653365254, 1e-09); 227s assert (ATAB{8,2}, 814.345251396648, 1e-09); 227s assert (ATAB{9,2}, 9065.8, 1e-09); 227s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 227s assert (P(1), 9.4879638470754e-05, 1e-09); 227s assert (P(2), 0.00124177666315809, 1e-09); 227s assert (P(3), 6.86162012732911e-07, 1e-09); 227s assert (P(4), 0.260856132341256, 1e-09); 227s assert (P(5), 0.0523758623892078, 1e-09); 227s assert (P(6), 0.590353225626655, 1e-09); 227s assert (P(7), 0.0861628249564267, 1e-09); 227s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 227s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 227s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 227s assert (ATAB{5,2}, 437.693674777847, 1e-09); 227s assert (ATAB{6,2}, 988.431929811402, 1e-09); 227s assert (ATAB{7,2}, 46.616653365254, 1e-09); 227s assert (ATAB{8,2}, 814.345251396648, 1e-09); 227s assert (ATAB{9,2}, 9065.8, 1e-09); 227s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 227s assert (P(1), 0.000106518678028207, 1e-09); 227s assert (P(2), 0.00125371366571508, 1e-09); 227s assert (P(3), 5.30813260778464e-07, 1e-09); 227s assert (P(4), 0.308353667232981, 1e-09); 227s assert (P(5), 0.0562901327343161, 1e-09); 227s assert (P(6), 0.599091042141092, 1e-09); 227s assert (P(7), 0.0861628249564267, 1e-09); 227s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 227s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 227s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 227s assert (ATAB{5,2}, 382.07709497207, 1e-09); 227s assert (ATAB{6,2}, 963.037988826813, 1e-09); 227s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 227s assert (ATAB{8,2}, 814.345251396648, 1e-09); 227s assert (ATAB{9,2}, 9065.8, 1e-09); 227s ***** test 227s measurement = [444 614 423 625 408 856 447 719 ... 227s 764 831 586 782 609 1002 606 766]'; 227s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 227s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 227s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 227s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 227s 227s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 227s assert (P(1), 0.0914352969909372, 1e-09); 227s assert (P(2), 5.04077373924908e-05, 1e-09); 227s assert (P(4), 0.0283196918836667, 1e-09); 227s assert (ATAB{2,2}, 286.132500000002, 1e-09); 227s assert (ATAB{3,2}, 2275.29, 1e-09); 227s assert (ATAB{4,2}, 1242.5625, 1e-09); 227s assert (ATAB{5,2}, 495.905000000001, 1e-09); 227s assert (ATAB{6,2}, 207.007499999999, 1e-09); 227s ***** test 227s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 227s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 227s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 227s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 227s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 227s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 227s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 227s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 227s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 227s 227s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 227s assert (P(1), 6.27153318786007e-14, 1e-09); 227s assert (P(2), 2.48773241196644e-25, 1e-09); 227s assert (ATAB{2,2}, 598.003953318404, 1e-09); 227s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 227s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 227s assert (ATAB{2,6}, 187.399388123951, 1e-09); 227s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 227s ***** test 227s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 227s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 227s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 227s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 227s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 227s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 227s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 227s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 227s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 227s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 227s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 227s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 227s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 227s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 227s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 227s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 227s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 227s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 227s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 227s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 227s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 227s 227s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 227s assert (P(5), 0.9245630968248468, 1e-09); 227s assert (P(6), 0.791115159521822, 1e-09); 227s assert (P(7), 0.9296668751457956, 1e-09); 227s [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'); 227s assert (P(1), 0.00158132928938933, 1e-09); 227s assert (P(2), 2.12537505039986e-07, 1e-09); 227s assert (P(3), 0.00390292555160047, 1e-09); 227s assert (P(4), 0.0164086580775543, 1e-09); 227s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 227s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 227s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 227s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 227s ***** test 227s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 227s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 227s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 227s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 227s 25.694 ]'; 227s 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]'; 227s C = [ 0.4001601 0.3333333 0.5 0.0 227s 0.4001601 0.3333333 -0.5 0.0 227s 0.4001601 -0.6666667 0.0 0.0 227s -0.6002401 0.0000000 0.0 0.5 227s -0.6002401 0.0000000 0.0 -0.5]; 227s 227s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 227s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 227s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 227s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 227s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 227s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 227s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 227s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 227s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 227s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 227s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 227s assert (STATS.coeffs(1,5), 40.161, 1e-03); 227s assert (STATS.coeffs(2,5), -9.624, 1e-03); 227s assert (STATS.coeffs(3,5), -3.825, 1e-03); 227s assert (STATS.coeffs(4,5), -4.875, 1e-03); 227s assert (STATS.coeffs(5,5), -5.515, 1e-03); 227s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 227s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 227s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 227s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 227s 12 tests, 12 passed, 0 known failure, 0 skipped 227s [inst/dcov.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dcov.m 227s ***** demo 227s base=@(x) (x- min(x))./(max(x)-min(x)); 227s N = 5e2; 227s x = randn (N,1); x = base (x); 227s z = randn (N,1); z = base (z); 227s # Linear relations 227s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 227s ly = x .* cy; 227s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 227s # Correlated Gaussian 227s cz = 1 - abs (cy); 227s gy = base ( ly + cz.*z); 227s # Shapes 227s sx = repmat (x,1,7); 227s sy = zeros (size (ly)); 227s v = 2 * rand (size(x,1),2) - 1; 227s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 227s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 227s tmp = R(35) * v.'; 227s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 227s tmp = R(45) * v.'; 227s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 227s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 227s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 227s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 227s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 227s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 227s sy = base (sy); 227s sx = base (sx); 227s # scaled shape 227s sc = 1/3; 227s ssy = (sy-0.5) * sc + 0.5; 227s n = size (ly,2); 227s ym = 1.2; 227s xm = 0.5; 227s fmt={'horizontalalignment','center'}; 227s ff = "% .2f"; 227s figure (1) 227s for i=1:n 227s subplot(4,n,i); 227s plot (x, gy(:,i), '.b'); 227s axis tight 227s axis off 227s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 227s 227s subplot(4,n,i+n); 227s plot (x, ly(:,i), '.b'); 227s axis tight 227s axis off 227s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 227s 227s subplot(4,n,i+2*n); 227s plot (sx(:,i), sy(:,i), '.b'); 227s axis tight 227s axis off 227s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 227s v = axis (); 227s 227s subplot(4,n,i+3*n); 227s plot (sx(:,i), ssy(:,i), '.b'); 227s axis (v) 227s axis off 227s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 227s endfor 227s ***** error dcov (randn (30, 5), randn (25,5)) 227s 1 test, 1 passed, 0 known failure, 0 skipped 227s [inst/kruskalwallis.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/kruskalwallis.m 227s ***** demo 227s x = meshgrid (1:6); 227s x = x + normrnd (0, 1, 6, 6); 227s kruskalwallis (x, [], 'off'); 227s ***** demo 227s x = meshgrid (1:6); 227s x = x + normrnd (0, 1, 6, 6); 227s [p, atab] = kruskalwallis(x); 227s ***** demo 227s x = ones (30, 4) .* [-2, 0, 1, 5]; 227s x = x + normrnd (0, 2, 30, 4); 227s group = {"A", "B", "C", "D"}; 227s kruskalwallis (x, group); 227s ***** test 227s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 227s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 227s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 227s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 227s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 227s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 227s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 227s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 227s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 227s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 227s group = [1:10] .* ones (10,10); 227s group = group(:); 227s [p, tbl] = kruskalwallis (data, group, "off"); 227s assert (p, 0.048229, 1e-6); 227s assert (tbl{2,5}, 17.03124, 1e-5); 227s assert (tbl{2,3}, 9, 0); 227s assert (tbl{4,2}, 82655.5, 1e-16); 227s data = reshape (data, 10, 10); 227s [p, tbl, stats] = kruskalwallis (data, [], "off"); 227s assert (p, 0.048229, 1e-6); 227s assert (tbl{2,5}, 17.03124, 1e-5); 227s assert (tbl{2,3}, 9, 0); 227s assert (tbl{4,2}, 82655.5, 1e-16); 227s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 227s N = 10 * ones (1, 10); 227s assert (stats.meanranks, means, 1e-6); 227s assert (length (stats.gnames), 10, 0); 227s assert (stats.n, N, 0); 227s 1 test, 1 passed, 0 known failure, 0 skipped 227s [inst/manovacluster.m] 227s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/manovacluster.m 227s ***** demo 227s load carbig 227s X = [MPG Acceleration Weight Displacement]; 227s [d, p, stats] = manova1 (X, Origin); 227s manovacluster (stats) 227s ***** test 227s hf = figure ("visible", "off"); 227s unwind_protect 227s load carbig 227s X = [MPG Acceleration Weight Displacement]; 227s [d, p, stats] = manova1 (X, Origin); 227s manovacluster (stats); 227s unwind_protect_cleanup 227s close (hf); 227s end_unwind_protect 228s ***** error manovacluster (stats, "some"); 228s 2 tests, 2 passed, 0 known failure, 0 skipped 228s [inst/bar3h.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/bar3h.m 228s ***** demo 228s ## Ploting 5 bars in the same series. 228s 228s y = [50; 40; 30; 20; 10]; 228s bar3h (y); 228s ***** demo 228s ## Ploting 5 bars in different groups. 228s 228s y = [50, 40, 30, 20, 10]; 228s bar3h (y); 228s ***** demo 228s ## A 3D bar graph with each series corresponding to a column in y. 228s 228s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 228s bar3h (y); 228s ***** demo 228s ## Specify z-axis locations as tick names. z must be a column vector! 228s 228s z = [1950, 1960, 1970, 1980, 1990]'; 228s y = [16, 8, 4, 2, 1]'; 228s bar3h (z, y); 228s ***** demo 228s ## Plot 3 series as a grouped plot without any space between the grouped bars 228s 228s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 228s bar3h (y, 1, 'grouped'); 228s ***** demo 228s ## Plot a stacked style 3D bar graph 228s 228s y = [19, 30, 21, 30; 40, 16, 32, 12]; 228s b = bar3h (y, 0.5, 'stacked'); 228s ***** error bar3h ("A") 228s ***** error bar3h ({2,3,4,5}) 228s ***** error ... 228s bar3h ([1,2,3]', ones (2)) 228s ***** error ... 228s bar3h ([1:5], 1.2) 228s ***** error ... 228s bar3h ([1:5]', ones (5), 1.2) 228s ***** error ... 228s bar3h ([1:5]', ones (5), [0.8, 0.7]) 228s ***** error ... 228s bar3h (ones (5), 'width') 228s ***** error ... 228s bar3h (ones (5), 'width', 1.2) 228s ***** error ... 228s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 228s ***** error ... 228s bar3h (ones (5), 'color') 228s ***** error ... 228s bar3h (ones (5), 'color', [0.8, 0.8]) 228s ***** error ... 228s bar3h (ones (5), 'color', "brown") 228s ***** error ... 228s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 228s ***** error ... 228s bar3h (ones (5), 'xlabel') 228s ***** error ... 228s bar3h (ones (5), 'xlabel', 4) 228s ***** error ... 228s bar3h (ones (5), 'zlabel') 228s ***** error ... 228s bar3h (ones (5), 'zlabel', 4) 228s ***** error bar3h (ones (5), 'this', 4) 228s ***** error ... 228s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 228s ***** error ... 228s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 228s 20 tests, 20 passed, 0 known failure, 0 skipped 228s [inst/qrandn.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/qrandn.m 228s ***** demo 228s z = qrandn (-5, 5e6); 228s [c x] = hist (z,linspace(-1.5,1.5,200),1); 228s figure(1) 228s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 228s 228s z = qrandn (-0.14286, 5e6); 228s [c x] = hist (z,linspace(-2,2,200),1); 228s figure(2) 228s plot(x,c,"r."); axis tight; axis([-2,2]); 228s 228s z = qrandn (2.75, 5e6); 228s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 228s figure(3) 228s semilogy(x,c,"r."); axis tight; axis([-100,100]); 228s 228s # --------- 228s # Figures from the reference paper. 228s ***** error qrandn ([1 2], 1) 228s ***** error qrandn (4, 1) 228s ***** error qrandn (3, 1) 228s ***** error qrandn (2.5, 1, 2, 3) 228s ***** error qrandn (2.5) 228s ***** test 228s q = 1.5; 228s s = [2, 3]; 228s z = qrandn (q, s); 228s assert (isnumeric (z) && isequal (size (z), s)); 228s 6 tests, 6 passed, 0 known failure, 0 skipped 228s [inst/ismissing.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ismissing.m 228s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 228s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 228s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 228s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 228s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 228s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 228s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 228s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 228s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 228s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 228s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 228s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 228s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 228s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 228s ***** assert (ismissing (double (NaN)), true) 228s ***** assert (ismissing (single (NaN)), true) 228s ***** assert (ismissing (' '), true) 228s ***** assert (ismissing ({''}), true) 228s ***** assert (ismissing ({' '}), false) 228s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 228s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 228s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 228s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 228s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 228s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 228s ***** assert (ismissing ({'123', '', 123}), [false false false]) 228s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 228s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 228s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 228s ***** assert (ismissing ({1, 2, 3}), [false false false]) 228s ***** assert (ismissing ([struct struct struct]), [false false false]) 228s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 228s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 228s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 228s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 228s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 228s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 228s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 228s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 228s ***** assert (ismissing ([]), logical([])) 228s ***** assert (ismissing (''), logical([])) 228s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 228s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 228s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 228s ***** error ismissing () 228s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 228s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 228s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 228s ***** error ismissing (struct, 1) 228s 49 tests, 49 passed, 0 known failure, 0 skipped 228s [inst/cophenet.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cophenet.m 228s ***** demo 228s randn ("seed", 5) # for reproducibility 228s X = randn (10,2); 228s y = pdist (X); 228s Z = linkage (y, "average"); 228s cophenet (Z, y) 228s ***** error cophenet () 228s ***** error cophenet (1) 228s ***** error ... 228s cophenet (ones (2,2), 1) 228s ***** error ... 228s cophenet ([1 2 1], "a") 228s ***** error ... 228s cophenet ([1 2 1], [1 2]) 228s 5 tests, 5 passed, 0 known failure, 0 skipped 228s [inst/jackknife.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/jackknife.m 228s ***** demo 228s for k = 1:1000 228s rand ("seed", k); # for reproducibility 228s x = rand (10, 1); 228s s(k) = std (x); 228s jackstat = jackknife (@std, x); 228s j(k) = 10 * std (x) - 9 * mean (jackstat); 228s endfor 228s figure(); 228s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 228s ***** demo 228s for k = 1:1000 228s randn ("seed", k); # for reproducibility 228s x = randn (1, 50); 228s rand ("seed", k); # for reproducibility 228s y = rand (1, 50); 228s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 228s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 228s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 228s endfor 228s t = (j - sqrt (1 / 12)) ./ sqrt (v); 228s figure(); 228s plot (sort (tcdf (t, 49)), ... 228s "-;Almost linear mapping indicates good fit with t-distribution.;") 228s ***** test 228s ##Example from Quenouille, Table 1 228s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 228s jackstat = jackknife ( @(x) 1/mean(x), d ); 228s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 228s 1 test, 1 passed, 0 known failure, 0 skipped 228s [inst/regression_ttest.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/regression_ttest.m 228s ***** error regression_ttest (); 228s ***** error regression_ttest (1); 228s ***** error ... 228s regression_ttest ([1 2 NaN]', [2 3 4]'); 228s ***** error ... 228s regression_ttest ([1 2 Inf]', [2 3 4]'); 228s ***** error ... 228s regression_ttest ([1 2 3+i]', [2 3 4]'); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 NaN]'); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 Inf]'); 228s ***** error ... 228s regression_ttest ([1 2 3]', [3 4 3+i]'); 228s ***** error ... 228s regression_ttest ([1 2 3]', [3 4 4 5]'); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 228s ***** error ... 228s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 228s 16 tests, 16 passed, 0 known failure, 0 skipped 228s [inst/isoutlier.m] 228s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/isoutlier.m 228s ***** demo 228s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 228s TF = isoutlier (A, "mean") 228s ***** demo 228s ## Use a moving detection method to detect local outliers in a sine wave 228s 228s x = -2*pi:0.1:2*pi; 228s A = sin(x); 228s A(47) = 0; 228s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 228s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 228s plot (time, A) 228s hold on 228s plot (time(TF), A(TF), "x") 228s datetick ('x', 20, 'keepticks') 228s legend ("Original Data", "Outlier Data") 228s ***** demo 228s ## Locate an outlier in a vector of data and visualize the outlier 228s 228s x = 1:10; 228s A = [60 59 49 49 58 100 61 57 48 58]; 228s [TF, L, U, C] = isoutlier (A); 228s plot (x, A); 228s hold on 228s plot (x(TF), A(TF), "x"); 228s xlim ([1,10]); 228s line ([1,10], [L, L], "Linestyle", ":"); 228s text (1.1, L-2, "Lower Threshold"); 228s line ([1,10], [U, U], "Linestyle", ":"); 228s text (1.1, U-2, "Upper Threshold"); 228s line ([1,10], [C, C], "Linestyle", ":"); 228s text (1.1, C-3, "Center Value"); 228s legend ("Original Data", "Outlier Data"); 228s ***** test 228s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 228s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 228s assert (isoutlier (A, "median"), ... 228s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 228s ***** test 228s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 228s [TF, L, U, C] = isoutlier (A, "mean"); 228s assert (L, -109.2459044922864, 1e-12) 228s assert (U, 264.9792378256198, 1e-12) 228s assert (C, 77.8666666666666, 1e-12) 228s ***** test 228s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 228s [TF, L, U, C] = isoutlier (A, "median"); 228s assert (L, 50.104386688966386, 1e-12) 228s assert (U, 67.895613311033610, 1e-12) 228s assert (C, 59) 228s ***** test 228s A = magic(5) + diag(200*ones(1,5)); 228s T = logical (eye (5)); 228s assert (isoutlier (A, 2), T) 228s ***** test 228s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 228s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 228s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 228s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 228s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 228s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 228s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 228s assert (L, l, 1e-4) 228s assert (U, u, 1e-4) 228s assert (C, c) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 229s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 229s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 229s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 229s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 229s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 229s assert (L, l, 1e-4) 229s assert (U, u, 1e-4) 229s assert (C, c) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "movmean", 5); 229s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 229s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 229s 52.5979, 51.0627]; 229s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 229s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 229s 66.9373]; 229s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 229s 60.6, 59.8, 59.25, 59]; 229s assert (L, l, 1e-4) 229s assert (U, u, 1e-4) 229s assert (C, c, 1e-4) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 229s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 229s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 229s 52.5979, 51.0627]; 229s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 229s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 229s 66.9373]; 229s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 229s 60.6, 59.8, 59.25, 59]; 229s assert (L, l, 1e-4) 229s assert (U, u, 1e-4) 229s assert (C, c, 1e-4) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "gesd"); 229s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 34.235977035439944, 1e-12) 229s assert (U, 89.764022964560060, 1e-12) 229s assert (C, 62) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 229s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 31.489256770616173, 1e-12) 229s assert (U, 92.510743229383820, 1e-12) 229s assert (C, 62) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 229s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 23.976664158788935, 1e-12) 229s assert (U, 100.02333584121110, 1e-12) 229s assert (C, 62) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "grubbs"); 229s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 54.642809574646606, 1e-12) 229s assert (U, 63.511036579199555, 1e-12) 229s assert (C, 59.076923076923080, 1e-12) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 229s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 54.216083184201850, 1e-12) 229s assert (U, 63.937762969644310, 1e-12) 229s assert (C, 59.076923076923080, 1e-12) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 229s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 229s assert (L, 57) 229s assert (U, 100) 229s assert (C, 78.5) 229s ***** test 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 229s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 229s assert (L, 57.5) 229s assert (U, 62) 229s assert (C, 59.75) 229s ***** shared A 229s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 229s ***** error ... 229s isoutlier (A, "movmedian", 0); 229s ***** error ... 229s isoutlier (A, "movmedian", []); 229s ***** error ... 229s isoutlier (A, "movmedian", [2 3 4]); 229s ***** error ... 229s isoutlier (A, "movmedian", 1.4); 229s ***** error ... 229s isoutlier (A, "movmedian", [0 1]); 229s ***** error ... 229s isoutlier (A, "movmedian", [2 -1]); 229s ***** error ... 229s isoutlier (A, "movmedian", {2 3}); 229s ***** error ... 229s isoutlier (A, "movmedian", "char"); 229s 229s ***** error ... 229s isoutlier (A, "movmean", 0); 229s ***** error ... 229s isoutlier (A, "movmean", []); 229s ***** error ... 229s isoutlier (A, "movmean", [2 3 4]); 229s ***** error ... 229s isoutlier (A, "movmean", 1.4); 229s ***** error ... 229s isoutlier (A, "movmean", [0 1]); 229s ***** error ... 229s isoutlier (A, "movmean", [2 -1]); 229s ***** error ... 229s isoutlier (A, "movmean", {2 3}); 229s ***** error ... 229s isoutlier (A, "movmean", "char"); 229s 229s ***** error ... 229s isoutlier (A, "percentiles", [-1 90]); 229s ***** error ... 229s isoutlier (A, "percentiles", [10 -90]); 229s ***** error ... 229s isoutlier (A, "percentiles", [90]); 229s ***** error ... 229s isoutlier (A, "percentiles", [90 20]); 229s ***** error ... 229s isoutlier (A, "percentiles", [90 20]); 229s ***** error ... 229s isoutlier (A, "percentiles", [10 20 90]); 229s ***** error ... 229s isoutlier (A, "percentiles", {10 90}); 229s ***** error ... 229s isoutlier (A, "percentiles", "char"); 229s 229s ***** error ... 229s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "SamplePoints", 15); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 229s 229s ***** error ... 229s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 229s ***** error ... 229s isoutlier (A, "gesd", "ThresholdFactor", 3); 229s ***** error ... 229s isoutlier (A, "grubbs", "ThresholdFactor", 3); 229s 229s ***** error ... 229s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 229s ***** error ... 229s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 229s 229s ***** error ... 229s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 229s ***** error isoutlier (A, {1}); 229s ***** error isoutlier (A, true); 229s ***** error isoutlier (A, false); 229s ***** error isoutlier (A, 0); 229s ***** error isoutlier (A, [1 2]); 229s ***** error isoutlier (A, -2); 229s 59 tests, 59 passed, 0 known failure, 0 skipped 229s [inst/dendrogram.m] 229s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dendrogram.m 229s ***** demo 229s ## simple dendrogram 229s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 229s y(:,3) = 1:5; 229s dendrogram (y); 229s title ("simple dendrogram"); 229s ***** demo 229s ## another simple dendrogram 229s v = 2 * rand (30, 1) - 1; 229s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 229s y = linkage (squareform (d, "tovector")); 229s dendrogram (y); 229s title ("another simple dendrogram"); 229s ***** demo 229s ## collapsed tree, find all the leaves of node 5 229s X = randn (60, 2); 229s D = pdist (X); 229s y = linkage (D, "average"); 229s subplot (2, 1, 1); 229s title ("original tree"); 229s dendrogram (y, 0); 229s subplot (2, 1, 2); 229s title ("collapsed tree"); 229s [~, t] = dendrogram (y, 20); 229s find(t == 5) 229s ***** demo 229s ## optimal leaf order 229s X = randn (30, 2); 229s D = pdist (X); 229s y = linkage (D, "average"); 229s order = optimalleaforder (y, D); 229s subplot (2, 1, 1); 229s title ("original leaf order"); 229s dendrogram (y); 229s subplot (2, 1, 2); 229s title ("optimal leaf order"); 229s dendrogram (y, "Reorder", order); 229s ***** demo 229s ## horizontal orientation and labels 229s X = randn (8, 2); 229s D = pdist (X); 229s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 229s "Sneezy"; "Dopey"]; 229s y = linkage (D, "average"); 229s dendrogram (y, "Orientation", "left", "Labels", L); 229s title ("horizontal orientation and labels"); 229s ***** shared visibility_setting 229s visibility_setting = get (0, "DefaultFigureVisible"); 229s ***** test 229s hf = figure ("visible", "off"); 229s unwind_protect 229s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 229s y(:,3) = 1:5; 229s dendrogram (y); 229s unwind_protect_cleanup 229s close (hf); 229s end_unwind_protect 229s ***** test 229s hf = figure ("visible", "off"); 229s unwind_protect 229s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 229s y(:,3) = 1:5; 229s dendrogram (y); 229s unwind_protect_cleanup 229s close (hf); 229s end_unwind_protect 229s ***** test 229s hf = figure ("visible", "off"); 229s unwind_protect 229s v = 2 * rand (30, 1) - 1; 229s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 229s y = linkage (squareform (d, "tovector")); 229s dendrogram (y); 229s unwind_protect_cleanup 229s close (hf); 229s end_unwind_protect 229s ***** test 229s hf = figure ("visible", "off"); 229s unwind_protect 229s X = randn (30, 2); 229s D = pdist (X); 229s y = linkage (D, "average"); 229s order = optimalleaforder (y, D); 229s subplot (2, 1, 1); 229s title ("original leaf order"); 229s dendrogram (y); 229s subplot (2, 1, 2); 229s title ("optimal leaf order"); 229s dendrogram (y, "Reorder", order); 229s unwind_protect_cleanup 229s close (hf); 229s end_unwind_protect 231s ***** error dendrogram (); 231s ***** error dendrogram (ones (2, 2), 1); 231s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 231s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 231s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 231s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 231s 9 tests, 9 passed, 0 known failure, 0 skipped 231s [inst/boxplot.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/boxplot.m 231s ***** demo 231s axis ([0, 3]); 231s randn ("seed", 1); # for reproducibility 231s girls = randn (10, 1) * 5 + 140; 231s randn ("seed", 2); # for reproducibility 231s boys = randn (13, 1) * 8 + 135; 231s boxplot ({girls, boys}); 231s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 231s title ("Grade 3 heights"); 231s ***** demo 231s randn ("seed", 7); # for reproducibility 231s A = randn (10, 1) * 5 + 140; 231s randn ("seed", 8); # for reproducibility 231s B = randn (25, 1) * 8 + 135; 231s randn ("seed", 9); # for reproducibility 231s C = randn (20, 1) * 6 + 165; 231s data = [A; B; C]; 231s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 231s labels = {"Team A", "Team B", "Team C"}; 231s pos = [2, 1, 3]; 231s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 231s "OutlierTags", "on", "BoxStyle", "filled"); 231s title ("Example of Group splitting with paired vectors"); 231s ***** demo 231s randn ("seed", 1); # for reproducibility 231s data = randn (100, 9); 231s boxplot (data, "notch", "on", "boxstyle", "filled", ... 231s "colors", "ygcwkmb", "whisker", 1.2); 231s title ("Example of different colors specified with characters"); 231s ***** demo 231s randn ("seed", 5); # for reproducibility 231s data = randn (100, 13); 231s colors = [0.7 0.7 0.7; ... 231s 0.0 0.4 0.9; ... 231s 0.7 0.4 0.3; ... 231s 0.7 0.1 0.7; ... 231s 0.8 0.7 0.4; ... 231s 0.1 0.8 0.5; ... 231s 0.9 0.9 0.2]; 231s boxplot (data, "notch", "on", "boxstyle", "filled", ... 231s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 231s title ("Example of different colors specified as RGB values"); 231s ***** error boxplot ("a") 231s ***** error boxplot ({[1 2 3], "a"}) 231s ***** error boxplot ([1 2 3], 1, {2, 3}) 231s ***** error boxplot ([1 2 3], {"a", "b"}) 231s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 231s ***** error boxplot ([1:10], "notch", i) 231s ***** error boxplot ([1:10], "notch", {}) 231s ***** error boxplot (1, "symbol", 1) 231s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 231s ***** error boxplot (1, "orientation", {}) 231s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 231s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 231s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 231s ***** error boxplot (3, "OutlierTags", {}) 231s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 231s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 231s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 231s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 231s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 231s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 231s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 231s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 231s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 231s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 231s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 231s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 231s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 231s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 231s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 231s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 231s ***** error boxplot (rand (3, 3), [1 2]) 231s ***** test 231s hf = figure ("visible", "off"); 231s unwind_protect 231s [a, b] = boxplot (rand (10, 3)); 231s assert (size (a), [7, 3]); 231s assert (numel (b.box), 3); 231s assert (numel (b.whisker), 12); 231s assert (numel (b.median), 3); 231s unwind_protect_cleanup 231s close (hf); 231s end_unwind_protect 231s ***** test 231s hf = figure ("visible", "off"); 231s unwind_protect 231s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 231s assert (numel (b.box_fill), 3); 231s unwind_protect_cleanup 231s close (hf); 231s end_unwind_protect 231s ***** test 231s hf = figure ("visible", "off"); 231s unwind_protect 231s hold on 231s [a, b] = boxplot (rand (10, 3)); 231s assert (ishold, true); 231s unwind_protect_cleanup 231s close (hf); 231s end_unwind_protect 231s 34 tests, 34 passed, 0 known failure, 0 skipped 231s [inst/runstest.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/runstest.m 231s ***** test 231s ## NIST beam deflection data 231s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 231s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 231s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 231s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 231s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 231s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 231s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 231s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 231s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 231s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 231s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 231s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 231s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 231s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 231s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 231s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 231s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 231s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 231s [h, p, stats] = runstest (data, median (data)); 231s expected_h = 1; 231s expected_p = 0.008562; 231s expected_z = 2.6229; 231s assert (h, expected_h); 231s assert (p, expected_p, 1E-6); 231s assert (stats.z, expected_z, 1E-4); 231s ***** shared x 231s x = [45, -60, 1.225, 55.4, -9 27]; 231s ***** test 231s [h, p, stats] = runstest (x); 231s assert (h, 0); 231s assert (p, 0.6, 1e-14); 231s assert (stats.nruns, 5); 231s assert (stats.n1, 3); 231s assert (stats.n0, 3); 231s assert (stats.z, 0.456435464587638, 1e-14); 231s ***** test 231s [h, p, stats] = runstest (x, [], "method", "approximate"); 231s assert (h, 0); 231s assert (p, 0.6481, 1e-4); 231s assert (stats.z, 0.456435464587638, 1e-14); 231s ***** test 231s [h, p, stats] = runstest (x, [], "tail", "left"); 231s assert (h, 0); 231s assert (p, 0.9, 1e-14); 231s assert (stats.z, 1.369306393762915, 1e-14); 231s ***** error runstest (ones (2,20)) 231s ***** error runstest (["asdasda"]) 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], "updown") 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "method", "some") 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 231s ***** error ... 231s runstest ([2 3 4 3 2 3 4], [], "option", "some") 231s 14 tests, 14 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/normstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/normstat.m 231s ***** error normstat () 231s ***** error normstat (1) 231s ***** error normstat ({}, 2) 231s ***** error normstat (1, "") 231s ***** error normstat (i, 2) 231s ***** error normstat (1, i) 231s ***** error ... 231s normstat (ones (3), ones (2)) 231s ***** error ... 231s normstat (ones (2), ones (3)) 231s ***** test 231s mu = 1:6; 231s sigma = 0.2:0.2:1.2; 231s [m, v] = normstat (mu, sigma); 231s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 231s assert (m, mu); 231s assert (v, expected_v, 0.001); 231s ***** test 231s sigma = 0.2:0.2:1.2; 231s [m, v] = normstat (0, sigma); 231s expected_mn = [0, 0, 0, 0, 0, 0]; 231s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 231s assert (m, expected_mn, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/expstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/expstat.m 231s ***** error expstat () 231s ***** error expstat ({}) 231s ***** error expstat ("") 231s ***** error expstat (i) 231s ***** test 231s mu = 1:6; 231s [m, v] = expstat (mu); 231s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 231s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/ncx2stat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/ncx2stat.m 231s ***** error ncx2stat () 231s ***** error ncx2stat (1) 231s ***** error ncx2stat ({}, 2) 231s ***** error ncx2stat (1, "") 231s ***** error ncx2stat (i, 2) 231s ***** error ncx2stat (1, i) 231s ***** error ... 231s ncx2stat (ones (3), ones (2)) 231s ***** error ... 231s ncx2stat (ones (2), ones (3)) 231s ***** shared df, d1 231s df = [2, 0, -1, 1, 4]; 231s d1 = [1, NaN, 3, -1, 2]; 231s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 231s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 231s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 231s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 231s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 231s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 231s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 231s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 231s 16 tests, 16 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/binostat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/binostat.m 231s ***** error binostat () 231s ***** error binostat (1) 231s ***** error binostat ({}, 2) 231s ***** error binostat (1, "") 231s ***** error binostat (i, 2) 231s ***** error binostat (1, i) 231s ***** error ... 231s binostat (ones (3), ones (2)) 231s ***** error ... 231s binostat (ones (2), ones (3)) 231s ***** test 231s n = 1:6; 231s ps = 0:0.2:1; 231s [m, v] = binostat (n, ps); 231s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 231s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s n = 1:6; 231s [m, v] = binostat (n, 0.5); 231s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 231s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 231s [m, v] = binostat (n, 0.5); 231s assert (isnan (m), [true true false true false true false false]) 231s assert (isnan (v), [true true false true false true false false]) 231s assert (m(end), Inf); 231s assert (v(end), Inf); 231s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 231s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 231s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 231s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 231s 15 tests, 15 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/burrstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/burrstat.m 231s ***** error burrstat () 231s ***** error burrstat (1) 231s ***** error burrstat (1, 2) 231s ***** error burrstat ({}, 2, 3) 231s ***** error burrstat (1, "", 3) 231s ***** error burrstat (1, 2, "") 231s ***** error burrstat (i, 2, 3) 231s ***** error burrstat (1, i, 3) 231s ***** error burrstat (1, 2, i) 231s ***** error ... 231s burrstat (ones (3), ones (2), 3) 231s ***** error ... 231s burrstat (ones (2), 2, ones (3)) 231s ***** error ... 231s burrstat (1, ones (2), ones (3)) 231s ***** test 231s [m, v] = burrstat (1, 2, 5); 231s assert (m, 0.4295, 1e-4); 231s assert (v, 0.0655, 1e-4); 231s ***** test 231s [m, v] = burrstat (1, 1, 1); 231s assert (m, Inf); 231s assert (v, Inf); 231s ***** test 231s [m, v] = burrstat (2, 4, 1); 231s assert (m, 2.2214, 1e-4); 231s assert (v, 1.3484, 1e-4); 231s 15 tests, 15 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/wblstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/wblstat.m 231s ***** error wblstat () 231s ***** error wblstat (1) 231s ***** error wblstat ({}, 2) 231s ***** error wblstat (1, "") 231s ***** error wblstat (i, 2) 231s ***** error wblstat (1, i) 231s ***** error ... 231s wblstat (ones (3), ones (2)) 231s ***** error ... 231s wblstat (ones (2), ones (3)) 231s ***** test 231s lambda = 3:8; 231s k = 1:6; 231s [m, v] = wblstat (lambda, k); 231s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 231s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s k = 1:6; 231s [m, v] = wblstat (6, k); 231s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 231s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/fstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/fstat.m 231s ***** error fstat () 231s ***** error fstat (1) 231s ***** error fstat ({}, 2) 231s ***** error fstat (1, "") 231s ***** error fstat (i, 2) 231s ***** error fstat (1, i) 231s ***** error ... 231s fstat (ones (3), ones (2)) 231s ***** error ... 231s fstat (ones (2), ones (3)) 231s ***** test 231s df1 = 1:6; 231s df2 = 5:10; 231s [m, v] = fstat (df1, df2); 231s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 231s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 231s assert (m, expected_mn, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s df1 = 1:6; 231s [m, v] = fstat (df1, 5); 231s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 231s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 231s assert (m, expected_mn, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/nakastat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/nakastat.m 231s ***** error nakastat () 231s ***** error nakastat (1) 231s ***** error nakastat ({}, 2) 231s ***** error nakastat (1, "") 231s ***** error nakastat (i, 2) 231s ***** error nakastat (1, i) 231s ***** error ... 231s nakastat (ones (3), ones (2)) 231s ***** error ... 231s nakastat (ones (2), ones (3)) 231s ***** test 231s [m, v] = nakastat (1, 1); 231s assert (m, 0.8862269254, 1e-10); 231s assert (v, 0.2146018366, 1e-10); 231s ***** test 231s [m, v] = nakastat (1, 2); 231s assert (m, 1.25331413731, 1e-10); 231s assert (v, 0.42920367321, 1e-10); 231s ***** test 231s [m, v] = nakastat (2, 1); 231s assert (m, 0.93998560299, 1e-10); 231s assert (v, 0.11642706618, 1e-10); 231s 11 tests, 11 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/ricestat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/ricestat.m 231s ***** error ricestat () 231s ***** error ricestat (1) 231s ***** error ricestat ({}, 2) 231s ***** error ricestat (1, "") 231s ***** error ricestat (i, 2) 231s ***** error ricestat (1, i) 231s ***** error ... 231s ricestat (ones (3), ones (2)) 231s ***** error ... 231s ricestat (ones (2), ones (3)) 231s ***** shared s, sigma 231s s = [2, 0, -1, 1, 4]; 231s sigma = [1, NaN, 3, -1, 2]; 231s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 231s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 231s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 231s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 231s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 231s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 231s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 231s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 231s 16 tests, 16 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/unifstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/unifstat.m 231s ***** error unifstat () 231s ***** error unifstat (1) 231s ***** error unifstat ({}, 2) 231s ***** error unifstat (1, "") 231s ***** error unifstat (i, 2) 231s ***** error unifstat (1, i) 231s ***** error ... 231s unifstat (ones (3), ones (2)) 231s ***** error ... 231s unifstat (ones (2), ones (3)) 231s ***** test 231s a = 1:6; 231s b = 2:2:12; 231s [m, v] = unifstat (a, b); 231s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 231s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s a = 1:6; 231s [m, v] = unifstat (a, 10); 231s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 231s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/tlsstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/tlsstat.m 231s ***** error tlsstat () 231s ***** error tlsstat (1) 231s ***** error tlsstat (1, 2) 231s ***** error tlsstat ({}, 2, 3) 231s ***** error tlsstat (1, "", 3) 231s ***** error tlsstat (1, 2, ["d"]) 231s ***** error tlsstat (i, 2, 3) 231s ***** error tlsstat (1, i, 3) 231s ***** error tlsstat (1, 2, i) 231s ***** error ... 231s tlsstat (ones (3), ones (2), 1) 231s ***** error ... 231s tlsstat (ones (2), 1, ones (3)) 231s ***** error ... 231s tlsstat (1, ones (2), ones (3)) 231s ***** test 231s [m, v] = tlsstat (0, 1, 0); 231s assert (m, NaN); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (0, 1, 1); 231s assert (m, NaN); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (2, 1, 1); 231s assert (m, NaN); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (-2, 1, 1); 231s assert (m, NaN); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (0, 1, 2); 231s assert (m, 0); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (2, 1, 2); 231s assert (m, 2); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (-2, 1, 2); 231s assert (m, -2); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (0, 2, 2); 231s assert (m, 0); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (2, 2, 2); 231s assert (m, 2); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (-2, 2, 2); 231s assert (m, -2); 231s assert (v, NaN); 231s ***** test 231s [m, v] = tlsstat (0, 1, 3); 231s assert (m, 0); 231s assert (v, 3); 231s ***** test 231s [m, v] = tlsstat (0, 2, 3); 231s assert (m, 0); 231s assert (v, 6); 231s ***** test 231s [m, v] = tlsstat (2, 1, 3); 231s assert (m, 2); 231s assert (v, 3); 231s ***** test 231s [m, v] = tlsstat (2, 2, 3); 231s assert (m, 2); 231s assert (v, 6); 231s ***** test 231s [m, v] = tlsstat (-2, 1, 3); 231s assert (m, -2); 231s assert (v, 3); 231s ***** test 231s [m, v] = tlsstat (-2, 2, 3); 231s assert (m, -2); 231s assert (v, 6); 231s 28 tests, 28 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/geostat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/geostat.m 231s ***** error geostat () 231s ***** error geostat ({}) 231s ***** error geostat ("") 231s ***** error geostat (i) 231s ***** test 231s ps = 1 ./ (1:6); 231s [m, v] = geostat (ps); 231s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 231s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/bisastat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/bisastat.m 231s ***** error bisastat () 231s ***** error bisastat (1) 231s ***** error bisastat ({}, 2) 231s ***** error bisastat (1, "") 231s ***** error bisastat (i, 2) 231s ***** error bisastat (1, i) 231s ***** error ... 231s bisastat (ones (3), ones (2)) 231s ***** error ... 231s bisastat (ones (2), ones (3)) 231s ***** test 231s beta = 1:6; 231s gamma = 1:0.2:2; 231s [m, v] = bisastat (beta, gamma); 231s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 231s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 231s assert (m, expected_m, 1e-2); 231s assert (v, expected_v, 1e-3); 231s ***** test 231s beta = 1:6; 231s [m, v] = bisastat (beta, 1.5); 231s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 231s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 231s assert (m, expected_m, 1e-3); 231s assert (v, expected_v, 1e-4); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/hnstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/hnstat.m 231s ***** error hnstat () 231s ***** error hnstat (1) 231s ***** error hnstat ({}, 2) 231s ***** error hnstat (1, "") 231s ***** error hnstat (i, 2) 231s ***** error hnstat (1, i) 231s ***** error ... 231s hnstat (ones (3), ones (2)) 231s ***** error ... 231s hnstat (ones (2), ones (3)) 231s ***** test 231s [m, v] = hnstat (0, 1); 231s assert (m, 0.7979, 1e-4); 231s assert (v, 0.3634, 1e-4); 231s ***** test 231s [m, v] = hnstat (2, 1); 231s assert (m, 2.7979, 1e-4); 231s assert (v, 0.3634, 1e-4); 231s ***** test 231s [m, v] = hnstat (2, 2); 231s assert (m, 3.5958, 1e-4); 231s assert (v, 1.4535, 1e-4); 231s ***** test 231s [m, v] = hnstat (2, 2.5); 231s assert (m, 3.9947, 1e-4); 231s assert (v, 2.2711, 1e-4); 231s ***** test 231s [m, v] = hnstat (1.5, 0.5); 231s assert (m, 1.8989, 1e-4); 231s assert (v, 0.0908, 1e-4); 231s ***** test 231s [m, v] = hnstat (-1.5, 0.5); 231s assert (m, -1.1011, 1e-4); 231s assert (v, 0.0908, 1e-4); 231s 14 tests, 14 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/plstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/plstat.m 231s ***** shared x, Fx 231s x = [0, 1, 3, 4, 7, 10]; 231s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 231s ***** assert (plstat (x, Fx), 4.15) 231s ***** test 231s [m, v] = plstat (x, Fx); 231s assert (v, 10.3775, 1e-14) 231s ***** error plstat () 231s ***** error plstat (1) 231s ***** error ... 231s plstat ([0, 1, 2], [0, 1]) 231s ***** error ... 231s plstat ([0], [1]) 231s ***** error ... 231s plstat ([0, 1, 2], [0, 1, 1.5]) 231s ***** error ... 231s plstat ([0, 1, 2], [0, i, 1]) 231s ***** error ... 231s plstat ([0, i, 2], [0, 0.5, 1]) 231s ***** error ... 231s plstat ([0, i, 2], [0, 0.5i, 1]) 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/gpstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/gpstat.m 231s ***** error gpstat () 231s ***** error gpstat (1) 231s ***** error gpstat (1, 2) 231s ***** error gpstat ({}, 2, 3) 231s ***** error gpstat (1, "", 3) 231s ***** error gpstat (1, 2, "") 231s ***** error gpstat (i, 2, 3) 231s ***** error gpstat (1, i, 3) 231s ***** error gpstat (1, 2, i) 231s ***** error ... 231s gpstat (ones (3), ones (2), 3) 231s ***** error ... 231s gpstat (ones (2), 2, ones (3)) 231s ***** error ... 231s gpstat (1, ones (2), ones (3)) 231s ***** shared x, y 231s x = [-Inf, -1, 0, 1/2, 1, Inf]; 231s y = [0, 0.5, 1, 2, Inf, Inf]; 231s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 231s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 231s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 231s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 231s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 231s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 231s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 231s 19 tests, 19 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/gevstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/gevstat.m 231s ***** error gevstat () 231s ***** error gevstat (1) 231s ***** error gevstat (1, 2) 231s ***** error gevstat ({}, 2, 3) 231s ***** error gevstat (1, "", 3) 231s ***** error gevstat (1, 2, "") 231s ***** error gevstat (i, 2, 3) 231s ***** error gevstat (1, i, 3) 231s ***** error gevstat (1, 2, i) 231s ***** error ... 231s gevstat (ones (3), ones (2), 3) 231s ***** error ... 231s gevstat (ones (2), 2, ones (3)) 231s ***** error ... 231s gevstat (1, ones (2), ones (3)) 231s ***** test 231s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 231s sigma = 2; 231s mu = 1; 231s [m, v] = gevstat (k, sigma, mu); 231s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 231s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 231s assert (m, expected_m, -0.001); 231s assert (v, expected_v, -0.001); 231s 13 tests, 13 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/logistat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/logistat.m 231s ***** error logistat () 231s ***** error logistat (1) 231s ***** error logistat ({}, 2) 231s ***** error logistat (1, "") 231s ***** error logistat (i, 2) 231s ***** error logistat (1, i) 231s ***** error ... 231s logistat (ones (3), ones (2)) 231s ***** error ... 231s logistat (ones (2), ones (3)) 231s ***** test 231s [m, v] = logistat (0, 1); 231s assert (m, 0); 231s assert (v, 3.2899, 0.001); 231s ***** test 231s [m, v] = logistat (0, 0.8); 231s assert (m, 0); 231s assert (v, 2.1055, 0.001); 231s ***** test 231s [m, v] = logistat (1, 0.6); 231s assert (m, 1); 231s assert (v, 1.1844, 0.001); 231s ***** test 231s [m, v] = logistat (0, 0.4); 231s assert (m, 0); 231s assert (v, 0.5264, 0.001); 231s ***** test 231s [m, v] = logistat (-1, 0.2); 231s assert (m, -1); 231s assert (v, 0.1316, 0.001); 231s 13 tests, 13 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/tristat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/tristat.m 231s ***** error tristat () 231s ***** error tristat (1) 231s ***** error tristat (1, 2) 231s ***** error tristat ("i", 2, 1) 231s ***** error tristat (0, "d", 1) 231s ***** error tristat (0, 3, {}) 231s ***** error tristat (i, 2, 1) 231s ***** error tristat (0, i, 1) 231s ***** error tristat (0, 3, i) 231s ***** test 231s a = 1:5; 231s b = 3:7; 231s c = 5:9; 231s [m, v] = tristat (a, b, c); 231s expected_m = [3, 4, 5, 6, 7]; 231s assert (m, expected_m); 231s assert (v, ones (1, 5) * (2/3)); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/lognstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/lognstat.m 231s ***** error lognstat () 231s ***** error lognstat (1) 231s ***** error lognstat ({}, 2) 231s ***** error lognstat (1, "") 231s ***** error lognstat (i, 2) 231s ***** error lognstat (1, i) 231s ***** error ... 231s lognstat (ones (3), ones (2)) 231s ***** error ... 231s lognstat (ones (2), ones (3)) 231s ***** test 231s mu = 0:0.2:1; 231s sigma = 0.2:0.2:1.2; 231s [m, v] = lognstat (mu, sigma); 231s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 231s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s sigma = 0.2:0.2:1.2; 231s [m, v] = lognstat (0, sigma); 231s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 231s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/nbinstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/nbinstat.m 231s ***** error nbinstat () 231s ***** error nbinstat (1) 231s ***** error nbinstat ({}, 2) 231s ***** error nbinstat (1, "") 231s ***** error nbinstat (i, 2) 231s ***** error nbinstat (1, i) 231s ***** error ... 231s nbinstat (ones (3), ones (2)) 231s ***** error ... 231s nbinstat (ones (2), ones (3)) 231s ***** test 231s r = 1:4; 231s ps = 0.2:0.2:0.8; 231s [m, v] = nbinstat (r, ps); 231s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 231s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s r = 1:4; 231s [m, v] = nbinstat (r, 0.5); 231s expected_m = [1, 2, 3, 4]; 231s expected_v = [2, 4, 6, 8]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/unidstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/unidstat.m 231s ***** error unidstat () 231s ***** error unidstat ({}) 231s ***** error unidstat ("") 231s ***** error unidstat (i) 231s ***** test 231s N = 1:6; 231s [m, v] = unidstat (N); 231s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 231s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/ncfstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/ncfstat.m 231s ***** error ncfstat () 231s ***** error ncfstat (1) 231s ***** error ncfstat (1, 2) 231s ***** error ncfstat ({}, 2, 3) 231s ***** error ncfstat (1, "", 3) 231s ***** error ncfstat (1, 2, "") 231s ***** error ncfstat (i, 2, 3) 231s ***** error ncfstat (1, i, 3) 231s ***** error ncfstat (1, 2, i) 231s ***** error ... 231s ncfstat (ones (3), ones (2), 3) 231s ***** error ... 231s ncfstat (ones (2), 2, ones (3)) 231s ***** error ... 231s ncfstat (1, ones (2), ones (3)) 231s ***** shared df1, df2, lambda 231s df1 = [2, 0, -1, 1, 4, 5]; 231s df2 = [2, 4, -1, 5, 6, 7]; 231s lambda = [1, NaN, 3, 0, 2, -1]; 231s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 231s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 231s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 231s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 231s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 231s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 231s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 231s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 231s 20 tests, 20 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/chi2stat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/chi2stat.m 231s ***** error chi2stat () 231s ***** error chi2stat ({}) 231s ***** error chi2stat ("") 231s ***** error chi2stat (i) 231s ***** test 231s df = 1:6; 231s [m, v] = chi2stat (df); 231s assert (m, df); 231s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/poisstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/poisstat.m 231s ***** error poisstat () 231s ***** error poisstat ({}) 231s ***** error poisstat ("") 231s ***** error poisstat (i) 231s ***** test 231s lambda = 1 ./ (1:6); 231s [m, v] = poisstat (lambda); 231s assert (m, lambda); 231s assert (v, lambda); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/evstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/evstat.m 231s ***** error evstat () 231s ***** error evstat (1) 231s ***** error evstat ({}, 2) 231s ***** error evstat (1, "") 231s ***** error evstat (i, 2) 231s ***** error evstat (1, i) 231s ***** error ... 231s evstat (ones (3), ones (2)) 231s ***** error ... 231s evstat (ones (2), ones (3)) 231s ***** shared x, y0, y1 231s x = [-5, 0, 1, 2, 3]; 231s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 231s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 231s ***** assert (evstat (x, x), y0, 1e-4) 231s ***** assert (evstat (x, x+6), y1, 1e-4) 231s ***** assert (evstat (x, x-6), NaN (1,5)) 231s 11 tests, 11 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/nctstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/nctstat.m 231s ***** error nctstat () 231s ***** error nctstat (1) 231s ***** error nctstat ({}, 2) 231s ***** error nctstat (1, "") 231s ***** error nctstat (i, 2) 231s ***** error nctstat (1, i) 231s ***** error ... 231s nctstat (ones (3), ones (2)) 231s ***** error ... 231s nctstat (ones (2), ones (3)) 231s ***** shared df, mu 231s df = [2, 0, -1, 1, 4]; 231s mu = [1, NaN, 3, -1, 2]; 231s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 231s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 231s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 231s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 231s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 231s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 231s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 231s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 231s 16 tests, 16 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/raylstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/raylstat.m 231s ***** error raylstat () 231s ***** error raylstat ({}) 231s ***** error raylstat ("") 231s ***** error raylstat (i) 231s ***** test 231s sigma = 1:6; 231s [m, v] = raylstat (sigma); 231s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 231s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/tstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/tstat.m 231s ***** error tstat () 231s ***** error tstat ({}) 231s ***** error tstat ("") 231s ***** error tstat (i) 231s ***** test 231s df = 3:8; 231s [m, v] = tstat (df); 231s expected_m = [0, 0, 0, 0, 0, 0]; 231s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 231s assert (m, expected_m); 231s assert (v, expected_v, 0.001); 231s 5 tests, 5 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/hygestat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/hygestat.m 231s ***** error hygestat () 231s ***** error hygestat (1) 231s ***** error hygestat (1, 2) 231s ***** error hygestat ({}, 2, 3) 231s ***** error hygestat (1, "", 3) 231s ***** error hygestat (1, 2, "") 231s ***** error hygestat (i, 2, 3) 231s ***** error hygestat (1, i, 3) 231s ***** error hygestat (1, 2, i) 231s ***** error ... 231s hygestat (ones (3), ones (2), 3) 231s ***** error ... 231s hygestat (ones (2), 2, ones (3)) 231s ***** error ... 231s hygestat (1, ones (2), ones (3)) 231s ***** test 231s m = 4:9; 231s k = 0:5; 231s n = 1:6; 231s [mn, v] = hygestat (m, k, n); 231s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 231s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 231s assert (mn, expected_mn, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s m = 4:9; 231s k = 0:5; 231s [mn, v] = hygestat (m, k, 2); 231s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 231s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 231s assert (mn, expected_mn, 0.001); 231s assert (v, expected_v, 0.001); 231s 14 tests, 14 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/betastat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/betastat.m 231s ***** error betastat () 231s ***** error betastat (1) 231s ***** error betastat ({}, 2) 231s ***** error betastat (1, "") 231s ***** error betastat (i, 2) 231s ***** error betastat (1, i) 231s ***** error ... 231s betastat (ones (3), ones (2)) 231s ***** error ... 231s betastat (ones (2), ones (3)) 231s ***** test 231s a = -2:6; 231s b = 0.4:0.2:2; 231s [m, v] = betastat (a, b); 231s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 231s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 231s assert (m, expected_m, eps*100); 231s assert (v, expected_v, 0.001); 231s ***** test 231s a = -2:1:6; 231s [m, v] = betastat (a, 1.5); 231s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 231s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 231s assert (m, expected_m); 231s assert (v, expected_v, 0.001); 231s ***** test 231s a = [14 Inf 10 NaN 10]; 231s b = [12 9 NaN Inf 12]; 231s [m, v] = betastat (a, b); 231s expected_m = [14/26 NaN NaN NaN 10/22]; 231s expected_v = [168/18252 NaN NaN NaN 120/11132]; 231s assert (m, expected_m); 231s assert (v, expected_v); 231s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 231s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 231s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 231s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 231s 15 tests, 15 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/invgstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/invgstat.m 231s ***** error invgstat () 231s ***** error invgstat (1) 231s ***** error invgstat ({}, 2) 231s ***** error invgstat (1, "") 231s ***** error invgstat (i, 2) 231s ***** error invgstat (1, i) 231s ***** error ... 231s invgstat (ones (3), ones (2)) 231s ***** error ... 231s invgstat (ones (2), ones (3)) 231s ***** test 231s [m, v] = invgstat (1, 1); 231s assert (m, 1); 231s assert (v, 1); 231s ***** test 231s [m, v] = invgstat (2, 1); 231s assert (m, 2); 231s assert (v, 8); 231s ***** test 231s [m, v] = invgstat (2, 2); 231s assert (m, 2); 231s assert (v, 4); 231s ***** test 231s [m, v] = invgstat (2, 2.5); 231s assert (m, 2); 231s assert (v, 3.2); 231s ***** test 231s [m, v] = invgstat (1.5, 0.5); 231s assert (m, 1.5); 231s assert (v, 6.75); 231s 13 tests, 13 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/gamstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/gamstat.m 231s ***** error gamstat () 231s ***** error gamstat (1) 231s ***** error gamstat ({}, 2) 231s ***** error gamstat (1, "") 231s ***** error gamstat (i, 2) 231s ***** error gamstat (1, i) 231s ***** error ... 231s gamstat (ones (3), ones (2)) 231s ***** error ... 231s gamstat (ones (2), ones (3)) 231s ***** test 231s a = 1:6; 231s b = 1:0.2:2; 231s [m, v] = gamstat (a, b); 231s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 231s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s ***** test 231s a = 1:6; 231s [m, v] = gamstat (a, 1.5); 231s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 231s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 231s assert (m, expected_m, 0.001); 231s assert (v, expected_v, 0.001); 231s 10 tests, 10 passed, 0 known failure, 0 skipped 231s [inst/dist_stat/loglstat.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_stat/loglstat.m 231s ***** error loglstat () 231s ***** error loglstat (1) 231s ***** error loglstat ({}, 2) 231s ***** error loglstat (1, "") 231s ***** error loglstat (i, 2) 231s ***** error loglstat (1, i) 231s ***** error ... 231s loglstat (ones (3), ones (2)) 231s ***** error ... 231s loglstat (ones (2), ones (3)) 231s ***** test 231s [m, v] = loglstat (0, 1); 231s assert (m, Inf, 0.001); 231s assert (v, Inf, 0.001); 231s ***** test 231s [m, v] = loglstat (0, 0.8); 231s assert (m, 4.2758, 0.001); 231s assert (v, Inf, 0.001); 231s ***** test 231s [m, v] = loglstat (0, 0.6); 231s assert (m, 1.9820, 0.001); 231s assert (v, Inf, 0.001); 231s ***** test 231s [m, v] = loglstat (0, 0.4); 231s assert (m, 1.3213, 0.001); 231s assert (v, 2.5300, 0.001); 231s ***** test 231s [m, v] = loglstat (0, 0.2); 231s assert (m, 1.0690, 0.001); 231s assert (v, 0.1786, 0.001); 231s 13 tests, 13 passed, 0 known failure, 0 skipped 231s [inst/pcares.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/pcares.m 231s ***** demo 231s x = [ 7 26 6 60; 231s 1 29 15 52; 231s 11 56 8 20; 231s 11 31 8 47; 231s 7 52 6 33; 231s 11 55 9 22; 231s 3 71 17 6; 231s 1 31 22 44; 231s 2 54 18 22; 231s 21 47 4 26; 231s 1 40 23 34; 231s 11 66 9 12; 231s 10 68 8 12]; 231s 231s ## As we increase the number of principal components, the norm 231s ## of the residuals matrix will decrease 231s r1 = pcares (x,1); 231s n1 = norm (r1) 231s r2 = pcares (x,2); 231s n2 = norm (r2) 231s r3 = pcares (x,3); 231s n3 = norm (r3) 231s r4 = pcares (x,4); 231s n4 = norm (r4) 231s ***** test 231s load hald 231s r1 = pcares (ingredients,1); 231s r2 = pcares (ingredients,2); 231s r3 = pcares (ingredients,3); 231s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 231s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 231s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 231s ***** error pcares (ones (20, 3)) 231s ***** error ... 231s pcares (ones (30, 2), 3) 231s 3 tests, 3 passed, 0 known failure, 0 skipped 231s [inst/mnrfit.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/mnrfit.m 231s ***** error mnrfit (ones (50,1)) 231s ***** error ... 231s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 231s ***** error ... 231s mnrfit (ones (50, 4, 2), ones (50, 1)) 231s ***** error ... 231s mnrfit (ones (50, 4), ones (50, 1, 3)) 231s ***** error ... 231s mnrfit (ones (50, 4), ones (45,1)) 231s ***** error ... 231s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 231s ***** error ... 231s mnrfit (ones (5, 4), ones (5, 1), "model") 231s ***** error ... 231s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 231s ***** error ... 231s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 231s ***** error ... 231s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 231s ***** error ... 231s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 231s ***** error ... 231s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 231s ***** error ... 231s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 231s 13 tests, 13 passed, 0 known failure, 0 skipped 231s [inst/optimalleaforder.m] 231s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/optimalleaforder.m 231s ***** demo 231s randn ("seed", 5) # for reproducibility 231s X = randn (10, 2); 231s D = pdist (X); 231s tree = linkage(D, 'average'); 231s optimalleaforder (tree, D, 'Transformation', 'linear') 231s ***** error optimalleaforder () 232s ***** error optimalleaforder (1) 232s ***** error optimalleaforder (ones (2, 2), 1) 232s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 232s ***** error optimalleaforder ([1 2 1], [1 2 3]) 232s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 232s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 232s 7 tests, 7 passed, 0 known failure, 0 skipped 232s [inst/hotelling_t2test2.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hotelling_t2test2.m 232s ***** error hotelling_t2test2 (); 232s ***** error ... 232s hotelling_t2test2 ([2, 3, 4, 5, 6]); 232s ***** error ... 232s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 232s ***** error ... 232s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 232s ***** error ... 232s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 232s ***** error ... 232s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 232s ***** error ... 232s hotelling_t2test2 (ones (20,1), ones (20,2)); 232s ***** error ... 232s hotelling_t2test2 (ones (20,2), ones (25,3)); 232s ***** test 232s randn ("seed", 1); 232s x1 = randn (60000, 5); 232s randn ("seed", 5); 232s x2 = randn (30000, 5); 232s [h, pval, stats] = hotelling_t2test2 (x1, x2); 232s assert (h, 0); 232s assert (stats.df1, 5); 232s assert (stats.df2, 89994); 232s 14 tests, 14 passed, 0 known failure, 0 skipped 232s [inst/fitgmdist.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitgmdist.m 232s ***** demo 232s ## Generate a two-cluster problem 232s C1 = randn (100, 2) + 2; 232s C2 = randn (100, 2) - 2; 232s data = [C1; C2]; 232s 232s ## Perform clustering 232s GMModel = fitgmdist (data, 2); 232s 232s ## Plot the result 232s figure 232s [heights, bins] = hist3([C1; C2]); 232s [xx, yy] = meshgrid(bins{1}, bins{2}); 232s bbins = [xx(:), yy(:)]; 232s contour (reshape (GMModel.pdf (bbins), size (heights))); 232s ***** demo 232s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 232s nbOrientations = 2; 232s initial_orientations = [38.0; 18.0]; 232s initial_weights = ones (1, nbOrientations) / nbOrientations; 232s initial_Sigma = 10 * ones (1, 1, nbOrientations); 232s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 232s "ComponentProportion", initial_weights); 232s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 232s "RegularizationValue", 0.0001) 232s ***** test 232s load fisheriris 232s classes = unique (species); 232s [~, score] = pca (meas, "NumComponents", 2); 232s options.MaxIter = 1000; 232s options.TolFun = 1e-6; 232s options.Display = "off"; 232s GMModel = fitgmdist (score, 2, "Options", options); 232s assert (isa (GMModel, "gmdistribution"), true); 232s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 232s 1 test, 1 passed, 0 known failure, 0 skipped 232s [inst/fitcnet.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitcnet.m 232s ***** demo 232s ## Train a Neural Network on the Fisher's Iris data set and display 232s ## a confusion chart with the classification results. 232s 232s load fisheriris 232s Mdl = fitcnet (meas, species); 232s pred_species = resubPredict (Mdl); 232s confusionchart (species, pred_species); 232s ***** error fitcnet () 232s ***** error fitcnet (ones (4,1)) 232s ***** error 232s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 232s ***** error 232s fitcnet (ones (4,2), ones (3, 1)) 232s ***** error 232s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 232s 5 tests, 5 passed, 0 known failure, 0 skipped 232s [inst/normplot.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/normplot.m 232s ***** demo 232s h = normplot([1:20]); 232s ***** demo 232s h = normplot([1:20;5:2:44]'); 232s ***** demo 232s ax = newplot(); 232s h = normplot(ax, [1:20]); 232s ax = gca; 232s h = normplot(ax, [-10:10]); 232s set (ax, "xlim", [-11, 21]); 232s ***** error normplot (); 232s ***** error normplot (23); 232s ***** error normplot (23, [1:20]); 232s ***** error normplot (ones(3,4,5)); 232s ***** test 232s hf = figure ("visible", "off"); 232s unwind_protect 232s ax = newplot (hf); 232s h = normplot (ax, [1:20]); 232s ax = gca; 232s h = normplot(ax, [-10:10]); 232s set (ax, "xlim", [-11, 21]); 232s unwind_protect_cleanup 232s close (hf); 232s end_unwind_protect 232s ***** test 232s hf = figure ("visible", "off"); 232s unwind_protect 232s h = normplot([1:20;5:2:44]'); 232s unwind_protect_cleanup 232s close (hf); 232s end_unwind_protect 232s 6 tests, 6 passed, 0 known failure, 0 skipped 232s [inst/Clustering/CalinskiHarabaszEvaluation.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Clustering/CalinskiHarabaszEvaluation.m 232s ***** test 232s load fisheriris 232s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 232s assert (class (eva), "CalinskiHarabaszEvaluation"); 232s 1 test, 1 passed, 0 known failure, 0 skipped 232s [inst/Clustering/ClusterCriterion.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Clustering/ClusterCriterion.m 232s ***** error ... 232s ClusterCriterion ("1", "kmeans", [1:6]) 232s ***** error ... 232s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 232s ***** error ... 232s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 232s ***** error ... 232s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 232s 4 tests, 4 passed, 0 known failure, 0 skipped 232s [inst/Clustering/SilhouetteEvaluation.m] 232s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Clustering/SilhouetteEvaluation.m 232s ***** test 232s load fisheriris 232s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 232s assert (class (eva), "SilhouetteEvaluation"); 233s 1 test, 1 passed, 0 known failure, 0 skipped 233s [inst/Clustering/DaviesBouldinEvaluation.m] 233s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Clustering/DaviesBouldinEvaluation.m 233s ***** test 233s load fisheriris 233s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 233s assert (class (eva), "DaviesBouldinEvaluation"); 233s 1 test, 1 passed, 0 known failure, 0 skipped 233s [inst/Clustering/GapEvaluation.m] 233s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Clustering/GapEvaluation.m 233s ***** test 233s load fisheriris 233s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 233s "referencedistribution", "uniform"); 233s assert (class (eva), "GapEvaluation"); 235s 1 test, 1 passed, 0 known failure, 0 skipped 235s [inst/fullfact.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fullfact.m 235s ***** demo 235s ## Full factorial design with 3 binary variables 235s fullfact (3) 235s ***** demo 235s ## Full factorial design with 3 ordinal variables 235s fullfact ([2, 3, 4]) 235s ***** error fullfact (); 235s ***** error fullfact (2, 5); 235s ***** error fullfact (2.5); 235s ***** error fullfact (0); 235s ***** error fullfact (-3); 235s ***** error fullfact (3+2i); 235s ***** error fullfact (Inf); 235s ***** error fullfact (NaN); 235s ***** error fullfact ([1, 2, -3]); 235s ***** error fullfact ([0, 1, 2]); 235s ***** error fullfact ([1, 2, NaN]); 235s ***** error fullfact ([1, 2, Inf]); 235s ***** test 235s A = fullfact (2); 235s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 235s ***** test 235s A = fullfact ([1, 2]); 235s assert (A, [1, 1; 1, 2]); 235s ***** test 235s A = fullfact ([1, 2, 4]); 235s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 235s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 235s assert (A, A_out); 235s 15 tests, 15 passed, 0 known failure, 0 skipped 235s [inst/pca.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/pca.m 235s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 235s ***** test 235s x=[7 4 3 235s 4 1 8 235s 6 3 5 235s 8 6 1 235s 8 5 7 235s 7 2 9 235s 5 3 3 235s 9 5 8 235s 7 4 5 235s 8 2 2]; 235s R = corrcoef (x); 235s [V, lambda] = eig (R); 235s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 235s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 235s ***** 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 235s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 235s F = zscore(x)*B; 235s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 235s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 235s ***** test 235s x=[1,2,3;2,1,3]'; 235s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 235s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 235s m(:,1) = m(:,1)*sign(COEFF(1,1)); 235s m(:,2) = m(:,2)*sign(COEFF(1,2)); 235s ***** assert(COEFF,m(1:2,:),10*eps); 235s ***** assert(SCORE,-m,10*eps); 235s ***** assert(latent,[1.5;.5],10*eps); 235s ***** assert(tsquare,[4;4;4]/3,10*eps); 235s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 235s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 235s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 235s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 235s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 235s !!!!! known failure 235s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 235s 235s Location | Observed | Expected | Reason 235s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 235s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 235s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 235s ***** test 235s x=x'; 235s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 235s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 235s m(:,1) = m(:,1)*sign(COEFF(1,1)); 235s m(:,2) = m(:,2)*sign(COEFF(1,2)); 235s m(:,3) = m(:,3)*sign(COEFF(3,3)); 235s ***** assert(COEFF,m,10*eps); 235s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 235s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 235s ***** assert(latent,[1;0;0],10*eps); 235s ***** assert(tsquare,[0.5;0.5],10*eps) 235s ***** test 235s [COEFF,SCORE,latent,tsquare] = pca(x); 235s ***** assert(COEFF,m(:, 1),10*eps); 235s ***** assert(SCORE,-m(1:2,1),10*eps); 235s ***** assert(latent,[1],10*eps); 235s ***** assert(tsquare,[0.5;0.5],10*eps) 235s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 235s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 235s ***** error pca([1 2; 3 4], "NumComponents", -4) 235s ***** error pca([1 2; 3 4], "Rows", 1) 235s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 235s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 235s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 235s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 235s ***** error pca([1 2; 3 4], "XXX", 1) 235s 32 tests, 31 passed, 1 known failure, 0 skipped 235s [inst/nanmin.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/nanmin.m 235s ***** demo 235s ## Find the column minimum values and their indices 235s ## for matrix data with missing values. 235s 235s x = magic (3); 235s x([1, 6:9]) = NaN 235s [y, ind] = nanmin (x) 235s ***** demo 235s ## Find the minimum of all the values in an array, ignoring missing values. 235s ## Create a 2-by-5-by-3 array x with some missing values. 235s 235s x = reshape (1:30, [2, 5, 3]); 235s x([10:12, 25]) = NaN 235s 235s ## Find the minimum of the elements of x. 235s 235s y = nanmin (x, [], 'all') 235s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 235s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 235s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 235s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 235s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 235s ***** shared x, y 235s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 235s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 235s y = x; 235s y(2,3,1) = 0.51; 235s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 235s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 235s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 235s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 235s ***** assert (nanmin (x, [], 'all'), -2.95) 235s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 235s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 235s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 235s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 235s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 235s ***** test 235s xx = repmat ([1:20;6:25], [5 2 6 3]); 235s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 235s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 235s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 235s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 235s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 235s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 235s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 235s ***** assert (nanmin (magic (3), [], 3), magic (3)) 235s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 235s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 235s ***** assert (nanmin (ones (2), 3), ones (2,2)) 235s ***** error ... 235s nanmin (y, [], [1, 1, 2]) 235s ***** error ... 235s [v, idx] = nanmin(x, y, [1 2]) 235s 24 tests, 24 passed, 0 known failure, 0 skipped 235s [inst/glmfit.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/glmfit.m 235s ***** demo 235s rand ("seed", 1); 235s X = rand (100, 1); 235s b_true = [0.5; -1.2]; 235s mu = exp (b_true(1) + b_true(2) * X); 235s randp ("seed", 1); 235s y = poissrnd (mu); 235s ## Fit a GLM model using the poisson distribution 235s [b,dev] = glmfit (X, y, 'poisson'); 235s ***** demo 235s x = [2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300]'; 235s n = [48 42 31 34 31 21 23 23 21 16 17 21]'; 235s y = [1 2 0 3 8 8 14 17 19 15 17 21]'; 235s [b,dev] = glmfit (x,[y n],'binomial','Link','probit'); 235s ***** test 235s rand ("seed", 1); 235s X = rand (50, 1); 235s b_true = [0.4; 1.5]; 235s mu_true = exp (b_true(1) + b_true(2) * X); 235s randp ("seed", 1); 235s y = poissrnd (mu_true); 235s b = glmfit (X, y, "poisson", "link", "log"); 235s assert (b(1), b_true(1), 0.5); 235s assert (b(2), b_true(2), 0.5); 235s ***** test 235s rand ("seed", 1); 235s X1 = rand (50, 1); 235s X2 = rand (50, 1) * 0.5; 235s b_true = [0.4; 1.5; -0.7]; 235s mu_true = exp (b_true(1) + b_true(2) * X1 + b_true(3) * X2); 235s randp ("seed", 1); 235s y = poissrnd(mu_true); 235s [b, dev] = glmfit ([X1, X2], y, "poisson", "link", "log"); 235s assert (b(1), b_true(1), 1); 235s assert (b(2), b_true(2), 1); 235s assert (b(3), b_true(3), 1); 235s assert (dev < 60, true); 235s ***** error glmfit () 235s ***** error glmfit (1) 235s ***** error glmfit (1, 2) 235s ***** error ... 235s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 235s ***** error ... 235s glmfit ('abc', rand (6, 1), 'poisson') 235s ***** error ... 235s glmfit (rand (5, 2), 'abc', 'poisson') 235s ***** error ... 235s glmfit (rand (5, 2), rand (6, 1), 'poisson') 235s ***** error ... 235s glmfit (rand (6, 2), rand (6, 1), 3) 235s ***** error ... 235s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 235s ***** error ... 235s glmfit (rand (5, 2), rand (5, 3), 'binomial') 235s ***** error ... 235s glmfit (rand (5, 2), rand (5, 2), 'normal') 235s ***** error ... 235s glmfit (rand (5, 2), rand (5, 1), 'gamma') 235s ***** error ... 235s glmfit (rand (5, 2), rand (5, 1), 'inverse gaussian') 235s ***** error ... 235s glmfit (rand (5, 2), rand (5, 1), 'loguniform') 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log','dfv','dfgvd'}) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@log, 'derivative', @exp}) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@exp, @log, @(x) eye(e)}) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 2) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 0) 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 'asda') 235s ***** error ... 235s glmfit (rand(5,2), rand(5,1), 'poisson', 'param', 'log', 'constant', 'on') 235s 26 tests, 26 passed, 0 known failure, 0 skipped 235s [inst/ttest2.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ttest2.m 235s ***** test 235s a = 1:5; 235s b = 6:10; 235s b(5) = NaN; 235s [h,p,ci,stats] = ttest2 (a,b); 235s assert (h, 1); 235s assert (p, 0.002535996080258229, 1e-14); 235s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 235s assert (stats.tstat, -4.582575694955839, 1e-14); 235s assert (stats.df, 7); 235s assert (stats.sd, 1.4638501094228, 1e-13); 235s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 235s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 235s 3 tests, 3 passed, 0 known failure, 0 skipped 235s [inst/fitrgam.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitrgam.m 235s ***** demo 235s # Train a RegressionGAM Model for synthetic values 235s 235s f1 = @(x) cos (3 *x); 235s f2 = @(x) x .^ 3; 235s 235s # generate x1 and x2 for f1 and f2 235s x1 = 2 * rand (50, 1) - 1; 235s x2 = 2 * rand (50, 1) - 1; 235s 235s # calculate y 235s y = f1(x1) + f2(x2); 235s 235s # add noise 235s y = y + y .* 0.2 .* rand (50,1); 235s X = [x1, x2]; 235s 235s # create an object 235s a = fitrgam (X, y, "tol", 1e-3) 235s ***** test 235s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 235s y = [1; 2; 3; 4]; 235s a = fitrgam (x, y); 235s assert ({a.X, a.Y}, {x, y}) 235s assert ({a.BaseModel.Intercept}, {2.5000}) 235s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 235s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 235s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 235s assert ({a.Formula}, {[]}) 235s ***** test 235s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 235s y = [1; 2; 3; 4]; 235s pnames = {"A", "B", "C", "D"}; 235s formula = "Y ~ A + B + C + D + A:C"; 235s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 235s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 235s assert ({a.IntMatrix}, {intMat}) 235s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 235s assert ({a.Formula}, {formula}) 235s ***** error fitrgam () 235s ***** error fitrgam (ones(10,2)) 235s ***** error 235s fitrgam (ones (4,2), ones (4, 1), "K") 235s ***** error 235s fitrgam (ones (4,2), ones (3, 1)) 235s ***** error 235s fitrgam (ones (4,2), ones (3, 1), "K", 2) 235s 7 tests, 7 passed, 0 known failure, 0 skipped 235s [inst/combnk.m] 235s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/combnk.m 235s ***** demo 235s c = combnk (1:5, 2); 235s disp ("All pairs of integers between 1 and 5:"); 235s disp (c); 235s ***** test 235s c = combnk (1:3, 2); 235s assert (c, [1, 2; 1, 3; 2, 3]); 235s ***** test 235s c = combnk (1:3, 6); 235s assert (isempty (c)); 235s ***** test 235s c = combnk ({1, 2, 3}, 2); 235s assert (c, {1, 2; 1, 3; 2, 3}); 236s ***** test 236s c = combnk ("hello", 2); 236s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 236s 4 tests, 4 passed, 0 known failure, 0 skipped 236s [inst/cluster.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cluster.m 236s ***** error cluster () 236s ***** error cluster ([1 1], "Cutoff", 1) 236s ***** error cluster ([1 2 1], "Bogus", 1) 236s ***** error cluster ([1 2 1], "Cutoff", -1) 236s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 236s ***** test 236s 6 tests, 6 passed, 0 known failure, 0 skipped 236s [inst/logistic_regression.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/logistic_regression.m 236s ***** test 236s # Output compared to following MATLAB commands 236s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 236s # P = mnrval(B,X) 236s X = [1.489381332449196, 1.1534152241851305; ... 236s 1.8110085304863965, 0.9449666896938425; ... 236s -0.04453299665130296, 0.34278203449678646; ... 236s -0.36616019468850347, 1.130254275908322; ... 236s 0.15339143291005095, -0.7921044310668951; ... 236s -1.6031878794469698, -1.8343471035233376; ... 236s -0.14349521143198166, -0.6762996896828459; ... 236s -0.4403818557740143, -0.7921044310668951; ... 236s -0.7372685001160434, -0.027793137932169563; ... 236s -0.11875465773681024, 0.5512305689880763]; 236s Y = [1,1,1,1,1,0,0,0,0,0]'; 236s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 236s ***** test 236s # Output compared to following MATLAB commands 236s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 236s load carbig 236s X = [Acceleration Displacement Horsepower Weight]; 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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, ... 236s 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]'; 236s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 236s assert (DEV, 433.197174495549, 1e-05); 236s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 236s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 236s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 236s assert (SLOPE(1), 0.104762463756714, 1e-05); 236s assert (SLOPE(2), 0.0103357623191891, 1e-05); 236s assert (SLOPE(3), 0.0645199313242276, 1e-05); 236s assert (SLOPE(4), 0.00166377028388103, 1e-05); 236s 2 tests, 2 passed, 0 known failure, 0 skipped 236s [inst/cdfplot.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cdfplot.m 236s ***** demo 236s x = randn(100,1); 236s cdfplot (x); 236s ***** test 236s hf = figure ("visible", "off"); 236s unwind_protect 236s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 236s [hCDF, stats] = cdfplot (x); 236s assert (stats.min, 2); 236s assert (stats.max, 6); 236s assert (stats.median, 3.5); 236s assert (stats.std, 1.35400640077266, 1e-14); 236s unwind_protect_cleanup 236s close (hf); 236s end_unwind_protect 236s ***** test 236s hf = figure ("visible", "off"); 236s unwind_protect 236s x = randn(100,1); 236s cdfplot (x); 236s unwind_protect_cleanup 236s close (hf); 236s end_unwind_protect 236s ***** error cdfplot (); 236s ***** error cdfplot ([x',x']); 236s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 236s 5 tests, 5 passed, 0 known failure, 0 skipped 236s [inst/standardizeMissing.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/standardizeMissing.m 236s ***** assert (standardizeMissing (1, 1), NaN) 236s ***** assert (standardizeMissing (1, 0), 1) 236s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 236s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 236s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 236s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 236s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 236s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 236s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 236s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 236s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 236s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 236s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 236s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 236s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 236s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 236s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 236s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 236s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 236s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 236s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 236s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 236s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 236s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 236s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 236s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 236s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 236s ***** assert (standardizeMissing (single (1), true), single (NaN)) 236s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 236s ***** assert (standardizeMissing (true, true), true) 236s ***** assert (standardizeMissing (true, 1), true) 236s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 236s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 236s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 236s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 236s ***** error standardizeMissing (); 236s ***** error standardizeMissing (1); 236s ***** error standardizeMissing (1,2,3); 236s ***** error standardizeMissing ({'abc', 1}, 1); 236s ***** error standardizeMissing (struct ('a','b'), 1); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 236s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 236s 49 tests, 49 passed, 0 known failure, 0 skipped 236s [inst/confusionmat.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/confusionmat.m 236s ***** test 236s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 236s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 236s 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; ... 236s 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]; 236s assert (confusionmat (Yt, Yp), C) 236s 1 test, 1 passed, 0 known failure, 0 skipped 236s [inst/squareform.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/squareform.m 236s ***** shared v, m 236s v = 1:6; 236s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 236s ***** assert (squareform (v), m) 236s ***** assert (squareform (squareform (v)), v) 236s ***** assert (squareform (m), v) 236s ***** assert (squareform (v'), m) 236s ***** assert (squareform (1), [0 1;1 0]) 236s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 236s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 236s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 236s ***** test 236s for c = {@single, @double, @uint8, @uint32, @uint64} 236s f = c{1}; 236s assert (squareform (f (v)), f (m)) 236s assert (squareform (f (m)), f (v)) 236s endfor 236s 9 tests, 9 passed, 0 known failure, 0 skipped 236s [inst/fillmissing.m] 236s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fillmissing.m 236s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 236s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 236s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 236s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 236s ***** test 236s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 236s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 236s assert (fillmissing (x, "constant", 99), y); 236s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 236s assert (fillmissing (x, "constant", [94:99]), y); 236s assert (fillmissing (x, "constant", [94:99]'), y); 236s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 236s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 236s assert (fillmissing (x, "constant", [94:99], 1), y); 236s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 236s assert (fillmissing (x, "constant", [96:99], 2), y); 236s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 236s assert (fillmissing (x, "constant", [94:99], 3), y); 236s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 236s assert (fillmissing (x, "constant", [88:99], 99), y); 236s ***** test 236s x = reshape ([1:24], 4, 3, 2); 236s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s y = x; 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 236s assert (fillmissing (x, "constant", [94:99], 1), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 236s assert (fillmissing (x, "constant", [92:99], 2), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 236s assert (fillmissing (x, "constant", [88:99], 3), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 236s assert (fillmissing (x, "constant", [76:99], 99), y); 236s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 236s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 236s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 236s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 236s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 236s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 236s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 236s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s y = x; 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 236s y([8]) = 99; 236s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 236s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 236s y = x; 236s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 236s y([6, 18, 20, 21]) = 99; 236s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 236s y(y == 99) = 88; 236s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 236s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 236s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 236s y([8]) = 94; 236s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 236s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 236s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 236s y = x; 236s y(isnan (y)) = 88; 236s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 236s y = x; 236s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 236s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 236s y = x; 236s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 236s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 236s y = x; 236s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 236s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 236s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 236s ***** test 236s x = reshape ([1:24],4,3,2); 236s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s y = x; 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 236s assert (fillmissing (x, "constant", [94:99], 1), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 236s assert (fillmissing (x, "constant", [92:99], 2), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 236s assert (fillmissing (x, "constant", [88:99], 3), y); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 236s assert (fillmissing (x, "constant", [76:99], 99), y); 236s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 236s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** test 236s x = reshape ([1:24], 4, 3, 2); 236s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s y = x; 236s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 236s assert (fillmissing (x, "next", 1), y); 236s y = x; 236s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 236s assert (fillmissing (x, "next", 2), y); 236s y = x; 236s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 236s assert (fillmissing (x, "next", 3), y); 236s assert (fillmissing (x, "next", 99), x); 236s y = x; 236s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 236s assert (fillmissing (x, "previous", 1), y); 236s y = x; 236s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 236s assert (fillmissing (x, "previous", 2), y); 236s y = x; 236s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 236s assert (fillmissing (x, "previous", 3), y); 236s assert (fillmissing (x, "previous", 99), x); 236s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 236s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 236s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 236s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 236s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 236s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 236s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 236s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 236s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 236s y = x; 236s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 236s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 236s y = x; 236s y([16, 19, 21]) = [4, 7, 9]; 236s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 236s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 236s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 236s y = x; 236s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 236s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 236s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 236s y = x; 236s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 236s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 236s y = x; 236s y([2, 5]) = [14, 17]; 236s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 236s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 236s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 236s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 236s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 236s ***** test 236s x = reshape ([1:24], 4, 3, 2); 236s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s y = x; 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 236s assert (fillmissing (x, "nearest", 1), y); 236s y = x; 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 236s assert (fillmissing (x, "nearest", 2), y); 236s y = x; 236s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 236s assert (fillmissing (x, "nearest", 3), y); 236s assert (fillmissing (x, "nearest", 99), x); 236s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 236s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 236s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 236s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 236s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 236s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 236s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 236s y = x; 236s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 236s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 236s y = x; 236s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 236s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 236s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 236s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 236s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 236s ***** test 236s x = reshape ([1:24], 4, 3, 2); 236s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 236s y = reshape ([1:24], 4, 3, 2); 236s y([1, 9, 14, 19, 22, 23]) = NaN; 236s assert (fillmissing (x, "linear", 2), y); 236s y = reshape ([1:24], 4, 3, 2); 236s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 236s assert (fillmissing (x, "linear", 3), y); 236s assert (fillmissing (x, "linear", 99), x); 236s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 236s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 236s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 236s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 236s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 236s y(8) = 8; 236s assert (fillmissing (x, "linear", "endvalues", 0), y); 236s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 236s y = x; 236s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 236s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 236s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 236s y = x; 236s y(isnan(y)) = 0; 236s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 236s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 236s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 236s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 236s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 236s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 236s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 236s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 236s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 236s ***** test <60965> 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 236s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 236s !!!!! known bug: https://octave.org/testfailure/?60965 236s interp1: invalid METHOD 'makima' 236s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 236s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 236s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 236s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 236s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 236s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 236s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 236s ***** 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]) 236s ***** test 236s x = reshape ([1:24], 3, 4, 2); 236s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 236s y = x; 236s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 236s assert (fillmissing (x, "movmean", 3), y); 236s assert (fillmissing (x, "movmean", [1, 1]), y); 236s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 236s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 236s y = x; 236s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 236s assert (fillmissing (x, "movmean", 3, 2), y); 236s assert (fillmissing (x, "movmean", [1, 1], 2), y); 236s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 236s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 236s y([1, 18]) = NaN; 236s y(6) = 9; 236s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 236s y = x; 236s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 236s y(8) = 8; 236s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 236s y = x; 236s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 236s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 236s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 236s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 236s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 236s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 236s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 236s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 236s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 236s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 236s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 237s ***** 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]) 237s ***** test 237s x = reshape ([1:24], 3, 4, 2); 237s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 237s y = x; 237s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 237s assert (fillmissing (x, "movmedian", 3), y); 237s assert (fillmissing (x, "movmedian", [1, 1]), y); 237s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 237s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 237s y = x; 237s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 237s assert (fillmissing (x, "movmedian", 3, 2), y); 237s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 237s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 237s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 237s y([1,18]) = NaN; 237s y(6) = 9; 237s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 237s y = x; 237s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 237s y(8) = 8; 237s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 237s y = x; 237s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 237s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 237s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 237s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 237s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 237s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 237s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 237s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 237s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 237s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 237s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 237s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 237s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 237s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 237s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 237s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 237s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 237s ***** function A = testfcn (x, y, z) 237s if (isempty (y)) 237s A = z; 237s elseif (numel (y) == 1) 237s A = repelem (x(1), numel(z)); 237s else 237s A = interp1 (y, x, z, "linear", "extrap"); 237s endif 237s ***** endfunction 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 237s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 237s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 237s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 237s ***** 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] 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 237s ***** 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]' 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 237s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 237s ***** 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) 237s ***** 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] 237s ***** test 237s ***** function A = testfcn (x, y, z) 237s if (isempty (y)) 237s A = z; 237s elseif (numel (y) == 1) 237s A = repelem (x(1), numel(z)); 237s else 237s A = interp1 (y, x, z, "linear", "extrap"); 237s endif 237s ***** endfunction 237s x = reshape ([1:24], 3, 4, 2); 237s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 237s y = x; 237s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 237s assert (fillmissing (x, @testfcn, 3), y); 237s assert (fillmissing (x, @testfcn, [1, 1]), y); 237s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 237s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 237s y= x; 237s y(isnan (x)) = 99; 237s y(8) = 8; 237s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 237s y = x; 237s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 237s assert (fillmissing (x, @testfcn, 3, 2), y); 237s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 237s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 237s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 237s y(1) = NaN; 237s y([6, 18, 21]) = [9, 24, 24]; 237s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 237s y = x; 237s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 237s y(8) = 8; 237s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 237s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 237s y(8) = 99; 237s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 237s y([6, 18, 20, 21]) = 99; 237s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 237s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 237s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 237s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 237s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 237s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 237s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 237s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 237s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 237s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 237s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 237s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 237s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 237s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 237s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 237s ***** 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]) 237s ***** test 237s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 237s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 237s y = x; 237s y([4, 7, 12]) = 0; 237s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 237s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 237s y = x; 237s y([5, 7, 12]) = 0; 237s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 237s y = x; 237s y([4, 5, 7]) = 0; 237s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 237s ***** test 237s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 237s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 237s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 237s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 237s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 237s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 237s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 237s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 237s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 237s ***** test 237s x = [NaN, 2, 3]; 237s [~, idx] = fillmissing (x, "previous"); 237s assert (idx, logical ([0, 0, 0])); 237s [~, idx] = fillmissing (x, "movmean", 1); 237s assert (idx, logical ([0, 0, 0])); 237s x = [1:3; 4:6; 7:9]; 237s x([2, 4, 7, 9]) = NaN; 237s [~, idx] = fillmissing (x, "linear"); 237s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 237s [~, idx] = fillmissing (x, "movmean", 2); 237s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 237s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 237s assert (A, [1, 2, 3, 3, NaN]); 237s assert (idx, logical ([0, 0, 0, 1, 0])); 237s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 237s assert (A, [1, 2, 3, 3, NaN]); 237s assert (idx, logical ([0, 0, 0, 1, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 237s assert (A, [1, 2, 3, 3, NaN]); 237s assert (idx, logical ([0, 0, 0, 1, 0])); 237s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 237s assert (A, [1, 2, 1, 4, 1]); 237s assert (idx, logical ([0, 1, 0, 1, 0])); 237s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 237s assert (A, [1, NaN, 1, NaN, 1]); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 237s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 237s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 237s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 237s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 237s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 237s ***** test 237s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 237s assert (idx, logical ([0, 1, 1, 1, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 237s assert (A, [1, 2, 2, NaN, NaN]); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 237s assert (A, [1, 1, 1, 1, 1]); 237s assert (idx, logical ([0, 1, 0, 1, 1])); 237s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 237s assert (A, [1, NaN, 1, NaN, NaN]); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s ***** test 237s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 237s assert (A, [1, 3, 5]); 237s assert (idx, logical ([0, 1, 0])); 237s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 237s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 237s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 237s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 237s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 237s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 237s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 237s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 237s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 237s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 237s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 237s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 237s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 237s ***** test 237s [A, idx] = fillmissing (" a b c", "constant", " "); 237s assert (A, " a b c"); 237s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 237s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 237s assert (A, {"foo", "", "bar", ""}); 237s assert (idx, logical ([0, 0, 0, 0])); 237s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 237s assert (A, {"foo", "", "bar", ""}); 237s assert (idx, logical ([0, 0, 0, 0])); 237s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 237s assert (A, "afaoaoa"); 237s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 237s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 237s assert (A, " f o o "); 237s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 237s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 237s assert (A, {"a", "foo", "a"}); 237s assert (idx, logical ([1, 0, 1])); 237s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 237s assert (A, {"", "foo", ""}); 237s assert (idx, logical ([0, 0, 0])); 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 237s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 237s ***** 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])) 237s ***** 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])) 237s ***** test 237s x = logical ([1, 0, 1, 0, 1]); 237s [~, idx] = fillmissing (x, "constant", true); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([0, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 0])); 237s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 237s assert (idx, logical ([0, 0, 0, 0, 0])) 237s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])) 237s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([0, 0, 1, 0, 1])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 237s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 237s ***** 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])) 237s ***** 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])) 237s ***** test 237s x = int32 ([1, 2, 3, 4, 5]); 237s [~, idx] = fillmissing (x, "constant", 0); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 237s assert (idx, logical ([0, 0, 1, 0, 0])); 237s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([0, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 0])); 237s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 237s assert (idx, logical ([0, 0, 0, 0, 0])); 237s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([1, 0, 1, 0, 1])); 237s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 237s assert (idx, logical ([0, 0, 1, 0, 1])); 237s ***** test 237s [A, idx] = fillmissing ([struct, struct], "constant", 1); 237s assert (A, [struct, struct]) 237s assert (idx, [false, false]) 237s ***** error fillmissing () 237s ***** error fillmissing (1) 237s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 237s ***** error fillmissing (1, 2) 237s ***** error fillmissing (1, "foo") 237s ***** error fillmissing (1, @(x) x, 1) 237s ***** error fillmissing (1, @(x,y) x+y, 1) 237s ***** error fillmissing ("a b c", "linear") 237s ***** error fillmissing ({"a", "b"}, "linear") 237s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 237s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 237s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 237s ***** error fillmissing (1, "constant", []) 237s ***** error fillmissing (1, "constant", "a") 237s ***** error fillmissing ("a", "constant", 1) 237s ***** error fillmissing ("a", "constant", {"foo"}) 237s ***** error fillmissing ({"foo"}, "constant", 1) 237s ***** error fillmissing (1, "movmean") 237s ***** error fillmissing (1, "movmedian") 237s ***** error fillmissing (1, "constant", 1, 0) 237s ***** error fillmissing (1, "constant", 1, -1) 237s ***** error fillmissing (1, "constant", 1, [1, 2]) 237s ***** error fillmissing (1, "constant", 1, "samplepoints") 237s ***** error fillmissing (1, "constant", 1, "foo") 237s ***** error fillmissing (1, "constant", 1, 1, "foo") 237s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 237s ***** error fillmissing ("foo", "next", "endvalues", 1) 237s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 237s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 237s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 237s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 237s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 237s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 237s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 237s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 237s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 237s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 237s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 237s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 237s ***** error fillmissing (true, "linear", "missinglocations", true) 237s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 237s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 237s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 237s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 237s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 237s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 237s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 237s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 237s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 237s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 237s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 237s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 237s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 237s ***** error fillmissing (1, @(x,y,z) x+y+z) 237s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 237s 380 tests, 379 passed, 0 known failure, 1 skipped 237s [inst/hmmviterbi.m] 237s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hmmviterbi.m 237s ***** test 237s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 237s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 237s transprob = [0.8, 0.2; 0.4, 0.6]; 237s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 237s vpath = hmmviterbi (sequence, transprob, outprob); 237s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 237s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 237s assert (vpath, expected); 237s ***** test 237s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 237s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 237s transprob = [0.8, 0.2; 0.4, 0.6]; 237s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 237s symbols = {"A", "B", "C"}; 237s statenames = {"One", "Two"}; 237s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 237s "statenames", statenames); 237s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 237s "One", "One", "One", "One", "One", "One", "One", "Two", ... 237s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 237s assert (vpath, expected); 237s 2 tests, 2 passed, 0 known failure, 0 skipped 237s [inst/confusionchart.m] 237s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/confusionchart.m 237s ***** demo 237s ## Setting the chart properties 237s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 237s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 237s confusionchart (Yt, Yp, "Title", ... 237s "Demonstration with summaries","Normalization",... 237s "absolute","ColumnSummary", "column-normalized","RowSummary",... 237s "row-normalized") 237s ***** demo 237s ## Cellstr as inputs 237s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 237s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 237s m = confusionmat (Yt, Yp); 237s confusionchart (m, {"Positive", "Negative"}); 237s ***** demo 237s ## Editing the object properties 237s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 237s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 237s cm = confusionchart (Yt, Yp); 237s cm.Title = "This is an example with a green diagonal"; 237s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 237s ***** demo 237s ## Confusion chart in a uipanel 237s h = uipanel (); 237s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 237s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 237s cm = confusionchart (h, Yt, Yp); 237s ***** demo 237s ## Sorting classes 237s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 237s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 237s cm = confusionchart (Yt, Yp, "Title", ... 237s "Classes are sorted in ascending order"); 237s cm = confusionchart (Yt, Yp, "Title", ... 237s "Classes are sorted according to clusters"); 237s sortClasses (cm, "cluster"); 237s ***** shared visibility_setting 237s visibility_setting = get (0, "DefaultFigureVisible"); 237s ***** test 237s set (0, "DefaultFigureVisible", "off"); 237s fail ("confusionchart ()", "Invalid call"); 237s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 238s ".* YLabel .* string"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 238s ".* FontName .* string"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 238s ".* FontSize .* numeric"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 238s ".* DiagonalColor .* color"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 238s ".* OffDiagonalColor .* color"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 238s ".* invalid .* Normalization"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 238s ".* invalid .* ColumnSummary"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 238s ".* invalid .* RowSummary"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 238s ".* invalid .* GridVisible"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 238s ".* invalid .* HandleVisibility"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 238s ".* invalid .* OuterPosition"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 238s ".* invalid .* Position"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s ***** test 238s set (0, "DefaultFigureVisible", "off"); 238s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 238s set (0, "DefaultFigureVisible", visibility_setting); 238s 18 tests, 18 passed, 0 known failure, 0 skipped 238s [inst/tabulate.m] 238s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/tabulate.m 238s ***** demo 238s ## Generate a frequency table for a vector of data in a cell array 238s load patients 238s 238s ## Display the first seven entries of the Gender variable 238s gender = Gender(1:7) 238s 238s ## Compute the equency table that shows the number and 238s ## percentage of Male and Female patients 238s tabulate (Gender) 238s ***** demo 238s ## Create a frequency table for a vector of positive integers 238s load patients 238s 238s ## Display the first seven entries of the Gender variable 238s height = Height(1:7) 238s 238s ## Create a frequency table that shows, in its second and third columns, 238s ## the number and percentage of patients with a particular height. 238s table = tabulate (Height); 238s 238s ## Display the first and last seven entries of the frequency table 238s first = table(1:7,:) 238s 238s last = table(end-6:end,:) 238s ***** demo 238s ## Create a frequency table from a character array 238s load carsmall 238s 238s ## Tabulate the data in the Origin variable, which shows the 238s ## country of origin of each car in the data set 238s tabulate (Origin) 238s ***** demo 238s ## Create a frequency table from a numeric vector with NaN values 238s load carsmall 238s 238s ## The carsmall dataset contains measurements of 100 cars 238s total_cars = length (MPG) 238s ## For six cars, the MPG value is missing 238s missingMPG = length (MPG(isnan (MPG))) 238s 238s ## Create a frequency table using MPG 238s tabulate (MPG) 238s table = tabulate (MPG); 238s 238s ## Only 94 cars were used 238s valid_cars = sum (table(:,2)) 238s ***** test 238s load patients 238s table = tabulate (Gender); 238s assert (table{1,1}, "Male"); 238s assert (table{2,1}, "Female"); 238s assert (table{1,2}, 47); 238s assert (table{2,2}, 53); 238s ***** test 238s load patients 238s table = tabulate (Height); 238s assert (table(end-4,:), [68, 15, 15]); 238s assert (table(end-3,:), [69, 8, 8]); 238s assert (table(end-2,:), [70, 11, 11]); 238s assert (table(end-1,:), [71, 10, 10]); 238s assert (table(end,:), [72, 4, 4]); 238s ***** error tabulate (ones (3)) 238s ***** error tabulate ({1, 2, 3, 4}) 238s ***** error ... 238s tabulate ({"a", "b"; "a", "c"}) 238s 5 tests, 5 passed, 0 known failure, 0 skipped 238s [inst/crosstab.m] 238s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/crosstab.m 238s ***** error crosstab () 239s ***** error crosstab (1) 239s ***** error crosstab (ones (2), [1 1]) 239s ***** error crosstab ([1 1], ones (2)) 239s ***** error crosstab ([1], [1 2]) 239s ***** error crosstab ([1 2], [1]) 239s ***** test 239s load carbig 239s [table, chisq, p, labels] = crosstab (cyl4, when, org); 239s assert (table(2,3,1), 38); 239s assert (labels{3,3}, "Japan"); 239s ***** test 239s load carbig 239s [table, chisq, p, labels] = crosstab (cyl4, when, org); 239s assert (table(2,3,2), 17); 239s assert (labels{1,3}, "USA"); 239s 8 tests, 8 passed, 0 known failure, 0 skipped 239s [inst/wblplot.m] 239s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/wblplot.m 239s ***** demo 239s x = [16 34 53 75 93 120]; 239s wblplot (x); 239s ***** demo 239s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 239s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 239s [h, p] = wblplot (x, c); 239s p 239s ***** demo 239s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 239s [h, p] = wblplot (x, [], [], 0.05); 239s p 239s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 239s ***** demo 239s x = [46 64 83 105 123 150 150]; 239s c = [0 0 0 0 0 0 1]; 239s f = [1 1 1 1 1 1 4]; 239s wblplot (x, c, f, 0.05); 239s ***** demo 239s x = [46 64 83 105 123 150 150]; 239s c = [0 0 0 0 0 0 1]; 239s f = [1 1 1 1 1 1 4]; 239s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 239s wblplot (x - 30.92, c, f, 0.05); 239s ***** test 239s hf = figure ("visible", "off"); 239s unwind_protect 239s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 239s [h, p] = wblplot (x, [], [], 0.05); 239s assert (numel (h), 4) 239s assert (p(1), 146.2545, 1E-4) 239s assert (p(2), 1.1973, 1E-4) 239s assert (p(3), 0.9999, 5E-5) 239s unwind_protect_cleanup 239s close (hf); 239s end_unwind_protect 239s 1 test, 1 passed, 0 known failure, 0 skipped 239s [inst/gscatter.m] 239s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/gscatter.m 239s ***** demo 239s load fisheriris; 239s X = meas(:,3:4); 239s cidcs = kmeans (X, 3, "Replicates", 5); 239s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 239s title ("Fisher's iris data"); 239s ***** shared visibility_setting 239s visibility_setting = get (0, "DefaultFigureVisible"); 239s ***** test 239s hf = figure ("visible", "off"); 239s unwind_protect 239s load fisheriris; 239s X = meas(:,3:4); 239s cidcs = kmeans (X, 3, "Replicates", 5); 239s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 239s title ("Fisher's iris data"); 239s unwind_protect_cleanup 239s close (hf); 239s end_unwind_protect 239s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 239s ***** error gscatter (); 239s ***** error gscatter ([1]); 239s ***** error gscatter ([1], [2]); 240s ***** error gscatter ('abc', [1 2 3], [1]); 240s ***** error gscatter ([1 2 3], [1 2], [1]); 240s ***** error gscatter ([1 2 3], 'abc', [1]); 240s ***** error gscatter ([1 2], [1 2], [1]); 240s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 240s 9 tests, 9 passed, 0 known failure, 0 skipped 240s [inst/rmmissing.m] 240s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/rmmissing.m 240s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 240s ***** assert (rmmissing ('abcd f'), 'abcdf') 240s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 240s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 240s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 240s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 240s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 240s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 240s ***** test 240s x = [1:6]; 240s x([2,4]) = NaN; 240s [~, idx] = rmmissing (x); 240s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 240s assert (class(idx), 'logical'); 240s x = reshape (x, [2, 3]); 240s [~, idx] = rmmissing (x); 240s assert (idx, logical ([0; 1])); 240s assert (class(idx), 'logical'); 240s [~, idx] = rmmissing (x, 2); 240s assert (idx, logical ([1, 1, 0])); 240s assert (class(idx), 'logical'); 240s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 240s assert (idx, logical ([0; 1])); 240s assert (class(idx), 'logical'); 240s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 240s assert (idx, logical ([0, 0, 0])); 240s assert (class(idx), 'logical'); 240s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 240s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 240s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 240s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 240s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 240s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 240s ***** assert (rmmissing ([]), []) 240s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 240s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 240s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 240s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 240s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 240s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 240s ***** error rmmissing (ones (0,1,2)) 240s ***** error rmmissing () 240s ***** error rmmissing (ones(2,2,2)) 240s ***** error rmmissing ([1 2; 3 4], 5) 240s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 240s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 240s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 240s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 240s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 240s 31 tests, 31 passed, 0 known failure, 0 skipped 240s [inst/ranksum.m] 240s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ranksum.m 240s ***** test 240s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 240s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 240s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 240s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 240s assert (p, 0.004329004329004329, 1e-14); 240s assert (h, true); 240s assert (stats.ranksum, 21.5); 240s ***** test 240s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 240s 49 47 50 60 59 60 62 61 71]'; 240s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 240s 54 50 53 62 62 62 72 60 67]'; 240s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 240s assert (p, 0.1270832752950605, 1e-14); 240s assert (h, false); 240s assert (stats.ranksum, 837.5); 240s assert (stats.zval, -1.140287483634606, 1e-14); 240s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 240s "method", "exact"); 240s assert (p, 0.127343916432862, 1e-14); 240s assert (h, false); 240s assert (stats.ranksum, 837.5); 245s 2 tests, 2 passed, 0 known failure, 0 skipped 245s [inst/clusterdata.m] 245s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/clusterdata.m 245s ***** demo 245s randn ("seed", 1) # for reproducibility 245s r1 = randn (10, 2) * 0.25 + 1; 245s randn ("seed", 5) # for reproducibility 245s r2 = randn (20, 2) * 0.5 - 1; 245s X = [r1; r2]; 245s 245s wnl = warning ("off", "Octave:linkage_savemem", "local"); 245s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 245s scatter (X(:,1), X(:,2), 36, T, "filled"); 245s ***** error ... 245s clusterdata () 245s ***** error ... 245s clusterdata (1) 246s ***** error clusterdata ([1 1], "Bogus", 1) 246s ***** error clusterdata ([1 1], "Depth", 1) 246s 4 tests, 4 passed, 0 known failure, 0 skipped 246s [inst/loadmodel.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/loadmodel.m 246s ***** error loadmodel () 246s ***** error ... 246s loadmodel ("fisheriris.mat") 246s ***** error ... 246s loadmodel ("fail_loadmodel.mdl") 246s ***** error ... 246s loadmodel ("fail_load_model.mdl") 246s 4 tests, 4 passed, 0 known failure, 0 skipped 246s [inst/Regression/RegressionGAM.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/Regression/RegressionGAM.m 246s ***** demo 246s ## Train a RegressionGAM Model for synthetic values 246s f1 = @(x) cos (3 * x); 246s f2 = @(x) x .^ 3; 246s x1 = 2 * rand (50, 1) - 1; 246s x2 = 2 * rand (50, 1) - 1; 246s y = f1(x1) + f2(x2); 246s y = y + y .* 0.2 .* rand (50,1); 246s X = [x1, x2]; 246s a = fitrgam (X, y, "tol", 1e-3) 246s ***** demo 246s ## Declare two different functions 246s f1 = @(x) cos (3 * x); 246s f2 = @(x) x .^ 3; 246s 246s ## Generate 80 samples for f1 and f2 246s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 246s X1 = f1 (x); 246s X2 = f2 (x); 246s 246s ## Create a synthetic response by adding noise 246s rand ("seed", 3); 246s Ytrue = X1 + X2; 246s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 246s 246s ## Assemble predictor data 246s X = [X1, X2]; 246s 246s ## Train the GAM and test on the same data 246s a = fitrgam (X, Y, "order", [5, 5]); 246s [ypred, ySDsd, yInt] = predict (a, X); 246s 246s ## Plot the results 246s figure 246s [sortedY, indY] = sort (Ytrue); 246s plot (sortedY, "r-"); 246s xlim ([0, 80]); 246s hold on 246s plot (ypred(indY), "g+") 246s plot (yInt(indY,1), "k:") 246s plot (yInt(indY,2), "k:") 246s xlabel ("Predictor samples"); 246s ylabel ("Response"); 246s title ("actual vs predicted values for function f1(x) = cos (3x) "); 246s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 246s 246s ## Use 30% Holdout partitioning for training and testing data 246s C = cvpartition (80, "HoldOut", 0.3); 246s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 246s 246s ## Plot the results 246s figure 246s [sortedY, indY] = sort (Ytrue(test(C))); 246s plot (sortedY, 'r-'); 246s xlim ([0, sum(test(C))]); 246s hold on 246s plot (ypred(indY), "g+") 246s plot (yInt(indY,1),'k:') 246s plot (yInt(indY,2),'k:') 246s xlabel ("Predictor samples"); 246s ylabel ("Response"); 246s title ("actual vs predicted values for function f1(x) = cos (3x) "); 246s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 246s ***** test 246s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 246s y = [1; 2; 3; 4]; 246s a = RegressionGAM (x, y); 246s assert ({a.X, a.Y}, {x, y}) 246s assert ({a.BaseModel.Intercept}, {2.5000}) 246s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 246s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 246s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 246s assert ({a.Formula}, {[]}) 246s ***** test 246s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 246s y = [1; 2; 3; 4]; 246s pnames = {"A", "B", "C", "D"}; 246s formula = "Y ~ A + B + C + D + A:C"; 246s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 246s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 246s assert ({a.IntMatrix}, {intMat}) 246s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 246s assert ({a.Formula}, {formula}) 246s ***** error RegressionGAM () 246s ***** error RegressionGAM (ones(10,2)) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (5,1)) 246s ***** error ... 246s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 246s ***** error 246s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 246s ***** error 246s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 246s ***** error ... 246s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 246s ***** error ... 246s predict (RegressionGAM (ones(10,1), ones(10,1))) 246s ***** error ... 246s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 246s ***** error ... 246s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 246s 39 tests, 39 passed, 0 known failure, 0 skipped 246s [inst/kmeans.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/kmeans.m 246s ***** demo 246s ## Generate a two-cluster problem 246s randn ("seed", 31) # for reproducibility 246s C1 = randn (100, 2) + 1; 246s randn ("seed", 32) # for reproducibility 246s C2 = randn (100, 2) - 1; 246s data = [C1; C2]; 246s 246s ## Perform clustering 246s rand ("seed", 1) # for reproducibility 246s [idx, centers] = kmeans (data, 2); 246s 246s ## Plot the result 246s figure; 246s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 246s hold on; 246s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 246s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 246s hold off; 246s ***** demo 246s ## Cluster data using k-means clustering, then plot the cluster regions 246s ## Load Fisher's iris data set and use the petal lengths and widths as 246s ## predictors 246s 246s load fisheriris 246s X = meas(:,3:4); 246s 246s figure; 246s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 246s title ("Fisher's Iris Data"); 246s xlabel ("Petal Lengths (cm)"); 246s ylabel ("Petal Widths (cm)"); 246s 246s ## Cluster the data. Specify k = 3 clusters 246s rand ("seed", 1) # for reproducibility 246s [idx, C] = kmeans (X, 3); 246s x1 = min (X(:,1)):0.01:max (X(:,1)); 246s x2 = min (X(:,2)):0.01:max (X(:,2)); 246s [x1G, x2G] = meshgrid (x1, x2); 246s XGrid = [x1G(:), x2G(:)]; 246s 246s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 246s figure; 246s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 246s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 246s hold on; 246s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 246s title ("Fisher's Iris Data"); 246s xlabel ("Petal Lengths (cm)"); 246s ylabel ("Petal Widths (cm)"); 246s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 246s hold off 246s ***** demo 246s ## Partition Data into Two Clusters 246s 246s randn ("seed", 1) # for reproducibility 246s r1 = randn (100, 2) * 0.75 + ones (100, 2); 246s randn ("seed", 2) # for reproducibility 246s r2 = randn (100, 2) * 0.5 - ones (100, 2); 246s X = [r1; r2]; 246s 246s figure; 246s plot (X(:,1), X(:,2), "."); 246s title ("Randomly Generated Data"); 246s rand ("seed", 1) # for reproducibility 246s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 246s "Replicates", 5, "Display", "final"); 246s figure; 246s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 246s hold on 246s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 246s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 246s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 246s title ("Cluster Assignments and Centroids"); 246s hold off 246s ***** demo 246s ## Assign New Data to Existing Clusters 246s 246s ## Generate a training data set using three distributions 246s randn ("seed", 5) # for reproducibility 246s r1 = randn (100, 2) * 0.75 + ones (100, 2); 246s randn ("seed", 7) # for reproducibility 246s r2 = randn (100, 2) * 0.5 - ones (100, 2); 246s randn ("seed", 9) # for reproducibility 246s r3 = randn (100, 2) * 0.75; 246s X = [r1; r2; r3]; 246s 246s ## Partition the training data into three clusters by using kmeans 246s 246s rand ("seed", 1) # for reproducibility 246s [idx, C] = kmeans (X, 3); 246s 246s ## Plot the clusters and the cluster centroids 246s 246s figure 246s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 246s hold on 246s plot (C(:,1), C(:,2), "kx"); 246s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 246s 246s ## Generate a test data set 246s randn ("seed", 25) # for reproducibility 246s r1 = randn (100, 2) * 0.75 + ones (100, 2); 246s randn ("seed", 27) # for reproducibility 246s r2 = randn (100, 2) * 0.5 - ones (100, 2); 246s randn ("seed", 29) # for reproducibility 246s r3 = randn (100, 2) * 0.75; 246s Xtest = [r1; r2; r3]; 246s 246s ## Classify the test data set using the existing clusters 246s ## Find the nearest centroid from each test data point by using pdist2 246s 246s D = pdist2 (C, Xtest, "euclidean"); 246s [group, ~] = find (D == min (D)); 246s 246s ## Plot the test data and label the test data using idx_test with gscatter 246s 246s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 246s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 246s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 246s "Data classified to Cluster 3", "Location", "NorthWest"); 246s title ("Assign New Data to Existing Clusters"); 246s ***** test 246s samples = 4; 246s dims = 3; 246s k = 2; 246s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 246s "emptyAction", "singleton"); 246s assert (size (cls), [samples, 1]); 246s assert (size (c), [k, dims]); 246s assert (size (d), [k, 1]); 246s assert (size (z), [samples, k]); 246s ***** test 246s samples = 4; 246s dims = 3; 246s k = 2; 246s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 246s "emptyAction", "singleton"); 246s assert (size (cls), [samples, 1]); 246s assert (size (c), [k, dims]); 246s assert (size (d), [k, 1]); 246s assert (size (z), [samples, k]); 246s ***** test 246s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 246s assert (cls, [1; 1]); 246s assert (c, [1.5, 0; NA, NA]); 246s ***** test 246s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 246s "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 246s ***** test 246s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 246s ***** test 246s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 246s ***** error kmeans (rand (3,2), 4); 246s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 246s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 246s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 246s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 246s ***** error kmeans (rand (3,4), 2, "start", "normal"); 246s ***** error kmeans (rand (4,3), 2, "replicates", i); 246s ***** error kmeans (rand (4,3), 2, "replicates", -1); 246s ***** error kmeans (rand (4,3), 2, "replicates", []); 246s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 246s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 246s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 246s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 246s ***** error kmeans (rand (4,3), 2, "maxiter", []); 246s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 246s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 246s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 246s 31 tests, 31 passed, 0 known failure, 0 skipped 246s [inst/slicesample.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/slicesample.m 246s ***** demo 246s ## Define function to sample 246s d = 2; 246s mu = [-1; 2]; 246s rand ("seed", 5) # for reproducibility 246s Sigma = rand (d); 246s Sigma = (Sigma + Sigma'); 246s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 246s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 246s 246s ## Inputs 246s start = ones (1,2); 246s nsamples = 500; 246s K = 500; 246s m = 10; 246s rande ("seed", 4); rand ("seed", 5) # for reproducibility 246s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 246s figure; 246s hold on; 246s plot (smpl(:,1), smpl(:,2), 'x'); 246s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 246s z = reshape (pdf ([x(:), y(:)]), size(x)); 246s mesh (x, y, z, "facecolor", "None"); 246s 246s ## Using sample points to find the volume of half a sphere with radius of .5 246s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 246s int = mean (f (smpl) ./ pdf (smpl)); 246s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 246s trueerr = abs (2/3*pi*.25^(3/2)-int); 246s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 246s fprintf ("Monte Carlo integral error estimate %f\n", errest); 246s fprintf ("The actual error %f\n", trueerr); 246s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 246s ***** demo 246s ## Integrate truncated normal distribution to find normilization constant 246s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 246s nsamples = 1e3; 246s rande ("seed", 4); rand ("seed", 5) # for reproducibility 246s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 246s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 246s x = linspace (-3, 3, 1000); 246s area (x, f(x)); 246s xlabel ("x"); 246s ylabel ("f(x)"); 246s int = mean (f (smpl) ./ pdf (smpl)); 246s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 246s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 246s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 246s fprintf("Monte Carlo integral error estimate %f\n", errest); 246s fprintf("The actual error %f\n", trueerr); 246s ***** test 246s start = 0.5; 246s nsamples = 1e3; 246s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 246s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 246s assert (mean (smpl, 1), 1, .15); 246s assert (var (smpl, 1), 1, .25); 246s ***** error slicesample (); 246s ***** error slicesample (1); 246s ***** error slicesample (1, 1); 246s 4 tests, 4 passed, 0 known failure, 0 skipped 246s [inst/nanmax.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/nanmax.m 246s ***** demo 246s ## Find the column maximum values and their indices 246s ## for matrix data with missing values. 246s 246s x = magic (3); 246s x([1, 6:9]) = NaN 246s [y, ind] = nanmax (x) 246s ***** demo 246s ## Find the maximum of all the values in an array, ignoring missing values. 246s ## Create a 2-by-5-by-3 array x with some missing values. 246s 246s x = reshape (1:30, [2, 5, 3]); 246s x([10:12, 25]) = NaN 246s 246s ## Find the maximum of the elements of x. 246s 246s y = nanmax (x, [], 'all') 246s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 246s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 246s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 246s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 246s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 246s ***** shared x, y 246s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 246s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 246s y = x; 246s y(2,3,1) = 0.51; 246s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 246s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 246s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 246s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 246s ***** assert (nanmax (x, [], 'all'), 6.77) 246s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 246s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 246s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 246s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 246s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 246s ***** test 246s xx = repmat ([1:20;6:25], [5 2 6 3]); 246s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 246s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 246s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 246s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 246s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 246s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 246s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 246s ***** assert (nanmax (magic (3), [], 3), magic (3)) 246s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 246s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 246s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 246s ***** error ... 246s nanmax (y, [], [1, 1, 2]) 246s ***** error ... 246s [v, idx] = nanmax(x, y, [1 2]) 246s 24 tests, 24 passed, 0 known failure, 0 skipped 246s [inst/silhouette.m] 246s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/silhouette.m 246s ***** demo 246s load fisheriris; 246s X = meas(:,3:4); 246s cidcs = kmeans (X, 3, "Replicates", 5); 246s silhouette (X, cidcs); 246s y_labels(cidcs([1 51 101])) = unique (species); 246s set (gca, "yticklabel", y_labels); 246s title ("Fisher's iris data"); 246s ***** error silhouette (); 246s ***** error silhouette ([1 2; 1 1]); 247s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 247s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 247s 4 tests, 4 passed, 0 known failure, 0 skipped 247s [inst/cdfcalc.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cdfcalc.m 247s ***** test 247s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 247s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 247s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 247s assert (xCDF, [2, 3, 4, 5, 6]'); 247s assert (n, 10); 247s ***** shared x 247s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 247s ***** error yCDF = cdfcalc (x); 247s ***** error [yCDF, xCDF] = cdfcalc (); 247s ***** error [yCDF, xCDF] = cdfcalc (x, x); 247s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 247s 5 tests, 5 passed, 0 known failure, 0 skipped 247s [inst/levene_test.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/levene_test.m 247s ***** error levene_test () 247s ***** error ... 247s levene_test (1, 2, 3, 4, 5); 247s ***** error levene_test (randn (50, 2), 0); 247s ***** error ... 247s levene_test (randn (50, 2), [1, 2, 3]); 247s ***** error ... 247s levene_test (randn (50, 1), ones (55, 1)); 247s ***** error ... 247s levene_test (randn (50, 1), ones (50, 2)); 247s ***** error ... 247s levene_test (randn (50, 2), [], 1.2); 247s ***** error ... 247s levene_test (randn (50, 2), "some_string"); 247s ***** error ... 247s levene_test (randn (50, 2), [], "alpha"); 247s ***** error ... 247s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 247s ***** error ... 247s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 247s ***** error ... 247s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 247s ***** warning ... 247s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades); 247s assert (h, 1); 247s assert (pval, 9.523239714592791e-07, 1e-14); 247s assert (W, 8.59529, 1e-5); 247s assert (df, [4, 595]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 247s assert (h, 1); 247s assert (pval, 9.523239714592791e-07, 1e-14); 247s assert (W, 8.59529, 1e-5); 247s assert (df, [4, 595]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades, [], "median"); 247s assert (h, 1); 247s assert (pval, 1.312093241723211e-06, 1e-14); 247s assert (W, 8.415969, 1e-6); 247s assert (df, [4, 595]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades(:,[1:3])); 247s assert (h, 1); 247s assert (pval, 0.004349390980463497, 1e-14); 247s assert (W, 5.52139, 1e-5); 247s assert (df, [2, 357]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 247s assert (h, 1); 247s assert (pval, 0.004355216763951453, 1e-14); 247s assert (W, 5.52001, 1e-5); 247s assert (df, [2, 357]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 247s assert (h, 0); 247s assert (pval, 0.1807494957440653, 2e-14); 247s assert (W, 1.80200, 1e-5); 247s assert (df, [1, 238]); 247s ***** test 247s load examgrades 247s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 247s assert (h, 0); 247s assert (pval, 0.1978225622063785, 2e-14); 247s assert (W, 1.66768, 1e-5); 247s assert (df, [1, 238]); 247s 20 tests, 20 passed, 0 known failure, 0 skipped 247s [inst/cl_multinom.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cl_multinom.m 247s ***** demo 247s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 247s ***** error cl_multinom (); 247s ***** error cl_multinom (1, 2, 3, 4, 5); 247s ***** error ... 247s cl_multinom (1, 2, 3, 4); 247s ***** error ... 247s cl_multinom (1, 2, 3, "some string"); 247s 4 tests, 4 passed, 0 known failure, 0 skipped 247s [inst/qqplot.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/qqplot.m 247s ***** test 247s hf = figure ("visible", "off"); 247s unwind_protect 247s 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]); 247s unwind_protect_cleanup 247s close (hf); 247s end_unwind_protect 247s ***** error qqplot () 247s ***** error qqplot ({1}) 247s ***** error qqplot (ones (2,2)) 247s ***** error qqplot (1, "foobar") 247s ***** error qqplot ([1 2 3], "foobar") 247s 6 tests, 6 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/logifit.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/logifit.m 247s ***** demo 247s ## Sample 3 populations from different logistic distibutions 247s rand ("seed", 5) # for reproducibility 247s r1 = logirnd (2, 1, 2000, 1); 247s rand ("seed", 2) # for reproducibility 247s r2 = logirnd (5, 2, 2000, 1); 247s rand ("seed", 7) # for reproducibility 247s r3 = logirnd (9, 4, 2000, 1); 247s r = [r1, r2, r3]; 247s 247s ## Plot them normalized and fix their colors 247s hist (r, [-6:20], 1); 247s h = findobj (gca, "Type", "patch"); 247s set (h(1), "facecolor", "c"); 247s set (h(2), "facecolor", "g"); 247s set (h(3), "facecolor", "r"); 247s ylim ([0, 0.3]); 247s xlim ([-5, 20]); 247s hold on 247s 247s ## Estimate their MU and LAMBDA parameters 247s mu_sA = logifit (r(:,1)); 247s mu_sB = logifit (r(:,2)); 247s mu_sC = logifit (r(:,3)); 247s 247s ## Plot their estimated PDFs 247s x = [-5:0.5:20]; 247s y = logipdf (x, mu_sA(1), mu_sA(2)); 247s plot (x, y, "-pr"); 247s y = logipdf (x, mu_sB(1), mu_sB(2)); 247s plot (x, y, "-sg"); 247s y = logipdf (x, mu_sC(1), mu_sC(2)); 247s plot (x, y, "-^c"); 247s hold off 247s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 247s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 247s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 247s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 247s mu_sA(1), mu_sA(2)), ... 247s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 247s mu_sB(1), mu_sB(2)), ... 247s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 247s mu_sC(1), mu_sC(2))}) 247s title ("Three population samples from different logistic distibutions") 247s hold off 247s ***** test 247s paramhat = logifit ([1:50]); 247s paramhat_out = [25.5, 8.7724]; 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** test 247s paramhat = logifit ([1:5]); 247s paramhat_out = [3, 0.8645]; 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** test 247s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 247s paramhat_out = [3, 0.8645]; 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** test 247s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 247s paramhat_out = logifit ([1:5, 5]); 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** error logifit (ones (2,5)); 247s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 247s ***** error logifit ([1, 2, 3, 4, 5], 0); 247s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 247s ***** error ... 247s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 247s ***** error ... 247s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 247s ***** error ... 247s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 247s ***** error ... 247s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 247s ***** error ... 247s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 247s 13 tests, 13 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/lognfit.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/lognfit.m 247s ***** demo 247s ## Sample 3 populations from 3 different log-normal distibutions 247s randn ("seed", 1); # for reproducibility 247s r1 = lognrnd (0, 0.25, 1000, 1); 247s randn ("seed", 2); # for reproducibility 247s r2 = lognrnd (0, 0.5, 1000, 1); 247s randn ("seed", 3); # for reproducibility 247s r3 = lognrnd (0, 1, 1000, 1); 247s r = [r1, r2, r3]; 247s 247s ## Plot them normalized and fix their colors 247s hist (r, 30, 2); 247s h = findobj (gca, "Type", "patch"); 247s set (h(1), "facecolor", "c"); 247s set (h(2), "facecolor", "g"); 247s set (h(3), "facecolor", "r"); 247s hold on 247s 247s ## Estimate their mu and sigma parameters 247s mu_sigmaA = lognfit (r(:,1)); 247s mu_sigmaB = lognfit (r(:,2)); 247s mu_sigmaC = lognfit (r(:,3)); 247s 247s ## Plot their estimated PDFs 247s x = [0:0.1:6]; 247s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 247s plot (x, y, "-pr"); 247s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 247s plot (x, y, "-sg"); 247s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 247s plot (x, y, "-^c"); 247s ylim ([0, 2]) 247s xlim ([0, 6]) 247s hold off 247s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 247s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 247s "Normalized HIST of sample 3 with mu=0, σ=1", ... 247s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 247s mu_sigmaA(1), mu_sigmaA(2)), ... 247s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 247s mu_sigmaB(1), mu_sigmaB(2)), ... 247s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 247s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 247s title ("Three population samples from different log-normal distibutions") 247s hold off 247s ***** test 247s randn ("seed", 1); 247s x = lognrnd (3, 5, [1000, 1]); 247s [paramhat, paramci] = lognfit (x, 0.01); 247s assert (paramci(1,1) < 3); 247s assert (paramci(1,2) > 3); 247s assert (paramci(2,1) < 5); 247s assert (paramci(2,2) > 5); 247s ***** error ... 247s lognfit (ones (20,3)) 247s ***** error ... 247s lognfit ({1, 2, 3, 4, 5}) 247s ***** error ... 247s lognfit ([-1, 2, 3, 4, 5]) 247s ***** error lognfit (ones (20,1), 0) 247s ***** error lognfit (ones (20,1), -0.3) 247s ***** error lognfit (ones (20,1), 1.2) 247s ***** error lognfit (ones (20,1), [0.05, 0.1]) 247s ***** error lognfit (ones (20,1), 0.02+i) 247s ***** error ... 247s lognfit (ones (20,1), [], zeros(15,1)) 247s ***** error ... 247s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 247s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 247s 12 tests, 12 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/invgfit.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/invgfit.m 247s ***** demo 247s ## Sample 3 populations from different inverse Gaussian distibutions 247s rand ("seed", 5); randn ("seed", 5); # for reproducibility 247s r1 = invgrnd (1, 0.2, 2000, 1); 247s rand ("seed", 2); randn ("seed", 2); # for reproducibility 247s r2 = invgrnd (1, 3, 2000, 1); 247s rand ("seed", 7); randn ("seed", 7); # for reproducibility 247s r3 = invgrnd (3, 1, 2000, 1); 247s r = [r1, r2, r3]; 247s 247s ## Plot them normalized and fix their colors 247s hist (r, [0.1:0.1:3.2], 9); 247s h = findobj (gca, "Type", "patch"); 247s set (h(1), "facecolor", "c"); 247s set (h(2), "facecolor", "g"); 247s set (h(3), "facecolor", "r"); 247s ylim ([0, 3]); 247s xlim ([0, 3]); 247s hold on 247s 247s ## Estimate their MU and LAMBDA parameters 247s mu_lambdaA = invgfit (r(:,1)); 247s mu_lambdaB = invgfit (r(:,2)); 247s mu_lambdaC = invgfit (r(:,3)); 247s 247s ## Plot their estimated PDFs 247s x = [0:0.1:3]; 247s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 247s plot (x, y, "-pr"); 247s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 247s plot (x, y, "-sg"); 247s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 247s plot (x, y, "-^c"); 247s hold off 247s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 247s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 247s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 247s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 247s mu_lambdaA(1), mu_lambdaA(2)), ... 247s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 247s mu_lambdaB(1), mu_lambdaB(2)), ... 247s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 247s mu_lambdaC(1), mu_lambdaC(2))}) 247s title ("Three population samples from different inverse Gaussian distibutions") 247s hold off 247s ***** test 247s paramhat = invgfit ([1:50]); 247s paramhat_out = [25.5, 19.6973]; 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** test 247s paramhat = invgfit ([1:5]); 247s paramhat_out = [3, 8.1081]; 247s assert (paramhat, paramhat_out, 1e-4); 247s ***** error invgfit (ones (2,5)); 247s ***** error invgfit ([-1 2 3 4]); 247s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 247s ***** error invgfit ([1, 2, 3, 4, 5], 0); 247s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 247s ***** error ... 247s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 247s ***** error ... 247s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 247s ***** error ... 247s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 247s ***** error ... 247s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 247s ***** error ... 247s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 247s 12 tests, 12 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/poissfit.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/poissfit.m 247s ***** demo 247s ## Sample 3 populations from 3 different Poisson distibutions 247s randp ("seed", 2); # for reproducibility 247s r1 = poissrnd (1, 1000, 1); 247s randp ("seed", 2); # for reproducibility 247s r2 = poissrnd (4, 1000, 1); 247s randp ("seed", 3); # for reproducibility 247s r3 = poissrnd (10, 1000, 1); 247s r = [r1, r2, r3]; 247s 247s ## Plot them normalized and fix their colors 247s hist (r, [0:20], 1); 247s h = findobj (gca, "Type", "patch"); 247s set (h(1), "facecolor", "c"); 247s set (h(2), "facecolor", "g"); 247s set (h(3), "facecolor", "r"); 247s hold on 247s 247s ## Estimate their lambda parameter 247s lambdahat = poissfit (r); 247s 247s ## Plot their estimated PDFs 247s x = [0:20]; 247s y = poisspdf (x, lambdahat(1)); 247s plot (x, y, "-pr"); 247s y = poisspdf (x, lambdahat(2)); 247s plot (x, y, "-sg"); 247s y = poisspdf (x, lambdahat(3)); 247s plot (x, y, "-^c"); 247s xlim ([0, 20]) 247s ylim ([0, 0.4]) 247s legend ({"Normalized HIST of sample 1 with λ=1", ... 247s "Normalized HIST of sample 2 with λ=4", ... 247s "Normalized HIST of sample 3 with λ=10", ... 247s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 247s lambdahat(1)), ... 247s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 247s lambdahat(2)), ... 247s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 247s lambdahat(3))}) 247s title ("Three population samples from different Poisson distibutions") 247s hold off 247s ***** test 247s x = [1 3 2 4 5 4 3 4]; 247s [lhat, lci] = poissfit (x); 247s assert (lhat, 3.25) 247s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 247s ***** test 247s x = [1 3 2 4 5 4 3 4]; 247s [lhat, lci] = poissfit (x, 0.01); 247s assert (lhat, 3.25) 247s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 247s ***** test 247s x = [1 2 3 4 5]; 247s f = [1 1 2 3 1]; 247s [lhat, lci] = poissfit (x, [], f); 247s assert (lhat, 3.25) 247s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 247s ***** test 247s x = [1 2 3 4 5]; 247s f = [1 1 2 3 1]; 247s [lhat, lci] = poissfit (x, 0.01, f); 247s assert (lhat, 3.25) 247s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 247s ***** error poissfit ([1 2 -1 3]) 247s ***** error poissfit ([1 2 3], 0) 247s ***** error poissfit ([1 2 3], 1.2) 247s ***** error poissfit ([1 2 3], [0.02 0.05]) 247s ***** error 247s poissfit ([1 2 3], [], [1 5]) 247s ***** error 247s poissfit ([1 2 3], [], [1 5 -1]) 247s 10 tests, 10 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/wbllike.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/wbllike.m 247s ***** test 247s x = 1:50; 247s [nlogL, acov] = wbllike ([2.3, 1.2], x); 247s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 247s assert (nlogL, 945.9589180651594, 1e-12); 247s assert (acov, avar_out, 1e-4); 247s ***** test 247s x = 1:50; 247s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 247s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 247s assert (nlogL, 424.9879809704742, 6e-14); 247s assert (acov, avar_out, 1e-4); 247s ***** test 247s x = 1:50; 247s [nlogL, acov] = wbllike ([21, 15], x); 247s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 247s assert (nlogL, 1635190.328991511, 1e-8); 247s assert (acov, avar_out, 1e-8); 247s ***** error wbllike ([12, 15]); 247s ***** error wbllike ([12, 15, 3], [1:50]); 247s ***** error wbllike ([12, 3], ones (10, 2)); 247s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 247s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 247s ***** error ... 247s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 247s 9 tests, 9 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/gevlike.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gevlike.m 247s ***** test 247s x = 1; 247s k = 0.2; 247s sigma = 0.3; 247s mu = 0.5; 247s [L, C] = gevlike ([k sigma mu], x); 247s expected_L = 0.75942; 247s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 247s assert (L, expected_L, 0.001); 247s assert (C, inv (expected_C), 0.001); 247s ***** test 247s x = 1; 247s k = 0; 247s sigma = 0.3; 247s mu = 0.5; 247s [L, C] = gevlike ([k sigma mu], x); 247s expected_L = 0.65157; 247s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 247s assert (L, expected_L, 0.001); 247s assert (C, inv (expected_C), 0.001); 247s ***** test 247s x = -5:-1; 247s k = -0.2; 247s sigma = 0.3; 247s mu = 0.5; 247s [L, C] = gevlike ([k sigma mu], x); 247s expected_L = 3786.4; 247s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 247s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 247s 8.7297e-05, 1.2034e-05, -0.0019125]; 247s assert (L, expected_L, -0.001); 247s assert (C, expected_C, -0.001); 247s ***** test 247s x = -5:0; 247s k = -0.2; 247s sigma = 0.3; 247s mu = 0.5; 247s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 247s expected_L = 3786.4; 247s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 247s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 247s 8.7297e-05, 1.2034e-05, -0.0019125]; 247s assert (L, expected_L, -0.001); 247s assert (C, expected_C, -0.001); 247s ***** error gevlike (3.25) 247s ***** error gevlike ([1, 2, 3], ones (2)) 247s ***** error ... 247s gevlike ([1, 2], [1, 3, 5, 7]) 247s ***** error ... 247s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 247s ***** error ... 247s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 247s ***** error ... 247s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 247s ***** error ... 247s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 247s 11 tests, 11 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/tlslike.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/tlslike.m 247s ***** test 247s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 247s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 247s acov_out = [0.2525, 0.0670, 0.0288; ... 247s 0.0670, 0.5724, 0.1786; ... 247s 0.0288, 0.1786, 0.1789]; 247s assert (nlogL, 17.9979636579, 1e-10); 247s assert (acov, acov_out, 1e-4); 247s ***** error tlslike ([12, 15, 1]); 247s ***** error tlslike ([12, 15], [1:50]); 247s ***** error tlslike ([12, 3, 1], ones (10, 2)); 247s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 247s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 247s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 247s 7 tests, 7 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/burrlike.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/burrlike.m 247s ***** error burrlike (3.25) 247s ***** error burrlike ([1, 2, 3], ones (2)) 247s ***** error burrlike ([1, 2, 3], [-1, 3]) 247s ***** error ... 247s burrlike ([1, 2], [1, 3, 5, 7]) 247s ***** error ... 247s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 247s ***** error ... 247s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 247s ***** error ... 247s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 247s ***** error ... 247s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 247s 8 tests, 8 passed, 0 known failure, 0 skipped 247s [inst/dist_fit/burrfit.m] 247s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/burrfit.m 247s ***** demo 247s ## Sample 3 populations from different Burr type XII distibutions 247s rand ("seed", 4); # for reproducibility 247s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 247s rand ("seed", 2); # for reproducibility 247s r2 = burrrnd (1, 3, 1, 10000, 1); 247s rand ("seed", 9); # for reproducibility 247s r3 = burrrnd (0.5, 2, 3, 10000, 1); 247s r = [r1, r2, r3]; 247s 247s ## Plot them normalized and fix their colors 247s hist (r, [0.1:0.2:20], [18, 5, 3]); 247s h = findobj (gca, "Type", "patch"); 247s set (h(1), "facecolor", "c"); 247s set (h(2), "facecolor", "g"); 247s set (h(3), "facecolor", "r"); 247s ylim ([0, 3]); 247s xlim ([0, 5]); 247s hold on 247s 247s ## Estimate their α and β parameters 247s lambda_c_kA = burrfit (r(:,1)); 247s lambda_c_kB = burrfit (r(:,2)); 247s lambda_c_kC = burrfit (r(:,3)); 247s 247s ## Plot their estimated PDFs 247s x = [0.01:0.15:15]; 247s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 247s plot (x, y, "-pr"); 247s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 247s plot (x, y, "-sg"); 247s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 247s plot (x, y, "-^c"); 247s hold off 247s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 247s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 247s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 247s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 247s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 247s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 247s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 247s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 247s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 247s title ("Three population samples from different Burr type XII distibutions") 247s hold off 247s ***** test 247s l = 1; c = 2; k = 3; 247s r = burrrnd (l, c, k, 100000, 1); 247s lambda_c_kA = burrfit (r); 247s assert (lambda_c_kA(1), l, 0.2); 247s assert (lambda_c_kA(2), c, 0.2); 247s assert (lambda_c_kA(3), k, 0.3); 248s ***** test 248s l = 0.5; c = 1; k = 3; 248s r = burrrnd (l, c, k, 100000, 1); 248s lambda_c_kA = burrfit (r); 248s assert (lambda_c_kA(1), l, 0.2); 248s assert (lambda_c_kA(2), c, 0.2); 248s assert (lambda_c_kA(3), k, 0.3); 250s ***** test 250s l = 1; c = 3; k = 1; 250s r = burrrnd (l, c, k, 100000, 1); 250s lambda_c_kA = burrfit (r); 250s assert (lambda_c_kA(1), l, 0.2); 250s assert (lambda_c_kA(2), c, 0.2); 250s assert (lambda_c_kA(3), k, 0.3); 251s ***** test 251s l = 3; c = 2; k = 1; 251s r = burrrnd (l, c, k, 100000, 1); 251s lambda_c_kA = burrfit (r); 251s assert (lambda_c_kA(1), l, 0.2); 251s assert (lambda_c_kA(2), c, 0.2); 251s assert (lambda_c_kA(3), k, 0.3); 252s ***** test 252s l = 4; c = 2; k = 4; 252s r = burrrnd (l, c, k, 100000, 1); 252s lambda_c_kA = burrfit (r); 252s assert (lambda_c_kA(1), l, 0.2); 252s assert (lambda_c_kA(2), c, 0.2); 252s assert (lambda_c_kA(3), k, 0.3); 253s ***** error burrfit (ones (2,5)); 253s ***** error burrfit ([-1 2 3 4]); 253s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 253s ***** error burrfit ([1, 2, 3, 4, 5], 0); 253s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 253s ***** error ... 253s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 253s ***** error ... 253s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 253s ***** error 253s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 253s ***** error 253s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 253s ***** error ... 253s burrfit ([1:10], 0.05, [], [], 5) 253s 15 tests, 15 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/invglike.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/invglike.m 253s ***** test 253s nlogL = invglike ([25.5, 19.6973], [1:50]); 253s assert (nlogL, 219.1516, 1e-4); 253s ***** test 253s nlogL = invglike ([3, 8.1081], [1:5]); 253s assert (nlogL, 9.0438, 1e-4); 253s ***** error invglike (3.25) 253s ***** error invglike ([5, 0.2], ones (2)) 253s ***** error invglike ([5, 0.2], [-1, 3]) 253s ***** error ... 253s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 253s ***** error ... 253s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 253s ***** error ... 253s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 253s ***** error ... 253s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 253s 9 tests, 9 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/loglfit.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/loglfit.m 253s ***** demo 253s ## Sample 3 populations from different log-logistic distibutions 253s rand ("seed", 5) # for reproducibility 253s r1 = loglrnd (0, 1, 2000, 1); 253s rand ("seed", 2) # for reproducibility 253s r2 = loglrnd (0, 0.5, 2000, 1); 253s rand ("seed", 7) # for reproducibility 253s r3 = loglrnd (0, 0.125, 2000, 1); 253s r = [r1, r2, r3]; 253s 253s ## Plot them normalized and fix their colors 253s hist (r, [0.05:0.1:2.5], 10); 253s h = findobj (gca, "Type", "patch"); 253s set (h(1), "facecolor", "c"); 253s set (h(2), "facecolor", "g"); 253s set (h(3), "facecolor", "r"); 253s ylim ([0, 3.5]); 253s xlim ([0, 2.0]); 253s hold on 253s 253s ## Estimate their MU and LAMBDA parameters 253s a_bA = loglfit (r(:,1)); 253s a_bB = loglfit (r(:,2)); 253s a_bC = loglfit (r(:,3)); 253s 253s ## Plot their estimated PDFs 253s x = [0.01:0.1:2.01]; 253s y = loglpdf (x, a_bA(1), a_bA(2)); 253s plot (x, y, "-pr"); 253s y = loglpdf (x, a_bB(1), a_bB(2)); 253s plot (x, y, "-sg"); 253s y = loglpdf (x, a_bC(1), a_bC(2)); 253s plot (x, y, "-^c"); 253s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 253s "Normalized HIST of sample 2 with α=1 and β=2", ... 253s "Normalized HIST of sample 3 with α=1 and β=8", ... 253s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 253s a_bA(1), a_bA(2)), ... 253s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 253s a_bB(1), a_bB(2)), ... 253s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 253s a_bC(1), a_bC(2))}) 253s title ("Three population samples from different log-logistic distibutions") 253s hold off 253s ***** test 253s [paramhat, paramci] = loglfit ([1:50]); 253s paramhat_out = [3.09717, 0.468525]; 253s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 253s assert (paramhat, paramhat_out, 1e-5); 253s assert (paramci, paramci_out, 1e-5); 253s ***** test 253s paramhat = loglfit ([1:5]); 253s paramhat_out = [1.01124, 0.336449]; 253s assert (paramhat, paramhat_out, 1e-5); 253s ***** test 253s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 253s paramhat_out = [1.01124, 0.336449]; 253s assert (paramhat, paramhat_out, 1e-4); 253s ***** test 253s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 253s paramhat_out = loglfit ([1:5, 5]); 253s assert (paramhat, paramhat_out, 1e-4); 253s ***** error loglfit (ones (2,5)); 253s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 253s ***** error loglfit ([1, 2, 3, 4, 5], 0); 253s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 253s ***** error ... 253s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 253s ***** error ... 253s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 253s ***** error ... 253s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 253s ***** error ... 253s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 253s ***** error ... 253s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 253s 13 tests, 13 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/rayllike.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/rayllike.m 253s ***** test 253s x = [1 3 2 4 5 4 3 4]; 253s [nlogL, acov] = rayllike (3.25, x); 253s assert (nlogL, 14.7442, 1e-4) 253s ***** test 253s x = [1 2 3 4 5]; 253s f = [1 1 2 3 1]; 253s [nlogL, acov] = rayllike (3.25, x, [], f); 253s assert (nlogL, 14.7442, 1e-4) 253s ***** test 253s x = [1 2 3 4 5 6]; 253s f = [1 1 2 3 1 0]; 253s [nlogL, acov] = rayllike (3.25, x, [], f); 253s assert (nlogL, 14.7442, 1e-4) 253s ***** test 253s x = [1 2 3 4 5 6]; 253s c = [0 0 0 0 0 1]; 253s f = [1 1 2 3 1 0]; 253s [nlogL, acov] = rayllike (3.25, x, c, f); 253s assert (nlogL, 14.7442, 1e-4) 253s ***** error rayllike (1) 253s ***** error rayllike ([1 2 3], [1 2]) 253s ***** error ... 253s rayllike (3.25, ones (10, 2)) 253s ***** error ... 253s rayllike (3.25, [1 2 3 -4 5]) 253s ***** error ... 253s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 253s ***** error ... 253s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 253s ***** error ... 253s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 253s ***** error ... 253s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 253s ***** error ... 253s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 253s 13 tests, 13 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/betafit.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/betafit.m 253s ***** demo 253s ## Sample 2 populations from different Beta distibutions 253s randg ("seed", 1); # for reproducibility 253s r1 = betarnd (2, 5, 500, 1); 253s randg ("seed", 2); # for reproducibility 253s r2 = betarnd (2, 2, 500, 1); 253s r = [r1, r2]; 253s 253s ## Plot them normalized and fix their colors 253s hist (r, 12, 15); 253s h = findobj (gca, "Type", "patch"); 253s set (h(1), "facecolor", "c"); 253s set (h(2), "facecolor", "g"); 253s hold on 253s 253s ## Estimate their shape parameters 253s a_b_A = betafit (r(:,1)); 253s a_b_B = betafit (r(:,2)); 253s 253s ## Plot their estimated PDFs 253s x = [min(r(:)):0.01:max(r(:))]; 253s y = betapdf (x, a_b_A(1), a_b_A(2)); 253s plot (x, y, "-pr"); 253s y = betapdf (x, a_b_B(1), a_b_B(2)); 253s plot (x, y, "-sg"); 253s ylim ([0, 4]) 253s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 253s "Normalized HIST of sample 2 with α=2 and β=2", ... 253s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 253s a_b_A(1), a_b_A(2)), ... 253s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 253s a_b_B(1), a_b_B(2))}) 253s title ("Two population samples from different Beta distibutions") 253s hold off 253s ***** test 253s x = 0.01:0.02:0.99; 253s [paramhat, paramci] = betafit (x); 253s paramhat_out = [1.0199, 1.0199]; 253s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 253s assert (paramhat, paramhat_out, 1e-4); 253s assert (paramci, paramci_out, 1e-4); 253s ***** test 253s x = 0.01:0.02:0.99; 253s [paramhat, paramci] = betafit (x, 0.01); 253s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 253s assert (paramci, paramci_out, 1e-4); 253s ***** test 253s x = 0.00:0.02:1; 253s [paramhat, paramci] = betafit (x); 253s paramhat_out = [0.0875, 0.1913]; 253s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 253s assert (paramhat, paramhat_out, 1e-4); 253s assert (paramci, paramci_out, 1e-4); 253s ***** error betafit ([0.2, 0.5+i]); 253s ***** error betafit (ones (2,2) * 0.5); 253s ***** error betafit ([0.5, 1.2]); 253s ***** error betafit ([0.1, 0.1]); 253s ***** error betafit ([0.01:0.1:0.99], 1.2); 253s ***** error ... 253s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 253s ***** error ... 253s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 253s ***** error ... 253s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 253s ***** error ... 253s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 253s ***** error ... 253s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 253s 13 tests, 13 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/gamfit.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gamfit.m 253s ***** demo 253s ## Sample 3 populations from different Gamma distibutions 253s randg ("seed", 5); # for reproducibility 253s r1 = gamrnd (1, 2, 2000, 1); 253s randg ("seed", 2); # for reproducibility 253s r2 = gamrnd (2, 2, 2000, 1); 253s randg ("seed", 7); # for reproducibility 253s r3 = gamrnd (7.5, 1, 2000, 1); 253s r = [r1, r2, r3]; 253s 253s ## Plot them normalized and fix their colors 253s hist (r, 75, 4); 253s h = findobj (gca, "Type", "patch"); 253s set (h(1), "facecolor", "c"); 253s set (h(2), "facecolor", "g"); 253s set (h(3), "facecolor", "r"); 253s ylim ([0, 0.62]); 253s xlim ([0, 12]); 253s hold on 253s 253s ## Estimate their α and β parameters 253s a_bA = gamfit (r(:,1)); 253s a_bB = gamfit (r(:,2)); 253s a_bC = gamfit (r(:,3)); 253s 253s ## Plot their estimated PDFs 253s x = [0.01,0.1:0.2:18]; 253s y = gampdf (x, a_bA(1), a_bA(2)); 253s plot (x, y, "-pr"); 253s y = gampdf (x, a_bB(1), a_bB(2)); 253s plot (x, y, "-sg"); 253s y = gampdf (x, a_bC(1), a_bC(2)); 253s plot (x, y, "-^c"); 253s hold off 253s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 253s "Normalized HIST of sample 2 with α=2 and β=2", ... 253s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 253s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 253s a_bA(1), a_bA(2)), ... 253s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 253s a_bB(1), a_bB(2)), ... 253s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 253s a_bC(1), a_bC(2))}) 253s title ("Three population samples from different Gamma distibutions") 253s hold off 253s ***** shared x 253s 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]; 253s ***** test 253s [paramhat, paramci] = gamfit (x); 253s assert (paramhat, [3.4248, 0.9752], 1e-4); 253s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 253s ***** test 253s [paramhat, paramci] = gamfit (x, 0.01); 253s assert (paramhat, [3.4248, 0.9752], 1e-4); 253s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 253s ***** test 253s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 253s [paramhat, paramci] = gamfit (x, [], [], freq); 253s assert (paramhat, [3.3025, 1.0615], 1e-4); 253s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 253s ***** test 253s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 253s assert (paramhat, [4.4484, 0.9689], 1e-4); 253s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 253s ***** test 253s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 253s assert (paramhat, [4.4484, 0.9689], 1e-4); 253s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 253s ***** test 253s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 253s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 253s assert (paramhat, [4.7537, 0.9308], 1e-4); 253s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 253s ***** test 253s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 253s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 253s [paramhat, paramci] = gamfit (x, [], cens, freq); 253s assert (paramhat, [3.4736, 1.0847], 1e-4); 253s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 253s ***** test 253s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 253s assert (paramhat, [Inf, 0]); 253s assert (paramci, [Inf, 0; Inf, 0]); 253s ***** test 253s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 253s assert (paramhat, [NaN, NaN]); 253s assert (paramci, [NaN, NaN; NaN, NaN]); 253s ***** test 253s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 253s assert (paramhat, [Inf, 0]); 253s assert (paramci, [Inf, 0; Inf, 0]); 253s ***** assert (class (gamfit (single (x))), "single") 253s ***** error gamfit (ones (2)) 253s ***** error gamfit (x, 1) 253s ***** error gamfit (x, -1) 253s ***** error gamfit (x, {0.05}) 253s ***** error gamfit (x, "a") 253s ***** error gamfit (x, i) 253s ***** error gamfit (x, [0.01 0.02]) 253s ***** error 253s gamfit ([1 2 3], 0.05, [], [1 5]) 253s ***** error 253s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 253s ***** error ... 253s gamfit ([1:10], 0.05, [], [], 5) 253s ***** error gamfit ([1 2 3 -4]) 253s ***** error ... 253s gamfit ([1 2 0], [], [1 0 0]) 253s 23 tests, 23 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/binolike.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/binolike.m 253s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 253s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 253s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 253s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 253s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 253s ***** test 253s [nlogL, acov] = binolike ([3, 0.333], 3); 253s assert (acov(4), 0.0740, 1e-4) 253s ***** error binolike (3.25) 253s ***** error binolike ([5, 0.2], ones (2)) 253s ***** error ... 253s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 253s ***** error binolike ([1.5, 0.2], 1) 253s ***** error binolike ([-1, 0.2], 1) 253s ***** error binolike ([Inf, 0.2], 1) 253s ***** error binolike ([5, 1.2], [3, 5]) 253s ***** error binolike ([5, -0.2], [3, 5]) 253s ***** error ... 253s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 253s ***** error ... 253s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 253s ***** error binolike ([5, 0.2], [-1, 3]) 253s ***** error binolike ([5, 0.2], [3, 5, 7]) 253s 18 tests, 18 passed, 0 known failure, 0 skipped 253s [inst/dist_fit/gplike.m] 253s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gplike.m 253s ***** test 253s k = 0.8937; sigma = 1.3230; theta = 1; 253s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 253s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 253s [nlogL, acov] = gplike ([k, sigma, theta], x); 253s assert (nlogL, 21.736, 1e-3); 253s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 253s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 253s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 253s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 253s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 253s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 253s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 253s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 254s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 254s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 254s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 254s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 254s ***** error gplike () 254s ***** error gplike (1) 254s ***** error gplike ([1, 2, 0], []) 254s ***** error gplike ([1, 2, 0], ones (2)) 254s ***** error gplike (2, [1:10]) 254s ***** error gplike ([2, 3], [1:10]) 254s ***** error ... 254s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 254s ***** error ... 254s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 254s 20 tests, 20 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/unifit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/unifit.m 254s ***** demo 254s ## Sample 2 populations from different continuous uniform distibutions 254s rand ("seed", 5); # for reproducibility 254s r1 = unifrnd (2, 5, 2000, 1); 254s rand ("seed", 6); # for reproducibility 254s r2 = unifrnd (3, 9, 2000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 0:0.5:10, 2); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their probability of success 254s a_bA = unifit (r(:,1)); 254s a_bB = unifit (r(:,2)); 254s 254s ## Plot their estimated PDFs 254s x = [0:10]; 254s y = unifpdf (x, a_bA(1), a_bA(2)); 254s plot (x, y, "-pg"); 254s y = unifpdf (x, a_bB(1), a_bB(2)); 254s plot (x, y, "-sc"); 254s xlim ([1, 10]) 254s ylim ([0, 0.5]) 254s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 254s "Normalized HIST of sample 2 with a=3 and b=9", ... 254s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 254s a_bA(1), a_bA(2)), ... 254s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 254s a_bB(1), a_bB(2))}) 254s title ("Two population samples from different continuous uniform distibutions") 254s hold off 254s ***** test 254s x = 0:5; 254s [paramhat, paramci] = unifit (x); 254s assert (paramhat, [0, 5]); 254s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 254s ***** test 254s x = 0:5; 254s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 254s assert (paramhat, [0, 5]); 254s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 254s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 254s ***** error unifit () 254s ***** error unifit (-1, [1 2 3 3]) 254s ***** error unifit (1, 0) 254s ***** error unifit (1, 1.2) 254s ***** error unifit (1, [0.02 0.05]) 254s ***** error ... 254s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 254s ***** error ... 254s unifit ([1.5, 0.2], [], [1, -1]) 254s ***** error ... 254s unifit ([1.5, 0.2], [], [1, 1, 1]) 254s 11 tests, 11 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/raylfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/raylfit.m 254s ***** demo 254s ## Sample 3 populations from 3 different Rayleigh distibutions 254s rand ("seed", 2); # for reproducibility 254s r1 = raylrnd (1, 1000, 1); 254s rand ("seed", 2); # for reproducibility 254s r2 = raylrnd (2, 1000, 1); 254s rand ("seed", 3); # for reproducibility 254s r3 = raylrnd (4, 1000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, [0.5:0.5:10.5], 2); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s hold on 254s 254s ## Estimate their lambda parameter 254s sigmaA = raylfit (r(:,1)); 254s sigmaB = raylfit (r(:,2)); 254s sigmaC = raylfit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [0:0.1:10]; 254s y = raylpdf (x, sigmaA); 254s plot (x, y, "-pr"); 254s y = raylpdf (x, sigmaB); 254s plot (x, y, "-sg"); 254s y = raylpdf (x, sigmaC); 254s plot (x, y, "-^c"); 254s xlim ([0, 10]) 254s ylim ([0, 0.7]) 254s legend ({"Normalized HIST of sample 1 with σ=1", ... 254s "Normalized HIST of sample 2 with σ=2", ... 254s "Normalized HIST of sample 3 with σ=4", ... 254s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 254s sigmaA), ... 254s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 254s sigmaB), ... 254s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 254s sigmaC)}) 254s title ("Three population samples from different Rayleigh distibutions") 254s hold off 254s ***** test 254s x = [1 3 2 4 5 4 3 4]; 254s [shat, sci] = raylfit (x); 254s assert (shat, 2.4495, 1e-4) 254s assert (sci, [1.8243; 3.7279], 1e-4) 254s ***** test 254s x = [1 3 2 4 5 4 3 4]; 254s [shat, sci] = raylfit (x, 0.01); 254s assert (shat, 2.4495, 1e-4) 254s assert (sci, [1.6738; 4.3208], 1e-4) 254s ***** test 254s x = [1 2 3 4 5]; 254s f = [1 1 2 3 1]; 254s [shat, sci] = raylfit (x, [], [], f); 254s assert (shat, 2.4495, 1e-4) 254s assert (sci, [1.8243; 3.7279], 1e-4) 254s ***** test 254s x = [1 2 3 4 5]; 254s f = [1 1 2 3 1]; 254s [shat, sci] = raylfit (x, 0.01, [], f); 254s assert (shat, 2.4495, 1e-4) 254s assert (sci, [1.6738; 4.3208], 1e-4) 254s ***** test 254s x = [1 2 3 4 5 6]; 254s c = [0 0 0 0 0 1]; 254s f = [1 1 2 3 1 1]; 254s [shat, sci] = raylfit (x, 0.01, c, f); 254s assert (shat, 2.4495, 1e-4) 254s assert (sci, [1.6738; 4.3208], 1e-4) 254s ***** error raylfit (ones (2,5)); 254s ***** error raylfit ([1 2 -1 3]) 254s ***** error raylfit ([1 2 3], 0) 254s ***** error raylfit ([1 2 3], 1.2) 254s ***** error raylfit ([1 2 3], [0.02 0.05]) 254s ***** error ... 254s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 254s ***** error ... 254s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 254s ***** error ... 254s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 254s ***** error ... 254s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 254s ***** error 254s raylfit ([1 2 3], [], [], [1 5]) 254s ***** error 254s raylfit ([1 2 3], [], [], [1 5 -1]) 254s 16 tests, 16 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/unidfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/unidfit.m 254s ***** demo 254s ## Sample 2 populations from different discrete uniform distibutions 254s rand ("seed", 1); # for reproducibility 254s r1 = unidrnd (5, 1000, 1); 254s rand ("seed", 2); # for reproducibility 254s r2 = unidrnd (9, 1000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 0:0.5:20.5, 1); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their probability of success 254s NhatA = unidfit (r(:,1)); 254s NhatB = unidfit (r(:,2)); 254s 254s ## Plot their estimated PDFs 254s x = [0:10]; 254s y = unidpdf (x, NhatA); 254s plot (x, y, "-pg"); 254s y = unidpdf (x, NhatB); 254s plot (x, y, "-sc"); 254s xlim ([0, 10]) 254s ylim ([0, 0.4]) 254s legend ({"Normalized HIST of sample 1 with N=5", ... 254s "Normalized HIST of sample 2 with N=9", ... 254s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 254s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 254s title ("Two population samples from different discrete uniform distibutions") 254s hold off 254s ***** test 254s x = 0:5; 254s [Nhat, Nci] = unidfit (x); 254s assert (Nhat, 5); 254s assert (Nci, [5; 9]); 254s ***** test 254s x = 0:5; 254s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 254s assert (Nhat, 5); 254s assert (Nci, [5; 9]); 254s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 254s ***** error unidfit () 254s ***** error unidfit (-1, [1 2 3 3]) 254s ***** error unidfit (1, 0) 254s ***** error unidfit (1, 1.2) 254s ***** error unidfit (1, [0.02 0.05]) 254s ***** error ... 254s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 254s ***** error ... 254s unidfit ([1.5, 0.2], [], [1, 1, 1]) 254s ***** error ... 254s unidfit ([1.5, 0.2], [], [1, -1]) 254s 11 tests, 11 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/lognlike.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/lognlike.m 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = lognlike ([0, 0.25], x); 254s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 254s assert (nlogL, 3962.330333301793, 1e-10); 254s assert (avar, avar_out, 1e-7); 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 254s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 254s assert (nlogL, 2473.183051225747, 1e-10); 254s assert (avar, avar_out, 1e-7); 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = lognlike ([0, 0.5], x); 254s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 254s assert (nlogL, 1119.072424020455, 1e-12); 254s assert (avar, avar_out, 1e-6); 254s ***** test 254s x = 1:50; 254s censor = ones (1, 50); 254s censor([2, 4, 6, 8, 12, 14]) = 0; 254s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 254s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 254s assert (nlogL, 1091.746371145497, 1e-12); 254s assert (avar, avar_out, 1e-6); 254s ***** test 254s x = 1:50; 254s censor = ones (1, 50); 254s censor([2, 4, 6, 8, 12, 14]) = 0; 254s [nlogL, avar] = lognlike ([0, 1], x, censor); 254s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 254s assert (nlogL, 349.3969104144271, 1e-12); 254s assert (avar, avar_out, 1e-6); 254s ***** error ... 254s lognlike ([12, 15]); 254s ***** error lognlike ([12, 15], ones (2)); 254s ***** error ... 254s lognlike ([12, 15, 3], [1:50]); 254s ***** error ... 254s lognlike ([12, 15], [1:50], [1, 2, 3]); 254s ***** error ... 254s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 254s 10 tests, 10 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/nbinfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/nbinfit.m 254s ***** demo 254s ## Sample 2 populations from different negative binomial distibutions 254s randp ("seed", 5); randg ("seed", 5); # for reproducibility 254s r1 = nbinrnd (2, 0.15, 5000, 1); 254s randp ("seed", 8); randg ("seed", 8); # for reproducibility 254s r2 = nbinrnd (5, 0.2, 5000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, [0:51], 1); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their probability of success 254s r_psA = nbinfit (r(:,1)); 254s r_psB = nbinfit (r(:,2)); 254s 254s ## Plot their estimated PDFs 254s x = [0:40]; 254s y = nbinpdf (x, r_psA(1), r_psA(2)); 254s plot (x, y, "-pg"); 254s x = [min(r(:,2)):max(r(:,2))]; 254s y = nbinpdf (x, r_psB(1), r_psB(2)); 254s plot (x, y, "-sc"); 254s ylim ([0, 0.1]) 254s xlim ([0, 50]) 254s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 254s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 254s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 254s r_psA(1), r_psA(2)), ... 254s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 254s r_psB(1), r_psB(2))}) 254s title ("Two population samples from negative different binomial distibutions") 254s hold off 254s ***** test 254s [paramhat, paramci] = nbinfit ([1:50]); 254s assert (paramhat, [2.420857, 0.086704], 1e-6); 254s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 254s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 254s ***** test 254s [paramhat, paramci] = nbinfit ([1:20]); 254s assert (paramhat, [3.588233, 0.254697], 1e-6); 254s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 254s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 254s ***** test 254s [paramhat, paramci] = nbinfit ([1:10]); 254s assert (paramhat, [8.8067, 0.6156], 1e-4); 254s assert (paramci(:,1), [0; 30.7068], 1e-4); 254s assert (paramci(:,2), [0.0217; 1], 1e-4); 254s ***** test 254s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 254s assert (paramhat, [8.8067, 0.6156], 1e-4); 254s assert (paramci(:,1), [0; 30.7068], 1e-4); 254s assert (paramci(:,2), [0.0217; 1], 1e-4); 254s ***** test 254s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 254s assert (paramhat, [8.8067, 0.6156], 1e-4); 254s assert (paramci(:,1), [0; 30.7068], 1e-4); 254s assert (paramci(:,2), [0.0217; 1], 1e-4); 254s ***** error nbinfit ([-1 2 3 3]) 254s ***** error nbinfit (ones (2)) 254s ***** error nbinfit ([1 2 1.2 3]) 254s ***** error nbinfit ([1 2 3], 0) 254s ***** error nbinfit ([1 2 3], 1.2) 254s ***** error nbinfit ([1 2 3], [0.02 0.05]) 254s ***** error ... 254s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 254s ***** error ... 254s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 254s ***** error ... 254s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 254s ***** error ... 254s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 254s ***** error ... 254s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 254s 16 tests, 16 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/geofit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/geofit.m 254s ***** demo 254s ## Sample 2 populations from different geometric distibutions 254s rande ("seed", 1); # for reproducibility 254s r1 = geornd (0.15, 1000, 1); 254s rande ("seed", 2); # for reproducibility 254s r2 = geornd (0.5, 1000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 0:0.5:20.5, 1); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their probability of success 254s pshatA = geofit (r(:,1)); 254s pshatB = geofit (r(:,2)); 254s 254s ## Plot their estimated PDFs 254s x = [0:15]; 254s y = geopdf (x, pshatA); 254s plot (x, y, "-pg"); 254s y = geopdf (x, pshatB); 254s plot (x, y, "-sc"); 254s xlim ([0, 15]) 254s ylim ([0, 0.6]) 254s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 254s "Normalized HIST of sample 2 with ps=0.50", ... 254s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 254s mean (pshatA)), ... 254s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 254s mean (pshatB))}) 254s title ("Two population samples from different geometric distibutions") 254s hold off 254s ***** test 254s x = 0:5; 254s [pshat, psci] = geofit (x); 254s assert (pshat, 0.2857, 1e-4); 254s assert (psci, [0.092499; 0.478929], 1e-5); 254s ***** test 254s x = 0:5; 254s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 254s assert (pshat, 0.2857, 1e-4); 254s assert (psci, [0.092499; 0.478929], 1e-5); 254s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 254s ***** error geofit () 254s ***** error geofit (-1, [1 2 3 3]) 254s ***** error geofit (1, 0) 254s ***** error geofit (1, 1.2) 254s ***** error geofit (1, [0.02 0.05]) 254s ***** error ... 254s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 254s ***** error ... 254s geofit ([1.5, 0.2], [], [1, 1, 1]) 254s 10 tests, 10 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/evfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/evfit.m 254s ***** demo 254s ## Sample 3 populations from different extreme value distibutions 254s rand ("seed", 1); # for reproducibility 254s r1 = evrnd (2, 5, 400, 1); 254s rand ("seed", 12); # for reproducibility 254s r2 = evrnd (-5, 3, 400, 1); 254s rand ("seed", 13); # for reproducibility 254s r3 = evrnd (14, 8, 400, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 25, 0.4); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s ylim ([0, 0.28]) 254s xlim ([-30, 30]); 254s hold on 254s 254s ## Estimate their MU and SIGMA parameters 254s mu_sigmaA = evfit (r(:,1)); 254s mu_sigmaB = evfit (r(:,2)); 254s mu_sigmaC = evfit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [min(r(:)):max(r(:))]; 254s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 254s plot (x, y, "-pr"); 254s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 254s plot (x, y, "-sg"); 254s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 254s plot (x, y, "-^c"); 254s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 254s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 254s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 254s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 254s mu_sigmaA(1), mu_sigmaA(2)), ... 254s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 254s mu_sigmaB(1), mu_sigmaB(2)), ... 254s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 254s mu_sigmaC(1), mu_sigmaC(2))}) 254s title ("Three population samples from different extreme value distibutions") 254s hold off 254s ***** test 254s x = 1:50; 254s [paramhat, paramci] = evfit (x); 254s paramhat_out = [32.6811, 13.0509]; 254s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 254s assert (paramhat, paramhat_out, 1e-4); 254s assert (paramci, paramci_out, 1e-4); 254s ***** test 254s x = 1:50; 254s [paramhat, paramci] = evfit (x, 0.01); 254s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 254s assert (paramci, paramci_out, 1e-4); 254s ***** error evfit (ones (2,5)); 254s ***** error evfit (single (ones (1,5))); 254s ***** error evfit ([1, 2, 3, 4, NaN]); 254s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 254s ***** error 254s evfit ([1 2 3], 0.05, [], [1 5]) 254s ***** error 254s evfit ([1 2 3], 0.05, [], [1 5 -1]) 254s ***** error ... 254s evfit ([1:10], 0.05, [], [], 5) 254s 9 tests, 9 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/gumbellike.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gumbellike.m 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 254s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 254s assert (nlogL, 3.242264755689906e+17, 1e-14); 254s assert (avar, avar_out, 1e-3); 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 254s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 254s assert (nlogL, 481898704.0472211, 1e-6); 254s assert (avar, avar_out, 1e-3); 254s ***** test 254s x = 1:50; 254s [nlogL, avar] = gumbellike ([21, 15], x); 254s avar_out = [11.73913876598908, -5.9546128523121216; ... 254s -5.954612852312121, 3.708060045170236]; 254s assert (nlogL, 223.7612479380652, 1e-13); 254s assert (avar, avar_out, 1e-14); 254s ***** error gumbellike ([12, 15]); 254s ***** error gumbellike ([12, 15, 3], [1:50]); 254s ***** error gumbellike ([12, 3], ones (10, 2)); 254s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 254s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 254s 8 tests, 8 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/expfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/expfit.m 254s ***** demo 254s ## Sample 3 populations from 3 different exponential distibutions 254s rande ("seed", 1); # for reproducibility 254s r1 = exprnd (2, 4000, 1); 254s rande ("seed", 2); # for reproducibility 254s r2 = exprnd (5, 4000, 1); 254s rande ("seed", 3); # for reproducibility 254s r3 = exprnd (12, 4000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 48, 0.52); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s hold on 254s 254s ## Estimate their mu parameter 254s muhat = expfit (r); 254s 254s ## Plot their estimated PDFs 254s x = [0:max(r(:))]; 254s y = exppdf (x, muhat(1)); 254s plot (x, y, "-pr"); 254s y = exppdf (x, muhat(2)); 254s plot (x, y, "-sg"); 254s y = exppdf (x, muhat(3)); 254s plot (x, y, "-^c"); 254s ylim ([0, 0.6]) 254s xlim ([0, 40]) 254s legend ({"Normalized HIST of sample 1 with μ=2", ... 254s "Normalized HIST of sample 2 with μ=5", ... 254s "Normalized HIST of sample 3 with μ=12", ... 254s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 254s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 254s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 254s title ("Three population samples from different exponential distibutions") 254s hold off 254s ***** assert (expfit (1), 1) 254s ***** assert (expfit (1:3), 2) 254s ***** assert (expfit ([1:3]'), 2) 254s ***** assert (expfit (1:3, []), 2) 254s ***** assert (expfit (1:3, [], [], []), 2) 254s ***** assert (expfit (magic (3)), [5 5 5]) 254s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 254s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 254s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 254s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 254s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 254s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 254s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 254s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 254s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 254s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 254s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 254s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 254s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 254s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 254s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 254s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 254s [1.75 4.75 7.75]) 254s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 254s [1.75 4.75 7.75]) 254s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 254s [3.5 19/3 31/3]) 254s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 254s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 254s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 254s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 254s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 254s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 254s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 254s 1000*eps) 254s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 254s [0.953017262058213; 7.337731146400207], 1000*eps) 254s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 254s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 254s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 254s 1000*eps) 254s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 254s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 254s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 254s 1000*eps) 254s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 254s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 254s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 254s 1000*eps) 254s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 254s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 254s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 254s 1000*eps) 254s ***** test 254s x = reshape (1:8, [4 2]); 254s x(4) = NaN; 254s [muhat,muci] = expfit (x); 254s assert ({muhat, muci}, {[NaN, 6.5], ... 254s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 254s ***** test 254s x = magic (3); 254s censor = [0 1 0; 0 1 0; 0 1 0]; 254s freq = [1 1 0; 1 1 0; 1 1 0]; 254s [muhat,muci] = expfit (x, [], censor, freq); 254s assert ({muhat, muci}, {[5 NaN NaN], ... 254s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 254s ***** error expfit () 254s ***** error expfit (1,2,3,4,5) 254s ***** error [a b censor] = expfit (1) 254s ***** error expfit (1, [1 2]) 254s ***** error expfit ([-1 2 3 4 5]) 254s ***** error expfit ([1:5], [], "test") 254s ***** error expfit ([1:5], [], [], "test") 254s ***** error expfit ([1:5], [], [0 0 0 0]) 254s ***** error expfit ([1:5], [], [], [1 1 1 1]) 254s 47 tests, 47 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/hnlike.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/hnlike.m 254s ***** test 254s x = 1:20; 254s paramhat = hnfit (x, 0); 254s [nlogL, acov] = hnlike (paramhat, x); 254s assert (nlogL, 64.179177404891300, 1e-14); 254s ***** test 254s x = 1:20; 254s paramhat = hnfit (x, 0); 254s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 254s assert (nlogL, 64.179177404891300, 1e-14); 254s ***** error ... 254s hnlike ([12, 15]); 254s ***** error hnlike ([12, 15, 3], [1:50]); 254s ***** error hnlike ([3], [1:50]); 254s ***** error ... 254s hnlike ([0, 3], ones (2)); 254s ***** error ... 254s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 254s ***** error ... 254s hnlike ([1, 2], ones (10, 1), ones (8,1)) 254s ***** error ... 254s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 254s 9 tests, 9 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/wblfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/wblfit.m 254s ***** demo 254s ## Sample 3 populations from 3 different Weibull distibutions 254s rande ("seed", 1); # for reproducibility 254s r1 = wblrnd(2, 4, 2000, 1); 254s rande ("seed", 2); # for reproducibility 254s r2 = wblrnd(5, 2, 2000, 1); 254s rande ("seed", 5); # for reproducibility 254s r3 = wblrnd(1, 5, 2000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 30, [2.5 2.1 3.2]); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s ylim ([0, 2]); 254s xlim ([0, 10]); 254s hold on 254s 254s ## Estimate their lambda parameter 254s lambda_kA = wblfit (r(:,1)); 254s lambda_kB = wblfit (r(:,2)); 254s lambda_kC = wblfit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [0:0.1:15]; 254s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 254s plot (x, y, "-pr"); 254s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 254s plot (x, y, "-sg"); 254s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 254s plot (x, y, "-^c"); 254s hold off 254s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 254s "Normalized HIST of sample 2 with λ=5 and k=2", ... 254s "Normalized HIST of sample 3 with λ=1 and k=5", ... 254s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 254s lambda_kA(1), lambda_kA(2)), ... 254s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 254s lambda_kB(1), lambda_kB(2)), ... 254s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 254s lambda_kC(1), lambda_kC(2))}) 254s title ("Three population samples from different Weibull distibutions") 254s hold off 254s ***** test 254s x = 1:50; 254s [paramhat, paramci] = wblfit (x); 254s paramhat_out = [28.3636, 1.7130]; 254s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 254s assert (paramhat, paramhat_out, 1e-4); 254s assert (paramci, paramci_out, 1e-4); 254s ***** test 254s x = 1:50; 254s [paramhat, paramci] = wblfit (x, 0.01); 254s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 254s assert (paramci, paramci_out, 1e-4); 254s ***** error wblfit (ones (2,5)); 254s ***** error wblfit ([-1 2 3 4]); 254s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 254s ***** error wblfit ([1, 2, 3, 4, 5], 0); 254s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 254s ***** error ... 254s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 254s 13 tests, 13 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/binofit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/binofit.m 254s ***** demo 254s ## Sample 2 populations from different binomial distibutions 254s rand ("seed", 1); # for reproducibility 254s r1 = binornd (50, 0.15, 1000, 1); 254s rand ("seed", 2); # for reproducibility 254s r2 = binornd (100, 0.5, 1000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 23, 0.35); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their probability of success 254s pshatA = binofit (r(:,1), 50); 254s pshatB = binofit (r(:,2), 100); 254s 254s ## Plot their estimated PDFs 254s x = [min(r(:,1)):max(r(:,1))]; 254s y = binopdf (x, 50, mean (pshatA)); 254s plot (x, y, "-pg"); 254s x = [min(r(:,2)):max(r(:,2))]; 254s y = binopdf (x, 100, mean (pshatB)); 254s plot (x, y, "-sc"); 254s ylim ([0, 0.2]) 254s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 254s "Normalized HIST of sample 2 with ps=0.50", ... 254s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 254s mean (pshatA)), ... 254s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 254s mean (pshatB))}) 254s title ("Two population samples from different binomial distibutions") 254s hold off 254s ***** test 254s x = 0:3; 254s [pshat, psci] = binofit (x, 3); 254s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 254s assert (psci(1,:), [0, 0.7076], 1e-4); 254s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 254s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 254s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 254s ***** error ... 254s binofit ([1 2 3 4]) 254s ***** error ... 254s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 254s ***** error binofit (ones(2), [1, 2, 3, 3]) 254s ***** error ... 254s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 254s ***** error ... 254s binofit ([1, 4, 3, 2], [5, 5, 5]) 254s ***** error ... 254s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 254s ***** error binofit ([1, 2, 1], 3, 1.2); 254s ***** error binofit ([1, 2, 1], 3, 0); 254s ***** error binofit ([1, 2, 1], 3, "alpha"); 254s 10 tests, 10 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/nakafit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/nakafit.m 254s ***** demo 254s ## Sample 3 populations from different Nakagami distibutions 254s randg ("seed", 5) # for reproducibility 254s r1 = nakarnd (0.5, 1, 2000, 1); 254s randg ("seed", 2) # for reproducibility 254s r2 = nakarnd (5, 1, 2000, 1); 254s randg ("seed", 7) # for reproducibility 254s r3 = nakarnd (2, 2, 2000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, [0.05:0.1:3.5], 10); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s ylim ([0, 2.5]); 254s xlim ([0, 3.0]); 254s hold on 254s 254s ## Estimate their MU and LAMBDA parameters 254s mu_omegaA = nakafit (r(:,1)); 254s mu_omegaB = nakafit (r(:,2)); 254s mu_omegaC = nakafit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [0.01:0.1:3.01]; 254s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 254s plot (x, y, "-pr"); 254s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 254s plot (x, y, "-sg"); 254s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 254s plot (x, y, "-^c"); 254s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 254s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 254s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 254s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 254s mu_omegaA(1), mu_omegaA(2)), ... 254s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 254s mu_omegaB(1), mu_omegaB(2)), ... 254s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 254s mu_omegaC(1), mu_omegaC(2))}) 254s title ("Three population samples from different Nakagami distibutions") 254s hold off 254s ***** test 254s paramhat = nakafit ([1:50]); 254s paramhat_out = [0.7355, 858.5]; 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** test 254s paramhat = nakafit ([1:5]); 254s paramhat_out = [1.1740, 11]; 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** test 254s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 254s paramhat_out = [1.1740, 11]; 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** test 254s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 254s paramhat_out = nakafit ([1:5, 5]); 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** error nakafit (ones (2,5)); 254s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 254s ***** error nakafit ([1, 2, 3, 4, 5], 0); 254s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 254s ***** error ... 254s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 254s 15 tests, 15 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/bisafit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/bisafit.m 254s ***** demo 254s ## Sample 3 populations from different Birnbaum-Saunders distibutions 254s rand ("seed", 5); # for reproducibility 254s r1 = bisarnd (1, 0.5, 2000, 1); 254s rand ("seed", 2); # for reproducibility 254s r2 = bisarnd (2, 0.3, 2000, 1); 254s rand ("seed", 7); # for reproducibility 254s r3 = bisarnd (4, 0.5, 2000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 80, 4.2); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s ylim ([0, 1.1]); 254s xlim ([0, 8]); 254s hold on 254s 254s ## Estimate their α and β parameters 254s beta_gammaA = bisafit (r(:,1)); 254s beta_gammaB = bisafit (r(:,2)); 254s beta_gammaC = bisafit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [0:0.1:8]; 254s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 254s plot (x, y, "-pr"); 254s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 254s plot (x, y, "-sg"); 254s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 254s plot (x, y, "-^c"); 254s hold off 254s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 254s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 254s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 254s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 254s beta_gammaA(1), beta_gammaA(2)), ... 254s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 254s beta_gammaB(1), beta_gammaB(2)), ... 254s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 254s beta_gammaC(1), beta_gammaC(2))}) 254s title ("Three population samples from different Birnbaum-Saunders distibutions") 254s hold off 254s ***** test 254s paramhat = bisafit ([1:50]); 254s paramhat_out = [16.2649, 1.0156]; 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** test 254s paramhat = bisafit ([1:5]); 254s paramhat_out = [2.5585, 0.5839]; 254s assert (paramhat, paramhat_out, 1e-4); 254s ***** error bisafit (ones (2,5)); 254s ***** error bisafit ([-1 2 3 4]); 254s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 254s ***** error bisafit ([1, 2, 3, 4, 5], 0); 254s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 254s ***** error ... 254s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 254s ***** error ... 254s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 254s ***** error ... 254s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 254s ***** error ... 254s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 254s ***** error ... 254s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 254s 12 tests, 12 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/logilike.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/logilike.m 254s ***** test 254s nlogL = logilike ([25.5, 8.7725], [1:50]); 254s assert (nlogL, 206.6769, 1e-4); 254s ***** test 254s nlogL = logilike ([3, 0.8645], [1:5]); 254s assert (nlogL, 9.0699, 1e-4); 254s ***** error logilike (3.25) 254s ***** error logilike ([5, 0.2], ones (2)) 254s ***** error ... 254s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 254s ***** error ... 254s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 254s ***** error ... 254s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 254s ***** error ... 254s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 254s 8 tests, 8 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/gevfit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gevfit.m 254s ***** demo 254s ## Sample 2 populations from 2 different exponential distibutions 254s rand ("seed", 1); # for reproducibility 254s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 254s rand ("seed", 2); # for reproducibility 254s r2 = gevrnd (0, 1, -4, 5000, 1); 254s r = [r1, r2]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 50, 5); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s hold on 254s 254s ## Estimate their k, sigma, and mu parameters 254s k_sigma_muA = gevfit (r(:,1)); 254s k_sigma_muB = gevfit (r(:,2)); 254s 254s ## Plot their estimated PDFs 254s x = [-10:0.5:20]; 254s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 254s plot (x, y, "-pr"); 254s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 254s plot (x, y, "-sg"); 254s ylim ([0, 0.7]) 254s xlim ([-7, 5]) 254s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 254s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 254s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 254s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 254s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 254s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 254s title ("Two population samples from different exponential distibutions") 254s hold off 254s ***** test 254s x = 1:50; 254s [pfit, pci] = gevfit (x); 254s pfit_out = [-0.4407, 15.1923, 21.5309]; 254s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 254s assert (pfit, pfit_out, 1e-3); 254s assert (pci, pci_out, 1e-3); 254s ***** test 254s x = 1:2:50; 254s [pfit, pci] = gevfit (x); 254s pfit_out = [-0.4434, 15.2024, 21.0532]; 254s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 254s assert (pfit, pfit_out, 1e-3); 254s assert (pci, pci_out, 1e-3); 254s ***** error gevfit (ones (2,5)); 254s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 254s ***** error gevfit ([1, 2, 3, 4, 5], 0); 254s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 254s ***** error ... 254s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 254s ***** error ... 254s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 254s ***** error ... 254s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 254s ***** error ... 254s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 254s ***** error ... 254s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 254s 11 tests, 11 passed, 0 known failure, 0 skipped 254s [inst/dist_fit/ricefit.m] 254s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/ricefit.m 254s ***** demo 254s ## Sample 3 populations from different Gamma distibutions 254s randg ("seed", 5); # for reproducibility 254s randp ("seed", 6); 254s r1 = ricernd (1, 2, 3000, 1); 254s randg ("seed", 2); # for reproducibility 254s randp ("seed", 8); 254s r2 = ricernd (2, 4, 3000, 1); 254s randg ("seed", 7); # for reproducibility 254s randp ("seed", 9); 254s r3 = ricernd (7.5, 1, 3000, 1); 254s r = [r1, r2, r3]; 254s 254s ## Plot them normalized and fix their colors 254s hist (r, 75, 4); 254s h = findobj (gca, "Type", "patch"); 254s set (h(1), "facecolor", "c"); 254s set (h(2), "facecolor", "g"); 254s set (h(3), "facecolor", "r"); 254s ylim ([0, 0.7]); 254s xlim ([0, 12]); 254s hold on 254s 254s ## Estimate their α and β parameters 254s s_sigmaA = ricefit (r(:,1)); 254s s_sigmaB = ricefit (r(:,2)); 254s s_sigmaC = ricefit (r(:,3)); 254s 254s ## Plot their estimated PDFs 254s x = [0.01,0.1:0.2:18]; 254s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 254s plot (x, y, "-pr"); 254s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 254s plot (x, y, "-sg"); 254s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 254s plot (x, y, "-^c"); 254s hold off 254s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 254s "Normalized HIST of sample 2 with s=2 and σ=4", ... 254s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 254s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 254s s_sigmaA(1), s_sigmaA(2)), ... 254s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 254s s_sigmaB(1), s_sigmaB(2)), ... 254s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 254s s_sigmaC(1), s_sigmaC(2))}) 254s title ("Three population samples from different Rician distibutions") 254s hold off 254s ***** test 254s [paramhat, paramci] = ricefit ([1:50]); 254s assert (paramhat, [15.3057, 17.6668], 1e-4); 254s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 254s ***** test 254s [paramhat, paramci] = ricefit ([1:50], 0.01); 254s assert (paramhat, [15.3057, 17.6668], 1e-4); 254s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 254s ***** test 254s [paramhat, paramci] = ricefit ([1:5]); 254s assert (paramhat, [2.3123, 1.6812], 1e-4); 254s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 254s ***** test 254s [paramhat, paramci] = ricefit ([1:5], 0.01); 254s assert (paramhat, [2.3123, 1.6812], 1e-4); 254s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 254s ***** test 254s freq = [1 1 1 1 5]; 254s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 254s assert (paramhat, [3.5181, 1.5565], 1e-4); 254s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 255s ***** test 255s censor = [1 0 0 0 0]; 255s [paramhat, paramci] = ricefit ([1:5], [], censor); 255s assert (paramhat, [3.2978, 1.1527], 1e-4); 255s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 255s ***** assert (class (ricefit (single ([1:50]))), "single") 255s ***** error ricefit (ones (2)) 255s ***** error ricefit ([1:50], 1) 255s ***** error ricefit ([1:50], -1) 255s ***** error ricefit ([1:50], {0.05}) 255s ***** error ricefit ([1:50], "k") 255s ***** error ricefit ([1:50], i) 255s ***** error ricefit ([1:50], [0.01 0.02]) 255s ***** error ricefit ([1:50], [], [1 1]) 255s ***** error ricefit ([1:50], [], [], [1 1]) 255s ***** error ... 255s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 255s ***** error ricefit ([1 2 3 -4]) 255s ***** error ricefit ([1 2 0], [], [1 0 0]) 255s 19 tests, 19 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/normfit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/normfit.m 255s ***** demo 255s ## Sample 3 populations from 3 different normal distibutions 255s randn ("seed", 1); # for reproducibility 255s r1 = normrnd (2, 5, 5000, 1); 255s randn ("seed", 2); # for reproducibility 255s r2 = normrnd (5, 2, 5000, 1); 255s randn ("seed", 3); # for reproducibility 255s r3 = normrnd (9, 4, 5000, 1); 255s r = [r1, r2, r3]; 255s 255s ## Plot them normalized and fix their colors 255s hist (r, 15, 0.4); 255s h = findobj (gca, "Type", "patch"); 255s set (h(1), "facecolor", "c"); 255s set (h(2), "facecolor", "g"); 255s set (h(3), "facecolor", "r"); 255s hold on 255s 255s ## Estimate their mu and sigma parameters 255s [muhat, sigmahat] = normfit (r); 255s 255s ## Plot their estimated PDFs 255s x = [min(r(:)):max(r(:))]; 255s y = normpdf (x, muhat(1), sigmahat(1)); 255s plot (x, y, "-pr"); 255s y = normpdf (x, muhat(2), sigmahat(2)); 255s plot (x, y, "-sg"); 255s y = normpdf (x, muhat(3), sigmahat(3)); 255s plot (x, y, "-^c"); 255s ylim ([0, 0.5]) 255s xlim ([-20, 20]) 255s hold off 255s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 255s "Normalized HIST of sample 2 with mu=5, σ=2", ... 255s "Normalized HIST of sample 3 with mu=9, σ=4", ... 255s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 255s muhat(1), sigmahat(1)), ... 255s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 255s muhat(2), sigmahat(2)), ... 255s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 255s muhat(3), sigmahat(3))}, "location", "northwest") 255s title ("Three population samples from different normal distibutions") 255s hold off 255s ***** test 255s load lightbulb 255s idx = find (lightbulb(:,2) == 0); 255s censoring = lightbulb(idx,3) == 1; 255s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 255s assert (muHat, 9496.59586737857, 1e-11); 255s assert (sigmaHat, 3064.021012796456, 2e-12); 255s ***** test 255s randn ("seed", 234); 255s x = normrnd (3, 5, [1000, 1]); 255s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 255s assert (muCI(1) < 3); 255s assert (muCI(2) > 3); 255s assert (sigmaCI(1) < 5); 255s assert (sigmaCI(2) > 5); 255s ***** error ... 255s normfit (ones (3,3,3)) 255s ***** error ... 255s normfit (ones (20,3), [], zeros (20,1)) 255s ***** error normfit (ones (20,1), 0) 255s ***** error normfit (ones (20,1), -0.3) 255s ***** error normfit (ones (20,1), 1.2) 255s ***** error normfit (ones (20,1), [0.05 0.1]) 255s ***** error normfit (ones (20,1), 0.02+i) 255s ***** error ... 255s normfit (ones (20,1), [], zeros(15,1)) 255s ***** error ... 255s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 255s ***** error ... 255s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 255s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 255s 13 tests, 13 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/poisslike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/poisslike.m 255s ***** test 255s x = [1 3 2 4 5 4 3 4]; 255s [nlogL, avar] = poisslike (3.25, x); 255s assert (nlogL, 13.9533, 1e-4) 255s ***** test 255s x = [1 2 3 4 5]; 255s f = [1 1 2 3 1]; 255s [nlogL, avar] = poisslike (3.25, x, f); 255s assert (nlogL, 13.9533, 1e-4) 255s ***** error poisslike (1) 255s ***** error poisslike ([1 2 3], [1 2]) 255s ***** error ... 255s poisslike (3.25, ones (10, 2)) 255s ***** error ... 255s poisslike (3.25, [1 2 3 -4 5]) 255s ***** error ... 255s poisslike (3.25, ones (10, 1), ones (8,1)) 255s ***** error ... 255s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/gpfit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gpfit.m 255s ***** demo 255s ## Sample 2 populations from different generalized Pareto distibutions 255s ## Assume location parameter θ is known 255s theta = 0; 255s rand ("seed", 5); # for reproducibility 255s r1 = gprnd (1, 2, theta, 20000, 1); 255s rand ("seed", 2); # for reproducibility 255s r2 = gprnd (3, 1, theta, 20000, 1); 255s r = [r1, r2]; 255s 255s ## Plot them normalized and fix their colors 255s hist (r, [0.1:0.2:100], 5); 255s h = findobj (gca, "Type", "patch"); 255s set (h(1), "facecolor", "r"); 255s set (h(2), "facecolor", "c"); 255s ylim ([0, 1]); 255s xlim ([0, 5]); 255s hold on 255s 255s ## Estimate their α and β parameters 255s k_sigmaA = gpfit (r(:,1), theta); 255s k_sigmaB = gpfit (r(:,2), theta); 255s 255s ## Plot their estimated PDFs 255s x = [0.01, 0.1:0.2:18]; 255s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 255s plot (x, y, "-pc"); 255s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 255s plot (x, y, "-sr"); 255s hold off 255s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 255s "Normalized HIST of sample 2 with k=2 and σ=2", ... 255s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 255s k_sigmaA(1), k_sigmaA(2)), ... 255s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 255s k_sigmaB(1), k_sigmaB(2))}) 255s title ("Three population samples from different generalized Pareto distibutions") 255s text (2, 0.7, "Known location parameter θ = 0") 255s hold off 255s ***** test 255s k = 0.8937; sigma = 1.3230; theta = 1; 255s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 255s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 255s [hat, ci] = gpfit (x, theta); 255s assert (hat, [k, sigma, theta], 1e-4); 255s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 255s ***** error gpfit () 255s ***** error gpfit (1) 255s ***** error gpfit ([0.2, 0.5+i], 0); 255s ***** error gpfit (ones (2,2) * 0.5, 0); 255s ***** error ... 255s gpfit ([0.5, 1.2], [0, 1]); 255s ***** error ... 255s gpfit ([0.5, 1.2], 5+i); 255s ***** error ... 255s gpfit ([1:5], 2); 255s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 255s ***** error gpfit ([0.01:0.1:0.99], 0, i); 255s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 255s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 255s ***** error 255s gpfit ([1 2 3], 0, [], [1 5]) 255s ***** error 255s gpfit ([1 2 3], 0, [], [1 5 -1]) 255s ***** error ... 255s gpfit ([1:10], 1, 0.05, [], 5) 255s 15 tests, 15 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/tlsfit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/tlsfit.m 255s ***** demo 255s ## Sample 3 populations from 3 different location-scale T distibutions 255s randn ("seed", 1); # for reproducibility 255s randg ("seed", 2); # for reproducibility 255s r1 = tlsrnd (-4, 3, 1, 2000, 1); 255s randn ("seed", 3); # for reproducibility 255s randg ("seed", 4); # for reproducibility 255s r2 = tlsrnd (0, 3, 1, 2000, 1); 255s randn ("seed", 5); # for reproducibility 255s randg ("seed", 6); # for reproducibility 255s r3 = tlsrnd (5, 5, 4, 2000, 1); 255s r = [r1, r2, r3]; 255s 255s ## Plot them normalized and fix their colors 255s hist (r, [-21:21], [1, 1, 1]); 255s h = findobj (gca, "Type", "patch"); 255s set (h(1), "facecolor", "c"); 255s set (h(2), "facecolor", "g"); 255s set (h(3), "facecolor", "r"); 255s ylim ([0, 0.25]); 255s xlim ([-20, 20]); 255s hold on 255s 255s ## Estimate their lambda parameter 255s mu_sigma_nuA = tlsfit (r(:,1)); 255s mu_sigma_nuB = tlsfit (r(:,2)); 255s mu_sigma_nuC = tlsfit (r(:,3)); 255s 255s ## Plot their estimated PDFs 255s x = [-20:0.1:20]; 255s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 255s plot (x, y, "-pr"); 255s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 255s plot (x, y, "-sg"); 255s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 255s plot (x, y, "-^c"); 255s hold off 255s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 255s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 255s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 255s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 255s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 255s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 255s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 255s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 255s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 255s title ("Three population samples from different location-scale T distibutions") 255s hold off 255s ***** test 255s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 255s [paramhat, paramci] = tlsfit (x); 255s paramhat_out = [0.035893, 0.862711, 0.649261]; 255s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 255s assert (paramhat, paramhat_out, 1e-6); 255s assert (paramci, paramci_out, 1e-5); 255s ***** test 255s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 255s [paramhat, paramci] = tlsfit (x, 0.01); 255s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 255s assert (paramci, paramci_out, 1e-4); 255s ***** error tlsfit (ones (2,5)); 255s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 255s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 255s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 255s ***** error ... 255s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 255s 12 tests, 12 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/logllike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/logllike.m 255s ***** test 255s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 255s assert (nlogL, 211.2965, 1e-4); 255s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 255s ***** test 255s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 255s assert (nlogL, 9.2206, 1e-4); 255s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 255s ***** error logllike (3.25) 255s ***** error logllike ([5, 0.2], ones (2)) 255s ***** error ... 255s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 255s ***** error ... 255s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 255s ***** error ... 255s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 255s ***** error ... 255s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/hnfit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/hnfit.m 255s ***** demo 255s ## Sample 2 populations from different half-normal distibutions 255s rand ("seed", 1); # for reproducibility 255s r1 = hnrnd (0, 5, 5000, 1); 255s rand ("seed", 2); # for reproducibility 255s r2 = hnrnd (0, 2, 5000, 1); 255s r = [r1, r2]; 255s 255s ## Plot them normalized and fix their colors 255s hist (r, [0.5:20], 1); 255s h = findobj (gca, "Type", "patch"); 255s set (h(1), "facecolor", "c"); 255s set (h(2), "facecolor", "g"); 255s hold on 255s 255s ## Estimate their shape parameters 255s mu_sigmaA = hnfit (r(:,1), 0); 255s mu_sigmaB = hnfit (r(:,2), 0); 255s 255s ## Plot their estimated PDFs 255s x = [0:0.2:10]; 255s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 255s plot (x, y, "-pr"); 255s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 255s plot (x, y, "-sg"); 255s xlim ([0, 10]) 255s ylim ([0, 0.5]) 255s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 255s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 255s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 255s mu_sigmaA(1), mu_sigmaA(2)), ... 255s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 255s mu_sigmaB(1), mu_sigmaB(2))}) 255s title ("Two population samples from different half-normal distibutions") 255s hold off 255s ***** test 255s x = 1:20; 255s [paramhat, paramci] = hnfit (x, 0); 255s assert (paramhat, [0, 11.9791], 1e-4); 255s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 255s ***** test 255s x = 1:20; 255s [paramhat, paramci] = hnfit (x, 0, 0.01); 255s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 255s ***** error hnfit () 255s ***** error hnfit (1) 255s ***** error hnfit ([0.2, 0.5+i], 0); 255s ***** error hnfit (ones (2,2) * 0.5, 0); 255s ***** error ... 255s hnfit ([0.5, 1.2], [0, 1]); 255s ***** error ... 255s hnfit ([0.5, 1.2], 5+i); 255s ***** error ... 255s hnfit ([1:5], 2); 255s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 255s ***** error hnfit ([0.01:0.1:0.99], 0, i); 255s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 255s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 255s ***** error 255s hnfit ([1 2 3], 0, [], [1 5]) 255s ***** error 255s hnfit ([1 2 3], 0, [], [1 5 -1]) 255s 15 tests, 15 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/ricelike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/ricelike.m 255s ***** test 255s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 255s assert (nlogL, 204.5230311010569, 1e-12); 255s ***** test 255s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 255s assert (nlogL, 8.65562164930058, 1e-12); 255s ***** error ricelike (3.25) 255s ***** error ricelike ([5, 0.2], ones (2)) 255s ***** error ... 255s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 255s ***** error ... 255s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 255s ***** error ... 255s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 255s ***** error ... 255s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 255s ***** error ... 255s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 255s 9 tests, 9 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/gevfit_lmom.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gevfit_lmom.m 255s ***** xtest <31070> 255s data = 1:50; 255s [pfit, pci] = gevfit_lmom (data); 255s expected_p = [-0.28 15.01 20.22]'; 255s assert (pfit, expected_p, 0.1); 255s 1 test, 1 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/explike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/explike.m 255s ***** test 255s x = 12; 255s beta = 5; 255s [L, V] = explike (beta, x); 255s expected_L = 4.0094; 255s expected_V = 6.5789; 255s assert (L, expected_L, 0.001); 255s assert (V, expected_V, 0.001); 255s ***** test 255s x = 1:5; 255s beta = 2; 255s [L, V] = explike (beta, x); 255s expected_L = 10.9657; 255s expected_V = 0.4; 255s assert (L, expected_L, 0.001); 255s assert (V, expected_V, 0.001); 255s ***** error explike () 255s ***** error explike (2) 255s ***** error explike ([12, 3], [1:50]) 255s ***** error explike (3, ones (10, 2)) 255s ***** error ... 255s explike (3, [1:50], [1, 2, 3]) 255s ***** error ... 255s explike (3, [1:50], [], [1, 2, 3]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/evlike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/evlike.m 255s ***** test 255s x = 1:50; 255s [nlogL, acov] = evlike ([2.3, 1.2], x); 255s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 255s assert (nlogL, 3.242264755689906e+17, 1e-14); 255s assert (acov, avar_out, 1e-3); 255s ***** test 255s x = 1:50; 255s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 255s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 255s assert (nlogL, 481898704.0472211, 1e-6); 255s assert (acov, avar_out, 1e-3); 255s ***** test 255s x = 1:50; 255s [nlogL, acov] = evlike ([21, 15], x); 255s avar_out = [11.73913876598908, -5.9546128523121216; ... 255s -5.954612852312121, 3.708060045170236]; 255s assert (nlogL, 223.7612479380652, 1e-13); 255s assert (acov, avar_out, 1e-14); 255s ***** error evlike ([12, 15]) 255s ***** error evlike ([12, 15, 3], [1:50]) 255s ***** error evlike ([12, 3], ones (10, 2)) 255s ***** error ... 255s evlike ([12, 15], [1:50], [1, 2, 3]) 255s ***** error ... 255s evlike ([12, 15], [1:50], [], [1, 2, 3]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/gamlike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gamlike.m 255s ***** test 255s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 255s assert (nlogL, 19.4426, 1e-4); 255s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 255s ***** test 255s [nlogL, acov] = gamlike([2, 3], [5:45]); 255s assert (nlogL, 305.8070, 1e-4); 255s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 255s ***** test 255s [nlogL, acov] = gamlike([2, 13], [5:45]); 255s assert (nlogL, 163.2261, 1e-4); 255s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 255s ***** error ... 255s gamlike ([12, 15]) 255s ***** error gamlike ([12, 15, 3], [1:50]) 255s ***** error gamlike ([12, 3], ones (10, 2)) 255s ***** error ... 255s gamlike ([12, 15], [1:50], [1, 2, 3]) 255s ***** error ... 255s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/normlike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/normlike.m 255s ***** error normlike ([12, 15]); 255s ***** error normlike ([12, 15], ones (2)); 255s ***** error ... 255s normlike ([12, 15, 3], [1:50]); 255s ***** error ... 255s normlike ([12, 15], [1:50], [1, 2, 3]); 255s ***** error ... 255s normlike ([12, 15], [1:50], [], [1, 2, 3]); 255s ***** error ... 255s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 255s ***** test 255s x = 1:50; 255s [nlogL, avar] = normlike ([2.3, 1.2], x); 255s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 255s assert (nlogL, 13014.95883783327, 1e-10); 255s assert (avar, avar_out, 1e-4); 255s ***** test 255s x = 1:50; 255s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 255s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 255s assert (nlogL, 2854.802587833265, 1e-10); 255s assert (avar, avar_out, 1e-4); 255s ***** test 255s x = 1:50; 255s [nlogL, avar] = normlike ([21, 15], x); 255s avar_out = [5.460474308300396, -1.600790513833993; ... 255s -1.600790513833993, 2.667984189723321]; 255s assert (nlogL, 206.738325604233, 1e-12); 255s assert (avar, avar_out, 1e-14); 255s ***** test 255s x = 1:50; 255s censor = ones (1, 50); 255s censor([2, 4, 6, 8, 12, 14]) = 0; 255s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 255s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 255s assert (nlogL, Inf); 255s assert (avar, [NaN, NaN; NaN, NaN]); 255s ***** test 255s x = 1:50; 255s censor = ones (1, 50); 255s censor([2, 4, 6, 8, 12, 14]) = 0; 255s [nlogL, avar] = normlike ([21, 15], x, censor); 255s avar_out = [24.4824488866131, -10.6649544179636; ... 255s -10.6649544179636, 6.22827849965737]; 255s assert (nlogL, 86.9254371829733, 1e-12); 255s assert (avar, avar_out, 8e-14); 255s 11 tests, 11 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/nbinlike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/nbinlike.m 255s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 255s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 255s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 255s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 255s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 255s ***** error nbinlike (3.25) 255s ***** error nbinlike ([5, 0.2], ones (2)) 255s ***** error nbinlike ([5, 0.2], [-1, 3]) 255s ***** error ... 255s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 255s ***** error nbinlike ([-5, 0.2], [1:15]) 255s ***** error nbinlike ([0, 0.2], [1:15]) 255s ***** error nbinlike ([5, 1.2], [3, 5]) 255s ***** error nbinlike ([5, -0.2], [3, 5]) 255s ***** error ... 255s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 255s ***** error ... 255s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 255s ***** error ... 255s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 255s 16 tests, 16 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/gumbelfit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/gumbelfit.m 255s ***** demo 255s ## Sample 3 populations from different Gumbel distibutions 255s rand ("seed", 1); # for reproducibility 255s r1 = gumbelrnd (2, 5, 400, 1); 255s rand ("seed", 11); # for reproducibility 255s r2 = gumbelrnd (-5, 3, 400, 1); 255s rand ("seed", 16); # for reproducibility 255s r3 = gumbelrnd (14, 8, 400, 1); 255s r = [r1, r2, r3]; 255s 255s ## Plot them normalized and fix their colors 255s hist (r, 25, 0.32); 255s h = findobj (gca, "Type", "patch"); 255s set (h(1), "facecolor", "c"); 255s set (h(2), "facecolor", "g"); 255s set (h(3), "facecolor", "r"); 255s ylim ([0, 0.28]) 255s xlim ([-11, 50]); 255s hold on 255s 255s ## Estimate their MU and BETA parameters 255s mu_betaA = gumbelfit (r(:,1)); 255s mu_betaB = gumbelfit (r(:,2)); 255s mu_betaC = gumbelfit (r(:,3)); 255s 255s ## Plot their estimated PDFs 255s x = [min(r(:)):max(r(:))]; 255s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 255s plot (x, y, "-pr"); 255s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 255s plot (x, y, "-sg"); 255s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 255s plot (x, y, "-^c"); 255s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 255s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 255s "Normalized HIST of sample 3 with μ=14 and β=8", ... 255s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 255s mu_betaA(1), mu_betaA(2)), ... 255s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 255s mu_betaB(1), mu_betaB(2)), ... 255s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 255s mu_betaC(1), mu_betaC(2))}) 255s title ("Three population samples from different Gumbel distibutions") 255s hold off 255s ***** test 255s x = 1:50; 255s [paramhat, paramci] = gumbelfit (x); 255s paramhat_out = [18.3188, 13.0509]; 255s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 255s assert (paramhat, paramhat_out, 1e-4); 255s assert (paramci, paramci_out, 1e-4); 255s ***** test 255s x = 1:50; 255s [paramhat, paramci] = gumbelfit (x, 0.01); 255s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 255s assert (paramci, paramci_out, 1e-4); 255s ***** error gumbelfit (ones (2,5)); 255s ***** error ... 255s gumbelfit (single (ones (1,5))); 255s ***** error ... 255s gumbelfit ([1, 2, 3, 4, NaN]); 255s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 255s ***** error ... 255s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 255s ***** error ... 255s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 255s ***** error 255s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 255s ***** error ... 255s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 255s 10 tests, 10 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/nakalike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/nakalike.m 255s ***** test 255s nlogL = nakalike ([0.735504, 858.5], [1:50]); 255s assert (nlogL, 202.8689, 1e-4); 255s ***** test 255s nlogL = nakalike ([1.17404, 11], [1:5]); 255s assert (nlogL, 8.6976, 1e-4); 255s ***** test 255s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 255s assert (nlogL, 8.6976, 1e-4); 255s ***** test 255s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 255s assert (nlogL, 8.6976, 1e-4); 255s ***** error nakalike (3.25) 255s ***** error nakalike ([5, 0.2], ones (2)) 255s ***** error ... 255s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 255s ***** error ... 255s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 255s ***** error ... 255s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 255s ***** error ... 255s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 255s ***** error ... 255s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 255s 11 tests, 11 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/betalike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/betalike.m 255s ***** test 255s x = 0.01:0.02:0.99; 255s [nlogL, avar] = betalike ([2.3, 1.2], x); 255s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 255s assert (nlogL, 17.873477715879040, 3e-14); 255s assert (avar, avar_out, 1e-7); 255s ***** test 255s x = 0.01:0.02:0.99; 255s [nlogL, avar] = betalike ([1, 4], x); 255s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 255s assert (nlogL, 79.648061114839550, 1e-13); 255s assert (avar, avar_out, 1e-7); 255s ***** test 255s x = 0.00:0.02:1; 255s [nlogL, avar] = betalike ([1, 4], x); 255s avar_out = [0.00000801564765, 0.00000131397245; ... 255s 0.00000131397245, 0.00070827639442]; 255s assert (nlogL, 573.2008434477486, 1e-10); 255s assert (avar, avar_out, 1e-14); 255s ***** error ... 255s betalike ([12, 15]); 255s ***** error betalike ([12, 15, 3], [1:50]); 255s ***** error ... 255s betalike ([12, 15], ones (10, 1), ones (8,1)) 255s ***** error ... 255s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 255s ***** error ... 255s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 255s 8 tests, 8 passed, 0 known failure, 0 skipped 255s [inst/dist_fit/bisalike.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fit/bisalike.m 255s ***** test 255s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 255s assert (nlogL, 215.5905, 1e-4); 255s ***** test 255s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 255s assert (nlogL, 8.9950, 1e-4); 255s ***** error bisalike (3.25) 255s ***** error bisalike ([5, 0.2], ones (2)) 255s ***** error bisalike ([5, 0.2], [-1, 3]) 255s ***** error ... 255s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 255s ***** error ... 255s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 255s ***** error ... 255s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 255s ***** error ... 255s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 255s 9 tests, 9 passed, 0 known failure, 0 skipped 255s [inst/stepwisefit.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/stepwisefit.m 255s ***** test 255s % Sample data from Draper and Smith (n = 13, k = 4) 255s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 255s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 255s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 255s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 255s 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]'; 255s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 255s assert(X_use, [4 1]) 255s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 255s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 255s assert(X_use, [4 1]) 255s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 255s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 255s assert(X_use, [4 1]) 255s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 255s 1 test, 1 passed, 0 known failure, 0 skipped 255s [inst/tiedrank.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/tiedrank.m 255s ***** test 255s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 255s assert (r, [1, 2.5, 4, 5, 2.5]); 255s assert (tieadj, 3); 255s ***** test 255s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 255s assert (r, [1; 2.5; 4; 5; 2.5]); 255s assert (tieadj, 3); 255s ***** test 255s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 255s assert (r, [1, 2.5, 4, 5, 2.5]); 255s assert (tieadj, [1; 0; 18]); 255s ***** test 255s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 255s assert (r, [1, 2.5, 2, 1, 2.5]); 255s assert (tieadj, 3); 255s ***** test 255s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 255s assert (r, [1, 2.5, 2, 1, 2.5]); 255s assert (tieadj, [1; 0; 18]); 255s ***** error tiedrank (ones (2)) 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], "A") 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], [true, true]) 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], 0, "A") 255s ***** error ... 255s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 255s 12 tests, 12 passed, 0 known failure, 0 skipped 255s [inst/regression_ftest.m] 255s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/regression_ftest.m 255s ***** error regression_ftest (); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 256s ***** error ... 256s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 256s ***** error ... 256s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 256s 18 tests, 18 passed, 0 known failure, 0 skipped 256s [inst/datasample.m] 256s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/datasample.m 256s ***** error datasample(); 256s ***** error datasample(1); 256s ***** error datasample({1, 2, 3}, 1); 256s ***** error datasample([1 2], -1); 256s ***** error datasample([1 2], 1.5); 256s ***** error datasample([1 2], [1 1]); 256s ***** error datasample([1 2], 'g', [1 1]); 256s ***** error datasample([1 2], 1, -1); 256s ***** error datasample([1 2], 1, 1.5); 256s ***** error datasample([1 2], 1, [1 1]); 256s ***** error datasample([1 2], 1, 1, "Replace", -2); 256s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 256s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 256s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 256s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 256s ***** test 256s dat = randn (10, 4); 256s assert (size (datasample (dat, 3, 1)), [3 4]); 256s ***** test 256s dat = randn (10, 4); 256s assert (size (datasample (dat, 3, 2)), [10 3]); 256s 17 tests, 17 passed, 0 known failure, 0 skipped 256s [inst/fitcgam.m] 256s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitcgam.m 256s ***** demo 256s ## Train a GAM classifier for binary classification 256s ## using specific data and plot the decision boundaries. 256s 256s ## Define specific data 256s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 256s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 256s Y = [0; 0; 0; 0; 0; ... 256s 1; 1; 1; 1; 1]; 256s 256s ## Train the GAM model 256s obj = fitcgam (X, Y, "Interactions", "all"); 256s 256s ## Create a grid of values for prediction 256s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 256s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 256s [x1G, x2G] = meshgrid (x1, x2); 256s XGrid = [x1G(:), x2G(:)]; 256s pred = predict (obj, XGrid); 256s 256s ## Plot decision boundaries and data points 256s predNumeric = str2double (pred); 256s gidx = predNumeric > 0.5; 256s 256s figure 256s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 256s hold on 256s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 256s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 256s xlabel("Feature 1"); 256s ylabel("Feature 2"); 256s title("Generalized Additive Model (GAM) Decision Boundary"); 256s legend({"Class 1 Region", "Class 0 Region", ... 256s "Class 1 Samples", "Class 0 Samples"}, ... 256s "location", "northwest") 256s axis tight 256s hold off 256s ***** test 256s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 256s y = [0; 0; 1; 1]; 256s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 256s a = fitcgam (x, y, "PredictorNames", PredictorNames); 256s assert (class (a), "ClassificationGAM"); 256s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 256s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 256s assert (a.ClassNames, {'0'; '1'}) 256s assert (a.PredictorNames, PredictorNames) 256s assert (a.BaseModel.Intercept, 0) 257s ***** test 257s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 257s y = [1; 0; 1; 0; 1]; 257s a = fitcgam (x, y, "interactions", "all"); 257s assert (class (a), "ClassificationGAM"); 257s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 257s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 257s assert (a.ClassNames, {'1'; '0'}) 257s assert (a.PredictorNames, {'x1', 'x2'}) 257s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 258s ***** test 258s load fisheriris 258s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 258s X = meas(inds, :); 258s Y = species(inds, :)'; 258s Y = strcmp (Y, 'virginica')'; 258s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 258s assert (class (a), "ClassificationGAM"); 258s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 258s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 258s assert (a.ClassNames, {'0'; '1'}) 258s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 258s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 258s assert (a.ModelwInt.Intercept, 0) 261s ***** error fitcgam () 261s ***** error fitcgam (ones (4,1)) 261s ***** error 261s fitcgam (ones (4,2), ones (4, 1), "K") 261s ***** error 261s fitcgam (ones (4,2), ones (3, 1)) 261s ***** error 261s fitcgam (ones (4,2), ones (3, 1), "K", 2) 261s 8 tests, 8 passed, 0 known failure, 0 skipped 261s [inst/hmmgenerate.m] 261s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hmmgenerate.m 261s ***** test 261s len = 25; 261s transprob = [0.8, 0.2; 0.4, 0.6]; 261s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 261s [sequence, states] = hmmgenerate (len, transprob, outprob); 261s assert (length (sequence), len); 261s assert (length (states), len); 261s assert (min (sequence) >= 1); 261s assert (max (sequence) <= columns (outprob)); 261s assert (min (states) >= 1); 261s assert (max (states) <= rows (transprob)); 261s ***** test 261s len = 25; 261s transprob = [0.8, 0.2; 0.4, 0.6]; 261s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 261s symbols = {"A", "B", "C"}; 261s statenames = {"One", "Two"}; 261s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 261s "symbols", symbols, "statenames", statenames); 261s assert (length (sequence), len); 261s assert (length (states), len); 261s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 261s strcmp (sequence, "C") == ones (1, len)); 261s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 261s 2 tests, 2 passed, 0 known failure, 0 skipped 261s [inst/randsample.m] 261s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/randsample.m 261s ***** test 261s n = 20; 261s k = 5; 261s x = randsample(n, k); 261s assert (size(x), [1 k]); 261s x = randsample(n, k, true); 261s assert (size(x), [1 k]); 261s x = randsample(n, k, false); 261s assert (size(x), [1 k]); 261s x = randsample(n, k, true, ones(n, 1)); 261s assert (size(x), [1 k]); 261s x = randsample(1:n, k); 261s assert (size(x), [1 k]); 261s x = randsample(1:n, k, true); 261s assert (size(x), [1 k]); 261s x = randsample(1:n, k, false); 261s assert (size(x), [1 k]); 261s x = randsample(1:n, k, true, ones(n, 1)); 261s assert (size(x), [1 k]); 261s x = randsample((1:n)', k); 261s assert (size(x), [k 1]); 261s x = randsample((1:n)', k, true); 261s assert (size(x), [k 1]); 261s x = randsample((1:n)', k, false); 261s assert (size(x), [k 1]); 261s x = randsample((1:n)', k, true, ones(n, 1)); 261s assert (size(x), [k 1]); 261s n = 10; 261s k = 100; 261s x = randsample(n, k, true, 1:n); 261s assert (size(x), [1 k]); 261s x = randsample((1:n)', k, true); 261s assert (size(x), [k 1]); 261s x = randsample(k, k, false, 1:k); 261s assert (size(x), [1 k]); 261s 1 test, 1 passed, 0 known failure, 0 skipped 261s [inst/mhsample.m] 261s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/mhsample.m 261s ***** demo 261s ## Define function to sample 261s d = 2; 261s mu = [-1; 2]; 261s rand ("seed", 5) # for reproducibility 261s Sigma = rand (d); 261s Sigma = (Sigma + Sigma'); 261s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 261s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 261s ## Inputs 261s start = ones (1, 2); 261s nsamples = 500; 261s sym = true; 261s K = 500; 261s m = 10; 261s rand ("seed", 8) # for reproducibility 261s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 261s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 261s "symmetric", sym, "burnin", K, "thin", m); 261s figure; 261s hold on; 261s plot (smpl(:, 1), smpl(:, 2), 'x'); 261s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 261s z = reshape (pdf ([x(:), y(:)]), size(x)); 261s mesh (x, y, z, "facecolor", "None"); 261s ## Using sample points to find the volume of half a sphere with radius of .5 261s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 261s int = mean (f (smpl) ./ pdf (smpl)); 261s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 261s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 261s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 261s printf ("Monte Carlo integral error estimate %f\n", errest); 261s printf ("The actual error %f\n", trueerr); 261s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 261s ***** demo 261s ## Integrate truncated normal distribution to find normilization constant 261s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 261s nsamples = 1e3; 261s rand ("seed", 5) # for reproducibility 261s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 261s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 261s "symmetric", true, "thin", 4); 261s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 261s x = linspace (-3, 3, 1000); 261s area(x, f(x)); 261s xlabel ('x'); 261s ylabel ('f(x)'); 261s int = mean (f (smpl) ./ pdf (smpl)); 261s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 261s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 261s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 261s printf ("Monte Carlo integral error estimate %f\n", errest); 261s printf ("The actual error %f\n", trueerr); 261s ***** test 261s nchain = 1e4; 261s start = rand (nchain, 1); 261s nsamples = 1e3; 261s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 261s proppdf = @(x, y) 1/3; 261s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 261s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 261s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 261s "burnin", 0); 261s assert (mean (mean (smpl, 1), 3), 1, .01); 261s assert (mean (var (smpl, 1), 3), 1, .01) 264s ***** error mhsample (); 264s ***** error mhsample (1); 264s ***** error mhsample (1, 1); 264s ***** error mhsample (1, 1, "pdf", @(x)x); 264s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 264s 6 tests, 6 passed, 0 known failure, 0 skipped 264s [inst/ztest2.m] 264s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ztest2.m 264s ***** error ztest2 (); 265s ***** error ztest2 (1); 265s ***** error ztest2 (1, 2); 265s ***** error ztest2 (1, 2, 3); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha") 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha", 0); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha", 1.2); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha", "val"); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "tail", "val"); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 265s ***** error ... 265s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 265s 11 tests, 11 passed, 0 known failure, 0 skipped 265s [inst/probit.m] 265s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/probit.m 265s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 265s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 265s ***** error probit () 265s ***** error probit (1, 2) 265s 4 tests, 4 passed, 0 known failure, 0 skipped 265s [inst/fishertest.m] 265s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fishertest.m 265s ***** demo 265s ## A Fisher's exact test example 265s 265s x = [3, 1; 1, 3] 265s [h, p, stats] = fishertest(x) 265s ***** assert (fishertest ([3, 4; 5, 7]), false); 265s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 265s ***** test 265s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 265s assert (pval, 1, 1e-14); 265s assert (stats.OddsRatio, 1.05); 265s CI = [0.159222057151289, 6.92429189601808]; 265s assert (stats.ConfidenceInterval, CI, 1e-14) 265s ***** test 265s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 265s assert (pval, 0.08080808080808080, 1e-14); 265s assert (stats.OddsRatio, 0); 265s assert (stats.ConfidenceInterval, [-Inf, Inf]) 265s ***** error fishertest (); 265s ***** error fishertest (1, 2, 3, 4, 5, 6); 265s ***** error ... 265s fishertest (ones (2, 2, 2)); 265s ***** error ... 265s fishertest ([1, 2; -3, 4]); 265s ***** error ... 265s fishertest ([1, 2; 3, 4+i]); 265s ***** error ... 265s fishertest ([1, 2; 3, 4.2]); 265s ***** error ... 265s fishertest ([NaN, 2; 3, 4]); 265s ***** error ... 265s fishertest ([1, Inf; 3, 4]); 265s ***** error ... 265s fishertest (ones (2) * 1e8); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "alpha", 0); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "alpha", 1.2); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "alpha", "val"); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "tail", "val"); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 265s ***** error ... 265s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 265s 19 tests, 19 passed, 0 known failure, 0 skipped 265s [inst/inconsistent.m] 265s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/inconsistent.m 265s ***** error inconsistent () 265s ***** error inconsistent ([1 2 1], 2, 3) 265s ***** error inconsistent (ones (2, 2)) 265s ***** error inconsistent ([1 2 1], -1) 265s ***** error inconsistent ([1 2 1], 1.3) 265s ***** error inconsistent ([1 2 1], [1 1]) 265s ***** error inconsistent (ones (2, 3)) 265s ***** test 265s load fisheriris; 265s Z = linkage(meas, 'average', 'chebychev'); 265s assert (cond (inconsistent (Z)), 39.9, 1e-3); 265s 8 tests, 8 passed, 0 known failure, 0 skipped 265s [inst/ff2n.m] 265s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ff2n.m 265s ***** error ff2n (); 265s ***** error ff2n (2, 5); 265s ***** error ff2n (2.5); 265s ***** error ff2n (0); 265s ***** error ff2n (-3); 265s ***** error ff2n (3+2i); 265s ***** error ff2n (Inf); 265s ***** error ff2n (NaN); 265s ***** test 265s A = ff2n (3); 265s assert (A, fullfact (3)); 265s ***** test 265s A = ff2n (8); 265s assert (A, fullfact (8)); 265s 10 tests, 10 passed, 0 known failure, 0 skipped 265s [inst/plsregress.m] 265s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/plsregress.m 265s ***** demo 265s ## Perform Partial Least-Squares Regression 265s 265s ## Load the spectra data set and use the near infrared (NIR) spectral 265s ## intensities (NIR) as the predictor and the corresponding octave 265s ## ratings (octave) as the response. 265s load spectra 265s 265s ## Perform PLS regression with 10 components 265s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 265s 265s ## Plot the percentage of explained variance in the response variable 265s ## (PCTVAR) as a function of the number of components. 265s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 265s xlim ([1, 10]); 265s xlabel ("Number of PLS components"); 265s ylabel ("Percentage of Explained Variance in octane"); 265s title ("Explained Variance per PLS components"); 265s 265s ## Compute the fitted response and display the residuals. 265s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 265s residuals = octane - octane_fitted; 265s figure 265s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 265s xlabel ("Observations"); 265s ylabel ("Residuals"); 265s title ("Residuals in octane's fitted responce"); 265s ***** demo 265s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 265s 265s ## Load the spectra data set and use the near infrared (NIR) spectral 265s ## intensities (NIR) as the predictor and the corresponding octave 265s ## ratings (octave) as the response. Variables with a VIP score greater than 265s ## 1 are considered important for the projection of the PLS regression model. 265s load spectra 265s 265s ## Perform PLS regression with 10 components 265s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 265s plsregress (NIR, octane, 10); 265s 265s ## Calculate the normalized PLS weights 265s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 265s 265s ## Calculate the VIP scores for 10 components 265s nobs = size (xload, 1); 265s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 265s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 265s 265s ## Find variables with a VIP score greater than or equal to 1 265s VIPidx = find (VIPscore >= 1); 265s 265s ## Plot the VIP scores 265s scatter (1:length (VIPscore), VIPscore, "xb"); 265s hold on 265s scatter (VIPidx, VIPscore (VIPidx), "xr"); 265s plot ([1, length(VIPscore)], [1, 1], "--k"); 265s hold off 265s axis ("tight"); 265s xlabel ("Predictor Variables"); 265s ylabel ("VIP scores"); 265s title ("VIP scores for each predictror variable with 10 components"); 265s ***** test 265s load spectra 265s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 265s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 265s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 265s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 265s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 265s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 265s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 265s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 265s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 265s assert (xload(1,:), xload1_out, 1e-4); 265s assert (yload, yload_out, 1e-4); 265s assert (xscore(1,:), xscore1_out, 1e-4); 265s assert (yscore(1,:), yscore1_out, 1e-4); 265s ***** test 265s load spectra 265s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 265s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 265s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 265s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 265s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 265s assert (xload(1,:), xload1_out, 1e-4); 265s assert (yload, yload_out, 1e-4); 265s assert (xscore(1,:), xscore1_out, 1e-4); 265s assert (yscore(1,:), yscore1_out, 1e-4); 265s ***** error 265s plsregress (1) 265s ***** error plsregress (1, "asd") 265s ***** error plsregress (1, {1,2,3}) 265s ***** error plsregress ("asd", 1) 265s ***** error plsregress ({1,2,3}, 1) 265s ***** error ... 265s plsregress (ones (20,3), ones (15,1)) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 0) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), -5) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3.2) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), [2, 3]) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 4) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 265s ***** error ... 265s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 265s ***** error plsregress (1, 2) 266s 24 tests, 24 passed, 0 known failure, 0 skipped 266s [inst/vartestn.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/vartestn.m 266s ***** demo 266s ## Test the null hypothesis that the variances are equal across the five 266s ## columns of data in the students’ exam grades matrix, grades. 266s 266s load examgrades 266s vartestn (grades) 266s ***** demo 266s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 266s ## equal across different model years. 266s 266s load carsmall 266s vartestn (MPG, Model_Year) 266s ***** demo 266s ## Use Levene’s test to test the null hypothesis that the variances in miles 266s ## per gallon (MPG) are equal across different model years. 266s 266s load carsmall 266s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 266s ***** demo 266s ## Test the null hypothesis that the variances are equal across the five 266s ## columns of data in the students’ exam grades matrix, grades, using the 266s ## Brown-Forsythe test. Suppress the display of the summary table of 266s ## statistics and the box plot. 266s 266s load examgrades 266s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 266s ***** error vartestn (); 266s ***** error vartestn (1); 266s ***** error ... 266s vartestn ([1, 2, 3, 4, 5, 6, 7]); 266s ***** error ... 266s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 266s ***** error ... 266s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 266s ***** error ... 266s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 266s ***** error ... 266s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 266s ***** error ... 266s vartestn (ones (50,3), "Display", "some"); 266s ***** error ... 266s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 266s ***** error ... 266s vartestn (ones (50,3), [], "som"); 266s ***** error ... 266s vartestn (ones (50,3), [], "some", "some"); 266s ***** error ... 266s vartestn (ones (50,3), [1, 2], "Display", "off"); 266s ***** test 266s load examgrades 266s [p, stat] = vartestn (grades, "Display", "off"); 266s assert (p, 7.908647337018238e-08, 1e-14); 266s assert (stat.chisqstat, 38.7332, 1e-4); 266s assert (stat.df, 4); 266s ***** test 266s load examgrades 266s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 266s assert (p, 9.523239714592791e-07, 1e-14); 266s assert (stat.fstat, 8.5953, 1e-4); 266s assert (stat.df, [4, 595]); 266s ***** test 266s load examgrades 266s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 266s assert (p, 7.219514351897161e-07, 1e-14); 266s assert (stat.fstat, 8.7503, 1e-4); 266s assert (stat.df, [4, 595]); 266s ***** test 266s load examgrades 266s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 266s assert (p, 1.312093241723211e-06, 1e-14); 266s assert (stat.fstat, 8.4160, 1e-4); 266s assert (stat.df, [4, 595]); 266s ***** test 266s load examgrades 266s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 266s assert (p, 8.235660885480556e-07, 1e-14); 266s assert (stat.fstat, 8.6766, 1e-4); 266s assert (stat.df, [4, 595]); 266s 17 tests, 17 passed, 0 known failure, 0 skipped 266s [inst/princomp.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/princomp.m 266s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 266s ***** test 266s x=[7 4 3 266s 4 1 8 266s 6 3 5 266s 8 6 1 266s 8 5 7 266s 7 2 9 266s 5 3 3 266s 9 5 8 266s 7 4 5 266s 8 2 2]; 266s R = corrcoef (x); 266s [V, lambda] = eig (R); 266s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 266s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 266s ## contribution of first 2 PCs to each original variable 266s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 266s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 266s F = zscore(x)*B; 266s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 266s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 266s ***** test 266s x=[1,2,3;2,1,3]'; 266s [COEFF,SCORE,latent,tsquare] = princomp(x); 266s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 266s m(:,1) = m(:,1)*sign(COEFF(1,1)); 266s m(:,2) = m(:,2)*sign(COEFF(1,2)); 266s ***** assert(COEFF,m(1:2,:),10*eps); 266s ***** assert(SCORE,-m,10*eps); 266s ***** assert(latent,[1.5;.5],10*eps); 266s ***** assert(tsquare,[4;4;4]/3,10*eps); 266s ***** test 266s x=x'; 266s [COEFF,SCORE,latent,tsquare] = princomp(x); 266s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 266s m(:,1) = m(:,1)*sign(COEFF(1,1)); 266s m(:,2) = m(:,2)*sign(COEFF(1,2)); 266s m(:,3) = m(:,3)*sign(COEFF(3,3)); 266s ***** assert(COEFF,m,10*eps); 266s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 266s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 266s ***** assert(latent,[1;0;0],10*eps); 266s ***** assert(tsquare,[0.5;0.5],10*eps) 266s ***** test 266s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 266s ***** assert(COEFF,m(:, 1),10*eps); 266s ***** assert(SCORE,-m(1:2,1),10*eps); 266s ***** assert(latent,[1],10*eps); 266s ***** assert(tsquare,[0.5;0.5],10*eps) 266s 19 tests, 19 passed, 0 known failure, 0 skipped 266s [inst/ridge.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/ridge.m 266s ***** demo 266s ## Perform ridge regression for a range of ridge parameters and observe 266s ## how the coefficient estimates change based on the acetylene dataset. 266s 266s load acetylene 266s 266s X = [x1, x2, x3]; 266s 266s x1x2 = x1 .* x2; 266s x1x3 = x1 .* x3; 266s x2x3 = x2 .* x3; 266s 266s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 266s 266s k = 0:1e-5:5e-3; 266s 266s b = ridge (y, D, k); 266s 266s figure 266s plot (k, b, "LineWidth", 2) 266s ylim ([-100, 100]) 266s grid on 266s xlabel ("Ridge Parameter") 266s ylabel ("Standardized Coefficient") 266s title ("Ridge Trace") 266s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 266s 266s ***** demo 266s 266s load carbig 266s X = [Acceleration Weight Displacement Horsepower]; 266s y = MPG; 266s 266s n = length(y); 266s 266s rand("seed",1); % For reproducibility 266s 266s c = cvpartition(n,'HoldOut',0.3); 266s idxTrain = training(c,1); 266s idxTest = ~idxTrain; 266s 266s idxTrain = training(c,1); 266s idxTest = ~idxTrain; 266s 266s k = 5; 266s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 266s 266s % Predict MPG values for the test data using the model. 266s yhat = b(1) + X(idxTest,:)*b(2:end); 266s scatter(y(idxTest),yhat) 266s 266s hold on 266s plot(y(idxTest),y(idxTest),"r") 266s xlabel('Actual MPG') 266s ylabel('Predicted MPG') 266s hold off 266s 266s ***** test 266s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 266s assert (b, [0.5533; 0.5533], 1e-4); 266s ***** test 266s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 266s assert (b, [0.4841; 0.4841], 1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0); 266s assert (b,[10.2273;1.97128;-0.601818],1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0.0005); 266s assert (b,[10.2233;1.9712;-0.6056],1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0.001); 266s assert (b,[10.2194;1.9711;-0.6094],1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0.002); 266s assert (b,[10.2116;1.9709;-0.6169],1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0.005); 266s assert (b,[10.1882;1.9704;-0.6393],1e-4); 266s ***** test 266s load acetylene 266s x = [x1, x2, x3]; 266s b = ridge (y, x, 0.01); 266s assert (b,[10.1497;1.9695;-0.6761],1e-4); 266s ***** error ridge (1) 266s ***** error ridge (1, 2) 266s ***** error ridge (ones (3), ones (3), 2) 266s ***** error ridge ([1, 2], ones (2), 2) 266s ***** error ridge ([], ones (3), 2) 266s ***** error ridge (ones (5,1), [], 2) 266s ***** error ... 266s ridge ([1; 2; 3; 4; 5], ones (3), 3) 266s ***** error ... 266s ridge ([1; 2; 3], ones (3), 3, 2) 266s ***** error ... 266s ridge ([1; 2; 3], ones (3), 3, "some") 266s 17 tests, 17 passed, 0 known failure, 0 skipped 266s [inst/cmdscale.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cmdscale.m 266s ***** shared m, n, X, D 266s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 266s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 266s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 266s 2 tests, 2 passed, 0 known failure, 0 skipped 266s [inst/cholcov.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/cholcov.m 266s ***** demo 266s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 266s T = cholcov (C1) 266s C2 = T'*T 266s ***** test 266s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 266s T = cholcov (C1); 266s assert (C1, T'*T, 1e-15 * ones (size (C1))); 266s 1 test, 1 passed, 0 known failure, 0 skipped 266s [inst/anova1.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/anova1.m 266s ***** demo 266s x = meshgrid (1:6); 266s randn ("seed", 15); # for reproducibility 266s x = x + normrnd (0, 1, 6, 6); 266s anova1 (x, [], 'off'); 266s ***** demo 266s x = meshgrid (1:6); 266s randn ("seed", 15); # for reproducibility 266s x = x + normrnd (0, 1, 6, 6); 266s [p, atab] = anova1(x); 266s ***** demo 266s x = ones (50, 4) .* [-2, 0, 1, 5]; 266s randn ("seed", 13); # for reproducibility 266s x = x + normrnd (0, 2, 50, 4); 266s groups = {"A", "B", "C", "D"}; 266s anova1 (x, groups); 266s ***** demo 266s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 266s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 266s anova1 (y(:), g(:), "on", "unequal"); 266s ***** test 266s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 266s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 266s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 266s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 266s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 266s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 266s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 266s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 266s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 266s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 266s group = [1:10] .* ones (10,10); 266s group = group(:); 266s [p, tbl] = anova1 (data, group, "off"); 266s assert (p, 0.022661, 1e-6); 266s assert (tbl{2,5}, 2.2969, 1e-4); 266s assert (tbl{2,3}, 9, 0); 266s assert (tbl{4,2}, 0.003903, 1e-6); 266s data = reshape (data, 10, 10); 266s [p, tbl, stats] = anova1 (data, [], "off"); 266s assert (p, 0.022661, 1e-6); 266s assert (tbl{2,5}, 2.2969, 1e-4); 266s assert (tbl{2,3}, 9, 0); 266s assert (tbl{4,2}, 0.003903, 1e-6); 266s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 266s N = 10 * ones (1, 10); 266s assert (stats.means, means, 1e-6); 266s assert (length (stats.gnames), 10, 0); 266s assert (stats.n, N, 0); 266s ***** test 266s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 266s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 266s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 266s assert (p, 0.00004163, 1e-6); 266s assert (tbl{2,5}, 22.573418, 1e-6); 266s assert (tbl{2,3}, 2, 0); 266s assert (tbl{3,3}, 14, 0); 266s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 266s assert (p, 0.00208877, 1e-8); 266s assert (tbl{2,5}, 15.523192, 1e-6); 266s assert (tbl{2,3}, 2, 0); 266s assert (tbl{2,4}, 7.5786897, 1e-6); 266s 2 tests, 2 passed, 0 known failure, 0 skipped 266s [inst/sigma_pts.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/sigma_pts.m 266s ***** demo 266s K = [1 0.5; 0.5 1]; # covaraince matrix 266s # calculate and build associated ellipse 266s [R,S,~] = svd (K); 266s theta = atan2 (R(2,1), R(1,1)); 266s v = sqrt (diag (S)); 266s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 266s t = linspace (0, 2*pi, 100).'; 266s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 266s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 266s 266s figure(1); clf; hold on 266s # Plot ellipse and axes 266s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 266s plot (xe,ye,'-r'); 266s 266s col = 'rgb'; 266s l = [-1.8 -1 1.5]; 266s for li = 1:3 266s p = sigma_pts (2, [], K, l(li)); 266s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 266s p(1,1), p(1,2), ['o' col(li)]); 266s h(li) = tmp(1); 266s endfor 266s hold off 266s axis image 266s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 266s ***** test 266s p = sigma_pts (5); 266s assert (mean (p), zeros(1,5), sqrt(eps)); 266s assert (cov (p), eye(5), sqrt(eps)); 266s ***** test 266s m = randn(1, 5); 266s p = sigma_pts (5, m); 266s assert (mean (p), m, sqrt(eps)); 266s assert (cov (p), eye(5), sqrt(eps)); 266s ***** test 266s x = linspace (0,1,5); 266s K = exp (- (x.' - x).^2/ 0.5); 266s p = sigma_pts (5, [], K); 266s assert (mean (p), zeros(1,5), sqrt(eps)); 266s assert (cov (p), K, sqrt(eps)); 266s ***** error sigma_pts(2,1); 266s ***** error sigma_pts(2,[],1); 266s ***** error sigma_pts(2,1,1); 266s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 266s 7 tests, 7 passed, 0 known failure, 0 skipped 266s [inst/violin.m] 266s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/violin.m 266s ***** demo 266s clf 266s x = zeros (9e2, 10); 266s for i=1:10 266s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 266s endfor 266s h = violin (x, "color", "c"); 266s axis tight 266s set (h.violin, "linewidth", 2); 266s set (gca, "xgrid", "on"); 266s xlabel ("Variables") 266s ylabel ("Values") 266s ***** demo 266s clf 266s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 266s subplot (1,2,1) 266s title ("Grade 3 heights - vertical"); 266s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 266s violin (data, "Nbins", 10); 266s axis tight 266s 266s subplot(1,2,2) 266s title ("Grade 3 heights - horizontal"); 266s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 266s violin (data, "horizontal", "Nbins", 10); 266s axis tight 266s ***** demo 266s clf 266s data = exprnd (0.1, 500,4); 266s violin (data, "nbins", {5,10,50,100}); 266s axis ([0 5 0 max(data(:))]) 266s ***** demo 266s clf 266s data = exprnd (0.1, 500,4); 266s violin (data, "color", jet(4)); 266s axis ([0 5 0 max(data(:))]) 266s ***** demo 266s clf 266s data = repmat(exprnd (0.1, 500,1), 1, 4); 266s violin (data, "width", linspace (0.1,0.5,4)); 266s axis ([0 5 0 max(data(:))]) 266s ***** demo 266s clf 266s data = repmat(exprnd (0.1, 500,1), 1, 4); 266s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 266s axis ([0 5 0 max(data(:))]) 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s data = exprnd (0.1, 500,4); 266s violin (data, "color", jet(4)); 266s axis ([0 5 0 max(data(:))]) 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 266s subplot (1,2,1) 266s title ("Grade 3 heights - vertical"); 266s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 266s violin (data, "Nbins", 10); 266s axis tight 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 266s subplot (1,2,1) 266s title ("Grade 3 heights - vertical"); 266s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 266s violin (data, "Nbins", 10); 266s axis tight 266s subplot(1,2,2) 266s title ("Grade 3 heights - horizontal"); 266s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 266s violin (data, "horizontal", "Nbins", 10); 266s axis tight 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s data = repmat(exprnd (0.1, 500,1), 1, 4); 266s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 266s axis ([0 5 0 max(data(:))]) 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 267s ***** test 267s hf = figure ("visible", "off"); 267s unwind_protect 267s data = repmat(exprnd (0.1, 500,1), 1, 4); 267s violin (data, "width", linspace (0.1,0.5,4)); 267s axis ([0 5 0 max(data(:))]) 267s unwind_protect_cleanup 267s close (hf); 267s end_unwind_protect 267s 5 tests, 5 passed, 0 known failure, 0 skipped 267s [inst/chi2test.m] 267s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/chi2test.m 267s ***** error chi2test (); 267s ***** error chi2test ([1, 2, 3, 4, 5]); 267s ***** error chi2test ([1, 2; 2, 1+3i]); 267s ***** error chi2test ([NaN, 6; 34, 12]); 267s ***** error ... 267s p = chi2test (ones (3, 3), "mutual", []); 267s ***** error ... 267s p = chi2test (ones (3, 3, 3), "testtype", 2); 267s ***** error ... 267s p = chi2test (ones (3, 3, 3), "mutual"); 267s ***** error ... 267s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 267s ***** error ... 267s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 267s ***** error ... 267s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 267s ***** warning p = chi2test (ones (2)); 267s ***** warning p = chi2test (ones (3, 2)); 267s ***** warning p = chi2test (0.4 * ones (3)); 267s ***** test 267s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 267s p = chi2test (x); 267s assert (p, 0.017787, 1e-6); 267s ***** test 267s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 267s [p, chisq] = chi2test (x); 267s assert (chisq, 11.9421, 1e-4); 267s ***** test 267s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 267s [p, chisq, df] = chi2test (x); 267s assert (df, 4); 267s ***** test 267s ***** shared x 267s x(:,:,1) = [59, 32; 9,16]; 267s x(:,:,2) = [55, 24;12,33]; 267s x(:,:,3) = [107,80;17,56];%! 267s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 267s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 267s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 267s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 267s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 267s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 267s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 267s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 267s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 267s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 267s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 267s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 267s ***** test 267s [pval, chisq, df, E] = chi2test (x); 267s assert (chisq, 64.0982, 1e-4); 267s assert (df, 7); 267s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 267s ***** test 267s [pval, chisq, df, E] = chi2test (x, "joint", 2); 267s assert (chisq, 56.0943, 1e-4); 267s assert (df, 5); 267s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 267s ***** test 267s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 267s assert (chisq, 146.6058, 1e-4); 267s assert (df, 9); 267s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 267s ***** test 267s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 267s assert (chisq, 52.2509, 1e-4); 267s assert (df, 3); 267s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 267s ***** test 267s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 267s assert (chisq, 1.6034, 1e-4); 267s assert (df, 2); 267s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 267s 34 tests, 34 passed, 0 known failure, 0 skipped 267s [inst/correlation_test.m] 267s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/correlation_test.m 267s ***** error correlation_test (); 267s ***** error correlation_test (1); 267s ***** error ... 267s correlation_test ([1 2 NaN]', [2 3 4]'); 267s ***** error ... 267s correlation_test ([1 2 Inf]', [2 3 4]'); 267s ***** error ... 267s correlation_test ([1 2 3+i]', [2 3 4]'); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 NaN]'); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 Inf]'); 267s ***** error ... 267s correlation_test ([1 2 3]', [3 4 3+i]'); 267s ***** error ... 267s correlation_test ([1 2 3]', [3 4 4 5]'); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 267s ***** error ... 267s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 267s ***** test 267s x = [6 7 7 9 10 12 13 14 15 17]; 267s y = [19 22 27 25 30 28 30 29 25 32]; 267s [h, pval, stats] = correlation_test (x, y); 267s assert (stats.corrcoef, corr (x', y'), 1e-14); 267s assert (pval, 0.0223, 1e-4); 267s ***** test 267s x = [6 7 7 9 10 12 13 14 15 17]'; 267s y = [19 22 27 25 30 28 30 29 25 32]'; 267s [h, pval, stats] = correlation_test (x, y); 267s assert (stats.corrcoef, corr (x, y), 1e-14); 267s assert (pval, 0.0223, 1e-4); 267s 20 tests, 20 passed, 0 known failure, 0 skipped 267s [inst/normalise_distribution.m] 267s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/normalise_distribution.m 267s ***** test 267s v = normalise_distribution ([1 2 3], [], 1); 267s assert (v, [0 0 0]) 267s ***** test 267s v = normalise_distribution ([1 2 3], [], 2); 267s assert (v, norminv ([1 3 5] / 6), 3 * eps) 267s ***** test 267s v = normalise_distribution ([1 2 3]', [], 2); 267s assert (v, [0 0 0]') 267s ***** test 267s v = normalise_distribution ([1 2 3]', [], 1); 267s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 267s ***** test 267s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 267s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 267s ***** test 267s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 267s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 267s ***** test 267s A = randn ( 10 ); 267s N = normalise_distribution (A, @normcdf); 267s assert (A, N, 10000 * eps) 267s ***** test 267s A = exprnd (1, 100); 267s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 267s assert (mean (vec (N)), 0, 0.1) 267s assert (std (vec (N)), 1, 0.1) 267s ***** test 267s A = rand (1000,1); 267s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 267s assert (mean (vec (N)), 0, 0.2) 267s assert (std (vec (N)), 1, 0.1) 267s ***** test 267s A = [rand(1000,1), randn(1000, 1)]; 267s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 267s assert (mean (N), [0, 0], 0.2) 267s assert (std (N), [1, 1], 0.1) 267s ***** test 267s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 267s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 267s assert (mean (N, 2), [0, 0, 0]', 0.2); 267s assert (std (N, [], 2), [1, 1, 1]', 0.1); 267s ***** xtest 267s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 267s N = normalise_distribution (A); 267s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 267s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 267s ***** test 267s ***** error normalise_distribution (zeros (3, 4), ... 267s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 267s 14 tests, 14 passed, 0 known failure, 0 skipped 267s [inst/kstest.m] 267s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/kstest.m 267s ***** demo 267s ## Use the stock return data set to test the null hypothesis that the data 267s ## come from a standard normal distribution against the alternative 267s ## hypothesis that the population CDF of the data is larger that the 267s ## standard normal CDF. 267s 267s load stockreturns; 267s x = stocks(:,2); 267s [h, p, k, c] = kstest (x, "Tail", "larger") 267s 267s ## Compute the empirical CDF and plot against the standard normal CDF 267s [f, x_values] = ecdf (x); 267s h1 = plot (x_values, f); 267s hold on; 267s h2 = plot (x_values, normcdf (x_values), 'r--'); 267s set (h1, "LineWidth", 2); 267s set (h2, "LineWidth", 2); 267s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 267s "Location", "southeast"); 267s title ("Empirical CDF of stock return data against standard normal CDF") 267s ***** error kstest () 267s ***** error kstest (ones (2, 4)) 267s ***** error kstest ([2, 3, 5, 3+3i]) 267s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "tail") 267s ***** error ... 267s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "tail", 0) 267s ***** error ... 267s kstest ([2,3,4,5,6], "tail", "whatever") 267s ***** error ... 267s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 267s ***** error ... 267s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 267s ***** error ... 267s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 267s ***** error ... 267s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 267s ***** test 267s load examgrades 267s [h, p] = kstest (grades(:,1)); 267s assert (h, true); 267s assert (p, 7.58603305206105e-107, 1e-14); 267s ***** test 267s load examgrades 267s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 267s assert (h, false); 267s assert (p, 0.5612, 1e-4); 267s ***** test 267s load examgrades 267s x = grades(:,1); 267s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 267s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 267s assert (h, true); 267s assert (p, 0.0021, 1e-4); 267s ***** test 267s load stockreturns 267s x = stocks(:,3); 267s [h,p,k,c] = kstest (x, "Tail", "larger"); 267s assert (h, true); 267s assert (p, 5.085438806199252e-05, 1e-14); 267s assert (k, 0.2197, 1e-4); 267s assert (c, 0.1207, 1e-4); 267s 21 tests, 21 passed, 0 known failure, 0 skipped 267s [inst/x2fx.m] 267s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/x2fx.m 267s ***** test 267s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 267s D = x2fx(X,'quadratic'); 267s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 267s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 267s ***** test 267s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 267s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 267s D = x2fx(X,model); 267s assert (D(1,:) , [1, 1, 10, 10, 1]); 267s assert (D(2,:) , [1, 2, 20, 40, 4]); 267s assert (D(4,:) , [1, 4, 20, 80, 16]); 267s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 267s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 267s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/harmmean.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/harmmean.m 268s ***** test 268s x = [0:10]; 268s y = [x;x+5;x+10]; 268s assert (harmmean (x), 0); 268s m = [0 8.907635160795225 14.30854471766802]; 268s assert (harmmean (y, 2), m', 4e-14); 268s assert (harmmean (y, "all"), 0); 268s y(2,4) = NaN; 268s m(2) = 9.009855936313949; 268s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 268s assert (harmmean (y', "omitnan"), m, 4e-14); 268s z = y + 20; 268s assert (harmmean (z, "all"), NaN); 268s assert (harmmean (z, "all", "includenan"), NaN); 268s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 268s m = [24.59488458841874 NaN 34.71244385944397]; 268s assert (harmmean (z'), m, 4e-14); 268s assert (harmmean (z', "includenan"), m, 4e-14); 268s m(2) = 29.84104075528277; 268s assert (harmmean (z', "omitnan"), m, 4e-14); 268s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 268s ***** test 268s x = repmat ([1:20;6:25], [5 2 6 3]); 268s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 268s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 268s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 268s assert (size (harmmean (x, [1 4 3])), [1 40]); 268s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 268s ***** test 268s x = repmat ([1:20;6:25], [5 2 6 3]); 268s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 268s assert (harmmean (x, [3 2]), m, 4e-14); 268s x(2,5,6,3) = NaN; 268s m(2,3) = NaN; 268s assert (harmmean (x, [3 2]), m, 4e-14); 268s m(2,3) = 13.06617961315406; 268s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 268s ***** error harmmean ("char") 268s ***** error harmmean ([1 -1 3]) 268s ***** error ... 268s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 268s ***** error ... 268s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 268s ***** error ... 268s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 268s 8 tests, 8 passed, 0 known failure, 0 skipped 268s [inst/multcompare.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/multcompare.m 268s ***** demo 268s 268s ## Demonstration using balanced one-way ANOVA from anova1 268s 268s x = ones (50, 4) .* [-2, 0, 1, 5]; 268s randn ("seed", 1); # for reproducibility 268s x = x + normrnd (0, 2, 50, 4); 268s groups = {"A", "B", "C", "D"}; 268s [p, tbl, stats] = anova1 (x, groups, "off"); 268s multcompare (stats); 268s ***** demo 268s 268s ## Demonstration using unbalanced one-way ANOVA example from anovan 268s 268s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 268s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 268s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 268s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 268s 25.694 ]'; 268s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 268s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 268s 268s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 268s "ControlGroup", 1, "display", "on") 268s 268s ***** demo 268s 268s ## Demonstration using factorial ANCOVA example from anovan 268s 268s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 268s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 268s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 268s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 268s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 268s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 268s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 268s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 268s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 268s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 268s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 268s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 268s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 268s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 268s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 268s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 268s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 268s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 268s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 268s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 268s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 268s 268s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 268s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 268s "sstype", "h", "display", "off", "contrasts", ... 268s {"simple","poly",""}); 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 268s "display", "on") 268s 268s ***** demo 268s 268s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 268s ## squares to account for heteroskedasticity. 268s 268s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 268s 2, 2, 2, 2, 2, 2, 2, 2, ... 268s 3, 3, 3, 3, 3, 3, 3, 3]'; 268s 268s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 268s 10, 25, 66, 43, 47, 56, 6, 39, ... 268s 11, 39, 26, 35, 25, 14, 24, 17]'; 268s 268s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 268s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 268s b = polyfit (fitted, abs (STATS.resid), 1); 268s v = polyval (b, fitted); # Variance as a function of the fitted values 268s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 268s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 268s ***** demo 268s 268s ## Demonstration of p-value adjustments to control the false discovery rate 268s ## Data from Westfall (1997) JASA. 92(437):299-306 268s 268s p = [.005708; .023544; .024193; .044895; ... 268s .048805; .221227; .395867; .693051; .775755]; 268s 268s padj = multcompare(p,'ctype','fdr') 268s ***** test 268s 268s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 268s 268s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 268s 268s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 268s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 268s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 268s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 268s 25.694 ]'; 268s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 268s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 268s 268s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 268s "display", "off"); 268s assert (C(1,6), 2.85812420217898e-05, 1e-09); 268s assert (C(2,6), 5.22936741204085e-07, 1e-09); 268s assert (C(3,6), 2.12794763209146e-08, 1e-09); 268s assert (C(4,6), 7.82091664406946e-15, 1e-09); 268s assert (C(5,6), 0.546591417210693, 1e-09); 268s assert (C(6,6), 0.0845897945254446, 1e-09); 268s assert (C(7,6), 9.47436557975328e-08, 1e-09); 268s assert (C(8,6), 0.188873478781067, 1e-09); 268s assert (C(9,6), 4.08974010364197e-08, 1e-09); 268s assert (C(10,6), 4.44427348175241e-06, 1e-09); 268s assert (M(1,1), 10, 1e-09); 268s assert (M(2,1), 18, 1e-09); 268s assert (M(3,1), 19, 1e-09); 268s assert (M(4,1), 21.0001428571429, 1e-09); 268s assert (M(5,1), 29.0001111111111, 1e-09); 268s assert (M(1,2), 1.0177537954095, 1e-09); 268s assert (M(2,2), 1.28736803631001, 1e-09); 268s assert (M(3,2), 1.0177537954095, 1e-09); 268s assert (M(4,2), 1.0880245732889, 1e-09); 268s assert (M(5,2), 0.959547480416536, 1e-09); 268s 268s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 268s "display", "off"); 268s assert (C(1,6), 4.08303457454140e-05, 1e-09); 268s assert (C(2,6), 1.04587348240817e-06, 1e-09); 268s assert (C(3,6), 1.06397381604573e-07, 1e-09); 268s assert (C(4,6), 7.82091664406946e-14, 1e-09); 268s assert (C(5,6), 5.46591417210693e-01, 1e-09); 268s assert (C(6,6), 1.05737243156806e-01, 1e-09); 268s assert (C(7,6), 2.36859139493832e-07, 1e-09); 268s assert (C(8,6), 2.09859420867852e-01, 1e-09); 268s assert (C(9,6), 1.36324670121399e-07, 1e-09); 268s assert (C(10,6), 7.40712246958735e-06, 1e-09); 268s 268s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 268s "display", "off"); 268s assert (C(1,6), 1.14324968087159e-04, 1e-09); 268s assert (C(2,6), 3.13762044722451e-06, 1e-09); 268s assert (C(3,6), 1.91515286888231e-07, 1e-09); 268s assert (C(4,6), 7.82091664406946e-14, 1e-09); 268s assert (C(5,6), 5.46591417210693e-01, 1e-09); 268s assert (C(6,6), 2.53769383576334e-01, 1e-09); 268s assert (C(7,6), 6.63205590582730e-07, 1e-09); 268s assert (C(8,6), 3.77746957562134e-01, 1e-09); 268s assert (C(9,6), 3.27179208291358e-07, 1e-09); 268s assert (C(10,6), 2.22213674087620e-05, 1e-09); 268s 268s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 268s "display", "off"); 268s assert (C(1,6), 1.14324968087159e-04, 1e-09); 268s assert (C(2,6), 3.13762044722451e-06, 1e-09); 268s assert (C(3,6), 1.91515286888231e-07, 1e-09); 268s assert (C(4,6), 7.82091664406946e-14, 1e-09); 268s assert (C(5,6), 5.46591417210693e-01, 1e-09); 268s assert (C(6,6), 2.53769383576334e-01, 1e-09); 268s assert (C(7,6), 6.63205590582730e-07, 1e-09); 268s assert (C(8,6), 3.77746957562134e-01, 1e-09); 268s assert (C(9,6), 3.27179208291358e-07, 1e-09); 268s assert (C(10,6), 2.22213674087620e-05, 1e-09); 268s 268s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 268s "display", "off"); 268s assert (C(1,6), 0.00108105386141085, 1e-09); 268s assert (C(2,6), 2.7779386789517e-05, 1e-09); 268s assert (C(3,6), 1.3599854038198e-06, 1e-09); 268s assert (C(4,6), 7.58830197867751e-13, 1e-09); 268s assert (C(5,6), 0.984039948220281, 1e-09); 268s assert (C(6,6), 0.539077018557706, 1e-09); 268s assert (C(7,6), 5.59475764460574e-06, 1e-09); 268s assert (C(8,6), 0.771173490574105, 1e-09); 268s assert (C(9,6), 2.52838425729905e-06, 1e-09); 268s assert (C(10,6), 0.000200719143889168, 1e-09); 268s 268s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 268s 268s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 268s "display", "off"); 268s assert (C(1,6), 2.85812420217898e-04, 1e-09); 268s assert (C(2,6), 5.22936741204085e-06, 1e-09); 268s assert (C(3,6), 2.12794763209146e-07, 1e-09); 268s assert (C(4,6), 7.82091664406946e-14, 1e-09); 268s assert (C(5,6), 1.00000000000000e+00, 1e-09); 268s assert (C(6,6), 8.45897945254446e-01, 1e-09); 268s assert (C(7,6), 9.47436557975328e-07, 1e-09); 268s assert (C(8,6), 1.00000000000000e+00, 1e-09); 268s assert (C(9,6), 4.08974010364197e-07, 1e-09); 268s assert (C(10,6), 4.44427348175241e-05, 1e-09); 268s 268s ## Test for anova1 ("equal")- comparison of results from Matlab 268s 268s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 268s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 2.85812420217898e-05, 1e-09); 268s assert (C(2,6), 5.22936741204085e-07, 1e-09); 268s assert (C(3,6), 2.12794763209146e-08, 1e-09); 268s assert (C(4,6), 7.82091664406946e-15, 1e-09); 268s assert (C(5,6), 0.546591417210693, 1e-09); 268s assert (C(6,6), 0.0845897945254446, 1e-09); 268s assert (C(7,6), 9.47436557975328e-08, 1e-09); 268s assert (C(8,6), 0.188873478781067, 1e-09); 268s assert (C(9,6), 4.08974010364197e-08, 1e-09); 268s assert (C(10,6), 4.44427348175241e-06, 1e-09); 268s assert (M(1,1), 10, 1e-09); 268s assert (M(2,1), 18, 1e-09); 268s assert (M(3,1), 19, 1e-09); 268s assert (M(4,1), 21.0001428571429, 1e-09); 268s assert (M(5,1), 29.0001111111111, 1e-09); 268s assert (M(1,2), 1.0177537954095, 1e-09); 268s assert (M(2,2), 1.28736803631001, 1e-09); 268s assert (M(3,2), 1.0177537954095, 1e-09); 268s assert (M(4,2), 1.0880245732889, 1e-09); 268s assert (M(5,2), 0.959547480416536, 1e-09); 268s 268s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 268s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 268s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 0.001247025266382, 1e-09); 268s assert (C(2,6), 0.000018037115146, 1e-09); 268s assert (C(3,6), 0.000002974595187, 1e-09); 268s assert (C(4,6), 0.000000000786046, 1e-09); 268s assert (C(5,6), 0.5693192886650109, 1e-09); 268s assert (C(6,6), 0.110501699029776, 1e-09); 268s assert (C(7,6), 0.000131226488700, 1e-09); 268s assert (C(8,6), 0.1912101409715992, 1e-09); 268s assert (C(9,6), 0.000005385256394, 1e-09); 268s assert (C(10,6), 0.000074089106171, 1e-09); 268s ***** test 268s 268s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 268s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 268s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 268s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 268s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 268s "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 1.49311100811177e-05, 1e-09); 268s assert (C(2,6), 2.20506904243535e-07, 1e-09); 268s assert (C(3,6), 0.00449897860490058, 1e-09); 268s assert (M(1,1), 6.25, 1e-09); 268s assert (M(2,1), 4.75, 1e-09); 268s assert (M(3,1), 4, 1e-09); 268s assert (M(1,2), 0.152145154862547, 1e-09); 268s assert (M(2,2), 0.152145154862547, 1e-09); 268s assert (M(3,2), 0.152145154862547, 1e-09); 268s ***** test 268s 268s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 268s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 268s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 268s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 268s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 268s "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 0.000020799832702, 1e-09); 268s assert (C(2,6), 0.000000035812410, 1e-09); 268s assert (C(3,6), 0.003038942449215, 1e-09); 268s ***** test 268s 268s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 268s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 268s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 268s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 268s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 268s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 268s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 268s "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 0.261031111511073, 1e-09); 268s assert (C(2,6), 0.065879755907745, 1e-09); 268s assert (C(3,6), 0.241874613529270, 1e-09); 268s ***** shared visibility_setting 268s visibility_setting = get (0, "DefaultFigureVisible"); 268s ***** test 268s set (0, "DefaultFigureVisible", "off"); 268s 268s ## Test for kruskalwallis - comparison with results from MATLAB 268s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 268s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 268s group = [1:3] .* ones (10,3); 268s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 268s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 0.000163089828959986, 1e-09); 268s assert (C(2,6), 0.630298044801257, 1e-09); 268s assert (C(3,6), 0.00100567660695682, 1e-09); 268s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 268s assert (C(1,6), 0.000489269486879958, 1e-09); 268s assert (C(2,6), 1, 1e-09); 268s assert (C(3,6), 0.00301702982087047, 1e-09); 268s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 268s assert (C(1,6), 0.000819054880289573, 1e-09); 268s assert (C(2,6), 0.890628039849261, 1e-09); 268s assert (C(3,6), 0.00447816059021654, 1e-09); 268s set (0, "DefaultFigureVisible", visibility_setting); 268s ***** test 268s set (0, "DefaultFigureVisible", "off"); 268s ## Test for friedman - comparison with results from MATLAB 268s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 268s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 268s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 268s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 0.227424558028569, 1e-09); 268s assert (C(2,6), 0.0327204848315735, 1e-09); 268s assert (C(3,6), 0.353160353315988, 1e-09); 268s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 268s assert (C(1,6), 0.682273674085708, 1e-09); 268s assert (C(2,6), 0.0981614544947206, 1e-09); 268s assert (C(3,6), 1, 1e-09); 268s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 268s assert (C(1,6), 0.482657360384373, 1e-09); 268s assert (C(2,6), 0.102266573027672, 1e-09); 268s assert (C(3,6), 0.649836502233148, 1e-09); 268s set (0, "DefaultFigureVisible", visibility_setting); 268s ***** test 268s set (0, "DefaultFigureVisible", "off"); 268s ## Test for fitlm - same comparisons as for first anovan example 268s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 268s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 268s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 268s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 268s 25.694 ]'; 268s 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]'; 268s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 268s "contrasts","simple"); 268s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 268s assert (C(1,6), 2.85812420217898e-05, 1e-09); 268s assert (C(2,6), 5.22936741204085e-07, 1e-09); 268s assert (C(3,6), 2.12794763209146e-08, 1e-09); 268s assert (C(4,6), 7.82091664406946e-15, 1e-09); 268s assert (C(5,6), 0.546591417210693, 1e-09); 268s assert (C(6,6), 0.0845897945254446, 1e-09); 268s assert (C(7,6), 9.47436557975328e-08, 1e-09); 268s assert (C(8,6), 0.188873478781067, 1e-09); 268s assert (C(9,6), 4.08974010364197e-08, 1e-09); 268s assert (C(10,6), 4.44427348175241e-06, 1e-09); 268s assert (M(1,1), 10, 1e-09); 268s assert (M(2,1), 18, 1e-09); 268s assert (M(3,1), 19, 1e-09); 268s assert (M(4,1), 21.0001428571429, 1e-09); 268s assert (M(5,1), 29.0001111111111, 1e-09); 268s assert (M(1,2), 1.0177537954095, 1e-09); 268s assert (M(2,2), 1.28736803631001, 1e-09); 268s assert (M(3,2), 1.0177537954095, 1e-09); 268s assert (M(4,2), 1.0880245732889, 1e-09); 268s assert (M(5,2), 0.959547480416536, 1e-09); 268s set (0, "DefaultFigureVisible", visibility_setting); 268s ***** test 268s ## Test p-value adjustments compared to R stats package function p.adjust 268s ## Data from Westfall (1997) JASA. 92(437):299-306 268s p = [.005708; .023544; .024193; .044895; ... 268s .048805; .221227; .395867; .693051; .775755]; 268s padj = multcompare (p); 268s assert (padj(1), 0.051372, 1e-06); 268s assert (padj(2), 0.188352, 1e-06); 268s assert (padj(3), 0.188352, 1e-06); 268s assert (padj(4), 0.269370, 1e-06); 268s assert (padj(5), 0.269370, 1e-06); 268s assert (padj(6), 0.884908, 1e-06); 268s assert (padj(7), 1.000000, 1e-06); 268s assert (padj(8), 1.000000, 1e-06); 268s assert (padj(9), 1.000000, 1e-06); 268s padj = multcompare(p,'ctype','holm'); 268s assert (padj(1), 0.051372, 1e-06); 268s assert (padj(2), 0.188352, 1e-06); 268s assert (padj(3), 0.188352, 1e-06); 268s assert (padj(4), 0.269370, 1e-06); 268s assert (padj(5), 0.269370, 1e-06); 268s assert (padj(6), 0.884908, 1e-06); 268s assert (padj(7), 1.000000, 1e-06); 268s assert (padj(8), 1.000000, 1e-06); 268s assert (padj(9), 1.000000, 1e-06); 268s padj = multcompare(p,'ctype','hochberg'); 268s assert (padj(1), 0.051372, 1e-06); 268s assert (padj(2), 0.169351, 1e-06); 268s assert (padj(3), 0.169351, 1e-06); 268s assert (padj(4), 0.244025, 1e-06); 268s assert (padj(5), 0.244025, 1e-06); 268s assert (padj(6), 0.775755, 1e-06); 268s assert (padj(7), 0.775755, 1e-06); 268s assert (padj(8), 0.775755, 1e-06); 268s assert (padj(9), 0.775755, 1e-06); 268s padj = multcompare(p,'ctype','fdr'); 268s assert (padj(1), 0.0513720, 1e-07); 268s assert (padj(2), 0.0725790, 1e-07); 268s assert (padj(3), 0.0725790, 1e-07); 268s assert (padj(4), 0.0878490, 1e-07); 268s assert (padj(5), 0.0878490, 1e-07); 268s assert (padj(6), 0.3318405, 1e-07); 268s assert (padj(7), 0.5089719, 1e-07); 268s assert (padj(8), 0.7757550, 1e-07); 268s assert (padj(9), 0.7757550, 1e-07); 268s 8 tests, 8 passed, 0 known failure, 0 skipped 268s [inst/nansum.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/nansum.m 268s ***** assert (nansum ([2 4 NaN 7]), 13) 268s ***** assert (nansum ([2 4 NaN Inf]), Inf) 268s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 268s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 268s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 268s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 268s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 268s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 268s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 268s 9 tests, 9 passed, 0 known failure, 0 skipped 268s [inst/evalclusters.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/evalclusters.m 268s ***** demo 268s load fisheriris; 268s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 268s plot (eva) 268s ***** error evalclusters () 268s ***** error evalclusters ([1 1;0 1]) 268s ***** error evalclusters ([1 1;0 1], "kmeans") 268s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 268s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 268s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 268s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 268s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 268s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 268s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 268s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 268s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 268s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 268s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 268s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 268s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 268s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 268s "distance", "a") 268s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 268s "distance", "a") 268s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 268s "clusterpriors", "equal") 268s ***** error evalclusters ([1 1;0 1], [1; 2], ... 268s "silhouette", "clusterpriors", "xxx") 268s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 268s ***** test 268s load fisheriris; 268s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 268s assert (isa (eva, "CalinskiHarabaszEvaluation")); 268s assert (eva.NumObservations, 150); 268s assert (eva.OptimalK, 3); 268s assert (eva.InspectedK, [1 2 3 4 5 6]); 268s 22 tests, 22 passed, 0 known failure, 0 skipped 268s [inst/regress.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/regress.m 268s ***** test 268s % Longley data from the NIST Statistical Reference Dataset 268s Z = [ 60323 83.0 234289 2356 1590 107608 1947 268s 61122 88.5 259426 2325 1456 108632 1948 268s 60171 88.2 258054 3682 1616 109773 1949 268s 61187 89.5 284599 3351 1650 110929 1950 268s 63221 96.2 328975 2099 3099 112075 1951 268s 63639 98.1 346999 1932 3594 113270 1952 268s 64989 99.0 365385 1870 3547 115094 1953 268s 63761 100.0 363112 3578 3350 116219 1954 268s 66019 101.2 397469 2904 3048 117388 1955 268s 67857 104.6 419180 2822 2857 118734 1956 268s 68169 108.4 442769 2936 2798 120445 1957 268s 66513 110.8 444546 4681 2637 121950 1958 268s 68655 112.6 482704 3813 2552 123366 1959 268s 69564 114.2 502601 3931 2514 125368 1960 268s 69331 115.7 518173 4806 2572 127852 1961 268s 70551 116.9 554894 4007 2827 130081 1962 ]; 268s % Results certified by NIST using 500 digit arithmetic 268s % b and standard error in b 268s V = [ -3482258.63459582 890420.383607373 268s 15.0618722713733 84.9149257747669 268s -0.358191792925910E-01 0.334910077722432E-01 268s -2.02022980381683 0.488399681651699 268s -1.03322686717359 0.214274163161675 268s -0.511041056535807E-01 0.226073200069370 268s 1829.15146461355 455.478499142212 ]; 268s Rsq = 0.995479004577296; 268s F = 330.285339234588; 268s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 268s alpha = 0.05; 268s [b, bint, r, rint, stats] = regress (y, X, alpha); 268s assert(b,V(:,1),4e-6); 268s assert(stats(1),Rsq,1e-12); 268s assert(stats(2),F,3e-8); 268s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 268s warning: matrix singular to machine precision, rcond = 3.50566e-20 268s warning: called from 268s regress at line 131 column 7 268s __test__ at line 33 column 28 268s test at line 682 column 11 268s /tmp/tmp.wzmIdh5JfP at line 2118 column 31 268s 268s 1 test, 1 passed, 0 known failure, 0 skipped 268s [inst/hist3.m] 268s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/hist3.m 268s ***** demo 268s X = [ 268s 1 1 268s 1 1 268s 1 10 268s 1 10 268s 5 5 268s 5 5 268s 5 5 268s 5 5 268s 5 5 268s 7 3 268s 7 3 268s 7 3 268s 10 10 268s 10 10]; 268s hist3 (X) 268s ***** test 268s N_exp = [ 0 0 0 5 20 268s 0 0 10 15 0 268s 0 15 10 0 0 268s 20 5 0 0 0]; 268s 268s n = 100; 268s x = [1:n]'; 268s y = [n:-1:1]'; 268s D = [x y]; 268s N = hist3 (D, [4 5]); 268s assert (N, N_exp); 268s ***** test 268s N_exp = [0 0 0 0 1 268s 0 0 0 0 1 268s 0 0 0 0 1 268s 1 1 1 1 93]; 268s 268s n = 100; 268s x = [1:n]'; 268s y = [n:-1:1]'; 268s D = [x y]; 268s C{1} = [1 1.7 3 4]; 268s C{2} = [1:5]; 268s N = hist3 (D, C); 268s assert (N, N_exp); 268s ***** test 268s D = [1 1; 3 1; 3 3; 3 1]; 268s [c, nn] = hist3 (D, {0:4, 0:4}); 268s exp_c = zeros (5); 268s exp_c([7 9 19]) = [1 2 1]; 268s assert (c, exp_c); 268s assert (nn, {0:4, 0:4}); 268s ***** test 268s for i = 10 268s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 268s endfor 268s ***** test 268s edge_1 = linspace (0, 10, 10); 268s edge_2 = linspace (0, 50, 10); 268s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 268s exp_c = zeros (10, 10); 268s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 268s assert (c, exp_c); 268s 268s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 268s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 268s ***** shared X 268s X = [ 268s 5 2 268s 5 3 268s 1 4 268s 5 3 268s 4 4 268s 1 2 268s 2 3 268s 3 3 268s 5 4 268s 5 3]; 268s ***** test 268s N = zeros (10); 268s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 268s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 268s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 268s ***** test 268s N = zeros (5, 7); 268s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 268s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 268s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 268s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 268s ***** test 268s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 268s C = {(2:5), (2.5:1:4.5)}; 268s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 268s ***** test 268s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 268s C = {(1.2:3.2), (0:5)}; 268s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 268s assert (nthargout ([1 2], @hist3, X, C), {N C}) 268s ***** test 268s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 268s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 268s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 268s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 268s assert (C, C_exp, eps*10^2) 268s ***** test 268s Xv = repmat ([1:10]', [1 2]); 268s 268s ## Test Centers 268s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 268s 268s N_exp = eye (6); 268s N_exp([1 end]) = 3; 268s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 268s 268s N_exp = zeros (8, 6); 268s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 268s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 268s 268s ## Test Edges 268s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 268s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 268s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 268s 268s N_exp = zeros (14); 268s N_exp(3:12, 3:12) = eye (10); 268s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 268s 268s ## Test for Nbins 268s assert (hist3 (Xv), eye (10)) 268s assert (hist3 (Xv, [10 10]), eye (10)) 268s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 268s assert (hist3 (Xv, [5 5]), eye (5) * 2) 268s 268s N_exp = zeros (7, 5); 268s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 268s assert (hist3 (Xv, [7 5]), N_exp) 268s ***** test # bug #51059 268s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 268s [c, nn] = hist3 (D, {0:4, 0:4}); 268s exp_c = zeros (5); 268s exp_c([7 9 19]) = [1 2 1]; 268s assert (c, exp_c) 268s assert (nn, {0:4, 0:4}) 268s ***** test 268s [c, nn] = hist3 ([1 8]); 268s exp_c = zeros (10, 10); 268s exp_c(6, 6) = 1; 268s exp_nn = {-4:5, 3:12}; 268s assert (c, exp_c) 268s assert (nn, exp_nn, eps) 268s 268s [c, nn] = hist3 ([1 8], [10 11]); 268s exp_c = zeros (10, 11); 268s exp_c(6, 6) = 1; 268s exp_nn = {-4:5, 3:13}; 268s assert (c, exp_c) 268s assert (nn, exp_nn, eps) 268s ***** test 268s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 268s exp_c = zeros (10, 10); 268s exp_c(2, 1) = 1; 268s exp_c(8, 10) = 1; 268s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 268s assert (c, exp_c) 268s assert (nn, exp_nn, eps*100) 269s ***** test 269s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 269s exp_c = zeros (10, 10); 269s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 269s assert (c, exp_c) 269s assert (nn, exp_nn, eps*100) 269s ***** test 269s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 269s exp_c = zeros (10, 10); 269s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 269s assert (c, exp_c) 269s assert (nn, exp_nn, eps*100) 269s 16 tests, 16 passed, 0 known failure, 0 skipped 269s [inst/dist_wrap/fitdist.m] 269s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/fitdist.m 269s ***** test 269s x = betarnd (1, 1, 100, 1); 269s pd = fitdist (x, "Beta"); 269s [phat, pci] = betafit (x); 269s assert ([pd.a, pd.b], phat); 269s assert (paramci (pd), pci); 269s ***** test 269s x1 = betarnd (1, 1, 100, 1); 269s x2 = betarnd (5, 2, 100, 1); 269s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 269s [phat, pci] = betafit (x1); 269s assert ([pd(1).a, pd(1).b], phat); 269s assert (paramci (pd(1)), pci); 269s [phat, pci] = betafit (x2); 269s assert ([pd(2).a, pd(2).b], phat); 269s assert (paramci (pd(2)), pci); 269s ***** test 269s N = 1; 269s x = binornd (N, 0.5, 100, 1); 269s pd = fitdist (x, "binomial"); 269s [phat, pci] = binofit (sum (x), numel (x)); 269s assert ([pd.N, pd.p], [N, phat]); 269s assert (paramci (pd), pci); 269s ***** test 269s N = 3; 269s x = binornd (N, 0.4, 100, 1); 269s pd = fitdist (x, "binomial", "ntrials", N); 269s [phat, pci] = binofit (sum (x), numel (x) * N); 269s assert ([pd.N, pd.p], [N, phat]); 269s assert (paramci (pd), pci); 269s ***** test 269s N = 1; 269s x1 = binornd (N, 0.5, 100, 1); 269s x2 = binornd (N, 0.7, 100, 1); 269s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 269s [phat, pci] = binofit (sum (x1), numel (x1)); 269s assert ([pd(1).N, pd(1).p], [N, phat]); 269s assert (paramci (pd(1)), pci); 269s [phat, pci] = binofit (sum (x2), numel (x2)); 269s assert ([pd(2).N, pd(2).p], [N, phat]); 269s assert (paramci (pd(2)), pci); 269s ***** test 269s N = 5; 269s x1 = binornd (N, 0.5, 100, 1); 269s x2 = binornd (N, 0.8, 100, 1); 269s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 269s "By", [ones(100,1); 2*ones(100,1)]); 269s [phat, pci] = binofit (sum (x1), numel (x1) * N); 269s assert ([pd(1).N, pd(1).p], [N, phat]); 269s assert (paramci (pd(1)), pci); 269s [phat, pci] = binofit (sum (x2), numel (x2) * N); 269s assert ([pd(2).N, pd(2).p], [N, phat]); 269s assert (paramci (pd(2)), pci); 269s ***** test 269s x = bisarnd (1, 1, 100, 1); 269s pd = fitdist (x, "BirnbaumSaunders"); 269s [phat, pci] = bisafit (x); 269s assert ([pd.beta, pd.gamma], phat); 269s assert (paramci (pd), pci); 269s ***** test 269s x1 = bisarnd (1, 1, 100, 1); 269s x2 = bisarnd (5, 2, 100, 1); 269s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 269s [phat, pci] = bisafit (x1); 269s assert ([pd(1).beta, pd(1).gamma], phat); 269s assert (paramci (pd(1)), pci); 269s [phat, pci] = bisafit (x2); 269s assert ([pd(2).beta, pd(2).gamma], phat); 269s assert (paramci (pd(2)), pci); 269s ***** test 269s x = burrrnd (1, 2, 1, 100, 1); 269s pd = fitdist (x, "Burr"); 269s [phat, pci] = burrfit (x); 269s assert ([pd.alpha, pd.c, pd.k], phat); 269s assert (paramci (pd), pci); 269s ***** test 269s x1 = burrrnd (1, 2, 1, 100, 1); 269s x2 = burrrnd (1, 0.5, 2, 100, 1); 269s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 269s [phat, pci] = burrfit (x1); 269s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 269s assert (paramci (pd(1)), pci); 269s [phat, pci] = burrfit (x2); 269s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 269s assert (paramci (pd(2)), pci); 270s ***** test 270s x = exprnd (1, 100, 1); 270s pd = fitdist (x, "exponential"); 270s [muhat, muci] = expfit (x); 270s assert ([pd.mu], muhat); 270s assert (paramci (pd), muci); 270s ***** test 270s x1 = exprnd (1, 100, 1); 270s x2 = exprnd (5, 100, 1); 270s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 270s [muhat, muci] = expfit (x1); 270s assert ([pd(1).mu], muhat); 270s assert (paramci (pd(1)), muci); 270s [muhat, muci] = expfit (x2); 270s assert ([pd(2).mu], muhat); 270s assert (paramci (pd(2)), muci); 270s ***** test 270s x = evrnd (1, 1, 100, 1); 270s pd = fitdist (x, "ev"); 270s [phat, pci] = evfit (x); 270s assert ([pd.mu, pd.sigma], phat); 270s assert (paramci (pd), pci); 270s ***** test 270s x1 = evrnd (1, 1, 100, 1); 270s x2 = evrnd (5, 2, 100, 1); 270s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 270s [phat, pci] = evfit (x1); 270s assert ([pd(1).mu, pd(1).sigma], phat); 270s assert (paramci (pd(1)), pci); 270s [phat, pci] = evfit (x2); 270s assert ([pd(2).mu, pd(2).sigma], phat); 270s assert (paramci (pd(2)), pci); 270s ***** test 270s x = gamrnd (1, 1, 100, 1); 270s pd = fitdist (x, "Gamma"); 270s [phat, pci] = gamfit (x); 270s assert ([pd.a, pd.b], phat); 270s assert (paramci (pd), pci); 270s ***** test 270s x1 = gamrnd (1, 1, 100, 1); 270s x2 = gamrnd (5, 2, 100, 1); 270s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 270s [phat, pci] = gamfit (x1); 270s assert ([pd(1).a, pd(1).b], phat); 270s assert (paramci (pd(1)), pci); 270s [phat, pci] = gamfit (x2); 270s assert ([pd(2).a, pd(2).b], phat); 270s assert (paramci (pd(2)), pci); 270s ***** test 270s rand ("seed", 4); # for reproducibility 270s x = gevrnd (-0.5, 1, 2, 1000, 1); 270s pd = fitdist (x, "generalizedextremevalue"); 270s [phat, pci] = gevfit (x); 270s assert ([pd.k, pd.sigma, pd.mu], phat); 270s assert (paramci (pd), pci); 270s ***** test 270s rand ("seed", 5); # for reproducibility 270s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 270s rand ("seed", 9); # for reproducibility 270s x2 = gevrnd (0, 1, -4, 1000, 1); 270s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 270s [phat, pci] = gevfit (x1); 270s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 270s assert (paramci (pd(1)), pci); 270s [phat, pci] = gevfit (x2); 270s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 270s assert (paramci (pd(2)), pci); 270s ***** test 270s x = gprnd (1, 1, 1, 100, 1); 270s pd = fitdist (x, "GeneralizedPareto"); 270s [phat, pci] = gpfit (x, 1); 270s assert ([pd.k, pd.sigma, pd.theta], phat); 270s assert (paramci (pd), pci); 270s ***** test 270s x = gprnd (1, 1, 2, 100, 1); 270s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 270s [phat, pci] = gpfit (x, 2); 270s assert ([pd.k, pd.sigma, pd.theta], phat); 270s assert (paramci (pd), pci); 270s ***** test 270s x1 = gprnd (1, 1, 1, 100, 1); 270s x2 = gprnd (0, 2, 1, 100, 1); 270s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 270s [phat, pci] = gpfit (x1, 1); 270s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 270s assert (paramci (pd(1)), pci); 270s [phat, pci] = gpfit (x2, 1); 270s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 270s assert (paramci (pd(2)), pci); 271s ***** test 271s x1 = gprnd (3, 2, 2, 100, 1); 271s x2 = gprnd (2, 3, 2, 100, 1); 271s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 271s "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = gpfit (x1, 2); 271s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = gpfit (x2, 2); 271s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 271s assert (paramci (pd(2)), pci); 271s ***** test 271s x = hnrnd (0, 1, 100, 1); 271s pd = fitdist (x, "HalfNormal"); 271s [phat, pci] = hnfit (x, 0); 271s assert ([pd.mu, pd.sigma], phat); 271s assert (paramci (pd), pci); 271s ***** test 271s x = hnrnd (1, 1, 100, 1); 271s pd = fitdist (x, "HalfNormal", "mu", 1); 271s [phat, pci] = hnfit (x, 1); 271s assert ([pd.mu, pd.sigma], phat); 271s assert (paramci (pd), pci); 271s ***** test 271s x1 = hnrnd (0, 1, 100, 1); 271s x2 = hnrnd (0, 2, 100, 1); 271s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = hnfit (x1, 0); 271s assert ([pd(1).mu, pd(1).sigma], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = hnfit (x2, 0); 271s assert ([pd(2).mu, pd(2).sigma], phat); 271s assert (paramci (pd(2)), pci); 271s ***** test 271s x1 = hnrnd (2, 1, 100, 1); 271s x2 = hnrnd (2, 2, 100, 1); 271s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 271s "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = hnfit (x1, 2); 271s assert ([pd(1).mu, pd(1).sigma], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = hnfit (x2, 2); 271s assert ([pd(2).mu, pd(2).sigma], phat); 271s assert (paramci (pd(2)), pci); 271s ***** test 271s x = invgrnd (1, 1, 100, 1); 271s pd = fitdist (x, "InverseGaussian"); 271s [phat, pci] = invgfit (x); 271s assert ([pd.mu, pd.lambda], phat); 271s assert (paramci (pd), pci); 271s ***** test 271s x1 = invgrnd (1, 1, 100, 1); 271s x2 = invgrnd (5, 2, 100, 1); 271s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = invgfit (x1); 271s assert ([pd(1).mu, pd(1).lambda], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = invgfit (x2); 271s assert ([pd(2).mu, pd(2).lambda], phat); 271s assert (paramci (pd(2)), pci); 271s ***** test 271s x = logirnd (1, 1, 100, 1); 271s pd = fitdist (x, "logistic"); 271s [phat, pci] = logifit (x); 271s assert ([pd.mu, pd.sigma], phat); 271s assert (paramci (pd), pci); 271s ***** test 271s x1 = logirnd (1, 1, 100, 1); 271s x2 = logirnd (5, 2, 100, 1); 271s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = logifit (x1); 271s assert ([pd(1).mu, pd(1).sigma], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = logifit (x2); 271s assert ([pd(2).mu, pd(2).sigma], phat); 271s assert (paramci (pd(2)), pci); 271s ***** test 271s x = loglrnd (1, 1, 100, 1); 271s pd = fitdist (x, "loglogistic"); 271s [phat, pci] = loglfit (x); 271s assert ([pd.mu, pd.sigma], phat); 271s assert (paramci (pd), pci); 271s ***** test 271s x1 = loglrnd (1, 1, 100, 1); 271s x2 = loglrnd (5, 2, 100, 1); 271s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 271s [phat, pci] = loglfit (x1); 271s assert ([pd(1).mu, pd(1).sigma], phat); 271s assert (paramci (pd(1)), pci); 271s [phat, pci] = loglfit (x2); 271s assert ([pd(2).mu, pd(2).sigma], phat); 271s assert (paramci (pd(2)), pci); 272s ***** test 272s x = lognrnd (1, 1, 100, 1); 272s pd = fitdist (x, "lognormal"); 272s [phat, pci] = lognfit (x); 272s assert ([pd.mu, pd.sigma], phat); 272s assert (paramci (pd), pci); 272s ***** test 272s x1 = lognrnd (1, 1, 100, 1); 272s x2 = lognrnd (5, 2, 100, 1); 272s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 272s [phat, pci] = lognfit (x1); 272s assert ([pd(1).mu, pd(1).sigma], phat); 272s assert (paramci (pd(1)), pci); 272s [phat, pci] = lognfit (x2); 272s assert ([pd(2).mu, pd(2).sigma], phat); 272s assert (paramci (pd(2)), pci); 272s ***** test 272s x = nakarnd (2, 0.5, 100, 1); 272s pd = fitdist (x, "Nakagami"); 272s [phat, pci] = nakafit (x); 272s assert ([pd.mu, pd.omega], phat); 272s assert (paramci (pd), pci); 272s ***** test 272s x1 = nakarnd (2, 0.5, 100, 1); 272s x2 = nakarnd (5, 0.8, 100, 1); 272s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 272s [phat, pci] = nakafit (x1); 272s assert ([pd(1).mu, pd(1).omega], phat); 272s assert (paramci (pd(1)), pci); 272s [phat, pci] = nakafit (x2); 272s assert ([pd(2).mu, pd(2).omega], phat); 272s assert (paramci (pd(2)), pci); 272s ***** test 272s randp ("seed", 123); 272s randg ("seed", 321); 272s x = nbinrnd (2, 0.5, 100, 1); 272s pd = fitdist (x, "negativebinomial"); 272s [phat, pci] = nbinfit (x); 272s assert ([pd.R, pd.P], phat); 272s assert (paramci (pd), pci); 272s ***** test 272s randp ("seed", 345); 272s randg ("seed", 543); 272s x1 = nbinrnd (2, 0.5, 100, 1); 272s randp ("seed", 432); 272s randg ("seed", 234); 272s x2 = nbinrnd (5, 0.8, 100, 1); 272s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 272s [phat, pci] = nbinfit (x1); 272s assert ([pd(1).R, pd(1).P], phat); 272s assert (paramci (pd(1)), pci); 272s [phat, pci] = nbinfit (x2); 272s assert ([pd(2).R, pd(2).P], phat); 272s assert (paramci (pd(2)), pci); 272s ***** test 272s x = normrnd (1, 1, 100, 1); 272s pd = fitdist (x, "normal"); 272s [muhat, sigmahat, muci, sigmaci] = normfit (x); 272s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 272s assert (paramci (pd), [muci, sigmaci]); 272s ***** test 272s x1 = normrnd (1, 1, 100, 1); 272s x2 = normrnd (5, 2, 100, 1); 272s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 272s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 272s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 272s assert (paramci (pd(1)), [muci, sigmaci]); 272s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 272s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 272s assert (paramci (pd(2)), [muci, sigmaci]); 273s ***** test 273s x = poissrnd (1, 100, 1); 273s pd = fitdist (x, "poisson"); 273s [phat, pci] = poissfit (x); 273s assert (pd.lambda, phat); 273s assert (paramci (pd), pci); 273s ***** test 273s x1 = poissrnd (1, 100, 1); 273s x2 = poissrnd (5, 100, 1); 273s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 273s [phat, pci] = poissfit (x1); 273s assert (pd(1).lambda, phat); 273s assert (paramci (pd(1)), pci); 273s [phat, pci] = poissfit (x2); 273s assert (pd(2).lambda, phat); 273s assert (paramci (pd(2)), pci); 273s ***** test 273s x = raylrnd (1, 100, 1); 273s pd = fitdist (x, "rayleigh"); 273s [phat, pci] = raylfit (x); 273s assert (pd.sigma, phat); 273s assert (paramci (pd), pci); 273s ***** test 273s x1 = raylrnd (1, 100, 1); 273s x2 = raylrnd (5, 100, 1); 273s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 273s [phat, pci] = raylfit (x1); 273s assert ( pd(1).sigma, phat); 273s assert (paramci (pd(1)), pci); 273s [phat, pci] = raylfit (x2); 273s assert (pd(2).sigma, phat); 273s assert (paramci (pd(2)), pci); 273s ***** test 273s x = ricernd (1, 1, 100, 1); 273s pd = fitdist (x, "rician"); 273s [phat, pci] = ricefit (x); 273s assert ([pd.s, pd.sigma], phat); 273s assert (paramci (pd), pci); 273s ***** test 273s x1 = ricernd (1, 1, 100, 1); 273s x2 = ricernd (5, 2, 100, 1); 273s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 273s [phat, pci] = ricefit (x1); 273s assert ([pd(1).s, pd(1).sigma], phat); 273s assert (paramci (pd(1)), pci); 273s [phat, pci] = ricefit (x2); 273s assert ([pd(2).s, pd(2).sigma], phat); 273s assert (paramci (pd(2)), pci); 273s ***** warning ... 273s fitdist ([1 2 3 4 5], "Stable"); 273s ***** test 273s x = tlsrnd (0, 1, 1, 100, 1); 273s pd = fitdist (x, "tlocationscale"); 273s [phat, pci] = tlsfit (x); 273s assert ([pd.mu, pd.sigma, pd.nu], phat); 273s assert (paramci (pd), pci); 273s ***** test 273s x1 = tlsrnd (0, 1, 1, 100, 1); 273s x2 = tlsrnd (5, 2, 1, 100, 1); 273s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 273s [phat, pci] = tlsfit (x1); 273s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 273s assert (paramci (pd(1)), pci); 273s [phat, pci] = tlsfit (x2); 273s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 273s assert (paramci (pd(2)), pci); 273s ***** test 273s x = [1 2 3 4 5]; 273s pd = fitdist (x, "weibull"); 273s [phat, pci] = wblfit (x); 273s assert ([pd.lambda, pd.k], phat); 273s assert (paramci (pd), pci); 273s ***** test 273s x = [1 2 3 4 5 6 7 8 9 10]; 273s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 273s [phat, pci] = wblfit (x(1:5)); 273s assert ([pd(1).lambda, pd(1).k], phat); 273s assert (paramci (pd(1)), pci); 273s [phat, pci] = wblfit (x(6:10)); 273s assert ([pd(2).lambda, pd(2).k], phat); 273s assert (paramci (pd(2)), pci); 273s ***** error fitdist (1) 273s ***** error fitdist (1, ["as";"sd"]) 273s ***** error fitdist (1, "some") 273s ***** error ... 273s fitdist (ones (2), "normal") 273s ***** error ... 273s fitdist ([i, 2, 3], "normal") 273s ***** error ... 273s fitdist (["a", "s", "d"], "normal") 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "By") 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 273s ***** error ... 273s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "alpha", i) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "ntrials", 0) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "options", 0) 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 273s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 273s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 273s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 273s ***** error ... 273s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 273s ***** error ... 273s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 273s ***** error ... 273s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 273s ***** error ... 273s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 273s 77 tests, 77 passed, 0 known failure, 0 skipped 273s [inst/dist_wrap/pdf.m] 273s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/pdf.m 273s ***** shared x 273s x = [1:5]; 273s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 273s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 273s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 273s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 273s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 273s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 273s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 273s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 273s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 273s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 273s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 273s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 273s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 273s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 273s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 273s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 273s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 274s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 274s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 274s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 274s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 274s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 274s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 274s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 274s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 274s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 274s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 274s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 274s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 274s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 274s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 274s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 274s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 274s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 274s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 274s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 274s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 274s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 274s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 274s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 274s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 274s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 274s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 274s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 274s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 274s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 274s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 274s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 274s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 274s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 274s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 274s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 274s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 274s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 274s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 274s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 274s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 274s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 274s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 274s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 274s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 274s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 274s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 274s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 274s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 274s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 274s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 274s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 274s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 274s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 274s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 274s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 274s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 274s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 274s ***** error pdf (1) 274s ***** error pdf ({"beta"}) 274s ***** error pdf ("beta", {[1 2 3 4 5]}) 274s ***** error pdf ("beta", "text") 274s ***** error pdf ("beta", 1+i) 274s ***** error ... 274s pdf ("Beta", x, "a", 2) 274s ***** error ... 274s pdf ("Beta", x, 5, "") 274s ***** error ... 274s pdf ("Beta", x, 5, {2}) 274s ***** error pdf ("chi2", x) 274s ***** error pdf ("Beta", x, 5) 274s ***** error pdf ("Burr", x, 5) 274s ***** error pdf ("Burr", x, 5, 2) 274s 86 tests, 86 passed, 0 known failure, 0 skipped 274s [inst/dist_wrap/mle.m] 274s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/mle.m 274s ***** error mle (ones (2)) 274s ***** error mle ("text") 274s ***** error mle ([1, 2, 3, i, 5]) 274s ***** error ... 274s mle ([1:50], "distribution") 274s ***** error ... 274s mle ([1:50], "censoring", logical ([1,0,1,0])) 274s ***** error ... 274s mle ([1:50], "frequency", [1,0,1,0]) 274s ***** error ... 274s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 274s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 274s ***** error mle ([1:50], "alpha", 1) 274s ***** error mle ([1:50], "alpha", -1) 274s ***** error mle ([1:50], "alpha", i) 274s ***** error ... 274s mle ([1:50], "ntrials", -1) 274s ***** error ... 274s mle ([1:50], "ntrials", [20, 50]) 274s ***** error ... 274s mle ([1:50], "ntrials", [20.3]) 274s ***** error ... 274s mle ([1:50], "ntrials", 3i) 274s ***** error ... 274s mle ([1:50], "options", 4) 274s ***** error ... 274s mle ([1:50], "options", struct ("x", 3)) 274s ***** error mle ([1:50], "NAME", "value") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 2 1 0], "distribution", "bernoulli") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "bino") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 -1 0], "distribution", "gp") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 -1 0], "distribution", "hn") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 274s ***** error mle ([1:50], "distribution", "value") 274s ***** error ... 274s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 274s 36 tests, 36 passed, 0 known failure, 0 skipped 274s [inst/dist_wrap/makedist.m] 274s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/makedist.m 274s ***** test 274s pd = makedist ("beta"); 274s assert (class (pd), "BetaDistribution"); 274s assert (pd.a, 1); 274s assert (pd.b, 1); 274s ***** test 274s pd = makedist ("beta", "a", 5); 274s assert (pd.a, 5); 274s assert (pd.b, 1); 274s ***** test 274s pd = makedist ("beta", "b", 5); 274s assert (pd.a, 1); 274s assert (pd.b, 5); 274s ***** test 274s pd = makedist ("beta", "a", 3, "b", 5); 274s assert (pd.a, 3); 274s assert (pd.b, 5); 274s ***** test 274s pd = makedist ("binomial"); 274s assert (class (pd), "BinomialDistribution"); 274s assert (pd.N, 1); 274s assert (pd.p, 0.5); 274s ***** test 274s pd = makedist ("binomial", "N", 5); 274s assert (pd.N, 5); 274s assert (pd.p, 0.5); 274s ***** test 274s pd = makedist ("binomial", "p", 0.2); 274s assert (pd.N, 1); 274s assert (pd.p, 0.2); 274s ***** test 274s pd = makedist ("binomial", "N", 3, "p", 0.3); 274s assert (pd.N, 3); 274s assert (pd.p, 0.3); 274s ***** test 274s pd = makedist ("birnbaumsaunders"); 274s assert (class (pd), "BirnbaumSaundersDistribution"); 274s assert (pd.beta, 1); 274s assert (pd.gamma, 1); 274s ***** test 274s pd = makedist ("birnbaumsaunders", "beta", 5); 274s assert (pd.beta, 5); 274s assert (pd.gamma, 1); 274s ***** test 274s pd = makedist ("birnbaumsaunders", "gamma", 5); 274s assert (pd.beta, 1); 274s assert (pd.gamma, 5); 274s ***** test 274s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 274s assert (pd.beta, 3); 274s assert (pd.gamma, 5); 274s ***** test 274s pd = makedist ("burr"); 274s assert (class (pd), "BurrDistribution"); 274s assert (pd.alpha, 1); 274s assert (pd.c, 1); 274s assert (pd.k, 1); 274s ***** test 274s pd = makedist ("burr", "k", 5); 274s assert (pd.alpha, 1); 274s assert (pd.c, 1); 274s assert (pd.k, 5); 274s ***** test 274s pd = makedist ("burr", "c", 5); 274s assert (pd.alpha, 1); 274s assert (pd.c, 5); 274s assert (pd.k, 1); 274s ***** test 274s pd = makedist ("burr", "alpha", 3, "c", 5); 274s assert (pd.alpha, 3); 274s assert (pd.c, 5); 274s assert (pd.k, 1); 274s ***** test 274s pd = makedist ("burr", "k", 3, "c", 5); 274s assert (pd.alpha, 1); 274s assert (pd.c, 5); 274s assert (pd.k, 3); 274s ***** test 274s pd = makedist ("exponential"); 274s assert (class (pd), "ExponentialDistribution"); 274s assert (pd.mu, 1); 274s ***** test 274s pd = makedist ("exponential", "mu", 5); 274s assert (pd.mu, 5); 274s ***** test 274s pd = makedist ("extremevalue"); 274s assert (class (pd), "ExtremeValueDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("extremevalue", "mu", 5); 274s assert (class (pd), "ExtremeValueDistribution"); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("ev", "sigma", 5); 274s assert (class (pd), "ExtremeValueDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("ev", "mu", -3, "sigma", 5); 274s assert (class (pd), "ExtremeValueDistribution"); 274s assert (pd.mu, -3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("gamma"); 274s assert (class (pd), "GammaDistribution"); 274s assert (pd.a, 1); 274s assert (pd.b, 1); 274s ***** test 274s pd = makedist ("gamma", "a", 5); 274s assert (pd.a, 5); 274s assert (pd.b, 1); 274s ***** test 274s pd = makedist ("gamma", "b", 5); 274s assert (pd.a, 1); 274s assert (pd.b, 5); 274s ***** test 274s pd = makedist ("gamma", "a", 3, "b", 5); 274s assert (pd.a, 3); 274s assert (pd.b, 5); 274s ***** test 274s pd = makedist ("GeneralizedExtremeValue"); 274s assert (class (pd), "GeneralizedExtremeValueDistribution"); 274s assert (pd.k, 0); 274s assert (pd.sigma, 1); 274s assert (pd.mu, 0); 274s ***** test 274s pd = makedist ("GeneralizedExtremeValue", "k", 5); 274s assert (pd.k, 5); 274s assert (pd.sigma, 1); 274s assert (pd.mu, 0); 274s ***** test 274s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 274s assert (pd.k, 0); 274s assert (pd.sigma, 5); 274s assert (pd.mu, 0); 274s ***** test 274s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 274s assert (pd.k, 3); 274s assert (pd.sigma, 5); 274s assert (pd.mu, 0); 274s ***** test 274s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 274s assert (pd.k, 0); 274s assert (pd.sigma, 5); 274s assert (pd.mu, 3); 274s ***** test 274s pd = makedist ("GeneralizedPareto"); 274s assert (class (pd), "GeneralizedParetoDistribution"); 274s assert (pd.k, 1); 274s assert (pd.sigma, 1); 274s assert (pd.theta, 1); 274s ***** test 274s pd = makedist ("GeneralizedPareto", "k", 5); 274s assert (pd.k, 5); 274s assert (pd.sigma, 1); 274s assert (pd.theta, 1); 274s ***** test 274s pd = makedist ("GeneralizedPareto", "sigma", 5); 274s assert (pd.k, 1); 274s assert (pd.sigma, 5); 274s assert (pd.theta, 1); 274s ***** test 274s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 274s assert (pd.k, 3); 274s assert (pd.sigma, 5); 274s assert (pd.theta, 1); 274s ***** test 274s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 274s assert (pd.k, 1); 274s assert (pd.sigma, 5); 274s assert (pd.theta, 3); 274s ***** test 274s pd = makedist ("HalfNormal"); 274s assert (class (pd), "HalfNormalDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("HalfNormal", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("HalfNormal", "sigma", 5); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 274s assert (pd.mu, 3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("InverseGaussian"); 274s assert (class (pd), "InverseGaussianDistribution"); 274s assert (pd.mu, 1); 274s assert (pd.lambda, 1); 274s ***** test 274s pd = makedist ("InverseGaussian", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.lambda, 1); 274s ***** test 274s pd = makedist ("InverseGaussian", "lambda", 5); 274s assert (pd.mu, 1); 274s assert (pd.lambda, 5); 274s ***** test 274s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 274s assert (pd.mu, 3); 274s assert (pd.lambda, 5); 274s ***** test 274s pd = makedist ("logistic"); 274s assert (class (pd), "LogisticDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("logistic", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("logistic", "sigma", 5); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("logistic", "mu", 3, "sigma", 5); 274s assert (pd.mu, 3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("loglogistic"); 274s assert (class (pd), "LoglogisticDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("loglogistic", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("loglogistic", "sigma", 5); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 274s assert (pd.mu, 3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("Lognormal"); 274s assert (class (pd), "LognormalDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Lognormal", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Lognormal", "sigma", 5); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 274s assert (pd.mu, -3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("Loguniform"); 274s assert (class (pd), "LoguniformDistribution"); 274s assert (pd.Lower, 1); 274s assert (pd.Upper, 4); 274s ***** test 274s pd = makedist ("Loguniform", "Lower", 2); 274s assert (pd.Lower, 2); 274s assert (pd.Upper, 4); 274s ***** test 274s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 274s assert (pd.Lower, 1); 274s assert (pd.Upper, 3); 274s ***** test 274s pd = makedist ("Multinomial"); 274s assert (class (pd), "MultinomialDistribution"); 274s assert (pd.Probabilities, [0.5, 0.5]); 274s ***** test 274s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 274s assert (class (pd), "MultinomialDistribution"); 274s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 274s ***** test 274s pd = makedist ("Nakagami"); 274s assert (class (pd), "NakagamiDistribution"); 274s assert (pd.mu, 1); 274s assert (pd.omega, 1); 274s ***** test 274s pd = makedist ("Nakagami", "mu", 5); 274s assert (class (pd), "NakagamiDistribution"); 274s assert (pd.mu, 5); 274s assert (pd.omega, 1); 274s ***** test 274s pd = makedist ("Nakagami", "omega", 0.3); 274s assert (class (pd), "NakagamiDistribution"); 274s assert (pd.mu, 1); 274s assert (pd.omega, 0.3); 274s ***** test 274s pd = makedist ("NegativeBinomial"); 274s assert (class (pd), "NegativeBinomialDistribution"); 274s assert (pd.R, 1); 274s assert (pd.P, 0.5); 274s ***** test 274s pd = makedist ("NegativeBinomial", "R", 5); 274s assert (class (pd), "NegativeBinomialDistribution"); 274s assert (pd.R, 5); 274s assert (pd.P, 0.5); 274s ***** test 274s pd = makedist ("NegativeBinomial", "p", 0.3); 274s assert (class (pd), "NegativeBinomialDistribution"); 274s assert (pd.R, 1); 274s assert (pd.P, 0.3); 274s ***** test 274s pd = makedist ("Normal"); 274s assert (class (pd), "NormalDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Normal", "mu", 5); 274s assert (class (pd), "NormalDistribution"); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Normal", "sigma", 5); 274s assert (class (pd), "NormalDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("Normal", "mu", -3, "sigma", 5); 274s assert (class (pd), "NormalDistribution"); 274s assert (pd.mu, -3); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("PiecewiseLinear"); 274s assert (class (pd), "PiecewiseLinearDistribution"); 274s assert (pd.x, [0; 1]); 274s assert (pd.Fx, [0; 1]); 274s ***** test 274s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 274s assert (pd.x, [0; 1; 2]); 274s assert (pd.Fx, [0; 0.5; 1]); 274s ***** test 274s pd = makedist ("Poisson"); 274s assert (class (pd), "PoissonDistribution"); 274s assert (pd.lambda, 1); 274s ***** test 274s pd = makedist ("Poisson", "lambda", 5); 274s assert (pd.lambda, 5); 274s ***** test 274s pd = makedist ("Rayleigh"); 274s assert (class (pd), "RayleighDistribution"); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Rayleigh", "sigma", 5); 274s assert (pd.sigma, 5); 274s ***** test 274s pd = makedist ("Rician"); 274s assert (class (pd), "RicianDistribution"); 274s assert (pd.s, 1); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Rician", "s", 3); 274s assert (pd.s, 3); 274s assert (pd.sigma, 1); 274s ***** test 274s pd = makedist ("Rician", "sigma", 3); 274s assert (pd.s, 1); 274s assert (pd.sigma, 3); 274s ***** test 274s pd = makedist ("Rician", "s", 2, "sigma", 3); 274s assert (pd.s, 2); 274s assert (pd.sigma, 3); 274s ***** warning 274s pd = makedist ("stable"); 274s assert (class (pd), "double"); 274s assert (isempty (pd), true); 274s ***** test 274s pd = makedist ("tlocationscale"); 274s assert (class (pd), "tLocationScaleDistribution"); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 1); 274s assert (pd.nu, 5); 274s ***** test 274s pd = makedist ("tlocationscale", "mu", 5); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 1); 274s assert (pd.nu, 5); 274s ***** test 274s pd = makedist ("tlocationscale", "sigma", 2); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 2); 274s assert (pd.nu, 5); 274s ***** test 274s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 274s assert (pd.mu, 5); 274s assert (pd.sigma, 2); 274s assert (pd.nu, 5); 274s ***** test 274s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 274s assert (pd.mu, 0); 274s assert (pd.sigma, 2); 274s assert (pd.nu, 1); 274s ***** test 274s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 274s assert (pd.mu, -2); 274s assert (pd.sigma, 3); 274s assert (pd.nu, 1); 274s ***** test 274s pd = makedist ("Triangular"); 274s assert (class (pd), "TriangularDistribution"); 274s assert (pd.A, 0); 274s assert (pd.B, 0.5); 274s assert (pd.C, 1); 274s ***** test 274s pd = makedist ("Triangular", "A", -2); 274s assert (pd.A, -2); 274s assert (pd.B, 0.5); 274s assert (pd.C, 1); 274s ***** test 274s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 274s assert (pd.A, 0.5); 274s assert (pd.B, 0.9); 274s assert (pd.C, 1); 274s ***** test 274s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 274s assert (pd.A, 1); 274s assert (pd.B, 2); 274s assert (pd.C, 5); 274s ***** test 274s pd = makedist ("Uniform"); 274s assert (class (pd), "UniformDistribution"); 274s assert (pd.Lower, 0); 274s assert (pd.Upper, 1); 274s ***** test 274s pd = makedist ("Uniform", "Lower", -2); 274s assert (pd.Lower, -2); 274s assert (pd.Upper, 1); 274s ***** test 274s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 274s assert (pd.Lower, 1); 274s assert (pd.Upper, 3); 274s ***** test 274s pd = makedist ("Weibull"); 274s assert (class (pd), "WeibullDistribution"); 274s assert (pd.lambda, 1); 274s assert (pd.k, 1); 274s ***** test 274s pd = makedist ("Weibull", "lambda", 3); 274s assert (pd.lambda, 3); 274s assert (pd.k, 1); 274s ***** test 274s pd = makedist ("Weibull", "lambda", 3, "k", 2); 274s assert (pd.lambda, 3); 274s assert (pd.k, 2); 274s ***** error makedist (1) 274s ***** error makedist (["as";"sd"]) 274s ***** error makedist ("some") 274s ***** error ... 274s makedist ("Beta", "a") 274s ***** error ... 274s makedist ("Beta", "a", 1, "Q", 23) 274s ***** error ... 274s makedist ("Binomial", "N", 1, "Q", 23) 274s ***** error ... 274s makedist ("BirnbaumSaunders", "N", 1) 274s ***** error ... 274s makedist ("Burr", "lambda", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("extremevalue", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("exponential", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Gamma", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("HalfNormal", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Logistic", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Loglogistic", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Lognormal", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Loguniform", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Multinomial", "k", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Nakagami", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Normal", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Poisson", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Rician", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Stable", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Triangular", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Uniform", "mu", 1, "sdfs", 34) 274s ***** error ... 274s makedist ("Weibull", "mu", 1, "sdfs", 34) 274s 131 tests, 131 passed, 0 known failure, 0 skipped 274s [inst/dist_wrap/icdf.m] 274s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/icdf.m 274s ***** shared p 274s p = [0.05:0.05:0.5]; 274s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 274s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 274s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 274s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 274s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 274s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 274s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 274s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 274s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 274s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 274s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 274s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 274s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 274s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 274s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 274s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 274s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 274s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 274s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 274s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 274s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 274s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 274s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 274s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 274s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 274s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 274s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 274s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 274s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 274s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 274s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 274s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 274s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 274s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 274s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 274s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 274s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 274s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 274s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 274s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 274s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 274s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 274s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 274s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 274s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 274s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 274s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 275s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 275s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 275s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 275s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 275s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 276s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 276s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 276s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 276s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 276s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 276s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 276s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 276s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 277s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 277s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 277s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 277s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 277s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 277s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 277s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 277s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 277s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 277s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 277s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 281s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 286s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 286s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 286s ***** error icdf (1) 286s ***** error icdf ({"beta"}) 286s ***** error icdf ("beta", {[1 2 3 4 5]}) 286s ***** error icdf ("beta", "text") 286s ***** error icdf ("beta", 1+i) 286s ***** error ... 286s icdf ("Beta", p, "a", 2) 286s ***** error ... 286s icdf ("Beta", p, 5, "") 286s ***** error ... 286s icdf ("Beta", p, 5, {2}) 286s ***** error icdf ("chi2", p) 286s ***** error icdf ("Beta", p, 5) 286s ***** error icdf ("Burr", p, 5) 286s ***** error icdf ("Burr", p, 5, 2) 286s 86 tests, 86 passed, 0 known failure, 0 skipped 286s [inst/dist_wrap/random.m] 286s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/random.m 286s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 286s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 286s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 286s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 286s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 286s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 286s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 286s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 286s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 286s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 286s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 286s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 286s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 286s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 286s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 286s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 286s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 286s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 286s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 286s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 286s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 286s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 286s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 286s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 286s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 286s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 286s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 286s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 286s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 286s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 286s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 286s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 286s ***** error random (1) 286s ***** error random ({"beta"}) 286s ***** error ... 286s random ("Beta", "a", 2) 286s ***** error ... 286s random ("Beta", 5, "") 286s ***** error ... 286s random ("Beta", 5, {2}) 286s ***** error ... 286s random ("Beta", "a", 2, 2, 10) 286s ***** error ... 286s random ("Beta", 5, "", 2, 10) 286s ***** error ... 286s random ("Beta", 5, {2}, 2, 10) 286s ***** error ... 286s random ("Beta", 5, "", 2, 10) 286s ***** error random ("chi2") 286s ***** error random ("Beta", 5) 286s ***** error random ("Burr", 5) 286s ***** error random ("Burr", 5, 2) 286s 87 tests, 87 passed, 0 known failure, 0 skipped 286s [inst/dist_wrap/cdf.m] 286s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_wrap/cdf.m 286s ***** shared x 286s x = [1:5]; 286s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 286s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 286s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 286s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 286s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 286s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 286s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 286s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 286s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 286s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 286s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 286s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 286s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 286s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 286s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 286s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 286s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 286s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 286s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 286s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 286s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 286s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 286s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 286s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 286s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 286s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 286s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 286s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 286s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 286s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 286s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 286s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 286s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 286s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 286s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 286s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 286s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 286s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 286s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 286s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 286s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 286s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 286s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 286s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 286s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 286s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 286s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 286s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 287s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 287s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 287s ***** error cdf (1) 287s ***** error cdf ({"beta"}) 287s ***** error cdf ("beta", {[1 2 3 4 5]}) 287s ***** error cdf ("beta", "text") 287s ***** error cdf ("beta", 1+i) 287s ***** error ... 287s cdf ("Beta", x, "a", 2) 287s ***** error ... 287s cdf ("Beta", x, 5, "") 287s ***** error ... 287s cdf ("Beta", x, 5, {2}) 287s ***** error cdf ("chi2", x) 287s ***** error cdf ("Beta", x, 5) 287s ***** error cdf ("Burr", x, 5) 287s ***** error cdf ("Burr", x, 5, 2) 287s 86 tests, 86 passed, 0 known failure, 0 skipped 287s [inst/mcnemar_test.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/mcnemar_test.m 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 287s assert (h, 1); 287s assert (pval, 3.8151e-06, 1e-10); 287s assert (chisq, 21.356, 1e-3); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 287s assert (h, 1); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 287s assert (h, 0); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 287s assert (h, 1); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 287s assert (h, 1); 287s assert (pval, 0.033006, 1e-6); 287s assert (chisq, 4.5455, 1e-4); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 287s assert (h, 0); 287s assert (pval, 0.052479, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 287s assert (h, 0); 287s assert (pval, 0.055009, 1e-6); 287s assert (chisq, 3.6818, 1e-4); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 287s assert (h, 1); 287s assert (pval, 0.055009, 1e-6); 287s assert (chisq, 3.6818, 1e-4); 287s ***** error mcnemar_test (59, 6, 16, 80) 287s ***** error mcnemar_test (ones (3, 3)) 287s ***** error ... 287s mcnemar_test ([59,6;16,-80]) 287s ***** error ... 287s mcnemar_test ([59,6;16,4.5]) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], {""}) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], -0.2) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], 1) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], "") 287s 17 tests, 17 passed, 0 known failure, 0 skipped 287s [inst/signtest.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/signtest.m 287s ***** test 287s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 287s assert (pval, 1.091701889420221e-218, 1e-14); 287s assert (h, 1); 287s assert (stats.zval, -31.5437631079266, 1e-14); 287s ***** test 287s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 287s assert (pval, 0.6875000000000006, 1e-14); 287s assert (h, 0); 287s assert (stats.zval, NaN); 287s assert (stats.sign, 4); 287s ***** test 287s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 287s assert (pval, 0.6830913983096086, 1e-14); 287s assert (h, 0); 287s assert (stats.zval, 0.4082482904638631, 1e-14); 287s assert (stats.sign, 4); 287s ***** error signtest (ones (2)) 287s ***** error ... 287s signtest ([1, 2, 3, 4], ones (2)) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [1, 2, 3]) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'tail') 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'alpha', 0) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'alpha', "a") 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'tail', "some") 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'method', 0.01) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'method', "some") 287s ***** error ... 287s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 287s 20 tests, 20 passed, 0 known failure, 0 skipped 287s [inst/fitlm.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/fitlm.m 287s ***** demo 287s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 287s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 287s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 287s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 287s 25.694 ]'; 287s 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]'; 287s 287s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 287s ***** demo 287s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 287s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 287s brands = {'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'}; 287s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 287s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 287s 287s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 287s "CategoricalVars",[1,2],"display","on"); 287s ***** test 287s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 287s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 287s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 287s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 287s 25.694 ]'; 287s 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]'; 287s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 287s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 287s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 287s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 287s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 287s assert (TAB{2,2}, 10, 1e-04); 287s assert (TAB{3,2}, 7.99999999999999, 1e-09); 287s assert (TAB{4,2}, 8.99999999999999, 1e-09); 287s assert (TAB{5,2}, 11.0001428571429, 1e-09); 287s assert (TAB{6,2}, 19.0001111111111, 1e-09); 287s assert (TAB{2,3}, 1.01775379540949, 1e-09); 287s assert (TAB{3,3}, 1.64107868458008, 1e-09); 287s assert (TAB{4,3}, 1.43932122062479, 1e-09); 287s assert (TAB{5,3}, 1.48983900477565, 1e-09); 287s assert (TAB{6,3}, 1.3987687997822, 1e-09); 287s assert (TAB{2,6}, 9.82555903510687, 1e-09); 287s assert (TAB{3,6}, 4.87484242844031, 1e-09); 287s assert (TAB{4,6}, 6.25294748040552, 1e-09); 287s assert (TAB{5,6}, 7.38344399756088, 1e-09); 287s assert (TAB{6,6}, 13.5834536158296, 1e-09); 287s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 287s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 287s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 287s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 287s ***** test 287s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 287s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 287s brands = bsxfun (@times, ones(6,1), [1,2,3]); 287s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 287s 287s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 287s "categoricalvars",[1,2],"display","off"); 287s assert (TAB{2,2}, 5.66666666666667, 1e-09); 287s assert (TAB{3,2}, -1.33333333333333, 1e-09); 287s assert (TAB{4,2}, -2.16666666666667, 1e-09); 287s assert (TAB{5,2}, 1.16666666666667, 1e-09); 287s assert (TAB{6,2}, -0.333333333333334, 1e-09); 287s assert (TAB{7,2}, -0.166666666666667, 1e-09); 287s assert (TAB{2,3}, 0.215165741455965, 1e-09); 287s assert (TAB{3,3}, 0.304290309725089, 1e-09); 287s assert (TAB{4,3}, 0.304290309725089, 1e-09); 287s assert (TAB{5,3}, 0.304290309725089, 1e-09); 287s assert (TAB{6,3}, 0.43033148291193, 1e-09); 287s assert (TAB{7,3}, 0.43033148291193, 1e-09); 287s assert (TAB{2,6}, 26.3362867542108, 1e-09); 287s assert (TAB{3,6}, -4.38178046004138, 1e-09); 287s assert (TAB{4,6}, -7.12039324756724, 1e-09); 287s assert (TAB{5,6}, 3.83405790253621, 1e-09); 287s assert (TAB{6,6}, -0.774596669241495, 1e-09); 287s assert (TAB{7,6}, -0.387298334620748, 1e-09); 287s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 287s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 287s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 287s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 287s assert (TAB{6,7}, 0.453570536021938, 1e-09); 287s assert (TAB{7,7}, 0.705316781644046, 1e-09); 287s ## Test with string ids for categorical variables 287s brands = {'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'; ... 287s 'Gourmet', 'National', 'Generic'}; 287s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 287s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 287s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 287s "categoricalvars",[1,2],"display","off"); 287s ***** test 287s load carsmall 287s X = [Weight,Horsepower,Acceleration]; 287s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 287s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 287s assert (TAB{2,2}, 47.9767628118615, 1e-09); 287s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 287s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 287s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 287s assert (TAB{2,3}, 3.87851641748551, 1e-09); 287s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 287s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 287s assert (TAB{5,3}, 0.193325043113178, 1e-09); 287s assert (TAB{2,6}, 12.369874881944, 1e-09); 287s assert (TAB{3,6}, -5.80228828790225, 1e-09); 287s assert (TAB{4,6}, -1.76626492228599, 1e-09); 287s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 287s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 287s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 287s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 287s assert (TAB{5,7}, 0.952359384151778, 1e-09); 287s 3 tests, 3 passed, 0 known failure, 0 skipped 287s [inst/logit.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/logit.m 287s ***** test 287s p = [0.01:0.01:0.99]; 287s assert (logit (p), log (p ./ (1-p)), 25*eps); 287s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 287s ***** error logit () 287s ***** error logit (1, 2) 287s 4 tests, 4 passed, 0 known failure, 0 skipped 287s [inst/rangesearch.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/rangesearch.m 287s ***** demo 287s ## Generate 1000 random 2D points from each of five distinct multivariate 287s ## normal distributions that form five separate classes 287s N = 1000; 287s d = 10; 287s randn ("seed", 5); 287s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 287s randn ("seed", 6); 287s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 287s randn ("seed", 7); 287s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 287s randn ("seed", 8); 287s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 287s randn ("seed", 8); 287s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 287s X = [X1; X2; X3; X4; X5]; 287s 287s ## For each point in X, find the points in X that are within a radius d 287s ## away from the points in X. 287s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 287s 287s ## Select the first point in X (corresponding to the first class) and find 287s ## its nearest neighbors within the radius d. Display these points in 287s ## one color and the remaining points in a different color. 287s x = X(1,:); 287s nearestPoints = X (Idx{1},:); 287s nonNearestIdx = true (size (X, 1), 1); 287s nonNearestIdx(Idx{1}) = false; 287s 287s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 287s hold on 287s scatter (nearestPoints(:,1),nearestPoints(:,2)) 287s scatter (x(1), x(2), "black", "filled") 287s hold off 287s 287s ## Select the last point in X (corresponding to the fifth class) and find 287s ## its nearest neighbors within the radius d. Display these points in 287s ## one color and the remaining points in a different color. 287s x = X(end,:); 287s nearestPoints = X (Idx{1},:); 287s nonNearestIdx = true (size (X, 1), 1); 287s nonNearestIdx(Idx{1}) = false; 287s 287s figure 287s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 287s hold on 287s scatter (nearestPoints(:,1),nearestPoints(:,2)) 287s scatter (x(1), x(2), "black", "filled") 287s hold off 287s ***** shared x, y, X, Y 287s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 287s y = [2, 3, 4; 1, 4, 3]; 287s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 287s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 287s ***** test 287s [idx, D] = rangesearch (x, y, 4); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 287s assert (idx, {[1, 2, 4]; [1, 4]}); 287s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 287s "SortIndices", false); 287s assert (idx, {[1, 2, 4]; [1, 4]}); 287s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 287s ***** test 287s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 287s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 287s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 287s "NSMethod", "exhaustive"); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 287s "NSMethod", "exhaustive"); 287s assert (idx, {[1, 4, 2]; [1, 4]}); 287s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 287s "NSMethod", "exhaustive", "SortIndices", false); 287s assert (idx, {[1, 2, 4]; [1, 4]}); 287s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (X, Y, 4); 287s assert (idx, {[1, 2]; [1, 2, 3]}); 287s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (X, Y, 2); 287s assert (idx, {[1]; [1, 2]}); 287s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 287s ***** test 287s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 287s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 287s assert (idx, {[1, 2]; [1, 2, 3]}); 287s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 287s assert (idx, {[1, 2]; [1, 2, 3]}); 287s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 287s ***** test 287s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 287s "NSMethod", "exhaustive"); 287s assert (idx, {[1, 2]; [1, 2, 3]}); 287s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 287s ***** error rangesearch (1) 287s ***** error ... 287s rangesearch (ones (4, 5), ones (4)) 287s ***** error ... 287s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 287s ***** error ... 287s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 287s 31 tests, 31 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/jsucdf.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/jsucdf.m 287s ***** error jsucdf () 287s ***** error jsucdf (1, 2, 3, 4) 287s ***** error ... 287s jsucdf (1, ones (2), ones (3)) 287s 3 tests, 3 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/cauchypdf.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/cauchypdf.m 287s ***** demo 287s ## Plot various PDFs from the Cauchy distribution 287s x = -5:0.01:5; 287s y1 = cauchypdf (x, 0, 0.5); 287s y2 = cauchypdf (x, 0, 1); 287s y3 = cauchypdf (x, 0, 2); 287s y4 = cauchypdf (x, -2, 1); 287s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 287s grid on 287s xlim ([-5, 5]) 287s ylim ([0, 0.7]) 287s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 287s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 287s title ("Cauchy PDF") 287s xlabel ("values in x") 287s ylabel ("density") 287s ***** shared x, y 287s x = [-1 0 0.5 1 2]; 287s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 287s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 287s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 287s ***** assert (cauchypdf (x, ones (1,5), 2), y) 287s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 287s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 287s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 287s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 287s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 287s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 287s ***** test 287s x = rand (10, 1); 287s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 287s ***** error cauchypdf () 287s ***** error cauchypdf (1) 287s ***** error ... 287s cauchypdf (1, 2) 287s ***** error cauchypdf (1, 2, 3, 4) 287s ***** error ... 287s cauchypdf (ones (3), ones (2), ones(2)) 287s ***** error ... 287s cauchypdf (ones (2), ones (3), ones(2)) 287s ***** error ... 287s cauchypdf (ones (2), ones (2), ones(3)) 287s ***** error cauchypdf (i, 4, 3) 287s ***** error cauchypdf (1, i, 3) 287s ***** error cauchypdf (1, 4, i) 287s 20 tests, 20 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/fcdf.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/fcdf.m 287s ***** demo 287s ## Plot various CDFs from the F distribution 287s x = 0.01:0.01:4; 287s p1 = fcdf (x, 1, 2); 287s p2 = fcdf (x, 2, 1); 287s p3 = fcdf (x, 5, 2); 287s p4 = fcdf (x, 10, 1); 287s p5 = fcdf (x, 100, 100); 287s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 287s grid on 287s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 287s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 287s "df1 = 100, df2 = 100"}, "location", "southeast") 287s title ("F CDF") 287s xlabel ("values in x") 287s ylabel ("probability") 287s ***** shared x, y 287s x = [-1, 0, 0.5, 1, 2, Inf]; 287s y = [0, 0, 1/3, 1/2, 2/3, 1]; 287s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 287s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 287s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 287s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 287s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 287s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 287s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 287s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 287s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 287s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 287s ***** error fcdf () 287s ***** error fcdf (1) 287s ***** error fcdf (1, 2) 287s ***** error fcdf (1, 2, 3, 4) 287s ***** error fcdf (1, 2, 3, "tail") 287s ***** error ... 287s fcdf (ones (3), ones (2), ones (2)) 287s ***** error ... 287s fcdf (ones (2), ones (3), ones (2)) 287s ***** error ... 287s fcdf (ones (2), ones (2), ones (3)) 287s ***** error fcdf (i, 2, 2) 287s ***** error fcdf (2, i, 2) 287s ***** error fcdf (2, 2, i) 287s 21 tests, 21 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/laplacernd.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/laplacernd.m 287s ***** assert (size (laplacernd (1, 1)), [1 1]) 287s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 287s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 287s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 287s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 287s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 287s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 287s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 287s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 287s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 287s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 287s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 287s ***** assert (class (laplacernd (1, 1)), "double") 287s ***** assert (class (laplacernd (1, single (1))), "single") 287s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 287s ***** assert (class (laplacernd (single (1), 1)), "single") 287s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 287s ***** error laplacernd () 287s ***** error laplacernd (1) 287s ***** error ... 287s laplacernd (ones (3), ones (2)) 287s ***** error ... 287s laplacernd (ones (2), ones (3)) 287s ***** error laplacernd (i, 2, 3) 287s ***** error laplacernd (1, i, 3) 287s ***** error ... 287s laplacernd (1, 2, -1) 287s ***** error ... 287s laplacernd (1, 2, 1.2) 287s ***** error ... 287s laplacernd (1, 2, ones (2)) 287s ***** error ... 287s laplacernd (1, 2, [2 -1 2]) 287s ***** error ... 287s laplacernd (1, 2, [2 0 2.5]) 287s ***** error ... 287s laplacernd (1, 2, 2, -1, 5) 287s ***** error ... 287s laplacernd (1, 2, 2, 1.5, 5) 287s ***** error ... 287s laplacernd (2, ones (2), 3) 287s ***** error ... 287s laplacernd (2, ones (2), [3, 2]) 287s ***** error ... 287s laplacernd (2, ones (2), 3, 2) 287s 33 tests, 33 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/hnrnd.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hnrnd.m 287s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 287s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 287s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 287s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 287s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 287s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 287s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 287s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 287s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 287s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 287s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 287s ***** test 287s r = hnrnd (1, [1, 0, -1]); 287s assert (r([2:3]), [NaN, NaN]) 287s ***** assert (class (hnrnd (1, 0)), "double") 287s ***** assert (class (hnrnd (1, single (0))), "single") 287s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 287s ***** assert (class (hnrnd (1, single (1))), "single") 287s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 287s ***** assert (class (hnrnd (single (1), 1)), "single") 287s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 287s ***** error hnrnd () 287s ***** error hnrnd (1) 287s ***** error ... 287s hnrnd (ones (3), ones (2)) 287s ***** error ... 287s hnrnd (ones (2), ones (3)) 287s ***** error hnrnd (i, 2, 3) 287s ***** error hnrnd (1, i, 3) 287s ***** error ... 287s hnrnd (1, 2, -1) 287s ***** error ... 287s hnrnd (1, 2, 1.2) 287s ***** error ... 287s hnrnd (1, 2, ones (2)) 287s ***** error ... 287s hnrnd (1, 2, [2 -1 2]) 287s ***** error ... 287s hnrnd (1, 2, [2 0 2.5]) 287s ***** error ... 287s hnrnd (1, 2, 2, -1, 5) 287s ***** error ... 287s hnrnd (1, 2, 2, 1.5, 5) 287s ***** error ... 287s hnrnd (2, ones (2), 3) 287s ***** error ... 287s hnrnd (2, ones (2), [3, 2]) 287s ***** error ... 287s hnrnd (2, ones (2), 3, 2) 287s 35 tests, 35 passed, 0 known failure, 0 skipped 287s [inst/dist_fun/ricecdf.m] 287s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ricecdf.m 287s ***** demo 287s ## Plot various CDFs from the Rician distribution 287s x = 0:0.01:10; 287s p1 = ricecdf (x, 0, 1); 287s p2 = ricecdf (x, 0.5, 1); 287s p3 = ricecdf (x, 1, 1); 287s p4 = ricecdf (x, 2, 1); 287s p5 = ricecdf (x, 4, 1); 287s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 287s grid on 287s ylim ([0, 1]) 287s xlim ([0, 8]) 287s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 287s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 287s title ("Rician CDF") 287s xlabel ("values in x") 287s ylabel ("probability") 287s ***** demo 287s ## Plot various CDFs from the Rician distribution 287s x = 0:0.01:10; 287s p1 = ricecdf (x, 0, 0.5); 287s p2 = ricecdf (x, 0, 2); 287s p3 = ricecdf (x, 0, 3); 287s p4 = ricecdf (x, 2, 2); 287s p5 = ricecdf (x, 4, 2); 287s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 287s grid on 287s ylim ([0, 1]) 287s xlim ([0, 8]) 287s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 287s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 287s title ("Rician CDF") 287s xlabel ("values in x") 287s ylabel ("probability") 287s ***** test 287s x = 0:0.5:2.5; 287s s = 1:6; 287s p = ricecdf (x, s, 1); 287s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 287s assert (p, expected_p, 0.001); 287s ***** test 287s x = 0:0.5:2.5; 287s sigma = 1:6; 287s p = ricecdf (x, 1, sigma); 287s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 287s assert (p, expected_p, 0.001); 287s ***** test 287s x = 0:0.5:2.5; 287s p = ricecdf (x, 0, 1); 287s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 287s assert (p, expected_p, 0.001); 287s ***** test 287s x = 0:0.5:2.5; 287s p = ricecdf (x, 1, 1); 287s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 287s assert (p, expected_p, 0.001); 287s ***** shared x, p 287s x = [-1, 0, 1, 2, Inf]; 287s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 287s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 288s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 288s ***** error ricecdf () 288s ***** error ricecdf (1) 288s ***** error ricecdf (1, 2) 288s ***** error ricecdf (1, 2, 3, "uper") 288s ***** error ricecdf (1, 2, 3, 4) 288s ***** error ... 288s ricecdf (ones (3), ones (2), ones (2)) 288s ***** error ... 288s ricecdf (ones (2), ones (3), ones (2)) 288s ***** error ... 288s ricecdf (ones (2), ones (2), ones (3)) 288s ***** error ricecdf (i, 2, 3) 288s ***** error ricecdf (2, i, 3) 288s ***** error ricecdf (2, 2, i) 288s 17 tests, 17 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/evrnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/evrnd.m 288s ***** assert (size (evrnd (1, 1)), [1 1]) 288s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 288s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 288s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 288s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 288s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 288s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (evrnd (1, 1)), "double") 288s ***** assert (class (evrnd (1, single (1))), "single") 288s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 288s ***** assert (class (evrnd (single (1), 1)), "single") 288s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 288s ***** error evrnd () 288s ***** error evrnd (1) 288s ***** error ... 288s evrnd (ones (3), ones (2)) 288s ***** error ... 288s evrnd (ones (2), ones (3)) 288s ***** error evrnd (i, 2, 3) 288s ***** error evrnd (1, i, 3) 288s ***** error ... 288s evrnd (1, 2, -1) 288s ***** error ... 288s evrnd (1, 2, 1.2) 288s ***** error ... 288s evrnd (1, 2, ones (2)) 288s ***** error ... 288s evrnd (1, 2, [2 -1 2]) 288s ***** error ... 288s evrnd (1, 2, [2 0 2.5]) 288s ***** error ... 288s evrnd (1, 2, 2, -1, 5) 288s ***** error ... 288s evrnd (1, 2, 2, 1.5, 5) 288s ***** error ... 288s evrnd (2, ones (2), 3) 288s ***** error ... 288s evrnd (2, ones (2), [3, 2]) 288s ***** error ... 288s evrnd (2, ones (2), 3, 2) 288s 33 tests, 33 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/logncdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logncdf.m 288s ***** demo 288s ## Plot various CDFs from the log-normal distribution 288s x = 0:0.01:3; 288s p1 = logncdf (x, 0, 1); 288s p2 = logncdf (x, 0, 0.5); 288s p3 = logncdf (x, 0, 0.25); 288s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 288s grid on 288s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 288s "location", "southeast") 288s title ("Log-normal CDF") 288s xlabel ("values in x") 288s ylabel ("probability") 288s ***** shared x, y 288s x = [-1, 0, 1, e, Inf]; 288s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 288s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 288s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 288s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 288s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 288s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 288s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 288s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 288s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 288s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 288s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 288s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 288s ***** error logncdf () 288s ***** error logncdf (1,2,3,4,5,6,7) 288s ***** error logncdf (1, 2, 3, 4, "uper") 288s ***** error ... 288s logncdf (ones (3), ones (2), ones (2)) 288s ***** error logncdf (2, 3, 4, [1, 2]) 288s ***** error ... 288s [p, plo, pup] = logncdf (1, 2, 3) 288s ***** error [p, plo, pup] = ... 288s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 288s ***** error [p, plo, pup] = ... 288s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 288s ***** error [p, plo, pup] = ... 288s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 288s ***** error logncdf (i, 2, 2) 288s ***** error logncdf (2, i, 2) 288s ***** error logncdf (2, 2, i) 288s ***** error ... 288s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 288s 24 tests, 24 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/iwishpdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/iwishpdf.m 288s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 288s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 288s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 288s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 288s ***** error iwishpdf () 288s ***** error iwishpdf (1, 2) 288s ***** error iwishpdf (1, 2, 0) 288s 6 tests, 6 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/invgcdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/invgcdf.m 288s ***** demo 288s ## Plot various CDFs from the inverse Gaussian distribution 288s x = 0:0.001:3; 288s p1 = invgcdf (x, 1, 0.2); 288s p2 = invgcdf (x, 1, 1); 288s p3 = invgcdf (x, 1, 3); 288s p4 = invgcdf (x, 3, 0.2); 288s p5 = invgcdf (x, 3, 1); 288s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 288s grid on 288s xlim ([0, 3]) 288s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 288s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 288s title ("Inverse Gaussian CDF") 288s xlabel ("values in x") 288s ylabel ("probability") 288s ***** shared x, p1, p1u, y2, y2u, y3, y3u 288s x = [-Inf, -1, 0, 1/2, 1, Inf]; 288s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 288s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 288s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 288s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 288s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 288s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 288s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 288s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 288s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 288s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 288s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 288s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 288s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 288s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 288s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 288s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 288s ***** error invgcdf () 288s ***** error invgcdf (1) 288s ***** error invgcdf (1, 2) 288s ***** error invgcdf (1, 2, 3, "tail") 288s ***** error invgcdf (1, 2, 3, 5) 288s ***** error ... 288s invgcdf (ones (3), ones (2), ones(2)) 288s ***** error ... 288s invgcdf (ones (2), ones (3), ones(2)) 288s ***** error ... 288s invgcdf (ones (2), ones (2), ones(3)) 288s ***** error invgcdf (i, 2, 3) 288s ***** error invgcdf (1, i, 3) 288s ***** error invgcdf (1, 2, i) 288s 25 tests, 25 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/betarnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/betarnd.m 288s ***** assert (size (betarnd (2, 1/2)), [1 1]) 288s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 288s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 288s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 288s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 288s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 288s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 288s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 288s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (betarnd (1, 1)), "double") 288s ***** assert (class (betarnd (1, single (0))), "single") 288s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 288s ***** assert (class (betarnd (1, single (1), 2)), "single") 288s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 288s ***** assert (class (betarnd (single (1), 1, 2)), "single") 288s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 288s ***** error betarnd () 288s ***** error betarnd (1) 288s ***** error ... 288s betarnd (ones (3), ones (2)) 288s ***** error ... 288s betarnd (ones (2), ones (3)) 288s ***** error betarnd (i, 2) 288s ***** error betarnd (1, i) 288s ***** error ... 288s betarnd (1, 1/2, -1) 288s ***** error ... 288s betarnd (1, 1/2, 1.2) 288s ***** error ... 288s betarnd (1, 1/2, ones (2)) 288s ***** error ... 288s betarnd (1, 1/2, [2 -1 2]) 288s ***** error ... 288s betarnd (1, 1/2, [2 0 2.5]) 288s ***** error ... 288s betarnd (1, 1/2, 2, -1, 5) 288s ***** error ... 288s betarnd (1, 1/2, 2, 1.5, 5) 288s ***** error ... 288s betarnd (2, 1/2 * ones (2), 3) 288s ***** error ... 288s betarnd (2, 1/2 * ones (2), [3, 2]) 288s ***** error ... 288s betarnd (2, 1/2 * ones (2), 3, 2) 288s ***** error ... 288s betarnd (2 * ones (2), 1/2, 3) 288s ***** error ... 288s betarnd (2 * ones (2), 1/2, [3, 2]) 288s ***** error ... 288s betarnd (2 * ones (2), 1/2, 3, 2) 288s 40 tests, 40 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/loglrnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/loglrnd.m 288s ***** assert (size (loglrnd (1, 1)), [1 1]) 288s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 288s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 288s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 288s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 288s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 288s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (loglrnd (1, 1)), "double") 288s ***** assert (class (loglrnd (1, single (1))), "single") 288s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 288s ***** assert (class (loglrnd (single (1), 1)), "single") 288s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 288s ***** error loglrnd () 288s ***** error loglrnd (1) 288s ***** error ... 288s loglrnd (ones (3), ones (2)) 288s ***** error ... 288s loglrnd (ones (2), ones (3)) 288s ***** error loglrnd (i, 2, 3) 288s ***** error loglrnd (1, i, 3) 288s ***** error ... 288s loglrnd (1, 2, -1) 288s ***** error ... 288s loglrnd (1, 2, 1.2) 288s ***** error ... 288s loglrnd (1, 2, ones (2)) 288s ***** error ... 288s loglrnd (1, 2, [2 -1 2]) 288s ***** error ... 288s loglrnd (1, 2, [2 0 2.5]) 288s ***** error ... 288s loglrnd (1, 2, 2, -1, 5) 288s ***** error ... 288s loglrnd (1, 2, 2, 1.5, 5) 288s ***** error ... 288s loglrnd (2, ones (2), 3) 288s ***** error ... 288s loglrnd (2, ones (2), [3, 2]) 288s ***** error ... 288s loglrnd (2, ones (2), 3, 2) 288s 33 tests, 33 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/gevpdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gevpdf.m 288s ***** demo 288s ## Plot various PDFs from the generalized extreme value distribution 288s x = -1:0.001:10; 288s y1 = gevpdf (x, 1, 1, 1); 288s y2 = gevpdf (x, 0.5, 1, 1); 288s y3 = gevpdf (x, 1, 1, 5); 288s y4 = gevpdf (x, 1, 2, 5); 288s y5 = gevpdf (x, 1, 5, 5); 288s y6 = gevpdf (x, 1, 0.5, 5); 288s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 288s x, y4, "-c", x, y5, "-m", x, y6, "-k") 288s grid on 288s xlim ([-1, 10]) 288s ylim ([0, 1.1]) 288s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 288s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 288s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 288s "location", "northeast") 288s title ("Generalized extreme value PDF") 288s xlabel ("values in x") 288s ylabel ("density") 288s ***** test 288s x = 0:0.5:2.5; 288s sigma = 1:6; 288s k = 1; 288s mu = 0; 288s y = gevpdf (x, k, sigma, mu); 288s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 288s assert (y, expected_y, 0.001); 288s ***** test 288s x = -0.5:0.5:2.5; 288s sigma = 0.5; 288s k = 1; 288s mu = 0; 288s y = gevpdf (x, k, sigma, mu); 288s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 288s assert (y, expected_y, 0.001); 288s ***** test # check for continuity for k near 0 288s x = 1; 288s sigma = 0.5; 288s k = -0.03:0.01:0.03; 288s mu = 0; 288s y = gevpdf (x, k, sigma, mu); 288s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 288s assert (y, expected_y, 0.001); 288s ***** error gevpdf () 288s ***** error gevpdf (1) 288s ***** error gevpdf (1, 2) 288s ***** error gevpdf (1, 2, 3) 288s ***** error ... 288s gevpdf (ones (3), ones (2), ones(2), ones(2)) 288s ***** error ... 288s gevpdf (ones (2), ones (3), ones(2), ones(2)) 288s ***** error ... 288s gevpdf (ones (2), ones (2), ones(3), ones(2)) 288s ***** error ... 288s gevpdf (ones (2), ones (2), ones(2), ones(3)) 288s ***** error gevpdf (i, 2, 3, 4) 288s ***** error gevpdf (1, i, 3, 4) 288s ***** error gevpdf (1, 2, i, 4) 288s ***** error gevpdf (1, 2, 3, i) 288s 15 tests, 15 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/invgpdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/invgpdf.m 288s ***** demo 288s ## Plot various PDFs from the inverse Gaussian distribution 288s x = 0:0.001:3; 288s y1 = invgpdf (x, 1, 0.2); 288s y2 = invgpdf (x, 1, 1); 288s y3 = invgpdf (x, 1, 3); 288s y4 = invgpdf (x, 3, 0.2); 288s y5 = invgpdf (x, 3, 1); 288s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 288s grid on 288s xlim ([0, 3]) 288s ylim ([0, 3]) 288s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 288s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 288s title ("Inverse Gaussian PDF") 288s xlabel ("values in x") 288s ylabel ("density") 288s ***** shared x, y 288s x = [-Inf, -1, 0, 1/2, 1, Inf]; 288s y = [0, 0, 0, 0.8788, 0.3989, 0]; 288s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 288s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 288s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 288s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 288s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 288s ***** error invgpdf () 288s ***** error invgpdf (1) 288s ***** error invgpdf (1, 2) 288s ***** error ... 288s invgpdf (1, ones (2), ones (3)) 288s ***** error ... 288s invgpdf (ones (2), 1, ones (3)) 288s ***** error ... 288s invgpdf (ones (2), ones (3), 1) 288s ***** error invgpdf (i, 2, 3) 288s ***** error invgpdf (1, i, 3) 288s ***** error invgpdf (1, 2, i) 288s 14 tests, 14 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/nakarnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nakarnd.m 288s ***** assert (size (nakarnd (1, 1)), [1 1]) 288s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 288s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 288s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 288s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 288s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 288s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (nakarnd (1, 1)), "double") 288s ***** assert (class (nakarnd (1, single (1))), "single") 288s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 288s ***** assert (class (nakarnd (single (1), 1)), "single") 288s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 288s ***** error nakarnd () 288s ***** error nakarnd (1) 288s ***** error ... 288s nakarnd (ones (3), ones (2)) 288s ***** error ... 288s nakarnd (ones (2), ones (3)) 288s ***** error nakarnd (i, 2, 3) 288s ***** error nakarnd (1, i, 3) 288s ***** error ... 288s nakarnd (1, 2, -1) 288s ***** error ... 288s nakarnd (1, 2, 1.2) 288s ***** error ... 288s nakarnd (1, 2, ones (2)) 288s ***** error ... 288s nakarnd (1, 2, [2 -1 2]) 288s ***** error ... 288s nakarnd (1, 2, [2 0 2.5]) 288s ***** error ... 288s nakarnd (1, 2, 2, -1, 5) 288s ***** error ... 288s nakarnd (1, 2, 2, 1.5, 5) 288s ***** error ... 288s nakarnd (2, ones (2), 3) 288s ***** error ... 288s nakarnd (2, ones (2), [3, 2]) 288s ***** error ... 288s nakarnd (2, ones (2), 3, 2) 288s 33 tests, 33 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/wblrnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wblrnd.m 288s ***** assert (size (wblrnd (1, 1)), [1 1]) 288s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 288s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 288s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 288s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 288s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 288s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (wblrnd (1, 1)), "double") 288s ***** assert (class (wblrnd (1, single (1))), "single") 288s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 288s ***** assert (class (wblrnd (single (1), 1)), "single") 288s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 288s ***** error wblrnd () 288s ***** error wblrnd (1) 288s ***** error ... 288s wblrnd (ones (3), ones (2)) 288s ***** error ... 288s wblrnd (ones (2), ones (3)) 288s ***** error wblrnd (i, 2, 3) 288s ***** error wblrnd (1, i, 3) 288s ***** error ... 288s wblrnd (1, 2, -1) 288s ***** error ... 288s wblrnd (1, 2, 1.2) 288s ***** error ... 288s wblrnd (1, 2, ones (2)) 288s ***** error ... 288s wblrnd (1, 2, [2 -1 2]) 288s ***** error ... 288s wblrnd (1, 2, [2 0 2.5]) 288s ***** error ... 288s wblrnd (1, 2, 2, -1, 5) 288s ***** error ... 288s wblrnd (1, 2, 2, 1.5, 5) 288s ***** error ... 288s wblrnd (2, ones (2), 3) 288s ***** error ... 288s wblrnd (2, ones (2), [3, 2]) 288s ***** error ... 288s wblrnd (2, ones (2), 3, 2) 288s 33 tests, 33 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/poisscdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/poisscdf.m 288s ***** demo 288s ## Plot various CDFs from the Poisson distribution 288s x = 0:20; 288s p1 = poisscdf (x, 1); 288s p2 = poisscdf (x, 4); 288s p3 = poisscdf (x, 10); 288s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 288s grid on 288s ylim ([0, 1]) 288s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 288s title ("Poisson CDF") 288s xlabel ("values in x (number of occurences)") 288s ylabel ("probability") 288s ***** shared x, y 288s x = [-1 0 1 2 Inf]; 288s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 288s ***** assert (poisscdf (x, ones (1,5)), y) 288s ***** assert (poisscdf (x, 1), y) 288s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 288s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 288s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 288s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 288s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 288s ***** error poisscdf () 288s ***** error poisscdf (1) 288s ***** error poisscdf (1, 2, 3) 288s ***** error poisscdf (1, 2, "tail") 288s ***** error ... 288s poisscdf (ones (3), ones (2)) 288s ***** error ... 288s poisscdf (ones (2), ones (3)) 288s ***** error poisscdf (i, 2) 288s ***** error poisscdf (2, i) 288s 15 tests, 15 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/jsupdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/jsupdf.m 288s ***** error jsupdf () 288s ***** error jsupdf (1, 2, 3, 4) 288s ***** error ... 288s jsupdf (1, ones (2), ones (3)) 288s 3 tests, 3 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/laplaceinv.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/laplaceinv.m 288s ***** demo 288s ## Plot various iCDFs from the Laplace distribution 288s p = 0.001:0.001:0.999; 288s x1 = cauchyinv (p, 0, 1); 288s x2 = cauchyinv (p, 0, 2); 288s x3 = cauchyinv (p, 0, 4); 288s x4 = cauchyinv (p, -5, 4); 288s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 288s grid on 288s ylim ([-10, 10]) 288s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 288s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 288s title ("Laplace iCDF") 288s xlabel ("probability") 288s ylabel ("values in x") 288s ***** shared p, x 288s p = [-1 0 0.5 1 2]; 288s x = [NaN, -Inf, 0, Inf, NaN]; 288s ***** assert (laplaceinv (p, 0, 1), x) 288s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 288s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 288s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 288s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 288s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 288s ***** error laplaceinv () 288s ***** error laplaceinv (1) 288s ***** error ... 288s laplaceinv (1, 2) 288s ***** error laplaceinv (1, 2, 3, 4) 288s ***** error ... 288s laplaceinv (1, ones (2), ones (3)) 288s ***** error ... 288s laplaceinv (ones (2), 1, ones (3)) 288s ***** error ... 288s laplaceinv (ones (2), ones (3), 1) 288s ***** error laplaceinv (i, 2, 3) 288s ***** error laplaceinv (1, i, 3) 288s ***** error laplaceinv (1, 2, i) 288s 16 tests, 16 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/nbincdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nbincdf.m 288s ***** demo 288s ## Plot various CDFs from the negative binomial distribution 288s x = 0:50; 288s p1 = nbincdf (x, 2, 0.15); 288s p2 = nbincdf (x, 5, 0.2); 288s p3 = nbincdf (x, 4, 0.4); 288s p4 = nbincdf (x, 10, 0.3); 288s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 288s grid on 288s xlim ([0, 40]) 288s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 288s "r = 10, ps = 0.3"}, "location", "southeast") 288s title ("Negative binomial CDF") 288s xlabel ("values in x (number of failures)") 288s ylabel ("probability") 288s ***** shared x, y 288s x = [-1 0 1 2 Inf]; 288s y = [0 1/2 3/4 7/8 1]; 288s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 288s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 288s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 288s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 288s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 288s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 288s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 288s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 288s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 288s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 288s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 288s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 288s ***** error nbincdf () 288s ***** error nbincdf (1) 288s ***** error nbincdf (1, 2) 288s ***** error nbincdf (1, 2, 3, 4) 288s ***** error nbincdf (1, 2, 3, "some") 288s ***** error ... 288s nbincdf (ones (3), ones (2), ones (2)) 288s ***** error ... 288s nbincdf (ones (2), ones (3), ones (2)) 288s ***** error ... 288s nbincdf (ones (2), ones (2), ones (3)) 288s ***** error nbincdf (i, 2, 2) 288s ***** error nbincdf (2, i, 2) 288s ***** error nbincdf (2, 2, i) 288s 22 tests, 22 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/ncfrnd.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncfrnd.m 288s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 288s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 288s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 288s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 288s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 288s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 288s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 288s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 288s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 288s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 288s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 288s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 288s ***** assert (class (ncfrnd (1, 1, 1)), "double") 288s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 288s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 288s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 288s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 288s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 288s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 288s ***** error ncfrnd () 288s ***** error ncfrnd (1) 288s ***** error ncfrnd (1, 2) 288s ***** error ... 288s ncfrnd (ones (3), ones (2), ones (2)) 288s ***** error ... 288s ncfrnd (ones (2), ones (3), ones (2)) 288s ***** error ... 288s ncfrnd (ones (2), ones (2), ones (3)) 288s ***** error ncfrnd (i, 2, 3) 288s ***** error ncfrnd (1, i, 3) 288s ***** error ncfrnd (1, 2, i) 288s ***** error ... 288s ncfrnd (1, 2, 3, -1) 288s ***** error ... 288s ncfrnd (1, 2, 3, 1.2) 288s ***** error ... 288s ncfrnd (1, 2, 3, ones (2)) 288s ***** error ... 288s ncfrnd (1, 2, 3, [2 -1 2]) 288s ***** error ... 288s ncfrnd (1, 2, 3, [2 0 2.5]) 288s ***** error ... 288s ncfrnd (1, 2, 3, 2, -1, 5) 288s ***** error ... 288s ncfrnd (1, 2, 3, 2, 1.5, 5) 288s ***** error ... 288s ncfrnd (2, ones (2), 2, 3) 288s ***** error ... 288s ncfrnd (2, ones (2), 2, [3, 2]) 288s ***** error ... 288s ncfrnd (2, ones (2), 2, 3, 2) 288s 38 tests, 38 passed, 0 known failure, 0 skipped 288s [inst/dist_fun/bvncdf.m] 288s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bvncdf.m 288s ***** demo 288s mu = [1, -1]; 288s sigma = [0.9, 0.4; 0.4, 0.3]; 288s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 288s x = [X1(:), X2(:)]; 288s p = bvncdf (x, mu, sigma); 288s Z = reshape (p, 25, 25); 288s surf (X1, X2, Z); 288s title ("Bivariate Normal Distribution"); 288s ylabel "X1" 288s xlabel "X2" 288s ***** test 288s mu = [1, -1]; 288s sigma = [0.9, 0.4; 0.4, 0.3]; 288s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 288s x = [X1(:), X2(:)]; 288s p = bvncdf (x, mu, sigma); 288s p_out = [0.00011878988774500, 0.00034404112322371, ... 288s 0.00087682502191813, 0.00195221905058185, ... 288s 0.00378235566873474, 0.00638175749734415, ... 288s 0.00943764224329656, 0.01239164888125426, ... 288s 0.01472750274376648, 0.01623228313374828]'; 288s assert (p([1:10]), p_out, 1e-16); 288s ***** test 288s mu = [1, -1]; 288s sigma = [0.9, 0.4; 0.4, 0.3]; 288s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 288s x = [X1(:), X2(:)]; 288s p = bvncdf (x, mu, sigma); 288s p_out = [0.8180695783608276, 0.8854485749482751, ... 288s 0.9308108777385832, 0.9579855743025508, ... 288s 0.9722897881414742, 0.9788150170059926, ... 288s 0.9813597788804785, 0.9821977956568989, ... 288s 0.9824283794464095, 0.9824809345614861]'; 288s assert (p([616:625]), p_out, 3e-16); 288s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 288s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 288s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 289s 5 tests, 5 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/gpinv.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gpinv.m 289s ***** demo 289s ## Plot various iCDFs from the generalized Pareto distribution 289s p = 0.001:0.001:0.999; 289s x1 = gpinv (p, 1, 1, 0); 289s x2 = gpinv (p, 5, 1, 0); 289s x3 = gpinv (p, 20, 1, 0); 289s x4 = gpinv (p, 1, 2, 0); 289s x5 = gpinv (p, 5, 2, 0); 289s x6 = gpinv (p, 20, 2, 0); 289s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 289s p, x4, "-c", p, x5, "-m", p, x6, "-k") 289s grid on 289s ylim ([0, 5]) 289s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 289s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 289s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 289s "location", "southeast") 289s title ("Generalized Pareto iCDF") 289s xlabel ("probability") 289s ylabel ("values in x") 289s ***** shared p, y1, y2, y3 289s p = [-1, 0, 1/2, 1, 2]; 289s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 289s y2 = [NaN, 0, 1, Inf, NaN]; 289s y3 = [NaN, 0, 1/2, 1, NaN]; 289s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 289s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 289s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 289s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 289s ***** assert (gpinv (p, 0, 1, 0), y1) 289s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 289s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 289s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 289s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 289s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 289s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 289s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 289s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 289s ***** assert (gpinv (p, 1, 1, 0), y2) 289s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 289s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 289s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 289s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 289s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 289s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 289s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 289s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 289s ***** assert (gpinv (p, -1, 1, 0), y3) 289s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 289s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 289s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 289s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 289s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 289s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 289s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 289s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 289s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 289s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 289s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 289s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 289s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 289s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 289s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 289s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 289s ***** error gpinv () 289s ***** error gpinv (1) 289s ***** error gpinv (1, 2) 289s ***** error gpinv (1, 2, 3) 289s ***** error ... 289s gpinv (ones (3), ones (2), ones(2), ones(2)) 289s ***** error ... 289s gpinv (ones (2), ones (3), ones(2), ones(2)) 289s ***** error ... 289s gpinv (ones (2), ones (2), ones(3), ones(2)) 289s ***** error ... 289s gpinv (ones (2), ones (2), ones(2), ones(3)) 289s ***** error gpinv (i, 2, 3, 4) 289s ***** error gpinv (1, i, 3, 4) 289s ***** error gpinv (1, 2, i, 4) 289s ***** error gpinv (1, 2, 3, i) 289s 51 tests, 51 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/logirnd.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logirnd.m 289s ***** assert (size (logirnd (1, 1)), [1 1]) 289s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 289s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 289s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 289s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 289s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 289s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 289s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 289s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 289s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 289s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 289s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 289s ***** assert (class (logirnd (1, 1)), "double") 289s ***** assert (class (logirnd (1, single (1))), "single") 289s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 289s ***** assert (class (logirnd (single (1), 1)), "single") 289s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 289s ***** error logirnd () 289s ***** error logirnd (1) 289s ***** error ... 289s logirnd (ones (3), ones (2)) 289s ***** error ... 289s logirnd (ones (2), ones (3)) 289s ***** error logirnd (i, 2, 3) 289s ***** error logirnd (1, i, 3) 289s ***** error ... 289s logirnd (1, 2, -1) 289s ***** error ... 289s logirnd (1, 2, 1.2) 289s ***** error ... 289s logirnd (1, 2, ones (2)) 289s ***** error ... 289s logirnd (1, 2, [2 -1 2]) 289s ***** error ... 289s logirnd (1, 2, [2 0 2.5]) 289s ***** error ... 289s logirnd (1, 2, 2, -1, 5) 289s ***** error ... 289s logirnd (1, 2, 2, 1.5, 5) 289s ***** error ... 289s logirnd (2, ones (2), 3) 289s ***** error ... 289s logirnd (2, ones (2), [3, 2]) 289s ***** error ... 289s logirnd (2, ones (2), 3, 2) 289s 33 tests, 33 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/tlsinv.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tlsinv.m 289s ***** demo 289s ## Plot various iCDFs from the location-scale Student's T distribution 289s p = 0.001:0.001:0.999; 289s x1 = tlsinv (p, 0, 1, 1); 289s x2 = tlsinv (p, 0, 2, 2); 289s x3 = tlsinv (p, 3, 2, 5); 289s x4 = tlsinv (p, -1, 3, Inf); 289s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 289s grid on 289s xlim ([0, 1]) 289s ylim ([-8, 8]) 289s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 289s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 289s "location", "southeast") 289s title ("Location-scale Student's T iCDF") 289s xlabel ("probability") 289s ylabel ("values in x") 289s ***** shared p 289s p = [-1 0 0.5 1 2]; 289s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 289s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 289s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 289s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 289s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 289s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 289s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 289s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 289s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 289s ***** error tlsinv () 289s ***** error tlsinv (1) 289s ***** error tlsinv (1, 2) 289s ***** error tlsinv (1, 2, 3) 289s ***** error ... 289s tlsinv (ones (3), ones (2), 1, 1) 289s ***** error ... 289s tlsinv (ones (2), 1, ones (3), 1) 289s ***** error ... 289s tlsinv (ones (2), 1, 1, ones (3)) 289s ***** error tlsinv (i, 2, 3, 4) 289s ***** error tlsinv (2, i, 3, 4) 289s ***** error tlsinv (2, 2, i, 4) 289s ***** error tlsinv (2, 2, 3, i) 289s 20 tests, 20 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/gprnd.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gprnd.m 289s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 289s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 289s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 289s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 289s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 289s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 289s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 289s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 289s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 289s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 289s ***** assert (size (gprnd (1,1,0)), [1, 1]) 289s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 289s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 289s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 289s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 289s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 289s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 289s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 289s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 289s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 289s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 289s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 289s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 289s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 289s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 289s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 289s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 289s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 289s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 289s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 289s ***** assert (class (gprnd (0, 1, 0)), "double") 289s ***** assert (class (gprnd (0, 1, single (0))), "single") 289s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 289s ***** assert (class (gprnd (0, single (1),0)), "single") 289s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 289s ***** assert (class (gprnd (single (0), 1, 0)), "single") 289s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 289s ***** error gprnd () 289s ***** error gprnd (1) 289s ***** error gprnd (1, 2) 289s ***** error ... 289s gprnd (ones (3), ones (2), ones (2)) 289s ***** error ... 289s gprnd (ones (2), ones (3), ones (2)) 289s ***** error ... 289s gprnd (ones (2), ones (2), ones (3)) 289s ***** error gprnd (i, 2, 3) 289s ***** error gprnd (1, i, 3) 289s ***** error gprnd (1, 2, i) 289s ***** error ... 289s gprnd (1, 2, 3, -1) 289s ***** error ... 289s gprnd (1, 2, 3, 1.2) 289s ***** error ... 289s gprnd (1, 2, 3, ones (2)) 289s ***** error ... 289s gprnd (1, 2, 3, [2 -1 2]) 289s ***** error ... 289s gprnd (1, 2, 3, [2 0 2.5]) 289s ***** error ... 289s gprnd (1, 2, 3, 2, -1, 5) 289s ***** error ... 289s gprnd (1, 2, 3, 2, 1.5, 5) 289s ***** error ... 289s gprnd (2, ones (2), 2, 3) 289s ***** error ... 289s gprnd (2, ones (2), 2, [3, 2]) 289s ***** error ... 289s gprnd (2, ones (2), 2, 3, 2) 289s 56 tests, 56 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/wblpdf.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wblpdf.m 289s ***** demo 289s ## Plot various PDFs from the Weibul distribution 289s x = 0:0.001:2.5; 289s y1 = wblpdf (x, 1, 0.5); 289s y2 = wblpdf (x, 1, 1); 289s y3 = wblpdf (x, 1, 1.5); 289s y4 = wblpdf (x, 1, 5); 289s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 289s grid on 289s ylim ([0, 2.5]) 289s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 289s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 289s title ("Weibul PDF") 289s xlabel ("values in x") 289s ylabel ("density") 289s ***** shared x,y 289s x = [-1 0 0.5 1 Inf]; 289s y = [0, exp(-x(2:4)), NaN]; 289s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 289s ***** assert (wblpdf (x, 1, ones (1,5)), y) 289s ***** assert (wblpdf (x, ones (1,5), 1), y) 289s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 289s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 289s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 289s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 289s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 289s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 289s ***** error wblpdf () 289s ***** error wblpdf (1,2,3,4) 289s ***** error wblpdf (ones (3), ones (2), ones (2)) 289s ***** error wblpdf (ones (2), ones (3), ones (2)) 289s ***** error wblpdf (ones (2), ones (2), ones (3)) 289s ***** error wblpdf (i, 2, 2) 289s ***** error wblpdf (2, i, 2) 289s ***** error wblpdf (2, 2, i) 289s 17 tests, 17 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/hygernd.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hygernd.m 289s ***** assert (size (hygernd (4,2,2)), [1, 1]) 289s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 289s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 289s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 289s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 289s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 289s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 289s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 289s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 289s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 289s ***** assert (class (hygernd (4,2,2)), "double") 289s ***** assert (class (hygernd (single (4),2,2)), "single") 289s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 289s ***** assert (class (hygernd (4,single (2),2)), "single") 289s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 289s ***** assert (class (hygernd (4,2,single (2))), "single") 289s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 289s ***** error hygernd () 289s ***** error hygernd (1) 289s ***** error hygernd (1, 2) 289s ***** error ... 289s hygernd (ones (3), ones (2), ones (2)) 289s ***** error ... 289s hygernd (ones (2), ones (3), ones (2)) 289s ***** error ... 289s hygernd (ones (2), ones (2), ones (3)) 289s ***** error hygernd (i, 2, 3) 289s ***** error hygernd (1, i, 3) 289s ***** error hygernd (1, 2, i) 289s ***** error ... 289s hygernd (1, 2, 3, -1) 289s ***** error ... 289s hygernd (1, 2, 3, 1.2) 289s ***** error ... 289s hygernd (1, 2, 3, ones (2)) 289s ***** error ... 289s hygernd (1, 2, 3, [2 -1 2]) 289s ***** error ... 289s hygernd (1, 2, 3, [2 0 2.5]) 289s ***** error ... 289s hygernd (1, 2, 3, 2, -1, 5) 289s ***** error ... 289s hygernd (1, 2, 3, 2, 1.5, 5) 289s ***** error ... 289s hygernd (2, ones (2), 2, 3) 289s ***** error ... 289s hygernd (2, ones (2), 2, [3, 2]) 289s ***** error ... 289s hygernd (2, ones (2), 2, 3, 2) 289s 36 tests, 36 passed, 0 known failure, 0 skipped 289s [inst/dist_fun/ncx2inv.m] 289s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncx2inv.m 289s ***** demo 289s ## Plot various iCDFs from the noncentral chi-squared distribution 289s p = 0.001:0.001:0.999; 289s x1 = ncx2inv (p, 2, 1); 289s x2 = ncx2inv (p, 2, 2); 289s x3 = ncx2inv (p, 2, 3); 289s x4 = ncx2inv (p, 4, 1); 289s x5 = ncx2inv (p, 4, 2); 289s x6 = ncx2inv (p, 4, 3); 289s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 289s p, x4, "-m", p, x5, "-c", p, x6, "-y") 289s grid on 289s ylim ([0, 10]) 289s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 289s "df = 2, λ = 3", "df = 4, λ = 1", ... 289s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 289s title ("Noncentral chi-squared iCDF") 289s xlabel ("probability") 289s ylabel ("values in x") 289s ***** demo 289s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 289s ## chi-squared CDF with the same number of degrees of freedom (4). 289s 289s p = 0.001:0.001:0.999; 289s x1 = ncx2inv (p, 4, 2); 289s x2 = chi2inv (p, 4); 289s plot (p, x1, "-", p, x2, "-"); 289s grid on 289s ylim ([0, 10]) 289s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 289s title ("Noncentral chi-squared vs chi-squared quantile functions") 289s xlabel ("probability") 289s ylabel ("values in x") 289s ***** test 289s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 289s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 289s ***** test 289s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 289s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 289s ***** test 289s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 289s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 289s ***** test 289s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 289s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 289s ***** test 289s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 289s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 289s ***** test 289s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 289s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 289s ***** test 289s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 290s ***** error ncx2inv () 290s ***** error ncx2inv (1) 290s ***** error ncx2inv (1, 2) 290s ***** error ... 290s ncx2inv (ones (3), ones (2), ones (2)) 290s ***** error ... 290s ncx2inv (ones (2), ones (3), ones (2)) 290s ***** error ... 290s ncx2inv (ones (2), ones (2), ones (3)) 290s ***** error ncx2inv (i, 2, 2) 290s ***** error ncx2inv (2, i, 2) 290s ***** error ncx2inv (2, 2, i) 290s 16 tests, 16 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/tlspdf.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tlspdf.m 290s ***** demo 290s ## Plot various PDFs from the Student's T distribution 290s x = -8:0.01:8; 290s y1 = tlspdf (x, 0, 1, 1); 290s y2 = tlspdf (x, 0, 2, 2); 290s y3 = tlspdf (x, 3, 2, 5); 290s y4 = tlspdf (x, -1, 3, Inf); 290s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 290s grid on 290s xlim ([-8, 8]) 290s ylim ([0, 0.41]) 290s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 290s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 290s "location", "northwest") 290s title ("Location-scale Student's T PDF") 290s xlabel ("values in x") 290s ylabel ("density") 290s ***** test 290s x = rand (10,1); 290s y = 1./(pi * (1 + x.^2)); 290s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 290s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 290s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 290s ***** shared x, y 290s x = [-Inf 0 0.5 1 Inf]; 290s y = 1./(pi * (1 + x.^2)); 290s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 290s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 290s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 290s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 290s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 290s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 290s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 290s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 290s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 290s ***** error tlspdf () 290s ***** error tlspdf (1) 290s ***** error tlspdf (1, 2) 290s ***** error tlspdf (1, 2, 3) 290s ***** error ... 290s tlspdf (ones (3), ones (2), 1, 1) 290s ***** error ... 290s tlspdf (ones (2), 1, ones (3), 1) 290s ***** error ... 290s tlspdf (ones (2), 1, 1, ones (3)) 290s ***** error tlspdf (i, 2, 1, 1) 290s ***** error tlspdf (2, i, 1, 1) 290s ***** error tlspdf (2, 1, i, 1) 290s ***** error tlspdf (2, 1, 1, i) 290s 21 tests, 21 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/mnpdf.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mnpdf.m 290s ***** test 290s x = [1, 4, 2]; 290s pk = [0.2, 0.5, 0.3]; 290s y = mnpdf (x, pk); 290s assert (y, 0.11812, 0.001); 290s ***** test 290s x = [1, 4, 2; 1, 0, 9]; 290s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 290s y = mnpdf (x, pk); 290s assert (y, [0.11812; 0.13422], 0.001); 290s 2 tests, 2 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/wishrnd.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wishrnd.m 290s ***** assert(size (wishrnd (1,2)), [1, 1]); 290s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 290s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 290s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 290s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 290s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 290s ***** error wishrnd () 290s ***** error wishrnd (1) 290s ***** error wishrnd ([1; 1], 2) 290s 9 tests, 9 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/hninv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hninv.m 290s ***** demo 290s ## Plot various iCDFs from the half-normal distribution 290s p = 0.001:0.001:0.999; 290s x1 = hninv (p, 0, 1); 290s x2 = hninv (p, 0, 2); 290s x3 = hninv (p, 0, 3); 290s x4 = hninv (p, 0, 5); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 290s grid on 290s ylim ([0, 10]) 290s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 290s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 290s title ("Half-normal iCDF") 290s xlabel ("probability") 290s ylabel ("x") 290s ***** shared p, x 290s p = [0, 0.3829, 0.6827, 1]; 290s x = [0, 1/2, 1, Inf]; 290s ***** assert (hninv (p, 0, 1), x, 1e-4); 290s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 290s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 290s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 290s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 290s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 290s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 290s ***** error hninv (1) 290s ***** error hninv (1, 2) 290s ***** error ... 290s hninv (1, ones (2), ones (3)) 290s ***** error ... 290s hninv (ones (2), 1, ones (3)) 290s ***** error ... 290s hninv (ones (2), ones (3), 1) 290s ***** error hninv (i, 2, 3) 290s ***** error hninv (1, i, 3) 290s ***** error hninv (1, 2, i) 290s 15 tests, 15 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/tinv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tinv.m 290s ***** demo 290s ## Plot various iCDFs from the Student's T distribution 290s p = 0.001:0.001:0.999; 290s x1 = tinv (p, 1); 290s x2 = tinv (p, 2); 290s x3 = tinv (p, 5); 290s x4 = tinv (p, Inf); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 290s grid on 290s xlim ([0, 1]) 290s ylim ([-5, 5]) 290s legend ({"df = 1", "df = 2", ... 290s "df = 5", 'df = \infty'}, "location", "northwest") 290s title ("Student's T iCDF") 290s xlabel ("probability") 290s ylabel ("values in x") 290s ***** shared p 290s p = [-1 0 0.5 1 2]; 290s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 290s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 290s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 290s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 290s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 290s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 290s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 290s ***** error tinv () 290s ***** error tinv (1) 290s ***** error ... 290s tinv (ones (3), ones (2)) 290s ***** error ... 290s tinv (ones (2), ones (3)) 290s ***** error tinv (i, 2) 290s ***** error tinv (2, i) 290s 13 tests, 13 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/tripdf.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tripdf.m 290s ***** demo 290s ## Plot various CDFs from the triangular distribution 290s x = 0.001:0.001:10; 290s y1 = tripdf (x, 3, 4, 6); 290s y2 = tripdf (x, 1, 2, 5); 290s y3 = tripdf (x, 2, 3, 9); 290s y4 = tripdf (x, 2, 5, 9); 290s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 290s grid on 290s xlim ([0, 10]) 290s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 290s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 290s "location", "northeast") 290s title ("Triangular CDF") 290s xlabel ("values in x") 290s ylabel ("probability") 290s ***** shared x, y, deps 290s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 290s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 290s deps = 2*eps; 290s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 290s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 290s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 290s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 290s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 290s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 290s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 290s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 290s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 290s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 290s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 290s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 290s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 290s ***** error tripdf () 290s ***** error tripdf (1) 290s ***** error tripdf (1, 2) 290s ***** error tripdf (1, 2, 3) 290s ***** error ... 290s tripdf (1, 2, 3, 4, 5) 290s ***** error ... 290s tripdf (ones (3), ones (2), ones(2), ones(2)) 290s ***** error ... 290s tripdf (ones (2), ones (3), ones(2), ones(2)) 290s ***** error ... 290s tripdf (ones (2), ones (2), ones(3), ones(2)) 290s ***** error ... 290s tripdf (ones (2), ones (2), ones(2), ones(3)) 290s ***** error tripdf (i, 2, 3, 4) 290s ***** error tripdf (1, i, 3, 4) 290s ***** error tripdf (1, 2, i, 4) 290s ***** error tripdf (1, 2, 3, i) 290s 26 tests, 26 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/poissinv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/poissinv.m 290s ***** demo 290s ## Plot various iCDFs from the Poisson distribution 290s p = 0.001:0.001:0.999; 290s x1 = poissinv (p, 13); 290s x2 = poissinv (p, 4); 290s x3 = poissinv (p, 10); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 290s grid on 290s ylim ([0, 20]) 290s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 290s title ("Poisson iCDF") 290s xlabel ("probability") 290s ylabel ("values in x (number of occurences)") 290s ***** shared p 290s p = [-1 0 0.5 1 2]; 290s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 290s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 290s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 290s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 290s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 290s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 290s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 290s ***** error poissinv () 290s ***** error poissinv (1) 290s ***** error ... 290s poissinv (ones (3), ones (2)) 290s ***** error ... 290s poissinv (ones (2), ones (3)) 290s ***** error poissinv (i, 2) 290s ***** error poissinv (2, i) 290s 13 tests, 13 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/wblcdf.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wblcdf.m 290s ***** demo 290s ## Plot various CDFs from the Weibull distribution 290s x = 0:0.001:2.5; 290s p1 = wblcdf (x, 1, 0.5); 290s p2 = wblcdf (x, 1, 1); 290s p3 = wblcdf (x, 1, 1.5); 290s p4 = wblcdf (x, 1, 5); 290s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 290s grid on 290s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 290s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 290s title ("Weibull CDF") 290s xlabel ("values in x") 290s ylabel ("probability") 290s ***** shared x, y 290s x = [-1 0 0.5 1 Inf]; 290s y = [0, 1-exp(-x(2:4)), 1]; 290s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 290s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 290s ***** assert (wblcdf (x, "upper"), 1 - y) 290s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 290s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 290s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 290s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 290s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 290s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 290s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 290s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 290s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 290s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 290s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 290s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 290s ***** error wblcdf () 290s ***** error wblcdf (1,2,3,4,5,6,7) 290s ***** error wblcdf (1, 2, 3, 4, "uper") 290s ***** error ... 290s wblcdf (ones (3), ones (2), ones (2)) 290s ***** error wblcdf (2, 3, 4, [1, 2]) 290s ***** error ... 290s [p, plo, pup] = wblcdf (1, 2, 3) 290s ***** error [p, plo, pup] = ... 290s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 290s ***** error [p, plo, pup] = ... 290s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 290s ***** error [p, plo, pup] = ... 290s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 290s ***** error wblcdf (i, 2, 2) 290s ***** error wblcdf (2, i, 2) 290s ***** error wblcdf (2, 2, i) 290s ***** error ... 290s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 290s 28 tests, 28 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/mnrnd.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mnrnd.m 290s ***** test 290s n = 10; 290s pk = [0.2, 0.5, 0.3]; 290s r = mnrnd (n, pk); 290s assert (size (r), size (pk)); 290s assert (all (r >= 0)); 290s assert (all (round (r) == r)); 290s assert (sum (r) == n); 290s ***** test 290s n = 10 * ones (3, 1); 290s pk = [0.2, 0.5, 0.3]; 290s r = mnrnd (n, pk); 290s assert (size (r), [length(n), length(pk)]); 290s assert (all (r >= 0)); 290s assert (all (round (r) == r)); 290s assert (all (sum (r, 2) == n)); 290s ***** test 290s n = (1:2)'; 290s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 290s r = mnrnd (n, pk); 290s assert (size (r), size (pk)); 290s assert (all (r >= 0)); 290s assert (all (round (r) == r)); 290s assert (all (sum (r, 2) == n)); 290s 3 tests, 3 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/gumbelcdf.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gumbelcdf.m 290s ***** demo 290s ## Plot various CDFs from the Gumbel distribution 290s x = -5:0.01:20; 290s p1 = gumbelcdf (x, 0.5, 2); 290s p2 = gumbelcdf (x, 1.0, 2); 290s p3 = gumbelcdf (x, 1.5, 3); 290s p4 = gumbelcdf (x, 3.0, 4); 290s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 290s grid on 290s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 290s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 290s title ("Gumbel CDF") 290s xlabel ("values in x") 290s ylabel ("probability") 290s ***** shared x, y 290s x = [-Inf, 1, 2, Inf]; 290s y = [0, 0.3679, 0.6922, 1]; 290s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 290s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 290s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 290s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 290s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 290s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 290s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 290s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 290s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 290s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 290s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 290s ***** error gumbelcdf () 290s ***** error gumbelcdf (1,2,3,4,5,6,7) 290s ***** error gumbelcdf (1, 2, 3, 4, "uper") 290s ***** error ... 290s gumbelcdf (ones (3), ones (2), ones (2)) 290s ***** error gumbelcdf (2, 3, 4, [1, 2]) 290s ***** error ... 290s [p, plo, pup] = gumbelcdf (1, 2, 3) 290s ***** error [p, plo, pup] = ... 290s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 290s ***** error [p, plo, pup] = ... 290s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 290s ***** error [p, plo, pup] = ... 290s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 290s ***** error gumbelcdf (i, 2, 2) 290s ***** error gumbelcdf (2, i, 2) 290s ***** error gumbelcdf (2, 2, i) 290s ***** error ... 290s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 290s 24 tests, 24 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/loglinv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/loglinv.m 290s ***** demo 290s ## Plot various iCDFs from the log-logistic distribution 290s p = 0.001:0.001:0.999; 290s x1 = loglinv (p, log (1), 1/0.5); 290s x2 = loglinv (p, log (1), 1); 290s x3 = loglinv (p, log (1), 1/2); 290s x4 = loglinv (p, log (1), 1/4); 290s x5 = loglinv (p, log (1), 1/8); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 290s ylim ([0, 20]) 290s grid on 290s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 290s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 290s title ("Log-logistic iCDF") 290s xlabel ("probability") 290s ylabel ("x") 290s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 290s ***** shared p, out1, out2 290s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 290s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 290s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 290s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 290s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 290s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 290s ***** assert (class (loglinv (single (1), 2, 3)), "single") 290s ***** assert (class (loglinv (1, single (2), 3)), "single") 290s ***** assert (class (loglinv (1, 2, single (3))), "single") 290s ***** error loglinv (1) 290s ***** error loglinv (1, 2) 290s ***** error ... 290s loglinv (1, ones (2), ones (3)) 290s ***** error ... 290s loglinv (ones (2), 1, ones (3)) 290s ***** error ... 290s loglinv (ones (2), ones (3), 1) 290s ***** error loglinv (i, 2, 3) 290s ***** error loglinv (1, i, 3) 290s ***** error loglinv (1, 2, i) 290s 14 tests, 14 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/bisainv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bisainv.m 290s ***** demo 290s ## Plot various iCDFs from the Birnbaum-Saunders distribution 290s p = 0.001:0.001:0.999; 290s x1 = bisainv (p, 1, 0.5); 290s x2 = bisainv (p, 1, 1); 290s x3 = bisainv (p, 1, 2); 290s x4 = bisainv (p, 1, 5); 290s x5 = bisainv (p, 1, 10); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 290s grid on 290s ylim ([0, 10]) 290s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 290s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 290s title ("Birnbaum-Saunders iCDF") 290s xlabel ("probability") 290s ylabel ("values in x") 290s ***** demo 290s ## Plot various iCDFs from the Birnbaum-Saunders distribution 290s p = 0.001:0.001:0.999; 290s x1 = bisainv (p, 1, 0.3); 290s x2 = bisainv (p, 2, 0.3); 290s x3 = bisainv (p, 1, 0.5); 290s x4 = bisainv (p, 3, 0.5); 290s x5 = bisainv (p, 5, 0.5); 290s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 290s grid on 290s ylim ([0, 10]) 290s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 290s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 290s title ("Birnbaum-Saunders iCDF") 290s xlabel ("probability") 290s ylabel ("values in x") 290s ***** shared p, y, f 290s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 290s p = [-1, 0, 1/4, 1/2, 1, 2]; 290s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 290s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 290s ***** assert (bisainv (p, 1, ones (1,6)), y) 290s ***** assert (bisainv (p, ones (1,6), 1), y) 290s ***** assert (bisainv (p, 1, 1), y) 290s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 290s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 290s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 290s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 290s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 290s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 290s ***** error bisainv () 290s ***** error bisainv (1) 290s ***** error bisainv (1, 2) 290s ***** error bisainv (1, 2, 3, 4) 290s ***** error ... 290s bisainv (ones (3), ones (2), ones(2)) 290s ***** error ... 290s bisainv (ones (2), ones (3), ones(2)) 290s ***** error ... 290s bisainv (ones (2), ones (2), ones(3)) 290s ***** error bisainv (i, 4, 3) 290s ***** error bisainv (1, i, 3) 290s ***** error bisainv (1, 4, i) 290s 20 tests, 20 passed, 0 known failure, 0 skipped 290s [inst/dist_fun/vminv.m] 290s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/vminv.m 290s ***** demo 290s ## Plot various iCDFs from the von Mises distribution 290s 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]; 290s x1 = vminv (p1, 0, 0.5); 290s x2 = vminv (p1, 0, 1); 290s x3 = vminv (p1, 0, 2); 290s x4 = vminv (p1, 0, 4); 290s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 290s grid on 290s ylim ([-pi, pi]) 290s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 290s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 290s title ("Von Mises iCDF") 290s xlabel ("probability") 290s ylabel ("values in x") 290s ***** shared x, p0, p1 290s x = [-pi:pi/2:pi]; 290s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 290s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 290s ***** assert (vminv (p0, 0, 1), x, 5e-5) 291s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 291s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 291s ***** error vminv () 291s ***** error vminv (1) 291s ***** error vminv (1, 2) 291s ***** error ... 291s vminv (ones (3), ones (2), ones (2)) 291s ***** error ... 291s vminv (ones (2), ones (3), ones (2)) 291s ***** error ... 291s vminv (ones (2), ones (2), ones (3)) 291s ***** error vminv (i, 2, 2) 291s ***** error vminv (2, i, 2) 291s ***** error vminv (2, 2, i) 291s 12 tests, 12 passed, 0 known failure, 0 skipped 291s [inst/dist_fun/finv.m] 291s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/finv.m 291s ***** demo 291s ## Plot various iCDFs from the F distribution 291s p = 0.001:0.001:0.999; 291s x1 = finv (p, 1, 1); 291s x2 = finv (p, 2, 1); 291s x3 = finv (p, 5, 2); 291s x4 = finv (p, 10, 1); 291s x5 = finv (p, 100, 100); 291s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 291s grid on 291s ylim ([0, 4]) 291s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 291s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 291s "df1 = 100, df2 = 100"}, "location", "northwest") 291s title ("F iCDF") 291s xlabel ("probability") 291s ylabel ("values in x") 291s ***** shared p 291s p = [-1 0 0.5 1 2]; 291s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 291s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 291s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 291s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 291s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 291s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 291s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 291s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 291s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 291s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 291s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 291s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 291s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 291s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 291s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 291s ***** error finv () 291s ***** error finv (1) 291s ***** error finv (1,2) 291s ***** error ... 291s finv (ones (3), ones (2), ones (2)) 291s ***** error ... 291s finv (ones (2), ones (3), ones (2)) 291s ***** error ... 291s finv (ones (2), ones (2), ones (3)) 291s ***** error finv (i, 2, 2) 291s ***** error finv (2, i, 2) 291s ***** error finv (2, 2, i) 291s 24 tests, 24 passed, 0 known failure, 0 skipped 291s [inst/dist_fun/chi2cdf.m] 291s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/chi2cdf.m 291s ***** demo 291s ## Plot various CDFs from the chi-squared distribution 291s x = 0:0.01:8; 291s p1 = chi2cdf (x, 1); 291s p2 = chi2cdf (x, 2); 291s p3 = chi2cdf (x, 3); 291s p4 = chi2cdf (x, 4); 291s p5 = chi2cdf (x, 6); 291s p6 = chi2cdf (x, 9); 291s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 291s x, p4, "-c", x, p5, "-m", x, p6, "-y") 291s grid on 291s xlim ([0, 8]) 291s legend ({"df = 1", "df = 2", "df = 3", ... 291s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 291s title ("Chi-squared CDF") 291s xlabel ("values in x") 291s ylabel ("probability") 291s ***** shared x, p, u 291s x = [-1, 0, 0.5, 1, 2]; 291s p = [0, (1 - exp (-x(2:end) / 2))]; 291s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 291s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 291s ***** assert (chi2cdf (x, 2), p, eps) 291s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 291s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 291s [p(1), 1, NaN, u(4:5)], eps) 291s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 291s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 291s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 291s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 291s ***** error chi2cdf () 291s ***** error chi2cdf (1) 291s ***** error chi2cdf (1, 2, 3, 4) 291s ***** error chi2cdf (1, 2, 3) 291s ***** error chi2cdf (1, 2, "uper") 291s ***** error ... 291s chi2cdf (ones (3), ones (2)) 291s ***** error ... 291s chi2cdf (ones (2), ones (3)) 291s ***** error chi2cdf (i, 2) 291s ***** error chi2cdf (2, i) 291s 17 tests, 17 passed, 0 known failure, 0 skipped 291s [inst/dist_fun/exprnd.m] 291s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/exprnd.m 291s ***** assert (size (exprnd (2)), [1, 1]) 291s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 291s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 291s ***** assert (size (exprnd (1, 3)), [3, 3]) 291s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 291s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 291s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 291s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 291s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 291s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 291s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 291s ***** assert (class (exprnd (2)), "double") 291s ***** assert (class (exprnd (single (2))), "single") 291s ***** assert (class (exprnd (single ([2 2]))), "single") 291s ***** error exprnd () 291s ***** error exprnd (i) 291s ***** error ... 291s exprnd (1, -1) 291s ***** error ... 291s exprnd (1, 1.2) 291s ***** error ... 291s exprnd (1, ones (2)) 291s ***** error ... 291s exprnd (1, [2 -1 2]) 291s ***** error ... 291s exprnd (1, [2 0 2.5]) 291s ***** error ... 291s exprnd (ones (2), ones (2)) 291s ***** error ... 291s exprnd (1, 2, -1, 5) 291s ***** error ... 291s exprnd (1, 2, 1.5, 5) 291s ***** error exprnd (ones (2,2), 3) 291s ***** error exprnd (ones (2,2), [3, 2]) 291s ***** error exprnd (ones (2,2), 2, 3) 291s 27 tests, 27 passed, 0 known failure, 0 skipped 291s [inst/dist_fun/nctpdf.m] 291s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nctpdf.m 291s ***** demo 291s ## Plot various PDFs from the noncentral T distribution 291s x = -5:0.01:10; 291s y1 = nctpdf (x, 1, 0); 291s y2 = nctpdf (x, 4, 0); 291s y3 = nctpdf (x, 1, 2); 291s y4 = nctpdf (x, 4, 2); 291s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 291s grid on 291s xlim ([-5, 10]) 291s ylim ([0, 0.4]) 291s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 291s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 291s title ("Noncentral T PDF") 291s xlabel ("values in x") 291s ylabel ("density") 291s ***** demo 291s ## Compare the noncentral T PDF with MU = 1 to the T PDF 291s ## with the same number of degrees of freedom (10). 291s 291s x = -5:0.1:5; 291s y1 = nctpdf (x, 10, 1); 291s y2 = tpdf (x, 10); 291s plot (x, y1, "-", x, y2, "-"); 291s grid on 291s xlim ([-5, 5]) 291s ylim ([0, 0.4]) 291s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 291s title ("Noncentral T vs T PDFs") 291s xlabel ("values in x") 291s ylabel ("density") 291s ***** shared x1, df, mu 291s x1 = [-Inf, 2, NaN, 4, Inf]; 291s df = [2, 0, -1, 1, 4]; 291s mu = [1, NaN, 3, -1, 2]; 291s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 291s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 291s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 291s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 291s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 291s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 291s 0.0146500727180389, 0.3082302682110299], 1e-14); 291s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 291s 0.00401787561306999, 0.0972086534042828], 1e-14); 291s ***** error nctpdf () 291s ***** error nctpdf (1) 291s ***** error nctpdf (1, 2) 291s ***** error ... 291s nctpdf (ones (3), ones (2), ones (2)) 291s ***** error ... 291s nctpdf (ones (2), ones (3), ones (2)) 291s ***** error ... 291s nctpdf (ones (2), ones (2), ones (3)) 291s ***** error nctpdf (i, 2, 2) 291s ***** error nctpdf (2, i, 2) 291s ***** error nctpdf (2, 2, i) 291s 16 tests, 16 passed, 0 known failure, 0 skipped 291s [inst/dist_fun/binopdf.m] 291s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/binopdf.m 291s ***** demo 291s ## Plot various PDFs from the binomial distribution 291s x = 0:40; 291s y1 = binopdf (x, 20, 0.5); 291s y2 = binopdf (x, 20, 0.7); 291s y3 = binopdf (x, 40, 0.5); 291s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 291s grid on 291s ylim ([0, 0.25]) 291s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 291s "n = 40, ps = 0.5"}, "location", "northeast") 291s title ("Binomial PDF") 291s xlabel ("values in x (number of successes)") 291s ylabel ("density") 291s ***** shared x, y 291s x = [-1 0 1 2 3]; 291s y = [0 1/4 1/2 1/4 0]; 291s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 291s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 291s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 291s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 291s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 291s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 291s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 291s ***** assert (binopdf (1, 1, 1), 1) 291s ***** assert (binopdf (0, 3, 0), 1) 291s ***** assert (binopdf (2, 2, 1), 1) 291s ***** assert (binopdf (1, 2, 1), 0) 291s ***** assert (binopdf (0, 1.1, 0), NaN) 291s ***** assert (binopdf (1, 2, -1), NaN) 291s ***** assert (binopdf (1, 2, 1.5), NaN) 291s ***** assert (binopdf ([], 1, 1), []) 291s ***** assert (binopdf (1, [], 1), []) 291s ***** assert (binopdf (1, 1, []), []) 291s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 291s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 291s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 291s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 292s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 292s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 292s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 292s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 292s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 292s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 292s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 292s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 292s ***** error binopdf () 292s ***** error binopdf (1) 292s ***** error binopdf (1, 2) 292s ***** error binopdf (1, 2, 3, 4) 292s ***** error ... 292s binopdf (ones (3), ones (2), ones (2)) 292s ***** error ... 292s binopdf (ones (2), ones (3), ones (2)) 292s ***** error ... 292s binopdf (ones (2), ones (2), ones (3)) 292s ***** error binopdf (i, 2, 2) 292s ***** error binopdf (2, i, 2) 292s ***** error binopdf (2, 2, i) 292s 39 tests, 39 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/bisapdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bisapdf.m 292s ***** demo 292s ## Plot various PDFs from the Birnbaum-Saunders distribution 292s x = 0.01:0.01:4; 292s y1 = bisapdf (x, 1, 0.5); 292s y2 = bisapdf (x, 1, 1); 292s y3 = bisapdf (x, 1, 2); 292s y4 = bisapdf (x, 1, 5); 292s y5 = bisapdf (x, 1, 10); 292s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 292s grid on 292s ylim ([0, 1.5]) 292s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 292s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 292s title ("Birnbaum-Saunders PDF") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** demo 292s ## Plot various PDFs from the Birnbaum-Saunders distribution 292s x = 0.01:0.01:6; 292s y1 = bisapdf (x, 1, 0.3); 292s y2 = bisapdf (x, 2, 0.3); 292s y3 = bisapdf (x, 1, 0.5); 292s y4 = bisapdf (x, 3, 0.5); 292s y5 = bisapdf (x, 5, 0.5); 292s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 292s grid on 292s ylim ([0, 1.5]) 292s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 292s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 292s title ("Birnbaum-Saunders CDF") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** shared x, y 292s x = [-1, 0, 1, 2, Inf]; 292s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 292s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 292s ***** assert (bisapdf (x, 1, 1), y, eps) 292s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 292s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 292s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 292s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 292s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 292s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 292s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 292s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 292s ***** error bisapdf () 292s ***** error bisapdf (1) 292s ***** error bisapdf (1, 2) 292s ***** error bisapdf (1, 2, 3, 4) 292s ***** error ... 292s bisapdf (ones (3), ones (2), ones(2)) 292s ***** error ... 292s bisapdf (ones (2), ones (3), ones(2)) 292s ***** error ... 292s bisapdf (ones (2), ones (2), ones(3)) 292s ***** error bisapdf (i, 4, 3) 292s ***** error bisapdf (1, i, 3) 292s ***** error bisapdf (1, 4, i) 292s 20 tests, 20 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/hncdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hncdf.m 292s ***** demo 292s ## Plot various CDFs from the half-normal distribution 292s x = 0:0.001:10; 292s p1 = hncdf (x, 0, 1); 292s p2 = hncdf (x, 0, 2); 292s p3 = hncdf (x, 0, 3); 292s p4 = hncdf (x, 0, 5); 292s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 292s grid on 292s xlim ([0, 10]) 292s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 292s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 292s title ("Half-normal CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** demo 292s ## Plot half-normal against normal cumulative distribution function 292s x = -5:0.001:5; 292s p1 = hncdf (x, 0, 1); 292s p2 = normcdf (x); 292s plot (x, p1, "-b", x, p2, "-g") 292s grid on 292s xlim ([-5, 5]) 292s legend ({"half-normal with μ = 0, σ = 1", ... 292s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 292s title ("Half-normal against standard normal CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** shared x, p1, p1u, y2, y2u, y3, y3u 292s x = [-Inf, -1, 0, 1/2, 1, Inf]; 292s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 292s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 292s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 292s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 292s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 292s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 292s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 292s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 292s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 292s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 292s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 292s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 292s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 292s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 292s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 292s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 292s ***** error hncdf () 292s ***** error hncdf (1) 292s ***** error hncdf (1, 2) 292s ***** error hncdf (1, 2, 3, "tail") 292s ***** error hncdf (1, 2, 3, 5) 292s ***** error ... 292s hncdf (ones (3), ones (2), ones(2)) 292s ***** error ... 292s hncdf (ones (2), ones (3), ones(2)) 292s ***** error ... 292s hncdf (ones (2), ones (2), ones(3)) 292s ***** error hncdf (i, 2, 3) 292s ***** error hncdf (1, i, 3) 292s ***** error hncdf (1, 2, i) 292s 25 tests, 25 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/gampdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gampdf.m 292s ***** demo 292s ## Plot various PDFs from the Gamma distribution 292s x = 0:0.01:20; 292s y1 = gampdf (x, 1, 2); 292s y2 = gampdf (x, 2, 2); 292s y3 = gampdf (x, 3, 2); 292s y4 = gampdf (x, 5, 1); 292s y5 = gampdf (x, 9, 0.5); 292s y6 = gampdf (x, 7.5, 1); 292s y7 = gampdf (x, 0.5, 1); 292s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 292s x, y5, "-k", x, y6, "-b", x, y7, "-c") 292s grid on 292s ylim ([0,0.5]) 292s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 292s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 292s "α = 0.5, β = 1"}, "location", "northeast") 292s title ("Gamma PDF") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** shared x, y 292s x = [-1 0 0.5 1 Inf]; 292s y = [0 exp(-x(2:end))]; 292s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 292s ***** assert (gampdf (x, 1, ones (1,5)), y) 292s ***** assert (gampdf (x, ones (1,5), 1), y) 292s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 292s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 292s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 292s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 292s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 292s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 292s ***** error gampdf () 292s ***** error gampdf (1) 292s ***** error gampdf (1,2) 292s ***** error ... 292s gampdf (ones (3), ones (2), ones (2)) 292s ***** error ... 292s gampdf (ones (2), ones (3), ones (2)) 292s ***** error ... 292s gampdf (ones (2), ones (2), ones (3)) 292s ***** error gampdf (i, 2, 2) 292s ***** error gampdf (2, i, 2) 292s ***** error gampdf (2, 2, i) 292s 18 tests, 18 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/unidcdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unidcdf.m 292s ***** demo 292s ## Plot various CDFs from the discrete uniform distribution 292s x = 0:10; 292s p1 = unidcdf (x, 5); 292s p2 = unidcdf (x, 9); 292s plot (x, p1, "*b", x, p2, "*g") 292s grid on 292s xlim ([0, 10]) 292s ylim ([0, 1]) 292s legend ({"N = 5", "N = 9"}, "location", "southeast") 292s title ("Discrete uniform CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** shared x, y 292s x = [0 1 2.5 10 11]; 292s y = [0, 0.1 0.2 1.0 1.0]; 292s ***** assert (unidcdf (x, 10*ones (1,5)), y) 292s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 292s ***** assert (unidcdf (x, 10), y) 292s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 292s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 292s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 292s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 292s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 292s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 292s ***** error unidcdf () 292s ***** error unidcdf (1) 292s ***** error unidcdf (1, 2, 3) 292s ***** error unidcdf (1, 2, "tail") 292s ***** error ... 292s unidcdf (ones (3), ones (2)) 292s ***** error ... 292s unidcdf (ones (2), ones (3)) 292s ***** error unidcdf (i, 2) 292s ***** error unidcdf (2, i) 292s 17 tests, 17 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/wishpdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wishpdf.m 292s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 292s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 292s ***** 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); 292s ***** error wishpdf () 292s ***** error wishpdf (1, 2) 292s ***** error wishpdf (1, 2, 0) 292s ***** error wishpdf (1, 2) 292s 7 tests, 7 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/raylinv.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/raylinv.m 292s ***** demo 292s ## Plot various iCDFs from the Rayleigh distribution 292s p = 0.001:0.001:0.999; 292s x1 = raylinv (p, 0.5); 292s x2 = raylinv (p, 1); 292s x3 = raylinv (p, 2); 292s x4 = raylinv (p, 3); 292s x5 = raylinv (p, 4); 292s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 292s grid on 292s ylim ([0, 10]) 292s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 292s "σ = 3", "σ = 4"}, "location", "northwest") 292s title ("Rayleigh iCDF") 292s xlabel ("probability") 292s ylabel ("values in x") 292s ***** test 292s p = 0:0.1:0.5; 292s sigma = 1:6; 292s x = raylinv (p, sigma); 292s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 292s assert (x, expected_x, 0.001); 292s ***** test 292s p = 0:0.1:0.5; 292s x = raylinv (p, 0.5); 292s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 292s assert (x, expected_x, 0.001); 292s ***** error raylinv () 292s ***** error raylinv (1) 292s ***** error ... 292s raylinv (ones (3), ones (2)) 292s ***** error ... 292s raylinv (ones (2), ones (3)) 292s ***** error raylinv (i, 2) 292s ***** error raylinv (2, i) 292s 8 tests, 8 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/evpdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/evpdf.m 292s ***** demo 292s ## Plot various PDFs from the Extreme value distribution 292s x = -10:0.001:10; 292s y1 = evpdf (x, 0.5, 2); 292s y2 = evpdf (x, 1.0, 2); 292s y3 = evpdf (x, 1.5, 3); 292s y4 = evpdf (x, 3.0, 4); 292s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 292s grid on 292s ylim ([0, 0.2]) 292s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 292s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 292s title ("Extreme value PDF") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** shared x, y0, y1 292s x = [-5, 0, 1, 2, 3]; 292s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 292s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 292s ***** assert (evpdf (x), y0, 1e-4) 292s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 292s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 292s ***** error evpdf () 292s ***** error ... 292s evpdf (ones (3), ones (2), ones (2)) 292s ***** error evpdf (i, 2, 2) 292s ***** error evpdf (2, i, 2) 292s ***** error evpdf (2, 2, i) 292s 8 tests, 8 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/laplacecdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/laplacecdf.m 292s ***** demo 292s ## Plot various CDFs from the Laplace distribution 292s x = -10:0.01:10; 292s p1 = laplacecdf (x, 0, 1); 292s p2 = laplacecdf (x, 0, 2); 292s p3 = laplacecdf (x, 0, 4); 292s p4 = laplacecdf (x, -5, 4); 292s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 292s grid on 292s xlim ([-10, 10]) 292s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 292s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 292s title ("Laplace CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** shared x, y 292s x = [-Inf, -log(2), 0, log(2), Inf]; 292s y = [0, 1/4, 1/2, 3/4, 1]; 292s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 292s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 292s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 292s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 292s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 292s ***** error laplacecdf () 292s ***** error laplacecdf (1) 292s ***** error ... 292s laplacecdf (1, 2) 292s ***** error ... 292s laplacecdf (1, 2, 3, 4, 5) 292s ***** error laplacecdf (1, 2, 3, "tail") 292s ***** error laplacecdf (1, 2, 3, 4) 292s ***** error ... 292s laplacecdf (ones (3), ones (2), ones (2)) 292s ***** error ... 292s laplacecdf (ones (2), ones (3), ones (2)) 292s ***** error ... 292s laplacecdf (ones (2), ones (2), ones (3)) 292s ***** error laplacecdf (i, 2, 2) 292s ***** error laplacecdf (2, i, 2) 292s ***** error laplacecdf (2, 2, i) 292s 17 tests, 17 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/trirnd.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/trirnd.m 292s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 292s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 292s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 292s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 292s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 292s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 292s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 292s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 292s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 292s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 292s ***** assert (class (trirnd (1, 1.5, 2)), "double") 292s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 292s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 292s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 292s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 292s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 292s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 292s ***** error trirnd () 292s ***** error trirnd (1) 292s ***** error trirnd (1, 2) 292s ***** error ... 292s trirnd (ones (3), 5 * ones (2), ones (2)) 292s ***** error ... 292s trirnd (ones (2), 5 * ones (3), ones (2)) 292s ***** error ... 292s trirnd (ones (2), 5 * ones (2), ones (3)) 292s ***** error trirnd (i, 5, 3) 292s ***** error trirnd (1, 5+i, 3) 292s ***** error trirnd (1, 5, i) 292s ***** error ... 292s trirnd (1, 5, 3, -1) 292s ***** error ... 292s trirnd (1, 5, 3, 1.2) 292s ***** error ... 292s trirnd (1, 5, 3, ones (2)) 292s ***** error ... 292s trirnd (1, 5, 3, [2 -1 2]) 292s ***** error ... 292s trirnd (1, 5, 3, [2 0 2.5]) 292s ***** error ... 292s trirnd (1, 5, 3, 2, -1, 5) 292s ***** error ... 292s trirnd (1, 5, 3, 2, 1.5, 5) 292s ***** error ... 292s trirnd (2, 5 * ones (2), 2, 3) 292s ***** error ... 292s trirnd (2, 5 * ones (2), 2, [3, 2]) 292s ***** error ... 292s trirnd (2, 5 * ones (2), 2, 3, 2) 292s 36 tests, 36 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/nakacdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nakacdf.m 292s ***** demo 292s ## Plot various CDFs from the Nakagami distribution 292s x = 0:0.01:3; 292s p1 = nakacdf (x, 0.5, 1); 292s p2 = nakacdf (x, 1, 1); 292s p3 = nakacdf (x, 1, 2); 292s p4 = nakacdf (x, 1, 3); 292s p5 = nakacdf (x, 2, 1); 292s p6 = nakacdf (x, 2, 2); 292s p7 = nakacdf (x, 5, 1); 292s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 292s x, p5, "-k", x, p6, "-b", x, p7, "-c") 292s grid on 292s xlim ([0, 3]) 292s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 292s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 292s "μ = 5, ω = 1"}, "location", "southeast") 292s title ("Nakagami CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** shared x, y 292s x = [-1, 0, 1, 2, Inf]; 292s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 292s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 292s ***** assert (nakacdf (x, 1, 1), y, eps) 292s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 292s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 292s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 292s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 292s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 292s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 292s ***** error nakacdf () 292s ***** error nakacdf (1) 292s ***** error nakacdf (1, 2) 292s ***** error nakacdf (1, 2, 3, "tail") 292s ***** error nakacdf (1, 2, 3, 4) 292s ***** error ... 292s nakacdf (ones (3), ones (2), ones (2)) 292s ***** error ... 292s nakacdf (ones (2), ones (3), ones (2)) 292s ***** error ... 292s nakacdf (ones (2), ones (2), ones (3)) 292s ***** error nakacdf (i, 2, 2) 292s ***** error nakacdf (2, i, 2) 292s ***** error nakacdf (2, 2, i) 292s 19 tests, 19 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/tcdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tcdf.m 292s ***** demo 292s ## Plot various CDFs from the Student's T distribution 292s x = -5:0.01:5; 292s p1 = tcdf (x, 1); 292s p2 = tcdf (x, 2); 292s p3 = tcdf (x, 5); 292s p4 = tcdf (x, Inf); 292s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 292s grid on 292s xlim ([-5, 5]) 292s ylim ([0, 1]) 292s legend ({"df = 1", "df = 2", ... 292s "df = 5", 'df = \infty'}, "location", "southeast") 292s title ("Student's T CDF") 292s xlabel ("values in x") 292s ylabel ("probability") 292s ***** shared x,y 292s x = [-Inf 0 1 Inf]; 292s y = [0 1/2 3/4 1]; 292s ***** assert (tcdf (x, ones (1,4)), y, eps) 292s ***** assert (tcdf (x, 1), y, eps) 292s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 292s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 292s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 292s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 292s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 292s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 292s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 292s ***** error tcdf () 292s ***** error tcdf (1) 292s ***** error tcdf (1, 2, "uper") 292s ***** error tcdf (1, 2, 3) 292s ***** error ... 292s tcdf (ones (3), ones (2)) 292s ***** error ... 292s tcdf (ones (3), ones (2)) 292s ***** error ... 292s tcdf (ones (3), ones (2), "upper") 292s ***** error tcdf (i, 2) 292s ***** error tcdf (2, i) 292s ***** shared tol_rel 292s tol_rel = 10 * eps; 292s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 292s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 292s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 292s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 292s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 292s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 292s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 292s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 292s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 292s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 292s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 292s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 292s 30 tests, 30 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/chi2inv.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/chi2inv.m 292s ***** demo 292s ## Plot various iCDFs from the chi-squared distribution 292s p = 0.001:0.001:0.999; 292s x1 = chi2inv (p, 1); 292s x2 = chi2inv (p, 2); 292s x3 = chi2inv (p, 3); 292s x4 = chi2inv (p, 4); 292s x5 = chi2inv (p, 6); 292s x6 = chi2inv (p, 9); 292s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 292s p, x4, "-c", p, x5, "-m", p, x6, "-y") 292s grid on 292s ylim ([0, 8]) 292s legend ({"df = 1", "df = 2", "df = 3", ... 292s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 292s title ("Chi-squared iCDF") 292s xlabel ("probability") 292s ylabel ("values in x") 292s ***** shared p 292s p = [-1 0 0.3934693402873666 1 2]; 292s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 292s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 292s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 292s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 292s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 292s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 292s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 292s ***** error chi2inv () 292s ***** error chi2inv (1) 292s ***** error chi2inv (1,2,3) 292s ***** error ... 292s chi2inv (ones (3), ones (2)) 292s ***** error ... 292s chi2inv (ones (2), ones (3)) 292s ***** error chi2inv (i, 2) 292s ***** error chi2inv (2, i) 292s 14 tests, 14 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/wblinv.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wblinv.m 292s ***** demo 292s ## Plot various iCDFs from the Weibull distribution 292s p = 0.001:0.001:0.999; 292s x1 = wblinv (p, 1, 0.5); 292s x2 = wblinv (p, 1, 1); 292s x3 = wblinv (p, 1, 1.5); 292s x4 = wblinv (p, 1, 5); 292s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 292s ylim ([0, 2.5]) 292s grid on 292s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 292s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 292s title ("Weibull iCDF") 292s xlabel ("probability") 292s ylabel ("x") 292s ***** shared p 292s p = [-1 0 0.63212055882855778 1 2]; 292s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 292s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 292s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 292s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 292s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 292s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 292s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 292s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 292s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 292s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 292s ***** error wblinv () 292s ***** error wblinv (1,2,3,4) 292s ***** error ... 292s wblinv (ones (3), ones (2), ones (2)) 292s ***** error ... 292s wblinv (ones (2), ones (3), ones (2)) 292s ***** error ... 292s wblinv (ones (2), ones (2), ones (3)) 292s ***** error wblinv (i, 2, 2) 292s ***** error wblinv (2, i, 2) 292s ***** error wblinv (2, 2, i) 292s 18 tests, 18 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/burrinv.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/burrinv.m 292s ***** demo 292s ## Plot various iCDFs from the Burr type XII distribution 292s p = 0.001:0.001:0.999; 292s x1 = burrinv (p, 1, 1, 1); 292s x2 = burrinv (p, 1, 1, 2); 292s x3 = burrinv (p, 1, 1, 3); 292s x4 = burrinv (p, 1, 2, 1); 292s x5 = burrinv (p, 1, 3, 1); 292s x6 = burrinv (p, 1, 0.5, 2); 292s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 292s p, x4, "-c", p, x5, "-m", p, x6, "-k") 292s grid on 292s ylim ([0, 5]) 292s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 292s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 292s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 292s "location", "northwest") 292s title ("Burr type XII iCDF") 292s xlabel ("probability") 292s ylabel ("values in x") 292s ***** shared p, y 292s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 292s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 292s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 292s ***** assert (burrinv (p, 1, 1, 1), y, eps) 292s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 292s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 292s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 292s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 292s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 292s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 292s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 292s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 292s ***** error burrinv () 292s ***** error burrinv (1) 292s ***** error burrinv (1, 2) 292s ***** error burrinv (1, 2, 3) 292s ***** error ... 292s burrinv (1, 2, 3, 4, 5) 292s ***** error ... 292s burrinv (ones (3), ones (2), ones(2), ones(2)) 292s ***** error ... 292s burrinv (ones (2), ones (3), ones(2), ones(2)) 292s ***** error ... 292s burrinv (ones (2), ones (2), ones(3), ones(2)) 292s ***** error ... 292s burrinv (ones (2), ones (2), ones(2), ones(3)) 292s ***** error burrinv (i, 2, 3, 4) 292s ***** error burrinv (1, i, 3, 4) 292s ***** error burrinv (1, 2, i, 4) 292s ***** error burrinv (1, 2, 3, i) 292s 23 tests, 23 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/ncfpdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncfpdf.m 292s ***** demo 292s ## Plot various PDFs from the noncentral F distribution 292s x = 0:0.01:5; 292s y1 = ncfpdf (x, 2, 5, 1); 292s y2 = ncfpdf (x, 2, 5, 2); 292s y3 = ncfpdf (x, 5, 10, 1); 292s y4 = ncfpdf (x, 10, 20, 10); 292s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 292s grid on 292s xlim ([0, 5]) 292s ylim ([0, 0.8]) 292s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 292s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 292s "location", "northeast") 292s title ("Noncentral F PDF") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** demo 292s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 292s ## same number of numerator and denominator degrees of freedom (5, 20) 292s 292s x = 0.01:0.1:10.01; 292s y1 = ncfpdf (x, 5, 20, 10); 292s y2 = fpdf (x, 5, 20); 292s plot (x, y1, "-", x, y2, "-"); 292s grid on 292s xlim ([0, 10]) 292s ylim ([0, 0.8]) 292s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 292s title ("Noncentral F vs F PDFs") 292s xlabel ("values in x") 292s ylabel ("density") 292s ***** shared x1, df1, df2, lambda 292s x1 = [-Inf, 2, NaN, 4, Inf]; 292s df1 = [2, 0, -1, 1, 4]; 292s df2 = [2, 4, 5, 6, 8]; 292s lambda = [1, NaN, 3, -1, 2]; 292s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 292s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 292s 0.05607937264237208, NaN], 1e-14); 292s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 292s 0.080125760971946518, NaN], 1e-14); 292s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 292s 0.0715902008258656, NaN], 1e-14); 292s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 292s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 292s NaN, 0.2152571783045893], 1e-14); 292s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 292s NaN, 0.05560846335398539], 1e-14); 292s ***** error ncfpdf () 292s ***** error ncfpdf (1) 292s ***** error ncfpdf (1, 2) 292s ***** error ncfpdf (1, 2, 3) 292s ***** error ... 292s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 292s ***** error ... 292s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 292s ***** error ... 292s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 292s ***** error ... 292s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 292s ***** error ncfpdf (i, 2, 2, 2) 292s ***** error ncfpdf (2, i, 2, 2) 292s ***** error ncfpdf (2, 2, i, 2) 292s ***** error ncfpdf (2, 2, 2, i) 292s 19 tests, 19 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/gumbelrnd.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gumbelrnd.m 292s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 292s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 292s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 292s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 292s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 292s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 292s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 292s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 292s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 292s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 292s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 292s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 292s ***** assert (class (gumbelrnd (1, 1)), "double") 292s ***** assert (class (gumbelrnd (1, single (1))), "single") 292s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 292s ***** assert (class (gumbelrnd (single (1), 1)), "single") 292s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 292s ***** error gumbelrnd () 292s ***** error gumbelrnd (1) 292s ***** error ... 292s gumbelrnd (ones (3), ones (2)) 292s ***** error ... 292s gumbelrnd (ones (2), ones (3)) 292s ***** error gumbelrnd (i, 2, 3) 292s ***** error gumbelrnd (1, i, 3) 292s ***** error ... 292s gumbelrnd (1, 2, -1) 292s ***** error ... 292s gumbelrnd (1, 2, 1.2) 292s ***** error ... 292s gumbelrnd (1, 2, ones (2)) 292s ***** error ... 292s gumbelrnd (1, 2, [2 -1 2]) 292s ***** error ... 292s gumbelrnd (1, 2, [2 0 2.5]) 292s ***** error ... 292s gumbelrnd (1, 2, 2, -1, 5) 292s ***** error ... 292s gumbelrnd (1, 2, 2, 1.5, 5) 292s ***** error ... 292s gumbelrnd (2, ones (2), 3) 292s ***** error ... 292s gumbelrnd (2, ones (2), [3, 2]) 292s ***** error ... 292s gumbelrnd (2, ones (2), 3, 2) 292s 33 tests, 33 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/plcdf.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/plcdf.m 292s ***** demo 292s ## Plot various CDFs from the Piecewise linear distribution 292s data = 0:0.01:10; 292s x1 = [0, 1, 3, 4, 7, 10]; 292s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 292s x2 = [0, 2, 5, 6, 7, 8]; 292s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 292s p1 = plcdf (data, x1, Fx1); 292s p2 = plcdf (data, x2, Fx2); 292s plot (data, p1, "-b", data, p2, "g") 292s grid on 292s ylim ([0, 1]) 292s xlim ([0, 10]) 292s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 292s title ("Piecewise linear CDF") 292s xlabel ("values in data") 292s ylabel ("probability") 292s ***** test 292s data = 0:0.2:1; 292s p = plcdf (data, [0, 1], [0, 1]); 292s assert (p, data); 292s ***** test 292s data = 0:0.2:1; 292s p = plcdf (data, [0, 2], [0, 1]); 292s assert (p, 0.5 * data); 292s ***** test 292s data = 0:0.2:1; 292s p = plcdf (data, [0, 1], [0, 0.5]); 292s assert (p, 0.5 * data); 292s ***** test 292s data = 0:0.2:1; 292s p = plcdf (data, [0, 0.5], [0, 1]); 292s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 292s ***** test 292s data = 0:0.2:1; 292s p = plcdf (data, [0, 1], [0, 1], "upper"); 292s assert (p, 1 - data); 292s ***** error plcdf () 292s ***** error plcdf (1) 292s ***** error plcdf (1, 2) 292s ***** error plcdf (1, 2, 3, "uper") 292s ***** error plcdf (1, 2, 3, 4) 292s ***** error ... 292s plcdf (1, [0, 1, 2], [0, 1]) 292s ***** error ... 292s plcdf (1, [0], [1]) 292s ***** error ... 292s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 292s ***** error ... 292s plcdf (1, [0, 1, 2], [0, i, 1]) 292s ***** error ... 292s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 292s ***** error ... 292s plcdf (1, [0, i, 2], [0, 0.5, 1]) 292s ***** error ... 292s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 292s 17 tests, 17 passed, 0 known failure, 0 skipped 292s [inst/dist_fun/nbininv.m] 292s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nbininv.m 292s ***** demo 292s ## Plot various iCDFs from the negative binomial distribution 292s p = 0.001:0.001:0.999; 292s x1 = nbininv (p, 2, 0.15); 292s x2 = nbininv (p, 5, 0.2); 292s x3 = nbininv (p, 4, 0.4); 292s x4 = nbininv (p, 10, 0.3); 292s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 292s grid on 292s ylim ([0, 40]) 292s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 292s "r = 10, ps = 0.3"}, "location", "northwest") 292s title ("Negative binomial iCDF") 292s xlabel ("probability") 292s ylabel ("values in x (number of failures)") 292s ***** shared p 292s p = [-1 0 3/4 1 2]; 292s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 292s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 292s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 292s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 292s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 292s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 292s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 292s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 292s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 292s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 292s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 292s ***** shared y, tol 292s y = magic (3) + 1; 292s tol = 1; 292s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 293s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 293s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 293s ***** error nbininv () 293s ***** error nbininv (1) 293s ***** error nbininv (1, 2) 293s ***** error ... 293s nbininv (ones (3), ones (2), ones (2)) 293s ***** error ... 293s nbininv (ones (2), ones (3), ones (2)) 293s ***** error ... 293s nbininv (ones (2), ones (2), ones (3)) 293s ***** error nbininv (i, 2, 2) 293s ***** error nbininv (2, i, 2) 293s ***** error nbininv (2, 2, i) 293s 23 tests, 23 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/gevinv.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gevinv.m 293s ***** demo 293s ## Plot various iCDFs from the generalized extreme value distribution 293s p = 0.001:0.001:0.999; 293s x1 = gevinv (p, 1, 1, 1); 293s x2 = gevinv (p, 0.5, 1, 1); 293s x3 = gevinv (p, 1, 1, 5); 293s x4 = gevinv (p, 1, 2, 5); 293s x5 = gevinv (p, 1, 5, 5); 293s x6 = gevinv (p, 1, 0.5, 5); 293s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 293s p, x4, "-c", p, x5, "-m", p, x6, "-k") 293s grid on 293s ylim ([-1, 10]) 293s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 293s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 293s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 293s "location", "northwest") 293s title ("Generalized extreme value iCDF") 293s xlabel ("probability") 293s ylabel ("values in x") 293s ***** test 293s p = 0.1:0.1:0.9; 293s k = 0; 293s sigma = 1; 293s mu = 0; 293s x = gevinv (p, k, sigma, mu); 293s c = gevcdf(x, k, sigma, mu); 293s assert (c, p, 0.001); 293s ***** test 293s p = 0.1:0.1:0.9; 293s k = 1; 293s sigma = 1; 293s mu = 0; 293s x = gevinv (p, k, sigma, mu); 293s c = gevcdf(x, k, sigma, mu); 293s assert (c, p, 0.001); 293s ***** test 293s p = 0.1:0.1:0.9; 293s k = 0.3; 293s sigma = 1; 293s mu = 0; 293s x = gevinv (p, k, sigma, mu); 293s c = gevcdf(x, k, sigma, mu); 293s assert (c, p, 0.001); 293s ***** error gevinv () 293s ***** error gevinv (1) 293s ***** error gevinv (1, 2) 293s ***** error gevinv (1, 2, 3) 293s ***** error ... 293s gevinv (ones (3), ones (2), ones(2), ones(2)) 293s ***** error ... 293s gevinv (ones (2), ones (3), ones(2), ones(2)) 293s ***** error ... 293s gevinv (ones (2), ones (2), ones(3), ones(2)) 293s ***** error ... 293s gevinv (ones (2), ones (2), ones(2), ones(3)) 293s ***** error gevinv (i, 2, 3, 4) 293s ***** error gevinv (1, i, 3, 4) 293s ***** error gevinv (1, 2, i, 4) 293s ***** error gevinv (1, 2, 3, i) 293s 15 tests, 15 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/gumbelpdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gumbelpdf.m 293s ***** demo 293s ## Plot various PDFs from the Extreme value distribution 293s x = -5:0.001:20; 293s y1 = gumbelpdf (x, 0.5, 2); 293s y2 = gumbelpdf (x, 1.0, 2); 293s y3 = gumbelpdf (x, 1.5, 3); 293s y4 = gumbelpdf (x, 3.0, 4); 293s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 293s grid on 293s ylim ([0, 0.2]) 293s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 293s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 293s title ("Extreme value PDF") 293s xlabel ("values in x") 293s ylabel ("density") 293s ***** shared x, y0, y1 293s x = [-5, 0, 1, 2, 3]; 293s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 293s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 293s ***** assert (gumbelpdf (x), y0, 1e-4) 293s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 293s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 293s ***** error gumbelpdf () 293s ***** error ... 293s gumbelpdf (ones (3), ones (2), ones (2)) 293s ***** error gumbelpdf (i, 2, 2) 293s ***** error gumbelpdf (2, i, 2) 293s ***** error gumbelpdf (2, 2, i) 293s 8 tests, 8 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/burrcdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/burrcdf.m 293s ***** demo 293s ## Plot various CDFs from the Burr type XII distribution 293s x = 0.001:0.001:5; 293s p1 = burrcdf (x, 1, 1, 1); 293s p2 = burrcdf (x, 1, 1, 2); 293s p3 = burrcdf (x, 1, 1, 3); 293s p4 = burrcdf (x, 1, 2, 1); 293s p5 = burrcdf (x, 1, 3, 1); 293s p6 = burrcdf (x, 1, 0.5, 2); 293s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 293s x, p4, "-c", x, p5, "-m", x, p6, "-k") 293s grid on 293s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 293s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 293s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 293s "location", "southeast") 293s title ("Burr type XII CDF") 293s xlabel ("values in x") 293s ylabel ("probability") 293s ***** shared x, y 293s x = [-1, 0, 1, 2, Inf]; 293s y = [0, 0, 1/2, 2/3, 1]; 293s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 293s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 293s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 293s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 293s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 293s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 293s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 293s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 293s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 293s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 293s ***** error burrcdf () 293s ***** error burrcdf (1) 293s ***** error burrcdf (1, 2) 293s ***** error burrcdf (1, 2, 3) 293s ***** error ... 293s burrcdf (1, 2, 3, 4, 5, 6) 293s ***** error burrcdf (1, 2, 3, 4, "tail") 293s ***** error burrcdf (1, 2, 3, 4, 5) 293s ***** error ... 293s burrcdf (ones (3), ones (2), ones(2), ones(2)) 293s ***** error ... 293s burrcdf (ones (2), ones (3), ones(2), ones(2)) 293s ***** error ... 293s burrcdf (ones (2), ones (2), ones(3), ones(2)) 293s ***** error ... 293s burrcdf (ones (2), ones (2), ones(2), ones(3)) 293s ***** error burrcdf (i, 2, 3, 4) 293s ***** error burrcdf (1, i, 3, 4) 293s ***** error burrcdf (1, 2, i, 4) 293s ***** error burrcdf (1, 2, 3, i) 293s 25 tests, 25 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/invgrnd.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/invgrnd.m 293s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 293s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 293s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 293s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 293s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 293s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 293s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 293s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 293s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 293s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 293s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 293s ***** test 293s r = invgrnd (1, [1, 0, -1]); 293s assert (r([2:3]), [NaN, NaN]) 293s ***** assert (class (invgrnd (1, 0)), "double") 293s ***** assert (class (invgrnd (1, single (0))), "single") 293s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 293s ***** assert (class (invgrnd (1, single (1))), "single") 293s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 293s ***** assert (class (invgrnd (single (1), 1)), "single") 293s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 293s ***** error invgrnd () 293s ***** error invgrnd (1) 293s ***** error ... 293s invgrnd (ones (3), ones (2)) 293s ***** error ... 293s invgrnd (ones (2), ones (3)) 293s ***** error invgrnd (i, 2, 3) 293s ***** error invgrnd (1, i, 3) 293s ***** error ... 293s invgrnd (1, 2, -1) 293s ***** error ... 293s invgrnd (1, 2, 1.2) 293s ***** error ... 293s invgrnd (1, 2, ones (2)) 293s ***** error ... 293s invgrnd (1, 2, [2 -1 2]) 293s ***** error ... 293s invgrnd (1, 2, [2 0 2.5]) 293s ***** error ... 293s invgrnd (1, 2, 2, -1, 5) 293s ***** error ... 293s invgrnd (1, 2, 2, 1.5, 5) 293s ***** error ... 293s invgrnd (2, ones (2), 3) 293s ***** error ... 293s invgrnd (2, ones (2), [3, 2]) 293s ***** error ... 293s invgrnd (2, ones (2), 3, 2) 293s 35 tests, 35 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/bisarnd.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bisarnd.m 293s ***** assert (size (bisarnd (1, 1)), [1 1]) 293s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 293s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 293s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 293s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 293s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 293s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 293s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 293s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 293s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 293s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 293s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 293s ***** assert (class (bisarnd (1, 1)), "double") 293s ***** assert (class (bisarnd (1, single (1))), "single") 293s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 293s ***** assert (class (bisarnd (single (1), 1)), "single") 293s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 293s ***** error bisarnd () 293s ***** error bisarnd (1) 293s ***** error ... 293s bisarnd (ones (3), ones (2)) 293s ***** error ... 293s bisarnd (ones (2), ones (3)) 293s ***** error bisarnd (i, 2, 3) 293s ***** error bisarnd (1, i, 3) 293s ***** error ... 293s bisarnd (1, 2, -1) 293s ***** error ... 293s bisarnd (1, 2, 1.2) 293s ***** error ... 293s bisarnd (1, 2, ones (2)) 293s ***** error ... 293s bisarnd (1, 2, [2 -1 2]) 293s ***** error ... 293s bisarnd (1, 2, [2 0 2.5]) 293s ***** error ... 293s bisarnd (1, 2, 2, -1, 5) 293s ***** error ... 293s bisarnd (1, 2, 2, 1.5, 5) 293s ***** error ... 293s bisarnd (2, ones (2), 3) 293s ***** error ... 293s bisarnd (2, ones (2), [3, 2]) 293s ***** error ... 293s bisarnd (2, ones (2), 3, 2) 293s 33 tests, 33 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/lognpdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/lognpdf.m 293s ***** demo 293s ## Plot various PDFs from the log-normal distribution 293s x = 0:0.01:5; 293s y1 = lognpdf (x, 0, 1); 293s y2 = lognpdf (x, 0, 0.5); 293s y3 = lognpdf (x, 0, 0.25); 293s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 293s grid on 293s ylim ([0, 2]) 293s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 293s "location", "northeast") 293s title ("Log-normal PDF") 293s xlabel ("values in x") 293s ylabel ("density") 293s ***** shared x, y 293s x = [-1 0 e Inf]; 293s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 293s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 293s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 293s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 293s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 293s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 293s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 293s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 293s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 293s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 293s ***** error lognpdf () 293s ***** error lognpdf (1,2,3,4) 293s ***** error lognpdf (ones (3), ones (2), ones (2)) 293s ***** error lognpdf (ones (2), ones (3), ones (2)) 293s ***** error lognpdf (ones (2), ones (2), ones (3)) 293s ***** error lognpdf (i, 2, 2) 293s ***** error lognpdf (2, i, 2) 293s ***** error lognpdf (2, 2, i) 293s 17 tests, 17 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/evinv.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/evinv.m 293s ***** demo 293s ## Plot various iCDFs from the extreme value distribution 293s p = 0.001:0.001:0.999; 293s x1 = evinv (p, 0.5, 2); 293s x2 = evinv (p, 1.0, 2); 293s x3 = evinv (p, 1.5, 3); 293s x4 = evinv (p, 3.0, 4); 293s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 293s grid on 293s ylim ([-10, 10]) 293s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 293s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 293s title ("Extreme value iCDF") 293s xlabel ("probability") 293s ylabel ("values in x") 293s ***** shared p, x 293s p = [0, 0.05, 0.5 0.95]; 293s x = [-Inf, -2.9702, -0.3665, 1.0972]; 293s ***** assert (evinv (p), x, 1e-4) 293s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 293s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 293s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 293s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 293s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 293s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 293s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 293s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 293s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 293s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 293s ***** error evinv () 293s ***** error evinv (1,2,3,4,5,6) 293s ***** error ... 293s evinv (ones (3), ones (2), ones (2)) 293s ***** error ... 293s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 293s ***** error ... 293s [p, plo, pup] = evinv (1, 2, 3) 293s ***** error [p, plo, pup] = ... 293s evinv (1, 2, 3, [1, 0; 0, 1], 0) 293s ***** error [p, plo, pup] = ... 293s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 293s ***** error evinv (i, 2, 2) 293s ***** error evinv (2, i, 2) 293s ***** error evinv (2, 2, i) 293s ***** error ... 293s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 293s 22 tests, 22 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/iwishrnd.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/iwishrnd.m 293s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 293s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 293s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 293s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 293s ***** error iwishrnd () 293s ***** error iwishrnd (1) 293s ***** error iwishrnd ([-3 1; 1 3],1) 293s ***** error iwishrnd ([1; 1],1) 293s 8 tests, 8 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/geopdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/geopdf.m 293s ***** demo 293s ## Plot various PDFs from the geometric distribution 293s x = 0:10; 293s y1 = geopdf (x, 0.2); 293s y2 = geopdf (x, 0.5); 293s y3 = geopdf (x, 0.7); 293s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 293s grid on 293s ylim ([0, 0.8]) 293s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 293s title ("Geometric PDF") 293s xlabel ("values in x (number of failures)") 293s ylabel ("density") 293s ***** shared x, y 293s x = [-1 0 1 Inf]; 293s y = [0, 1/2, 1/4, NaN]; 293s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 293s ***** assert (geopdf (x, 0.5), y) 293s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 293s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 293s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 293s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 293s ***** error geopdf () 293s ***** error geopdf (1) 293s ***** error geopdf (1,2,3) 293s ***** error geopdf (ones (3), ones (2)) 293s ***** error geopdf (ones (2), ones (3)) 293s ***** error geopdf (i, 2) 293s ***** error geopdf (2, i) 293s 13 tests, 13 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/tlsrnd.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tlsrnd.m 293s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 293s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 293s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 293s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 293s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 293s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 293s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 293s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 293s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 293s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 293s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 293s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 293s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 293s ***** assert (class (tlsrnd (1, 2, 3)), "double") 293s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 293s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 293s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 293s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 293s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 293s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 293s ***** error tlsrnd () 293s ***** error tlsrnd (1) 293s ***** error tlsrnd (1, 2) 293s ***** error ... 293s tlsrnd (ones (3), ones (2), 1) 293s ***** error ... 293s tlsrnd (ones (2), 1, ones (3)) 293s ***** error ... 293s tlsrnd (1, ones (2), ones (3)) 293s ***** error tlsrnd (i, 2, 3) 293s ***** error tlsrnd (1, i, 3) 293s ***** error tlsrnd (1, 2, i) 293s ***** error ... 293s tlsrnd (1, 2, 3, -1) 293s ***** error ... 293s tlsrnd (1, 2, 3, 1.2) 293s ***** error ... 293s tlsrnd (1, 2, 3, ones (2)) 293s ***** error ... 293s tlsrnd (1, 2, 3, [2 -1 2]) 293s ***** error ... 293s tlsrnd (1, 2, 3, [2 0 2.5]) 293s ***** error ... 293s tlsrnd (ones (2), 2, 3, ones (2)) 293s ***** error ... 293s tlsrnd (1, 2, 3, 2, -1, 5) 293s ***** error ... 293s tlsrnd (1, 2, 3, 2, 1.5, 5) 293s ***** error ... 293s tlsrnd (ones (2,2), 2, 3, 3) 293s ***** error ... 293s tlsrnd (1, ones (2,2), 3, 3) 293s ***** error ... 293s tlsrnd (1, 2, ones (2,2), 3) 293s ***** error ... 293s tlsrnd (1, 2, ones (2,2), [3, 3]) 293s ***** error ... 293s tlsrnd (1, 2, ones (2,2), 2, 3) 293s 42 tests, 42 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/invginv.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/invginv.m 293s ***** demo 293s ## Plot various iCDFs from the inverse Gaussian distribution 293s p = 0.001:0.001:0.999; 293s x1 = invginv (p, 1, 0.2); 293s x2 = invginv (p, 1, 1); 293s x3 = invginv (p, 1, 3); 293s x4 = invginv (p, 3, 0.2); 293s x5 = invginv (p, 3, 1); 293s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 293s grid on 293s ylim ([0, 3]) 293s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 293s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 293s title ("Inverse Gaussian iCDF") 293s xlabel ("probability") 293s ylabel ("x") 293s ***** shared p, x 293s p = [0, 0.3829, 0.6827, 1]; 293s x = [0, 0.5207, 1.0376, Inf]; 293s ***** assert (invginv (p, 1, 1), x, 1e-4); 293s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 293s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 293s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 293s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 293s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 293s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 293s ***** error invginv (1) 293s ***** error invginv (1, 2) 293s ***** error ... 293s invginv (1, ones (2), ones (3)) 293s ***** error ... 293s invginv (ones (2), 1, ones (3)) 293s ***** error ... 293s invginv (ones (2), ones (3), 1) 293s ***** error invginv (i, 2, 3) 293s ***** error invginv (1, i, 3) 293s ***** error invginv (1, 2, i) 293s 15 tests, 15 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/loglcdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/loglcdf.m 293s ***** demo 293s ## Plot various CDFs from the log-logistic distribution 293s x = 0:0.001:2; 293s p1 = loglcdf (x, log (1), 1/0.5); 293s p2 = loglcdf (x, log (1), 1); 293s p3 = loglcdf (x, log (1), 1/2); 293s p4 = loglcdf (x, log (1), 1/4); 293s p5 = loglcdf (x, log (1), 1/8); 293s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 293s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 293s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 293s grid on 293s title ("Log-logistic CDF") 293s xlabel ("values in x") 293s ylabel ("probability") 293s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 293s ***** shared out1, out2 293s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 293s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 293s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 293s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 293s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 293s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 293s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 293s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 293s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 293s ***** assert (class (loglcdf (1, single (2), 3)), "single") 293s ***** assert (class (loglcdf (1, 2, single (3))), "single") 293s ***** error loglcdf (1) 293s ***** error loglcdf (1, 2) 293s ***** error ... 293s loglcdf (1, 2, 3, 4) 293s ***** error ... 293s loglcdf (1, 2, 3, "uper") 293s ***** error ... 293s loglcdf (1, ones (2), ones (3)) 293s ***** error ... 293s loglcdf (1, ones (2), ones (3), "upper") 293s ***** error ... 293s loglcdf (ones (2), 1, ones (3)) 293s ***** error ... 293s loglcdf (ones (2), 1, ones (3), "upper") 293s ***** error ... 293s loglcdf (ones (2), ones (3), 1) 293s ***** error ... 293s loglcdf (ones (2), ones (3), 1, "upper") 293s ***** error loglcdf (i, 2, 3) 293s ***** error loglcdf (i, 2, 3, "upper") 293s ***** error loglcdf (1, i, 3) 293s ***** error loglcdf (1, i, 3, "upper") 293s ***** error loglcdf (1, 2, i) 293s ***** error loglcdf (1, 2, i, "upper") 293s 25 tests, 25 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/cauchycdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/cauchycdf.m 293s ***** demo 293s ## Plot various CDFs from the Cauchy distribution 293s x = -5:0.01:5; 293s p1 = cauchycdf (x, 0, 0.5); 293s p2 = cauchycdf (x, 0, 1); 293s p3 = cauchycdf (x, 0, 2); 293s p4 = cauchycdf (x, -2, 1); 293s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 293s grid on 293s xlim ([-5, 5]) 293s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 293s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 293s title ("Cauchy CDF") 293s xlabel ("values in x") 293s ylabel ("probability") 293s ***** shared x, y 293s x = [-1 0 0.5 1 2]; 293s y = 1/pi * atan ((x-1) / 2) + 1/2; 293s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 293s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 293s ***** assert (cauchycdf (x, ones (1,5), 2), y) 293s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 293s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 293s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 293s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 293s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 293s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 293s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 293s ***** error cauchycdf () 293s ***** error cauchycdf (1) 293s ***** error ... 293s cauchycdf (1, 2) 293s ***** error ... 293s cauchycdf (1, 2, 3, 4, 5) 293s ***** error cauchycdf (1, 2, 3, "tail") 293s ***** error cauchycdf (1, 2, 3, 4) 293s ***** error ... 293s cauchycdf (ones (3), ones (2), ones (2)) 293s ***** error ... 293s cauchycdf (ones (2), ones (3), ones (2)) 293s ***** error ... 293s cauchycdf (ones (2), ones (2), ones (3)) 293s ***** error cauchycdf (i, 2, 2) 293s ***** error cauchycdf (2, i, 2) 293s ***** error cauchycdf (2, 2, i) 293s 22 tests, 22 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/mvtrnd.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvtrnd.m 293s ***** test 293s rho = [1, 0.5; 0.5, 1]; 293s df = 3; 293s n = 10; 293s r = mvtrnd (rho, df, n); 293s assert (size (r), [10, 2]); 293s ***** test 293s rho = [1, 0.5; 0.5, 1]; 293s df = [2; 3]; 293s n = 2; 293s r = mvtrnd (rho, df, 2); 293s assert (size (r), [2, 2]); 293s 2 tests, 2 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/logiinv.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logiinv.m 293s ***** demo 293s ## Plot various iCDFs from the logistic distribution 293s p = 0.001:0.001:0.999; 293s x1 = logiinv (p, 5, 2); 293s x2 = logiinv (p, 9, 3); 293s x3 = logiinv (p, 9, 4); 293s x4 = logiinv (p, 6, 2); 293s x5 = logiinv (p, 2, 1); 293s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 293s grid on 293s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 293s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 293s title ("Logistic iCDF") 293s xlabel ("probability") 293s ylabel ("x") 293s ***** test 293s p = [0.01:0.01:0.99]; 293s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 293s ***** shared p 293s p = [-1 0 0.5 1 2]; 293s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 293s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 293s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 293s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 293s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 293s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 293s ***** error logiinv () 293s ***** error logiinv (1) 293s ***** error ... 293s logiinv (1, 2) 293s ***** error ... 293s logiinv (1, ones (2), ones (3)) 293s ***** error ... 293s logiinv (ones (2), 1, ones (3)) 293s ***** error ... 293s logiinv (ones (2), ones (3), 1) 293s ***** error logiinv (i, 2, 3) 293s ***** error logiinv (1, i, 3) 293s ***** error logiinv (1, 2, i) 293s 16 tests, 16 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/bisacdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bisacdf.m 293s ***** demo 293s ## Plot various CDFs from the Birnbaum-Saunders distribution 293s x = 0.01:0.01:4; 293s p1 = bisacdf (x, 1, 0.5); 293s p2 = bisacdf (x, 1, 1); 293s p3 = bisacdf (x, 1, 2); 293s p4 = bisacdf (x, 1, 5); 293s p5 = bisacdf (x, 1, 10); 293s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 293s grid on 293s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 293s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 293s title ("Birnbaum-Saunders CDF") 293s xlabel ("values in x") 293s ylabel ("probability") 293s ***** demo 293s ## Plot various CDFs from the Birnbaum-Saunders distribution 293s x = 0.01:0.01:6; 293s p1 = bisacdf (x, 1, 0.3); 293s p2 = bisacdf (x, 2, 0.3); 293s p3 = bisacdf (x, 1, 0.5); 293s p4 = bisacdf (x, 3, 0.5); 293s p5 = bisacdf (x, 5, 0.5); 293s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 293s grid on 293s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 293s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 293s title ("Birnbaum-Saunders CDF") 293s xlabel ("values in x") 293s ylabel ("probability") 293s ***** shared x, y 293s x = [-1, 0, 1, 2, Inf]; 293s y = [0, 0, 1/2, 0.76024993890652337, 1]; 293s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 293s ***** assert (bisacdf (x, 1, 1), y, eps) 293s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 293s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 293s ***** assert (bisacdf (x, 1, 1), y, eps) 293s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 293s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 293s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 293s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 293s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 293s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 293s ***** error bisacdf () 293s ***** error bisacdf (1) 293s ***** error bisacdf (1, 2) 293s ***** error ... 293s bisacdf (1, 2, 3, 4, 5) 293s ***** error bisacdf (1, 2, 3, "tail") 293s ***** error bisacdf (1, 2, 3, 4) 293s ***** error ... 293s bisacdf (ones (3), ones (2), ones(2)) 293s ***** error ... 293s bisacdf (ones (2), ones (3), ones(2)) 293s ***** error ... 293s bisacdf (ones (2), ones (2), ones(3)) 293s ***** error bisacdf (i, 4, 3) 293s ***** error bisacdf (1, i, 3) 293s ***** error bisacdf (1, 4, i) 293s 23 tests, 23 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/triinv.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/triinv.m 293s ***** demo 293s ## Plot various iCDFs from the triangular distribution 293s p = 0.001:0.001:0.999; 293s x1 = triinv (p, 3, 6, 4); 293s x2 = triinv (p, 1, 5, 2); 293s x3 = triinv (p, 2, 9, 3); 293s x4 = triinv (p, 2, 9, 5); 293s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 293s grid on 293s ylim ([0, 10]) 293s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 293s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 293s "location", "northwest") 293s title ("Triangular CDF") 293s xlabel ("probability") 293s ylabel ("values in x") 293s ***** shared p, y 293s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 293s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 293s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 293s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 293s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 293s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 293s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 293s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 293s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 293s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 293s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 293s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 293s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 293s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 293s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 293s ***** error triinv () 293s ***** error triinv (1) 293s ***** error triinv (1, 2) 293s ***** error triinv (1, 2, 3) 293s ***** error ... 293s triinv (1, 2, 3, 4, 5) 293s ***** error ... 293s triinv (ones (3), ones (2), ones(2), ones(2)) 293s ***** error ... 293s triinv (ones (2), ones (3), ones(2), ones(2)) 293s ***** error ... 293s triinv (ones (2), ones (2), ones(3), ones(2)) 293s ***** error ... 293s triinv (ones (2), ones (2), ones(2), ones(3)) 293s ***** error triinv (i, 2, 3, 4) 293s ***** error triinv (1, i, 3, 4) 293s ***** error triinv (1, 2, i, 4) 293s ***** error triinv (1, 2, 3, i) 293s 26 tests, 26 passed, 0 known failure, 0 skipped 293s [inst/dist_fun/betapdf.m] 293s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/betapdf.m 293s ***** demo 293s ## Plot various PDFs from the Beta distribution 293s x = 0.001:0.001:0.999; 293s y1 = betapdf (x, 0.5, 0.5); 293s y2 = betapdf (x, 5, 1); 293s y3 = betapdf (x, 1, 3); 293s y4 = betapdf (x, 2, 2); 293s y5 = betapdf (x, 2, 5); 293s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 293s grid on 293s ylim ([0, 2.5]) 293s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 293s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 293s title ("Beta PDF") 293s xlabel ("values in x") 293s ylabel ("density") 293s ***** shared x, y 293s x = [-1 0 0.5 1 2]; 293s y = [0 2 1 0 0]; 293s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 293s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 293s ***** assert (betapdf (x, ones (1, 5), 2), y) 293s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 293s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 293s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 293s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 293s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 293s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 293s ***** test 293s x = rand (10,1); 293s y = 1 ./ (pi * sqrt (x .* (1 - x))); 293s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 293s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 293s ***** error betapdf () 293s ***** error betapdf (1) 293s ***** error betapdf (1,2) 293s ***** error betapdf (1,2,3,4) 294s ***** error ... 294s betapdf (ones (3), ones (2), ones (2)) 294s ***** error ... 294s betapdf (ones (2), ones (3), ones (2)) 294s ***** error ... 294s betapdf (ones (2), ones (2), ones (3)) 294s ***** error betapdf (i, 2, 2) 294s ***** error betapdf (2, i, 2) 294s ***** error betapdf (2, 2, i) 294s 21 tests, 21 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/wienrnd.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/wienrnd.m 294s ***** error wienrnd (0) 294s ***** error wienrnd (1, 3, -50) 294s ***** error wienrnd (5, 0) 294s ***** error wienrnd (0.4, 3, 5) 294s ***** error wienrnd ([1 4], 3, 5) 294s 5 tests, 5 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/expcdf.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/expcdf.m 294s ***** demo 294s ## Plot various CDFs from the exponential distribution 294s x = 0:0.01:5; 294s p1 = expcdf (x, 2/3); 294s p2 = expcdf (x, 1.0); 294s p3 = expcdf (x, 2.0); 294s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 294s grid on 294s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 294s title ("Exponential CDF") 294s xlabel ("values in x") 294s ylabel ("probability") 294s ***** shared x, p 294s x = [-1 0 0.5 1 Inf]; 294s p = [0, 1 - exp(-x(2:end)/2)]; 294s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 294s ***** assert (expcdf (x, 2), p, 1e-16) 294s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 294s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 294s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 294s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 294s ***** test 294s [p, plo, pup] = expcdf (1, 2, 3); 294s assert (p, 0.39346934028737, 1e-14); 294s assert (plo, 0.08751307220484, 1e-14); 294s assert (pup, 0.93476821257933, 1e-14); 294s ***** test 294s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 294s assert (p, 0.39346934028737, 1e-14); 294s assert (plo, 0.14466318041675, 1e-14); 294s assert (pup, 0.79808291849140, 1e-14); 294s ***** test 294s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 294s assert (p, 0.60653065971263, 1e-14); 294s assert (plo, 0.20191708150860, 1e-14); 294s assert (pup, 0.85533681958325, 1e-14); 294s ***** error expcdf () 294s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 294s ***** error expcdf (1, 2, 3, 4, "uper") 294s ***** error ... 294s expcdf (ones (3), ones (2)) 294s ***** error ... 294s expcdf (2, 3, [1, 2]) 294s ***** error ... 294s [p, plo, pup] = expcdf (1, 2) 294s ***** error [p, plo, pup] = ... 294s expcdf (1, 2, 3, 0) 294s ***** error [p, plo, pup] = ... 294s expcdf (1, 2, 3, 1.22) 294s ***** error [p, plo, pup] = ... 294s expcdf (1, 2, 3, "alpha", "upper") 294s ***** error expcdf (i, 2) 294s ***** error expcdf (2, i) 294s ***** error ... 294s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 294s 21 tests, 21 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/ncfinv.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncfinv.m 294s ***** demo 294s ## Plot various iCDFs from the noncentral F distribution 294s p = 0.001:0.001:0.999; 294s x1 = ncfinv (p, 2, 5, 1); 294s x2 = ncfinv (p, 2, 5, 2); 294s x3 = ncfinv (p, 5, 10, 1); 294s x4 = ncfinv (p, 10, 20, 10); 294s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 294s grid on 294s ylim ([0, 5]) 294s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 294s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 294s "location", "northwest") 294s title ("Noncentral F iCDF") 294s xlabel ("probability") 294s ylabel ("values in x") 294s ***** demo 294s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 294s ## same number of numerator and denominator degrees of freedom (5, 20) 294s 294s p = 0.001:0.001:0.999; 294s x1 = ncfinv (p, 5, 20, 10); 294s x2 = finv (p, 5, 20); 294s plot (p, x1, "-", p, x2, "-"); 294s grid on 294s ylim ([0, 10]) 294s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 294s title ("Noncentral F vs F quantile functions") 294s xlabel ("probability") 294s ylabel ("values in x") 294s ***** test 294s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 294s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 294s ***** test 294s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 294s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 294s ***** test 294s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 294s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 294s ***** test 294s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 294s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 294s ***** test 294s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 294s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 294s ***** test 294s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 294s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 294s ***** test 294s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 294s ***** error ncfinv () 294s ***** error ncfinv (1) 294s ***** error ncfinv (1, 2) 294s ***** error ncfinv (1, 2, 3) 294s ***** error ... 294s ncfinv (ones (3), ones (2), ones (2), ones (2)) 294s ***** error ... 294s ncfinv (ones (2), ones (3), ones (2), ones (2)) 294s ***** error ... 294s ncfinv (ones (2), ones (2), ones (3), ones (2)) 294s ***** error ... 294s ncfinv (ones (2), ones (2), ones (2), ones (3)) 294s ***** error ncfinv (i, 2, 2, 2) 294s ***** error ncfinv (2, i, 2, 2) 294s ***** error ncfinv (2, 2, i, 2) 294s ***** error ncfinv (2, 2, 2, i) 294s 19 tests, 19 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/unidrnd.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unidrnd.m 294s ***** assert (size (unidrnd (2)), [1, 1]) 294s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 294s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 294s ***** assert (size (unidrnd (1, 3)), [3, 3]) 294s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 294s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 294s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 294s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 294s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 294s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 294s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 294s ***** assert (unidrnd (0, 1, 1), NaN) 294s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 294s ***** assert (class (unidrnd (2)), "double") 294s ***** assert (class (unidrnd (single (2))), "single") 294s ***** assert (class (unidrnd (single ([2 2]))), "single") 294s ***** error unidrnd () 294s ***** error unidrnd (i) 294s ***** error ... 294s unidrnd (1, -1) 294s ***** error ... 294s unidrnd (1, 1.2) 294s ***** error ... 294s unidrnd (1, ones (2)) 294s ***** error ... 294s unidrnd (1, [2 -1 2]) 294s ***** error ... 294s unidrnd (1, [2 0 2.5]) 294s ***** error ... 294s unidrnd (ones (2), ones (2)) 294s ***** error ... 294s unidrnd (1, 2, -1, 5) 294s ***** error ... 294s unidrnd (1, 2, 1.5, 5) 294s ***** error unidrnd (ones (2,2), 3) 294s ***** error unidrnd (ones (2,2), [3, 2]) 294s ***** error unidrnd (ones (2,2), 2, 3) 294s 29 tests, 29 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/riceinv.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/riceinv.m 294s ***** demo 294s ## Plot various iCDFs from the Rician distribution 294s p = 0.001:0.001:0.999; 294s x1 = riceinv (p, 0, 1); 294s x2 = riceinv (p, 0.5, 1); 294s x3 = riceinv (p, 1, 1); 294s x4 = riceinv (p, 2, 1); 294s x5 = riceinv (p, 4, 1); 294s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 294s grid on 294s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 294s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 294s title ("Rician iCDF") 294s xlabel ("probability") 294s ylabel ("values in x") 294s ***** shared p 294s p = [-1 0 0.75 1 2]; 294s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 294s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 294s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 294s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 294s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 294s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 294s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 294s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 294s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 294s ***** assert (riceinv ([p, NaN], single (1), 2), ... 294s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 294s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 294s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 294s ***** error riceinv () 294s ***** error riceinv (1) 294s ***** error riceinv (1,2) 294s ***** error riceinv (1,2,3,4) 294s ***** error ... 294s riceinv (ones (3), ones (2), ones (2)) 294s ***** error ... 294s riceinv (ones (2), ones (3), ones (2)) 294s ***** error ... 294s riceinv (ones (2), ones (2), ones (3)) 294s ***** error riceinv (i, 2, 2) 294s ***** error riceinv (2, i, 2) 294s ***** error riceinv (2, 2, i) 294s 20 tests, 20 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/cauchyrnd.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/cauchyrnd.m 294s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 294s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 294s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 294s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 294s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 294s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 294s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 294s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 294s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 294s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 294s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 294s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 294s ***** assert (class (cauchyrnd (1, 1)), "double") 294s ***** assert (class (cauchyrnd (1, single (1))), "single") 294s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 294s ***** assert (class (cauchyrnd (single (1), 1)), "single") 294s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 294s ***** error cauchyrnd () 294s ***** error cauchyrnd (1) 294s ***** error ... 294s cauchyrnd (ones (3), ones (2)) 294s ***** error ... 294s cauchyrnd (ones (2), ones (3)) 294s ***** error cauchyrnd (i, 2, 3) 294s ***** error cauchyrnd (1, i, 3) 294s ***** error ... 294s cauchyrnd (1, 2, -1) 294s ***** error ... 294s cauchyrnd (1, 2, 1.2) 294s ***** error ... 294s cauchyrnd (1, 2, ones (2)) 294s ***** error ... 294s cauchyrnd (1, 2, [2 -1 2]) 294s ***** error ... 294s cauchyrnd (1, 2, [2 0 2.5]) 294s ***** error ... 294s cauchyrnd (1, 2, 2, -1, 5) 294s ***** error ... 294s cauchyrnd (1, 2, 2, 1.5, 5) 294s ***** error ... 294s cauchyrnd (2, ones (2), 3) 294s ***** error ... 294s cauchyrnd (2, ones (2), [3, 2]) 294s ***** error ... 294s cauchyrnd (2, ones (2), 3, 2) 294s 33 tests, 33 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/ncx2rnd.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncx2rnd.m 294s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 294s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 294s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 294s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 294s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 294s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 294s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 294s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 294s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 294s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 294s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 294s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 294s ***** assert (class (ncx2rnd (1, 1)), "double") 294s ***** assert (class (ncx2rnd (1, single (1))), "single") 294s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 294s ***** assert (class (ncx2rnd (single (1), 1)), "single") 294s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 294s ***** error ncx2rnd () 294s ***** error ncx2rnd (1) 294s ***** error ... 294s ncx2rnd (ones (3), ones (2)) 294s ***** error ... 294s ncx2rnd (ones (2), ones (3)) 294s ***** error ncx2rnd (i, 2) 294s ***** error ncx2rnd (1, i) 294s ***** error ... 294s ncx2rnd (1, 2, -1) 294s ***** error ... 294s ncx2rnd (1, 2, 1.2) 294s ***** error ... 294s ncx2rnd (1, 2, ones (2)) 294s ***** error ... 294s ncx2rnd (1, 2, [2 -1 2]) 294s ***** error ... 294s ncx2rnd (1, 2, [2 0 2.5]) 294s ***** error ... 294s ncx2rnd (1, 2, 2, -1, 5) 294s ***** error ... 294s ncx2rnd (1, 2, 2, 1.5, 5) 294s ***** error ... 294s ncx2rnd (2, ones (2), 3) 294s ***** error ... 294s ncx2rnd (2, ones (2), [3, 2]) 294s ***** error ... 294s ncx2rnd (2, ones (2), 3, 2) 294s 33 tests, 33 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/binoinv.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/binoinv.m 294s ***** demo 294s ## Plot various iCDFs from the binomial distribution 294s p = 0.001:0.001:0.999; 294s x1 = binoinv (p, 20, 0.5); 294s x2 = binoinv (p, 20, 0.7); 294s x3 = binoinv (p, 40, 0.5); 294s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 294s grid on 294s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 294s "n = 40, ps = 0.5"}, "location", "southeast") 294s title ("Binomial iCDF") 294s xlabel ("probability") 294s ylabel ("values in x (number of successes)") 294s ***** shared p 294s p = [-1 0 0.5 1 2]; 294s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 294s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 294s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 294s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 294s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 294s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 294s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 294s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 294s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 294s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 294s ***** shared x, tol 294s x = magic (3) + 1; 294s tol = 1; 294s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 294s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 294s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 294s ***** error binoinv () 294s ***** error binoinv (1) 294s ***** error binoinv (1,2) 294s ***** error binoinv (1,2,3,4) 294s ***** error ... 294s binoinv (ones (3), ones (2), ones (2)) 294s ***** error ... 294s binoinv (ones (2), ones (3), ones (2)) 294s ***** error ... 294s binoinv (ones (2), ones (2), ones (3)) 294s ***** error binoinv (i, 2, 2) 294s ***** error binoinv (2, i, 2) 294s ***** error binoinv (2, 2, i) 294s 23 tests, 23 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/unifrnd.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unifrnd.m 294s ***** assert (size (unifrnd (1, 1)), [1 1]) 294s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 294s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 294s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 294s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 294s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 294s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 294s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 294s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 294s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 294s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 294s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 294s ***** assert (class (unifrnd (1, 1)), "double") 294s ***** assert (class (unifrnd (1, single (1))), "single") 294s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 294s ***** assert (class (unifrnd (single (1), 1)), "single") 294s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 294s ***** error unifrnd () 294s ***** error unifrnd (1) 294s ***** error ... 294s unifrnd (ones (3), ones (2)) 294s ***** error ... 294s unifrnd (ones (2), ones (3)) 294s ***** error unifrnd (i, 2, 3) 294s ***** error unifrnd (1, i, 3) 294s ***** error ... 294s unifrnd (1, 2, -1) 294s ***** error ... 294s unifrnd (1, 2, 1.2) 294s ***** error ... 294s unifrnd (1, 2, ones (2)) 294s ***** error ... 294s unifrnd (1, 2, [2 -1 2]) 294s ***** error ... 294s unifrnd (1, 2, [2 0 2.5]) 294s ***** error ... 294s unifrnd (1, 2, 2, -1, 5) 294s ***** error ... 294s unifrnd (1, 2, 2, 1.5, 5) 294s ***** error ... 294s unifrnd (2, ones (2), 3) 294s ***** error ... 294s unifrnd (2, ones (2), [3, 2]) 294s ***** error ... 294s unifrnd (2, ones (2), 3, 2) 294s 33 tests, 33 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/mvtpdf.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvtpdf.m 294s ***** demo 294s ## Compute the pdf of a multivariate t distribution with correlation 294s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 294s 294s rho = [1, 0.4; 0.4, 1]; 294s df = 2; 294s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 294s X = [X1(:), X2(:)]; 294s y = mvtpdf (X, rho, df); 294s surf (X1, X2, reshape (y, 25, 25)); 294s title ("Bivariate Student's t probability density function"); 294s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 294s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 294s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 294s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 294s [0.04713313 0.03722421 0.02069011]', 1E-7) 294s 3 tests, 3 passed, 0 known failure, 0 skipped 294s [inst/dist_fun/ncx2cdf.m] 294s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncx2cdf.m 294s ***** demo 294s ## Plot various CDFs from the noncentral chi-squared distribution 294s x = 0:0.1:10; 294s p1 = ncx2cdf (x, 2, 1); 294s p2 = ncx2cdf (x, 2, 2); 294s p3 = ncx2cdf (x, 2, 3); 294s p4 = ncx2cdf (x, 4, 1); 294s p5 = ncx2cdf (x, 4, 2); 294s p6 = ncx2cdf (x, 4, 3); 294s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 294s x, p4, "-m", x, p5, "-c", x, p6, "-y") 294s grid on 294s xlim ([0, 10]) 294s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 294s "df = 2, λ = 3", "df = 4, λ = 1", ... 294s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 294s title ("Noncentral chi-squared CDF") 294s xlabel ("values in x") 294s ylabel ("probability") 294s ***** demo 294s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 294s ## chi-squared CDF with the same number of degrees of freedom (4). 294s 294s x = 0:0.1:10; 294s p1 = ncx2cdf (x, 4, 2); 294s p2 = chi2cdf (x, 4); 294s plot (x, p1, "-", x, p2, "-") 294s grid on 294s xlim ([0, 10]) 294s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 294s title ("Noncentral chi-squared vs chi-squared CDFs") 294s xlabel ("values in x") 294s ylabel ("probability") 294s ***** test 294s x = -2:0.1:2; 294s p = ncx2cdf (x, 10, 1); 294s assert (p([1:21]), zeros (1, 21), 3e-84); 294s assert (p(22), 1.521400636466575e-09, 1e-14); 294s assert (p(30), 6.665480510026046e-05, 1e-14); 294s assert (p(41), 0.002406447308399836, 1e-14); 294s ***** test 294s p = ncx2cdf (12, 10, 3); 294s assert (p, 0.4845555602398649, 1e-14); 294s ***** test 294s p = ncx2cdf (2, 3, 2); 294s assert (p, 0.2207330870741212, 1e-14); 294s ***** test 294s p = ncx2cdf (2, 3, 2, "upper"); 294s assert (p, 0.7792669129258789, 1e-14); 295s ***** test 295s p = ncx2cdf ([3, 6], 3, 2, "upper"); 295s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 295s ***** error ncx2cdf () 295s ***** error ncx2cdf (1) 295s ***** error ncx2cdf (1, 2) 295s ***** error ncx2cdf (1, 2, 3, "tail") 295s ***** error ncx2cdf (1, 2, 3, 4) 295s ***** error ... 295s ncx2cdf (ones (3), ones (2), ones (2)) 295s ***** error ... 295s ncx2cdf (ones (2), ones (3), ones (2)) 295s ***** error ... 295s ncx2cdf (ones (2), ones (2), ones (3)) 295s ***** error ncx2cdf (i, 2, 2) 295s ***** error ncx2cdf (2, i, 2) 295s ***** error ncx2cdf (2, 2, i) 295s 16 tests, 16 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/geocdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/geocdf.m 295s ***** demo 295s ## Plot various CDFs from the geometric distribution 295s x = 0:10; 295s p1 = geocdf (x, 0.2); 295s p2 = geocdf (x, 0.5); 295s p3 = geocdf (x, 0.7); 295s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 295s grid on 295s xlim ([0, 10]) 295s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 295s title ("Geometric CDF") 295s xlabel ("values in x (number of failures)") 295s ylabel ("probability") 295s ***** test 295s p = geocdf ([1, 2, 3, 4], 0.25); 295s assert (p(1), 0.4375000000, 1e-14); 295s assert (p(2), 0.5781250000, 1e-14); 295s assert (p(3), 0.6835937500, 1e-14); 295s assert (p(4), 0.7626953125, 1e-14); 295s ***** test 295s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 295s assert (p(1), 0.5625000000, 1e-14); 295s assert (p(2), 0.4218750000, 1e-14); 295s assert (p(3), 0.3164062500, 1e-14); 295s assert (p(4), 0.2373046875, 1e-14); 295s ***** shared x, p 295s x = [-1 0 1 Inf]; 295s p = [0 0.5 0.75 1]; 295s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 295s ***** assert (geocdf (x, 0.5), p) 295s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 295s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 295s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 295s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 295s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 295s ***** error geocdf () 295s ***** error geocdf (1) 295s ***** error ... 295s geocdf (ones (3), ones (2)) 295s ***** error ... 295s geocdf (ones (2), ones (3)) 295s ***** error geocdf (i, 2) 295s ***** error geocdf (2, i) 295s ***** error geocdf (2, 3, "tail") 295s ***** error geocdf (2, 3, 5) 295s 17 tests, 17 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/plpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/plpdf.m 295s ***** demo 295s ## Plot various PDFs from the Piecewise linear distribution 295s data = 0:0.01:10; 295s x1 = [0, 1, 3, 4, 7, 10]; 295s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 295s x2 = [0, 2, 5, 6, 7, 8]; 295s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 295s y1 = plpdf (data, x1, Fx1); 295s y2 = plpdf (data, x2, Fx2); 295s plot (data, y1, "-b", data, y2, "g") 295s grid on 295s ylim ([0, 0.6]) 295s xlim ([0, 10]) 295s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 295s title ("Piecewise linear CDF") 295s xlabel ("values in data") 295s ylabel ("density") 295s ***** shared x, Fx 295s x = [0, 1, 3, 4, 7, 10]; 295s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 295s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 295s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 295s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 295s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 295s ***** assert (plpdf (8, x, Fx), 0.1, eps); 295s ***** error plpdf () 295s ***** error plpdf (1) 295s ***** error plpdf (1, 2) 295s ***** error ... 295s plpdf (1, [0, 1, 2], [0, 1]) 295s ***** error ... 295s plpdf (1, [0], [1]) 295s ***** error ... 295s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 295s ***** error ... 295s plpdf (1, [0, 1, 2], [0, i, 1]) 295s ***** error ... 295s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 295s ***** error ... 295s plpdf (1, [0, i, 2], [0, 0.5, 1]) 295s ***** error ... 295s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 295s 15 tests, 15 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/gumbelinv.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gumbelinv.m 295s ***** demo 295s ## Plot various iCDFs from the Gumbel distribution 295s p = 0.001:0.001:0.999; 295s x1 = gumbelinv (p, 0.5, 2); 295s x2 = gumbelinv (p, 1.0, 2); 295s x3 = gumbelinv (p, 1.5, 3); 295s x4 = gumbelinv (p, 3.0, 4); 295s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 295s grid on 295s ylim ([-5, 20]) 295s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 295s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 295s title ("Gumbel iCDF") 295s xlabel ("probability") 295s ylabel ("values in x") 295s ***** shared p, x 295s p = [0, 0.05, 0.5 0.95]; 295s x = [-Inf, -1.0972, 0.3665, 2.9702]; 295s ***** assert (gumbelinv (p), x, 1e-4) 295s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 295s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 295s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 295s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 295s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 295s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 295s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 295s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 295s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 295s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 295s p = [0.05, 0.5, 0.95]; 295s x = gumbelinv(p); 295s ***** assert (gumbelcdf(x), p, 1e-4) 295s ***** error gumbelinv () 295s ***** error gumbelinv (1,2,3,4,5,6) 295s ***** error ... 295s gumbelinv (ones (3), ones (2), ones (2)) 295s ***** error ... 295s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 295s ***** error ... 295s [p, plo, pup] = gumbelinv (1, 2, 3) 295s ***** error [p, plo, pup] = ... 295s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 295s ***** error [p, plo, pup] = ... 295s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 295s ***** error gumbelinv (i, 2, 2) 295s ***** error gumbelinv (2, i, 2) 295s ***** error gumbelinv (2, 2, i) 295s ***** error ... 295s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 295s 23 tests, 23 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/tlscdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tlscdf.m 295s ***** demo 295s ## Plot various CDFs from the location-scale Student's T distribution 295s x = -8:0.01:8; 295s p1 = tlscdf (x, 0, 1, 1); 295s p2 = tlscdf (x, 0, 2, 2); 295s p3 = tlscdf (x, 3, 2, 5); 295s p4 = tlscdf (x, -1, 3, Inf); 295s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 295s grid on 295s xlim ([-8, 8]) 295s ylim ([0, 1]) 295s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 295s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 295s "location", "northwest") 295s title ("Location-scale Student's T CDF") 295s xlabel ("values in x") 295s ylabel ("probability") 295s ***** shared x,y 295s x = [-Inf 0 1 Inf]; 295s y = [0 1/2 3/4 1]; 295s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 295s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 295s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 295s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 295s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 295s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 295s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 295s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 295s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 295s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 295s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 295s ***** error tlscdf () 295s ***** error tlscdf (1) 295s ***** error tlscdf (1, 2) 295s ***** error tlscdf (1, 2, 3) 295s ***** error tlscdf (1, 2, 3, 4, "uper") 295s ***** error tlscdf (1, 2, 3, 4, 5) 295s ***** error ... 295s tlscdf (ones (3), ones (2), 1, 1) 295s ***** error ... 295s tlscdf (ones (3), 1, ones (2), 1) 295s ***** error ... 295s tlscdf (ones (3), 1, 1, ones (2)) 295s ***** error ... 295s tlscdf (ones (3), ones (2), 1, 1, "upper") 295s ***** error ... 295s tlscdf (ones (3), 1, ones (2), 1, "upper") 295s ***** error ... 295s tlscdf (ones (3), 1, 1, ones (2), "upper") 295s ***** error tlscdf (i, 2, 1, 1) 295s ***** error tlscdf (2, i, 1, 1) 295s ***** error tlscdf (2, 1, i, 1) 295s ***** error tlscdf (2, 1, 1, i) 295s 27 tests, 27 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/vmrnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/vmrnd.m 295s ***** assert (size (vmrnd (1, 1)), [1 1]) 295s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 295s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 295s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 295s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 295s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 295s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 295s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 295s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 295s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 295s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 295s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 295s ***** assert (class (vmrnd (1, 1)), "double") 295s ***** assert (class (vmrnd (1, single (1))), "single") 295s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 295s ***** assert (class (vmrnd (single (1), 1)), "single") 295s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 295s ***** error vmrnd () 295s ***** error vmrnd (1) 295s ***** error ... 295s vmrnd (ones (3), ones (2)) 295s ***** error ... 295s vmrnd (ones (2), ones (3)) 295s ***** error vmrnd (i, 2, 3) 295s ***** error vmrnd (1, i, 3) 295s ***** error ... 295s vmrnd (1, 2, -1) 295s ***** error ... 295s vmrnd (1, 2, 1.2) 295s ***** error ... 295s vmrnd (1, 2, ones (2)) 295s ***** error ... 295s vmrnd (1, 2, [2 -1 2]) 295s ***** error ... 295s vmrnd (1, 2, [2 0 2.5]) 295s ***** error ... 295s vmrnd (1, 2, 2, -1, 5) 295s ***** error ... 295s vmrnd (1, 2, 2, 1.5, 5) 295s ***** error ... 295s vmrnd (2, ones (2), 3) 295s ***** error ... 295s vmrnd (2, ones (2), [3, 2]) 295s ***** error ... 295s vmrnd (2, ones (2), 3, 2) 295s 33 tests, 33 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/nctrnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nctrnd.m 295s ***** assert (size (nctrnd (1, 1)), [1 1]) 295s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 295s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 295s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 295s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 295s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 295s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 295s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 295s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 295s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 295s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 295s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 295s ***** assert (class (nctrnd (1, 1)), "double") 295s ***** assert (class (nctrnd (1, single (1))), "single") 295s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 295s ***** assert (class (nctrnd (single (1), 1)), "single") 295s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 295s ***** error nctrnd () 295s ***** error nctrnd (1) 295s ***** error ... 295s nctrnd (ones (3), ones (2)) 295s ***** error ... 295s nctrnd (ones (2), ones (3)) 295s ***** error nctrnd (i, 2) 295s ***** error nctrnd (1, i) 295s ***** error ... 295s nctrnd (1, 2, -1) 295s ***** error ... 295s nctrnd (1, 2, 1.2) 295s ***** error ... 295s nctrnd (1, 2, ones (2)) 295s ***** error ... 295s nctrnd (1, 2, [2 -1 2]) 295s ***** error ... 295s nctrnd (1, 2, [2 0 2.5]) 295s ***** error ... 295s nctrnd (1, 2, 2, -1, 5) 295s ***** error ... 295s nctrnd (1, 2, 2, 1.5, 5) 295s ***** error ... 295s nctrnd (2, ones (2), 3) 295s ***** error ... 295s nctrnd (2, ones (2), [3, 2]) 295s ***** error ... 295s nctrnd (2, ones (2), 3, 2) 295s 33 tests, 33 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/geoinv.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/geoinv.m 295s ***** demo 295s ## Plot various iCDFs from the geometric distribution 295s p = 0.001:0.001:0.999; 295s x1 = geoinv (p, 0.2); 295s x2 = geoinv (p, 0.5); 295s x3 = geoinv (p, 0.7); 295s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 295s grid on 295s ylim ([0, 10]) 295s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 295s title ("Geometric iCDF") 295s xlabel ("probability") 295s ylabel ("values in x (number of failures)") 295s ***** shared p 295s p = [-1 0 0.75 1 2]; 295s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 295s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 295s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 295s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 295s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 295s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 295s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 295s ***** error geoinv () 295s ***** error geoinv (1) 295s ***** error ... 295s geoinv (ones (3), ones (2)) 295s ***** error ... 295s geoinv (ones (2), ones (3)) 295s ***** error ... 295s geoinv (i, 2) 295s ***** error ... 295s geoinv (2, i) 295s 13 tests, 13 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/copulacdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/copulacdf.m 295s ***** test 295s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 295s theta = [1; 2]; 295s p = copulacdf ("Clayton", x, theta); 295s expected_p = [0.1395; 0.1767]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 295s p = copulacdf ("Gumbel", x, 2); 295s expected_p = [0.1464; 0.1464]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 295s theta = [1; 2]; 295s p = copulacdf ("Frank", x, theta); 295s expected_p = [0.0699; 0.0930]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 295s theta = [0.3; 0.7]; 295s p = copulacdf ("AMH", x, theta); 295s expected_p = [0.0629; 0.0959]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 295s theta = [0.2, 0.1, 0.1, 0.05]; 295s p = copulacdf ("FGM", x, theta); 295s expected_p = [0.0558; 0.0293]; 295s assert (p, expected_p, 0.001); 295s 5 tests, 5 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/nbinrnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nbinrnd.m 295s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 295s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 295s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 295s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 295s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 295s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 295s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 295s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 295s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 295s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 295s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 295s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 295s ***** assert (class (nbinrnd (1, 0.5)), "double") 295s ***** assert (class (nbinrnd (1, single (0.5))), "single") 295s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 295s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 295s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 295s ***** error nbinrnd () 295s ***** error nbinrnd (1) 295s ***** error ... 295s nbinrnd (ones (3), ones (2)) 295s ***** error ... 295s nbinrnd (ones (2), ones (3)) 295s ***** error nbinrnd (i, 2, 3) 295s ***** error nbinrnd (1, i, 3) 295s ***** error ... 295s nbinrnd (1, 2, -1) 295s ***** error ... 295s nbinrnd (1, 2, 1.2) 295s ***** error ... 295s nbinrnd (1, 2, ones (2)) 295s ***** error ... 295s nbinrnd (1, 2, [2 -1 2]) 295s ***** error ... 295s nbinrnd (1, 2, [2 0 2.5]) 295s ***** error ... 295s nbinrnd (1, 2, 2, -1, 5) 295s ***** error ... 295s nbinrnd (1, 2, 2, 1.5, 5) 295s ***** error ... 295s nbinrnd (2, ones (2), 3) 295s ***** error ... 295s nbinrnd (2, ones (2), [3, 2]) 295s ***** error ... 295s nbinrnd (2, ones (2), 3, 2) 295s 33 tests, 33 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/nbinpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nbinpdf.m 295s ***** demo 295s ## Plot various PDFs from the negative binomial distribution 295s x = 0:40; 295s y1 = nbinpdf (x, 2, 0.15); 295s y2 = nbinpdf (x, 5, 0.2); 295s y3 = nbinpdf (x, 4, 0.4); 295s y4 = nbinpdf (x, 10, 0.3); 295s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 295s grid on 295s xlim ([0, 40]) 295s ylim ([0, 0.12]) 295s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 295s "r = 10, ps = 0.3"}, "location", "northeast") 295s title ("Negative binomial PDF") 295s xlabel ("values in x (number of failures)") 295s ylabel ("density") 295s ***** shared x, y 295s x = [-1 0 1 2 Inf]; 295s y = [0 1/2 1/4 1/8 NaN]; 295s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 295s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 295s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 295s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 295s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 295s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 295s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 295s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 295s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 295s ***** error nbinpdf () 295s ***** error nbinpdf (1) 295s ***** error nbinpdf (1, 2) 295s ***** error ... 295s nbinpdf (ones (3), ones (2), ones (2)) 295s ***** error ... 295s nbinpdf (ones (2), ones (3), ones (2)) 295s ***** error ... 295s nbinpdf (ones (2), ones (2), ones (3)) 295s ***** error nbinpdf (i, 2, 2) 295s ***** error nbinpdf (2, i, 2) 295s ***** error nbinpdf (2, 2, i) 295s 18 tests, 18 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/mvnpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvnpdf.m 295s ***** demo 295s mu = [1, -1]; 295s sigma = [0.9, 0.4; 0.4, 0.3]; 295s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 295s x = [X1(:), X2(:)]; 295s p = mvnpdf (x, mu, sigma); 295s surf (X1, X2, reshape (p, 25, 25)); 295s ***** error y = mvnpdf (); 295s ***** error y = mvnpdf ([]); 295s ***** error y = mvnpdf (ones (3,3,3)); 295s ***** error ... 295s y = mvnpdf (ones (10, 2), [4, 2, 3]); 295s ***** error ... 295s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 295s ***** error ... 295s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 295s ***** shared x, mu, sigma 295s x = [1, 2, 5, 4, 6]; 295s mu = [2, 0, -1, 1, 4]; 295s sigma = [2, 2, 2, 2, 2]; 295s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 295s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 295s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 295s 9 tests, 9 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/gevcdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gevcdf.m 295s ***** demo 295s ## Plot various CDFs from the generalized extreme value distribution 295s x = -1:0.001:10; 295s p1 = gevcdf (x, 1, 1, 1); 295s p2 = gevcdf (x, 0.5, 1, 1); 295s p3 = gevcdf (x, 1, 1, 5); 295s p4 = gevcdf (x, 1, 2, 5); 295s p5 = gevcdf (x, 1, 5, 5); 295s p6 = gevcdf (x, 1, 0.5, 5); 295s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 295s x, p4, "-c", x, p5, "-m", x, p6, "-k") 295s grid on 295s xlim ([-1, 10]) 295s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 295s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 295s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 295s "location", "southeast") 295s title ("Generalized extreme value CDF") 295s xlabel ("values in x") 295s ylabel ("probability") 295s ***** test 295s x = 0:0.5:2.5; 295s sigma = 1:6; 295s k = 1; 295s mu = 0; 295s p = gevcdf (x, k, sigma, mu); 295s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = -0.5:0.5:2.5; 295s sigma = 0.5; 295s k = 1; 295s mu = 0; 295s p = gevcdf (x, k, sigma, mu); 295s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 295s assert (p, expected_p, 0.001); 295s ***** test # check for continuity for k near 0 295s x = 1; 295s sigma = 0.5; 295s k = -0.03:0.01:0.03; 295s mu = 0; 295s p = gevcdf (x, k, sigma, mu); 295s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 295s assert (p, expected_p, 0.001); 295s ***** error gevcdf () 295s ***** error gevcdf (1) 295s ***** error gevcdf (1, 2) 295s ***** error gevcdf (1, 2, 3) 295s ***** error ... 295s gevcdf (1, 2, 3, 4, 5, 6) 295s ***** error gevcdf (1, 2, 3, 4, "tail") 295s ***** error gevcdf (1, 2, 3, 4, 5) 295s ***** error ... 295s gevcdf (ones (3), ones (2), ones(2), ones(2)) 295s ***** error ... 295s gevcdf (ones (2), ones (3), ones(2), ones(2)) 295s ***** error ... 295s gevcdf (ones (2), ones (2), ones(3), ones(2)) 295s ***** error ... 295s gevcdf (ones (2), ones (2), ones(2), ones(3)) 295s ***** error gevcdf (i, 2, 3, 4) 295s ***** error gevcdf (1, i, 3, 4) 295s ***** error gevcdf (1, 2, i, 4) 295s ***** error gevcdf (1, 2, 3, i) 295s 18 tests, 18 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/unidpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unidpdf.m 295s ***** demo 295s ## Plot various PDFs from the discrete uniform distribution 295s x = 0:10; 295s y1 = unidpdf (x, 5); 295s y2 = unidpdf (x, 9); 295s plot (x, y1, "*b", x, y2, "*g") 295s grid on 295s xlim ([0, 10]) 295s ylim ([0, 0.25]) 295s legend ({"N = 5", "N = 9"}, "location", "northeast") 295s title ("Descrete uniform PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** shared x, y 295s x = [-1 0 1 2 10 11]; 295s y = [0 0 0.1 0.1 0.1 0]; 295s ***** assert (unidpdf (x, 10*ones (1,6)), y) 295s ***** assert (unidpdf (x, 10), y) 295s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 295s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 295s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 295s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 295s ***** error unidpdf () 295s ***** error unidpdf (1) 295s ***** error ... 295s unidpdf (ones (3), ones (2)) 295s ***** error ... 295s unidpdf (ones (2), ones (3)) 295s ***** error unidpdf (i, 2) 295s ***** error unidpdf (2, i) 295s 12 tests, 12 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/tpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tpdf.m 295s ***** demo 295s ## Plot various PDFs from the Student's T distribution 295s x = -5:0.01:5; 295s y1 = tpdf (x, 1); 295s y2 = tpdf (x, 2); 295s y3 = tpdf (x, 5); 295s y4 = tpdf (x, Inf); 295s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 295s grid on 295s xlim ([-5, 5]) 295s ylim ([0, 0.41]) 295s legend ({"df = 1", "df = 2", ... 295s "df = 5", 'df = \infty'}, "location", "northeast") 295s title ("Student's T PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** test 295s x = rand (10,1); 295s y = 1./(pi * (1 + x.^2)); 295s assert (tpdf (x, 1), y, 5*eps); 295s ***** shared x, y 295s x = [-Inf 0 0.5 1 Inf]; 295s y = 1./(pi * (1 + x.^2)); 295s ***** assert (tpdf (x, ones (1,5)), y, eps) 295s ***** assert (tpdf (x, 1), y, eps) 295s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 295s ***** assert (tpdf (x, Inf), normpdf (x)) 295s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 295s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 295s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 295s ***** error tpdf () 295s ***** error tpdf (1) 295s ***** error ... 295s tpdf (ones (3), ones (2)) 295s ***** error ... 295s tpdf (ones (2), ones (3)) 295s ***** error tpdf (i, 2) 295s ***** error tpdf (2, i) 295s 14 tests, 14 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/copularnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/copularnd.m 295s ***** test 295s theta = 0.5; 295s r = copularnd ("Gaussian", theta); 295s assert (size (r), [1, 2]); 295s assert (all ((r >= 0) & (r <= 1))); 295s ***** test 295s theta = 0.5; 295s df = 2; 295s r = copularnd ("t", theta, df); 295s assert (size (r), [1, 2]); 295s assert (all ((r >= 0) & (r <= 1))); 295s ***** test 295s theta = 0.5; 295s r = copularnd ("Clayton", theta); 295s assert (size (r), [1, 2]); 295s assert (all ((r >= 0) & (r <= 1))); 295s ***** test 295s theta = 0.5; 295s n = 2; 295s r = copularnd ("Clayton", theta, n); 295s assert (size (r), [n, 2]); 295s assert (all ((r >= 0) & (r <= 1))); 295s ***** test 295s theta = [1; 2]; 295s n = 2; 295s d = 3; 295s r = copularnd ("Clayton", theta, n, d); 295s assert (size (r), [n, d]); 295s assert (all ((r >= 0) & (r <= 1))); 295s 5 tests, 5 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/laplacepdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/laplacepdf.m 295s ***** demo 295s ## Plot various PDFs from the Laplace distribution 295s x = -10:0.01:10; 295s y1 = laplacepdf (x, 0, 1); 295s y2 = laplacepdf (x, 0, 2); 295s y3 = laplacepdf (x, 0, 4); 295s y4 = laplacepdf (x, -5, 4); 295s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 295s grid on 295s xlim ([-10, 10]) 295s ylim ([0, 0.6]) 295s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 295s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 295s title ("Laplace PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** shared x, y 295s x = [-Inf -log(2) 0 log(2) Inf]; 295s y = [0, 1/4, 1/2, 1/4, 0]; 295s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 295s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 295s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 295s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 295s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 295s ***** error laplacepdf () 295s ***** error laplacepdf (1) 295s ***** error ... 295s laplacepdf (1, 2) 295s ***** error laplacepdf (1, 2, 3, 4) 295s ***** error ... 295s laplacepdf (1, ones (2), ones (3)) 295s ***** error ... 295s laplacepdf (ones (2), 1, ones (3)) 295s ***** error ... 295s laplacepdf (ones (2), ones (3), 1) 295s ***** error laplacepdf (i, 2, 3) 295s ***** error laplacepdf (1, i, 3) 295s ***** error laplacepdf (1, 2, i) 295s 15 tests, 15 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/raylpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/raylpdf.m 295s ***** demo 295s ## Plot various PDFs from the Rayleigh distribution 295s x = 0:0.01:10; 295s y1 = raylpdf (x, 0.5); 295s y2 = raylpdf (x, 1); 295s y3 = raylpdf (x, 2); 295s y4 = raylpdf (x, 3); 295s y5 = raylpdf (x, 4); 295s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 295s grid on 295s ylim ([0, 1.25]) 295s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 295s "σ = 3", "σ = 4"}, "location", "northeast") 295s title ("Rayleigh PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** test 295s x = 0:0.5:2.5; 295s sigma = 1:6; 295s y = raylpdf (x, sigma); 295s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 295s assert (y, expected_y, 0.001); 295s ***** test 295s x = 0:0.5:2.5; 295s y = raylpdf (x, 0.5); 295s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 295s assert (y, expected_y, 0.001); 295s ***** error raylpdf () 295s ***** error raylpdf (1) 295s ***** error ... 295s raylpdf (ones (3), ones (2)) 295s ***** error ... 295s raylpdf (ones (2), ones (3)) 295s ***** error raylpdf (i, 2) 295s ***** error raylpdf (2, i) 295s 8 tests, 8 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/chi2rnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/chi2rnd.m 295s ***** assert (size (chi2rnd (2)), [1, 1]) 295s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 295s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 295s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 295s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 295s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 295s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 295s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 295s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 295s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 295s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 295s ***** assert (class (chi2rnd (2)), "double") 295s ***** assert (class (chi2rnd (single (2))), "single") 295s ***** assert (class (chi2rnd (single ([2 2]))), "single") 295s ***** error chi2rnd () 295s ***** error chi2rnd (i) 295s ***** error ... 295s chi2rnd (1, -1) 295s ***** error ... 295s chi2rnd (1, 1.2) 295s ***** error ... 295s chi2rnd (1, ones (2)) 295s ***** error ... 295s chi2rnd (1, [2 -1 2]) 295s ***** error ... 295s chi2rnd (1, [2 0 2.5]) 295s ***** error ... 295s chi2rnd (ones (2), ones (2)) 295s ***** error ... 295s chi2rnd (1, 2, -1, 5) 295s ***** error ... 295s chi2rnd (1, 2, 1.5, 5) 295s ***** error chi2rnd (ones (2,2), 3) 295s ***** error chi2rnd (ones (2,2), [3, 2]) 295s ***** error chi2rnd (ones (2,2), 2, 3) 295s 27 tests, 27 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/frnd.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/frnd.m 295s ***** assert (size (frnd (1, 1)), [1 1]) 295s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 295s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 295s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 295s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 295s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 295s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 295s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 295s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 295s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 295s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 295s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 295s ***** assert (class (frnd (1, 1)), "double") 295s ***** assert (class (frnd (1, single (1))), "single") 295s ***** assert (class (frnd (1, single ([1, 1]))), "single") 295s ***** assert (class (frnd (single (1), 1)), "single") 295s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 295s ***** error frnd () 295s ***** error frnd (1) 295s ***** error ... 295s frnd (ones (3), ones (2)) 295s ***** error ... 295s frnd (ones (2), ones (3)) 295s ***** error frnd (i, 2, 3) 295s ***** error frnd (1, i, 3) 295s ***** error ... 295s frnd (1, 2, -1) 295s ***** error ... 295s frnd (1, 2, 1.2) 295s ***** error ... 295s frnd (1, 2, ones (2)) 295s ***** error ... 295s frnd (1, 2, [2 -1 2]) 295s ***** error ... 295s frnd (1, 2, [2 0 2.5]) 295s ***** error ... 295s frnd (1, 2, 2, -1, 5) 295s ***** error ... 295s frnd (1, 2, 2, 1.5, 5) 295s ***** error ... 295s frnd (2, ones (2), 3) 295s ***** error ... 295s frnd (2, ones (2), [3, 2]) 295s ***** error ... 295s frnd (2, ones (2), 3, 2) 295s 33 tests, 33 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/binocdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/binocdf.m 295s ***** demo 295s ## Plot various CDFs from the binomial distribution 295s x = 0:40; 295s p1 = binocdf (x, 20, 0.5); 295s p2 = binocdf (x, 20, 0.7); 295s p3 = binocdf (x, 40, 0.5); 295s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 295s grid on 295s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 295s "n = 40, ps = 0.5"}, "location", "southeast") 295s title ("Binomial CDF") 295s xlabel ("values in x (number of successes)") 295s ylabel ("probability") 295s ***** shared x, p, p1 295s x = [-1 0 1 2 3]; 295s p = [0 1/4 3/4 1 1]; 295s p1 = 1 - p; 295s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 295s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 295s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 295s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 295s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 295s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 295s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 295s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 295s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 295s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 295s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 295s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 295s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 295s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 295s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 295s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 295s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 295s ***** error binocdf () 295s ***** error binocdf (1) 295s ***** error binocdf (1, 2) 295s ***** error binocdf (1, 2, 3, 4, 5) 295s ***** error binocdf (1, 2, 3, "tail") 295s ***** error binocdf (1, 2, 3, 4) 295s ***** error ... 295s binocdf (ones (3), ones (2), ones (2)) 295s ***** error ... 295s binocdf (ones (2), ones (3), ones (2)) 295s ***** error ... 295s binocdf (ones (2), ones (2), ones (3)) 295s ***** error binocdf (i, 2, 2) 295s ***** error binocdf (2, i, 2) 295s ***** error binocdf (2, 2, i) 295s 29 tests, 29 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/raylcdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/raylcdf.m 295s ***** demo 295s ## Plot various CDFs from the Rayleigh distribution 295s x = 0:0.01:10; 295s p1 = raylcdf (x, 0.5); 295s p2 = raylcdf (x, 1); 295s p3 = raylcdf (x, 2); 295s p4 = raylcdf (x, 3); 295s p5 = raylcdf (x, 4); 295s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 295s grid on 295s ylim ([0, 1]) 295s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 295s "σ = 3", "σ = 4"}, "location", "southeast") 295s title ("Rayleigh CDF") 295s xlabel ("values in x") 295s ylabel ("probability") 295s ***** test 295s x = 0:0.5:2.5; 295s sigma = 1:6; 295s p = raylcdf (x, sigma); 295s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 295s assert (p, expected_p, 0.001); 295s ***** test 295s x = 0:0.5:2.5; 295s p = raylcdf (x, 0.5); 295s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 295s assert (p, expected_p, 0.001); 295s ***** shared x, p 295s x = [-1, 0, 1, 2, Inf]; 295s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 295s ***** assert (raylcdf (x, 1), p, 1e-14) 295s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 295s ***** error raylcdf () 295s ***** error raylcdf (1) 295s ***** error raylcdf (1, 2, "uper") 295s ***** error raylcdf (1, 2, 3) 295s ***** error ... 295s raylcdf (ones (3), ones (2)) 295s ***** error ... 295s raylcdf (ones (2), ones (3)) 295s ***** error raylcdf (i, 2) 295s ***** error raylcdf (2, i) 295s 12 tests, 12 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/hnpdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hnpdf.m 295s ***** demo 295s ## Plot various PDFs from the half-normal distribution 295s x = 0:0.001:10; 295s y1 = hnpdf (x, 0, 1); 295s y2 = hnpdf (x, 0, 2); 295s y3 = hnpdf (x, 0, 3); 295s y4 = hnpdf (x, 0, 5); 295s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 295s grid on 295s xlim ([0, 10]) 295s ylim ([0, 0.9]) 295s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 295s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 295s title ("Half-normal PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** demo 295s ## Plot half-normal against normal probability density function 295s x = -5:0.001:5; 295s y1 = hnpdf (x, 0, 1); 295s y2 = normpdf (x); 295s plot (x, y1, "-b", x, y2, "-g") 295s grid on 295s xlim ([-5, 5]) 295s ylim ([0, 0.9]) 295s legend ({"half-normal with μ = 0, σ = 1", ... 295s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 295s title ("Half-normal against standard normal PDF") 295s xlabel ("values in x") 295s ylabel ("density") 295s ***** shared x, y 295s x = [-Inf, -1, 0, 1/2, 1, Inf]; 295s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 295s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 295s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 295s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 295s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 295s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 295s ***** error hnpdf () 295s ***** error hnpdf (1) 295s ***** error hnpdf (1, 2) 295s ***** error ... 295s hnpdf (1, ones (2), ones (3)) 295s ***** error ... 295s hnpdf (ones (2), 1, ones (3)) 295s ***** error ... 295s hnpdf (ones (2), ones (3), 1) 295s ***** error hnpdf (i, 2, 3) 295s ***** error hnpdf (1, i, 3) 295s ***** error hnpdf (1, 2, i) 295s 14 tests, 14 passed, 0 known failure, 0 skipped 295s [inst/dist_fun/vmcdf.m] 295s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/vmcdf.m 295s ***** demo 295s ## Plot various CDFs from the von Mises distribution 295s x1 = [-pi:0.1:pi]; 295s p1 = vmcdf (x1, 0, 0.5); 295s p2 = vmcdf (x1, 0, 1); 295s p3 = vmcdf (x1, 0, 2); 295s p4 = vmcdf (x1, 0, 4); 295s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 295s grid on 295s xlim ([-pi, pi]) 295s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 295s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 295s title ("Von Mises CDF") 295s xlabel ("values in x") 295s ylabel ("probability") 295s ***** shared x, p0, p1 295s x = [-pi:pi/2:pi]; 295s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 295s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 295s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 295s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 296s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 296s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 296s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 296s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 296s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 296s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 296s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 296s ***** error vmcdf () 296s ***** error vmcdf (1) 296s ***** error vmcdf (1, 2) 296s ***** error vmcdf (1, 2, 3, "tail") 296s ***** error vmcdf (1, 2, 3, 4) 296s ***** error ... 296s vmcdf (ones (3), ones (2), ones (2)) 296s ***** error ... 296s vmcdf (ones (2), ones (3), ones (2)) 296s ***** error ... 296s vmcdf (ones (2), ones (2), ones (3)) 296s ***** error vmcdf (i, 2, 2) 296s ***** error vmcdf (2, i, 2) 296s ***** error vmcdf (2, 2, i) 296s 20 tests, 20 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/vmpdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/vmpdf.m 296s ***** demo 296s ## Plot various PDFs from the von Mises distribution 296s x1 = [-pi:0.1:pi]; 296s y1 = vmpdf (x1, 0, 0.5); 296s y2 = vmpdf (x1, 0, 1); 296s y3 = vmpdf (x1, 0, 2); 296s y4 = vmpdf (x1, 0, 4); 296s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 296s grid on 296s xlim ([-pi, pi]) 296s ylim ([0, 0.8]) 296s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 296s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 296s title ("Von Mises PDF") 296s xlabel ("values in x") 296s ylabel ("density") 296s ***** shared x, y0, y1 296s x = [-pi:pi/2:pi]; 296s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 296s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 296s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 296s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 296s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 296s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 296s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 296s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 296s ***** error vmpdf () 296s ***** error vmpdf (1) 296s ***** error vmpdf (1, 2) 296s ***** error ... 296s vmpdf (ones (3), ones (2), ones (2)) 296s ***** error ... 296s vmpdf (ones (2), ones (3), ones (2)) 296s ***** error ... 296s vmpdf (ones (2), ones (2), ones (3)) 296s ***** error vmpdf (i, 2, 2) 296s ***** error vmpdf (2, i, 2) 296s ***** error vmpdf (2, 2, i) 296s 15 tests, 15 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/fpdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/fpdf.m 296s ***** demo 296s ## Plot various PDFs from the F distribution 296s x = 0.01:0.01:4; 296s y1 = fpdf (x, 1, 1); 296s y2 = fpdf (x, 2, 1); 296s y3 = fpdf (x, 5, 2); 296s y4 = fpdf (x, 10, 1); 296s y5 = fpdf (x, 100, 100); 296s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 296s grid on 296s ylim ([0, 2.5]) 296s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 296s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 296s "df1 = 100, df2 = 100"}, "location", "northeast") 296s title ("F PDF") 296s xlabel ("values in x") 296s ylabel ("density") 296s ***** shared x, y 296s x = [-1 0 0.5 1 2]; 296s y = [0 0 4/9 1/4 1/9]; 296s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 296s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 296s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 296s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 296s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 296s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 296s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 296s rand ("seed", 1234); # for reproducibility 296s xr = rand (10,1); 296s xr = xr(x > 0.1 & x < 0.9); 296s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 296s assert (fpdf (xr, 1, 2), yr, 5*eps); 296s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 296s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 296s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 296s ***** error fpdf () 296s ***** error fpdf (1) 296s ***** error fpdf (1,2) 296s ***** error ... 296s fpdf (ones (3), ones (2), ones (2)) 296s ***** error ... 296s fpdf (ones (2), ones (3), ones (2)) 296s ***** error ... 296s fpdf (ones (2), ones (2), ones (3)) 296s ***** error fpdf (i, 2, 2) 296s ***** error fpdf (2, i, 2) 296s ***** error fpdf (2, 2, i) 296s 19 tests, 19 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/betainv.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/betainv.m 296s ***** demo 296s ## Plot various iCDFs from the Beta distribution 296s p = 0.001:0.001:0.999; 296s x1 = betainv (p, 0.5, 0.5); 296s x2 = betainv (p, 5, 1); 296s x3 = betainv (p, 1, 3); 296s x4 = betainv (p, 2, 2); 296s x5 = betainv (p, 2, 5); 296s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 296s grid on 296s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 296s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 296s title ("Beta iCDF") 296s xlabel ("probability") 296s ylabel ("values in x") 296s ***** shared p 296s p = [-1 0 0.75 1 2]; 296s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 296s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 296s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 296s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 296s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 296s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 296s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 296s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 296s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 296s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 296s ***** error betainv () 296s ***** error betainv (1) 296s ***** error betainv (1,2) 296s ***** error betainv (1,2,3,4) 296s ***** error ... 296s betainv (ones (3), ones (2), ones (2)) 296s ***** error ... 296s betainv (ones (2), ones (3), ones (2)) 296s ***** error ... 296s betainv (ones (2), ones (2), ones (3)) 296s ***** error betainv (i, 2, 2) 296s ***** error betainv (2, i, 2) 296s ***** error betainv (2, 2, i) 296s 20 tests, 20 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/gaminv.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gaminv.m 296s ***** demo 296s ## Plot various iCDFs from the Gamma distribution 296s p = 0.001:0.001:0.999; 296s x1 = gaminv (p, 1, 2); 296s x2 = gaminv (p, 2, 2); 296s x3 = gaminv (p, 3, 2); 296s x4 = gaminv (p, 5, 1); 296s x5 = gaminv (p, 9, 0.5); 296s x6 = gaminv (p, 7.5, 1); 296s x7 = gaminv (p, 0.5, 1); 296s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 296s p, x5, "-k", p, x6, "-b", p, x7, "-c") 296s ylim ([0, 20]) 296s grid on 296s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 296s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 296s "α = 0.5, β = 1"}, "location", "northwest") 296s title ("Gamma iCDF") 296s xlabel ("probability") 296s ylabel ("x") 296s ***** shared p 296s p = [-1 0 0.63212055882855778 1 2]; 296s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 296s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 296s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 296s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 296s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 296s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 296s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 296s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 296s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 296s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 296s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 296s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 296s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 296s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 296s eps ("single")) 296s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 296s eps ("single")) 296s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 296s eps ("single")) 296s ***** error gaminv () 296s ***** error gaminv (1) 296s ***** error gaminv (1,2) 296s ***** error ... 296s gaminv (ones (3), ones (2), ones (2)) 296s ***** error ... 296s gaminv (ones (2), ones (3), ones (2)) 296s ***** error ... 296s gaminv (ones (2), ones (2), ones (3)) 296s ***** error gaminv (i, 2, 2) 296s ***** error gaminv (2, i, 2) 296s ***** error gaminv (2, 2, i) 296s 25 tests, 25 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/normcdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/normcdf.m 296s ***** demo 296s ## Plot various CDFs from the normal distribution 296s x = -5:0.01:5; 296s p1 = normcdf (x, 0, 0.5); 296s p2 = normcdf (x, 0, 1); 296s p3 = normcdf (x, 0, 2); 296s p4 = normcdf (x, -2, 0.8); 296s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 296s grid on 296s xlim ([-5, 5]) 296s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 296s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 296s title ("Normal CDF") 296s xlabel ("values in x") 296s ylabel ("probability") 296s ***** shared x, y 296s x = [-Inf 1 2 Inf]; 296s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 296s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 296s ***** assert (normcdf (x, 1, ones (1,4)), y) 296s ***** assert (normcdf (x, ones (1,4), 1), y) 296s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 296s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 296s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 296s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 296s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 296s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 296s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 296s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 296s ***** error normcdf () 296s ***** error normcdf (1,2,3,4,5,6,7) 296s ***** error normcdf (1, 2, 3, 4, "uper") 296s ***** error ... 296s normcdf (ones (3), ones (2), ones (2)) 296s ***** error normcdf (2, 3, 4, [1, 2]) 296s ***** error ... 296s [p, plo, pup] = normcdf (1, 2, 3) 296s ***** error [p, plo, pup] = ... 296s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 296s ***** error [p, plo, pup] = ... 296s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 296s ***** error [p, plo, pup] = ... 296s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 296s ***** error normcdf (i, 2, 2) 296s ***** error normcdf (2, i, 2) 296s ***** error normcdf (2, 2, i) 296s ***** error ... 296s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 296s 24 tests, 24 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/ricepdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ricepdf.m 296s ***** demo 296s ## Plot various PDFs from the Rician distribution 296s x = 0:0.01:8; 296s y1 = ricepdf (x, 0, 1); 296s y2 = ricepdf (x, 0.5, 1); 296s y3 = ricepdf (x, 1, 1); 296s y4 = ricepdf (x, 2, 1); 296s y5 = ricepdf (x, 4, 1); 296s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 296s grid on 296s ylim ([0, 0.65]) 296s xlim ([0, 8]) 296s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 296s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 296s title ("Rician PDF") 296s xlabel ("values in x") 296s ylabel ("density") 296s ***** shared x, y 296s x = [-1 0 0.5 1 2]; 296s y = [0 0 0.1073 0.1978 0.2846]; 296s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 296s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 296s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 296s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 296s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 296s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 296s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 296s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 296s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 296s ***** error ricepdf () 296s ***** error ricepdf (1) 296s ***** error ricepdf (1,2) 296s ***** error ricepdf (1,2,3,4) 296s ***** error ... 296s ricepdf (ones (3), ones (2), ones (2)) 296s ***** error ... 296s ricepdf (ones (2), ones (3), ones (2)) 296s ***** error ... 296s ricepdf (ones (2), ones (2), ones (3)) 296s ***** error ricepdf (i, 2, 2) 296s ***** error ricepdf (2, i, 2) 296s ***** error ricepdf (2, 2, i) 296s 19 tests, 19 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/ncfcdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncfcdf.m 296s ***** demo 296s ## Plot various CDFs from the noncentral F distribution 296s x = 0:0.01:5; 296s p1 = ncfcdf (x, 2, 5, 1); 296s p2 = ncfcdf (x, 2, 5, 2); 296s p3 = ncfcdf (x, 5, 10, 1); 296s p4 = ncfcdf (x, 10, 20, 10); 296s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 296s grid on 296s xlim ([0, 5]) 296s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 296s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 296s "location", "southeast") 296s title ("Noncentral F CDF") 296s xlabel ("values in x") 296s ylabel ("probability") 296s ***** demo 296s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 296s ## same number of numerator and denominator degrees of freedom (5, 20) 296s 296s x = 0.01:0.1:10.01; 296s p1 = ncfcdf (x, 5, 20, 10); 296s p2 = fcdf (x, 5, 20); 296s plot (x, p1, "-", x, p2, "-"); 296s grid on 296s xlim ([0, 10]) 296s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 296s title ("Noncentral F vs F CDFs") 296s xlabel ("values in x") 296s ylabel ("probability") 296s ***** test 296s x = -2:0.1:2; 296s p = ncfcdf (x, 10, 1, 3); 296s assert (p([1:21]), zeros (1, 21), 1e-76); 296s assert (p(22), 0.004530737275319753, 1e-14); 296s assert (p(30), 0.255842099135669, 1e-14); 296s assert (p(41), 0.4379890998457305, 1e-14); 296s ***** test 296s p = ncfcdf (12, 10, 3, 2); 296s assert (p, 0.9582287900447416, 1e-14); 296s ***** test 296s p = ncfcdf (2, 3, 2, 1); 296s assert (p, 0.5731985522994989, 1e-14); 296s ***** test 296s p = ncfcdf (2, 3, 2, 1, "upper"); 296s assert (p, 0.4268014477004823, 1e-14); 296s ***** test 296s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 296s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 296s ***** error ncfcdf () 296s ***** error ncfcdf (1) 296s ***** error ncfcdf (1, 2) 296s ***** error ncfcdf (1, 2, 3) 296s ***** error ncfcdf (1, 2, 3, 4, "tail") 296s ***** error ncfcdf (1, 2, 3, 4, 5) 296s ***** error ... 296s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 296s ***** error ... 296s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 296s ***** error ... 296s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 296s ***** error ... 296s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 296s ***** error ncfcdf (i, 2, 2, 2) 296s ***** error ncfcdf (2, i, 2, 2) 296s ***** error ncfcdf (2, 2, i, 2) 296s ***** error ncfcdf (2, 2, 2, i) 296s 19 tests, 19 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/plinv.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/plinv.m 296s ***** demo 296s ## Plot various iCDFs from the Piecewise linear distribution 296s p = 0.001:0.001:0.999; 296s x1 = [0, 1, 3, 4, 7, 10]; 296s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 296s x2 = [0, 2, 5, 6, 7, 8]; 296s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 296s data1 = plinv (p, x1, Fx1); 296s data2 = plinv (p, x2, Fx2); 296s plot (p, data1, "-b", p, data2, "-g") 296s grid on 296s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 296s title ("Piecewise linear iCDF") 296s xlabel ("probability") 296s ylabel ("values in data") 296s ***** test 296s p = 0:0.2:1; 296s data = plinv (p, [0, 1], [0, 1]); 296s assert (data, p); 296s ***** test 296s p = 0:0.2:1; 296s data = plinv (p, [0, 2], [0, 1]); 296s assert (data, 2 * p); 296s ***** test 296s p = 0:0.2:1; 296s data_out = 1:6; 296s data = plinv (p, [0, 1], [0, 0.5]); 296s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 296s ***** test 296s p = 0:0.2:1; 296s data_out = 1:6; 296s data = plinv (p, [0, 0.5], [0, 1]); 296s assert (data, [0:0.1:0.5]); 296s ***** error plinv () 296s ***** error plinv (1) 296s ***** error plinv (1, 2) 296s ***** error ... 296s plinv (1, [0, 1, 2], [0, 1]) 296s ***** error ... 296s plinv (1, [0], [1]) 296s ***** error ... 296s plinv (1, [0, 1, 2], [0, 1, 1.5]) 296s ***** error ... 296s plinv (1, [0, 1, 2], [0, i, 1]) 296s ***** error ... 296s plinv (i, [0, 1, 2], [0, 0.5, 1]) 296s ***** error ... 296s plinv (1, [0, i, 2], [0, 0.5, 1]) 296s ***** error ... 296s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 296s 14 tests, 14 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/evcdf.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/evcdf.m 296s ***** demo 296s ## Plot various CDFs from the extreme value distribution 296s x = -10:0.01:10; 296s p1 = evcdf (x, 0.5, 2); 296s p2 = evcdf (x, 1.0, 2); 296s p3 = evcdf (x, 1.5, 3); 296s p4 = evcdf (x, 3.0, 4); 296s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 296s grid on 296s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 296s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 296s title ("Extreme value CDF") 296s xlabel ("values in x") 296s ylabel ("probability") 296s ***** shared x, y 296s x = [-Inf, 1, 2, Inf]; 296s y = [0, 0.6321, 0.9340, 1]; 296s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 296s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 296s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 296s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 296s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 296s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 296s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 296s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 296s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 296s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 296s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 296s ***** error evcdf () 296s ***** error evcdf (1,2,3,4,5,6,7) 296s ***** error evcdf (1, 2, 3, 4, "uper") 296s ***** error ... 296s evcdf (ones (3), ones (2), ones (2)) 296s ***** error evcdf (2, 3, 4, [1, 2]) 296s ***** error ... 296s [p, plo, pup] = evcdf (1, 2, 3) 296s ***** error [p, plo, pup] = ... 296s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 296s ***** error [p, plo, pup] = ... 296s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 296s ***** error [p, plo, pup] = ... 296s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 296s ***** error evcdf (i, 2, 2) 296s ***** error evcdf (2, i, 2) 296s ***** error evcdf (2, 2, i) 296s ***** error ... 296s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 296s 24 tests, 24 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/mvtcdfqmc.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvtcdfqmc.m 296s ***** error mvtcdfqmc (1, 2, 3); 296s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 296s 2 tests, 2 passed, 0 known failure, 0 skipped 296s [inst/dist_fun/poissrnd.m] 296s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/poissrnd.m 296s ***** assert (size (poissrnd (2)), [1, 1]) 296s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 296s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 296s ***** assert (size (poissrnd (1, 3)), [3, 3]) 296s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 296s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 296s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 296s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 297s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 297s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 297s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 297s ***** assert (poissrnd (0, 1, 1), 0) 297s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 297s ***** assert (class (poissrnd (2)), "double") 297s ***** assert (class (poissrnd (single (2))), "single") 297s ***** assert (class (poissrnd (single ([2 2]))), "single") 297s ***** error poissrnd () 297s ***** error poissrnd (i) 297s ***** error ... 297s poissrnd (1, -1) 297s ***** error ... 297s poissrnd (1, 1.2) 297s ***** error ... 297s poissrnd (1, ones (2)) 297s ***** error ... 297s poissrnd (1, [2 -1 2]) 297s ***** error ... 297s poissrnd (1, [2 0 2.5]) 297s ***** error ... 297s poissrnd (ones (2), ones (2)) 297s ***** error ... 297s poissrnd (1, 2, -1, 5) 297s ***** error ... 297s poissrnd (1, 2, 1.5, 5) 297s ***** error poissrnd (ones (2,2), 3) 297s ***** error poissrnd (ones (2,2), [3, 2]) 297s ***** error poissrnd (ones (2,2), 2, 3) 297s 29 tests, 29 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/logninv.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logninv.m 297s ***** demo 297s ## Plot various iCDFs from the log-normal distribution 297s p = 0.001:0.001:0.999; 297s x1 = logninv (p, 0, 1); 297s x2 = logninv (p, 0, 0.5); 297s x3 = logninv (p, 0, 0.25); 297s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 297s grid on 297s ylim ([0, 3]) 297s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 297s "location", "northwest") 297s title ("Log-normal iCDF") 297s xlabel ("probability") 297s ylabel ("values in x") 297s ***** shared p 297s p = [-1 0 0.5 1 2]; 297s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 297s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 297s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 297s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 297s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 297s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 297s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 297s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 297s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 297s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 297s ***** error logninv () 297s ***** error logninv (1,2,3,4) 297s ***** error logninv (ones (3), ones (2), ones (2)) 297s ***** error logninv (ones (2), ones (3), ones (2)) 297s ***** error logninv (ones (2), ones (2), ones (3)) 297s ***** error logninv (i, 2, 2) 297s ***** error logninv (2, i, 2) 297s ***** error logninv (2, 2, i) 297s 18 tests, 18 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/cauchyinv.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/cauchyinv.m 297s ***** demo 297s ## Plot various iCDFs from the Cauchy distribution 297s p = 0.001:0.001:0.999; 297s x1 = cauchyinv (p, 0, 0.5); 297s x2 = cauchyinv (p, 0, 1); 297s x3 = cauchyinv (p, 0, 2); 297s x4 = cauchyinv (p, -2, 1); 297s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 297s grid on 297s ylim ([-5, 5]) 297s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 297s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 297s title ("Cauchy iCDF") 297s xlabel ("probability") 297s ylabel ("values in x") 297s ***** shared p 297s p = [-1 0 0.5 1 2]; 297s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 297s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 297s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 297s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 297s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 297s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 297s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 297s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 297s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 297s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 297s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 297s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 297s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 297s ***** error cauchyinv () 297s ***** error cauchyinv (1) 297s ***** error ... 297s cauchyinv (1, 2) 297s ***** error cauchyinv (1, 2, 3, 4) 297s ***** error ... 297s cauchyinv (ones (3), ones (2), ones(2)) 297s ***** error ... 297s cauchyinv (ones (2), ones (3), ones(2)) 297s ***** error ... 297s cauchyinv (ones (2), ones (2), ones(3)) 297s ***** error cauchyinv (i, 4, 3) 297s ***** error cauchyinv (1, i, 3) 297s ***** error cauchyinv (1, 4, i) 297s 20 tests, 20 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/gamrnd.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gamrnd.m 297s ***** assert (size (gamrnd (1, 1)), [1 1]) 297s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 297s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 297s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 297s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 297s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 297s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 297s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 297s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 297s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 297s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 297s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 297s ***** assert (class (gamrnd (1, 1)), "double") 297s ***** assert (class (gamrnd (1, single (1))), "single") 297s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 297s ***** assert (class (gamrnd (single (1), 1)), "single") 297s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 297s ***** error gamrnd () 297s ***** error gamrnd (1) 297s ***** error ... 297s gamrnd (ones (3), ones (2)) 297s ***** error ... 297s gamrnd (ones (2), ones (3)) 297s ***** error gamrnd (i, 2, 3) 297s ***** error gamrnd (1, i, 3) 297s ***** error ... 297s gamrnd (1, 2, -1) 297s ***** error ... 297s gamrnd (1, 2, 1.2) 297s ***** error ... 297s gamrnd (1, 2, ones (2)) 297s ***** error ... 297s gamrnd (1, 2, [2 -1 2]) 297s ***** error ... 297s gamrnd (1, 2, [2 0 2.5]) 297s ***** error ... 297s gamrnd (1, 2, 2, -1, 5) 297s ***** error ... 297s gamrnd (1, 2, 2, 1.5, 5) 297s ***** error ... 297s gamrnd (2, ones (2), 3) 297s ***** error ... 297s gamrnd (2, ones (2), [3, 2]) 297s ***** error ... 297s gamrnd (2, ones (2), 3, 2) 297s 33 tests, 33 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/betacdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/betacdf.m 297s ***** demo 297s ## Plot various CDFs from the Beta distribution 297s x = 0:0.005:1; 297s p1 = betacdf (x, 0.5, 0.5); 297s p2 = betacdf (x, 5, 1); 297s p3 = betacdf (x, 1, 3); 297s p4 = betacdf (x, 2, 2); 297s p5 = betacdf (x, 2, 5); 297s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 297s grid on 297s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 297s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 297s title ("Beta CDF") 297s xlabel ("values in x") 297s ylabel ("probability") 297s ***** shared x, y, x1, x2 297s x = [-1 0 0.5 1 2]; 297s y = [0 0 0.75 1 1]; 297s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 297s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 297s ***** assert (betacdf (x, ones (1, 5), 2), y) 297s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 297s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 297s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 297s x1 = [0.1:0.2:0.9]; 297s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 297s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 297s 1e-14); 297s x2 = [1, 2, 3]; 297s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 297s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 297s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 297s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 297s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 297s ***** error betacdf () 297s ***** error betacdf (1) 297s ***** error betacdf (1, 2) 297s ***** error betacdf (1, 2, 3, 4, 5) 297s ***** error betacdf (1, 2, 3, "tail") 297s ***** error betacdf (1, 2, 3, 4) 297s ***** error ... 297s betacdf (ones (3), ones (2), ones (2)) 297s ***** error ... 297s betacdf (ones (2), ones (3), ones (2)) 297s ***** error ... 297s betacdf (ones (2), ones (2), ones (3)) 297s ***** error betacdf (i, 2, 2) 297s ***** error betacdf (2, i, 2) 297s ***** error betacdf (2, 2, i) 297s 25 tests, 25 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/norminv.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/norminv.m 297s ***** demo 297s ## Plot various iCDFs from the normal distribution 297s p = 0.001:0.001:0.999; 297s x1 = norminv (p, 0, 0.5); 297s x2 = norminv (p, 0, 1); 297s x3 = norminv (p, 0, 2); 297s x4 = norminv (p, -2, 0.8); 297s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 297s grid on 297s ylim ([-5, 5]) 297s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 297s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 297s title ("Normal iCDF") 297s xlabel ("probability") 297s ylabel ("values in x") 297s ***** shared p 297s p = [-1 0 0.5 1 2]; 297s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 297s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 297s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 297s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 297s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 297s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 297s ***** assert (norminv (p), probit (p)) 297s ***** assert (norminv (0.31254), probit (0.31254)) 297s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 297s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 297s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 297s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 297s ***** error norminv () 297s ***** error ... 297s norminv (ones (3), ones (2), ones (2)) 297s ***** error ... 297s norminv (ones (2), ones (3), ones (2)) 297s ***** error ... 297s norminv (ones (2), ones (2), ones (3)) 297s ***** error norminv (i, 2, 2) 297s ***** error norminv (2, i, 2) 297s ***** error norminv (2, 2, i) 297s 19 tests, 19 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/mvnrnd.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvnrnd.m 297s ***** error mvnrnd () 297s ***** error mvnrnd ([2, 3, 4]) 297s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 297s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 297s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 297s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 297s 6 tests, 6 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/trnd.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/trnd.m 297s ***** assert (size (trnd (2)), [1, 1]) 297s ***** assert (size (trnd (ones (2,1))), [2, 1]) 297s ***** assert (size (trnd (ones (2,2))), [2, 2]) 297s ***** assert (size (trnd (1, 3)), [3, 3]) 297s ***** assert (size (trnd (1, [4 1])), [4, 1]) 297s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 297s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 297s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 297s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 297s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 297s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 297s ***** assert (trnd (0, 1, 1), NaN) 297s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 297s ***** assert (class (trnd (2)), "double") 297s ***** assert (class (trnd (single (2))), "single") 297s ***** assert (class (trnd (single ([2 2]))), "single") 297s ***** error trnd () 297s ***** error trnd (i) 297s ***** error ... 297s trnd (1, -1) 297s ***** error ... 297s trnd (1, 1.2) 297s ***** error ... 297s trnd (1, ones (2)) 297s ***** error ... 297s trnd (1, [2 -1 2]) 297s ***** error ... 297s trnd (1, [2 0 2.5]) 297s ***** error ... 297s trnd (ones (2), ones (2)) 297s ***** error ... 297s trnd (1, 2, -1, 5) 297s ***** error ... 297s trnd (1, 2, 1.5, 5) 297s ***** error trnd (ones (2,2), 3) 297s ***** error trnd (ones (2,2), [3, 2]) 297s ***** error trnd (ones (2,2), 2, 3) 297s 29 tests, 29 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/hygecdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hygecdf.m 297s ***** demo 297s ## Plot various CDFs from the hypergeometric distribution 297s x = 0:60; 297s p1 = hygecdf (x, 500, 50, 100); 297s p2 = hygecdf (x, 500, 60, 200); 297s p3 = hygecdf (x, 500, 70, 300); 297s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 297s grid on 297s xlim ([0, 60]) 297s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 297s "m = 500, k = 70, n = 300"}, "location", "southeast") 297s title ("Hypergeometric CDF") 297s xlabel ("values in x (number of successes)") 297s ylabel ("probability") 297s ***** shared x, y 297s x = [-1 0 1 2 3]; 297s y = [0 1/6 5/6 1 1]; 297s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 297s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 297s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 297s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 297s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 297s [y(5) NaN NaN NaN y(1)], 5*eps) 297s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 297s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 297s [y(5) NaN NaN NaN y(1)], 5*eps) 297s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 297s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 297s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 297s [y(5) NaN NaN NaN y(1)], 5*eps) 297s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 297s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 297s ***** test 297s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 297s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 297s ***** test 297s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 297s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 297s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 297s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 297s eps ("single")) 297s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 297s eps ("single")) 297s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 297s eps ("single")) 297s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 297s eps ("single")) 297s ***** error hygecdf () 297s ***** error hygecdf (1) 297s ***** error hygecdf (1,2) 297s ***** error hygecdf (1,2,3) 297s ***** error hygecdf (1,2,3,4,5) 297s ***** error hygecdf (1,2,3,4,"uper") 297s ***** error ... 297s hygecdf (ones (2), ones (3), 1, 1) 297s ***** error ... 297s hygecdf (1, ones (2), ones (3), 1) 297s ***** error ... 297s hygecdf (1, 1, ones (2), ones (3)) 297s ***** error hygecdf (i, 2, 2, 2) 297s ***** error hygecdf (2, i, 2, 2) 297s ***** error hygecdf (2, 2, i, 2) 297s ***** error hygecdf (2, 2, 2, i) 297s 32 tests, 32 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/nctcdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nctcdf.m 297s ***** demo 297s ## Plot various CDFs from the noncentral Τ distribution 297s x = -5:0.01:5; 297s p1 = nctcdf (x, 1, 0); 297s p2 = nctcdf (x, 4, 0); 297s p3 = nctcdf (x, 1, 2); 297s p4 = nctcdf (x, 4, 2); 297s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 297s grid on 297s xlim ([-5, 5]) 297s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 297s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 297s title ("Noncentral Τ CDF") 297s xlabel ("values in x") 297s ylabel ("probability") 297s ***** demo 297s ## Compare the noncentral T CDF with MU = 1 to the T CDF 297s ## with the same number of degrees of freedom (10). 297s 297s x = -5:0.1:5; 297s p1 = nctcdf (x, 10, 1); 297s p2 = tcdf (x, 10); 297s plot (x, p1, "-", x, p2, "-") 297s grid on 297s xlim ([-5, 5]) 297s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 297s title ("Noncentral T vs T CDFs") 297s xlabel ("values in x") 297s ylabel ("probability") 297s ***** test 297s x = -2:0.1:2; 297s p = nctcdf (x, 10, 1); 297s assert (p(1), 0.003302485766631558, 1e-14); 297s assert (p(2), 0.004084668193532631, 1e-14); 297s assert (p(3), 0.005052800319478737, 1e-14); 297s assert (p(41), 0.8076115625303751, 1e-14); 297s ***** test 297s p = nctcdf (12, 10, 3); 297s assert (p, 0.9997719343243797, 1e-14); 297s ***** test 297s p = nctcdf (2, 3, 2); 297s assert (p, 0.4430757822176028, 1e-14); 297s ***** test 297s p = nctcdf (2, 3, 2, "upper"); 297s assert (p, 0.5569242177823971, 1e-14); 297s ***** test 297s p = nctcdf ([3, 6], 3, 2, "upper"); 297s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 297s ***** error nctcdf () 297s ***** error nctcdf (1) 297s ***** error nctcdf (1, 2) 297s ***** error nctcdf (1, 2, 3, "tail") 297s ***** error nctcdf (1, 2, 3, 4) 297s ***** error ... 297s nctcdf (ones (3), ones (2), ones (2)) 297s ***** error ... 297s nctcdf (ones (2), ones (3), ones (2)) 297s ***** error ... 297s nctcdf (ones (2), ones (2), ones (3)) 297s ***** error nctcdf (i, 2, 2) 297s ***** error nctcdf (2, i, 2) 297s ***** error nctcdf (2, 2, i) 297s 16 tests, 16 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/nakainv.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nakainv.m 297s ***** demo 297s ## Plot various iCDFs from the Nakagami distribution 297s p = 0.001:0.001:0.999; 297s x1 = nakainv (p, 0.5, 1); 297s x2 = nakainv (p, 1, 1); 297s x3 = nakainv (p, 1, 2); 297s x4 = nakainv (p, 1, 3); 297s x5 = nakainv (p, 2, 1); 297s x6 = nakainv (p, 2, 2); 297s x7 = nakainv (p, 5, 1); 297s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 297s p, x5, "-k", p, x6, "-b", p, x7, "-c") 297s grid on 297s ylim ([0, 3]) 297s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 297s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 297s "μ = 5, ω = 1"}, "location", "northwest") 297s title ("Nakagami iCDF") 297s xlabel ("probability") 297s ylabel ("values in x") 297s ***** shared p, y 297s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 297s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 297s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 297s ***** assert (nakainv (p, 1, 1), y, eps) 297s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 297s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 297s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 297s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 297s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 297s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 297s ***** error nakainv () 297s ***** error nakainv (1) 297s ***** error nakainv (1, 2) 297s ***** error ... 297s nakainv (ones (3), ones (2), ones(2)) 297s ***** error ... 297s nakainv (ones (2), ones (3), ones(2)) 297s ***** error ... 297s nakainv (ones (2), ones (2), ones(3)) 297s ***** error nakainv (i, 4, 3) 297s ***** error nakainv (1, i, 3) 297s ***** error nakainv (1, 4, i) 297s 17 tests, 17 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/gpcdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gpcdf.m 297s ***** demo 297s ## Plot various CDFs from the generalized Pareto distribution 297s x = 0:0.001:5; 297s p1 = gpcdf (x, 1, 1, 0); 297s p2 = gpcdf (x, 5, 1, 0); 297s p3 = gpcdf (x, 20, 1, 0); 297s p4 = gpcdf (x, 1, 2, 0); 297s p5 = gpcdf (x, 5, 2, 0); 297s p6 = gpcdf (x, 20, 2, 0); 297s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 297s x, p4, "-c", x, p5, "-m", x, p6, "-k") 297s grid on 297s xlim ([0, 5]) 297s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 297s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 297s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 297s "location", "northwest") 297s title ("Generalized Pareto CDF") 297s xlabel ("values in x") 297s ylabel ("probability") 297s ***** shared x, y1, y1u, y2, y2u, y3, y3u 297s x = [-Inf, -1, 0, 1/2, 1, Inf]; 297s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 297s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 297s y2 = [0, 0, 0, 1/3, 1/2, 1]; 297s y2u = [1, 1, 1, 2/3, 1/2, 0]; 297s y3 = [0, 0, 0, 1/2, 1, 1]; 297s y3u = [1, 1, 1, 1/2, 0, 0]; 297s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 297s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 297s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 297s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 297s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 297s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 297s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 297s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 297s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 297s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 297s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 297s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 297s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 297s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 297s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 297s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 297s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 297s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 297s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 297s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 297s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 297s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 297s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 297s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 297s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 297s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 297s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 297s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 297s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 297s [y2u(1:3), NaN, y2u(5:6)], eps) 297s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 297s [y2u(1:3), NaN, y2u(5:6)], eps) 297s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 297s [y2u(1:3), NaN, y2u(5:6)], eps) 297s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 297s [y2u(1:3), NaN, y2u(5:6)], eps) 297s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 297s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 297s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 297s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 297s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 297s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 297s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 297s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 297s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 297s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 297s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 297s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 297s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 297s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 297s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 297s [y3u(1:3), NaN, y3u(5:6)], eps) 297s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 297s [y3u(1:3), NaN, y3u(5:6)], eps) 297s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 297s [y3u(1:3), NaN, y3u(5:6)], eps) 297s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 297s [y3u(1:3), NaN, y3u(5:6)], eps) 297s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 297s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 297s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 297s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 297s ***** error gpcdf () 297s ***** error gpcdf (1) 297s ***** error gpcdf (1, 2) 297s ***** error gpcdf (1, 2, 3) 297s ***** error gpcdf (1, 2, 3, 4, "tail") 297s ***** error gpcdf (1, 2, 3, 4, 5) 297s ***** error ... 297s gpcdf (ones (3), ones (2), ones(2), ones(2)) 297s ***** error ... 297s gpcdf (ones (2), ones (3), ones(2), ones(2)) 297s ***** error ... 297s gpcdf (ones (2), ones (2), ones(3), ones(2)) 297s ***** error ... 297s gpcdf (ones (2), ones (2), ones(2), ones(3)) 297s ***** error gpcdf (i, 2, 3, 4) 297s ***** error gpcdf (1, i, 3, 4) 297s ***** error gpcdf (1, 2, i, 4) 297s ***** error gpcdf (1, 2, 3, i) 297s 76 tests, 76 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/logipdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logipdf.m 297s ***** demo 297s ## Plot various PDFs from the logistic distribution 297s x = -5:0.01:20; 297s y1 = logipdf (x, 5, 2); 297s y2 = logipdf (x, 9, 3); 297s y3 = logipdf (x, 9, 4); 297s y4 = logipdf (x, 6, 2); 297s y5 = logipdf (x, 2, 1); 297s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 297s grid on 297s ylim ([0, 0.3]) 297s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 297s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 297s title ("Logistic PDF") 297s xlabel ("values in x") 297s ylabel ("density") 297s ***** shared x, y 297s x = [-Inf -log(4) 0 log(4) Inf]; 297s y = [0, 0.16, 1/4, 0.16, 0]; 297s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 297s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 297s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 297s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 297s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 297s ***** error logipdf () 297s ***** error logipdf (1) 297s ***** error ... 297s logipdf (1, 2) 297s ***** error ... 297s logipdf (1, ones (2), ones (3)) 297s ***** error ... 297s logipdf (ones (2), 1, ones (3)) 297s ***** error ... 297s logipdf (ones (2), ones (3), 1) 297s ***** error logipdf (i, 2, 3) 297s ***** error logipdf (1, i, 3) 297s ***** error logipdf (1, 2, i) 297s 14 tests, 14 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/geornd.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/geornd.m 297s ***** assert (size (geornd (0.5)), [1, 1]) 297s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 297s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 297s ***** assert (size (geornd (0.5, 3)), [3, 3]) 297s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 297s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 297s ***** assert (class (geornd (0.5)), "double") 297s ***** assert (class (geornd (single (0.5))), "single") 297s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 297s ***** assert (class (geornd (single (0))), "single") 297s ***** assert (class (geornd (single (1))), "single") 297s ***** error geornd () 297s ***** error geornd (i) 297s ***** error ... 297s geornd (1, -1) 297s ***** error ... 297s geornd (1, 1.2) 297s ***** error ... 297s geornd (1, ones (2)) 297s ***** error ... 297s geornd (1, [2 -1 2]) 297s ***** error ... 297s geornd (1, [2 0 2.5]) 297s ***** error ... 297s geornd (ones (2), ones (2)) 297s ***** error ... 297s geornd (1, 2, -1, 5) 297s ***** error ... 297s geornd (1, 2, 1.5, 5) 297s ***** error geornd (ones (2,2), 3) 297s ***** error geornd (ones (2,2), [3, 2]) 297s ***** error geornd (ones (2,2), 2, 3) 297s 24 tests, 24 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/ricernd.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ricernd.m 297s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 297s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 297s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 297s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 297s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 297s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 297s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 297s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 297s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 297s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 297s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 297s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 297s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 297s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 297s ***** assert (class (ricernd (1, 1)), "double") 297s ***** assert (class (ricernd (1, single (0))), "single") 297s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 297s ***** assert (class (ricernd (1, single (1), 2)), "single") 297s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 297s ***** assert (class (ricernd (single (1), 1, 2)), "single") 297s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 297s ***** error ricernd () 297s ***** error ricernd (1) 297s ***** error ... 297s ricernd (ones (3), ones (2)) 297s ***** error ... 297s ricernd (ones (2), ones (3)) 297s ***** error ricernd (i, 2) 297s ***** error ricernd (1, i) 297s ***** error ... 297s ricernd (1, 1/2, -1) 297s ***** error ... 297s ricernd (1, 1/2, 1.2) 297s ***** error ... 297s ricernd (1, 1/2, ones (2)) 297s ***** error ... 297s ricernd (1, 1/2, [2 -1 2]) 297s ***** error ... 297s ricernd (1, 1/2, [2 0 2.5]) 297s ***** error ... 297s ricernd (1, 1/2, 2, -1, 5) 297s ***** error ... 297s ricernd (1, 1/2, 2, 1.5, 5) 297s ***** error ... 297s ricernd (2, 1/2 * ones (2), 3) 297s ***** error ... 297s ricernd (2, 1/2 * ones (2), [3, 2]) 297s ***** error ... 297s ricernd (2, 1/2 * ones (2), 3, 2) 297s ***** error ... 297s ricernd (2 * ones (2), 1/2, 3) 297s ***** error ... 297s ricernd (2 * ones (2), 1/2, [3, 2]) 297s ***** error ... 297s ricernd (2 * ones (2), 1/2, 3, 2) 297s 40 tests, 40 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/unifinv.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unifinv.m 297s ***** demo 297s ## Plot various iCDFs from the continuous uniform distribution 297s p = 0.001:0.001:0.999; 297s x1 = unifinv (p, 2, 5); 297s x2 = unifinv (p, 3, 9); 297s plot (p, x1, "-b", p, x2, "-g") 297s grid on 297s xlim ([0, 1]) 297s ylim ([0, 10]) 297s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 297s title ("Continuous uniform iCDF") 297s xlabel ("probability") 297s ylabel ("values in x") 297s ***** shared p 297s p = [-1 0 0.5 1 2]; 297s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 297s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 297s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 297s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 297s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 297s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 297s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 297s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 297s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 297s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 297s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 297s ***** error unifinv () 297s ***** error unifinv (1, 2) 297s ***** error ... 297s unifinv (ones (3), ones (2), ones (2)) 297s ***** error ... 297s unifinv (ones (2), ones (3), ones (2)) 297s ***** error ... 297s unifinv (ones (2), ones (2), ones (3)) 297s ***** error unifinv (i, 2, 2) 297s ***** error unifinv (2, i, 2) 297s ***** error unifinv (2, 2, i) 297s 19 tests, 19 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/mvncdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvncdf.m 297s ***** demo 297s mu = [1, -1]; 297s Sigma = [0.9, 0.4; 0.4, 0.3]; 297s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 297s X = [X1(:), X2(:)]; 297s p = mvncdf (X, mu, Sigma); 297s Z = reshape (p, 25, 25); 297s surf (X1, X2, Z); 297s title ("Bivariate Normal Distribution"); 297s ylabel "X1" 297s xlabel "X2" 297s ***** demo 297s mu = [0, 0]; 297s Sigma = [0.25, 0.3; 0.3, 1]; 297s p = mvncdf ([0 0], [1 1], mu, Sigma); 297s x1 = -3:.2:3; 297s x2 = -3:.2:3; 297s [X1, X2] = meshgrid (x1, x2); 297s X = [X1(:), X2(:)]; 297s p = mvnpdf (X, mu, Sigma); 297s p = reshape (p, length (x2), length (x1)); 297s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 297s xlabel ("x"); 297s ylabel ("p"); 297s title ("Probability over Rectangular Region"); 297s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 297s ***** test 297s fD = (-2:2)'; 297s X = repmat (fD, 1, 4); 297s p = mvncdf (X); 297s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 297s ***** test 297s mu = [1, -1]; 297s Sigma = [0.9, 0.4; 0.4, 0.3]; 297s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 297s X = [X1(:), X2(:)]; 297s p = mvncdf (X, mu, Sigma); 297s p_out = [0.00011878988774500, 0.00034404112322371, ... 297s 0.00087682502191813, 0.00195221905058185, ... 297s 0.00378235566873474, 0.00638175749734415, ... 297s 0.00943764224329656, 0.01239164888125426, ... 297s 0.01472750274376648, 0.01623228313374828]'; 297s assert (p([1:10]), p_out, 1e-16); 297s ***** test 297s mu = [1, -1]; 297s Sigma = [0.9, 0.4; 0.4, 0.3]; 297s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 297s X = [X1(:), X2(:)]; 297s p = mvncdf (X, mu, Sigma); 297s p_out = [0.8180695783608276, 0.8854485749482751, ... 297s 0.9308108777385832, 0.9579855743025508, ... 297s 0.9722897881414742, 0.9788150170059926, ... 297s 0.9813597788804785, 0.9821977956568989, ... 297s 0.9824283794464095, 0.9824809345614861]'; 297s assert (p([616:625]), p_out, 3e-16); 297s ***** test 297s mu = [0, 0]; 297s Sigma = [0.25, 0.3; 0.3, 1]; 297s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 297s assert (p, 0.2097424404755626, 1e-16); 297s assert (err, 1e-08); 297s ***** test 297s x = [1 2]; 297s mu = [0.5 1.5]; 297s sigma = [1.0, 0.5; 0.5, 1.0]; 297s p = mvncdf (x, mu, sigma); 297s assert (p, 0.546244443857090, 1e-15); 297s ***** test 297s x = [1 2]; 297s mu = [0.5 1.5]; 297s sigma = [1.0, 0.5; 0.5, 1.0]; 297s a = [-inf 0]; 297s p = mvncdf (a, x, mu, sigma); 297s assert (p, 0.482672935215631, 1e-15); 297s ***** error p = mvncdf (randn (25,26), [], eye (26)); 297s ***** error p = mvncdf (randn (25,8), [], eye (9)); 297s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 297s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 297s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 297s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 297s 12 tests, 12 passed, 0 known failure, 0 skipped 297s [inst/dist_fun/mvtcdf.m] 297s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/mvtcdf.m 297s ***** demo 297s ## Compute the cdf of a multivariate Student's t distribution with 297s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 297s 297s rho = [1, 0.4; 0.4, 1]; 297s df = 2; 297s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 297s X = [X1(:), X2(:)]; 297s p = mvtcdf (X, rho, df); 297s surf (X1, X2, reshape (p, 25, 25)); 297s title ("Bivariate Student's t cummulative distribution function"); 297s ***** test 297s x = [1, 2]; 297s rho = [1, 0.5; 0.5, 1]; 297s df = 4; 297s a = [-1, 0]; 297s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 297s ***** test 297s x = [1, 2;2, 4;1, 5]; 297s rho = [1, 0.5; 0.5, 1]; 297s df = 4; 297s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 297s assert (mvtcdf(x, rho, df), p, 1e-14); 297s ***** test 297s x = [1, 2, 2, 4, 1, 5]; 297s rho = eye (6); 297s rho(rho == 0) = 0.5; 297s df = 4; 297s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 305s ***** error mvtcdf (1) 305s ***** error mvtcdf (1, 2) 305s ***** error ... 305s mvtcdf (1, [2, 3; 3, 2], 1) 305s ***** error ... 305s mvtcdf ([2, 3, 4], ones (2), 1) 305s ***** error ... 305s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 305s ***** error ... 305s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 305s ***** error ... 305s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 305s 10 tests, 10 passed, 0 known failure, 0 skipped 305s [inst/dist_fun/expinv.m] 305s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/expinv.m 305s ***** demo 305s ## Plot various iCDFs from the exponential distribution 305s p = 0.001:0.001:0.999; 305s x1 = expinv (p, 2/3); 305s x2 = expinv (p, 1.0); 305s x3 = expinv (p, 2.0); 305s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 305s grid on 305s ylim ([0, 5]) 305s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 305s title ("Exponential iCDF") 305s xlabel ("probability") 305s ylabel ("values in x") 305s ***** shared p 305s p = [-1 0 0.3934693402873666 1 2]; 305s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 305s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 305s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 305s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 305s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 305s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 305s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 305s ***** error expinv () 305s ***** error expinv (1, 2 ,3 ,4 ,5) 305s ***** error ... 305s expinv (ones (3), ones (2)) 305s ***** error ... 305s expinv (2, 3, [1, 2]) 305s ***** error ... 305s [x, xlo, xup] = expinv (1, 2) 305s ***** error [x, xlo, xup] = ... 305s expinv (1, 2, 3, 0) 305s ***** error [x, xlo, xup] = ... 305s expinv (1, 2, 3, 1.22) 305s ***** error [x, xlo, xup] = ... 305s expinv (1, 2, 3, [0.05, 0.1]) 305s ***** error expinv (i, 2) 305s ***** error expinv (2, i) 305s ***** error ... 305s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 305s 18 tests, 18 passed, 0 known failure, 0 skipped 305s [inst/dist_fun/unifcdf.m] 305s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unifcdf.m 305s ***** demo 305s ## Plot various CDFs from the continuous uniform distribution 305s x = 0:0.1:10; 305s p1 = unifcdf (x, 2, 5); 305s p2 = unifcdf (x, 3, 9); 305s plot (x, p1, "-b", x, p2, "-g") 305s grid on 305s xlim ([0, 10]) 305s ylim ([0, 1]) 305s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 305s title ("Continuous uniform CDF") 305s xlabel ("values in x") 305s ylabel ("probability") 305s ***** shared x, y 305s x = [-1 0 0.5 1 2] + 1; 305s y = [0 0 0.5 1 1]; 305s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 305s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 305s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 305s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 305s ***** assert (unifcdf (x, ones (1,5), 2), y) 305s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 305s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 305s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 305s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 305s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 305s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 305s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 305s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 305s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 305s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 305s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 305s ***** error unifcdf () 305s ***** error unifcdf (1) 305s ***** error unifcdf (1, 2) 305s ***** error unifcdf (1, 2, 3, 4) 305s ***** error unifcdf (1, 2, 3, "tail") 305s ***** error ... 305s unifcdf (ones (3), ones (2), ones (2)) 306s ***** error ... 306s unifcdf (ones (2), ones (3), ones (2)) 306s ***** error ... 306s unifcdf (ones (2), ones (2), ones (3)) 306s ***** error unifcdf (i, 2, 2) 306s ***** error unifcdf (2, i, 2) 306s ***** error unifcdf (2, 2, i) 306s 27 tests, 27 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/gevrnd.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gevrnd.m 306s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 306s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 306s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 306s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 306s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 306s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 306s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 306s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 306s ***** assert (class (gevrnd (1,1,1)), "double") 306s ***** assert (class (gevrnd (single (1),1,1)), "single") 306s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 306s ***** assert (class (gevrnd (1,single (1),1)), "single") 306s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 306s ***** assert (class (gevrnd (1,1,single (1))), "single") 306s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 306s ***** error gevrnd () 306s ***** error gevrnd (1) 306s ***** error gevrnd (1, 2) 306s ***** error ... 306s gevrnd (ones (3), ones (2), ones (2)) 306s ***** error ... 306s gevrnd (ones (2), ones (3), ones (2)) 306s ***** error ... 306s gevrnd (ones (2), ones (2), ones (3)) 306s ***** error gevrnd (i, 2, 3) 306s ***** error gevrnd (1, i, 3) 306s ***** error gevrnd (1, 2, i) 306s ***** error ... 306s gevrnd (1, 2, 3, -1) 306s ***** error ... 306s gevrnd (1, 2, 3, 1.2) 306s ***** error ... 306s gevrnd (1, 2, 3, ones (2)) 306s ***** error ... 306s gevrnd (1, 2, 3, [2 -1 2]) 306s ***** error ... 306s gevrnd (1, 2, 3, [2 0 2.5]) 306s ***** error ... 306s gevrnd (1, 2, 3, 2, -1, 5) 306s ***** error ... 306s gevrnd (1, 2, 3, 2, 1.5, 5) 306s ***** error ... 306s gevrnd (2, ones (2), 2, 3) 306s ***** error ... 306s gevrnd (2, ones (2), 2, [3, 2]) 306s ***** error ... 306s gevrnd (2, ones (2), 2, 3, 2) 306s 34 tests, 34 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/lognrnd.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/lognrnd.m 306s ***** assert (size (lognrnd (1, 1)), [1 1]) 306s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 306s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 306s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 306s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 306s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 306s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 306s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 306s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 306s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 306s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 306s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 306s ***** assert (class (lognrnd (1, 1)), "double") 306s ***** assert (class (lognrnd (1, single (1))), "single") 306s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 306s ***** assert (class (lognrnd (single (1), 1)), "single") 306s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 306s ***** error lognrnd () 306s ***** error lognrnd (1) 306s ***** error ... 306s lognrnd (ones (3), ones (2)) 306s ***** error ... 306s lognrnd (ones (2), ones (3)) 306s ***** error lognrnd (i, 2, 3) 306s ***** error lognrnd (1, i, 3) 306s ***** error ... 306s lognrnd (1, 2, -1) 306s ***** error ... 306s lognrnd (1, 2, 1.2) 306s ***** error ... 306s lognrnd (1, 2, ones (2)) 306s ***** error ... 306s lognrnd (1, 2, [2 -1 2]) 306s ***** error ... 306s lognrnd (1, 2, [2 0 2.5]) 306s ***** error ... 306s lognrnd (1, 2, 2, -1, 5) 306s ***** error ... 306s lognrnd (1, 2, 2, 1.5, 5) 306s ***** error ... 306s lognrnd (2, ones (2), 3) 306s ***** error ... 306s lognrnd (2, ones (2), [3, 2]) 306s ***** error ... 306s lognrnd (2, ones (2), 3, 2) 306s 33 tests, 33 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/ncx2pdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/ncx2pdf.m 306s ***** demo 306s ## Plot various PDFs from the noncentral chi-squared distribution 306s x = 0:0.1:10; 306s y1 = ncx2pdf (x, 2, 1); 306s y2 = ncx2pdf (x, 2, 2); 306s y3 = ncx2pdf (x, 2, 3); 306s y4 = ncx2pdf (x, 4, 1); 306s y5 = ncx2pdf (x, 4, 2); 306s y6 = ncx2pdf (x, 4, 3); 306s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 306s x, y4, "-m", x, y5, "-c", x, y6, "-y") 306s grid on 306s xlim ([0, 10]) 306s ylim ([0, 0.32]) 306s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 306s "df = 2, λ = 3", "df = 4, λ = 1", ... 306s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 306s title ("Noncentral chi-squared PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** demo 306s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 306s ## chi-squared PDF with the same number of degrees of freedom (4). 306s 306s x = 0:0.1:10; 306s y1 = ncx2pdf (x, 4, 2); 306s y2 = chi2pdf (x, 4); 306s plot (x, y1, "-", x, y2, "-"); 306s grid on 306s xlim ([0, 10]) 306s ylim ([0, 0.32]) 306s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 306s title ("Noncentral chi-squared vs chi-squared PDFs") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** shared x1, df, d1 306s x1 = [-Inf, 2, NaN, 4, Inf]; 306s df = [2, 0, -1, 1, 4]; 306s d1 = [1, NaN, 3, -1, 2]; 306s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 306s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 306s 0.06160064323277038, 0], 1e-14); 306s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 306s 0.09631299762429098, 0], 1e-14); 306s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 306s 0.08430464047296625, 0], 1e-14); 306s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 306s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 306s NaN, 0.1076346446244688], 1e-14); 306s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 306s NaN, 0.1192317192431485], 1e-14); 306s ***** error ncx2pdf () 306s ***** error ncx2pdf (1) 306s ***** error ncx2pdf (1, 2) 306s ***** error ... 306s ncx2pdf (ones (3), ones (2), ones (2)) 306s ***** error ... 306s ncx2pdf (ones (2), ones (3), ones (2)) 306s ***** error ... 306s ncx2pdf (ones (2), ones (2), ones (3)) 306s ***** error ncx2pdf (i, 2, 2) 306s ***** error ncx2pdf (2, i, 2) 306s ***** error ncx2pdf (2, 2, i) 306s 16 tests, 16 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/loglpdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/loglpdf.m 306s ***** demo 306s ## Plot various PDFs from the log-logistic distribution 306s x = 0.001:0.001:2; 306s y1 = loglpdf (x, log (1), 1/0.5); 306s y2 = loglpdf (x, log (1), 1); 306s y3 = loglpdf (x, log (1), 1/2); 306s y4 = loglpdf (x, log (1), 1/4); 306s y5 = loglpdf (x, log (1), 1/8); 306s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 306s grid on 306s ylim ([0,3]) 306s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 306s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 306s title ("Log-logistic PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 306s ***** shared out1, out2 306s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 306s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 306s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 306s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 306s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 306s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 306s ***** assert (class (loglpdf (1, single (2), 3)), "single") 306s ***** assert (class (loglpdf (1, 2, single (3))), "single") 306s ***** error loglpdf (1) 306s ***** error loglpdf (1, 2) 306s ***** error ... 306s loglpdf (1, ones (2), ones (3)) 306s ***** error ... 306s loglpdf (ones (2), 1, ones (3)) 306s ***** error ... 306s loglpdf (ones (2), ones (3), 1) 306s ***** error loglpdf (i, 2, 3) 306s ***** error loglpdf (1, i, 3) 306s ***** error loglpdf (1, 2, i) 306s 14 tests, 14 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/logicdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/logicdf.m 306s ***** demo 306s ## Plot various CDFs from the logistic distribution 306s x = -5:0.01:20; 306s p1 = logicdf (x, 5, 2); 306s p2 = logicdf (x, 9, 3); 306s p3 = logicdf (x, 9, 4); 306s p4 = logicdf (x, 6, 2); 306s p5 = logicdf (x, 2, 1); 306s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 306s grid on 306s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 306s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 306s title ("Logistic CDF") 306s xlabel ("values in x") 306s ylabel ("probability") 306s ***** shared x, y 306s x = [-Inf -log(3) 0 log(3) Inf]; 306s y = [0, 1/4, 1/2, 3/4, 1]; 306s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 306s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 306s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 306s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 306s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 306s ***** error logicdf () 306s ***** error logicdf (1) 306s ***** error ... 306s logicdf (1, 2) 306s ***** error logicdf (1, 2, 3, "tail") 306s ***** error logicdf (1, 2, 3, 4) 306s ***** error ... 306s logicdf (1, ones (2), ones (3)) 306s ***** error ... 306s logicdf (ones (2), 1, ones (3)) 306s ***** error ... 306s logicdf (ones (2), ones (3), 1) 306s ***** error logicdf (i, 2, 3) 306s ***** error logicdf (1, i, 3) 306s ***** error logicdf (1, 2, i) 306s 16 tests, 16 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/hygeinv.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hygeinv.m 306s ***** demo 306s ## Plot various iCDFs from the hypergeometric distribution 306s p = 0.001:0.001:0.999; 306s x1 = hygeinv (p, 500, 50, 100); 306s x2 = hygeinv (p, 500, 60, 200); 306s x3 = hygeinv (p, 500, 70, 300); 306s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 306s grid on 306s ylim ([0, 60]) 306s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 306s "m = 500, k = 70, n = 300"}, "location", "northwest") 306s title ("Hypergeometric iCDF") 306s xlabel ("probability") 306s ylabel ("values in p (number of successes)") 306s ***** shared p 306s p = [-1 0 0.5 1 2]; 306s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 306s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 306s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 306s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 306s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 306s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 306s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 306s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 306s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 306s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 306s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 306s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 306s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 306s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 306s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 306s ***** error hygeinv () 306s ***** error hygeinv (1) 306s ***** error hygeinv (1,2) 306s ***** error hygeinv (1,2,3) 306s ***** error ... 306s hygeinv (ones (2), ones (3), 1, 1) 306s ***** error ... 306s hygeinv (1, ones (2), ones (3), 1) 306s ***** error ... 306s hygeinv (1, 1, ones (2), ones (3)) 306s ***** error hygeinv (i, 2, 2, 2) 306s ***** error hygeinv (2, i, 2, 2) 306s ***** error hygeinv (2, 2, i, 2) 306s ***** error hygeinv (2, 2, 2, i) 306s 26 tests, 26 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/gppdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gppdf.m 306s ***** demo 306s ## Plot various PDFs from the generalized Pareto distribution 306s x = 0:0.001:5; 306s y1 = gppdf (x, 1, 1, 0); 306s y2 = gppdf (x, 5, 1, 0); 306s y3 = gppdf (x, 20, 1, 0); 306s y4 = gppdf (x, 1, 2, 0); 306s y5 = gppdf (x, 5, 2, 0); 306s y6 = gppdf (x, 20, 2, 0); 306s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 306s x, y4, "-c", x, y5, "-m", x, y6, "-k") 306s grid on 306s xlim ([0, 5]) 306s ylim ([0, 1]) 306s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 306s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 306s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 306s "location", "northeast") 306s title ("Generalized Pareto PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** shared x, y1, y2, y3 306s x = [-Inf, -1, 0, 1/2, 1, Inf]; 306s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 306s y2 = [0, 0, 1, 4/9, 1/4, 0]; 306s y3 = [0, 0, 1, 1, 1, 0]; 306s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 306s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 306s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 306s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 306s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 306s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 306s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 306s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 306s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 306s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 306s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 306s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 306s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 306s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 306s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 306s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 306s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 306s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 306s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 306s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 306s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 306s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 306s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 306s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 306s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 306s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 306s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 306s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 306s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 306s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 306s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 306s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 306s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 306s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 306s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 306s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 306s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 306s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 306s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 306s ***** error gpcdf () 306s ***** error gpcdf (1) 306s ***** error gpcdf (1, 2) 306s ***** error gpcdf (1, 2, 3) 306s ***** error ... 306s gpcdf (ones (3), ones (2), ones(2), ones(2)) 306s ***** error ... 306s gpcdf (ones (2), ones (3), ones(2), ones(2)) 306s ***** error ... 306s gpcdf (ones (2), ones (2), ones(3), ones(2)) 306s ***** error ... 306s gpcdf (ones (2), ones (2), ones(2), ones(3)) 306s ***** error gpcdf (i, 2, 3, 4) 306s ***** error gpcdf (1, i, 3, 4) 306s ***** error gpcdf (1, 2, i, 4) 306s ***** error gpcdf (1, 2, 3, i) 306s 51 tests, 51 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/plrnd.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/plrnd.m 306s ***** shared x, Fx 306s x = [0, 1, 3, 4, 7, 10]; 306s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 306s ***** assert (size (plrnd (x, Fx)), [1, 1]) 306s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 306s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 306s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 306s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 306s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 306s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 306s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 306s ***** assert (class (plrnd (x, Fx)), "double") 306s ***** assert (class (plrnd (x, single (Fx))), "single") 306s ***** assert (class (plrnd (single (x), Fx)), "single") 306s ***** error plrnd () 306s ***** error plrnd (1) 306s ***** error ... 306s plrnd ([0, 1, 2], [0, 1]) 306s ***** error ... 306s plrnd ([0], [1]) 306s ***** error ... 306s plrnd ([0, 1, 2], [0, 1, 1.5]) 306s ***** error ... 306s plrnd ([0, 1, 2], [0, i, 1]) 306s ***** error ... 306s plrnd ([0, i, 2], [0, 0.5, 1]) 306s ***** error ... 306s plrnd ([0, i, 2], [0, 0.5i, 1]) 306s ***** error ... 306s plrnd (x, Fx, -1) 306s ***** error ... 306s plrnd (x, Fx, 1.2) 306s ***** error ... 306s plrnd (x, Fx, ones (2)) 306s ***** error ... 306s plrnd (x, Fx, [2 -1 2]) 306s ***** error ... 306s plrnd (x, Fx, [2 0 2.5]) 306s ***** error ... 306s plrnd (x, Fx, 2, -1, 5) 306s ***** error ... 306s plrnd (x, Fx, 2, 1.5, 5) 306s 26 tests, 26 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/unifpdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unifpdf.m 306s ***** demo 306s ## Plot various PDFs from the continuous uniform distribution 306s x = 0:0.001:10; 306s y1 = unifpdf (x, 2, 5); 306s y2 = unifpdf (x, 3, 9); 306s plot (x, y1, "-b", x, y2, "-g") 306s grid on 306s xlim ([0, 10]) 306s ylim ([0, 0.4]) 306s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 306s title ("Continuous uniform PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** shared x, y 306s x = [-1 0 0.5 1 2] + 1; 306s y = [0 1 1 1 0]; 306s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 306s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 306s ***** assert (unifpdf (x, ones (1,5), 2), y) 306s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 306s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 306s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 306s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 306s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 306s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 306s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 306s ***** error unifpdf () 306s ***** error unifpdf (1) 306s ***** error unifpdf (1, 2) 306s ***** error ... 306s unifpdf (ones (3), ones (2), ones (2)) 306s ***** error ... 306s unifpdf (ones (2), ones (3), ones (2)) 306s ***** error ... 306s unifpdf (ones (2), ones (2), ones (3)) 306s ***** error unifpdf (i, 2, 2) 306s ***** error unifpdf (2, i, 2) 306s ***** error unifpdf (2, 2, i) 306s 19 tests, 19 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/tricdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/tricdf.m 306s ***** demo 306s ## Plot various CDFs from the triangular distribution 306s x = 0.001:0.001:10; 306s p1 = tricdf (x, 3, 4, 6); 306s p2 = tricdf (x, 1, 2, 5); 306s p3 = tricdf (x, 2, 3, 9); 306s p4 = tricdf (x, 2, 5, 9); 306s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 306s grid on 306s xlim ([0, 10]) 306s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 306s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 306s "location", "southeast") 306s title ("Triangular CDF") 306s xlabel ("values in x") 306s ylabel ("probability") 306s ***** shared x, y 306s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 306s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 306s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 306s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 306s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 306s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 306s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 306s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 306s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 306s [y(1:2), NaN, y(4:7)], eps) 306s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 306s [y(1:2), NaN, y(4:7)], eps) 306s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 306s [y(1:2), NaN, y(4:7)], eps) 306s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 306s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 306s single ([y, NaN]), eps("single")) 306s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 306s single ([y, NaN]), eps("single")) 306s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 306s single ([y, NaN]), eps("single")) 306s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 306s single ([y, NaN]), eps("single")) 306s ***** error tricdf () 306s ***** error tricdf (1) 306s ***** error tricdf (1, 2) 306s ***** error tricdf (1, 2, 3) 306s ***** error ... 306s tricdf (1, 2, 3, 4, 5, 6) 306s ***** error tricdf (1, 2, 3, 4, "tail") 306s ***** error tricdf (1, 2, 3, 4, 5) 306s ***** error ... 306s tricdf (ones (3), ones (2), ones(2), ones(2)) 306s ***** error ... 306s tricdf (ones (2), ones (3), ones(2), ones(2)) 306s ***** error ... 306s tricdf (ones (2), ones (2), ones(3), ones(2)) 306s ***** error ... 306s tricdf (ones (2), ones (2), ones(2), ones(3)) 306s ***** error tricdf (i, 2, 3, 4) 306s ***** error tricdf (1, i, 3, 4) 306s ***** error tricdf (1, 2, i, 4) 306s ***** error tricdf (1, 2, 3, i) 306s 29 tests, 29 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/hygepdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/hygepdf.m 306s ***** demo 306s ## Plot various PDFs from the hypergeometric distribution 306s x = 0:60; 306s y1 = hygepdf (x, 500, 50, 100); 306s y2 = hygepdf (x, 500, 60, 200); 306s y3 = hygepdf (x, 500, 70, 300); 306s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 306s grid on 306s xlim ([0, 60]) 306s ylim ([0, 0.18]) 306s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 306s "m = 500, k = 70, μ = 300"}, "location", "northeast") 306s title ("Hypergeometric PDF") 306s xlabel ("values in x (number of successes)") 306s ylabel ("density") 306s ***** shared x, y 306s x = [-1 0 1 2 3]; 306s y = [0 1/6 4/6 1/6 0]; 306s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 306s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 306s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 306s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 306s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 306s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 306s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 306s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 306s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 306s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 306s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 306s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 306s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 306s ***** test 306s z = zeros(3,5); 306s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 306s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 306s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 306s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 306s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 306s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 306s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 306s ***** error hygepdf () 306s ***** error hygepdf (1) 306s ***** error hygepdf (1,2) 306s ***** error hygepdf (1,2,3) 306s ***** error ... 306s hygepdf (1, ones (3), ones (2), ones (2)) 306s ***** error ... 306s hygepdf (1, ones (2), ones (3), ones (2)) 306s ***** error ... 306s hygepdf (1, ones (2), ones (2), ones (3)) 306s ***** error hygepdf (i, 2, 2, 2) 306s ***** error hygepdf (2, i, 2, 2) 306s ***** error hygepdf (2, 2, i, 2) 306s ***** error hygepdf (2, 2, 2, i) 306s 25 tests, 25 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/raylrnd.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/raylrnd.m 306s ***** assert (size (raylrnd (2)), [1, 1]) 306s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 306s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 306s ***** assert (size (raylrnd (1, 3)), [3, 3]) 306s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 306s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 306s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 306s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 306s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 306s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 306s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 306s ***** assert (raylrnd (0, 1, 1), NaN) 306s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 306s ***** assert (class (raylrnd (2)), "double") 306s ***** assert (class (raylrnd (single (2))), "single") 306s ***** assert (class (raylrnd (single ([2 2]))), "single") 306s ***** error raylrnd () 306s ***** error raylrnd (i) 306s ***** error ... 306s raylrnd (1, -1) 306s ***** error ... 306s raylrnd (1, 1.2) 306s ***** error ... 306s raylrnd (1, ones (2)) 306s ***** error ... 306s raylrnd (1, [2 -1 2]) 306s ***** error ... 306s raylrnd (1, [2 0 2.5]) 306s ***** error ... 306s raylrnd (ones (2), ones (2)) 306s ***** error ... 306s raylrnd (1, 2, -1, 5) 306s ***** error ... 306s raylrnd (1, 2, 1.5, 5) 306s ***** error raylrnd (ones (2,2), 3) 306s ***** error raylrnd (ones (2,2), [3, 2]) 306s ***** error raylrnd (ones (2,2), 2, 3) 306s 29 tests, 29 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/copulapdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/copulapdf.m 306s ***** test 306s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 306s theta = [1; 2]; 306s y = copulapdf ("Clayton", x, theta); 306s expected_p = [0.9872; 0.7295]; 306s assert (y, expected_p, 0.001); 306s ***** test 306s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 306s y = copulapdf ("Gumbel", x, 2); 306s expected_p = [0.9468; 0.9468]; 306s assert (y, expected_p, 0.001); 306s ***** test 306s x = [0.2, 0.6; 0.2, 0.6]; 306s theta = [1; 2]; 306s y = copulapdf ("Frank", x, theta); 306s expected_p = [0.9378; 0.8678]; 306s assert (y, expected_p, 0.001); 306s ***** test 306s x = [0.2, 0.6; 0.2, 0.6]; 306s theta = [0.3; 0.7]; 306s y = copulapdf ("AMH", x, theta); 306s expected_p = [0.9540; 0.8577]; 306s assert (y, expected_p, 0.001); 306s 4 tests, 4 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/poisspdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/poisspdf.m 306s ***** demo 306s ## Plot various PDFs from the Poisson distribution 306s x = 0:20; 306s y1 = poisspdf (x, 1); 306s y2 = poisspdf (x, 4); 306s y3 = poisspdf (x, 10); 306s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 306s grid on 306s ylim ([0, 0.4]) 306s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 306s title ("Poisson PDF") 306s xlabel ("values in x (number of occurences)") 306s ylabel ("density") 306s ***** shared x, y 306s x = [-1 0 1 2 Inf]; 306s y = [0, exp(-1)*[1 1 0.5], 0]; 306s ***** assert (poisspdf (x, ones (1,5)), y, eps) 306s ***** assert (poisspdf (x, 1), y, eps) 306s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 306s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 306s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 306s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 306s ***** error poisspdf () 306s ***** error poisspdf (1) 306s ***** error ... 306s poisspdf (ones (3), ones (2)) 306s ***** error ... 306s poisspdf (ones (2), ones (3)) 306s ***** error poisspdf (i, 2) 306s ***** error poisspdf (2, i) 306s 12 tests, 12 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/normpdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/normpdf.m 306s ***** demo 306s ## Plot various PDFs from the normal distribution 306s x = -5:0.01:5; 306s y1 = normpdf (x, 0, 0.5); 306s y2 = normpdf (x, 0, 1); 306s y3 = normpdf (x, 0, 2); 306s y4 = normpdf (x, -2, 0.8); 306s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 306s grid on 306s xlim ([-5, 5]) 306s ylim ([0, 0.9]) 306s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 306s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 306s title ("Normal PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** shared x, y 306s x = [-Inf, 1, 2, Inf]; 306s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 306s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 306s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 306s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 306s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 306s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 306s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 306s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 306s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 306s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 306s ***** error normpdf () 306s ***** error ... 306s normpdf (ones (3), ones (2), ones (2)) 306s ***** error ... 306s normpdf (ones (2), ones (3), ones (2)) 306s ***** error ... 306s normpdf (ones (2), ones (2), ones (3)) 306s ***** error normpdf (i, 2, 2) 306s ***** error normpdf (2, i, 2) 306s ***** error normpdf (2, 2, i) 306s 16 tests, 16 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/nakapdf.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nakapdf.m 306s ***** demo 306s ## Plot various PDFs from the Nakagami distribution 306s x = 0:0.01:3; 306s y1 = nakapdf (x, 0.5, 1); 306s y2 = nakapdf (x, 1, 1); 306s y3 = nakapdf (x, 1, 2); 306s y4 = nakapdf (x, 1, 3); 306s y5 = nakapdf (x, 2, 1); 306s y6 = nakapdf (x, 2, 2); 306s y7 = nakapdf (x, 5, 1); 306s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 306s x, y5, "-k", x, y6, "-b", x, y7, "-c") 306s grid on 306s xlim ([0, 3]) 306s ylim ([0, 2]) 306s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 306s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 306s "μ = 5, ω = 1"}, "location", "northeast") 306s title ("Nakagami PDF") 306s xlabel ("values in x") 306s ylabel ("density") 306s ***** shared x, y 306s x = [-1, 0, 1, 2, Inf]; 306s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 306s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 306s ***** assert (nakapdf (x, 1, 1), y, eps) 306s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 306s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 306s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 306s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 306s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 306s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 306s ***** error nakapdf () 306s ***** error nakapdf (1) 306s ***** error nakapdf (1, 2) 306s ***** error ... 306s nakapdf (ones (3), ones (2), ones(2)) 306s ***** error ... 306s nakapdf (ones (2), ones (3), ones(2)) 306s ***** error ... 306s nakapdf (ones (2), ones (2), ones(3)) 306s ***** error nakapdf (i, 4, 3) 306s ***** error nakapdf (1, i, 3) 306s ***** error nakapdf (1, 4, i) 306s 17 tests, 17 passed, 0 known failure, 0 skipped 306s [inst/dist_fun/nctinv.m] 306s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/nctinv.m 306s ***** demo 306s ## Plot various iCDFs from the noncentral T distribution 306s p = 0.001:0.001:0.999; 306s x1 = nctinv (p, 1, 0); 306s x2 = nctinv (p, 4, 0); 306s x3 = nctinv (p, 1, 2); 306s x4 = nctinv (p, 4, 2); 306s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 306s grid on 306s ylim ([-5, 5]) 306s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 306s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 306s title ("Noncentral T iCDF") 306s xlabel ("probability") 306s ylabel ("values in x") 306s ***** demo 306s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 306s ## with the same number of degrees of freedom (10). 306s 306s p = 0.001:0.001:0.999; 306s x1 = nctinv (p, 10, 1); 306s x2 = tinv (p, 10); 306s plot (p, x1, "-", p, x2, "-"); 306s grid on 306s ylim ([-5, 5]) 306s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 306s title ("Noncentral T vs T quantile functions") 306s xlabel ("probability") 306s ylabel ("values in x") 306s ***** test 306s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 306s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 306s ***** test 306s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 306s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 306s ***** test 306s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 306s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 307s ***** test 307s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 307s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 307s ***** test 307s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 307s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 307s ***** test 307s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 307s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 308s ***** test 308s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 309s ***** error nctinv () 309s ***** error nctinv (1) 309s ***** error nctinv (1, 2) 309s ***** error ... 309s nctinv (ones (3), ones (2), ones (2)) 309s ***** error ... 309s nctinv (ones (2), ones (3), ones (2)) 309s ***** error ... 309s nctinv (ones (2), ones (2), ones (3)) 309s ***** error nctinv (i, 2, 2) 309s ***** error nctinv (2, i, 2) 309s ***** error nctinv (2, 2, i) 309s 16 tests, 16 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/chi2pdf.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/chi2pdf.m 309s ***** demo 309s ## Plot various PDFs from the chi-squared distribution 309s x = 0:0.01:8; 309s y1 = chi2pdf (x, 1); 309s y2 = chi2pdf (x, 2); 309s y3 = chi2pdf (x, 3); 309s y4 = chi2pdf (x, 4); 309s y5 = chi2pdf (x, 6); 309s y6 = chi2pdf (x, 9); 309s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 309s x, y4, "-c", x, y5, "-m", x, y6, "-y") 309s grid on 309s xlim ([0, 8]) 309s ylim ([0, 0.5]) 309s legend ({"df = 1", "df = 2", "df = 3", ... 309s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 309s title ("Chi-squared PDF") 309s xlabel ("values in x") 309s ylabel ("density") 309s ***** shared x, y 309s x = [-1 0 0.5 1 Inf]; 309s y = [0, 1/2 * exp(-x(2:5)/2)]; 309s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 309s ***** assert (chi2pdf (x, 2), y) 309s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 309s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 309s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 309s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 309s ***** error chi2pdf () 309s ***** error chi2pdf (1) 309s ***** error chi2pdf (1,2,3) 309s ***** error ... 309s chi2pdf (ones (3), ones (2)) 309s ***** error ... 309s chi2pdf (ones (2), ones (3)) 309s ***** error chi2pdf (i, 2) 309s ***** error chi2pdf (2, i) 309s 13 tests, 13 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/bvtcdf.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/bvtcdf.m 309s ***** test 309s x = [1, 2]; 309s rho = [1, 0.5; 0.5, 1]; 309s df = 4; 309s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 309s ***** test 309s x = [3, 2;2, 4;1, 5]; 309s rho = [1, 0.5; 0.5, 1]; 309s df = 4; 309s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 309s 2 tests, 2 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/unidinv.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/unidinv.m 309s ***** demo 309s ## Plot various iCDFs from the discrete uniform distribution 309s p = 0.001:0.001:0.999; 309s x1 = unidinv (p, 5); 309s x2 = unidinv (p, 9); 309s plot (p, x1, "-b", p, x2, "-g") 309s grid on 309s xlim ([0, 1]) 309s ylim ([0, 10]) 309s legend ({"N = 5", "N = 9"}, "location", "northwest") 309s title ("Discrete uniform iCDF") 309s xlabel ("probability") 309s ylabel ("values in x") 309s ***** shared p 309s p = [-1 0 0.5 1 2]; 309s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 309s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 309s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 309s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 309s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 309s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 309s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 309s ***** error unidinv () 309s ***** error unidinv (1) 309s ***** error ... 309s unidinv (ones (3), ones (2)) 309s ***** error ... 309s unidinv (ones (2), ones (3)) 309s ***** error unidinv (i, 2) 309s ***** error unidinv (2, i) 309s 13 tests, 13 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/exppdf.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/exppdf.m 309s ***** demo 309s ## Plot various PDFs from the exponential distribution 309s x = 0:0.01:5; 309s y1 = exppdf (x, 2/3); 309s y2 = exppdf (x, 1.0); 309s y3 = exppdf (x, 2.0); 309s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 309s grid on 309s ylim ([0, 1.5]) 309s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 309s title ("Exponential PDF") 309s xlabel ("values in x") 309s ylabel ("density") 309s ***** shared x,y 309s x = [-1 0 0.5 1 Inf]; 309s y = gampdf (x, 1, 2); 309s ***** assert (exppdf (x, 2*ones (1,5)), y) 309s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 309s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 309s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 309s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 309s ***** error exppdf () 309s ***** error exppdf (1,2,3) 309s ***** error ... 309s exppdf (ones (3), ones (2)) 309s ***** error ... 309s exppdf (ones (2), ones (3)) 309s ***** error exppdf (i, 2) 309s ***** error exppdf (2, i) 309s 11 tests, 11 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/gamcdf.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/gamcdf.m 309s ***** demo 309s ## Plot various CDFs from the Gamma distribution 309s x = 0:0.01:20; 309s p1 = gamcdf (x, 1, 2); 309s p2 = gamcdf (x, 2, 2); 309s p3 = gamcdf (x, 3, 2); 309s p4 = gamcdf (x, 5, 1); 309s p5 = gamcdf (x, 9, 0.5); 309s p6 = gamcdf (x, 7.5, 1); 309s p7 = gamcdf (x, 0.5, 1); 309s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 309s x, p5, "-k", x, p6, "-b", x, p7, "-c") 309s grid on 309s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 309s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 309s "α = 0.5, β = 1"}, "location", "southeast") 309s title ("Gamma CDF") 309s xlabel ("values in x") 309s ylabel ("probability") 309s ***** shared x, y, u 309s x = [-1, 0, 0.5, 1, 2, Inf]; 309s y = [0, gammainc(x(2:end), 1)]; 309s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 309s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 309s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 309s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 309s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 309s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 309s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 309s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 309s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 309s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 309s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 309s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 309s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 309s ***** error gamcdf () 309s ***** error gamcdf (1) 309s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 309s ***** error gamcdf (1, 2, 3, "uper") 309s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 309s ***** error gamcdf (2, 3, 4, [1, 2]) 309s ***** error ... 309s [p, plo, pup] = gamcdf (1, 2, 3) 309s ***** error ... 309s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 309s ***** error [p, plo, pup] = ... 309s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 309s ***** error [p, plo, pup] = ... 309s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 309s ***** error [p, plo, pup] = ... 309s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 309s ***** error ... 309s gamcdf (ones (3), ones (2), ones (2)) 309s ***** error ... 309s gamcdf (ones (2), ones (3), ones (2)) 309s ***** error ... 309s gamcdf (ones (2), ones (2), ones (3)) 309s ***** error gamcdf (i, 2, 2) 309s ***** error gamcdf (2, i, 2) 309s ***** error gamcdf (2, 2, i) 309s ***** error ... 309s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 309s 30 tests, 30 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/normrnd.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/normrnd.m 309s ***** assert (size (normrnd (1, 1)), [1 1]) 309s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 309s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 309s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 309s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 309s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 309s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 309s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 309s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 309s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 309s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 309s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 309s ***** assert (class (normrnd (1, 1)), "double") 309s ***** assert (class (normrnd (1, single (1))), "single") 309s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 309s ***** assert (class (normrnd (single (1), 1)), "single") 309s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 309s ***** error normrnd () 309s ***** error normrnd (1) 309s ***** error ... 309s normrnd (ones (3), ones (2)) 309s ***** error ... 309s normrnd (ones (2), ones (3)) 309s ***** error normrnd (i, 2, 3) 309s ***** error normrnd (1, i, 3) 309s ***** error ... 309s normrnd (1, 2, -1) 309s ***** error ... 309s normrnd (1, 2, 1.2) 309s ***** error ... 309s normrnd (1, 2, ones (2)) 309s ***** error ... 309s normrnd (1, 2, [2 -1 2]) 309s ***** error ... 309s normrnd (1, 2, [2 0 2.5]) 309s ***** error ... 309s normrnd (1, 2, 2, -1, 5) 309s ***** error ... 309s normrnd (1, 2, 2, 1.5, 5) 309s ***** error ... 309s normrnd (2, ones (2), 3) 309s ***** error ... 309s normrnd (2, ones (2), [3, 2]) 309s ***** error ... 309s normrnd (2, ones (2), 3, 2) 309s 33 tests, 33 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/burrrnd.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/burrrnd.m 309s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 309s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 309s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 309s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 309s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 309s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 309s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 309s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 309s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 309s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 309s ***** assert (class (burrrnd (1,1,1)), "double") 309s ***** assert (class (burrrnd (single (1),1,1)), "single") 309s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 309s ***** assert (class (burrrnd (1,single (1),1)), "single") 309s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 309s ***** assert (class (burrrnd (1,1,single (1))), "single") 309s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 309s ***** error burrrnd () 309s ***** error burrrnd (1) 309s ***** error burrrnd (1, 2) 309s ***** error ... 309s burrrnd (ones (3), ones (2), ones (2)) 309s ***** error ... 309s burrrnd (ones (2), ones (3), ones (2)) 309s ***** error ... 309s burrrnd (ones (2), ones (2), ones (3)) 309s ***** error burrrnd (i, 2, 3) 309s ***** error burrrnd (1, i, 3) 309s ***** error burrrnd (1, 2, i) 309s ***** error ... 309s burrrnd (1, 2, 3, -1) 309s ***** error ... 309s burrrnd (1, 2, 3, 1.2) 309s ***** error ... 309s burrrnd (1, 2, 3, ones (2)) 309s ***** error ... 309s burrrnd (1, 2, 3, [2 -1 2]) 309s ***** error ... 309s burrrnd (1, 2, 3, [2 0 2.5]) 309s ***** error ... 309s burrrnd (1, 2, 3, 2, -1, 5) 309s ***** error ... 309s burrrnd (1, 2, 3, 2, 1.5, 5) 309s ***** error ... 309s burrrnd (2, ones (2), 2, 3) 309s ***** error ... 309s burrrnd (2, ones (2), 2, [3, 2]) 309s ***** error ... 309s burrrnd (2, ones (2), 2, 3, 2) 309s 36 tests, 36 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/binornd.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/binornd.m 309s ***** assert (size (binornd (2, 1/2)), [1 1]) 309s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 309s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 309s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 309s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 309s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 309s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 309s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 309s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 309s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 309s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 309s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 309s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 309s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 309s ***** assert (class (binornd (1, 1)), "double") 309s ***** assert (class (binornd (1, single (0))), "single") 309s ***** assert (class (binornd (1, single ([0, 0]))), "single") 309s ***** assert (class (binornd (1, single (1), 2)), "single") 309s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 309s ***** assert (class (binornd (single (1), 1, 2)), "single") 309s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 309s ***** error binornd () 309s ***** error binornd (1) 309s ***** error ... 309s binornd (ones (3), ones (2)) 309s ***** error ... 309s binornd (ones (2), ones (3)) 309s ***** error binornd (i, 2) 309s ***** error binornd (1, i) 309s ***** error ... 309s binornd (1, 1/2, -1) 309s ***** error ... 309s binornd (1, 1/2, 1.2) 309s ***** error ... 309s binornd (1, 1/2, ones (2)) 309s ***** error ... 309s binornd (1, 1/2, [2 -1 2]) 309s ***** error ... 309s binornd (1, 1/2, [2 0 2.5]) 309s ***** error ... 309s binornd (1, 1/2, 2, -1, 5) 309s ***** error ... 309s binornd (1, 1/2, 2, 1.5, 5) 309s ***** error ... 309s binornd (2, 1/2 * ones (2), 3) 309s ***** error ... 309s binornd (2, 1/2 * ones (2), [3, 2]) 309s ***** error ... 309s binornd (2, 1/2 * ones (2), 3, 2) 309s ***** error ... 309s binornd (2 * ones (2), 1/2, 3) 309s ***** error ... 309s binornd (2 * ones (2), 1/2, [3, 2]) 309s ***** error ... 309s binornd (2 * ones (2), 1/2, 3, 2) 309s 40 tests, 40 passed, 0 known failure, 0 skipped 309s [inst/dist_fun/burrpdf.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/dist_fun/burrpdf.m 309s ***** demo 309s ## Plot various PDFs from the Burr type XII distribution 309s x = 0.001:0.001:3; 309s y1 = burrpdf (x, 1, 1, 1); 309s y2 = burrpdf (x, 1, 1, 2); 309s y3 = burrpdf (x, 1, 1, 3); 309s y4 = burrpdf (x, 1, 2, 1); 309s y5 = burrpdf (x, 1, 3, 1); 309s y6 = burrpdf (x, 1, 0.5, 2); 309s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 309s x, y4, "-c", x, y5, "-m", x, y6, "-k") 309s grid on 309s ylim ([0, 2]) 309s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 309s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 309s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 309s "location", "northeast") 309s title ("Burr type XII PDF") 309s xlabel ("values in x") 309s ylabel ("density") 309s ***** shared x, y 309s x = [-1, 0, 1, 2, Inf]; 309s y = [0, 1, 1/4, 1/9, 0]; 309s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 309s ***** assert (burrpdf (x, 1, 1, 1), y) 309s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 309s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 309s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 309s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 309s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 309s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 309s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 309s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 309s ***** error burrpdf () 309s ***** error burrpdf (1) 309s ***** error burrpdf (1, 2) 309s ***** error burrpdf (1, 2, 3) 309s ***** error ... 309s burrpdf (1, 2, 3, 4, 5) 309s ***** error ... 309s burrpdf (ones (3), ones (2), ones(2), ones(2)) 309s ***** error ... 309s burrpdf (ones (2), ones (3), ones(2), ones(2)) 309s ***** error ... 309s burrpdf (ones (2), ones (2), ones(3), ones(2)) 309s ***** error ... 309s burrpdf (ones (2), ones (2), ones(2), ones(3)) 309s ***** error burrpdf (i, 2, 3, 4) 309s ***** error burrpdf (1, i, 3, 4) 309s ***** error burrpdf (1, 2, i, 4) 309s ***** error burrpdf (1, 2, 3, i) 309s 23 tests, 23 passed, 0 known failure, 0 skipped 309s [inst/anova2.m] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/inst/anova2.m 309s ***** demo 309s 309s # Factorial (Crossed) Two-way ANOVA with Interaction 309s 309s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 309s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 309s 309s [p, atab, stats] = anova2(popcorn, 3, "on"); 309s ***** demo 309s 309s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 309s 309s data = [54, 43, 78, 111; 309s 23, 34, 37, 41; 309s 45, 65, 99, 78; 309s 31, 33, 36, 35; 309s 15, 25, 30, 26]; 309s 309s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 309s ***** demo 309s 309s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 309s 309s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 309s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 309s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 309s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 309s 309s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 309s ***** test 309s ## Test for anova2 ("interaction") 309s ## comparison with results from Matlab for column effect 309s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 309s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 309s [p, atab, stats] = anova2 (popcorn, 3, "off"); 309s assert (p(1), 7.678957383294716e-07, 1e-14); 309s assert (p(2), 0.0001003738963050171, 1e-14); 309s assert (p(3), 0.7462153966366274, 1e-14); 309s assert (atab{2,5}, 56.700, 1e-14); 309s assert (atab{2,3}, 2, 0); 309s assert (atab{4,2}, 0.08333333333333348, 1e-14); 309s assert (atab{5,4}, 0.1388888888888889, 1e-14); 309s assert (atab{5,2}, 1.666666666666667, 1e-14); 309s assert (atab{6,2}, 22); 309s assert (stats.source, "anova2"); 309s assert (stats.colmeans, [6.25, 4.75, 4]); 309s assert (stats.inter, 1, 0); 309s assert (stats.pval, 0.7462153966366274, 1e-14); 309s assert (stats.df, 12); 309s ***** test 309s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 309s data = [54, 43, 78, 111; 309s 23, 34, 37, 41; 309s 45, 65, 99, 78; 309s 31, 33, 36, 35; 309s 15, 25, 30, 26]; 309s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 309s assert (atab{2,2}, 2174.95, 1e-10); 309s assert (atab{3,2}, 8371.7, 1e-10); 309s assert (atab{4,2}, 2404.3, 1e-10); 309s assert (atab{5,2}, 12950.95, 1e-10); 309s assert (atab{2,4}, 724.983333333333, 1e-10); 309s assert (atab{3,4}, 2092.925, 1e-10); 309s assert (atab{4,4}, 200.358333333333, 1e-10); 309s assert (atab{2,5}, 3.61843363972882, 1e-10); 309s assert (atab{3,5}, 10.445909412303, 1e-10); 309s assert (atab{2,6}, 0.087266112738617, 1e-10); 309s assert (atab{3,6}, 0.000698397753556, 1e-10); 309s ***** test 309s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 309s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 309s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 309s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 309s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 309s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 309s assert (atab{2,2}, 745.360306290833, 1e-10); 309s assert (atab{3,2}, 278.01854140125, 1e-10); 309s assert (atab{4,2}, 180.180377467501, 1e-10); 309s assert (atab{5,2}, 1203.55922515958, 1e-10); 309s assert (atab{2,4}, 372.680153145417, 1e-10); 309s assert (atab{3,4}, 92.67284713375, 1e-10); 309s assert (atab{4,4}, 10.0100209704167, 1e-10); 309s assert (atab{2,5}, 4.02146005730833, 1e-10); 309s assert (atab{3,5}, 9.25800729165627, 1e-10); 309s assert (atab{2,6}, 0.141597630656771, 1e-10); 309s assert (atab{3,6}, 0.000636643812875719, 1e-10); 309s 3 tests, 3 passed, 0 known failure, 0 skipped 309s Checking C++ files ... 309s [src/libsvmwrite.cc] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/libsvmwrite.cc 309s ***** shared L, D 309s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 309s ***** error libsvmwrite ("", L, D); 309s ***** error ... 309s libsvmwrite (tempname (), [L;L], D); 309s ***** error ... 309s OUT = libsvmwrite (tempname (), L, D); 309s ***** error ... 309s libsvmwrite (tempname (), single (L), D); 309s ***** error libsvmwrite (13412, L, D); 309s ***** error ... 309s libsvmwrite (tempname (), L, full (D)); 309s ***** error ... 309s libsvmwrite (tempname (), L, D, D); 309s 7 tests, 7 passed, 0 known failure, 0 skipped 309s [src/svmtrain.cc] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/svmtrain.cc 309s ***** test 309s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 309s model = svmtrain(L, D, '-c 1 -g 0.07'); 309s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 309s assert (isstruct (model), true); 309s assert (isfield (model, "Parameters"), true); 309s assert (model.totalSV, 130); 309s assert (model.nr_class, 2); 309s assert (size (model.Label), [2, 1]); 309s ***** shared L, D 309s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 309s ***** error [L, D] = svmtrain (L, D); 309s ***** error ... 309s model = svmtrain (single (L), D); 309s ***** error ... 309s model = svmtrain (L, D, "", ""); 309s 4 tests, 4 passed, 0 known failure, 0 skipped 309s [src/svmpredict.cc] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/svmpredict.cc 309s ***** test 309s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 309s model = svmtrain (L, D, '-c 1 -g 0.07'); 309s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 309s assert (size (predict_label), size (dec_values)); 309s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 309s assert (dec_values(1), 1.225836001973273, 1e-14); 309s assert (dec_values(2), -0.3212992933043805, 1e-14); 309s assert (predict_label(1), 1); 309s ***** shared L, D, model 309s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 309s model = svmtrain (L, D, '-c 1 -g 0.07'); 309s ***** error ... 309s [p, a] = svmpredict (L, D, model); 309s ***** error p = svmpredict (L, D); 309s ***** error ... 309s p = svmpredict (single (L), D, model); 309s ***** error p = svmpredict (L, D, 123); 309s 5 tests, 5 passed, 0 known failure, 0 skipped 309s [src/editDistance.cc] 309s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/editDistance.cc 309s ***** error d = editDistance (1, 2, 3, 4); 309s ***** error ... 309s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 309s ***** error ... 309s [C, IA] = editDistance ({"AS","SD","AD"}); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, [1, 2]); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, -2); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, 1.25); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 309s ***** error ... 309s d = editDistance ("string1", "string2", [1, 2]); 309s ***** error ... 309s d = editDistance ("string1", "string2", -2); 309s ***** error ... 309s d = editDistance ("string1", "string2", 1.25); 309s ***** error ... 309s d = editDistance ({{"string1", "string2"}, 2}); 309s ***** error ... 309s d = editDistance ({{"string1", "string2"}, 2}, 2); 309s ***** error ... 309s d = editDistance ([1, 2, 3]); 309s ***** error ... 309s d = editDistance (["AS","SD","AD","AS"]); 309s ***** error ... 309s d = editDistance (["AS","SD","AD"], 2); 309s ***** error ... 309s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 309s ***** error ... 309s d = editDistance ([1,2,3], {"AS","AS","AD"}); 309s ***** error ... 309s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 309s ***** error ... 309s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 309s ***** test 309s d = editDistance ({"AS","SD","AD"}); 309s assert (d, [2; 1; 1]); 309s assert (class (d), "double"); 309s ***** test 309s C = editDistance ({"AS","SD","AD"}, 1); 309s assert (iscellstr (C), true); 309s assert (C, {"AS";"SD"}); 309s ***** test 309s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 309s assert (class (IA), "double"); 309s assert (IA, [1;2]); 309s ***** test 309s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 309s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 309s assert (class (IA), "double"); 309s assert (A(IA), C); 309s ***** test 309s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 309s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 309s assert (class (IA), "cell"); 309s assert (C, {"ASS"; "FDE"; "OPA"}); 309s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 309s assert (A(IA{2}), {"FDE"; "EDS"}); 309s assert (A(IA{3}), {"OPA"}); 309s ***** test 309s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 309s [C, IA, IC] = editDistance (A, 2); 309s assert (class (IA), "double"); 309s assert (A(IA), C); 309s assert (IC, [1; 1; 3; 1; 5]); 309s ***** test 309s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 309s assert (d, [0; 1; 2]); 309s assert (class (d), "double"); 310s ***** test 310s d = editDistance ({"AS","SD","AD"}, {"AS"}); 310s assert (d, [0; 2; 1]); 310s assert (class (d), "double"); 310s ***** test 310s d = editDistance ({"AS"}, {"AS","SD","AD"}); 310s assert (d, [0; 2; 1]); 310s assert (class (d), "double"); 310s ***** test 310s b = editDistance ("Octave", "octave"); 310s assert (b, 1); 310s assert (class (b), "double"); 310s 33 tests, 33 passed, 0 known failure, 0 skipped 310s [src/fcnntrain.cc] 310s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/fcnntrain.cc 310s ***** shared X, Y, MODEL 310s load fisheriris 310s X = meas; 310s Y = grp2idx (species); 310s ***** error ... 310s model = fcnntrain (X, Y); 310s ***** error ... 310s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 310s ***** error ... 310s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 310s 33 tests, 33 passed, 0 known failure, 0 skipped 310s [src/fcnnpredict.cc] 310s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/fcnnpredict.cc 310s ***** shared X, Y, MODEL 310s load fisheriris 310s X = meas; 310s Y = grp2idx (species); 310s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 310s ***** test 310s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 310s assert (numel (Y_pred), numel (Y)); 310s assert (isequal (size (Y_pred), size (Y)), true); 310s assert (columns (Y_scores), numel (unique (Y))); 310s assert (rows (Y_scores), numel (Y)); 310s ***** error ... 310s fcnnpredict (MODEL); 310s ***** error ... 310s [Q, W, E] = fcnnpredict (MODEL, X); 310s ***** error ... 310s fcnnpredict (1, X); 310s ***** error ... 310s fcnnpredict (struct ("L", {1, 2, 3}), X); 310s ***** error ... 310s fcnnpredict (struct ("L", 1), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", 1), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {1}), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 310s "Activations", [2]), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 310s "Activations", [2; 2]), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 310s "Activations", {{2, 2}}), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 310s "Activations", {{"sigmoid", "softmax"}}), X); 310s ***** error ... 310s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 310s "Activations", "sigmoid"), X); 310s ***** error ... 310s fcnnpredict (MODEL, complex (X)); 310s ***** error ... 310s fcnnpredict (MODEL, {1, 2, 3, 4}); 310s ***** error ... 310s fcnnpredict (MODEL, "asd"); 310s ***** error ... 310s fcnnpredict (MODEL, []); 310s ***** error ... 310s fcnnpredict (MODEL, X(:,[1:3])); 310s 20 tests, 20 passed, 0 known failure, 0 skipped 310s [src/libsvmread.cc] 310s >>>>> /tmp/autopkgtest.qocZbR/build.ORM/src/src/libsvmread.cc 310s ***** error [L, D] = libsvmread (24); 310s ***** error ... 310s D = libsvmread ("filename"); 310s ***** test 310s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 310s assert (size (L), [270, 1]); 310s assert (size (D), [270, 13]); 310s ***** test 310s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 310s assert (issparse (L), false); 310s assert (issparse (D), true); 310s 4 tests, 4 passed, 0 known failure, 0 skipped 310s Done running the unit tests. 310s Summary: 11028 tests, 11025 passed, 1 known failures, 2 skipped 310s autopkgtest [21:17:02]: test command1: -----------------------] 313s command1 PASS 313s autopkgtest [21:17:05]: test command1: - - - - - - - - - - results - - - - - - - - - - 313s autopkgtest [21:17:05]: @@@@@@@@@@@@@@@@@@@@ summary 313s command1 PASS 330s nova [W] Skipping flock for amd64 330s Creating nova instance adt-plucky-amd64-octave-statistics-20250215-211152-juju-7f2275-prod-proposed-migration-environment-15-6a4a5952-c15f-43c5-9f53-6286c3818846 from image adt/ubuntu-plucky-amd64-server-20250215.img (UUID d1f7bb98-7df8-4026-816e-9f6798166d8b)... 330s nova [W] Timed out waiting for 8c08d59a-e399-44b8-ad55-c8a764ca06ea to get deleted.