0s autopkgtest [16:09:30]: starting date and time: 2025-03-15 16:09:30+0000 0s autopkgtest [16:09:30]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [16:09:30]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.eqrw6f8m/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-s390x-9.secgroup --name adt-plucky-s390x-octave-statistics-20250315-160930-juju-7f2275-prod-proposed-migration-environment-2-9fbcce74-df86-472d-852f-ff989e456486 --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-s390x -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 97s autopkgtest [16:11:07]: testbed dpkg architecture: s390x 97s autopkgtest [16:11:07]: testbed apt version: 2.9.33 97s autopkgtest [16:11:07]: @@@@@@@@@@@@@@@@@@@@ test bed setup 97s autopkgtest [16:11:07]: testbed release detected to be: None 98s autopkgtest [16:11:08]: updating testbed package index (apt update) 98s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 99s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 99s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 99s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 99s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 100s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 100s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 100s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [113 kB] 101s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x c-n-f Metadata [1824 B] 101s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x c-n-f Metadata [116 B] 101s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [320 kB] 101s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x c-n-f Metadata [13.4 kB] 102s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3776 B] 102s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x c-n-f Metadata [240 B] 102s Fetched 1073 kB in 3s (316 kB/s) 102s Reading package lists... 103s Reading package lists... 103s Building dependency tree... 103s Reading state information... 103s Calculating upgrade... 103s Calculating upgrade... 103s The following packages were automatically installed and are no longer required: 103s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 103s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 103s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 103s linux-tools-6.11.0-8-generic 103s Use 'sudo apt autoremove' to remove them. 103s The following packages will be upgraded: 103s pinentry-curses python3-jinja2 strace 103s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 103s Need to get 652 kB of archives. 103s After this operation, 27.6 kB of additional disk space will be used. 103s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x strace s390x 6.13+ds-1ubuntu1 [500 kB] 105s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x pinentry-curses s390x 1.3.1-2ubuntu3 [42.9 kB] 105s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 106s Fetched 652 kB in 2s (300 kB/s) 106s (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 ... 81428 files and directories currently installed.) 106s Preparing to unpack .../strace_6.13+ds-1ubuntu1_s390x.deb ... 106s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 106s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_s390x.deb ... 106s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 106s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 106s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 106s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 106s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 106s Setting up strace (6.13+ds-1ubuntu1) ... 106s Processing triggers for man-db (2.13.0-1) ... 107s Reading package lists... 107s Building dependency tree... 107s Reading state information... 107s Solving dependencies... 107s The following packages will be REMOVED: 107s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 107s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 107s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 107s linux-tools-6.11.0-8-generic* 107s 0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded. 107s After this operation, 167 MB disk space will be freed. 107s (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 ... 81428 files and directories currently installed.) 107s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 107s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 107s Removing libpython3.12t64:s390x (3.12.9-1) ... 107s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 107s Removing libnsl2:s390x (1.3.0-3build3) ... 107s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 107s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 107s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 108s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 108s Processing triggers for libc-bin (2.41-1ubuntu1) ... 108s (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 ... 56328 files and directories currently installed.) 108s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 108s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 109s autopkgtest [16:11:19]: upgrading testbed (apt dist-upgrade and autopurge) 109s Reading package lists... 109s Building dependency tree... 109s Reading state information... 109s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 109s Starting 2 pkgProblemResolver with broken count: 0 109s Done 109s Entering ResolveByKeep 109s 109s Calculating upgrade... 109s The following packages will be upgraded: 109s libc-bin libc-dev-bin libc6 libc6-dev locales 111s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 111s Need to get 9512 kB of archives. 111s After this operation, 8192 B of additional disk space will be used. 111s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu2 [1678 kB] 113s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu2 [24.3 kB] 114s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu2 [2892 kB] 117s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu2 [671 kB] 118s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu2 [4246 kB] 124s Preconfiguring packages ... 124s Fetched 9512 kB in 14s (684 kB/s) 124s (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 ... 56326 files and directories currently installed.) 124s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_s390x.deb ... 124s Unpacking libc6-dev:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 124s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_s390x.deb ... 124s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 124s Preparing to unpack .../libc6_2.41-1ubuntu2_s390x.deb ... 124s Unpacking libc6:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 124s Setting up libc6:s390x (2.41-1ubuntu2) ... 124s (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 ... 56326 files and directories currently installed.) 124s Preparing to unpack .../libc-bin_2.41-1ubuntu2_s390x.deb ... 124s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 124s Setting up libc-bin (2.41-1ubuntu2) ... 124s (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 ... 56326 files and directories currently installed.) 124s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 124s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 124s Setting up locales (2.41-1ubuntu2) ... 124s Generating locales (this might take a while)... 125s en_US.UTF-8... done 125s Generation complete. 125s Setting up libc-dev-bin (2.41-1ubuntu2) ... 125s Setting up libc6-dev:s390x (2.41-1ubuntu2) ... 126s Processing triggers for man-db (2.13.0-1) ... 126s Processing triggers for systemd (257.3-1ubuntu3) ... 127s Reading package lists... 127s Building dependency tree... 127s Reading state information... 127s Starting pkgProblemResolver with broken count: 0 127s Starting 2 pkgProblemResolver with broken count: 0 127s Done 127s Solving dependencies... 128s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 128s autopkgtest [16:11:38]: rebooting testbed after setup commands that affected boot 146s autopkgtest [16:11:56]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP Wed Mar 12 14:53:49 UTC 2025 149s autopkgtest [16:11:59]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 153s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (dsc) [2285 B] 153s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (tar) [1302 kB] 153s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (diff) [9744 B] 153s gpgv: Signature made Thu Feb 20 15:34:23 2025 UTC 153s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 153s gpgv: Can't check signature: No public key 153s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.3-2.dsc: no acceptable signature found 153s autopkgtest [16:12:03]: testing package octave-statistics version 1.7.3-2 154s autopkgtest [16:12:04]: build not needed 157s autopkgtest [16:12:07]: test command1: preparing testbed 157s Reading package lists... 157s Building dependency tree... 157s Reading state information... 157s Starting pkgProblemResolver with broken count: 0 157s Starting 2 pkgProblemResolver with broken count: 0 157s Done 158s The following NEW packages will be installed: 158s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 158s cpp-14 cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit 158s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 158s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 158s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-s390x-linux-gnu 158s g++-s390x-linux-gnu gcc gcc-14 gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu 158s gettext gfortran gfortran-14 gfortran-14-s390x-linux-gnu 158s gfortran-s390x-linux-gnu gnuplot-data gnuplot-nox hdf5-helpers 158s intltool-debian krb5-multidev libaec-dev libaec0 libalgorithm-c3-perl 158s libaliased-perl libamd3 libaom3 libapp-cmd-perl libappstream5 158s libapt-pkg-perl libarchive-zip-perl libarpack2t64 libarray-intspan-perl 158s libasan8 libasound2-data libasound2t64 libavahi-client3 libavahi-common-data 158s libavahi-common3 libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 158s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 158s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 158s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 158s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 158s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 158s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 158s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 158s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 158s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 158s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 158s libdata-validate-domain-perl libdata-validate-ip-perl 158s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 158s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 158s libdevel-stacktrace-perl libdouble-conversion3 libduktape207 158s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 158s libencode-locale-perl liberror-perl libevent-2.1-7t64 158s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 158s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 158s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 158s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 158s libfile-which-perl libflac12t64 libfltk-gl1.3t64 libfltk1.3t64 158s libfont-ttf-perl libfontconfig1 libfontenc1 libfreetype6 libgbm1 158s libgcc-14-dev libgd3 libgetopt-long-descriptive-perl libgfortran-14-dev 158s libgfortran5 libgl-dev libgl1 libgl1-mesa-dri libgl2ps1.4 libglpk40 158s libglu1-mesa libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev 158s libgmpxx4ldbl libgnutls-dane0t64 libgnutls-openssl27t64 libgnutls28-dev 158s libgomp1 libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 158s libgraphite2-3 libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 158s libhdf5-cpp-310 libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 158s libhdf5-hl-cpp-310 libhdf5-hl-fortran-310 libheif-plugin-aomdec 158s libheif-plugin-libde265 libheif1 libhtml-form-perl 158s libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl 158s libhtml-tokeparser-simple-perl libhtml-tree-perl libhttp-cookies-perl 158s libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice6 158s libidn2-dev libimagequant0 libimport-into-perl libindirect-perl libinput-bin 158s libinput10 libio-html-perl libio-interactive-perl libio-socket-ssl-perl 158s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 158s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 158s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 158s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 158s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 158s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblist-compare-perl 158s liblist-moreutils-perl liblist-moreutils-xs-perl liblist-someutils-perl 158s liblist-utilsby-perl liblog-any-adapter-screen-perl liblog-any-perl 158s liblog-log4perl-perl libltdl7 liblua5.4-0 liblwp-mediatypes-perl 158s liblwp-protocol-https-perl libmailtools-perl libmarkdown2 libmd4c0 158s libmime-tools-perl libmldbm-perl libmodule-implementation-perl 158s libmodule-pluggable-perl libmodule-runtime-perl libmoo-perl 158s libmoox-aliases-perl libmouse-perl libmousex-nativetraits-perl 158s libmousex-strictconstructor-perl libmp3lame0 libmpc3 libmpg123-0t64 158s libmro-compat-perl libmtdev1t64 libnamespace-clean-perl libncurses-dev 158s libnet-domain-tld-perl libnet-http-perl libnet-ipv6addr-perl 158s libnet-netmask-perl libnet-smtp-ssl-perl libnet-ssleay-perl 158s libnetaddr-ip-perl libnghttp2-dev libnumber-compare-perl libobject-pad-perl 158s libogg0 libopengl0 libopus0 libp11-kit-dev libpackage-stash-perl 158s libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libparams-classify-perl 158s libparams-util-perl libparams-validate-perl libparse-debcontrol-perl 158s libparse-recdescent-perl libpath-iterator-rule-perl libpath-tiny-perl 158s libpcre2-16-0 libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 158s libpkgconf3 libpod-constants-perl libpod-parser-perl libpod-pom-perl 158s libportaudio2 libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 158s libqrupdate1 libqscintilla2-qt6-15 libqscintilla2-qt6-l10n 158s libqt6core5compat6 libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 158s libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 158s libqt6sql6 libqt6widgets6 libqt6xml6 libraqm0 libreadline-dev 158s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 158s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 158s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 158s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 158s libsoftware-license-perl libsoftware-licensemoreutils-perl 158s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 158s libstemmer0d libstrictures-perl libstring-copyright-perl 158s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 158s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 158s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 158s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 158s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 158s libtext-glob-perl libtext-levenshtein-damerau-perl 158s libtext-levenshteinxs-perl libtext-markdown-discount-perl 158s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 158s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 158s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 158s libtry-tiny-perl libts0t64 libubsan1 libumfpack6 libunbound8 158s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 158s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 158s libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 158s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 158s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 158s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 158s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 158s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 158s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 158s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 158s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 158s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 158s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 158s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 158s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 158s octave-common octave-dev octave-io octave-statistics 158s octave-statistics-common patchutils perl-openssl-defaults pkgconf 158s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 158s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 158s xtrans-dev xvfb zlib1g-dev 158s 0 upgraded, 469 newly installed, 0 to remove and 0 not upgraded. 158s Need to get 175 MB of archives. 158s After this operation, 594 MB of additional disk space will be used. 158s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libstemmer0d s390x 2.2.0-4build1 [174 kB] 158s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x libappstream5 s390x 1.0.4-1 [236 kB] 159s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x appstream s390x 1.0.4-1 [72.2 kB] 159s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x m4 s390x 1.4.19-7 [259 kB] 159s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x autoconf all 2.72-3ubuntu1 [383 kB] 160s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x autotools-dev all 20220109.1 [44.9 kB] 160s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x automake all 1:1.17-3ubuntu1 [572 kB] 161s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x autopoint all 0.23.1-1 [619 kB] 162s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libcapture-tiny-perl all 0.50-1 [20.7 kB] 162s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libparams-util-perl s390x 1.102-3build1 [21.3 kB] 162s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-install-perl all 0.929-1 [9764 B] 162s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-optlist-perl all 0.114-1 [9708 B] 162s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x libb-hooks-op-check-perl s390x 0.22-3build2 [9566 B] 162s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x libdynaloader-functions-perl all 0.004-1 [11.4 kB] 162s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-callchecker-perl s390x 0.009-1build1 [14.2 kB] 162s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libparams-classify-perl s390x 0.015-2build6 [20.6 kB] 162s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libmodule-runtime-perl all 0.016-2 [16.4 kB] 162s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x libtry-tiny-perl all 0.32-1 [21.2 kB] 162s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x libmodule-implementation-perl all 0.09-2 [12.0 kB] 162s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x libpackage-stash-perl all 0.40-1 [19.5 kB] 162s Get:21 http://ftpmaster.internal/ubuntu plucky/universe s390x libclass-load-perl all 0.25-2 [12.7 kB] 162s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x libio-stringy-perl all 2.113-2 [45.3 kB] 162s Get:23 http://ftpmaster.internal/ubuntu plucky/universe s390x libparams-validate-perl s390x 1.31-2build4 [54.9 kB] 163s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-exporter-perl all 0.990-1 [49.0 kB] 163s Get:25 http://ftpmaster.internal/ubuntu plucky/universe s390x libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 163s Get:26 http://ftpmaster.internal/ubuntu plucky/universe s390x libio-tiecombine-perl all 1.005-3 [9464 B] 163s Get:27 http://ftpmaster.internal/ubuntu plucky/universe s390x libmodule-pluggable-perl all 5.2-5 [19.5 kB] 163s Get:28 http://ftpmaster.internal/ubuntu plucky/universe s390x libstring-rewriteprefix-perl all 0.009-1 [6310 B] 163s Get:29 http://ftpmaster.internal/ubuntu plucky/universe s390x libapp-cmd-perl all 0.337-2 [58.3 kB] 163s Get:30 http://ftpmaster.internal/ubuntu plucky/universe s390x libboolean-perl all 0.46-3 [8430 B] 163s Get:31 http://ftpmaster.internal/ubuntu plucky/universe s390x libsub-uplevel-perl all 0.2800-3 [11.6 kB] 163s Get:32 http://ftpmaster.internal/ubuntu plucky/universe s390x libtest-exception-perl all 0.43-3 [13.4 kB] 163s Get:33 http://ftpmaster.internal/ubuntu plucky/universe s390x libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 163s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-which-perl all 1.27-2 [12.5 kB] 163s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-homedir-perl all 1.006-2 [37.0 kB] 163s Get:36 http://ftpmaster.internal/ubuntu plucky/universe s390x libclone-choose-perl all 0.010-2 [7738 B] 163s Get:37 http://ftpmaster.internal/ubuntu plucky/universe s390x libhash-merge-perl all 0.302-1 [13.0 kB] 163s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libjson-perl all 4.10000-1 [81.9 kB] 163s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libexporter-tiny-perl all 1.006002-1 [36.8 kB] 163s Get:40 http://ftpmaster.internal/ubuntu plucky/universe s390x liblist-moreutils-xs-perl s390x 0.430-4build1 [45.3 kB] 163s Get:41 http://ftpmaster.internal/ubuntu plucky/universe s390x liblist-moreutils-perl all 0.430-2 [38.2 kB] 163s Get:42 http://ftpmaster.internal/ubuntu plucky/universe s390x liblog-log4perl-perl all 1.57-1 [345 kB] 164s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x libmouse-perl s390x 2.5.11-1build1 [134 kB] 164s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 164s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x libmousex-strictconstructor-perl all 0.02-3 [4582 B] 164s Get:46 http://ftpmaster.internal/ubuntu plucky/universe s390x libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 165s Get:47 http://ftpmaster.internal/ubuntu plucky/main s390x libpath-tiny-perl all 0.146-1 [47.5 kB] 165s Get:48 http://ftpmaster.internal/ubuntu plucky/universe s390x libpod-pom-perl all 2.01-4 [61.3 kB] 165s Get:49 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-common-perl all 2024080801-1 [162 kB] 165s Get:50 http://ftpmaster.internal/ubuntu plucky/main s390x libyaml-tiny-perl all 1.76-1 [24.2 kB] 165s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-perl all 2.155-1 [356 kB] 166s Get:52 http://ftpmaster.internal/ubuntu plucky/universe s390x libyaml-pp-perl all 0.39.0-1 [107 kB] 166s Get:53 http://ftpmaster.internal/ubuntu plucky/universe s390x cme all 1.041-1 [65.4 kB] 166s Get:54 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 167s Get:55 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 167s Get:56 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [9572 kB] 183s Get:57 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-17ubuntu3 [1028 B] 183s Get:58 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 183s Get:59 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 183s Get:60 http://ftpmaster.internal/ubuntu plucky/main s390x libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 183s Get:61 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 15-20250222-0ubuntu1 [49.2 kB] 183s Get:62 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 184s Get:63 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 15-20250222-0ubuntu1 [31.2 kB] 184s Get:64 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 15-20250222-0ubuntu1 [2970 kB] 188s Get:65 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 15-20250222-0ubuntu1 [1212 kB] 190s Get:66 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-17ubuntu3 [1037 kB] 192s Get:67 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [18.7 MB] 213s Get:68 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-17ubuntu3 [526 kB] 213s Get:69 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 213s Get:70 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 213s Get:71 http://ftpmaster.internal/ubuntu plucky/main s390x libtool all 2.5.4-4 [168 kB] 214s Get:72 http://ftpmaster.internal/ubuntu plucky/main s390x dh-autoreconf all 20 [16.1 kB] 214s Get:73 http://ftpmaster.internal/ubuntu plucky/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 214s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 214s Get:75 http://ftpmaster.internal/ubuntu plucky/main s390x dh-strip-nondeterminism all 1.14.1-2 [5064 B] 214s Get:76 http://ftpmaster.internal/ubuntu plucky/main s390x debugedit s390x 1:5.1-2 [50.1 kB] 214s Get:77 http://ftpmaster.internal/ubuntu plucky/main s390x dwz s390x 0.15-1build6 [122 kB] 214s Get:78 http://ftpmaster.internal/ubuntu plucky/main s390x gettext s390x 0.23.1-1 [1065 kB] 215s Get:79 http://ftpmaster.internal/ubuntu plucky/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 215s Get:80 http://ftpmaster.internal/ubuntu plucky/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 215s Get:81 http://ftpmaster.internal/ubuntu plucky/main s390x debhelper all 13.24.1ubuntu2 [895 kB] 216s Get:82 http://ftpmaster.internal/ubuntu plucky/universe s390x aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 216s Get:83 http://ftpmaster.internal/ubuntu plucky/universe s390x gnuplot-data all 6.0.2+dfsg1-1 [75.4 kB] 217s Get:84 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 217s Get:85 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 218s Get:86 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 218s Get:87 http://ftpmaster.internal/ubuntu plucky/universe s390x fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 224s Get:88 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-2ubuntu1 [37.5 kB] 224s Get:89 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-2ubuntu1 [150 kB] 224s Get:90 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 224s Get:91 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 224s Get:92 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 224s Get:93 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 224s Get:94 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 225s Get:95 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 225s Get:96 http://ftpmaster.internal/ubuntu plucky/main s390x libaom3 s390x 3.12.0-1 [1492 kB] 226s Get:97 http://ftpmaster.internal/ubuntu plucky/main s390x libheif-plugin-aomdec s390x 1.19.7-1 [11.6 kB] 226s Get:98 http://ftpmaster.internal/ubuntu plucky/main s390x libde265-0 s390x 1.0.15-1build5 [175 kB] 226s Get:99 http://ftpmaster.internal/ubuntu plucky/main s390x libheif-plugin-libde265 s390x 1.19.7-1 [9054 B] 227s Get:100 http://ftpmaster.internal/ubuntu plucky/main s390x libheif1 s390x 1.19.7-1 [415 kB] 227s Get:101 http://ftpmaster.internal/ubuntu plucky/main s390x libimagequant0 s390x 2.18.0-1build1 [43.3 kB] 227s Get:102 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 227s Get:103 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 227s Get:104 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 228s Get:105 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 228s Get:106 http://ftpmaster.internal/ubuntu plucky/main s390x libraqm0 s390x 0.10.2-1 [15.8 kB] 228s Get:107 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 228s Get:108 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 228s Get:109 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 228s Get:110 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 229s Get:111 http://ftpmaster.internal/ubuntu plucky/main s390x libxpm4 s390x 1:3.5.17-1build2 [41.2 kB] 229s Get:112 http://ftpmaster.internal/ubuntu plucky/main s390x libgd3 s390x 2.3.3-12ubuntu3 [141 kB] 229s Get:113 http://ftpmaster.internal/ubuntu plucky/main s390x liblua5.4-0 s390x 5.4.7-1 [174 kB] 229s Get:114 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-2ubuntu1 [191 kB] 229s Get:115 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 229s Get:116 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 229s Get:117 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 229s Get:118 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.2-1 [253 kB] 230s Get:119 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.2-1 [50.2 kB] 230s Get:120 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.2-1 [28.2 kB] 230s Get:121 http://ftpmaster.internal/ubuntu plucky/main s390x libwebpmux3 s390x 1.5.0-0.1 [25.8 kB] 230s Get:122 http://ftpmaster.internal/ubuntu plucky/universe s390x gnuplot-nox s390x 6.0.2+dfsg1-1 [1030 kB] 231s Get:123 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-octave-autopkgtest all 1.8.0 [10.1 kB] 231s Get:124 http://ftpmaster.internal/ubuntu plucky/main s390x libapt-pkg-perl s390x 0.1.41build1 [71.2 kB] 231s Get:125 http://ftpmaster.internal/ubuntu plucky/main s390x libarray-intspan-perl all 2.004-2 [25.0 kB] 231s Get:126 http://ftpmaster.internal/ubuntu plucky/main s390x libyaml-libyaml-perl s390x 0.903.0+ds-1 [32.8 kB] 231s Get:127 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 231s Get:128 http://ftpmaster.internal/ubuntu plucky/universe s390x libexporter-lite-perl all 0.09-2 [9748 B] 231s Get:129 http://ftpmaster.internal/ubuntu plucky/main s390x libencode-locale-perl all 1.05-3 [11.6 kB] 231s Get:130 http://ftpmaster.internal/ubuntu plucky/main s390x libtimedate-perl all 2.3300-2 [34.0 kB] 231s Get:131 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-date-perl all 6.06-1 [10.2 kB] 231s Get:132 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-listing-perl all 6.16-1 [11.3 kB] 231s Get:133 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tagset-perl all 3.24-1 [14.1 kB] 231s Get:134 http://ftpmaster.internal/ubuntu plucky/main s390x liburi-perl all 5.30-1 [94.4 kB] 232s Get:135 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-parser-perl s390x 3.83-1build1 [87.8 kB] 232s Get:136 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tree-perl all 5.07-3 [200 kB] 232s Get:137 http://ftpmaster.internal/ubuntu plucky/main s390x libclone-perl s390x 0.47-1 [10.7 kB] 232s Get:138 http://ftpmaster.internal/ubuntu plucky/main s390x libio-html-perl all 1.004-3 [15.9 kB] 232s Get:139 http://ftpmaster.internal/ubuntu plucky/main s390x liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 232s Get:140 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 232s Get:141 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-cookies-perl all 6.11-1 [18.2 kB] 232s Get:142 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-negotiate-perl all 6.01-2 [12.4 kB] 232s Get:143 http://ftpmaster.internal/ubuntu plucky/main s390x perl-openssl-defaults s390x 7build3 [6628 B] 232s Get:144 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-ssleay-perl s390x 1.94-3 [320 kB] 232s Get:145 http://ftpmaster.internal/ubuntu plucky/main s390x libio-socket-ssl-perl all 2.089-1 [200 kB] 233s Get:146 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-http-perl all 6.23-1 [22.3 kB] 233s Get:147 http://ftpmaster.internal/ubuntu plucky/main s390x liblwp-protocol-https-perl all 6.14-1 [9040 B] 233s Get:148 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-robotrules-perl all 6.02-1 [12.6 kB] 233s Get:149 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-perl all 6.78-1 [139 kB] 233s Get:150 http://ftpmaster.internal/ubuntu plucky/main s390x liberror-perl all 0.17030-1 [23.5 kB] 233s Get:151 http://ftpmaster.internal/ubuntu plucky/universe s390x libparse-debcontrol-perl all 2.005-6 [20.4 kB] 233s Get:152 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-copyright-perl all 0.014-1 [14.5 kB] 233s Get:153 http://ftpmaster.internal/ubuntu plucky/universe s390x libalgorithm-c3-perl all 0.11-2 [10.2 kB] 233s Get:154 http://ftpmaster.internal/ubuntu plucky/universe s390x libclass-c3-perl all 0.35-2 [18.4 kB] 233s Get:155 http://ftpmaster.internal/ubuntu plucky/universe s390x libmro-compat-perl all 0.15-2 [10.1 kB] 233s Get:156 http://ftpmaster.internal/ubuntu plucky/universe s390x libdata-section-perl all 0.200008-1 [11.6 kB] 233s Get:157 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-template-perl all 1.61-1 [48.5 kB] 233s Get:158 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-license-perl all 0.104006-1 [117 kB] 233s Get:159 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 233s Get:160 http://ftpmaster.internal/ubuntu plucky/main s390x libsort-versions-perl all 1.62-3 [7378 B] 233s Get:161 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-reform-perl all 1.20-5 [35.4 kB] 233s Get:162 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-autoformat-perl all 1.750000-2 [29.8 kB] 233s Get:163 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 233s Get:164 http://ftpmaster.internal/ubuntu plucky/universe s390x libtoml-tiny-perl all 0.19-1 [21.6 kB] 233s Get:165 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-inspector-perl all 1.36-3 [15.4 kB] 233s Get:166 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-sharedir-perl all 1.118-3 [14.0 kB] 233s Get:167 http://ftpmaster.internal/ubuntu plucky/main s390x libindirect-perl s390x 0.39-2build5 [22.4 kB] 233s Get:168 http://ftpmaster.internal/ubuntu plucky/main s390x libxs-parse-keyword-perl s390x 0.48-2 [63.5 kB] 233s Get:169 http://ftpmaster.internal/ubuntu plucky/main s390x libxs-parse-sublike-perl s390x 0.37-1 [44.2 kB] 234s Get:170 http://ftpmaster.internal/ubuntu plucky/main s390x libobject-pad-perl s390x 0.820-1 [131 kB] 234s Get:171 http://ftpmaster.internal/ubuntu plucky/main s390x libsyntax-keyword-try-perl s390x 0.30-1 [24.8 kB] 234s Get:172 http://ftpmaster.internal/ubuntu plucky/main s390x libio-interactive-perl all 1.026-1 [10.8 kB] 234s Get:173 http://ftpmaster.internal/ubuntu plucky/main s390x liblog-any-perl all 1.717-1 [73.2 kB] 234s Get:174 http://ftpmaster.internal/ubuntu plucky/main s390x liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 234s Get:175 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 234s Get:176 http://ftpmaster.internal/ubuntu plucky/main s390x libvariable-magic-perl s390x 0.64-1build1 [36.4 kB] 234s Get:177 http://ftpmaster.internal/ubuntu plucky/main s390x libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 234s Get:178 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-identify-perl s390x 0.14-3build4 [10.0 kB] 234s Get:179 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-name-perl s390x 0.28-1 [10.8 kB] 234s Get:180 http://ftpmaster.internal/ubuntu plucky/main s390x libnamespace-clean-perl all 0.27-2 [14.0 kB] 234s Get:181 http://ftpmaster.internal/ubuntu plucky/main s390x libnumber-compare-perl all 0.03-3 [5974 B] 234s Get:182 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-glob-perl all 0.11-3 [6780 B] 234s Get:183 http://ftpmaster.internal/ubuntu plucky/main s390x libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 234s Get:184 http://ftpmaster.internal/ubuntu plucky/main s390x libpod-parser-perl all 1.67-1 [80.6 kB] 234s Get:185 http://ftpmaster.internal/ubuntu plucky/main s390x libpod-constants-perl all 0.19-2 [16.3 kB] 234s Get:186 http://ftpmaster.internal/ubuntu plucky/main s390x libset-intspan-perl all 1.19-3 [24.8 kB] 234s Get:187 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-copyright-perl all 0.003014-1 [20.5 kB] 234s Get:188 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-escape-perl all 2010.002-3 [16.1 kB] 234s Get:189 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 234s Get:190 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 234s Get:191 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 234s Get:192 http://ftpmaster.internal/ubuntu plucky/main s390x licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 234s Get:193 http://ftpmaster.internal/ubuntu plucky/main s390x diffstat s390x 1.67-1 [33.1 kB] 234s Get:194 http://ftpmaster.internal/ubuntu plucky/main s390x libberkeleydb-perl s390x 0.66-1 [115 kB] 234s Get:195 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-xsaccessor-perl s390x 1.19-4build6 [34.2 kB] 235s Get:196 http://ftpmaster.internal/ubuntu plucky/main s390x libconfig-tiny-perl all 2.30-1 [14.7 kB] 235s Get:197 http://ftpmaster.internal/ubuntu plucky/main s390x libconst-fast-perl all 0.014-2 [8034 B] 235s Get:198 http://ftpmaster.internal/ubuntu plucky/main s390x libcpanel-json-xs-perl s390x 4.39-1 [118 kB] 235s Get:199 http://ftpmaster.internal/ubuntu plucky/main s390x libaliased-perl all 0.34-3 [12.8 kB] 235s Get:200 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-data-inheritable-perl all 0.10-1 [8038 B] 235s Get:201 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 235s Get:202 http://ftpmaster.internal/ubuntu plucky/main s390x libexception-class-perl all 1.45-1 [28.6 kB] 235s Get:203 http://ftpmaster.internal/ubuntu plucky/main s390x libiterator-perl all 0.03+ds1-2 [18.8 kB] 235s Get:204 http://ftpmaster.internal/ubuntu plucky/main s390x libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 235s Get:205 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-dpath-perl all 0.60-1 [37.3 kB] 235s Get:206 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-domain-tld-perl all 1.75-4 [29.0 kB] 235s Get:207 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-domain-perl all 0.15-1 [10.4 kB] 235s Get:208 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 235s Get:209 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-netmask-perl all 2.0002-2 [24.8 kB] 235s Get:210 http://ftpmaster.internal/ubuntu plucky/main s390x libnetaddr-ip-perl s390x 4.079+dfsg-2build5 [80.6 kB] 235s Get:211 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-ip-perl all 0.31-1 [17.2 kB] 235s Get:212 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-uri-perl all 0.07-3 [10.8 kB] 235s Get:213 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-size-perl s390x 0.84-1build1 [20.0 kB] 235s Get:214 http://ftpmaster.internal/ubuntu plucky/main s390x libemail-address-xs-perl s390x 1.05-1build5 [29.3 kB] 235s Get:215 http://ftpmaster.internal/ubuntu plucky/main s390x libipc-system-simple-perl all 1.30-2 [22.3 kB] 235s Get:216 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-basedir-perl all 0.09-2 [14.4 kB] 235s Get:217 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-find-rule-perl all 0.34-3 [24.4 kB] 235s Get:218 http://ftpmaster.internal/ubuntu plucky/main s390x libio-string-perl all 1.08-4 [11.1 kB] 236s Get:219 http://ftpmaster.internal/ubuntu plucky/main s390x libfont-ttf-perl all 1.06-2 [323 kB] 236s Get:220 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 236s Get:221 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 236s Get:222 http://ftpmaster.internal/ubuntu plucky/main s390x libipc-run3-perl all 0.049-1 [28.8 kB] 236s Get:223 http://ftpmaster.internal/ubuntu plucky/main s390x libjson-maybexs-perl all 1.004008-1 [11.1 kB] 236s Get:224 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-compare-perl all 0.55-2 [62.9 kB] 236s Get:225 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-someutils-perl all 0.59-1 [30.4 kB] 236s Get:226 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-utilsby-perl all 0.12-2 [14.9 kB] 236s Get:227 http://ftpmaster.internal/ubuntu plucky/main s390x libmldbm-perl all 2.05-4 [16.0 kB] 236s Get:228 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 236s Get:229 http://ftpmaster.internal/ubuntu plucky/main s390x libimport-into-perl all 1.002005-2 [10.7 kB] 236s Get:230 http://ftpmaster.internal/ubuntu plucky/main s390x librole-tiny-perl all 2.002004-1 [16.3 kB] 236s Get:231 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 236s Get:232 http://ftpmaster.internal/ubuntu plucky/main s390x libmoo-perl all 2.005005-1 [47.4 kB] 236s Get:233 http://ftpmaster.internal/ubuntu plucky/main s390x libstrictures-perl all 2.000006-1 [16.3 kB] 236s Get:234 http://ftpmaster.internal/ubuntu plucky/main s390x libmoox-aliases-perl all 0.001006-2 [6796 B] 236s Get:235 http://ftpmaster.internal/ubuntu plucky/main s390x libperlio-gzip-perl s390x 0.20-1build5 [14.8 kB] 236s Get:236 http://ftpmaster.internal/ubuntu plucky/main s390x libperlio-utf8-strict-perl s390x 0.010-1build4 [11.2 kB] 236s Get:237 http://ftpmaster.internal/ubuntu plucky/main s390x libproc-processtable-perl s390x 0.636-1build4 [36.6 kB] 236s Get:238 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-wildcards-perl all 1.05-3 [12.9 kB] 236s Get:239 http://ftpmaster.internal/ubuntu plucky/main s390x libsereal-decoder-perl s390x 5.004+ds-1build4 [107 kB] 237s Get:240 http://ftpmaster.internal/ubuntu plucky/main s390x libsereal-encoder-perl s390x 5.004+ds-1build4 [112 kB] 237s Get:241 http://ftpmaster.internal/ubuntu plucky/main s390x libterm-readkey-perl s390x 2.38-2build5 [23.1 kB] 237s Get:242 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-levenshteinxs-perl s390x 0.03-5build5 [8350 B] 237s Get:243 http://ftpmaster.internal/ubuntu plucky/main s390x libmarkdown2 s390x 2.2.7-2.1 [40.3 kB] 237s Get:244 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-markdown-discount-perl s390x 0.18-1 [12.4 kB] 237s Get:245 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-messagepack-perl s390x 1.02-1build5 [32.3 kB] 237s Get:246 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-xslate-perl s390x 3.5.9-2build1 [163 kB] 237s Get:247 http://ftpmaster.internal/ubuntu plucky/main s390x libtime-duration-perl all 1.21-2 [12.3 kB] 237s Get:248 http://ftpmaster.internal/ubuntu plucky/main s390x libtime-moment-perl s390x 0.44-2build5 [75.5 kB] 237s Get:249 http://ftpmaster.internal/ubuntu plucky/main s390x libunicode-utf8-perl s390x 0.62-2build4 [18.8 kB] 237s Get:250 http://ftpmaster.internal/ubuntu plucky/main s390x libcgi-pm-perl all 4.67-1 [185 kB] 237s Get:251 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-form-perl all 6.12-1 [31.1 kB] 237s Get:252 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-mechanize-perl all 2.19-1ubuntu1 [93.3 kB] 237s Get:253 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 237s Get:254 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-sax-base-perl all 1.09-3 [18.9 kB] 237s Get:255 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 237s Get:256 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-libxml-perl s390x 2.0207+dfsg+really+2.0134-5build1 [312 kB] 238s Get:257 http://ftpmaster.internal/ubuntu plucky/main s390x lzip s390x 1.25-2 [89.5 kB] 238s Get:258 http://ftpmaster.internal/ubuntu plucky/main s390x lzop s390x 1.04-2build3 [84.3 kB] 238s Get:259 http://ftpmaster.internal/ubuntu plucky/main s390x patchutils s390x 0.4.2-1build3 [79.2 kB] 238s Get:260 http://ftpmaster.internal/ubuntu plucky/main s390x t1utils s390x 1.41-4build3 [65.6 kB] 238s Get:261 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 238s Get:262 http://ftpmaster.internal/ubuntu plucky/main s390x lintian all 2.121.1+nmu1ubuntu2 [1075 kB] 239s Get:263 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-dpkg-perl all 3.010 [176 kB] 239s Get:264 http://ftpmaster.internal/ubuntu plucky/main s390x libconvert-binhex-perl all 1.125-3 [27.1 kB] 239s Get:265 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-smtp-ssl-perl all 1.04-2 [6218 B] 239s Get:266 http://ftpmaster.internal/ubuntu plucky/main s390x libmailtools-perl all 2.22-1 [77.1 kB] 239s Get:267 http://ftpmaster.internal/ubuntu plucky/main s390x libmime-tools-perl all 5.515-1 [187 kB] 240s Get:268 http://ftpmaster.internal/ubuntu plucky/main s390x libsuitesparseconfig7 s390x 1:7.8.3+dfsg-3 [13.2 kB] 240s Get:269 http://ftpmaster.internal/ubuntu plucky/universe s390x libamd3 s390x 1:7.8.3+dfsg-3 [35.1 kB] 240s Get:270 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 240s Get:271 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 15-20250222-0ubuntu1 [620 kB] 241s Get:272 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 245s Get:273 http://ftpmaster.internal/ubuntu plucky/universe s390x libarpack2t64 s390x 3.9.1-4 [110 kB] 245s Get:274 http://ftpmaster.internal/ubuntu plucky/universe s390x libccolamd3 s390x 1:7.8.3+dfsg-3 [32.7 kB] 245s Get:275 http://ftpmaster.internal/ubuntu plucky/universe s390x libcamd3 s390x 1:7.8.3+dfsg-3 [29.7 kB] 245s Get:276 http://ftpmaster.internal/ubuntu plucky/main s390x libcolamd3 s390x 1:7.8.3+dfsg-3 [23.4 kB] 245s Get:277 http://ftpmaster.internal/ubuntu plucky/universe s390x libcholmod5 s390x 1:7.8.3+dfsg-3 [920 kB] 246s Get:278 http://ftpmaster.internal/ubuntu plucky/universe s390x libcxsparse4 s390x 1:7.8.3+dfsg-3 [89.6 kB] 246s Get:279 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-double3 s390x 3.3.10-2fakesync1build1 [511 kB] 246s Get:280 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-single3 s390x 3.3.10-2fakesync1build1 [483 kB] 247s Get:281 http://ftpmaster.internal/ubuntu plucky/main s390x libxfixes3 s390x 1:6.0.0-2build1 [11.3 kB] 247s Get:282 http://ftpmaster.internal/ubuntu plucky/main s390x libxcursor1 s390x 1:1.2.3-1 [23.4 kB] 247s Get:283 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 247s Get:284 http://ftpmaster.internal/ubuntu plucky/main s390x libxinerama1 s390x 2:1.1.4-3build1 [6476 B] 247s Get:285 http://ftpmaster.internal/ubuntu plucky/universe s390x libfltk1.3t64 s390x 1.3.8-6.1build2 [645 kB] 248s Get:286 http://ftpmaster.internal/ubuntu plucky/main s390x libglvnd0 s390x 1.7.0-1build1 [110 kB] 248s Get:287 http://ftpmaster.internal/ubuntu plucky/main s390x libx11-xcb1 s390x 2:1.8.10-2 [7954 B] 248s Get:288 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-dri3-0 s390x 1.17.0-2 [7616 B] 248s Get:289 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-glx0 s390x 1.17.0-2 [26.0 kB] 248s Get:290 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-present0 s390x 1.17.0-2 [6244 B] 248s Get:291 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xfixes0 s390x 1.17.0-2 [10.5 kB] 248s Get:292 http://ftpmaster.internal/ubuntu plucky/main s390x libxxf86vm1 s390x 1:1.1.4-1build4 [9630 B] 248s Get:293 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-randr0 s390x 1.17.0-2 [19.2 kB] 248s Get:294 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-sync1 s390x 1.17.0-2 [9488 B] 248s Get:295 http://ftpmaster.internal/ubuntu plucky/main s390x libxshmfence1 s390x 1.3-1build5 [4772 B] 248s Get:296 http://ftpmaster.internal/ubuntu plucky/main s390x mesa-libgallium s390x 25.0.1-2ubuntu1 [8056 kB] 257s Get:297 http://ftpmaster.internal/ubuntu plucky/main s390x libwayland-server0 s390x 1.23.1-3 [37.3 kB] 257s Get:298 http://ftpmaster.internal/ubuntu plucky/main s390x libgbm1 s390x 25.0.1-2ubuntu1 [34.5 kB] 257s Get:299 http://ftpmaster.internal/ubuntu plucky/main s390x libvulkan1 s390x 1.4.304.0-1 [147 kB] 257s Get:300 http://ftpmaster.internal/ubuntu plucky/main s390x libgl1-mesa-dri s390x 25.0.1-2ubuntu1 [35.4 kB] 257s Get:301 http://ftpmaster.internal/ubuntu plucky/main s390x libglx-mesa0 s390x 25.0.1-2ubuntu1 [161 kB] 257s Get:302 http://ftpmaster.internal/ubuntu plucky/main s390x libglx0 s390x 1.7.0-1build1 [32.2 kB] 258s Get:303 http://ftpmaster.internal/ubuntu plucky/main s390x libgl1 s390x 1.7.0-1build1 [142 kB] 258s Get:304 http://ftpmaster.internal/ubuntu plucky/universe s390x libfltk-gl1.3t64 s390x 1.3.8-6.1build2 [43.7 kB] 258s Get:305 http://ftpmaster.internal/ubuntu plucky/universe s390x libgl2ps1.4 s390x 1.4.2+dfsg1-2build1 [44.1 kB] 258s Get:306 http://ftpmaster.internal/ubuntu plucky/main s390x libltdl7 s390x 2.5.4-4 [43.8 kB] 258s Get:307 http://ftpmaster.internal/ubuntu plucky/universe s390x libglpk40 s390x 5.0-1build2 [406 kB] 259s Get:308 http://ftpmaster.internal/ubuntu plucky/main s390x libopengl0 s390x 1.7.0-1build1 [48.0 kB] 259s Get:309 http://ftpmaster.internal/ubuntu plucky/main s390x libglu1-mesa s390x 9.0.2-1.1build1 [176 kB] 259s Get:310 http://ftpmaster.internal/ubuntu plucky/main s390x liblcms2-2 s390x 2.16-2 [175 kB] 259s Get:311 http://ftpmaster.internal/ubuntu plucky/universe s390x libjxl0.11 s390x 0.11.1-1 [1008 kB] 260s Get:312 http://ftpmaster.internal/ubuntu plucky/main s390x libwmflite-0.2-7 s390x 0.2.13-1.1build3 [72.1 kB] 260s Get:313 http://ftpmaster.internal/ubuntu plucky/universe s390x libgraphicsmagick-q16-3t64 s390x 1.4+really1.3.45+hg17689-1 [1327 kB] 262s Get:314 http://ftpmaster.internal/ubuntu plucky/universe s390x libgraphicsmagick++-q16-12t64 s390x 1.4+really1.3.45+hg17689-1 [113 kB] 262s Get:315 http://ftpmaster.internal/ubuntu plucky/universe s390x libaec0 s390x 1.1.3-1 [25.7 kB] 262s Get:316 http://ftpmaster.internal/ubuntu plucky/universe s390x libsz2 s390x 1.1.3-1 [5442 B] 262s Get:317 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-310 s390x 1.14.5+repack-3 [1477 kB] 263s Get:318 http://ftpmaster.internal/ubuntu plucky/main s390x libasound2-data all 1.2.13-1build1 [21.1 kB] 264s Get:319 http://ftpmaster.internal/ubuntu plucky/main s390x libasound2t64 s390x 1.2.13-1build1 [411 kB] 264s Get:320 http://ftpmaster.internal/ubuntu plucky/main s390x libopus0 s390x 1.5.2-2 [2928 kB] 267s Get:321 http://ftpmaster.internal/ubuntu plucky/main s390x libsamplerate0 s390x 0.2.2-4build1 [1344 kB] 268s Get:322 http://ftpmaster.internal/ubuntu plucky/main s390x libjack-jackd2-0 s390x 1.9.22~dfsg-4 [292 kB] 269s Get:323 http://ftpmaster.internal/ubuntu plucky/universe s390x libportaudio2 s390x 19.6.0-1.2build3 [71.6 kB] 269s Get:324 http://ftpmaster.internal/ubuntu plucky/universe s390x libqhull-r8.0 s390x 2020.2-6build1 [199 kB] 269s Get:325 http://ftpmaster.internal/ubuntu plucky/universe s390x libqrupdate1 s390x 1.1.5-1 [48.5 kB] 269s Get:326 http://ftpmaster.internal/ubuntu plucky/universe s390x libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 269s Get:327 http://ftpmaster.internal/ubuntu plucky/universe s390x libb2-1 s390x 0.98.1-1.1build1 [21.0 kB] 269s Get:328 http://ftpmaster.internal/ubuntu plucky/universe s390x libdouble-conversion3 s390x 3.3.1-1 [43.3 kB] 269s Get:329 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-16-0 s390x 10.45-1 [259 kB] 269s Get:330 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6core6t64 s390x 6.8.2+dfsg-5 [2157 kB] 272s Get:331 http://ftpmaster.internal/ubuntu plucky/main s390x libwayland-client0 s390x 1.23.1-3 [28.2 kB] 272s Get:332 http://ftpmaster.internal/ubuntu plucky/main s390x libegl-mesa0 s390x 25.0.1-2ubuntu1 [126 kB] 272s Get:333 http://ftpmaster.internal/ubuntu plucky/main s390x libegl1 s390x 1.7.0-1build1 [31.8 kB] 272s Get:334 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 272s Get:335 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 272s Get:336 http://ftpmaster.internal/ubuntu plucky/main s390x libmtdev1t64 s390x 1.1.7-1 [15.6 kB] 272s Get:337 http://ftpmaster.internal/ubuntu plucky/main s390x libwacom-common all 2.14.0-1 [103 kB] 272s Get:338 http://ftpmaster.internal/ubuntu plucky/main s390x libwacom9 s390x 2.14.0-1 [27.1 kB] 272s Get:339 http://ftpmaster.internal/ubuntu plucky/main s390x libinput-bin s390x 1.27.1-1 [23.3 kB] 272s Get:340 http://ftpmaster.internal/ubuntu plucky/main s390x libinput10 s390x 1.27.1-1 [139 kB] 272s Get:341 http://ftpmaster.internal/ubuntu plucky/universe s390x libmd4c0 s390x 0.5.2-2 [47.7 kB] 272s Get:342 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6dbus6 s390x 6.8.2+dfsg-5 [304 kB] 273s Get:343 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 273s Get:344 http://ftpmaster.internal/ubuntu plucky/universe s390x libts0t64 s390x 1.22-1.1build1 [66.8 kB] 273s Get:345 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-util1 s390x 0.4.1-1 [10.7 kB] 273s Get:346 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-image0 s390x 0.4.0-2build1 [12.0 kB] 273s Get:347 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render-util0 s390x 0.3.10-1 [10.3 kB] 273s Get:348 http://ftpmaster.internal/ubuntu plucky/universe s390x libxcb-cursor0 s390x 0.1.5-1 [11.3 kB] 273s Get:349 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-icccm4 s390x 0.4.2-1 [11.4 kB] 273s Get:350 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-keysyms1 s390x 0.4.1-1 [8908 B] 273s Get:351 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shape0 s390x 1.17.0-2 [6202 B] 273s Get:352 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xinput0 s390x 1.17.0-2 [35.8 kB] 273s Get:353 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xkb1 s390x 1.17.0-2 [34.5 kB] 273s Get:354 http://ftpmaster.internal/ubuntu plucky/main s390x libxkbcommon-x11-0 s390x 1.7.0-2 [14.8 kB] 273s Get:355 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6gui6 s390x 6.8.2+dfsg-5 [3685 kB] 277s Get:356 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-common-data s390x 0.8-16ubuntu1 [30.9 kB] 277s Get:357 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-common3 s390x 0.8-16ubuntu1 [23.5 kB] 277s Get:358 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-client3 s390x 0.8-16ubuntu1 [26.3 kB] 277s Get:359 http://ftpmaster.internal/ubuntu plucky/main s390x libcups2t64 s390x 2.4.11-0ubuntu2 [282 kB] 277s Get:360 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6widgets6 s390x 6.8.2+dfsg-5 [3025 kB] 280s Get:361 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6printsupport6 s390x 6.8.2+dfsg-5 [235 kB] 280s Get:362 http://ftpmaster.internal/ubuntu plucky/universe s390x libqscintilla2-qt6-15 s390x 2.14.1+dfsg-1build4 [1357 kB] 282s Get:363 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6core5compat6 s390x 6.8.2-3 [160 kB] 282s Get:364 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6sql6 s390x 6.8.2+dfsg-5 [157 kB] 282s Get:365 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6help6 s390x 6.8.2-3 [215 kB] 283s Get:366 http://ftpmaster.internal/ubuntu plucky/main s390x libduktape207 s390x 2.7.0+tests-0ubuntu3 [150 kB] 283s Get:367 http://ftpmaster.internal/ubuntu plucky/main s390x libproxy1v5 s390x 0.5.9-1 [27.8 kB] 283s Get:368 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6network6 s390x 6.8.2+dfsg-5 [922 kB] 284s Get:369 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6opengl6 s390x 6.8.2+dfsg-5 [466 kB] 284s Get:370 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6openglwidgets6 s390x 6.8.2+dfsg-5 [43.7 kB] 284s Get:371 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6xml6 s390x 6.8.2+dfsg-5 [84.6 kB] 285s Get:372 http://ftpmaster.internal/ubuntu plucky/main s390x libogg0 s390x 1.3.5-3build1 [24.4 kB] 285s Get:373 http://ftpmaster.internal/ubuntu plucky/main s390x libflac12t64 s390x 1.4.3+ds-4 [161 kB] 285s Get:374 http://ftpmaster.internal/ubuntu plucky/main s390x libmp3lame0 s390x 3.100-6build1 [160 kB] 285s Get:375 http://ftpmaster.internal/ubuntu plucky/main s390x libmpg123-0t64 s390x 1.32.10-1 [179 kB] 285s Get:376 http://ftpmaster.internal/ubuntu plucky/main s390x libvorbis0a s390x 1.3.7-2 [112 kB] 285s Get:377 http://ftpmaster.internal/ubuntu plucky/main s390x libvorbisenc2 s390x 1.3.7-2 [80.6 kB] 285s Get:378 http://ftpmaster.internal/ubuntu plucky/main s390x libsndfile1 s390x 1.2.2-2 [238 kB] 286s Get:379 http://ftpmaster.internal/ubuntu plucky/universe s390x libspqr4 s390x 1:7.8.3+dfsg-3 [171 kB] 286s Get:380 http://ftpmaster.internal/ubuntu plucky/universe s390x libumfpack6 s390x 1:7.8.3+dfsg-3 [371 kB] 286s Get:381 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-unidecode-perl all 1.30-3 [105 kB] 286s Get:382 http://ftpmaster.internal/ubuntu plucky/universe s390x texinfo-lib s390x 7.1.1-1 [142 kB] 287s Get:383 http://ftpmaster.internal/ubuntu plucky/universe s390x tex-common all 6.19 [29.8 kB] 287s Get:384 http://ftpmaster.internal/ubuntu plucky/universe s390x texinfo all 7.1.1-1 [1272 kB] 288s Get:385 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-common all 9.4.0-1 [6087 kB] 296s Get:386 http://ftpmaster.internal/ubuntu plucky/universe s390x octave s390x 9.4.0-1 [10.1 MB] 309s Get:387 http://ftpmaster.internal/ubuntu plucky/main s390x libncurses-dev s390x 6.5+20250216-2 [407 kB] 309s Get:388 http://ftpmaster.internal/ubuntu plucky/main s390x libreadline-dev s390x 8.2-6 [187 kB] 309s Get:389 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-fortran-310 s390x 1.14.5+repack-3 [115 kB] 310s Get:390 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-310 s390x 1.14.5+repack-3 [61.0 kB] 310s Get:391 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-fortran-310 s390x 1.14.5+repack-3 [32.5 kB] 310s Get:392 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-cpp-310 s390x 1.14.5+repack-3 [117 kB] 310s Get:393 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-cpp-310 s390x 1.14.5+repack-3 [11.7 kB] 310s Get:394 http://ftpmaster.internal/ubuntu plucky/main s390x zlib1g-dev s390x 1:1.3.dfsg+really1.3.1-1ubuntu1 [898 kB] 311s Get:395 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8-dev s390x 2.1.5-3ubuntu2 [281 kB] 312s Get:396 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8-dev s390x 8c-2ubuntu11 [1484 B] 312s Get:397 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-dev s390x 8c-2ubuntu11 [1484 B] 312s Get:398 http://ftpmaster.internal/ubuntu plucky/universe s390x libaec-dev s390x 1.1.3-1 [23.3 kB] 312s Get:399 http://ftpmaster.internal/ubuntu plucky/main s390x libbrotli-dev s390x 1.1.0-2build4 [395 kB] 312s Get:400 http://ftpmaster.internal/ubuntu plucky/main s390x libidn2-dev s390x 2.3.7-2build2 [122 kB] 312s Get:401 http://ftpmaster.internal/ubuntu plucky/main s390x comerr-dev s390x 2.1-1.47.2-1ubuntu1 [44.7 kB] 312s Get:402 http://ftpmaster.internal/ubuntu plucky/main s390x libgssrpc4t64 s390x 1.21.3-4ubuntu2 [59.1 kB] 313s Get:403 http://ftpmaster.internal/ubuntu plucky/main s390x libkadm5clnt-mit12 s390x 1.21.3-4ubuntu2 [40.6 kB] 313s Get:404 http://ftpmaster.internal/ubuntu plucky/main s390x libkdb5-10t64 s390x 1.21.3-4ubuntu2 [42.0 kB] 313s Get:405 http://ftpmaster.internal/ubuntu plucky/main s390x libkadm5srv-mit12 s390x 1.21.3-4ubuntu2 [55.4 kB] 313s Get:406 http://ftpmaster.internal/ubuntu plucky/main s390x krb5-multidev s390x 1.21.3-4ubuntu2 [125 kB] 313s Get:407 http://ftpmaster.internal/ubuntu plucky/main s390x libkrb5-dev s390x 1.21.3-4ubuntu2 [11.9 kB] 313s Get:408 http://ftpmaster.internal/ubuntu plucky/main s390x libldap-dev s390x 2.6.9+dfsg-1~exp2ubuntu1 [316 kB] 314s Get:409 http://ftpmaster.internal/ubuntu plucky/main s390x libpkgconf3 s390x 1.8.1-4 [31.2 kB] 314s Get:410 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf-bin s390x 1.8.1-4 [21.5 kB] 314s Get:411 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf s390x 1.8.1-4 [16.7 kB] 314s Get:412 http://ftpmaster.internal/ubuntu plucky/main s390x libnghttp2-dev s390x 1.64.0-1 [121 kB] 314s Get:413 http://ftpmaster.internal/ubuntu plucky/main s390x libpsl-dev s390x 0.21.2-1.1build1 [77.3 kB] 314s Get:414 http://ftpmaster.internal/ubuntu plucky/main s390x libgmpxx4ldbl s390x 2:6.3.0+dfsg-3ubuntu1 [10.1 kB] 314s Get:415 http://ftpmaster.internal/ubuntu plucky/main s390x libgmp-dev s390x 2:6.3.0+dfsg-3ubuntu1 [424 kB] 315s Get:416 http://ftpmaster.internal/ubuntu plucky/main s390x libevent-2.1-7t64 s390x 2.1.12-stable-10 [145 kB] 315s Get:417 http://ftpmaster.internal/ubuntu plucky/main s390x libunbound8 s390x 1.22.0-1ubuntu1 [462 kB] 315s Get:418 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls-dane0t64 s390x 3.8.9-2ubuntu2 [24.5 kB] 316s Get:419 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls-openssl27t64 s390x 3.8.9-2ubuntu2 [24.5 kB] 316s Get:420 http://ftpmaster.internal/ubuntu plucky/main s390x libp11-kit-dev s390x 0.25.5-2ubuntu3 [23.5 kB] 316s Get:421 http://ftpmaster.internal/ubuntu plucky/main s390x libtasn1-6-dev s390x 4.20.0-2 [94.8 kB] 316s Get:422 http://ftpmaster.internal/ubuntu plucky/main s390x nettle-dev s390x 3.10.1-1 [1198 kB] 317s Get:423 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls28-dev s390x 3.8.9-2ubuntu2 [1016 kB] 318s Get:424 http://ftpmaster.internal/ubuntu plucky/main s390x librtmp-dev s390x 2.4+20151223.gitfa8646d.1-2build7 [69.2 kB] 319s Get:425 http://ftpmaster.internal/ubuntu plucky/main s390x libssl-dev s390x 3.4.1-1ubuntu1 [2429 kB] 322s Get:426 http://ftpmaster.internal/ubuntu plucky/main s390x libssh2-1-dev s390x 1.11.1-1 [287 kB] 322s Get:427 http://ftpmaster.internal/ubuntu plucky/main s390x libzstd-dev s390x 1.5.6+dfsg-2 [408 kB] 322s Get:428 http://ftpmaster.internal/ubuntu plucky/main s390x libcurl4-openssl-dev s390x 8.12.1-3ubuntu1 [513 kB] 323s Get:429 http://ftpmaster.internal/ubuntu plucky/universe s390x hdf5-helpers s390x 1.14.5+repack-3 [17.0 kB] 323s Get:430 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-dev s390x 1.14.5+repack-3 [3385 kB] 327s Get:431 http://ftpmaster.internal/ubuntu plucky/main s390x xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 327s Get:432 http://ftpmaster.internal/ubuntu plucky/main s390x x11proto-dev all 2024.1-1 [606 kB] 328s Get:433 http://ftpmaster.internal/ubuntu plucky/main s390x libxau-dev s390x 1:1.0.11-1 [9752 B] 328s Get:434 http://ftpmaster.internal/ubuntu plucky/main s390x libxdmcp-dev s390x 1:1.1.5-1 [26.9 kB] 328s Get:435 http://ftpmaster.internal/ubuntu plucky/main s390x xtrans-dev all 1.4.0-1 [68.9 kB] 328s Get:436 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb1-dev s390x 1.17.0-2 [88.9 kB] 328s Get:437 http://ftpmaster.internal/ubuntu plucky/main s390x libx11-dev s390x 2:1.8.10-2 [761 kB] 329s Get:438 http://ftpmaster.internal/ubuntu plucky/main s390x libglx-dev s390x 1.7.0-1build1 [14.2 kB] 329s Get:439 http://ftpmaster.internal/ubuntu plucky/main s390x libgl-dev s390x 1.7.0-1build1 [102 kB] 329s Get:440 http://ftpmaster.internal/ubuntu plucky/main s390x libblas-dev s390x 3.12.1-2 [254 kB] 329s Get:441 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack-dev s390x 3.12.1-2 [5967 kB] 336s Get:442 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-long3 s390x 3.3.10-2fakesync1build1 [533 kB] 337s Get:443 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-bin s390x 3.3.10-2fakesync1build1 [36.5 kB] 337s Get:444 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-dev s390x 3.3.10-2fakesync1build1 [1329 kB] 339s Get:445 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran-14-dev s390x 14.2.0-17ubuntu3 [654 kB] 339s Get:446 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [10.3 MB] 352s Get:447 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14 s390x 14.2.0-17ubuntu3 [13.6 kB] 352s Get:448 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1012 B] 352s Get:449 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran s390x 4:14.2.0-1ubuntu1 [1160 B] 352s Get:450 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-17ubuntu3 [2611 kB] 355s Get:451 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [11.0 MB] 368s Get:452 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-17ubuntu3 [21.8 kB] 368s Get:453 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 368s Get:454 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 368s Get:455 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-dev s390x 9.4.0-1 [460 kB] 368s Get:456 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-octave all 1.8.0 [19.7 kB] 368s Get:457 http://ftpmaster.internal/ubuntu plucky/main s390x libfontenc1 s390x 1:1.1.8-1build1 [14.8 kB] 368s Get:458 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 369s Get:459 http://ftpmaster.internal/ubuntu plucky/main s390x libxmu6 s390x 2:1.1.3-3build2 [53.0 kB] 369s Get:460 http://ftpmaster.internal/ubuntu plucky/main s390x libxaw7 s390x 2:1.0.16-1 [201 kB] 369s Get:461 http://ftpmaster.internal/ubuntu plucky/main s390x libxfont2 s390x 1:2.0.6-1build1 [101 kB] 369s Get:462 http://ftpmaster.internal/ubuntu plucky/main s390x libxkbfile1 s390x 1:1.1.0-1build4 [76.5 kB] 369s Get:463 http://ftpmaster.internal/ubuntu plucky/main s390x libxrandr2 s390x 2:1.5.4-1 [20.8 kB] 369s Get:464 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-io s390x 2.6.4-3build2 [227 kB] 369s Get:465 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-statistics-common all 1.7.3-2 [932 kB] 370s Get:466 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-statistics s390x 1.7.3-2 [189 kB] 371s Get:467 http://ftpmaster.internal/ubuntu plucky/main s390x x11-xkb-utils s390x 7.7+9 [169 kB] 371s Get:468 http://ftpmaster.internal/ubuntu plucky/main s390x xserver-common all 2:21.1.16-1ubuntu1 [34.4 kB] 371s Get:469 http://ftpmaster.internal/ubuntu plucky/universe s390x xvfb s390x 2:21.1.16-1ubuntu1 [942 kB] 373s Fetched 175 MB in 3min 35s (817 kB/s) 373s Selecting previously unselected package libstemmer0d:s390x. 373s (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 ... 56326 files and directories currently installed.) 373s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_s390x.deb ... 373s Unpacking libstemmer0d:s390x (2.2.0-4build1) ... 373s Selecting previously unselected package libappstream5:s390x. 373s Preparing to unpack .../001-libappstream5_1.0.4-1_s390x.deb ... 373s Unpacking libappstream5:s390x (1.0.4-1) ... 373s Selecting previously unselected package appstream. 373s Preparing to unpack .../002-appstream_1.0.4-1_s390x.deb ... 373s Unpacking appstream (1.0.4-1) ... 373s Selecting previously unselected package m4. 373s Preparing to unpack .../003-m4_1.4.19-7_s390x.deb ... 373s Unpacking m4 (1.4.19-7) ... 373s Selecting previously unselected package autoconf. 373s Preparing to unpack .../004-autoconf_2.72-3ubuntu1_all.deb ... 373s Unpacking autoconf (2.72-3ubuntu1) ... 373s Selecting previously unselected package autotools-dev. 373s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 373s Unpacking autotools-dev (20220109.1) ... 373s Selecting previously unselected package automake. 373s Preparing to unpack .../006-automake_1%3a1.17-3ubuntu1_all.deb ... 373s Unpacking automake (1:1.17-3ubuntu1) ... 373s Selecting previously unselected package autopoint. 373s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 373s Unpacking autopoint (0.23.1-1) ... 373s Selecting previously unselected package libcapture-tiny-perl. 373s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 373s Unpacking libcapture-tiny-perl (0.50-1) ... 373s Selecting previously unselected package libparams-util-perl. 373s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_s390x.deb ... 373s Unpacking libparams-util-perl (1.102-3build1) ... 373s Selecting previously unselected package libsub-install-perl. 373s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 373s Unpacking libsub-install-perl (0.929-1) ... 373s Selecting previously unselected package libdata-optlist-perl. 373s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 373s Unpacking libdata-optlist-perl (0.114-1) ... 373s Selecting previously unselected package libb-hooks-op-check-perl:s390x. 373s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_s390x.deb ... 373s Unpacking libb-hooks-op-check-perl:s390x (0.22-3build2) ... 373s Selecting previously unselected package libdynaloader-functions-perl. 373s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 373s Unpacking libdynaloader-functions-perl (0.004-1) ... 373s Selecting previously unselected package libdevel-callchecker-perl:s390x. 373s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_s390x.deb ... 373s Unpacking libdevel-callchecker-perl:s390x (0.009-1build1) ... 373s Selecting previously unselected package libparams-classify-perl:s390x. 373s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_s390x.deb ... 373s Unpacking libparams-classify-perl:s390x (0.015-2build6) ... 373s Selecting previously unselected package libmodule-runtime-perl. 373s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 373s Unpacking libmodule-runtime-perl (0.016-2) ... 373s Selecting previously unselected package libtry-tiny-perl. 373s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 373s Unpacking libtry-tiny-perl (0.32-1) ... 373s Selecting previously unselected package libmodule-implementation-perl. 373s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 373s Unpacking libmodule-implementation-perl (0.09-2) ... 373s Selecting previously unselected package libpackage-stash-perl. 373s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 373s Unpacking libpackage-stash-perl (0.40-1) ... 373s Selecting previously unselected package libclass-load-perl. 373s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 373s Unpacking libclass-load-perl (0.25-2) ... 373s Selecting previously unselected package libio-stringy-perl. 373s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 373s Unpacking libio-stringy-perl (2.113-2) ... 373s Selecting previously unselected package libparams-validate-perl:s390x. 373s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_s390x.deb ... 373s Unpacking libparams-validate-perl:s390x (1.31-2build4) ... 373s Selecting previously unselected package libsub-exporter-perl. 373s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 373s Unpacking libsub-exporter-perl (0.990-1) ... 373s Selecting previously unselected package libgetopt-long-descriptive-perl. 373s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 373s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 373s Selecting previously unselected package libio-tiecombine-perl. 373s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 373s Unpacking libio-tiecombine-perl (1.005-3) ... 374s Selecting previously unselected package libmodule-pluggable-perl. 374s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 374s Unpacking libmodule-pluggable-perl (5.2-5) ... 374s Selecting previously unselected package libstring-rewriteprefix-perl. 374s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 374s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 374s Selecting previously unselected package libapp-cmd-perl. 374s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 374s Unpacking libapp-cmd-perl (0.337-2) ... 374s Selecting previously unselected package libboolean-perl. 374s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 374s Unpacking libboolean-perl (0.46-3) ... 374s Selecting previously unselected package libsub-uplevel-perl. 374s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 374s Unpacking libsub-uplevel-perl (0.2800-3) ... 374s Selecting previously unselected package libtest-exception-perl. 374s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 374s Unpacking libtest-exception-perl (0.43-3) ... 374s Selecting previously unselected package libcarp-assert-more-perl. 374s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 374s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 374s Selecting previously unselected package libfile-which-perl. 374s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 374s Unpacking libfile-which-perl (1.27-2) ... 374s Selecting previously unselected package libfile-homedir-perl. 374s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 374s Unpacking libfile-homedir-perl (1.006-2) ... 374s Selecting previously unselected package libclone-choose-perl. 374s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 374s Unpacking libclone-choose-perl (0.010-2) ... 374s Selecting previously unselected package libhash-merge-perl. 374s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 374s Unpacking libhash-merge-perl (0.302-1) ... 374s Selecting previously unselected package libjson-perl. 374s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 374s Unpacking libjson-perl (4.10000-1) ... 374s Selecting previously unselected package libexporter-tiny-perl. 374s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 374s Unpacking libexporter-tiny-perl (1.006002-1) ... 374s Selecting previously unselected package liblist-moreutils-xs-perl. 374s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_s390x.deb ... 374s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 374s Selecting previously unselected package liblist-moreutils-perl. 374s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 374s Unpacking liblist-moreutils-perl (0.430-2) ... 374s Selecting previously unselected package liblog-log4perl-perl. 374s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 374s Unpacking liblog-log4perl-perl (1.57-1) ... 374s Selecting previously unselected package libmouse-perl:s390x. 374s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_s390x.deb ... 374s Unpacking libmouse-perl:s390x (2.5.11-1build1) ... 374s Selecting previously unselected package libmousex-nativetraits-perl. 374s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 374s Unpacking libmousex-nativetraits-perl (1.09-3) ... 374s Selecting previously unselected package libmousex-strictconstructor-perl. 374s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 374s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 374s Selecting previously unselected package libparse-recdescent-perl. 374s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 374s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 374s Selecting previously unselected package libpath-tiny-perl. 374s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 374s Unpacking libpath-tiny-perl (0.146-1) ... 374s Selecting previously unselected package libpod-pom-perl. 374s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 374s Unpacking libpod-pom-perl (2.01-4) ... 374s Selecting previously unselected package libregexp-common-perl. 374s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 374s Unpacking libregexp-common-perl (2024080801-1) ... 374s Selecting previously unselected package libyaml-tiny-perl. 374s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 374s Unpacking libyaml-tiny-perl (1.76-1) ... 374s Selecting previously unselected package libconfig-model-perl. 374s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 374s Unpacking libconfig-model-perl (2.155-1) ... 374s Selecting previously unselected package libyaml-pp-perl. 374s Preparing to unpack .../051-libyaml-pp-perl_0.39.0-1_all.deb ... 374s Unpacking libyaml-pp-perl (0.39.0-1) ... 374s Selecting previously unselected package cme. 374s Preparing to unpack .../052-cme_1.041-1_all.deb ... 374s Unpacking cme (1.041-1) ... 374s Selecting previously unselected package libisl23:s390x. 374s Preparing to unpack .../053-libisl23_0.27-1_s390x.deb ... 374s Unpacking libisl23:s390x (0.27-1) ... 374s Selecting previously unselected package libmpc3:s390x. 374s Preparing to unpack .../054-libmpc3_1.3.1-1build2_s390x.deb ... 374s Unpacking libmpc3:s390x (1.3.1-1build2) ... 374s Selecting previously unselected package cpp-14-s390x-linux-gnu. 374s Preparing to unpack .../055-cpp-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 374s Unpacking cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 374s Selecting previously unselected package cpp-14. 374s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu3_s390x.deb ... 374s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 374s Selecting previously unselected package cpp-s390x-linux-gnu. 374s Preparing to unpack .../057-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 374s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 374s Selecting previously unselected package cpp. 374s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 374s Unpacking cpp (4:14.2.0-1ubuntu1) ... 374s Selecting previously unselected package libdebhelper-perl. 374s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 374s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 374s Selecting previously unselected package libcc1-0:s390x. 374s Preparing to unpack .../060-libcc1-0_15-20250222-0ubuntu1_s390x.deb ... 374s Unpacking libcc1-0:s390x (15-20250222-0ubuntu1) ... 374s Selecting previously unselected package libgomp1:s390x. 374s Preparing to unpack .../061-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 374s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 374s Selecting previously unselected package libitm1:s390x. 374s Preparing to unpack .../062-libitm1_15-20250222-0ubuntu1_s390x.deb ... 374s Unpacking libitm1:s390x (15-20250222-0ubuntu1) ... 374s Selecting previously unselected package libasan8:s390x. 374s Preparing to unpack .../063-libasan8_15-20250222-0ubuntu1_s390x.deb ... 374s Unpacking libasan8:s390x (15-20250222-0ubuntu1) ... 374s Selecting previously unselected package libubsan1:s390x. 374s Preparing to unpack .../064-libubsan1_15-20250222-0ubuntu1_s390x.deb ... 374s Unpacking libubsan1:s390x (15-20250222-0ubuntu1) ... 374s Selecting previously unselected package libgcc-14-dev:s390x. 374s Preparing to unpack .../065-libgcc-14-dev_14.2.0-17ubuntu3_s390x.deb ... 374s Unpacking libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 374s Selecting previously unselected package gcc-14-s390x-linux-gnu. 374s Preparing to unpack .../066-gcc-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 374s Unpacking gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 374s Selecting previously unselected package gcc-14. 374s Preparing to unpack .../067-gcc-14_14.2.0-17ubuntu3_s390x.deb ... 374s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 374s Selecting previously unselected package gcc-s390x-linux-gnu. 374s Preparing to unpack .../068-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 374s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 374s Selecting previously unselected package gcc. 374s Preparing to unpack .../069-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 374s Unpacking gcc (4:14.2.0-1ubuntu1) ... 374s Selecting previously unselected package libtool. 374s Preparing to unpack .../070-libtool_2.5.4-4_all.deb ... 374s Unpacking libtool (2.5.4-4) ... 374s Selecting previously unselected package dh-autoreconf. 374s Preparing to unpack .../071-dh-autoreconf_20_all.deb ... 374s Unpacking dh-autoreconf (20) ... 374s Selecting previously unselected package libarchive-zip-perl. 374s Preparing to unpack .../072-libarchive-zip-perl_1.68-1_all.deb ... 374s Unpacking libarchive-zip-perl (1.68-1) ... 374s Selecting previously unselected package libfile-stripnondeterminism-perl. 374s Preparing to unpack .../073-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 374s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 374s Selecting previously unselected package dh-strip-nondeterminism. 374s Preparing to unpack .../074-dh-strip-nondeterminism_1.14.1-2_all.deb ... 374s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 375s Selecting previously unselected package debugedit. 375s Preparing to unpack .../075-debugedit_1%3a5.1-2_s390x.deb ... 375s Unpacking debugedit (1:5.1-2) ... 375s Selecting previously unselected package dwz. 375s Preparing to unpack .../076-dwz_0.15-1build6_s390x.deb ... 375s Unpacking dwz (0.15-1build6) ... 375s Selecting previously unselected package gettext. 375s Preparing to unpack .../077-gettext_0.23.1-1_s390x.deb ... 375s Unpacking gettext (0.23.1-1) ... 375s Selecting previously unselected package intltool-debian. 375s Preparing to unpack .../078-intltool-debian_0.35.0+20060710.6_all.deb ... 375s Unpacking intltool-debian (0.35.0+20060710.6) ... 375s Selecting previously unselected package po-debconf. 375s Preparing to unpack .../079-po-debconf_1.0.21+nmu1_all.deb ... 375s Unpacking po-debconf (1.0.21+nmu1) ... 375s Selecting previously unselected package debhelper. 375s Preparing to unpack .../080-debhelper_13.24.1ubuntu2_all.deb ... 375s Unpacking debhelper (13.24.1ubuntu2) ... 375s Selecting previously unselected package aglfn. 375s Preparing to unpack .../081-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 375s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 375s Selecting previously unselected package gnuplot-data. 375s Preparing to unpack .../082-gnuplot-data_6.0.2+dfsg1-1_all.deb ... 375s Unpacking gnuplot-data (6.0.2+dfsg1-1) ... 375s Selecting previously unselected package libfreetype6:s390x. 375s Preparing to unpack .../083-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 375s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 375s Selecting previously unselected package fonts-dejavu-mono. 375s Preparing to unpack .../084-fonts-dejavu-mono_2.37-8_all.deb ... 375s Unpacking fonts-dejavu-mono (2.37-8) ... 375s Selecting previously unselected package fonts-dejavu-core. 375s Preparing to unpack .../085-fonts-dejavu-core_2.37-8_all.deb ... 375s Unpacking fonts-dejavu-core (2.37-8) ... 375s Selecting previously unselected package fonts-freefont-otf. 375s Preparing to unpack .../086-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 375s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 375s Selecting previously unselected package fontconfig-config. 375s Preparing to unpack .../087-fontconfig-config_2.15.0-2ubuntu1_s390x.deb ... 375s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 375s Selecting previously unselected package libfontconfig1:s390x. 375s Preparing to unpack .../088-libfontconfig1_2.15.0-2ubuntu1_s390x.deb ... 375s Unpacking libfontconfig1:s390x (2.15.0-2ubuntu1) ... 375s Selecting previously unselected package libpixman-1-0:s390x. 375s Preparing to unpack .../089-libpixman-1-0_0.44.0-3_s390x.deb ... 375s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 375s Selecting previously unselected package libxcb-render0:s390x. 375s Preparing to unpack .../090-libxcb-render0_1.17.0-2_s390x.deb ... 375s Unpacking libxcb-render0:s390x (1.17.0-2) ... 375s Selecting previously unselected package libxcb-shm0:s390x. 375s Preparing to unpack .../091-libxcb-shm0_1.17.0-2_s390x.deb ... 375s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 375s Selecting previously unselected package libxrender1:s390x. 375s Preparing to unpack .../092-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 375s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 375s Selecting previously unselected package libcairo2:s390x. 375s Preparing to unpack .../093-libcairo2_1.18.2-2_s390x.deb ... 375s Unpacking libcairo2:s390x (1.18.2-2) ... 375s Selecting previously unselected package libsharpyuv0:s390x. 375s Preparing to unpack .../094-libsharpyuv0_1.5.0-0.1_s390x.deb ... 375s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 375s Selecting previously unselected package libaom3:s390x. 375s Preparing to unpack .../095-libaom3_3.12.0-1_s390x.deb ... 375s Unpacking libaom3:s390x (3.12.0-1) ... 375s Selecting previously unselected package libheif-plugin-aomdec:s390x. 375s Preparing to unpack .../096-libheif-plugin-aomdec_1.19.7-1_s390x.deb ... 375s Unpacking libheif-plugin-aomdec:s390x (1.19.7-1) ... 375s Selecting previously unselected package libde265-0:s390x. 375s Preparing to unpack .../097-libde265-0_1.0.15-1build5_s390x.deb ... 375s Unpacking libde265-0:s390x (1.0.15-1build5) ... 375s Selecting previously unselected package libheif-plugin-libde265:s390x. 375s Preparing to unpack .../098-libheif-plugin-libde265_1.19.7-1_s390x.deb ... 375s Unpacking libheif-plugin-libde265:s390x (1.19.7-1) ... 375s Selecting previously unselected package libheif1:s390x. 375s Preparing to unpack .../099-libheif1_1.19.7-1_s390x.deb ... 375s Unpacking libheif1:s390x (1.19.7-1) ... 375s Selecting previously unselected package libimagequant0:s390x. 375s Preparing to unpack .../100-libimagequant0_2.18.0-1build1_s390x.deb ... 375s Unpacking libimagequant0:s390x (2.18.0-1build1) ... 375s Selecting previously unselected package libjpeg-turbo8:s390x. 375s Preparing to unpack .../101-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 375s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 375s Selecting previously unselected package libjpeg8:s390x. 375s Preparing to unpack .../102-libjpeg8_8c-2ubuntu11_s390x.deb ... 375s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 375s Selecting previously unselected package libgraphite2-3:s390x. 375s Preparing to unpack .../103-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 375s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 375s Selecting previously unselected package libharfbuzz0b:s390x. 375s Preparing to unpack .../104-libharfbuzz0b_10.2.0-1_s390x.deb ... 375s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 375s Selecting previously unselected package libraqm0:s390x. 375s Preparing to unpack .../105-libraqm0_0.10.2-1_s390x.deb ... 375s Unpacking libraqm0:s390x (0.10.2-1) ... 375s Selecting previously unselected package libdeflate0:s390x. 375s Preparing to unpack .../106-libdeflate0_1.23-1_s390x.deb ... 375s Unpacking libdeflate0:s390x (1.23-1) ... 375s Selecting previously unselected package libjbig0:s390x. 375s Preparing to unpack .../107-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 375s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 375s Selecting previously unselected package libwebp7:s390x. 375s Preparing to unpack .../108-libwebp7_1.5.0-0.1_s390x.deb ... 375s Unpacking libwebp7:s390x (1.5.0-0.1) ... 375s Selecting previously unselected package libtiff6:s390x. 375s Preparing to unpack .../109-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 375s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 375s Selecting previously unselected package libxpm4:s390x. 375s Preparing to unpack .../110-libxpm4_1%3a3.5.17-1build2_s390x.deb ... 375s Unpacking libxpm4:s390x (1:3.5.17-1build2) ... 375s Selecting previously unselected package libgd3:s390x. 375s Preparing to unpack .../111-libgd3_2.3.3-12ubuntu3_s390x.deb ... 375s Unpacking libgd3:s390x (2.3.3-12ubuntu3) ... 375s Selecting previously unselected package liblua5.4-0:s390x. 375s Preparing to unpack .../112-liblua5.4-0_5.4.7-1_s390x.deb ... 375s Unpacking liblua5.4-0:s390x (5.4.7-1) ... 375s Selecting previously unselected package fontconfig. 375s Preparing to unpack .../113-fontconfig_2.15.0-2ubuntu1_s390x.deb ... 375s Unpacking fontconfig (2.15.0-2ubuntu1) ... 375s Selecting previously unselected package libthai-data. 375s Preparing to unpack .../114-libthai-data_0.1.29-2build1_all.deb ... 375s Unpacking libthai-data (0.1.29-2build1) ... 375s Selecting previously unselected package libdatrie1:s390x. 375s Preparing to unpack .../115-libdatrie1_0.2.13-3build1_s390x.deb ... 375s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 375s Selecting previously unselected package libthai0:s390x. 375s Preparing to unpack .../116-libthai0_0.1.29-2build1_s390x.deb ... 375s Unpacking libthai0:s390x (0.1.29-2build1) ... 375s Selecting previously unselected package libpango-1.0-0:s390x. 375s Preparing to unpack .../117-libpango-1.0-0_1.56.2-1_s390x.deb ... 375s Unpacking libpango-1.0-0:s390x (1.56.2-1) ... 375s Selecting previously unselected package libpangoft2-1.0-0:s390x. 375s Preparing to unpack .../118-libpangoft2-1.0-0_1.56.2-1_s390x.deb ... 375s Unpacking libpangoft2-1.0-0:s390x (1.56.2-1) ... 375s Selecting previously unselected package libpangocairo-1.0-0:s390x. 375s Preparing to unpack .../119-libpangocairo-1.0-0_1.56.2-1_s390x.deb ... 375s Unpacking libpangocairo-1.0-0:s390x (1.56.2-1) ... 375s Selecting previously unselected package libwebpmux3:s390x. 375s Preparing to unpack .../120-libwebpmux3_1.5.0-0.1_s390x.deb ... 375s Unpacking libwebpmux3:s390x (1.5.0-0.1) ... 375s Selecting previously unselected package gnuplot-nox. 375s Preparing to unpack .../121-gnuplot-nox_6.0.2+dfsg1-1_s390x.deb ... 375s Unpacking gnuplot-nox (6.0.2+dfsg1-1) ... 375s Selecting previously unselected package dh-octave-autopkgtest. 375s Preparing to unpack .../122-dh-octave-autopkgtest_1.8.0_all.deb ... 375s Unpacking dh-octave-autopkgtest (1.8.0) ... 375s Selecting previously unselected package libapt-pkg-perl. 375s Preparing to unpack .../123-libapt-pkg-perl_0.1.41build1_s390x.deb ... 375s Unpacking libapt-pkg-perl (0.1.41build1) ... 375s Selecting previously unselected package libarray-intspan-perl. 375s Preparing to unpack .../124-libarray-intspan-perl_2.004-2_all.deb ... 375s Unpacking libarray-intspan-perl (2.004-2) ... 375s Selecting previously unselected package libyaml-libyaml-perl. 375s Preparing to unpack .../125-libyaml-libyaml-perl_0.903.0+ds-1_s390x.deb ... 375s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 375s Selecting previously unselected package libconfig-model-backend-yaml-perl. 375s Preparing to unpack .../126-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 375s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 375s Selecting previously unselected package libexporter-lite-perl. 375s Preparing to unpack .../127-libexporter-lite-perl_0.09-2_all.deb ... 375s Unpacking libexporter-lite-perl (0.09-2) ... 375s Selecting previously unselected package libencode-locale-perl. 375s Preparing to unpack .../128-libencode-locale-perl_1.05-3_all.deb ... 375s Unpacking libencode-locale-perl (1.05-3) ... 375s Selecting previously unselected package libtimedate-perl. 375s Preparing to unpack .../129-libtimedate-perl_2.3300-2_all.deb ... 375s Unpacking libtimedate-perl (2.3300-2) ... 375s Selecting previously unselected package libhttp-date-perl. 375s Preparing to unpack .../130-libhttp-date-perl_6.06-1_all.deb ... 375s Unpacking libhttp-date-perl (6.06-1) ... 375s Selecting previously unselected package libfile-listing-perl. 375s Preparing to unpack .../131-libfile-listing-perl_6.16-1_all.deb ... 375s Unpacking libfile-listing-perl (6.16-1) ... 375s Selecting previously unselected package libhtml-tagset-perl. 376s Preparing to unpack .../132-libhtml-tagset-perl_3.24-1_all.deb ... 376s Unpacking libhtml-tagset-perl (3.24-1) ... 376s Selecting previously unselected package liburi-perl. 376s Preparing to unpack .../133-liburi-perl_5.30-1_all.deb ... 376s Unpacking liburi-perl (5.30-1) ... 376s Selecting previously unselected package libhtml-parser-perl:s390x. 376s Preparing to unpack .../134-libhtml-parser-perl_3.83-1build1_s390x.deb ... 376s Unpacking libhtml-parser-perl:s390x (3.83-1build1) ... 376s Selecting previously unselected package libhtml-tree-perl. 376s Preparing to unpack .../135-libhtml-tree-perl_5.07-3_all.deb ... 376s Unpacking libhtml-tree-perl (5.07-3) ... 376s Selecting previously unselected package libclone-perl:s390x. 376s Preparing to unpack .../136-libclone-perl_0.47-1_s390x.deb ... 376s Unpacking libclone-perl:s390x (0.47-1) ... 376s Selecting previously unselected package libio-html-perl. 376s Preparing to unpack .../137-libio-html-perl_1.004-3_all.deb ... 376s Unpacking libio-html-perl (1.004-3) ... 376s Selecting previously unselected package liblwp-mediatypes-perl. 376s Preparing to unpack .../138-liblwp-mediatypes-perl_6.04-2_all.deb ... 376s Unpacking liblwp-mediatypes-perl (6.04-2) ... 376s Selecting previously unselected package libhttp-message-perl. 376s Preparing to unpack .../139-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 376s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 376s Selecting previously unselected package libhttp-cookies-perl. 376s Preparing to unpack .../140-libhttp-cookies-perl_6.11-1_all.deb ... 376s Unpacking libhttp-cookies-perl (6.11-1) ... 376s Selecting previously unselected package libhttp-negotiate-perl. 376s Preparing to unpack .../141-libhttp-negotiate-perl_6.01-2_all.deb ... 376s Unpacking libhttp-negotiate-perl (6.01-2) ... 376s Selecting previously unselected package perl-openssl-defaults:s390x. 376s Preparing to unpack .../142-perl-openssl-defaults_7build3_s390x.deb ... 376s Unpacking perl-openssl-defaults:s390x (7build3) ... 376s Selecting previously unselected package libnet-ssleay-perl:s390x. 376s Preparing to unpack .../143-libnet-ssleay-perl_1.94-3_s390x.deb ... 376s Unpacking libnet-ssleay-perl:s390x (1.94-3) ... 376s Selecting previously unselected package libio-socket-ssl-perl. 376s Preparing to unpack .../144-libio-socket-ssl-perl_2.089-1_all.deb ... 376s Unpacking libio-socket-ssl-perl (2.089-1) ... 376s Selecting previously unselected package libnet-http-perl. 376s Preparing to unpack .../145-libnet-http-perl_6.23-1_all.deb ... 376s Unpacking libnet-http-perl (6.23-1) ... 376s Selecting previously unselected package liblwp-protocol-https-perl. 376s Preparing to unpack .../146-liblwp-protocol-https-perl_6.14-1_all.deb ... 376s Unpacking liblwp-protocol-https-perl (6.14-1) ... 376s Selecting previously unselected package libwww-robotrules-perl. 376s Preparing to unpack .../147-libwww-robotrules-perl_6.02-1_all.deb ... 376s Unpacking libwww-robotrules-perl (6.02-1) ... 376s Selecting previously unselected package libwww-perl. 376s Preparing to unpack .../148-libwww-perl_6.78-1_all.deb ... 376s Unpacking libwww-perl (6.78-1) ... 376s Selecting previously unselected package liberror-perl. 376s Preparing to unpack .../149-liberror-perl_0.17030-1_all.deb ... 376s Unpacking liberror-perl (0.17030-1) ... 376s Selecting previously unselected package libparse-debcontrol-perl. 376s Preparing to unpack .../150-libparse-debcontrol-perl_2.005-6_all.deb ... 376s Unpacking libparse-debcontrol-perl (2.005-6) ... 376s Selecting previously unselected package libsoftware-copyright-perl. 376s Preparing to unpack .../151-libsoftware-copyright-perl_0.014-1_all.deb ... 376s Unpacking libsoftware-copyright-perl (0.014-1) ... 376s Selecting previously unselected package libalgorithm-c3-perl. 376s Preparing to unpack .../152-libalgorithm-c3-perl_0.11-2_all.deb ... 376s Unpacking libalgorithm-c3-perl (0.11-2) ... 376s Selecting previously unselected package libclass-c3-perl. 376s Preparing to unpack .../153-libclass-c3-perl_0.35-2_all.deb ... 376s Unpacking libclass-c3-perl (0.35-2) ... 376s Selecting previously unselected package libmro-compat-perl. 376s Preparing to unpack .../154-libmro-compat-perl_0.15-2_all.deb ... 376s Unpacking libmro-compat-perl (0.15-2) ... 376s Selecting previously unselected package libdata-section-perl. 376s Preparing to unpack .../155-libdata-section-perl_0.200008-1_all.deb ... 376s Unpacking libdata-section-perl (0.200008-1) ... 376s Selecting previously unselected package libtext-template-perl. 376s Preparing to unpack .../156-libtext-template-perl_1.61-1_all.deb ... 376s Unpacking libtext-template-perl (1.61-1) ... 376s Selecting previously unselected package libsoftware-license-perl. 376s Preparing to unpack .../157-libsoftware-license-perl_0.104006-1_all.deb ... 376s Unpacking libsoftware-license-perl (0.104006-1) ... 376s Selecting previously unselected package libsoftware-licensemoreutils-perl. 376s Preparing to unpack .../158-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 376s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 376s Selecting previously unselected package libsort-versions-perl. 376s Preparing to unpack .../159-libsort-versions-perl_1.62-3_all.deb ... 376s Unpacking libsort-versions-perl (1.62-3) ... 376s Selecting previously unselected package libtext-reform-perl. 376s Preparing to unpack .../160-libtext-reform-perl_1.20-5_all.deb ... 376s Unpacking libtext-reform-perl (1.20-5) ... 376s Selecting previously unselected package libtext-autoformat-perl. 376s Preparing to unpack .../161-libtext-autoformat-perl_1.750000-2_all.deb ... 376s Unpacking libtext-autoformat-perl (1.750000-2) ... 376s Selecting previously unselected package libtext-levenshtein-damerau-perl. 376s Preparing to unpack .../162-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 376s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 376s Selecting previously unselected package libtoml-tiny-perl. 376s Preparing to unpack .../163-libtoml-tiny-perl_0.19-1_all.deb ... 376s Unpacking libtoml-tiny-perl (0.19-1) ... 376s Selecting previously unselected package libclass-inspector-perl. 376s Preparing to unpack .../164-libclass-inspector-perl_1.36-3_all.deb ... 376s Unpacking libclass-inspector-perl (1.36-3) ... 376s Selecting previously unselected package libfile-sharedir-perl. 376s Preparing to unpack .../165-libfile-sharedir-perl_1.118-3_all.deb ... 376s Unpacking libfile-sharedir-perl (1.118-3) ... 376s Selecting previously unselected package libindirect-perl. 376s Preparing to unpack .../166-libindirect-perl_0.39-2build5_s390x.deb ... 376s Unpacking libindirect-perl (0.39-2build5) ... 376s Selecting previously unselected package libxs-parse-keyword-perl. 376s Preparing to unpack .../167-libxs-parse-keyword-perl_0.48-2_s390x.deb ... 376s Unpacking libxs-parse-keyword-perl (0.48-2) ... 376s Selecting previously unselected package libxs-parse-sublike-perl:s390x. 376s Preparing to unpack .../168-libxs-parse-sublike-perl_0.37-1_s390x.deb ... 376s Unpacking libxs-parse-sublike-perl:s390x (0.37-1) ... 376s Selecting previously unselected package libobject-pad-perl. 376s Preparing to unpack .../169-libobject-pad-perl_0.820-1_s390x.deb ... 376s Unpacking libobject-pad-perl (0.820-1) ... 376s Selecting previously unselected package libsyntax-keyword-try-perl. 376s Preparing to unpack .../170-libsyntax-keyword-try-perl_0.30-1_s390x.deb ... 376s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 376s Selecting previously unselected package libio-interactive-perl. 376s Preparing to unpack .../171-libio-interactive-perl_1.026-1_all.deb ... 376s Unpacking libio-interactive-perl (1.026-1) ... 376s Selecting previously unselected package liblog-any-perl. 376s Preparing to unpack .../172-liblog-any-perl_1.717-1_all.deb ... 376s Unpacking liblog-any-perl (1.717-1) ... 376s Selecting previously unselected package liblog-any-adapter-screen-perl. 376s Preparing to unpack .../173-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 376s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 376s Selecting previously unselected package libsub-exporter-progressive-perl. 376s Preparing to unpack .../174-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 376s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 376s Selecting previously unselected package libvariable-magic-perl. 376s Preparing to unpack .../175-libvariable-magic-perl_0.64-1build1_s390x.deb ... 376s Unpacking libvariable-magic-perl (0.64-1build1) ... 376s Selecting previously unselected package libb-hooks-endofscope-perl. 376s Preparing to unpack .../176-libb-hooks-endofscope-perl_0.28-1_all.deb ... 376s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 376s Selecting previously unselected package libsub-identify-perl. 376s Preparing to unpack .../177-libsub-identify-perl_0.14-3build4_s390x.deb ... 376s Unpacking libsub-identify-perl (0.14-3build4) ... 376s Selecting previously unselected package libsub-name-perl:s390x. 376s Preparing to unpack .../178-libsub-name-perl_0.28-1_s390x.deb ... 376s Unpacking libsub-name-perl:s390x (0.28-1) ... 376s Selecting previously unselected package libnamespace-clean-perl. 376s Preparing to unpack .../179-libnamespace-clean-perl_0.27-2_all.deb ... 376s Unpacking libnamespace-clean-perl (0.27-2) ... 376s Selecting previously unselected package libnumber-compare-perl. 376s Preparing to unpack .../180-libnumber-compare-perl_0.03-3_all.deb ... 376s Unpacking libnumber-compare-perl (0.03-3) ... 376s Selecting previously unselected package libtext-glob-perl. 376s Preparing to unpack .../181-libtext-glob-perl_0.11-3_all.deb ... 376s Unpacking libtext-glob-perl (0.11-3) ... 376s Selecting previously unselected package libpath-iterator-rule-perl. 376s Preparing to unpack .../182-libpath-iterator-rule-perl_1.015-2_all.deb ... 376s Unpacking libpath-iterator-rule-perl (1.015-2) ... 376s Selecting previously unselected package libpod-parser-perl. 376s Preparing to unpack .../183-libpod-parser-perl_1.67-1_all.deb ... 376s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 376s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 376s Unpacking libpod-parser-perl (1.67-1) ... 376s Selecting previously unselected package libpod-constants-perl. 376s Preparing to unpack .../184-libpod-constants-perl_0.19-2_all.deb ... 376s Unpacking libpod-constants-perl (0.19-2) ... 376s Selecting previously unselected package libset-intspan-perl. 376s Preparing to unpack .../185-libset-intspan-perl_1.19-3_all.deb ... 376s Unpacking libset-intspan-perl (1.19-3) ... 376s Selecting previously unselected package libstring-copyright-perl. 376s Preparing to unpack .../186-libstring-copyright-perl_0.003014-1_all.deb ... 376s Unpacking libstring-copyright-perl (0.003014-1) ... 376s Selecting previously unselected package libstring-escape-perl. 376s Preparing to unpack .../187-libstring-escape-perl_2010.002-3_all.deb ... 376s Unpacking libstring-escape-perl (2010.002-3) ... 376s Selecting previously unselected package libregexp-pattern-license-perl. 376s Preparing to unpack .../188-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 376s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 376s Selecting previously unselected package libregexp-pattern-perl. 376s Preparing to unpack .../189-libregexp-pattern-perl_0.2.14-2_all.deb ... 376s Unpacking libregexp-pattern-perl (0.2.14-2) ... 376s Selecting previously unselected package libstring-license-perl. 376s Preparing to unpack .../190-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 376s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 376s Selecting previously unselected package licensecheck. 376s Preparing to unpack .../191-licensecheck_3.3.9-1ubuntu1_all.deb ... 376s Unpacking licensecheck (3.3.9-1ubuntu1) ... 376s Selecting previously unselected package diffstat. 376s Preparing to unpack .../192-diffstat_1.67-1_s390x.deb ... 376s Unpacking diffstat (1.67-1) ... 376s Selecting previously unselected package libberkeleydb-perl:s390x. 376s Preparing to unpack .../193-libberkeleydb-perl_0.66-1_s390x.deb ... 376s Unpacking libberkeleydb-perl:s390x (0.66-1) ... 376s Selecting previously unselected package libclass-xsaccessor-perl. 376s Preparing to unpack .../194-libclass-xsaccessor-perl_1.19-4build6_s390x.deb ... 376s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 376s Selecting previously unselected package libconfig-tiny-perl. 376s Preparing to unpack .../195-libconfig-tiny-perl_2.30-1_all.deb ... 376s Unpacking libconfig-tiny-perl (2.30-1) ... 376s Selecting previously unselected package libconst-fast-perl. 376s Preparing to unpack .../196-libconst-fast-perl_0.014-2_all.deb ... 376s Unpacking libconst-fast-perl (0.014-2) ... 376s Selecting previously unselected package libcpanel-json-xs-perl:s390x. 376s Preparing to unpack .../197-libcpanel-json-xs-perl_4.39-1_s390x.deb ... 376s Unpacking libcpanel-json-xs-perl:s390x (4.39-1) ... 376s Selecting previously unselected package libaliased-perl. 376s Preparing to unpack .../198-libaliased-perl_0.34-3_all.deb ... 376s Unpacking libaliased-perl (0.34-3) ... 376s Selecting previously unselected package libclass-data-inheritable-perl. 376s Preparing to unpack .../199-libclass-data-inheritable-perl_0.10-1_all.deb ... 376s Unpacking libclass-data-inheritable-perl (0.10-1) ... 376s Selecting previously unselected package libdevel-stacktrace-perl. 376s Preparing to unpack .../200-libdevel-stacktrace-perl_2.0500-1_all.deb ... 376s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 376s Selecting previously unselected package libexception-class-perl. 376s Preparing to unpack .../201-libexception-class-perl_1.45-1_all.deb ... 376s Unpacking libexception-class-perl (1.45-1) ... 376s Selecting previously unselected package libiterator-perl. 376s Preparing to unpack .../202-libiterator-perl_0.03+ds1-2_all.deb ... 376s Unpacking libiterator-perl (0.03+ds1-2) ... 376s Selecting previously unselected package libiterator-util-perl. 376s Preparing to unpack .../203-libiterator-util-perl_0.02+ds1-2_all.deb ... 376s Unpacking libiterator-util-perl (0.02+ds1-2) ... 376s Selecting previously unselected package libdata-dpath-perl. 376s Preparing to unpack .../204-libdata-dpath-perl_0.60-1_all.deb ... 376s Unpacking libdata-dpath-perl (0.60-1) ... 376s Selecting previously unselected package libnet-domain-tld-perl. 376s Preparing to unpack .../205-libnet-domain-tld-perl_1.75-4_all.deb ... 376s Unpacking libnet-domain-tld-perl (1.75-4) ... 376s Selecting previously unselected package libdata-validate-domain-perl. 376s Preparing to unpack .../206-libdata-validate-domain-perl_0.15-1_all.deb ... 376s Unpacking libdata-validate-domain-perl (0.15-1) ... 376s Selecting previously unselected package libnet-ipv6addr-perl. 376s Preparing to unpack .../207-libnet-ipv6addr-perl_1.02-1_all.deb ... 376s Unpacking libnet-ipv6addr-perl (1.02-1) ... 376s Selecting previously unselected package libnet-netmask-perl. 376s Preparing to unpack .../208-libnet-netmask-perl_2.0002-2_all.deb ... 376s Unpacking libnet-netmask-perl (2.0002-2) ... 376s Selecting previously unselected package libnetaddr-ip-perl. 376s Preparing to unpack .../209-libnetaddr-ip-perl_4.079+dfsg-2build5_s390x.deb ... 376s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 376s Selecting previously unselected package libdata-validate-ip-perl. 376s Preparing to unpack .../210-libdata-validate-ip-perl_0.31-1_all.deb ... 376s Unpacking libdata-validate-ip-perl (0.31-1) ... 376s Selecting previously unselected package libdata-validate-uri-perl. 376s Preparing to unpack .../211-libdata-validate-uri-perl_0.07-3_all.deb ... 376s Unpacking libdata-validate-uri-perl (0.07-3) ... 376s Selecting previously unselected package libdevel-size-perl. 376s Preparing to unpack .../212-libdevel-size-perl_0.84-1build1_s390x.deb ... 376s Unpacking libdevel-size-perl (0.84-1build1) ... 376s Selecting previously unselected package libemail-address-xs-perl. 376s Preparing to unpack .../213-libemail-address-xs-perl_1.05-1build5_s390x.deb ... 376s Unpacking libemail-address-xs-perl (1.05-1build5) ... 376s Selecting previously unselected package libipc-system-simple-perl. 376s Preparing to unpack .../214-libipc-system-simple-perl_1.30-2_all.deb ... 376s Unpacking libipc-system-simple-perl (1.30-2) ... 376s Selecting previously unselected package libfile-basedir-perl. 376s Preparing to unpack .../215-libfile-basedir-perl_0.09-2_all.deb ... 376s Unpacking libfile-basedir-perl (0.09-2) ... 376s Selecting previously unselected package libfile-find-rule-perl. 376s Preparing to unpack .../216-libfile-find-rule-perl_0.34-3_all.deb ... 376s Unpacking libfile-find-rule-perl (0.34-3) ... 377s Selecting previously unselected package libio-string-perl. 377s Preparing to unpack .../217-libio-string-perl_1.08-4_all.deb ... 377s Unpacking libio-string-perl (1.08-4) ... 377s Selecting previously unselected package libfont-ttf-perl. 377s Preparing to unpack .../218-libfont-ttf-perl_1.06-2_all.deb ... 377s Unpacking libfont-ttf-perl (1.06-2) ... 377s Selecting previously unselected package libhtml-html5-entities-perl. 377s Preparing to unpack .../219-libhtml-html5-entities-perl_0.004-3_all.deb ... 377s Unpacking libhtml-html5-entities-perl (0.004-3) ... 377s Selecting previously unselected package libhtml-tokeparser-simple-perl. 377s Preparing to unpack .../220-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 377s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 377s Selecting previously unselected package libipc-run3-perl. 377s Preparing to unpack .../221-libipc-run3-perl_0.049-1_all.deb ... 377s Unpacking libipc-run3-perl (0.049-1) ... 377s Selecting previously unselected package libjson-maybexs-perl. 377s Preparing to unpack .../222-libjson-maybexs-perl_1.004008-1_all.deb ... 377s Unpacking libjson-maybexs-perl (1.004008-1) ... 377s Selecting previously unselected package liblist-compare-perl. 377s Preparing to unpack .../223-liblist-compare-perl_0.55-2_all.deb ... 377s Unpacking liblist-compare-perl (0.55-2) ... 377s Selecting previously unselected package liblist-someutils-perl. 377s Preparing to unpack .../224-liblist-someutils-perl_0.59-1_all.deb ... 377s Unpacking liblist-someutils-perl (0.59-1) ... 377s Selecting previously unselected package liblist-utilsby-perl. 377s Preparing to unpack .../225-liblist-utilsby-perl_0.12-2_all.deb ... 377s Unpacking liblist-utilsby-perl (0.12-2) ... 377s Selecting previously unselected package libmldbm-perl. 377s Preparing to unpack .../226-libmldbm-perl_2.05-4_all.deb ... 377s Unpacking libmldbm-perl (2.05-4) ... 377s Selecting previously unselected package libclass-method-modifiers-perl. 377s Preparing to unpack .../227-libclass-method-modifiers-perl_2.15-1_all.deb ... 377s Unpacking libclass-method-modifiers-perl (2.15-1) ... 377s Selecting previously unselected package libimport-into-perl. 377s Preparing to unpack .../228-libimport-into-perl_1.002005-2_all.deb ... 377s Unpacking libimport-into-perl (1.002005-2) ... 377s Selecting previously unselected package librole-tiny-perl. 377s Preparing to unpack .../229-librole-tiny-perl_2.002004-1_all.deb ... 377s Unpacking librole-tiny-perl (2.002004-1) ... 377s Selecting previously unselected package libsub-quote-perl. 377s Preparing to unpack .../230-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 377s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 377s Selecting previously unselected package libmoo-perl. 377s Preparing to unpack .../231-libmoo-perl_2.005005-1_all.deb ... 377s Unpacking libmoo-perl (2.005005-1) ... 377s Selecting previously unselected package libstrictures-perl. 377s Preparing to unpack .../232-libstrictures-perl_2.000006-1_all.deb ... 377s Unpacking libstrictures-perl (2.000006-1) ... 377s Selecting previously unselected package libmoox-aliases-perl. 377s Preparing to unpack .../233-libmoox-aliases-perl_0.001006-2_all.deb ... 377s Unpacking libmoox-aliases-perl (0.001006-2) ... 377s Selecting previously unselected package libperlio-gzip-perl. 377s Preparing to unpack .../234-libperlio-gzip-perl_0.20-1build5_s390x.deb ... 377s Unpacking libperlio-gzip-perl (0.20-1build5) ... 377s Selecting previously unselected package libperlio-utf8-strict-perl. 377s Preparing to unpack .../235-libperlio-utf8-strict-perl_0.010-1build4_s390x.deb ... 377s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 377s Selecting previously unselected package libproc-processtable-perl:s390x. 377s Preparing to unpack .../236-libproc-processtable-perl_0.636-1build4_s390x.deb ... 377s Unpacking libproc-processtable-perl:s390x (0.636-1build4) ... 377s Selecting previously unselected package libregexp-wildcards-perl. 377s Preparing to unpack .../237-libregexp-wildcards-perl_1.05-3_all.deb ... 377s Unpacking libregexp-wildcards-perl (1.05-3) ... 377s Selecting previously unselected package libsereal-decoder-perl. 377s Preparing to unpack .../238-libsereal-decoder-perl_5.004+ds-1build4_s390x.deb ... 377s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 377s Selecting previously unselected package libsereal-encoder-perl. 377s Preparing to unpack .../239-libsereal-encoder-perl_5.004+ds-1build4_s390x.deb ... 377s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 377s Selecting previously unselected package libterm-readkey-perl. 377s Preparing to unpack .../240-libterm-readkey-perl_2.38-2build5_s390x.deb ... 377s Unpacking libterm-readkey-perl (2.38-2build5) ... 377s Selecting previously unselected package libtext-levenshteinxs-perl. 377s Preparing to unpack .../241-libtext-levenshteinxs-perl_0.03-5build5_s390x.deb ... 377s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 377s Selecting previously unselected package libmarkdown2:s390x. 377s Preparing to unpack .../242-libmarkdown2_2.2.7-2.1_s390x.deb ... 377s Unpacking libmarkdown2:s390x (2.2.7-2.1) ... 377s Selecting previously unselected package libtext-markdown-discount-perl. 377s Preparing to unpack .../243-libtext-markdown-discount-perl_0.18-1_s390x.deb ... 377s Unpacking libtext-markdown-discount-perl (0.18-1) ... 377s Selecting previously unselected package libdata-messagepack-perl. 377s Preparing to unpack .../244-libdata-messagepack-perl_1.02-1build5_s390x.deb ... 377s Unpacking libdata-messagepack-perl (1.02-1build5) ... 377s Selecting previously unselected package libtext-xslate-perl:s390x. 377s Preparing to unpack .../245-libtext-xslate-perl_3.5.9-2build1_s390x.deb ... 377s Unpacking libtext-xslate-perl:s390x (3.5.9-2build1) ... 377s Selecting previously unselected package libtime-duration-perl. 377s Preparing to unpack .../246-libtime-duration-perl_1.21-2_all.deb ... 377s Unpacking libtime-duration-perl (1.21-2) ... 377s Selecting previously unselected package libtime-moment-perl. 377s Preparing to unpack .../247-libtime-moment-perl_0.44-2build5_s390x.deb ... 377s Unpacking libtime-moment-perl (0.44-2build5) ... 377s Selecting previously unselected package libunicode-utf8-perl. 377s Preparing to unpack .../248-libunicode-utf8-perl_0.62-2build4_s390x.deb ... 377s Unpacking libunicode-utf8-perl (0.62-2build4) ... 377s Selecting previously unselected package libcgi-pm-perl. 377s Preparing to unpack .../249-libcgi-pm-perl_4.67-1_all.deb ... 377s Unpacking libcgi-pm-perl (4.67-1) ... 377s Selecting previously unselected package libhtml-form-perl. 377s Preparing to unpack .../250-libhtml-form-perl_6.12-1_all.deb ... 377s Unpacking libhtml-form-perl (6.12-1) ... 377s Selecting previously unselected package libwww-mechanize-perl. 377s Preparing to unpack .../251-libwww-mechanize-perl_2.19-1ubuntu1_all.deb ... 377s Unpacking libwww-mechanize-perl (2.19-1ubuntu1) ... 377s Selecting previously unselected package libxml-namespacesupport-perl. 377s Preparing to unpack .../252-libxml-namespacesupport-perl_1.12-2_all.deb ... 377s Unpacking libxml-namespacesupport-perl (1.12-2) ... 377s Selecting previously unselected package libxml-sax-base-perl. 377s Preparing to unpack .../253-libxml-sax-base-perl_1.09-3_all.deb ... 377s Unpacking libxml-sax-base-perl (1.09-3) ... 377s Selecting previously unselected package libxml-sax-perl. 377s Preparing to unpack .../254-libxml-sax-perl_1.02+dfsg-4_all.deb ... 377s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 377s Selecting previously unselected package libxml-libxml-perl. 377s Preparing to unpack .../255-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_s390x.deb ... 377s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 377s Selecting previously unselected package lzip. 377s Preparing to unpack .../256-lzip_1.25-2_s390x.deb ... 377s Unpacking lzip (1.25-2) ... 377s Selecting previously unselected package lzop. 377s Preparing to unpack .../257-lzop_1.04-2build3_s390x.deb ... 377s Unpacking lzop (1.04-2build3) ... 377s Selecting previously unselected package patchutils. 377s Preparing to unpack .../258-patchutils_0.4.2-1build3_s390x.deb ... 377s Unpacking patchutils (0.4.2-1build3) ... 377s Selecting previously unselected package t1utils. 377s Preparing to unpack .../259-t1utils_1.41-4build3_s390x.deb ... 377s Unpacking t1utils (1.41-4build3) ... 377s Selecting previously unselected package unzip. 377s Preparing to unpack .../260-unzip_6.0-28ubuntu6_s390x.deb ... 377s Unpacking unzip (6.0-28ubuntu6) ... 377s Selecting previously unselected package lintian. 377s Preparing to unpack .../261-lintian_2.121.1+nmu1ubuntu2_all.deb ... 377s Unpacking lintian (2.121.1+nmu1ubuntu2) ... 377s Selecting previously unselected package libconfig-model-dpkg-perl. 377s Preparing to unpack .../262-libconfig-model-dpkg-perl_3.010_all.deb ... 377s Unpacking libconfig-model-dpkg-perl (3.010) ... 377s Selecting previously unselected package libconvert-binhex-perl. 377s Preparing to unpack .../263-libconvert-binhex-perl_1.125-3_all.deb ... 377s Unpacking libconvert-binhex-perl (1.125-3) ... 377s Selecting previously unselected package libnet-smtp-ssl-perl. 377s Preparing to unpack .../264-libnet-smtp-ssl-perl_1.04-2_all.deb ... 377s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 377s Selecting previously unselected package libmailtools-perl. 377s Preparing to unpack .../265-libmailtools-perl_2.22-1_all.deb ... 377s Unpacking libmailtools-perl (2.22-1) ... 377s Selecting previously unselected package libmime-tools-perl. 377s Preparing to unpack .../266-libmime-tools-perl_5.515-1_all.deb ... 377s Unpacking libmime-tools-perl (5.515-1) ... 377s Selecting previously unselected package libsuitesparseconfig7:s390x. 377s Preparing to unpack .../267-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libsuitesparseconfig7:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libamd3:s390x. 377s Preparing to unpack .../268-libamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libamd3:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libblas3:s390x. 377s Preparing to unpack .../269-libblas3_3.12.1-2_s390x.deb ... 377s Unpacking libblas3:s390x (3.12.1-2) ... 377s Selecting previously unselected package libgfortran5:s390x. 377s Preparing to unpack .../270-libgfortran5_15-20250222-0ubuntu1_s390x.deb ... 377s Unpacking libgfortran5:s390x (15-20250222-0ubuntu1) ... 377s Selecting previously unselected package liblapack3:s390x. 377s Preparing to unpack .../271-liblapack3_3.12.1-2_s390x.deb ... 377s Unpacking liblapack3:s390x (3.12.1-2) ... 377s Selecting previously unselected package libarpack2t64:s390x. 377s Preparing to unpack .../272-libarpack2t64_3.9.1-4_s390x.deb ... 377s Unpacking libarpack2t64:s390x (3.9.1-4) ... 377s Selecting previously unselected package libccolamd3:s390x. 377s Preparing to unpack .../273-libccolamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libccolamd3:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libcamd3:s390x. 377s Preparing to unpack .../274-libcamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libcamd3:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libcolamd3:s390x. 377s Preparing to unpack .../275-libcolamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libcolamd3:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libcholmod5:s390x. 377s Preparing to unpack .../276-libcholmod5_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libcholmod5:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libcxsparse4:s390x. 377s Preparing to unpack .../277-libcxsparse4_1%3a7.8.3+dfsg-3_s390x.deb ... 377s Unpacking libcxsparse4:s390x (1:7.8.3+dfsg-3) ... 377s Selecting previously unselected package libfftw3-double3:s390x. 377s Preparing to unpack .../278-libfftw3-double3_3.3.10-2fakesync1build1_s390x.deb ... 377s Unpacking libfftw3-double3:s390x (3.3.10-2fakesync1build1) ... 377s Selecting previously unselected package libfftw3-single3:s390x. 377s Preparing to unpack .../279-libfftw3-single3_3.3.10-2fakesync1build1_s390x.deb ... 377s Unpacking libfftw3-single3:s390x (3.3.10-2fakesync1build1) ... 377s Selecting previously unselected package libxfixes3:s390x. 377s Preparing to unpack .../280-libxfixes3_1%3a6.0.0-2build1_s390x.deb ... 377s Unpacking libxfixes3:s390x (1:6.0.0-2build1) ... 377s Selecting previously unselected package libxcursor1:s390x. 377s Preparing to unpack .../281-libxcursor1_1%3a1.2.3-1_s390x.deb ... 377s Unpacking libxcursor1:s390x (1:1.2.3-1) ... 377s Selecting previously unselected package libxft2:s390x. 377s Preparing to unpack .../282-libxft2_2.3.6-1build1_s390x.deb ... 377s Unpacking libxft2:s390x (2.3.6-1build1) ... 378s Selecting previously unselected package libxinerama1:s390x. 378s Preparing to unpack .../283-libxinerama1_2%3a1.1.4-3build1_s390x.deb ... 378s Unpacking libxinerama1:s390x (2:1.1.4-3build1) ... 378s Selecting previously unselected package libfltk1.3t64:s390x. 378s Preparing to unpack .../284-libfltk1.3t64_1.3.8-6.1build2_s390x.deb ... 378s Unpacking libfltk1.3t64:s390x (1.3.8-6.1build2) ... 378s Selecting previously unselected package libglvnd0:s390x. 378s Preparing to unpack .../285-libglvnd0_1.7.0-1build1_s390x.deb ... 378s Unpacking libglvnd0:s390x (1.7.0-1build1) ... 378s Selecting previously unselected package libx11-xcb1:s390x. 378s Preparing to unpack .../286-libx11-xcb1_2%3a1.8.10-2_s390x.deb ... 378s Unpacking libx11-xcb1:s390x (2:1.8.10-2) ... 378s Selecting previously unselected package libxcb-dri3-0:s390x. 378s Preparing to unpack .../287-libxcb-dri3-0_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-dri3-0:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxcb-glx0:s390x. 378s Preparing to unpack .../288-libxcb-glx0_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-glx0:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxcb-present0:s390x. 378s Preparing to unpack .../289-libxcb-present0_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-present0:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxcb-xfixes0:s390x. 378s Preparing to unpack .../290-libxcb-xfixes0_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-xfixes0:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxxf86vm1:s390x. 378s Preparing to unpack .../291-libxxf86vm1_1%3a1.1.4-1build4_s390x.deb ... 378s Unpacking libxxf86vm1:s390x (1:1.1.4-1build4) ... 378s Selecting previously unselected package libxcb-randr0:s390x. 378s Preparing to unpack .../292-libxcb-randr0_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-randr0:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxcb-sync1:s390x. 378s Preparing to unpack .../293-libxcb-sync1_1.17.0-2_s390x.deb ... 378s Unpacking libxcb-sync1:s390x (1.17.0-2) ... 378s Selecting previously unselected package libxshmfence1:s390x. 378s Preparing to unpack .../294-libxshmfence1_1.3-1build5_s390x.deb ... 378s Unpacking libxshmfence1:s390x (1.3-1build5) ... 378s Selecting previously unselected package mesa-libgallium:s390x. 378s Preparing to unpack .../295-mesa-libgallium_25.0.1-2ubuntu1_s390x.deb ... 378s Unpacking mesa-libgallium:s390x (25.0.1-2ubuntu1) ... 378s Selecting previously unselected package libwayland-server0:s390x. 378s Preparing to unpack .../296-libwayland-server0_1.23.1-3_s390x.deb ... 378s Unpacking libwayland-server0:s390x (1.23.1-3) ... 378s Selecting previously unselected package libgbm1:s390x. 378s Preparing to unpack .../297-libgbm1_25.0.1-2ubuntu1_s390x.deb ... 378s Unpacking libgbm1:s390x (25.0.1-2ubuntu1) ... 378s Selecting previously unselected package libvulkan1:s390x. 378s Preparing to unpack .../298-libvulkan1_1.4.304.0-1_s390x.deb ... 378s Unpacking libvulkan1:s390x (1.4.304.0-1) ... 378s Selecting previously unselected package libgl1-mesa-dri:s390x. 378s Preparing to unpack .../299-libgl1-mesa-dri_25.0.1-2ubuntu1_s390x.deb ... 378s Unpacking libgl1-mesa-dri:s390x (25.0.1-2ubuntu1) ... 378s Selecting previously unselected package libglx-mesa0:s390x. 378s Preparing to unpack .../300-libglx-mesa0_25.0.1-2ubuntu1_s390x.deb ... 378s Unpacking libglx-mesa0:s390x (25.0.1-2ubuntu1) ... 378s Selecting previously unselected package libglx0:s390x. 378s Preparing to unpack .../301-libglx0_1.7.0-1build1_s390x.deb ... 378s Unpacking libglx0:s390x (1.7.0-1build1) ... 378s Selecting previously unselected package libgl1:s390x. 378s Preparing to unpack .../302-libgl1_1.7.0-1build1_s390x.deb ... 378s Unpacking libgl1:s390x (1.7.0-1build1) ... 378s Selecting previously unselected package libfltk-gl1.3t64:s390x. 378s Preparing to unpack .../303-libfltk-gl1.3t64_1.3.8-6.1build2_s390x.deb ... 378s Unpacking libfltk-gl1.3t64:s390x (1.3.8-6.1build2) ... 378s Selecting previously unselected package libgl2ps1.4. 378s Preparing to unpack .../304-libgl2ps1.4_1.4.2+dfsg1-2build1_s390x.deb ... 378s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 378s Selecting previously unselected package libltdl7:s390x. 378s Preparing to unpack .../305-libltdl7_2.5.4-4_s390x.deb ... 378s Unpacking libltdl7:s390x (2.5.4-4) ... 378s Selecting previously unselected package libglpk40:s390x. 378s Preparing to unpack .../306-libglpk40_5.0-1build2_s390x.deb ... 378s Unpacking libglpk40:s390x (5.0-1build2) ... 378s Selecting previously unselected package libopengl0:s390x. 378s Preparing to unpack .../307-libopengl0_1.7.0-1build1_s390x.deb ... 378s Unpacking libopengl0:s390x (1.7.0-1build1) ... 378s Selecting previously unselected package libglu1-mesa:s390x. 378s Preparing to unpack .../308-libglu1-mesa_9.0.2-1.1build1_s390x.deb ... 378s Unpacking libglu1-mesa:s390x (9.0.2-1.1build1) ... 378s Selecting previously unselected package liblcms2-2:s390x. 378s Preparing to unpack .../309-liblcms2-2_2.16-2_s390x.deb ... 378s Unpacking liblcms2-2:s390x (2.16-2) ... 378s Selecting previously unselected package libjxl0.11:s390x. 378s Preparing to unpack .../310-libjxl0.11_0.11.1-1_s390x.deb ... 378s Unpacking libjxl0.11:s390x (0.11.1-1) ... 378s Selecting previously unselected package libwmflite-0.2-7:s390x. 378s Preparing to unpack .../311-libwmflite-0.2-7_0.2.13-1.1build3_s390x.deb ... 378s Unpacking libwmflite-0.2-7:s390x (0.2.13-1.1build3) ... 378s Selecting previously unselected package libgraphicsmagick-q16-3t64. 378s Preparing to unpack .../312-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17689-1_s390x.deb ... 378s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 378s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 378s Preparing to unpack .../313-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17689-1_s390x.deb ... 378s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 378s Selecting previously unselected package libaec0:s390x. 378s Preparing to unpack .../314-libaec0_1.1.3-1_s390x.deb ... 378s Unpacking libaec0:s390x (1.1.3-1) ... 378s Selecting previously unselected package libsz2:s390x. 378s Preparing to unpack .../315-libsz2_1.1.3-1_s390x.deb ... 378s Unpacking libsz2:s390x (1.1.3-1) ... 378s Selecting previously unselected package libhdf5-310:s390x. 378s Preparing to unpack .../316-libhdf5-310_1.14.5+repack-3_s390x.deb ... 378s Unpacking libhdf5-310:s390x (1.14.5+repack-3) ... 378s Selecting previously unselected package libasound2-data. 378s Preparing to unpack .../317-libasound2-data_1.2.13-1build1_all.deb ... 378s Unpacking libasound2-data (1.2.13-1build1) ... 378s Selecting previously unselected package libasound2t64:s390x. 378s Preparing to unpack .../318-libasound2t64_1.2.13-1build1_s390x.deb ... 378s Unpacking libasound2t64:s390x (1.2.13-1build1) ... 378s Selecting previously unselected package libopus0:s390x. 378s Preparing to unpack .../319-libopus0_1.5.2-2_s390x.deb ... 378s Unpacking libopus0:s390x (1.5.2-2) ... 378s Selecting previously unselected package libsamplerate0:s390x. 378s Preparing to unpack .../320-libsamplerate0_0.2.2-4build1_s390x.deb ... 378s Unpacking libsamplerate0:s390x (0.2.2-4build1) ... 378s Selecting previously unselected package libjack-jackd2-0:s390x. 378s Preparing to unpack .../321-libjack-jackd2-0_1.9.22~dfsg-4_s390x.deb ... 378s Unpacking libjack-jackd2-0:s390x (1.9.22~dfsg-4) ... 378s Selecting previously unselected package libportaudio2:s390x. 378s Preparing to unpack .../322-libportaudio2_19.6.0-1.2build3_s390x.deb ... 378s Unpacking libportaudio2:s390x (19.6.0-1.2build3) ... 378s Selecting previously unselected package libqhull-r8.0:s390x. 378s Preparing to unpack .../323-libqhull-r8.0_2020.2-6build1_s390x.deb ... 378s Unpacking libqhull-r8.0:s390x (2020.2-6build1) ... 378s Selecting previously unselected package libqrupdate1:s390x. 378s Preparing to unpack .../324-libqrupdate1_1.1.5-1_s390x.deb ... 378s Unpacking libqrupdate1:s390x (1.1.5-1) ... 378s Selecting previously unselected package libqscintilla2-qt6-l10n. 378s Preparing to unpack .../325-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 378s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 378s Selecting previously unselected package libb2-1:s390x. 378s Preparing to unpack .../326-libb2-1_0.98.1-1.1build1_s390x.deb ... 378s Unpacking libb2-1:s390x (0.98.1-1.1build1) ... 378s Selecting previously unselected package libdouble-conversion3:s390x. 378s Preparing to unpack .../327-libdouble-conversion3_3.3.1-1_s390x.deb ... 378s Unpacking libdouble-conversion3:s390x (3.3.1-1) ... 378s Selecting previously unselected package libpcre2-16-0:s390x. 378s Preparing to unpack .../328-libpcre2-16-0_10.45-1_s390x.deb ... 378s Unpacking libpcre2-16-0:s390x (10.45-1) ... 378s Selecting previously unselected package libqt6core6t64:s390x. 378s Preparing to unpack .../329-libqt6core6t64_6.8.2+dfsg-5_s390x.deb ... 378s Unpacking libqt6core6t64:s390x (6.8.2+dfsg-5) ... 378s Selecting previously unselected package libwayland-client0:s390x. 378s Preparing to unpack .../330-libwayland-client0_1.23.1-3_s390x.deb ... 378s Unpacking libwayland-client0:s390x (1.23.1-3) ... 378s Selecting previously unselected package libegl-mesa0:s390x. 378s Preparing to unpack .../331-libegl-mesa0_25.0.1-2ubuntu1_s390x.deb ... 378s Unpacking libegl-mesa0:s390x (25.0.1-2ubuntu1) ... 378s Selecting previously unselected package libegl1:s390x. 378s Preparing to unpack .../332-libegl1_1.7.0-1build1_s390x.deb ... 378s Unpacking libegl1:s390x (1.7.0-1build1) ... 378s Selecting previously unselected package x11-common. 378s Preparing to unpack .../333-x11-common_1%3a7.7+23ubuntu3_all.deb ... 378s Unpacking x11-common (1:7.7+23ubuntu3) ... 378s Selecting previously unselected package libice6:s390x. 378s Preparing to unpack .../334-libice6_2%3a1.1.1-1_s390x.deb ... 378s Unpacking libice6:s390x (2:1.1.1-1) ... 378s Selecting previously unselected package libmtdev1t64:s390x. 378s Preparing to unpack .../335-libmtdev1t64_1.1.7-1_s390x.deb ... 378s Unpacking libmtdev1t64:s390x (1.1.7-1) ... 378s Selecting previously unselected package libwacom-common. 378s Preparing to unpack .../336-libwacom-common_2.14.0-1_all.deb ... 378s Unpacking libwacom-common (2.14.0-1) ... 378s Selecting previously unselected package libwacom9:s390x. 378s Preparing to unpack .../337-libwacom9_2.14.0-1_s390x.deb ... 378s Unpacking libwacom9:s390x (2.14.0-1) ... 378s Selecting previously unselected package libinput-bin. 378s Preparing to unpack .../338-libinput-bin_1.27.1-1_s390x.deb ... 378s Unpacking libinput-bin (1.27.1-1) ... 378s Selecting previously unselected package libinput10:s390x. 378s Preparing to unpack .../339-libinput10_1.27.1-1_s390x.deb ... 378s Unpacking libinput10:s390x (1.27.1-1) ... 378s Selecting previously unselected package libmd4c0:s390x. 378s Preparing to unpack .../340-libmd4c0_0.5.2-2_s390x.deb ... 378s Unpacking libmd4c0:s390x (0.5.2-2) ... 379s Selecting previously unselected package libqt6dbus6:s390x. 379s Preparing to unpack .../341-libqt6dbus6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6dbus6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libsm6:s390x. 379s Preparing to unpack .../342-libsm6_2%3a1.2.4-1_s390x.deb ... 379s Unpacking libsm6:s390x (2:1.2.4-1) ... 379s Selecting previously unselected package libts0t64:s390x. 379s Preparing to unpack .../343-libts0t64_1.22-1.1build1_s390x.deb ... 379s Unpacking libts0t64:s390x (1.22-1.1build1) ... 379s Selecting previously unselected package libxcb-util1:s390x. 379s Preparing to unpack .../344-libxcb-util1_0.4.1-1_s390x.deb ... 379s Unpacking libxcb-util1:s390x (0.4.1-1) ... 379s Selecting previously unselected package libxcb-image0:s390x. 379s Preparing to unpack .../345-libxcb-image0_0.4.0-2build1_s390x.deb ... 379s Unpacking libxcb-image0:s390x (0.4.0-2build1) ... 379s Selecting previously unselected package libxcb-render-util0:s390x. 379s Preparing to unpack .../346-libxcb-render-util0_0.3.10-1_s390x.deb ... 379s Unpacking libxcb-render-util0:s390x (0.3.10-1) ... 379s Selecting previously unselected package libxcb-cursor0:s390x. 379s Preparing to unpack .../347-libxcb-cursor0_0.1.5-1_s390x.deb ... 379s Unpacking libxcb-cursor0:s390x (0.1.5-1) ... 379s Selecting previously unselected package libxcb-icccm4:s390x. 379s Preparing to unpack .../348-libxcb-icccm4_0.4.2-1_s390x.deb ... 379s Unpacking libxcb-icccm4:s390x (0.4.2-1) ... 379s Selecting previously unselected package libxcb-keysyms1:s390x. 379s Preparing to unpack .../349-libxcb-keysyms1_0.4.1-1_s390x.deb ... 379s Unpacking libxcb-keysyms1:s390x (0.4.1-1) ... 379s Selecting previously unselected package libxcb-shape0:s390x. 379s Preparing to unpack .../350-libxcb-shape0_1.17.0-2_s390x.deb ... 379s Unpacking libxcb-shape0:s390x (1.17.0-2) ... 379s Selecting previously unselected package libxcb-xinput0:s390x. 379s Preparing to unpack .../351-libxcb-xinput0_1.17.0-2_s390x.deb ... 379s Unpacking libxcb-xinput0:s390x (1.17.0-2) ... 379s Selecting previously unselected package libxcb-xkb1:s390x. 379s Preparing to unpack .../352-libxcb-xkb1_1.17.0-2_s390x.deb ... 379s Unpacking libxcb-xkb1:s390x (1.17.0-2) ... 379s Selecting previously unselected package libxkbcommon-x11-0:s390x. 379s Preparing to unpack .../353-libxkbcommon-x11-0_1.7.0-2_s390x.deb ... 379s Unpacking libxkbcommon-x11-0:s390x (1.7.0-2) ... 379s Selecting previously unselected package libqt6gui6:s390x. 379s Preparing to unpack .../354-libqt6gui6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6gui6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libavahi-common-data:s390x. 379s Preparing to unpack .../355-libavahi-common-data_0.8-16ubuntu1_s390x.deb ... 379s Unpacking libavahi-common-data:s390x (0.8-16ubuntu1) ... 379s Selecting previously unselected package libavahi-common3:s390x. 379s Preparing to unpack .../356-libavahi-common3_0.8-16ubuntu1_s390x.deb ... 379s Unpacking libavahi-common3:s390x (0.8-16ubuntu1) ... 379s Selecting previously unselected package libavahi-client3:s390x. 379s Preparing to unpack .../357-libavahi-client3_0.8-16ubuntu1_s390x.deb ... 379s Unpacking libavahi-client3:s390x (0.8-16ubuntu1) ... 379s Selecting previously unselected package libcups2t64:s390x. 379s Preparing to unpack .../358-libcups2t64_2.4.11-0ubuntu2_s390x.deb ... 379s Unpacking libcups2t64:s390x (2.4.11-0ubuntu2) ... 379s Selecting previously unselected package libqt6widgets6:s390x. 379s Preparing to unpack .../359-libqt6widgets6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6widgets6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqt6printsupport6:s390x. 379s Preparing to unpack .../360-libqt6printsupport6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6printsupport6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqscintilla2-qt6-15:s390x. 379s Preparing to unpack .../361-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_s390x.deb ... 379s Unpacking libqscintilla2-qt6-15:s390x (2.14.1+dfsg-1build4) ... 379s Selecting previously unselected package libqt6core5compat6:s390x. 379s Preparing to unpack .../362-libqt6core5compat6_6.8.2-3_s390x.deb ... 379s Unpacking libqt6core5compat6:s390x (6.8.2-3) ... 379s Selecting previously unselected package libqt6sql6:s390x. 379s Preparing to unpack .../363-libqt6sql6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6sql6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqt6help6:s390x. 379s Preparing to unpack .../364-libqt6help6_6.8.2-3_s390x.deb ... 379s Unpacking libqt6help6:s390x (6.8.2-3) ... 379s Selecting previously unselected package libduktape207:s390x. 379s Preparing to unpack .../365-libduktape207_2.7.0+tests-0ubuntu3_s390x.deb ... 379s Unpacking libduktape207:s390x (2.7.0+tests-0ubuntu3) ... 379s Selecting previously unselected package libproxy1v5:s390x. 379s Preparing to unpack .../366-libproxy1v5_0.5.9-1_s390x.deb ... 379s Unpacking libproxy1v5:s390x (0.5.9-1) ... 379s Selecting previously unselected package libqt6network6:s390x. 379s Preparing to unpack .../367-libqt6network6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6network6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqt6opengl6:s390x. 379s Preparing to unpack .../368-libqt6opengl6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6opengl6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqt6openglwidgets6:s390x. 379s Preparing to unpack .../369-libqt6openglwidgets6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6openglwidgets6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libqt6xml6:s390x. 379s Preparing to unpack .../370-libqt6xml6_6.8.2+dfsg-5_s390x.deb ... 379s Unpacking libqt6xml6:s390x (6.8.2+dfsg-5) ... 379s Selecting previously unselected package libogg0:s390x. 379s Preparing to unpack .../371-libogg0_1.3.5-3build1_s390x.deb ... 379s Unpacking libogg0:s390x (1.3.5-3build1) ... 379s Selecting previously unselected package libflac12t64:s390x. 379s Preparing to unpack .../372-libflac12t64_1.4.3+ds-4_s390x.deb ... 379s Unpacking libflac12t64:s390x (1.4.3+ds-4) ... 379s Selecting previously unselected package libmp3lame0:s390x. 379s Preparing to unpack .../373-libmp3lame0_3.100-6build1_s390x.deb ... 379s Unpacking libmp3lame0:s390x (3.100-6build1) ... 379s Selecting previously unselected package libmpg123-0t64:s390x. 379s Preparing to unpack .../374-libmpg123-0t64_1.32.10-1_s390x.deb ... 379s Unpacking libmpg123-0t64:s390x (1.32.10-1) ... 379s Selecting previously unselected package libvorbis0a:s390x. 379s Preparing to unpack .../375-libvorbis0a_1.3.7-2_s390x.deb ... 379s Unpacking libvorbis0a:s390x (1.3.7-2) ... 379s Selecting previously unselected package libvorbisenc2:s390x. 379s Preparing to unpack .../376-libvorbisenc2_1.3.7-2_s390x.deb ... 379s Unpacking libvorbisenc2:s390x (1.3.7-2) ... 379s Selecting previously unselected package libsndfile1:s390x. 379s Preparing to unpack .../377-libsndfile1_1.2.2-2_s390x.deb ... 379s Unpacking libsndfile1:s390x (1.2.2-2) ... 379s Selecting previously unselected package libspqr4:s390x. 379s Preparing to unpack .../378-libspqr4_1%3a7.8.3+dfsg-3_s390x.deb ... 379s Unpacking libspqr4:s390x (1:7.8.3+dfsg-3) ... 379s Selecting previously unselected package libumfpack6:s390x. 379s Preparing to unpack .../379-libumfpack6_1%3a7.8.3+dfsg-3_s390x.deb ... 379s Unpacking libumfpack6:s390x (1:7.8.3+dfsg-3) ... 379s Selecting previously unselected package libtext-unidecode-perl. 379s Preparing to unpack .../380-libtext-unidecode-perl_1.30-3_all.deb ... 379s Unpacking libtext-unidecode-perl (1.30-3) ... 379s Selecting previously unselected package texinfo-lib. 379s Preparing to unpack .../381-texinfo-lib_7.1.1-1_s390x.deb ... 379s Unpacking texinfo-lib (7.1.1-1) ... 379s Selecting previously unselected package tex-common. 379s Preparing to unpack .../382-tex-common_6.19_all.deb ... 379s Unpacking tex-common (6.19) ... 379s Selecting previously unselected package texinfo. 379s Preparing to unpack .../383-texinfo_7.1.1-1_all.deb ... 379s Unpacking texinfo (7.1.1-1) ... 379s Selecting previously unselected package octave-common. 379s Preparing to unpack .../384-octave-common_9.4.0-1_all.deb ... 379s Unpacking octave-common (9.4.0-1) ... 379s Selecting previously unselected package octave. 379s Preparing to unpack .../385-octave_9.4.0-1_s390x.deb ... 379s Unpacking octave (9.4.0-1) ... 380s Selecting previously unselected package libncurses-dev:s390x. 380s Preparing to unpack .../386-libncurses-dev_6.5+20250216-2_s390x.deb ... 380s Unpacking libncurses-dev:s390x (6.5+20250216-2) ... 380s Selecting previously unselected package libreadline-dev:s390x. 380s Preparing to unpack .../387-libreadline-dev_8.2-6_s390x.deb ... 380s Unpacking libreadline-dev:s390x (8.2-6) ... 380s Selecting previously unselected package libhdf5-fortran-310:s390x. 380s Preparing to unpack .../388-libhdf5-fortran-310_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-fortran-310:s390x (1.14.5+repack-3) ... 380s Selecting previously unselected package libhdf5-hl-310:s390x. 380s Preparing to unpack .../389-libhdf5-hl-310_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-hl-310:s390x (1.14.5+repack-3) ... 380s Selecting previously unselected package libhdf5-hl-fortran-310:s390x. 380s Preparing to unpack .../390-libhdf5-hl-fortran-310_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-hl-fortran-310:s390x (1.14.5+repack-3) ... 380s Selecting previously unselected package libhdf5-cpp-310:s390x. 380s Preparing to unpack .../391-libhdf5-cpp-310_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-cpp-310:s390x (1.14.5+repack-3) ... 380s Selecting previously unselected package libhdf5-hl-cpp-310:s390x. 380s Preparing to unpack .../392-libhdf5-hl-cpp-310_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-hl-cpp-310:s390x (1.14.5+repack-3) ... 380s Selecting previously unselected package zlib1g-dev:s390x. 380s Preparing to unpack .../393-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_s390x.deb ... 380s Unpacking zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 380s Selecting previously unselected package libjpeg-turbo8-dev:s390x. 380s Preparing to unpack .../394-libjpeg-turbo8-dev_2.1.5-3ubuntu2_s390x.deb ... 380s Unpacking libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 380s Selecting previously unselected package libjpeg8-dev:s390x. 380s Preparing to unpack .../395-libjpeg8-dev_8c-2ubuntu11_s390x.deb ... 380s Unpacking libjpeg8-dev:s390x (8c-2ubuntu11) ... 380s Selecting previously unselected package libjpeg-dev:s390x. 380s Preparing to unpack .../396-libjpeg-dev_8c-2ubuntu11_s390x.deb ... 380s Unpacking libjpeg-dev:s390x (8c-2ubuntu11) ... 380s Selecting previously unselected package libaec-dev:s390x. 380s Preparing to unpack .../397-libaec-dev_1.1.3-1_s390x.deb ... 380s Unpacking libaec-dev:s390x (1.1.3-1) ... 380s Selecting previously unselected package libbrotli-dev:s390x. 380s Preparing to unpack .../398-libbrotli-dev_1.1.0-2build4_s390x.deb ... 380s Unpacking libbrotli-dev:s390x (1.1.0-2build4) ... 380s Selecting previously unselected package libidn2-dev:s390x. 380s Preparing to unpack .../399-libidn2-dev_2.3.7-2build2_s390x.deb ... 380s Unpacking libidn2-dev:s390x (2.3.7-2build2) ... 380s Selecting previously unselected package comerr-dev:s390x. 380s Preparing to unpack .../400-comerr-dev_2.1-1.47.2-1ubuntu1_s390x.deb ... 380s Unpacking comerr-dev:s390x (2.1-1.47.2-1ubuntu1) ... 380s Selecting previously unselected package libgssrpc4t64:s390x. 380s Preparing to unpack .../401-libgssrpc4t64_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking libgssrpc4t64:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package libkadm5clnt-mit12:s390x. 380s Preparing to unpack .../402-libkadm5clnt-mit12_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking libkadm5clnt-mit12:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package libkdb5-10t64:s390x. 380s Preparing to unpack .../403-libkdb5-10t64_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking libkdb5-10t64:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package libkadm5srv-mit12:s390x. 380s Preparing to unpack .../404-libkadm5srv-mit12_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking libkadm5srv-mit12:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package krb5-multidev:s390x. 380s Preparing to unpack .../405-krb5-multidev_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking krb5-multidev:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package libkrb5-dev:s390x. 380s Preparing to unpack .../406-libkrb5-dev_1.21.3-4ubuntu2_s390x.deb ... 380s Unpacking libkrb5-dev:s390x (1.21.3-4ubuntu2) ... 380s Selecting previously unselected package libldap-dev:s390x. 380s Preparing to unpack .../407-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_s390x.deb ... 380s Unpacking libldap-dev:s390x (2.6.9+dfsg-1~exp2ubuntu1) ... 380s Selecting previously unselected package libpkgconf3:s390x. 380s Preparing to unpack .../408-libpkgconf3_1.8.1-4_s390x.deb ... 380s Unpacking libpkgconf3:s390x (1.8.1-4) ... 380s Selecting previously unselected package pkgconf-bin. 380s Preparing to unpack .../409-pkgconf-bin_1.8.1-4_s390x.deb ... 380s Unpacking pkgconf-bin (1.8.1-4) ... 380s Selecting previously unselected package pkgconf:s390x. 380s Preparing to unpack .../410-pkgconf_1.8.1-4_s390x.deb ... 380s Unpacking pkgconf:s390x (1.8.1-4) ... 380s Selecting previously unselected package libnghttp2-dev:s390x. 380s Preparing to unpack .../411-libnghttp2-dev_1.64.0-1_s390x.deb ... 380s Unpacking libnghttp2-dev:s390x (1.64.0-1) ... 380s Selecting previously unselected package libpsl-dev:s390x. 380s Preparing to unpack .../412-libpsl-dev_0.21.2-1.1build1_s390x.deb ... 380s Unpacking libpsl-dev:s390x (0.21.2-1.1build1) ... 380s Selecting previously unselected package libgmpxx4ldbl:s390x. 380s Preparing to unpack .../413-libgmpxx4ldbl_2%3a6.3.0+dfsg-3ubuntu1_s390x.deb ... 380s Unpacking libgmpxx4ldbl:s390x (2:6.3.0+dfsg-3ubuntu1) ... 380s Selecting previously unselected package libgmp-dev:s390x. 380s Preparing to unpack .../414-libgmp-dev_2%3a6.3.0+dfsg-3ubuntu1_s390x.deb ... 380s Unpacking libgmp-dev:s390x (2:6.3.0+dfsg-3ubuntu1) ... 380s Selecting previously unselected package libevent-2.1-7t64:s390x. 380s Preparing to unpack .../415-libevent-2.1-7t64_2.1.12-stable-10_s390x.deb ... 380s Unpacking libevent-2.1-7t64:s390x (2.1.12-stable-10) ... 380s Selecting previously unselected package libunbound8:s390x. 380s Preparing to unpack .../416-libunbound8_1.22.0-1ubuntu1_s390x.deb ... 380s Unpacking libunbound8:s390x (1.22.0-1ubuntu1) ... 380s Selecting previously unselected package libgnutls-dane0t64:s390x. 380s Preparing to unpack .../417-libgnutls-dane0t64_3.8.9-2ubuntu2_s390x.deb ... 380s Unpacking libgnutls-dane0t64:s390x (3.8.9-2ubuntu2) ... 380s Selecting previously unselected package libgnutls-openssl27t64:s390x. 380s Preparing to unpack .../418-libgnutls-openssl27t64_3.8.9-2ubuntu2_s390x.deb ... 380s Unpacking libgnutls-openssl27t64:s390x (3.8.9-2ubuntu2) ... 380s Selecting previously unselected package libp11-kit-dev:s390x. 380s Preparing to unpack .../419-libp11-kit-dev_0.25.5-2ubuntu3_s390x.deb ... 380s Unpacking libp11-kit-dev:s390x (0.25.5-2ubuntu3) ... 380s Selecting previously unselected package libtasn1-6-dev:s390x. 380s Preparing to unpack .../420-libtasn1-6-dev_4.20.0-2_s390x.deb ... 380s Unpacking libtasn1-6-dev:s390x (4.20.0-2) ... 380s Selecting previously unselected package nettle-dev:s390x. 380s Preparing to unpack .../421-nettle-dev_3.10.1-1_s390x.deb ... 380s Unpacking nettle-dev:s390x (3.10.1-1) ... 380s Selecting previously unselected package libgnutls28-dev:s390x. 380s Preparing to unpack .../422-libgnutls28-dev_3.8.9-2ubuntu2_s390x.deb ... 380s Unpacking libgnutls28-dev:s390x (3.8.9-2ubuntu2) ... 380s Selecting previously unselected package librtmp-dev:s390x. 380s Preparing to unpack .../423-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_s390x.deb ... 380s Unpacking librtmp-dev:s390x (2.4+20151223.gitfa8646d.1-2build7) ... 380s Selecting previously unselected package libssl-dev:s390x. 380s Preparing to unpack .../424-libssl-dev_3.4.1-1ubuntu1_s390x.deb ... 380s Unpacking libssl-dev:s390x (3.4.1-1ubuntu1) ... 380s Selecting previously unselected package libssh2-1-dev:s390x. 380s Preparing to unpack .../425-libssh2-1-dev_1.11.1-1_s390x.deb ... 380s Unpacking libssh2-1-dev:s390x (1.11.1-1) ... 380s Selecting previously unselected package libzstd-dev:s390x. 380s Preparing to unpack .../426-libzstd-dev_1.5.6+dfsg-2_s390x.deb ... 380s Unpacking libzstd-dev:s390x (1.5.6+dfsg-2) ... 380s Selecting previously unselected package libcurl4-openssl-dev:s390x. 380s Preparing to unpack .../427-libcurl4-openssl-dev_8.12.1-3ubuntu1_s390x.deb ... 380s Unpacking libcurl4-openssl-dev:s390x (8.12.1-3ubuntu1) ... 380s Selecting previously unselected package hdf5-helpers. 380s Preparing to unpack .../428-hdf5-helpers_1.14.5+repack-3_s390x.deb ... 380s Unpacking hdf5-helpers (1.14.5+repack-3) ... 380s Selecting previously unselected package libhdf5-dev. 380s Preparing to unpack .../429-libhdf5-dev_1.14.5+repack-3_s390x.deb ... 380s Unpacking libhdf5-dev (1.14.5+repack-3) ... 380s Selecting previously unselected package xorg-sgml-doctools. 380s Preparing to unpack .../430-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 380s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 380s Selecting previously unselected package x11proto-dev. 380s Preparing to unpack .../431-x11proto-dev_2024.1-1_all.deb ... 380s Unpacking x11proto-dev (2024.1-1) ... 380s Selecting previously unselected package libxau-dev:s390x. 380s Preparing to unpack .../432-libxau-dev_1%3a1.0.11-1_s390x.deb ... 380s Unpacking libxau-dev:s390x (1:1.0.11-1) ... 380s Selecting previously unselected package libxdmcp-dev:s390x. 380s Preparing to unpack .../433-libxdmcp-dev_1%3a1.1.5-1_s390x.deb ... 380s Unpacking libxdmcp-dev:s390x (1:1.1.5-1) ... 380s Selecting previously unselected package xtrans-dev. 380s Preparing to unpack .../434-xtrans-dev_1.4.0-1_all.deb ... 380s Unpacking xtrans-dev (1.4.0-1) ... 380s Selecting previously unselected package libxcb1-dev:s390x. 380s Preparing to unpack .../435-libxcb1-dev_1.17.0-2_s390x.deb ... 380s Unpacking libxcb1-dev:s390x (1.17.0-2) ... 381s Selecting previously unselected package libx11-dev:s390x. 381s Preparing to unpack .../436-libx11-dev_2%3a1.8.10-2_s390x.deb ... 381s Unpacking libx11-dev:s390x (2:1.8.10-2) ... 381s Selecting previously unselected package libglx-dev:s390x. 381s Preparing to unpack .../437-libglx-dev_1.7.0-1build1_s390x.deb ... 381s Unpacking libglx-dev:s390x (1.7.0-1build1) ... 381s Selecting previously unselected package libgl-dev:s390x. 381s Preparing to unpack .../438-libgl-dev_1.7.0-1build1_s390x.deb ... 381s Unpacking libgl-dev:s390x (1.7.0-1build1) ... 381s Selecting previously unselected package libblas-dev:s390x. 381s Preparing to unpack .../439-libblas-dev_3.12.1-2_s390x.deb ... 381s Unpacking libblas-dev:s390x (3.12.1-2) ... 381s Selecting previously unselected package liblapack-dev:s390x. 381s Preparing to unpack .../440-liblapack-dev_3.12.1-2_s390x.deb ... 381s Unpacking liblapack-dev:s390x (3.12.1-2) ... 381s Selecting previously unselected package libfftw3-long3:s390x. 381s Preparing to unpack .../441-libfftw3-long3_3.3.10-2fakesync1build1_s390x.deb ... 381s Unpacking libfftw3-long3:s390x (3.3.10-2fakesync1build1) ... 381s Selecting previously unselected package libfftw3-bin. 381s Preparing to unpack .../442-libfftw3-bin_3.3.10-2fakesync1build1_s390x.deb ... 381s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 381s Selecting previously unselected package libfftw3-dev:s390x. 381s Preparing to unpack .../443-libfftw3-dev_3.3.10-2fakesync1build1_s390x.deb ... 381s Unpacking libfftw3-dev:s390x (3.3.10-2fakesync1build1) ... 381s Selecting previously unselected package libgfortran-14-dev:s390x. 381s Preparing to unpack .../444-libgfortran-14-dev_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package gfortran-14-s390x-linux-gnu. 381s Preparing to unpack .../445-gfortran-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package gfortran-14. 381s Preparing to unpack .../446-gfortran-14_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package gfortran-s390x-linux-gnu. 381s Preparing to unpack .../447-gfortran-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 381s Unpacking gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package gfortran. 381s Preparing to unpack .../448-gfortran_4%3a14.2.0-1ubuntu1_s390x.deb ... 381s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package libstdc++-14-dev:s390x. 381s Preparing to unpack .../449-libstdc++-14-dev_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package g++-14-s390x-linux-gnu. 381s Preparing to unpack .../450-g++-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package g++-14. 381s Preparing to unpack .../451-g++-14_14.2.0-17ubuntu3_s390x.deb ... 381s Unpacking g++-14 (14.2.0-17ubuntu3) ... 381s Selecting previously unselected package g++-s390x-linux-gnu. 381s Preparing to unpack .../452-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 381s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package g++. 381s Preparing to unpack .../453-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 381s Unpacking g++ (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package octave-dev. 381s Preparing to unpack .../454-octave-dev_9.4.0-1_s390x.deb ... 381s Unpacking octave-dev (9.4.0-1) ... 381s Selecting previously unselected package dh-octave. 381s Preparing to unpack .../455-dh-octave_1.8.0_all.deb ... 381s Unpacking dh-octave (1.8.0) ... 381s Selecting previously unselected package libfontenc1:s390x. 381s Preparing to unpack .../456-libfontenc1_1%3a1.1.8-1build1_s390x.deb ... 381s Unpacking libfontenc1:s390x (1:1.1.8-1build1) ... 381s Selecting previously unselected package libxt6t64:s390x. 381s Preparing to unpack .../457-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 381s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 381s Selecting previously unselected package libxmu6:s390x. 381s Preparing to unpack .../458-libxmu6_2%3a1.1.3-3build2_s390x.deb ... 381s Unpacking libxmu6:s390x (2:1.1.3-3build2) ... 381s Selecting previously unselected package libxaw7:s390x. 381s Preparing to unpack .../459-libxaw7_2%3a1.0.16-1_s390x.deb ... 381s Unpacking libxaw7:s390x (2:1.0.16-1) ... 381s Selecting previously unselected package libxfont2:s390x. 381s Preparing to unpack .../460-libxfont2_1%3a2.0.6-1build1_s390x.deb ... 381s Unpacking libxfont2:s390x (1:2.0.6-1build1) ... 381s Selecting previously unselected package libxkbfile1:s390x. 381s Preparing to unpack .../461-libxkbfile1_1%3a1.1.0-1build4_s390x.deb ... 381s Unpacking libxkbfile1:s390x (1:1.1.0-1build4) ... 381s Selecting previously unselected package libxrandr2:s390x. 381s Preparing to unpack .../462-libxrandr2_2%3a1.5.4-1_s390x.deb ... 381s Unpacking libxrandr2:s390x (2:1.5.4-1) ... 381s Selecting previously unselected package octave-io. 381s Preparing to unpack .../463-octave-io_2.6.4-3build2_s390x.deb ... 381s Unpacking octave-io (2.6.4-3build2) ... 381s Selecting previously unselected package octave-statistics-common. 381s Preparing to unpack .../464-octave-statistics-common_1.7.3-2_all.deb ... 381s Unpacking octave-statistics-common (1.7.3-2) ... 381s Selecting previously unselected package octave-statistics. 381s Preparing to unpack .../465-octave-statistics_1.7.3-2_s390x.deb ... 381s Unpacking octave-statistics (1.7.3-2) ... 382s Selecting previously unselected package x11-xkb-utils. 382s Preparing to unpack .../466-x11-xkb-utils_7.7+9_s390x.deb ... 382s Unpacking x11-xkb-utils (7.7+9) ... 382s Selecting previously unselected package xserver-common. 382s Preparing to unpack .../467-xserver-common_2%3a21.1.16-1ubuntu1_all.deb ... 382s Unpacking xserver-common (2:21.1.16-1ubuntu1) ... 382s Selecting previously unselected package xvfb. 382s Preparing to unpack .../468-xvfb_2%3a21.1.16-1ubuntu1_s390x.deb ... 382s Unpacking xvfb (2:21.1.16-1ubuntu1) ... 382s Setting up libapt-pkg-perl (0.1.41build1) ... 382s Setting up libmodule-pluggable-perl (5.2-5) ... 382s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 382s Setting up libstring-escape-perl (2010.002-3) ... 382s Setting up libgnutls-openssl27t64:s390x (3.8.9-2ubuntu2) ... 382s Setting up libxcb-dri3-0:s390x (1.17.0-2) ... 382s Setting up liblcms2-2:s390x (2.16-2) ... 382s Setting up libberkeleydb-perl:s390x (0.66-1) ... 382s Setting up libpixman-1-0:s390x (0.44.0-3) ... 382s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 382s Setting up libwayland-server0:s390x (1.23.1-3) ... 382s Setting up libaom3:s390x (3.12.0-1) ... 382s Setting up libx11-xcb1:s390x (2:1.8.10-2) ... 382s Setting up libfile-which-perl (1.27-2) ... 382s Setting up libdouble-conversion3:s390x (3.3.1-1) ... 382s Setting up libncurses-dev:s390x (6.5+20250216-2) ... 382s Setting up libunicode-utf8-perl (0.62-2build4) ... 382s Setting up libset-intspan-perl (1.19-3) ... 382s Setting up libxcb-xfixes0:s390x (1.17.0-2) ... 382s Setting up libogg0:s390x (1.3.5-3build1) ... 382s Setting up libmouse-perl:s390x (2.5.11-1build1) ... 382s Setting up libzstd-dev:s390x (1.5.6+dfsg-2) ... 382s Setting up libpod-pom-perl (2.01-4) ... 382s Setting up libxpm4:s390x (1:3.5.17-1build2) ... 382s Setting up hdf5-helpers (1.14.5+repack-3) ... 382s Setting up libwmflite-0.2-7:s390x (0.2.13-1.1build3) ... 382s Setting up libregexp-pattern-perl (0.2.14-2) ... 382s Setting up libdata-messagepack-perl (1.02-1build5) ... 382s Setting up libclass-inspector-perl (1.36-3) ... 382s Setting up libxcb-xinput0:s390x (1.17.0-2) ... 382s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 382s Setting up libdynaloader-functions-perl (0.004-1) ... 382s Setting up libdatrie1:s390x (0.2.13-3build1) ... 382s Setting up libtext-glob-perl (0.11-3) ... 382s Setting up libclass-method-modifiers-perl (2.15-1) ... 382s Setting up liblist-compare-perl (0.55-2) ... 382s Setting up libxcb-render0:s390x (1.17.0-2) ... 382s Setting up libclone-perl:s390x (0.47-1) ... 382s Setting up libarchive-zip-perl (1.68-1) ... 382s Setting up libsub-identify-perl (0.14-3build4) ... 382s Setting up libcpanel-json-xs-perl:s390x (4.39-1) ... 382s Setting up libglvnd0:s390x (1.7.0-1build1) ... 382s Setting up libio-stringy-perl (2.113-2) ... 382s Setting up libhtml-tagset-perl (3.24-1) ... 382s Setting up libts0t64:s390x (1.22-1.1build1) ... 382s Setting up liblog-any-perl (1.717-1) ... 382s Setting up libyaml-pp-perl (0.39.0-1) ... 382s Setting up libxcb-glx0:s390x (1.17.0-2) ... 382s Setting up libdevel-size-perl (0.84-1build1) ... 382s Setting up unzip (6.0-28ubuntu6) ... 382s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 382s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 382s Setting up libconvert-binhex-perl (1.125-3) ... 382s Setting up liblwp-mediatypes-perl (6.04-2) ... 382s Setting up libyaml-libyaml-perl (0.903.0+ds-1) ... 382s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 382s Setting up libio-interactive-perl (1.026-1) ... 382s Setting up libxcb-keysyms1:s390x (0.4.1-1) ... 382s Setting up libxcb-shape0:s390x (1.17.0-2) ... 382s Setting up x11-common (1:7.7+23ubuntu3) ... 382s Setting up libtry-tiny-perl (0.32-1) ... 382s Setting up libdeflate0:s390x (1.23-1) ... 382s Setting up perl-openssl-defaults:s390x (7build3) ... 382s Setting up libmldbm-perl (2.05-4) ... 382s Setting up libxml-namespacesupport-perl (1.12-2) ... 382s Setting up m4 (1.4.19-7) ... 382s Setting up libevent-2.1-7t64:s390x (2.1.12-stable-10) ... 382s Setting up libclone-choose-perl (0.010-2) ... 382s Setting up libqhull-r8.0:s390x (2020.2-6build1) ... 382s Setting up libxcb-render-util0:s390x (0.3.10-1) ... 382s Setting up libtime-moment-perl (0.44-2build5) ... 382s Setting up libencode-locale-perl (1.05-3) ... 382s Setting up libxcb-shm0:s390x (1.17.0-2) ... 382s Setting up libxcb-icccm4:s390x (0.4.2-1) ... 382s Setting up texinfo-lib (7.1.1-1) ... 382s Setting up libreadline-dev:s390x (8.2-6) ... 382s Setting up libmpg123-0t64:s390x (1.32.10-1) ... 382s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 382s Setting up libconfig-tiny-perl (2.30-1) ... 382s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 382s Setting up liblist-utilsby-perl (0.12-2) ... 382s Setting up libyaml-tiny-perl (1.76-1) ... 382s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 382s Setting up octave-common (9.4.0-1) ... 382s Setting up libregexp-common-perl (2024080801-1) ... 382s Setting up libpcre2-16-0:s390x (10.45-1) ... 382s Setting up libaec0:s390x (1.1.3-1) ... 382s Setting up libnet-netmask-perl (2.0002-2) ... 382s Setting up libopengl0:s390x (1.7.0-1build1) ... 382s Setting up libsub-install-perl (0.929-1) ... 382s Setting up libxcb-util1:s390x (0.4.1-1) ... 382s Setting up libpsl-dev:s390x (0.21.2-1.1build1) ... 382s Setting up libxxf86vm1:s390x (1:1.1.4-1build4) ... 382s Setting up libindirect-perl (0.39-2build5) ... 382s Setting up libxcb-xkb1:s390x (1.17.0-2) ... 382s Setting up libxcb-image0:s390x (0.4.0-2build1) ... 382s Setting up libnumber-compare-perl (0.03-3) ... 382s Setting up libxcb-present0:s390x (1.17.0-2) ... 382s Setting up liberror-perl (0.17030-1) ... 382s Setting up libasound2-data (1.2.13-1build1) ... 382s Setting up patchutils (0.4.2-1build3) ... 382s Setting up tex-common (6.19) ... 382s update-language: texlive-base not installed and configured, doing nothing! 382s Setting up libjson-maybexs-perl (1.004008-1) ... 382s Setting up libxml-sax-base-perl (1.09-3) ... 382s Setting up libio-string-perl (1.08-4) ... 382s Setting up libboolean-perl (0.46-3) ... 382s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 382s Setting up xtrans-dev (1.4.0-1) ... 382s Setting up libfontenc1:s390x (1:1.1.8-1build1) ... 382s Setting up autotools-dev (20220109.1) ... 382s Setting up libblas3:s390x (3.12.1-2) ... 382s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 382s Setting up libclass-data-inheritable-perl (0.10-1) ... 382s Setting up libunbound8:s390x (1.22.0-1ubuntu1) ... 382s Setting up libpkgconf3:s390x (1.8.1-4) ... 382s Setting up libgmpxx4ldbl:s390x (2:6.3.0+dfsg-3ubuntu1) ... 382s Setting up libalgorithm-c3-perl (0.11-2) ... 382s Setting up libasound2t64:s390x (1.2.13-1build1) ... 382s Setting up liblog-log4perl-perl (1.57-1) ... 382s Setting up libtext-reform-perl (1.20-5) ... 382s Setting up libgnutls-dane0t64:s390x (3.8.9-2ubuntu2) ... 382s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 382s Setting up libfile-find-rule-perl (0.34-3) ... 382s Setting up libxfixes3:s390x (1:6.0.0-2build1) ... 382s Setting up libxcb-sync1:s390x (1.17.0-2) ... 382s Setting up libipc-system-simple-perl (1.30-2) ... 382s Setting up libio-tiecombine-perl (1.005-3) ... 382s Setting up libnet-domain-tld-perl (1.75-4) ... 382s Setting up libgssrpc4t64:s390x (1.21.3-4ubuntu2) ... 382s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 382s Setting up libldap-dev:s390x (2.6.9+dfsg-1~exp2ubuntu1) ... 382s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 382s Setting up libxcb-cursor0:s390x (0.1.5-1) ... 382s Setting up lzip (1.25-2) ... 382s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 382s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 382s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 382s Setting up libavahi-common-data:s390x (0.8-16ubuntu1) ... 382s Setting up libopus0:s390x (1.5.2-2) ... 382s Setting up t1utils (1.41-4build3) ... 382s Setting up libxinerama1:s390x (2:1.1.4-3build1) ... 382s Setting up diffstat (1.67-1) ... 382s Setting up libimagequant0:s390x (2.18.0-1build1) ... 382s Setting up comerr-dev:s390x (2.1-1.47.2-1ubuntu1) ... 382s Setting up libxkbcommon-x11-0:s390x (1.7.0-2) ... 382s Setting up fonts-dejavu-mono (2.37-8) ... 382s Setting up libssl-dev:s390x (3.4.1-1ubuntu1) ... 382s Setting up libmpc3:s390x (1.3.1-1build2) ... 382s Setting up libvorbis0a:s390x (1.3.7-2) ... 382s Setting up libvariable-magic-perl (0.64-1build1) ... 382s Setting up libio-html-perl (1.004-3) ... 382s Setting up libxrandr2:s390x (2:1.5.4-1) ... 382s Setting up libtext-template-perl (1.61-1) ... 382s Setting up libpod-parser-perl (1.67-1) ... 382s Setting up autopoint (0.23.1-1) ... 382s Setting up libb-hooks-op-check-perl:s390x (0.22-3build2) ... 382s Setting up fonts-dejavu-core (2.37-8) ... 382s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 382s Setting up pkgconf-bin (1.8.1-4) ... 382s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 382s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 382s Setting up libltdl7:s390x (2.5.4-4) ... 382s Setting up libidn2-dev:s390x (2.3.7-2build2) ... 382s Setting up libfftw3-double3:s390x (3.3.10-2fakesync1build1) ... 382s Setting up libparams-util-perl (1.102-3build1) ... 382s Setting up libgfortran5:s390x (15-20250222-0ubuntu1) ... 382s Setting up libvulkan1:s390x (1.4.304.0-1) ... 382s Setting up libtime-duration-perl (1.21-2) ... 382s Setting up autoconf (2.72-3ubuntu1) ... 382s Setting up libtext-xslate-perl:s390x (3.5.9-2build1) ... 382s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 382s Setting up libwebp7:s390x (1.5.0-0.1) ... 382s Setting up libarray-intspan-perl (2.004-2) ... 382s Setting up libcapture-tiny-perl (0.50-1) ... 382s Setting up libtimedate-perl (2.3300-2) ... 382s Setting up libexporter-lite-perl (0.09-2) ... 382s Setting up libubsan1:s390x (15-20250222-0ubuntu1) ... 382s Setting up libsub-name-perl:s390x (0.28-1) ... 382s Setting up zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 382s Setting up dwz (0.15-1build6) ... 382s Setting up libdata-validate-domain-perl (0.15-1) ... 382s Setting up libproc-processtable-perl:s390x (0.636-1build4) ... 382s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 382s Setting up libmtdev1t64:s390x (1.1.7-1) ... 382s Setting up libduktape207:s390x (2.7.0+tests-0ubuntu3) ... 382s Setting up libxshmfence1:s390x (1.3-1build5) ... 382s Setting up libxcb-randr0:s390x (1.17.0-2) ... 382s Setting up libpath-tiny-perl (0.146-1) ... 382s Setting up libasan8:s390x (15-20250222-0ubuntu1) ... 382s Setting up lzop (1.04-2build3) ... 382s Setting up libjson-perl (4.10000-1) ... 382s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 382s Setting up librole-tiny-perl (2.002004-1) ... 382s Setting up debugedit (1:5.1-2) ... 382s Setting up libipc-run3-perl (0.049-1) ... 382s Setting up libmd4c0:s390x (0.5.2-2) ... 382s Setting up libregexp-wildcards-perl (1.05-3) ... 382s Setting up libmousex-strictconstructor-perl (0.02-3) ... 382s Setting up libfile-sharedir-perl (1.118-3) ... 382s Setting up libsub-uplevel-perl (0.2800-3) ... 382s Setting up libsuitesparseconfig7:s390x (1:7.8.3+dfsg-3) ... 382s Setting up liblua5.4-0:s390x (5.4.7-1) ... 382s Setting up libaliased-perl (0.34-3) ... 382s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 382s Setting up libthai-data (0.1.29-2build1) ... 382s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 382s Setting up libstrictures-perl (2.000006-1) ... 382s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 382s Setting up libdevel-stacktrace-perl (2.0500-1) ... 382s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 382s Setting up libtext-autoformat-perl (1.750000-2) ... 382s Setting up libglu1-mesa:s390x (9.0.2-1.1build1) ... 382s Setting up libflac12t64:s390x (1.4.3+ds-4) ... 382s Setting up libtoml-tiny-perl (0.19-1) ... 382s Setting up libstemmer0d:s390x (2.2.0-4build1) ... 382s Setting up libxkbfile1:s390x (1:1.1.0-1build4) ... 382s Setting up libsort-versions-perl (1.62-3) ... 382s Setting up libexporter-tiny-perl (1.006002-1) ... 382s Setting up libterm-readkey-perl (2.38-2build5) ... 382s Setting up libisl23:s390x (0.27-1) ... 382s Setting up libtext-unidecode-perl (1.30-3) ... 382s Setting up libde265-0:s390x (1.0.15-1build5) ... 382s Setting up libfont-ttf-perl (1.06-2) ... 382s Setting up libfile-homedir-perl (1.006-2) ... 382s Setting up libsamplerate0:s390x (0.2.2-4build1) ... 382s Setting up libtasn1-6-dev:s390x (4.20.0-2) ... 382s Setting up libwebpmux3:s390x (1.5.0-0.1) ... 382s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 382s Setting up libperlio-gzip-perl (0.20-1build5) ... 382s Setting up libjxl0.11:s390x (0.11.1-1) ... 382s Setting up libxfont2:s390x (1:2.0.6-1build1) ... 382s Setting up libhtml-html5-entities-perl (0.004-3) ... 382s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 382s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 382s Setting up libmarkdown2:s390x (2.2.7-2.1) ... 382s Setting up libcc1-0:s390x (15-20250222-0ubuntu1) ... 382s Setting up liburi-perl (5.30-1) ... 382s Setting up libnet-ipv6addr-perl (1.02-1) ... 382s Setting up libbrotli-dev:s390x (1.1.0-2build4) ... 382s Setting up libp11-kit-dev:s390x (0.25.5-2ubuntu3) ... 382s Setting up libmp3lame0:s390x (3.100-6build1) ... 382s Setting up libblas-dev:s390x (3.12.1-2) ... 382s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so to provide /usr/lib/s390x-linux-gnu/libblas.so (libblas.so-s390x-linux-gnu) in auto mode 382s Setting up libsz2:s390x (1.1.3-1) ... 382s Setting up libitm1:s390x (15-20250222-0ubuntu1) ... 382s Setting up libvorbisenc2:s390x (1.3.7-2) ... 382s Setting up libkadm5clnt-mit12:s390x (1.21.3-4ubuntu2) ... 382s Setting up libdata-validate-ip-perl (0.31-1) ... 382s Setting up libwacom-common (2.14.0-1) ... 382s Setting up libmousex-nativetraits-perl (1.09-3) ... 382s Setting up libemail-address-xs-perl (1.05-1build5) ... 382s Setting up libwayland-client0:s390x (1.23.1-3) ... 382s Setting up libnet-ssleay-perl:s390x (1.94-3) ... 382s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 382s Setting up automake (1:1.17-3ubuntu1) ... 382s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 382s Setting up libb2-1:s390x (0.98.1-1.1build1) ... 382s Setting up x11proto-dev (2024.1-1) ... 382s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 382s Setting up gnuplot-data (6.0.2+dfsg1-1) ... 382s Setting up libice6:s390x (2:1.1.1-1) ... 382s Setting up libqt6core6t64:s390x (6.8.2+dfsg-5) ... 382s Setting up libhttp-date-perl (6.06-1) ... 382s Setting up mesa-libgallium:s390x (25.0.1-2ubuntu1) ... 382s Setting up libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 382s Setting up liblapack3:s390x (3.12.1-2) ... 382s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 382s Setting up libproxy1v5:s390x (0.5.9-1) ... 382s Setting up libfile-basedir-perl (0.09-2) ... 382s Setting up gettext (0.23.1-1) ... 382s Setting up libarpack2t64:s390x (3.9.1-4) ... 382s Setting up libfftw3-single3:s390x (3.3.10-2fakesync1build1) ... 382s Setting up libgmp-dev:s390x (2:6.3.0+dfsg-3ubuntu1) ... 382s Setting up libamd3:s390x (1:7.8.3+dfsg-3) ... 382s Setting up libfile-listing-perl (6.16-1) ... 382s Setting up libxau-dev:s390x (1:1.0.11-1) ... 382s Setting up nettle-dev:s390x (3.10.1-1) ... 382s Setting up libkdb5-10t64:s390x (1.21.3-4ubuntu2) ... 382s Setting up libgbm1:s390x (25.0.1-2ubuntu1) ... 382s Setting up libcolamd3:s390x (1:7.8.3+dfsg-3) ... 382s Setting up libwacom9:s390x (2.14.0-1) ... 382s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 382s Setting up liblist-moreutils-perl (0.430-2) ... 382s Setting up libxcursor1:s390x (1:1.2.3-1) ... 382s Setting up libpod-constants-perl (0.19-2) ... 382s Setting up libgl1-mesa-dri:s390x (25.0.1-2ubuntu1) ... 382s Setting up libhash-merge-perl (0.302-1) ... 382s Setting up libsoftware-copyright-perl (0.014-1) ... 382s Setting up libaec-dev:s390x (1.1.3-1) ... 382s Setting up libavahi-common3:s390x (0.8-16ubuntu1) ... 382s Setting up libcxsparse4:s390x (1:7.8.3+dfsg-3) ... 382s Setting up libfftw3-long3:s390x (3.3.10-2fakesync1build1) ... 382s Setting up libnet-http-perl (6.23-1) ... 382s Setting up libpath-iterator-rule-perl (1.015-2) ... 382s Setting up libtext-markdown-discount-perl (0.18-1) ... 382s Setting up libappstream5:s390x (1.0.4-1) ... 382s Setting up libexception-class-perl (1.45-1) ... 382s Setting up libclass-c3-perl (0.35-2) ... 382s Setting up libqrupdate1:s390x (1.1.5-1) ... 382s Setting up libdevel-callchecker-perl:s390x (0.009-1build1) ... 382s Setting up libxml-sax-perl (1.02+dfsg-4) ... 382s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 382s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 382s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 382s Setting up libcamd3:s390x (1:7.8.3+dfsg-3) ... 382s Setting up pkgconf:s390x (1.8.1-4) ... 382s Setting up libinput-bin (1.27.1-1) ... 382s Setting up libxs-parse-sublike-perl:s390x (0.37-1) ... 382s Setting up intltool-debian (0.35.0+20060710.6) ... 382s Setting up libthai0:s390x (0.1.29-2build1) ... 382s Setting up libxdmcp-dev:s390x (1:1.1.5-1) ... 382s Setting up libegl-mesa0:s390x (25.0.1-2ubuntu1) ... 382s Setting up libdata-validate-uri-perl (0.07-3) ... 382s Setting up libxs-parse-keyword-perl (0.48-2) ... 382s Setting up libtest-exception-perl (0.43-3) ... 382s Setting up appstream (1.0.4-1) ... 382s ✔ Metadata cache was updated successfully. 382s Setting up libqt6xml6:s390x (6.8.2+dfsg-5) ... 382s Setting up libglpk40:s390x (5.0-1build2) ... 382s Setting up libqt6sql6:s390x (6.8.2+dfsg-5) ... 382s Setting up libstring-copyright-perl (0.003014-1) ... 382s Setting up libraqm0:s390x (0.10.2-1) ... 382s Setting up liblapack-dev:s390x (3.12.1-2) ... 382s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so to provide /usr/lib/s390x-linux-gnu/liblapack.so (liblapack.so-s390x-linux-gnu) in auto mode 382s Setting up libdata-optlist-perl (0.114-1) ... 382s Setting up libssh2-1-dev:s390x (1.11.1-1) ... 382s Setting up cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 382s Setting up cpp-14 (14.2.0-17ubuntu3) ... 382s Setting up libccolamd3:s390x (1:7.8.3+dfsg-3) ... 382s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 382s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 383s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 383s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 383s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 383s Setting up dh-strip-nondeterminism (1.14.1-2) ... 383s Setting up libwww-robotrules-perl (6.02-1) ... 383s Setting up libsyntax-keyword-try-perl (0.30-1) ... 383s Setting up libjack-jackd2-0:s390x (1.9.22~dfsg-4) ... 383s Setting up libhdf5-310:s390x (1.14.5+repack-3) ... 383s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 383s Setting up libhtml-parser-perl:s390x (3.83-1build1) ... 383s Setting up libkadm5srv-mit12:s390x (1.21.3-4ubuntu2) ... 383s Setting up libegl1:s390x (1.7.0-1build1) ... 383s Setting up libqt6core5compat6:s390x (6.8.2-3) ... 383s Setting up libfontconfig1:s390x (2.15.0-2ubuntu1) ... 383s Setting up libsndfile1:s390x (1.2.2-2) ... 383s Setting up libmro-compat-perl (0.15-2) ... 383s Setting up libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 383s Setting up libjpeg8-dev:s390x (8c-2ubuntu11) ... 383s Setting up libhdf5-fortran-310:s390x (1.14.5+repack-3) ... 383s Setting up libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 383s Setting up libsm6:s390x (2:1.2.4-1) ... 383s Setting up libavahi-client3:s390x (0.8-16ubuntu1) ... 383s Setting up libio-socket-ssl-perl (2.089-1) ... 383s Setting up libsub-exporter-perl (0.990-1) ... 383s Setting up libqt6dbus6:s390x (6.8.2+dfsg-5) ... 383s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 383s Setting up libhtml-form-perl (6.12-1) ... 383s Setting up krb5-multidev:s390x (1.21.3-4ubuntu2) ... 383s Setting up libhdf5-cpp-310:s390x (1.14.5+repack-3) ... 383s Setting up libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 383s Setting up libiterator-perl (0.03+ds1-2) ... 383s Setting up libgnutls28-dev:s390x (3.8.9-2ubuntu2) ... 383s Setting up libinput10:s390x (1.27.1-1) ... 383s Setting up libnghttp2-dev:s390x (1.64.0-1) ... 383s Setting up libhdf5-hl-310:s390x (1.14.5+repack-3) ... 383s Setting up libportaudio2:s390x (19.6.0-1.2build3) ... 383s Setting up libhttp-negotiate-perl (6.01-2) ... 383s Setting up fontconfig (2.15.0-2ubuntu1) ... 385s Regenerating fonts cache... done. 385s Setting up libcarp-assert-more-perl (2.8.0-1) ... 385s Setting up libcholmod5:s390x (1:7.8.3+dfsg-3) ... 385s Setting up libxft2:s390x (2.3.6-1build1) ... 385s Setting up libglx-mesa0:s390x (25.0.1-2ubuntu1) ... 385s Setting up libxcb1-dev:s390x (1.17.0-2) ... 385s Setting up libiterator-util-perl (0.02+ds1-2) ... 385s Setting up libglx0:s390x (1.7.0-1build1) ... 385s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 385s Setting up libhttp-cookies-perl (6.11-1) ... 385s Setting up libspqr4:s390x (1:7.8.3+dfsg-3) ... 385s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 385s Setting up po-debconf (1.0.21+nmu1) ... 385s Setting up libhtml-tree-perl (5.07-3) ... 385s Setting up libparams-classify-perl:s390x (0.015-2build6) ... 385s Setting up libpango-1.0-0:s390x (1.56.2-1) ... 385s Setting up libcgi-pm-perl (4.67-1) ... 385s Setting up libjpeg-dev:s390x (8c-2ubuntu11) ... 385s Setting up libx11-dev:s390x (2:1.8.10-2) ... 385s Setting up libcairo2:s390x (1.18.2-2) ... 385s Setting up libobject-pad-perl (0.820-1) ... 385s Setting up libkrb5-dev:s390x (1.21.3-4ubuntu2) ... 385s Setting up gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 385s Setting up libgl1:s390x (1.7.0-1build1) ... 385s Setting up libqt6gui6:s390x (6.8.2+dfsg-5) ... 385s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 385s Setting up libnet-smtp-ssl-perl (1.04-2) ... 385s Setting up libmodule-runtime-perl (0.016-2) ... 385s Setting up libmailtools-perl (2.22-1) ... 385s Setting up libconfig-model-perl (2.155-1) ... 385s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 385s Setting up librtmp-dev:s390x (2.4+20151223.gitfa8646d.1-2build7) ... 385s Setting up g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 385s Setting up texinfo (7.1.1-1) ... 385s Setting up libumfpack6:s390x (1:7.8.3+dfsg-3) ... 385s Setting up libconst-fast-perl (0.014-2) ... 385s Setting up libqt6network6:s390x (6.8.2+dfsg-5) ... 385s Setting up cpp (4:14.2.0-1ubuntu1) ... 385s Setting up libdata-section-perl (0.200008-1) ... 385s Setting up libglx-dev:s390x (1.7.0-1build1) ... 385s Setting up libpangoft2-1.0-0:s390x (1.56.2-1) ... 385s Setting up libdata-dpath-perl (0.60-1) ... 385s Setting up libfltk1.3t64:s390x (1.3.8-6.1build2) ... 385s Setting up libfftw3-dev:s390x (3.3.10-2fakesync1build1) ... 385s Setting up libcups2t64:s390x (2.4.11-0ubuntu2) ... 385s Setting up libgl-dev:s390x (1.7.0-1build1) ... 385s Setting up libstring-rewriteprefix-perl (0.009-1) ... 385s Setting up libpangocairo-1.0-0:s390x (1.56.2-1) ... 385s Setting up libhdf5-hl-cpp-310:s390x (1.14.5+repack-3) ... 385s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 385s Setting up libhdf5-hl-fortran-310:s390x (1.14.5+repack-3) ... 385s Setting up libxmu6:s390x (2:1.1.3-3build2) ... 385s Setting up libmodule-implementation-perl (0.09-2) ... 385s Setting up libpackage-stash-perl (0.40-1) ... 385s Setting up libimport-into-perl (1.002005-2) ... 385s Setting up libmoo-perl (2.005005-1) ... 385s Setting up gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 385s Setting up libqt6opengl6:s390x (6.8.2+dfsg-5) ... 385s Setting up liblist-someutils-perl (0.59-1) ... 385s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 385s Setting up libxaw7:s390x (2:1.0.16-1) ... 385s Setting up libmime-tools-perl (5.515-1) ... 385s Setting up libsoftware-license-perl (0.104006-1) ... 385s Setting up libclass-load-perl (0.25-2) ... 385s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 385s Setting up gcc-14 (14.2.0-17ubuntu3) ... 385s Setting up libqt6widgets6:s390x (6.8.2+dfsg-5) ... 385s Setting up libfltk-gl1.3t64:s390x (1.3.8-6.1build2) ... 385s Setting up libcurl4-openssl-dev:s390x (8.12.1-3ubuntu1) ... 385s Setting up libhdf5-dev (1.14.5+repack-3) ... 385s update-alternatives: using /usr/lib/s390x-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/s390x-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 385s Setting up g++-14 (14.2.0-17ubuntu3) ... 385s Setting up libmoox-aliases-perl (0.001006-2) ... 385s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 385s Setting up libparams-validate-perl:s390x (1.31-2build4) ... 385s Setting up libqt6openglwidgets6:s390x (6.8.2+dfsg-5) ... 385s Setting up libb-hooks-endofscope-perl (0.28-1) ... 385s Setting up libqt6printsupport6:s390x (6.8.2+dfsg-5) ... 385s Setting up gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 385s Setting up libtool (2.5.4-4) ... 385s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 385s Setting up x11-xkb-utils (7.7+9) ... 385s Setting up libqt6help6:s390x (6.8.2-3) ... 385s Setting up libqscintilla2-qt6-15:s390x (2.14.1+dfsg-1build4) ... 385s Setting up gcc (4:14.2.0-1ubuntu1) ... 385s Setting up dh-autoreconf (20) ... 385s Setting up libnamespace-clean-perl (0.27-2) ... 385s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 385s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 385s Setting up g++ (4:14.2.0-1ubuntu1) ... 385s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 385s Setting up xserver-common (2:21.1.16-1ubuntu1) ... 385s Setting up licensecheck (3.3.9-1ubuntu1) ... 385s Setting up libapp-cmd-perl (0.337-2) ... 385s Setting up xvfb (2:21.1.16-1ubuntu1) ... 385s Setting up debhelper (13.24.1ubuntu2) ... 385s Setting up gfortran (4:14.2.0-1ubuntu1) ... 385s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 385s 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 385s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 385s 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 385s Setting up cme (1.041-1) ... 385s Setting up libheif-plugin-aomdec:s390x (1.19.7-1) ... 385s Setting up libwww-perl (6.78-1) ... 385s Setting up libheif1:s390x (1.19.7-1) ... 385s Setting up libparse-debcontrol-perl (2.005-6) ... 385s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 385s Setting up libwww-mechanize-perl (2.19-1ubuntu1) ... 385s Setting up libgd3:s390x (2.3.3-12ubuntu3) ... 385s Setting up gnuplot-nox (6.0.2+dfsg1-1) ... 385s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 385s Setting up liblwp-protocol-https-perl (6.14-1) ... 385s Setting up libheif-plugin-libde265:s390x (1.19.7-1) ... 385s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 385s Setting up lintian (2.121.1+nmu1ubuntu2) ... 385s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 385s Setting up libconfig-model-dpkg-perl (3.010) ... 385s Setting up dh-octave-autopkgtest (1.8.0) ... 385s Setting up octave (9.4.0-1) ... 385s Setting up octave-dev (9.4.0-1) ... 385s Setting up octave-io (2.6.4-3build2) ... 385s Setting up octave-statistics-common (1.7.3-2) ... 385s Setting up octave-statistics (1.7.3-2) ... 385s Setting up dh-octave (1.8.0) ... 385s Processing triggers for libc-bin (2.41-1ubuntu2) ... 385s Processing triggers for man-db (2.13.0-1) ... 387s Processing triggers for udev (257.3-1ubuntu3) ... 387s Processing triggers for install-info (7.1.1-1) ... 388s autopkgtest [16:15:58]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 388s autopkgtest [16:15:58]: test command1: [----------------------- 388s Checking package... 389s Run the unit tests... 389s Checking m files ... 389s [inst/regress_gp.m] 389s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/regress_gp.m 389s ***** demo 389s ## Linear fitting of 1D Data 389s rand ("seed", 125); 389s X = 2 * rand (5, 1) - 1; 389s randn ("seed", 25); 389s Y = 2 * X - 1 + 0.3 * randn (5, 1); 389s 389s ## Points for interpolation/extrapolation 389s Xfit = linspace (-2, 2, 10)'; 389s 389s ## Fit regression model 389s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 389s 389s ## Plot fitted data 389s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 389s title ("Gaussian process regression with linear kernel"); 389s ***** demo 389s ## Linear fitting of 2D Data 389s rand ("seed", 135); 389s X = 2 * rand (4, 2) - 1; 389s randn ("seed", 35); 389s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 389s 389s ## Mesh for interpolation/extrapolation 389s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 389s Xfit = [x1(:), x2(:)]; 389s 389s ## Fit regression model 389s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 389s Ypred = reshape (Ypred, 10, 10); 389s YintU = reshape (Yint(:,1), 10, 10); 389s YintL = reshape (Yint(:,2), 10, 10); 389s 389s ## Plot fitted data 389s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 389s hold on; 389s h = mesh (x1, x2, Ypred, zeros (10, 10)); 389s set (h, "facecolor", "none", "edgecolor", "yellow"); 389s h = mesh (x1, x2, YintU, ones (10, 10)); 389s set (h, "facecolor", "none", "edgecolor", "cyan"); 389s h = mesh (x1, x2, YintL, ones (10, 10)); 389s set (h, "facecolor", "none", "edgecolor", "cyan"); 389s hold off 389s axis tight 389s view (75, 25) 389s title ("Gaussian process regression with linear kernel"); 389s ***** demo 389s ## Projection over basis function with linear kernel 389s pp = [2, 2, 0.3, 1]; 389s n = 10; 389s rand ("seed", 145); 389s X = 2 * rand (n, 1) - 1; 389s randn ("seed", 45); 389s Y = polyval (pp, X) + 0.3 * randn (n, 1); 389s 389s ## Powers 389s px = [sqrt(abs(X)), X, X.^2, X.^3]; 389s 389s ## Points for interpolation/extrapolation 389s Xfit = linspace (-1, 1, 100)'; 389s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 389s 389s ## Define a prior covariance assuming that the sqrt component is not present 389s Sp = 100 * eye (size (px, 2) + 1); 389s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 389s 389s ## Fit regression model 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 389s 389s ## Plot fitted data 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("Linear kernel over basis function with prior covariance"); 389s ***** demo 389s ## Projection over basis function with linear kernel 389s pp = [2, 2, 0.3, 1]; 389s n = 10; 389s rand ("seed", 145); 389s X = 2 * rand (n, 1) - 1; 389s randn ("seed", 45); 389s Y = polyval (pp, X) + 0.3 * randn (n, 1); 389s 389s ## Powers 389s px = [sqrt(abs(X)), X, X.^2, X.^3]; 389s 389s ## Points for interpolation/extrapolation 389s Xfit = linspace (-1, 1, 100)'; 389s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 389s 389s ## Fit regression model without any assumption on prior covariance 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 389s 389s ## Plot fitted data 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("Linear kernel over basis function without prior covariance"); 389s ***** demo 389s ## Projection over basis function with rbf kernel 389s pp = [2, 2, 0.3, 1]; 389s n = 10; 389s rand ("seed", 145); 389s X = 2 * rand (n, 1) - 1; 389s randn ("seed", 45); 389s Y = polyval (pp, X) + 0.3 * randn (n, 1); 389s 389s ## Powers 389s px = [sqrt(abs(X)), X, X.^2, X.^3]; 389s 389s ## Points for interpolation/extrapolation 389s Xfit = linspace (-1, 1, 100)'; 389s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 389s 389s ## Fit regression model with RBF kernel (standard parameters) 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 389s 389s ## Plot fitted data 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("RBF kernel over basis function with standard parameters"); 389s text (-0.5, 4, "theta = 5\n g = 0.01"); 389s ***** demo 389s ## Projection over basis function with rbf kernel 389s pp = [2, 2, 0.3, 1]; 389s n = 10; 389s rand ("seed", 145); 389s X = 2 * rand (n, 1) - 1; 389s randn ("seed", 45); 389s Y = polyval (pp, X) + 0.3 * randn (n, 1); 389s 389s ## Powers 389s px = [sqrt(abs(X)), X, X.^2, X.^3]; 389s 389s ## Points for interpolation/extrapolation 389s Xfit = linspace (-1, 1, 100)'; 389s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 389s 389s ## Fit regression model with RBF kernel with different parameters 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 389s 389s ## Plot fitted data 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("GP regression with RBF kernel and non default parameters"); 389s text (-0.5, 4, "theta = 10\n g = 0.01"); 389s 389s ## Fit regression model with RBF kernel with different parameters 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 389s 389s ## Plot fitted data 389s figure 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("GP regression with RBF kernel and non default parameters"); 389s text (-0.5, 4, "theta = 50\n g = 0.01"); 389s 389s ## Fit regression model with RBF kernel with different parameters 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 389s 389s ## Plot fitted data 389s figure 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("GP regression with RBF kernel and non default parameters"); 389s text (-0.5, 4, "theta = 50\n g = 0.001"); 389s 389s ## Fit regression model with RBF kernel with different parameters 389s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 389s 389s ## Plot fitted data 389s figure 389s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 389s Xfit, polyval (pp, Xfit), "g-;True;"); 389s axis tight 389s axis manual 389s hold on 389s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 389s hold off 389s title ("GP regression with RBF kernel and non default parameters"); 389s text (-0.5, 4, "theta = 50\n g = 0.05"); 389s ***** demo 389s ## RBF fitting on noiseless 1D Data 389s x = [0:2*pi/7:2*pi]'; 389s y = 5 * sin (x); 389s 389s ## Predictive grid of 500 equally spaced locations 389s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 389s 389s ## Fit regression model with RBF kernel 389s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 389s 389s ## Plot fitted data 389s r = mvnrnd (Yfit, diag (Ysd)', 50); 389s plot (xi, r', "c-"); 389s hold on 389s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 389s plot (x, y, ".k;Predictor points;", "markersize", 20) 389s plot (xi, 5 * sin (xi), "-y;True Function;"); 389s xlim ([-0.5,2*pi+0.5]); 389s ylim ([-10,10]); 389s hold off 389s title ("GP regression with RBF kernel on noiseless 1D data"); 389s text (0, -7, "theta = 5\n g = 0.01"); 389s ***** demo 389s ## RBF fitting on noisy 1D Data 389s x = [0:2*pi/7:2*pi]'; 389s x = [x; x]; 389s y = 5 * sin (x) + randn (size (x)); 389s 389s ## Predictive grid of 500 equally spaced locations 389s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 389s 389s ## Fit regression model with RBF kernel 389s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 389s 389s ## Plot fitted data 389s r = mvnrnd (Yfit, diag (Ysd)', 50); 389s plot (xi, r', "c-"); 389s hold on 389s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 389s plot (x, y, ".k;Predictor points;", "markersize", 20) 389s plot (xi, 5 * sin (xi), "-y;True Function;"); 389s xlim ([-0.5,2*pi+0.5]); 389s ylim ([-10,10]); 389s hold off 389s title ("GP regression with RBF kernel on noisy 1D data"); 389s text (0, -7, "theta = 5\n g = 0.01"); 389s ***** error regress_gp (ones (20, 2)) 389s ***** error regress_gp (ones (20, 2), ones (20, 1)) 389s ***** error ... 389s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 389s ***** error ... 389s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 389s 22 tests, 22 passed, 0 known failure, 0 skipped 389s [inst/nansum.m] 389s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/nansum.m 389s ***** assert (nansum ([2 4 NaN 7]), 13) 389s ***** assert (nansum ([2 4 NaN Inf]), Inf) 389s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 389s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 389s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 389s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 389s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 389s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 389s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 389s 9 tests, 9 passed, 0 known failure, 0 skipped 389s [inst/mhsample.m] 389s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/mhsample.m 389s ***** demo 389s ## Define function to sample 389s d = 2; 389s mu = [-1; 2]; 389s rand ("seed", 5) # for reproducibility 389s Sigma = rand (d); 389s Sigma = (Sigma + Sigma'); 389s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 389s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 389s ## Inputs 389s start = ones (1, 2); 389s nsamples = 500; 389s sym = true; 389s K = 500; 389s m = 10; 389s rand ("seed", 8) # for reproducibility 389s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 389s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 389s "symmetric", sym, "burnin", K, "thin", m); 389s figure; 389s hold on; 389s plot (smpl(:, 1), smpl(:, 2), 'x'); 389s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 389s z = reshape (pdf ([x(:), y(:)]), size(x)); 389s mesh (x, y, z, "facecolor", "None"); 389s ## Using sample points to find the volume of half a sphere with radius of .5 389s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 389s int = mean (f (smpl) ./ pdf (smpl)); 389s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 389s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 389s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 389s printf ("Monte Carlo integral error estimate %f\n", errest); 389s printf ("The actual error %f\n", trueerr); 389s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 389s ***** demo 389s ## Integrate truncated normal distribution to find normilization constant 389s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 389s nsamples = 1e3; 389s rand ("seed", 5) # for reproducibility 389s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 389s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 389s "symmetric", true, "thin", 4); 389s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 389s x = linspace (-3, 3, 1000); 389s area(x, f(x)); 389s xlabel ('x'); 389s ylabel ('f(x)'); 389s int = mean (f (smpl) ./ pdf (smpl)); 389s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 389s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 389s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 389s printf ("Monte Carlo integral error estimate %f\n", errest); 389s printf ("The actual error %f\n", trueerr); 389s ***** test 389s nchain = 1e4; 389s start = rand (nchain, 1); 389s nsamples = 1e3; 389s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 389s proppdf = @(x, y) 1/3; 389s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 389s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 389s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 389s "burnin", 0); 389s assert (mean (mean (smpl, 1), 3), 1, .01); 389s assert (mean (var (smpl, 1), 3), 1, .01) 393s ***** error mhsample (); 393s ***** error mhsample (1); 393s ***** error mhsample (1, 1); 393s ***** error mhsample (1, 1, "pdf", @(x)x); 393s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 393s 6 tests, 6 passed, 0 known failure, 0 skipped 393s [inst/kruskalwallis.m] 393s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/kruskalwallis.m 393s ***** demo 393s x = meshgrid (1:6); 393s x = x + normrnd (0, 1, 6, 6); 393s kruskalwallis (x, [], 'off'); 393s ***** demo 393s x = meshgrid (1:6); 393s x = x + normrnd (0, 1, 6, 6); 393s [p, atab] = kruskalwallis(x); 393s ***** demo 393s x = ones (30, 4) .* [-2, 0, 1, 5]; 393s x = x + normrnd (0, 2, 30, 4); 393s group = {"A", "B", "C", "D"}; 393s kruskalwallis (x, group); 393s ***** test 393s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 393s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 393s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 393s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 393s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 393s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 393s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 393s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 393s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 393s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 393s group = [1:10] .* ones (10,10); 393s group = group(:); 393s [p, tbl] = kruskalwallis (data, group, "off"); 393s assert (p, 0.048229, 1e-6); 393s assert (tbl{2,5}, 17.03124, 1e-5); 393s assert (tbl{2,3}, 9, 0); 393s assert (tbl{4,2}, 82655.5, 1e-16); 393s data = reshape (data, 10, 10); 393s [p, tbl, stats] = kruskalwallis (data, [], "off"); 393s assert (p, 0.048229, 1e-6); 393s assert (tbl{2,5}, 17.03124, 1e-5); 393s assert (tbl{2,3}, 9, 0); 393s assert (tbl{4,2}, 82655.5, 1e-16); 393s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 393s N = 10 * ones (1, 10); 393s assert (stats.meanranks, means, 1e-6); 393s assert (length (stats.gnames), 10, 0); 393s assert (stats.n, N, 0); 393s 1 test, 1 passed, 0 known failure, 0 skipped 393s [inst/sampsizepwr.m] 393s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/sampsizepwr.m 393s ***** demo 393s ## Compute the mean closest to 100 that can be determined to be 393s ## significantly different from 100 using a t-test with a sample size 393s ## of 60 and a power of 0.8. 393s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 393s disp (mu1); 393s ***** demo 393s ## Compute the sample sizes required to distinguish mu0 = 100 from 393s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 393s ## smaller sample sizes of 1.5 and a power of 0.6. 393s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 393s ***** demo 393s ## Compute the sample size N required to distinguish p=.26 from p=.2 393s ## with a binomial test. The result is approximate, so make a plot to 393s ## see if any smaller N values also have the required power of 0.6. 393s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 393s nn = 1:250; 393s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 393s Nexact = min (nn(pwr >= 0.6)); 393s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 393s grid on 393s ***** demo 393s ## The company must test 52 bottles to detect the difference between a mean 393s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 393s ## to visualize how the sample size affects the power of the test. 393s 393s nout = sampsizepwr('t',[100 5],102,0.80); 393s nn = 1:100; 393s pwrout = sampsizepwr('t',[100 5],102,[],nn); 393s 393s figure; 393s plot (nn, pwrout, "b-", nout, 0.8, "ro") 393s title ("Power versus Sample Size") 393s xlabel ("Sample Size") 393s ylabel ("Power") 393s ***** error ... 393s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("z", 100, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("t", 100, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("t2", 60, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 393s ***** error ... 393s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("var", 0, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("var", -5, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("p", 0, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", -1, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", 0, [], 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 393s ***** error ... 393s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], [], [], 60); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], 110, [], []); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 393s ***** error ... 393s out = sampsizepwr ("var", 5, -1, [], 60); 393s ***** error ... 393s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 393s ***** error ... 393s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 393s ***** error ... 393s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], 110, 1.2); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], 110, 0); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 393s ***** error ... 393s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 393s ***** error ... 393s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 393s ***** error ... 393s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 393s ***** error ... 393s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 393s ***** warning ... 393s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 393s ***** warning ... 393s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 394s ***** test 394s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 394s assert (mu1, 103.67704316, 1e-8); 394s ***** test 394s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 394s assert (N1, 9); 394s assert (N2, 14); 394s ***** test 394s nn = 1:250; 394s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 394s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 394s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 394s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 394s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 394s ***** test 394s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 394s assert (nout, 52); 394s ***** test 394s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 394s assert (power, 0.5797373588621888, 1e-14); 394s ***** test 394s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 394s assert (nout, 18); 394s ***** test 394s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 394s assert (p1out, 25.65317979360237, 1e-14); 395s ***** test 395s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 395s assert (pwr, 0.716504004686586, 1e-14); 395s ***** test 395s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 395s assert (n, 11); 395s ***** test 395s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 395s assert ([n1, n2], [8, 16]); 395s 68 tests, 68 passed, 0 known failure, 0 skipped 395s [inst/optimalleaforder.m] 395s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/optimalleaforder.m 395s ***** demo 395s randn ("seed", 5) # for reproducibility 395s X = randn (10, 2); 395s D = pdist (X); 395s tree = linkage(D, 'average'); 395s optimalleaforder (tree, D, 'Transformation', 'linear') 395s ***** error optimalleaforder () 396s ***** error optimalleaforder (1) 396s ***** error optimalleaforder (ones (2, 2), 1) 396s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 396s ***** error optimalleaforder ([1 2 1], [1 2 3]) 396s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 396s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 396s 7 tests, 7 passed, 0 known failure, 0 skipped 396s [inst/anova2.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/anova2.m 396s ***** demo 396s 396s # Factorial (Crossed) Two-way ANOVA with Interaction 396s 396s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 396s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 396s 396s [p, atab, stats] = anova2(popcorn, 3, "on"); 396s ***** demo 396s 396s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 396s 396s data = [54, 43, 78, 111; 396s 23, 34, 37, 41; 396s 45, 65, 99, 78; 396s 31, 33, 36, 35; 396s 15, 25, 30, 26]; 396s 396s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 396s ***** demo 396s 396s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 396s 396s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 396s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 396s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 396s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 396s 396s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 396s ***** test 396s ## Test for anova2 ("interaction") 396s ## comparison with results from Matlab for column effect 396s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 396s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 396s [p, atab, stats] = anova2 (popcorn, 3, "off"); 396s assert (p(1), 7.678957383294716e-07, 1e-14); 396s assert (p(2), 0.0001003738963050171, 1e-14); 396s assert (p(3), 0.7462153966366274, 1e-14); 396s assert (atab{2,5}, 56.700, 1e-14); 396s assert (atab{2,3}, 2, 0); 396s assert (atab{4,2}, 0.08333333333333348, 1e-14); 396s assert (atab{5,4}, 0.1388888888888889, 1e-14); 396s assert (atab{5,2}, 1.666666666666667, 1e-14); 396s assert (atab{6,2}, 22); 396s assert (stats.source, "anova2"); 396s assert (stats.colmeans, [6.25, 4.75, 4]); 396s assert (stats.inter, 1, 0); 396s assert (stats.pval, 0.7462153966366274, 1e-14); 396s assert (stats.df, 12); 396s ***** test 396s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 396s data = [54, 43, 78, 111; 396s 23, 34, 37, 41; 396s 45, 65, 99, 78; 396s 31, 33, 36, 35; 396s 15, 25, 30, 26]; 396s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 396s assert (atab{2,2}, 2174.95, 1e-10); 396s assert (atab{3,2}, 8371.7, 1e-10); 396s assert (atab{4,2}, 2404.3, 1e-10); 396s assert (atab{5,2}, 12950.95, 1e-10); 396s assert (atab{2,4}, 724.983333333333, 1e-10); 396s assert (atab{3,4}, 2092.925, 1e-10); 396s assert (atab{4,4}, 200.358333333333, 1e-10); 396s assert (atab{2,5}, 3.61843363972882, 1e-10); 396s assert (atab{3,5}, 10.445909412303, 1e-10); 396s assert (atab{2,6}, 0.087266112738617, 1e-10); 396s assert (atab{3,6}, 0.000698397753556, 1e-10); 396s ***** test 396s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 396s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 396s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 396s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 396s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 396s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 396s assert (atab{2,2}, 745.360306290833, 1e-10); 396s assert (atab{3,2}, 278.01854140125, 1e-10); 396s assert (atab{4,2}, 180.180377467501, 1e-10); 396s assert (atab{5,2}, 1203.55922515958, 1e-10); 396s assert (atab{2,4}, 372.680153145417, 1e-10); 396s assert (atab{3,4}, 92.67284713375, 1e-10); 396s assert (atab{4,4}, 10.0100209704167, 1e-10); 396s assert (atab{2,5}, 4.02146005730833, 1e-10); 396s assert (atab{3,5}, 9.25800729165627, 1e-10); 396s assert (atab{2,6}, 0.141597630656771, 1e-10); 396s assert (atab{3,6}, 0.000636643812875719, 1e-10); 396s 3 tests, 3 passed, 0 known failure, 0 skipped 396s [inst/geomean.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/geomean.m 396s ***** test 396s x = [0:10]; 396s y = [x;x+5;x+10]; 396s assert (geomean (x), 0); 396s m = [0 9.462942809849169 14.65658770861967]; 396s assert (geomean (y, 2), m', 4e-14); 396s assert (geomean (y, "all"), 0); 396s y(2,4) = NaN; 396s m(2) = 9.623207231679554; 396s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 396s assert (geomean (y', "omitnan"), m, 4e-14); 396s z = y + 20; 396s assert (geomean (z, "all"), NaN); 396s assert (geomean (z, "all", "includenan"), NaN); 396s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 396s m = [24.79790781765634 NaN 34.85638839503932]; 396s assert (geomean (z'), m, 4e-14); 396s assert (geomean (z', "includenan"), m, 4e-14); 396s m(2) = 30.02181156156319; 396s assert (geomean (z', "omitnan"), m, 4e-14); 396s assert (geomean (z, 2, "omitnan"), m', 4e-14); 396s ***** test 396s x = repmat ([1:20;6:25], [5 2 6 3]); 396s assert (size (geomean (x, [3 2])), [10 1 1 3]); 396s assert (size (geomean (x, [1 2])), [1 1 6 3]); 396s assert (size (geomean (x, [1 2 4])), [1 1 6]); 396s assert (size (geomean (x, [1 4 3])), [1 40]); 396s assert (size (geomean (x, [1 2 3 4])), [1 1]); 396s ***** test 396s x = repmat ([1:20;6:25], [5 2 6 3]); 396s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 396s assert (geomean (x, [3 2]), m, 4e-13); 396s x(2,5,6,3) = NaN; 396s m(2,3) = NaN; 396s assert (geomean (x, [3 2]), m, 4e-13); 396s m(2,3) = 14.3292729579901; 396s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 396s ***** error geomean ("char") 396s ***** error geomean ([1 -1 3]) 396s ***** error ... 396s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 396s ***** error ... 396s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 396s ***** error ... 396s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 396s 8 tests, 8 passed, 0 known failure, 0 skipped 396s [inst/trimmean.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/trimmean.m 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s out = trimmean (x, 10, [1, 2]); 396s assert (out(1,1,1), 10.3889, 1e-4); 396s assert (out(1,1,2), 29.6111, 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s out = trimmean (x, 10, 1); 396s assert (out(:,:,1), [-17.6, 8, 13, 18]); 396s assert (out(:,:,2), [23, 28, 33, 10.6]); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, 1); 396s assert (out(:,:,1), [-23, 8, 13, 18]); 396s assert (out(:,:,2), [23, 28, 33, 3.75]); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s out = trimmean (x, 10, 2); 396s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 396s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, 2); 396s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 396s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s out = trimmean (x, 10, [1, 2, 3]); 396s assert (out, trimmean (x, 10, "all")); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, [1, 2]); 396s assert (out(1,1,1), 10.7647, 1e-4); 396s assert (out(1,1,2), 29.1176, 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, [1, 3]); 396s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, [2, 3]); 396s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, [1, 2, 3]); 396s assert (out, trimmean (x, 10, "all")); 396s ***** test 396s x = reshape (1:40, [5, 4, 2]); 396s x([3, 37]) = -100; 396s x([4, 38]) = NaN; 396s out = trimmean (x, 10, [2, 3, 5]); 396s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 396s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 396s ***** assert (trimmean ([], 10), NaN) 396s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 396s ***** error trimmean (1) 396s ***** error trimmean (1,2,3,4,5) 396s ***** error trimmean ([1 2 3 4], -10) 396s ***** error trimmean ([1 2 3 4], 100) 396s ***** error trimmean ([1 2 3 4], 10, "flag") 396s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 396s ***** error ... 396s trimmean ([1 2 3 4], 10, -1) 396s ***** error ... 396s trimmean ([1 2 3 4], 10, "floor", -1) 396s ***** error ... 396s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 396s ***** error ... 396s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 396s 26 tests, 26 passed, 0 known failure, 0 skipped 396s [inst/glmfit.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/glmfit.m 396s ***** demo 396s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 396s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 396s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 396s b = glmfit (x, [y n], "binomial", "Link", "probit"); 396s yfit = glmval (b, x, "probit", "Size", n); 396s plot (x, y./n, 'o', x, yfit ./ n, '-') 396s ***** demo 396s load fisheriris 396s X = meas (51:end, :); 396s y = strcmp ("versicolor", species(51:end)); 396s b = glmfit (X, y, "binomial", "link", "logit") 396s ***** test 396s load fisheriris; 396s X = meas(51:end,:); 396s y = strcmp ("versicolor", species(51:end)); 396s b = glmfit (X, y, "binomial", "link", "logit"); 396s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 396s ***** test 396s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 396s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 396s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 396s b_matlab = [-0.7631; 0.1113]; 396s dev_matlab = 0.0111; 396s assert (Bnew, b_matlab, 0.001); 396s assert (dev, dev_matlab, 0.001); 396s ***** test 396s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 396s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 396s p_input = 1; 396s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 396s b_matlab = [0.3813; 0.0950]; 396s dev_matlab = 0.0051; 396s assert (Bnew, b_matlab, 0.001); 396s assert (dev, dev_matlab, 0.001); 396s ***** error glmfit () 396s ***** error glmfit (1) 396s ***** error glmfit (1, 2) 396s ***** error ... 396s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 396s ***** error ... 396s glmfit ('abc', rand (6, 1), 'poisson') 396s ***** error ... 396s glmfit ([], rand (6, 1), 'poisson') 396s ***** error ... 396s glmfit (rand (5, 2), 'abc', 'poisson') 396s ***** error ... 396s glmfit (rand (5, 2), [], 'poisson') 396s ***** error ... 396s glmfit (rand (5, 2), rand (6, 1), 'poisson') 396s ***** error ... 396s glmfit (rand (6, 2), rand (6, 1), 3) 396s ***** error ... 396s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 3), 'binomial') 396s ***** error ... 396s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 2), 'normal') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 396s ***** error ... 396s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 396s ***** error ... 396s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 396s 70 tests, 70 passed, 0 known failure, 0 skipped 396s [inst/tiedrank.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/tiedrank.m 396s ***** test 396s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 396s assert (r, [1, 2.5, 4, 5, 2.5]); 396s assert (tieadj, 3); 396s ***** test 396s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 396s assert (r, [1; 2.5; 4; 5; 2.5]); 396s assert (tieadj, 3); 396s ***** test 396s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 396s assert (r, [1, 2.5, 4, 5, 2.5]); 396s assert (tieadj, [1; 0; 18]); 396s ***** test 396s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 396s assert (r, [1, 2.5, 2, 1, 2.5]); 396s assert (tieadj, 3); 396s ***** test 396s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 396s assert (r, [1, 2.5, 2, 1, 2.5]); 396s assert (tieadj, [1; 0; 18]); 396s ***** error tiedrank (ones (2)) 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], "A") 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], [true, true]) 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], 0, "A") 396s ***** error ... 396s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 396s 12 tests, 12 passed, 0 known failure, 0 skipped 396s [inst/adtest.m] 396s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/adtest.m 396s ***** error adtest (); 396s ***** error adtest (ones (20,2)); 396s ***** error adtest ([1+i,0-3i]); 396s ***** error ... 396s adtest (ones (20,1), "Distribution", "normal"); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"norm", 5}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"ev", 5}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", 35); 396s ***** error ... 396s adtest (rand (20,1), "Name", "norm"); 396s ***** error ... 396s adtest (rand (20,1), "Name", {"norm", 75, 10}); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 396s ***** error ... 396s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 396s ***** error ... 396s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 396s "Asymptotic", true); 396s ***** error ... 396s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 396s "Alpha", 0.000000001); 396s ***** error ... 396s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 396s "Alpha", 0.999999999); 396s ***** error ... 396s adtest (10); 396s ***** warning ... 396s randn ("seed", 34); 396s adtest (ones (20,1), "Alpha", 0.000001); 396s ***** warning ... 396s randn ("seed", 34); 396s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 396s ***** warning ... 396s randn ("seed", 34); 396s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 396s ***** test 396s load examgrades 396s x = grades(:,1); 396s [h, pval, adstat, cv] = adtest (x); 396s assert (h, false); 396s assert (pval, 0.1854, 1e-4); 396s assert (adstat, 0.5194, 1e-4); 396s assert (cv, 0.7470, 1e-4); 396s ***** test 396s load examgrades 396s x = grades(:,1); 396s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 396s assert (h, false); 396s assert (pval, 0.071363, 1e-6); 396s ***** test 396s load examgrades 396s x = grades(:,1); 396s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 396s assert (h, false); 396s assert (pval, 0.4687, 1e-4); 397s 25 tests, 25 passed, 0 known failure, 0 skipped 397s [inst/ecdf.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ecdf.m 397s ***** demo 397s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 397s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 397s t = min (y, d); ## we observe the minimum of these times 397s censored = (y > d); ## we also observe whether the subject failed 397s 397s ## Calculate and plot the empirical cdf and confidence bounds 397s [f, x, flo, fup] = ecdf (t, "censoring", censored); 397s stairs (x, f); 397s hold on; 397s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 397s 397s ## Superimpose a plot of the known true cdf 397s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 397s hold off; 397s ***** demo 397s R = wblrnd (100, 2, 100, 1); 397s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 397s hold on 397s x = 1:1:250; 397s wblsurv = 1 - cdf ("weibull", x, 100, 2); 397s plot (x, wblsurv, "g-", "LineWidth", 2) 397s legend ("Empirical survivor function", "Lower confidence bound", ... 397s "Upper confidence bound", "Weibull survivor function", ... 397s "Location", "northeast"); 397s hold off 397s ***** error ecdf (); 397s ***** error ecdf (randi (15,2)); 397s ***** error ecdf ([3,2,4,3+2i,5]); 397s ***** error kstest ([2,3,4,5,6],"tail"); 397s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 397s ***** error kstest ([2,3,4,5,6],"function", ""); 397s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 397s ***** error kstest ([2,3,4,5,6],"tail", 0); 397s ***** error kstest ([2,3,4,5,6],"alpha", 0); 397s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 397s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 397s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 397s ***** test 397s hf = figure ("visible", "off"); 397s unwind_protect 397s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 397s [F, x, Flo, Fup] = ecdf (x); 397s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 397s assert (F, F_out, ones (10,1) * 1e-4); 397s x_out = [0 0 2 3 4 5 6 7 8 9]'; 397s assert (x, x_out); 397s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 397s assert (Flo, Flo_out, ones (10,1) * 1e-4); 397s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 397s assert (Fup, Fup_out, ones (10,1) * 1e-4); 397s unwind_protect_cleanup 397s close (hf); 397s end_unwind_protect 397s warning: using the gnuplot graphics toolkit is discouraged 397s 397s The gnuplot graphics toolkit is not actively maintained and has a number 397s of limitations that are unlikely to be fixed. Communication with gnuplot 397s uses a one-directional pipe and limited information is passed back to the 397s Octave interpreter so most changes made interactively in the plot window 397s will not be reflected in the graphics properties managed by Octave. For 397s example, if the plot window is closed with a mouse click, Octave will not 397s be notified and will not update its internal list of open figure windows. 397s The qt toolkit is recommended instead. 397s ***** test 397s hf = figure ("visible", "off"); 397s unwind_protect 397s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 397s ecdf (x); 397s unwind_protect_cleanup 397s close (hf); 397s end_unwind_protect 397s 14 tests, 14 passed, 0 known failure, 0 skipped 397s [inst/princomp.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/princomp.m 397s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 397s ***** test 397s x=[7 4 3 397s 4 1 8 397s 6 3 5 397s 8 6 1 397s 8 5 7 397s 7 2 9 397s 5 3 3 397s 9 5 8 397s 7 4 5 397s 8 2 2]; 397s R = corrcoef (x); 397s [V, lambda] = eig (R); 397s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 397s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 397s ## contribution of first 2 PCs to each original variable 397s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 397s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 397s F = zscore(x)*B; 397s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 397s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 397s ***** test 397s x=[1,2,3;2,1,3]'; 397s [COEFF,SCORE,latent,tsquare] = princomp(x); 397s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 397s m(:,1) = m(:,1)*sign(COEFF(1,1)); 397s m(:,2) = m(:,2)*sign(COEFF(1,2)); 397s ***** assert(COEFF,m(1:2,:),10*eps); 397s ***** assert(SCORE,-m,10*eps); 397s ***** assert(latent,[1.5;.5],10*eps); 397s ***** assert(tsquare,[4;4;4]/3,10*eps); 397s ***** test 397s x=x'; 397s [COEFF,SCORE,latent,tsquare] = princomp(x); 397s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 397s m(:,1) = m(:,1)*sign(COEFF(1,1)); 397s m(:,2) = m(:,2)*sign(COEFF(1,2)); 397s m(:,3) = m(:,3)*sign(COEFF(3,3)); 397s ***** assert(COEFF,m,10*eps); 397s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 397s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 397s ***** assert(latent,[1;0;0],10*eps); 397s ***** assert(tsquare,[0.5;0.5],10*eps) 397s ***** test 397s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 397s ***** assert(COEFF,m(:, 1),10*eps); 397s ***** assert(SCORE,-m(1:2,1),10*eps); 397s ***** assert(latent,[1],10*eps); 397s ***** assert(tsquare,[0.5;0.5],10*eps) 397s 19 tests, 19 passed, 0 known failure, 0 skipped 397s [inst/mcnemar_test.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/mcnemar_test.m 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 397s assert (h, 1); 397s assert (pval, 3.8151e-06, 1e-10); 397s assert (chisq, 21.356, 1e-3); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 397s assert (h, 1); 397s assert (pval, 0.034690, 1e-6); 397s assert (isempty (chisq), true); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 397s assert (h, 0); 397s assert (pval, 0.034690, 1e-6); 397s assert (isempty (chisq), true); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 397s assert (h, 1); 397s assert (pval, 0.034690, 1e-6); 397s assert (isempty (chisq), true); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 397s assert (h, 1); 397s assert (pval, 0.033006, 1e-6); 397s assert (chisq, 4.5455, 1e-4); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 397s assert (h, 0); 397s assert (pval, 0.052479, 1e-6); 397s assert (isempty (chisq), true); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 397s assert (h, 0); 397s assert (pval, 0.055009, 1e-6); 397s assert (chisq, 3.6818, 1e-4); 397s ***** test 397s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 397s assert (h, 1); 397s assert (pval, 0.055009, 1e-6); 397s assert (chisq, 3.6818, 1e-4); 397s ***** error mcnemar_test (59, 6, 16, 80) 397s ***** error mcnemar_test (ones (3, 3)) 397s ***** error ... 397s mcnemar_test ([59,6;16,-80]) 397s ***** error ... 397s mcnemar_test ([59,6;16,4.5]) 397s ***** error ... 397s mcnemar_test ([59,6;16,80], {""}) 397s ***** error ... 397s mcnemar_test ([59,6;16,80], -0.2) 397s ***** error ... 397s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 397s ***** error ... 397s mcnemar_test ([59,6;16,80], 1) 397s ***** error ... 397s mcnemar_test ([59,6;16,80], "") 397s 17 tests, 17 passed, 0 known failure, 0 skipped 397s [inst/fitgmdist.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitgmdist.m 397s ***** demo 397s ## Generate a two-cluster problem 397s C1 = randn (100, 2) + 2; 397s C2 = randn (100, 2) - 2; 397s data = [C1; C2]; 397s 397s ## Perform clustering 397s GMModel = fitgmdist (data, 2); 397s 397s ## Plot the result 397s figure 397s [heights, bins] = hist3([C1; C2]); 397s [xx, yy] = meshgrid(bins{1}, bins{2}); 397s bbins = [xx(:), yy(:)]; 397s contour (reshape (GMModel.pdf (bbins), size (heights))); 397s ***** demo 397s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 397s nbOrientations = 2; 397s initial_orientations = [38.0; 18.0]; 397s initial_weights = ones (1, nbOrientations) / nbOrientations; 397s initial_Sigma = 10 * ones (1, 1, nbOrientations); 397s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 397s "ComponentProportion", initial_weights); 397s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 397s "RegularizationValue", 0.0001) 397s ***** test 397s load fisheriris 397s classes = unique (species); 397s [~, score] = pca (meas, "NumComponents", 2); 397s options.MaxIter = 1000; 397s options.TolFun = 1e-6; 397s options.Display = "off"; 397s GMModel = fitgmdist (score, 2, "Options", options); 397s assert (isa (GMModel, "gmdistribution"), true); 397s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 397s 1 test, 1 passed, 0 known failure, 0 skipped 397s [inst/crossval.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/crossval.m 397s ***** test 397s load fisheriris 397s y = meas(:, 1); 397s X = [ones(size(y)) meas(:, 2:4)]; 397s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 397s results0 = crossval (f, X, y); 397s results1 = crossval (f, X, y, 'KFold', 10); 397s folds = 5; 397s results2 = crossval (f, X, y, 'KFold', folds); 397s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 397s results4 = crossval (f, X, y, 'LeaveOut', 1); 397s mcreps = 2; n_holdout = 20; 397s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 397s 397s ## ensure equal representation of iris species in the training set -- tends 397s ## to slightly reduce cross-validation mean square error 397s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 397s 397s assert (results0, results1, 2e-15); 397s assert (results2, results3, 5e-17); 397s assert (size(results4), [1 numel(y)]); 397s assert (mean(results4), 0.1018, 1e-4); 397s assert (size(results5), [mcreps 1]); 397s warning: strmatch is obsolete; use strncmp or strcmp instead 397s 1 test, 1 passed, 0 known failure, 0 skipped 397s [inst/hmmgenerate.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hmmgenerate.m 397s ***** test 397s len = 25; 397s transprob = [0.8, 0.2; 0.4, 0.6]; 397s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 397s [sequence, states] = hmmgenerate (len, transprob, outprob); 397s assert (length (sequence), len); 397s assert (length (states), len); 397s assert (min (sequence) >= 1); 397s assert (max (sequence) <= columns (outprob)); 397s assert (min (states) >= 1); 397s assert (max (states) <= rows (transprob)); 397s ***** test 397s len = 25; 397s transprob = [0.8, 0.2; 0.4, 0.6]; 397s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 397s symbols = {"A", "B", "C"}; 397s statenames = {"One", "Two"}; 397s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 397s "symbols", symbols, "statenames", statenames); 397s assert (length (sequence), len); 397s assert (length (states), len); 397s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 397s strcmp (sequence, "C") == ones (1, len)); 397s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 397s 2 tests, 2 passed, 0 known failure, 0 skipped 397s [inst/cl_multinom.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cl_multinom.m 397s ***** demo 397s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 397s ***** error cl_multinom (); 397s ***** error cl_multinom (1, 2, 3, 4, 5); 397s ***** error ... 397s cl_multinom (1, 2, 3, 4); 397s ***** error ... 397s cl_multinom (1, 2, 3, "some string"); 397s 4 tests, 4 passed, 0 known failure, 0 skipped 397s [inst/fitlm.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitlm.m 397s ***** demo 397s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 397s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 397s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 397s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 397s 25.694 ]'; 397s 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]'; 397s 397s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 397s ***** demo 397s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 397s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 397s brands = {'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'}; 397s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 397s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 397s 397s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 397s "CategoricalVars",[1,2],"display","on"); 397s ***** test 397s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 397s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 397s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 397s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 397s 25.694 ]'; 397s 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]'; 397s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 397s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 397s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 397s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 397s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 397s assert (TAB{2,2}, 10, 1e-04); 397s assert (TAB{3,2}, 7.99999999999999, 1e-09); 397s assert (TAB{4,2}, 8.99999999999999, 1e-09); 397s assert (TAB{5,2}, 11.0001428571429, 1e-09); 397s assert (TAB{6,2}, 19.0001111111111, 1e-09); 397s assert (TAB{2,3}, 1.01775379540949, 1e-09); 397s assert (TAB{3,3}, 1.64107868458008, 1e-09); 397s assert (TAB{4,3}, 1.43932122062479, 1e-09); 397s assert (TAB{5,3}, 1.48983900477565, 1e-09); 397s assert (TAB{6,3}, 1.3987687997822, 1e-09); 397s assert (TAB{2,6}, 9.82555903510687, 1e-09); 397s assert (TAB{3,6}, 4.87484242844031, 1e-09); 397s assert (TAB{4,6}, 6.25294748040552, 1e-09); 397s assert (TAB{5,6}, 7.38344399756088, 1e-09); 397s assert (TAB{6,6}, 13.5834536158296, 1e-09); 397s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 397s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 397s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 397s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 397s ***** test 397s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 397s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 397s brands = bsxfun (@times, ones(6,1), [1,2,3]); 397s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 397s 397s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 397s "categoricalvars",[1,2],"display","off"); 397s assert (TAB{2,2}, 5.66666666666667, 1e-09); 397s assert (TAB{3,2}, -1.33333333333333, 1e-09); 397s assert (TAB{4,2}, -2.16666666666667, 1e-09); 397s assert (TAB{5,2}, 1.16666666666667, 1e-09); 397s assert (TAB{6,2}, -0.333333333333334, 1e-09); 397s assert (TAB{7,2}, -0.166666666666667, 1e-09); 397s assert (TAB{2,3}, 0.215165741455965, 1e-09); 397s assert (TAB{3,3}, 0.304290309725089, 1e-09); 397s assert (TAB{4,3}, 0.304290309725089, 1e-09); 397s assert (TAB{5,3}, 0.304290309725089, 1e-09); 397s assert (TAB{6,3}, 0.43033148291193, 1e-09); 397s assert (TAB{7,3}, 0.43033148291193, 1e-09); 397s assert (TAB{2,6}, 26.3362867542108, 1e-09); 397s assert (TAB{3,6}, -4.38178046004138, 1e-09); 397s assert (TAB{4,6}, -7.12039324756724, 1e-09); 397s assert (TAB{5,6}, 3.83405790253621, 1e-09); 397s assert (TAB{6,6}, -0.774596669241495, 1e-09); 397s assert (TAB{7,6}, -0.387298334620748, 1e-09); 397s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 397s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 397s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 397s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 397s assert (TAB{6,7}, 0.453570536021938, 1e-09); 397s assert (TAB{7,7}, 0.705316781644046, 1e-09); 397s ## Test with string ids for categorical variables 397s brands = {'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'; ... 397s 'Gourmet', 'National', 'Generic'}; 397s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 397s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 397s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 397s "categoricalvars",[1,2],"display","off"); 397s ***** test 397s load carsmall 397s X = [Weight,Horsepower,Acceleration]; 397s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 397s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 397s assert (TAB{2,2}, 47.9767628118615, 1e-09); 397s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 397s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 397s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 397s assert (TAB{2,3}, 3.87851641748551, 1e-09); 397s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 397s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 397s assert (TAB{5,3}, 0.193325043113178, 1e-09); 397s assert (TAB{2,6}, 12.369874881944, 1e-09); 397s assert (TAB{3,6}, -5.80228828790225, 1e-09); 397s assert (TAB{4,6}, -1.76626492228599, 1e-09); 397s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 397s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 397s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 397s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 397s assert (TAB{5,7}, 0.952359384151778, 1e-09); 397s 3 tests, 3 passed, 0 known failure, 0 skipped 397s [inst/confusionmat.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/confusionmat.m 397s ***** test 397s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 397s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 397s 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; ... 397s 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]; 397s assert (confusionmat (Yt, Yp), C) 397s 1 test, 1 passed, 0 known failure, 0 skipped 397s [inst/friedman.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/friedman.m 397s ***** demo 397s load popcorn; 397s friedman (popcorn, 3); 397s ***** demo 397s load popcorn; 397s [p, atab] = friedman (popcorn, 3, "off"); 397s disp (p); 397s ***** test 397s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 397s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 397s [p, atab] = friedman (popcorn, 3, "off"); 397s assert (p, 0.001028853354594794, 1e-14); 397s assert (atab{2,2}, 99.75, 1e-14); 397s assert (atab{2,3}, 2, 0); 397s assert (atab{2,4}, 49.875, 1e-14); 397s assert (atab{2,5}, 13.75862068965517, 1e-14); 397s assert (atab{2,6}, 0.001028853354594794, 1e-14); 397s assert (atab{3,2}, 0.08333333333333215, 1e-14); 397s assert (atab{3,4}, 0.04166666666666607, 1e-14); 397s assert (atab{4,3}, 12, 0); 397s ***** test 397s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 397s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 397s [p, atab, stats] = friedman (popcorn, 3, "off"); 397s assert (atab{5,2}, 116, 0); 397s assert (atab{5,3}, 17, 0); 397s assert (stats.source, "friedman"); 397s assert (stats.n, 2); 397s assert (stats.meanranks, [8, 4.75, 2.25], 0); 397s assert (stats.sigma, 2.692582403567252, 1e-14); 397s 2 tests, 2 passed, 0 known failure, 0 skipped 397s [inst/Classification/ClassificationKNN.m] 397s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationKNN.m 397s ***** demo 397s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 397s ## Evaluate some model predictions on new data. 397s 397s load fisheriris 397s x = meas; 397s y = species; 397s xc = [min(x); mean(x); max(x)]; 397s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 397s [label, score, cost] = predict (obj, xc) 397s ***** demo 397s load fisheriris 397s x = meas; 397s y = species; 397s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 397s 397s ## Create a cross-validated model 397s CVMdl = crossval (obj) 397s ***** demo 397s load fisheriris 397s x = meas; 397s y = species; 397s covMatrix = cov (x); 397s 397s ## Fit the k-NN model using the 'mahalanobis' distance 397s ## and the custom covariance matrix 397s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 397s 'Cov', covMatrix); 397s 397s ## Create a partition model using cvpartition 397s Partition = cvpartition (size (x, 1), 'kfold', 12); 397s 397s ## Create cross-validated model using 'cvPartition' name-value argument 397s CVMdl = crossval (obj, 'cvPartition', Partition) 397s 397s ## Access the trained model from first fold of cross-validation 397s CVMdl.Trained{1} 397s ***** demo 397s X = [1, 2; 3, 4; 5, 6]; 397s Y = {'A'; 'B'; 'A'}; 397s model = fitcknn (X, Y); 397s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 397s ## Calculate loss using custom loss function 397s L = loss (model, X, Y, 'LossFun', customLossFun) 397s ***** demo 397s X = [1, 2; 3, 4; 5, 6]; 397s Y = {'A'; 'B'; 'A'}; 397s model = fitcknn (X, Y); 397s ## Calculate loss using 'mincost' loss function 397s L = loss (model, X, Y, 'LossFun', 'mincost') 397s ***** demo 397s X = [1, 2; 3, 4; 5, 6]; 397s Y = ['1'; '2'; '3']; 397s model = fitcknn (X, Y); 397s X_test = [3, 3; 5, 7]; 397s Y_test = ['1'; '2']; 397s ## Specify custom Weights 397s W = [1; 2]; 397s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 397s ***** demo 397s load fisheriris 397s mdl = fitcknn (meas, species); 397s X = mean (meas); 397s Y = {'versicolor'}; 397s m = margin (mdl, X, Y) 397s ***** demo 397s X = [1, 2; 4, 5; 7, 8; 3, 2]; 397s Y = [2; 1; 3; 2]; 397s ## Train the model 397s mdl = fitcknn (X, Y); 397s ## Specify Vars and Labels 397s Vars = 1; 397s Labels = 2; 397s ## Calculate partialDependence 397s [pd, x, y] = partialDependence (mdl, Vars, Labels); 397s ***** demo 397s X = [1, 2; 4, 5; 7, 8; 3, 2]; 397s Y = [2; 1; 3; 2]; 397s ## Train the model 397s mdl = fitcknn (X, Y); 397s ## Specify Vars and Labels 397s Vars = 1; 397s Labels = 1; 397s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 397s ## Calculate partialDependence using queryPoints 397s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 397s queryPoints) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s k = 10; 397s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = ones (4, 11); 397s y = ["a"; "a"; "b"; "b"]; 397s k = 10; 397s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s k = 10; 397s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s k = 10; 397s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s weights = ones (4,1); 397s a = ClassificationKNN (x, y, "Standardize", 1); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.Standardize}, {true}) 397s assert ({a.Sigma}, {std(x, [], 1)}) 397s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s weights = ones (4,1); 397s a = ClassificationKNN (x, y, "Standardize", false); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.Standardize}, {false}) 397s assert ({a.Sigma}, {[]}) 397s assert ({a.Mu}, {[]}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s s = ones (1, 3); 397s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.DistParameter}, {s}) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 397s assert (class (a), "ClassificationKNN"); 397s assert (a.DistParameter, 5) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 397s "NSMethod", "exhaustive"); 397s assert (class (a), "ClassificationKNN"); 397s assert (a.DistParameter, 5) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 397s assert (class (a), "ClassificationKNN"); 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 397s assert ({a.BucketSize}, {20}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y, "IncludeTies", true); 397s assert (class (a), "ClassificationKNN"); 397s assert (a.IncludeTies, true); 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y); 397s assert (class (a), "ClassificationKNN"); 397s assert (a.IncludeTies, false); 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s a = ClassificationKNN (x, y); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Prior, [0.5; 0.5]) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s prior = [0.5; 0.5]; 397s a = ClassificationKNN (x, y, "Prior", "empirical"); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Prior, prior) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "a"; "b"]; 397s prior = [0.75; 0.25]; 397s a = ClassificationKNN (x, y, "Prior", "empirical"); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Prior, prior) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "a"; "b"]; 397s prior = [0.5; 0.5]; 397s a = ClassificationKNN (x, y, "Prior", "uniform"); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Prior, prior) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s cost = eye (2); 397s a = ClassificationKNN (x, y, "Cost", cost); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Cost, [1, 0; 0, 1]) 397s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 397s y = ["a"; "a"; "b"; "b"]; 397s cost = eye (2); 397s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 397s assert (class (a), "ClassificationKNN") 397s assert (a.Cost, [1, 0; 0, 1]) 397s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 397s assert ({a.BucketSize}, {50}) 397s ***** test 397s x = [1, 2; 3, 4; 5,6; 5, 8]; 397s y = {'9'; '9'; '6'; '7'}; 397s a = ClassificationKNN (x, y); 397s assert (a.Prior, [0.5; 0.25; 0.25]) 397s ***** test 397s load fisheriris 397s x = meas; 397s y = species; 397s ClassNames = {'setosa', 'versicolor', 'virginica'}; 397s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 397s assert (a.ClassNames, ClassNames') 397s ***** error ClassificationKNN () 397s ***** error ... 397s ClassificationKNN (ones(4, 1)) 397s ***** error ... 397s ClassificationKNN (ones (4,2), ones (1,4)) 397s ***** error ... 397s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 397s ***** error ... 397s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 397s ***** error ... 397s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 397s ***** error ... 397s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 397s ***** error ... 397s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 397s ***** error ... 397s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 397s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 397s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 397s ***** error ... 397s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 397s ***** error ... 397s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 397s ***** error ... 397s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 398s ***** error ... 398s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 398s ***** shared x, y 398s load fisheriris 398s x = meas; 398s y = species; 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 5); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"; "versicolor"; "virginica"}) 398s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 398s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"; "versicolor"; "virginica"}) 398s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 398s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 398s [l, s, c] = predict (obj, xc); 398s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 398s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"; "versicolor"; "virginica"}) 398s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 398s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 398s ***** test 398s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 398s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 398s obj = fitcknn (x, y, "NumNeighbors", 5); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 398s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 398s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 5); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 0.6, 0.4], 1e-4) 398s assert (c, [1, 0.4, 0.6], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 0.5, 0.5], 1e-4) 398s assert (c, [1, 0.5, 0.5], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"}) 398s assert (s, [0.9, 0.1, 0], 1e-4) 398s assert (c, [0.1, 0.9, 1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 398s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"}) 398s assert (s, [0.8, 0.2, 0], 1e-4) 398s assert (c, [0.2, 0.8, 1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 1, 0], 1e-4) 398s assert (c, [1, 0, 1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 0.7, 0.3], 1e-4) 398s assert (c, [1, 0.3, 0.7], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 0.6, 0.4], 1e-4) 398s assert (c, [1, 0.4, 0.6], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"virginica"}) 398s assert (s, [0, 0.1, 0.9], 1e-4) 398s assert (c, [1, 0.9, 0.1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"virginica"}) 398s assert (s, [0, 0.1, 0.9], 1e-4) 398s assert (c, [1, 0.9, 0.1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"versicolor"}) 398s assert (s, [0, 1, 0], 1e-4) 398s assert (c, [1, 0, 1], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"}) 398s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 398s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 398s ***** test 398s xc = [5, 3, 5, 1.45]; 398s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"}) 398s assert (s, [0.8, 0.2, 0], 1e-4) 398s assert (c, [0.2, 0.8, 1], 1e-4) 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa"; "versicolor"; "virginica"}) 398s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 398s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 398s ***** test 398s xc = [min(x); mean(x); max(x)]; 398s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 398s [l, s, c] = predict (obj, xc); 398s assert (l, {"setosa";"setosa";"setosa"}) 398s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 398s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 398s ***** error ... 398s predict (ClassificationKNN (ones (4,2), ones (4,1))) 398s ***** error ... 398s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 398s ***** error ... 398s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 398s ***** test 398s load fisheriris 398s model = fitcknn (meas, species, 'NumNeighbors', 5); 398s X = mean (meas); 398s Y = {'versicolor'}; 398s L = loss (model, X, Y); 398s assert (L, 0) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = {'A'; 'B'; 'A'}; 398s model = fitcknn (X, Y); 398s X_test = [1, 6; 3, 3]; 398s Y_test = {'A'; 'B'}; 398s L = loss (model, X_test, Y_test); 398s assert (abs (L - 0.6667) > 1e-5) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = {'A'; 'B'; 'A'}; 398s model = fitcknn (X, Y); 398s X_with_nan = [1, 2; NaN, 4]; 398s Y_test = {'A'; 'B'}; 398s L = loss (model, X_with_nan, Y_test); 398s assert (abs (L - 0.3333) < 1e-4) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = {'A'; 'B'; 'A'}; 398s model = fitcknn (X, Y); 398s X_with_nan = [1, 2; NaN, 4]; 398s Y_test = {'A'; 'B'}; 398s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 398s assert (isnan (L)) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = {'A'; 'B'; 'A'}; 398s model = fitcknn (X, Y); 398s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 398s L = loss (model, X, Y, 'LossFun', customLossFun); 398s assert (L, 0) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = [1; 2; 1]; 398s model = fitcknn (X, Y); 398s L = loss (model, X, Y, 'LossFun', 'classiferror'); 398s assert (L, 0) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = [true; false; true]; 398s model = fitcknn (X, Y); 398s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 398s assert (abs (L - 0.1269) < 1e-4) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = ['1'; '2'; '1']; 398s model = fitcknn (X, Y); 398s L = loss (model, X, Y, 'LossFun', 'classiferror'); 398s assert (L, 0) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = ['1'; '2'; '3']; 398s model = fitcknn (X, Y); 398s X_test = [3, 3]; 398s Y_test = ['1']; 398s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 398s assert (L, 1) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = ['1'; '2'; '3']; 398s model = fitcknn (X, Y); 398s X_test = [3, 3; 5, 7]; 398s Y_test = ['1'; '2']; 398s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 398s assert (L, 1) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = ['1'; '2'; '3']; 398s model = fitcknn (X, Y); 398s X_test = [3, 3; 5, 7]; 398s Y_test = ['1'; '2']; 398s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 398s assert (L, 1) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = ['1'; '2'; '3']; 398s model = fitcknn (X, Y); 398s X_test = [3, 3; 5, 7]; 398s Y_test = ['1'; '2']; 398s W = [1; 2]; 398s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 398s assert (abs (L - 0.6931) < 1e-4) 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1))) 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 398s ***** error ... 398s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 398s ***** error ... 398s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 398s ones (4,1), 'LossFun') 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 398s ones (4,1), 'LossFun', 'a') 398s ***** error ... 398s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 398s ones (4,1), 'Weights', 'w') 398s ***** test 398s load fisheriris 398s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 398s X = mean (meas); 398s Y = {'versicolor'}; 398s m = margin (mdl, X, Y); 398s assert (m, 1) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = [1; 2; 3]; 398s mdl = fitcknn (X, Y); 398s m = margin (mdl, X, Y); 398s assert (m, [1; 1; 1]) 398s ***** test 398s X = [7, 8; 9, 10]; 398s Y = ['1'; '2']; 398s mdl = fitcknn (X, Y); 398s m = margin (mdl, X, Y); 398s assert (m, [1; 1]) 398s ***** test 398s X = [11, 12]; 398s Y = {'1'}; 398s mdl = fitcknn (X, Y); 398s m = margin (mdl, X, Y); 398s assert (isnan (m)) 398s ***** test 398s X = [1, 2; 3, 4; 5, 6]; 398s Y = [1; 2; 3]; 398s mdl = fitcknn (X, Y); 398s X1 = [15, 16]; 398s Y1 = [1]; 398s m = margin (mdl, X1, Y1); 398s assert (m, -1) 398s ***** error ... 398s margin (ClassificationKNN (ones (4,2), ones (4,1))) 398s ***** error ... 398s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 398s ***** error ... 398s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 398s ***** error ... 398s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 398s ***** error ... 398s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 398s ***** shared X, Y, mdl 398s X = [1, 2; 4, 5; 7, 8; 3, 2]; 398s Y = [2; 1; 3; 2]; 398s mdl = fitcknn (X, Y); 398s ***** test 398s Vars = 1; 398s Labels = 2; 398s [pd, x, y] = partialDependence (mdl, Vars, Labels); 398s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000]; 398s assert (pd, pdm) 398s ***** test 398s Vars = 1; 398s Labels = 2; 398s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 398s 'NumObservationsToSample', 5); 398s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 398s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 398s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 398s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 398s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 398s assert (abs (pdm - pd) < 1) 398s ***** test 398s Vars = 1; 398s Labels = 2; 398s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 398s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 398s 0.5000, 0.5000]; 398s assert (pd, pdm) 399s ***** test 399s Vars = [1, 2]; 399s Labels = 1; 399s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 399s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 399s queryPoints, 'UseParallel', true); 399s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 399s assert (pd, pdm) 399s ***** test 399s Vars = 1; 399s Labels = [1; 2]; 399s [pd, x, y] = partialDependence (mdl, Vars, Labels); 399s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 399s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 399s 0.5000, 0.5000, 0.5000]; 399s assert (pd, pdm) 399s ***** test 399s Vars = [1, 2]; 399s Labels = [1; 2]; 399s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 399s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 399s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 399s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 399s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 399s assert (pd, pdm) 399s ***** test 399s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 399s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 399s X = [X1, double(X2)]; 399s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 399s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 399s Vars = 1; 399s Labels = 1; 399s [pd, x, y] = partialDependence (mdl, Vars, Labels); 399s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 399s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 399s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 399s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 399s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 399s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 399s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 399s 0.7500, 0.7500, 0.7500]; 399s assert (pd, pdm) 399s ***** test 399s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 399s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 399s X = [X1, double(X2)]; 399s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 399s predictorNames = {'Feature1', 'Feature2'}; 399s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 399s Vars = 'Feature1'; 399s Labels = 1; 399s [pd, x, y] = partialDependence (mdl, Vars, Labels); 399s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 399s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 399s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 399s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 399s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 399s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 399s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 399s 0.7500, 0.7500, 0.7500]; 399s assert (pd, pdm) 400s ***** test 400s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 400s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 400s X = [X1, double(X2)]; 400s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 400s predictorNames = {'Feature1', 'Feature2'}; 400s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 400s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 400s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 400s new_X = [new_X1, double(new_X2)]; 400s Vars = 'Feature1'; 400s Labels = 1; 400s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 400s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 400s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 400s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 400s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 400s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 400s 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]; 400s assert (pd, pdm) 400s ***** error ... 400s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 400s ***** error ... 400s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 400s ***** error ... 400s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 400s ones (4,1), 'NumObservationsToSample') 400s ***** error ... 400s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 400s ones (4,1), 2) 400s ***** shared x, y, obj 400s load fisheriris 400s x = meas; 400s y = species; 400s covMatrix = cov (x); 400s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 400s 'mahalanobis', 'Cov', covMatrix); 400s ***** test 400s CVMdl = crossval (obj); 400s assert (class (CVMdl), "ClassificationPartitionedModel") 400s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 400s assert (CVMdl.KFold == 10) 400s assert (CVMdl.ModelParameters.NumNeighbors == 5) 400s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 400s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 400s assert (!CVMdl.ModelParameters.Standardize) 400s ***** test 400s CVMdl = crossval (obj, "KFold", 5); 400s assert (class (CVMdl), "ClassificationPartitionedModel") 400s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 400s assert (CVMdl.KFold == 5) 400s assert (CVMdl.ModelParameters.NumNeighbors == 5) 400s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 400s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 400s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 400s ***** test 400s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 400s CVMdl = crossval (obj, "HoldOut", 0.2); 400s assert (class (CVMdl), "ClassificationPartitionedModel") 400s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 400s assert (CVMdl.ModelParameters.NumNeighbors == 5) 400s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 400s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 400s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 400s ***** test 400s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 400s CVMdl = crossval (obj, "LeaveOut", 'on'); 400s assert (class (CVMdl), "ClassificationPartitionedModel") 400s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 400s assert (CVMdl.ModelParameters.NumNeighbors == 10) 400s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 400s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 400s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 400s ***** test 400s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 400s partition = cvpartition (y, 'KFold', 3); 400s CVMdl = crossval (obj, 'cvPartition', partition); 400s assert (class (CVMdl), "ClassificationPartitionedModel") 400s assert (CVMdl.KFold == 3) 400s assert (CVMdl.ModelParameters.NumNeighbors == 10) 400s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 400s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 400s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 400s ***** error ... 400s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 401s ***** error... 401s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 401s ***** error ... 401s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 401s ***** error ... 401s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 401s ***** error ... 401s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 401s ***** error ... 401s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 401s 162 tests, 162 passed, 0 known failure, 0 skipped 401s [inst/Classification/ClassificationSVM.m] 401s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationSVM.m 401s ***** demo 401s ## Create a Support Vector Machine classifier and determine margin for test 401s ## data. 401s load fisheriris 401s rng(1); ## For reproducibility 401s 401s ## Select indices of the non-setosa species 401s inds = !strcmp(species, 'setosa'); 401s 401s ## Select features and labels for non-setosa species 401s X = meas(inds, 3:4); 401s Y = grp2idx(species(inds)); 401s 401s ## Convert labels to +1 and -1 401s unique_classes = unique(Y); 401s Y(Y == unique_classes(1)) = -1; 401s Y(Y == unique_classes(2)) = 1; 401s 401s ## Partition data for training and testing 401s cv = cvpartition(Y, 'HoldOut', 0.15); 401s X_train = X(training(cv), :); 401s Y_train = Y(training(cv)); 401s X_test = X(test(cv), :); 401s Y_test = Y(test(cv)); 401s 401s ## Train the SVM model 401s CVSVMModel = fitcsvm(X_train, Y_train); 401s 401s ## Calculate margins 401s m = margin(CVSVMModel, X_test, Y_test); 401s disp(m); 401s ***** demo 401s ## Create a Support Vector Machine classifier and determine loss for test 401s ## data. 401s load fisheriris 401s rng(1); ## For reproducibility 401s 401s ## Select indices of the non-setosa species 401s inds = !strcmp(species, 'setosa'); 401s 401s ## Select features and labels for non-setosa species 401s X = meas(inds, 3:4); 401s Y = grp2idx(species(inds)); 401s 401s ## Convert labels to +1 and -1 401s unique_classes = unique(Y); 401s Y(Y == unique_classes(1)) = -1; 401s Y(Y == unique_classes(2)) = 1; 401s 401s ## Randomly partition the data into training and testing sets 401s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 401s 401s X_train = X(training(cv), :); 401s Y_train = Y(training(cv)); 401s 401s X_test = X(test(cv), :); 401s Y_test = Y(test(cv)); 401s 401s ## Train the SVM model 401s SVMModel = fitcsvm(X_train, Y_train); 401s 401s ## Calculate loss 401s 401s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 401s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 401s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 401s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 401s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 401s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 401s ***** test 401s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 401s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 401s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 401s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 401s assert (class (a), "ClassificationSVM"); 401s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 401s assert ({a.X, a.Y}, {x, y}) 401s assert (a.NumObservations, 5) 401s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 401s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 401s ***** test 401s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 401s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 401s a = ClassificationSVM (x, y); 401s assert (class (a), "ClassificationSVM"); 401s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 401s assert (a.ModelParameters.BoxConstraint, 1) 401s assert (a.ClassNames, [1; -1]) 401s assert (a.ModelParameters.KernelOffset, 0) 401s ***** test 401s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 401s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 401s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 401s "KernelOffset", 2); 401s assert (class (a), "ClassificationSVM"); 401s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 401s assert (a.ModelParameters.BoxConstraint, 2) 401s assert (a.ModelParameters.KernelOffset, 2) 401s ***** test 401s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 401s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 401s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 401s "PolynomialOrder", 3); 401s assert (class (a), "ClassificationSVM"); 401s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 401s assert (a.ModelParameters.PolynomialOrder, 3) 401s ***** error ClassificationSVM () 401s ***** error ... 401s ClassificationSVM (ones(10,2)) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (5,1)) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 401s ***** error ... 401s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 401s ***** error ... 401s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 401s ***** error ... 401s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 401s ***** error ... 401s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 401s ***** error ... 401s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 401s ***** error ... 401s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 401s ***** error ... 401s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 401s ***** error ... 401s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 401s ***** shared x, y, x_train, x_test, y_train, y_test, objST 401s load fisheriris 401s inds = ! strcmp (species, 'setosa'); 401s x = meas(inds, 3:4); 401s y = grp2idx (species(inds)); 401s ***** test 401s xc = [min(x); mean(x); max(x)]; 401s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 401s assert (isempty (obj.Alpha), true) 401s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 401s [label, score] = predict (obj, xc); 401s assert (label, [1; 2; 2]); 401s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 401s assert (score(:,1), -score(:,2), eps) 401s obj = fitPosterior (obj); 401s [label, probs] = predict (obj, xc); 401s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 2e-5); 401s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 401s ***** test 401s obj = fitcsvm (x, y); 401s assert (isempty (obj.Beta), true) 401s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 401s assert (numel (obj.Alpha), 24) 401s assert (obj.Bias, -14.415, 1e-3) 401s xc = [min(x); mean(x); max(x)]; 401s label = predict (obj, xc); 401s assert (label, [1; 2; 2]); 401s ***** error ... 401s predict (ClassificationSVM (ones (40,2), ones (40,1))) 401s ***** error ... 401s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 401s ***** error ... 401s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 401s ***** test 401s objST = fitcsvm (x, y); 401s objST.ScoreTransform = "a"; 401s ***** error ... 401s [labels, scores] = predict (objST, x); 401s ***** error ... 401s [labels, scores] = resubPredict (objST); 401s ***** test 401s rand ("seed", 1); 401s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 401s 'Tolerance', 1e-7); 401s obj = CVSVMModel.Trained{1}; 401s testInds = test (CVSVMModel.Partition); 401s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 401s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 401s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 401s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 401s assert (computed_margin, expected_margin, 1e-4); 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 401s ***** error ... 401s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 401s ***** test 401s rand ("seed", 1); 401s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 401s obj = CVSVMModel.Trained{1}; 401s testInds = test (CVSVMModel.Partition); 401s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 401s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 401s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 401s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 401s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 401s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 401s assert (L1, 2.8711, 1e-4); 401s assert (L2, 0.5333, 1e-4); 401s assert (L3, 10.9685, 1e-4); 401s assert (L4, 1.9827, 1e-4); 401s assert (L5, 1.5849, 1e-4); 401s assert (L6, 7.6739, 1e-4); 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones(2,1), "LossFun") 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "LossFun", 1) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "LossFun", "some") 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "Weights", ['a','b']) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "Weights", 'a') 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "Weights", [1,2,3]) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "Weights", 3) 401s ***** error ... 401s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 401s ones (2,1), "some", "some") 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 401s ***** error ... 401s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 401s ***** test 401s SVMModel = fitcsvm (x, y); 401s CVMdl = crossval (SVMModel, "KFold", 5); 401s assert (class (CVMdl), "ClassificationPartitionedModel") 401s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 401s assert (CVMdl.KFold == 5) 401s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 401s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 401s ***** test 401s obj = fitcsvm (x, y); 401s CVMdl = crossval (obj, "HoldOut", 0.2); 401s assert (class (CVMdl), "ClassificationPartitionedModel") 401s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 401s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 401s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 401s ***** test 401s obj = fitcsvm (x, y); 401s CVMdl = crossval (obj, "LeaveOut", 'on'); 401s assert (class (CVMdl), "ClassificationPartitionedModel") 401s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 401s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 401s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 402s "KFold", 5, "leaveout", 'on') 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 402s ***** error ... 402s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 402s 114 tests, 114 passed, 0 known failure, 0 skipped 402s [inst/Classification/CompactClassificationGAM.m] 402s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/CompactClassificationGAM.m 402s ***** demo 402s ## Create a generalized additive model classifier and its compact version 402s # and compare their size 402s 402s load fisheriris 402s X = meas; 402s Y = species; 402s 402s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 402s CMdl = crossval (Mdl) 402s ***** test 402s Mdl = CompactClassificationGAM (); 402s assert (class (Mdl), "CompactClassificationGAM") 402s ***** test 402s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 402s y = [0; 0; 1; 1]; 402s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 402s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 402s CMdl = compact (Mdl); 402s assert (class (CMdl), "CompactClassificationGAM"); 402s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 402s assert (CMdl.ClassNames, {'0'; '1'}) 402s assert (CMdl.PredictorNames, PredictorNames) 402s assert (CMdl.BaseModel.Intercept, 0) 402s ***** test 402s load fisheriris 402s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 402s X = meas(inds, :); 402s Y = species(inds, :)'; 402s Y = strcmp (Y, 'virginica')'; 402s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 402s CMdl = compact (Mdl); 402s assert (class (CMdl), "CompactClassificationGAM"); 402s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 402s assert (CMdl.ClassNames, {'0'; '1'}) 402s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 402s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 402s assert (CMdl.ModelwInt.Intercept, 0) 406s ***** test 406s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 406s Y = [0; 1; 0; 1; 1]; 406s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 406s CMdl = compact (Mdl); 406s assert (class (CMdl), "CompactClassificationGAM"); 406s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 406s assert (CMdl.ClassNames, {'0'; '1'}) 406s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 406s assert (CMdl.Knots, [4, 4, 4]) 406s assert (CMdl.Order, [3, 3, 3]) 406s assert (CMdl.DoF, [7, 7, 7]) 406s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 407s ***** error ... 407s CompactClassificationGAM (1) 407s ***** test 407s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 407s y = [1; 0; 1; 0; 1]; 407s Mdl = fitcgam (x, y, "interactions", "all"); 407s CMdl = compact (Mdl); 407s l = {'0'; '0'; '0'; '0'; '0'}; 407s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 407s 0.4259, 0.5741; 0.3760, 0.6240]; 407s [labels, scores] = predict (CMdl, x); 407s assert (class (CMdl), "CompactClassificationGAM"); 407s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 407s assert (CMdl.ClassNames, {'1'; '0'}) 407s assert (CMdl.PredictorNames, {'x1', 'x2'}) 407s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 407s assert (labels, l) 407s assert (scores, s, 1e-1) 408s ***** test 408s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 408s y = [0; 0; 1; 1]; 408s interactions = [false, true, false; true, false, true; false, true, false]; 408s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 408s CMdl = compact (Mdl); 408s [label, score] = predict (CMdl, x, "includeinteractions", true); 408s l = {'0'; '0'; '1'; '1'}; 408s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 408s assert (class (CMdl), "CompactClassificationGAM"); 408s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 408s assert (CMdl.ClassNames, {'0'; '1'}) 408s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 408s assert (CMdl.ModelwInt.Intercept, 0) 408s assert (label, l) 408s assert (score, s, 1e-1) 411s ***** shared CMdl 411s Mdl = fitcgam (ones (4,2), ones (4,1)); 411s CMdl = compact (Mdl); 411s ***** error ... 411s predict (CMdl) 411s ***** error ... 411s predict (CMdl, []) 411s ***** error ... 411s predict (CMdl, 1) 411s 10 tests, 10 passed, 0 known failure, 0 skipped 411s [inst/Classification/CompactClassificationDiscriminant.m] 411s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/CompactClassificationDiscriminant.m 411s ***** demo 411s ## Create a discriminant analysis classifier and its compact version 411s # and compare their size 411s 411s load fisheriris 411s X = meas; 411s Y = species; 411s 411s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 411s CMdl = crossval (Mdl) 411s ***** test 411s load fisheriris 411s x = meas; 411s y = species; 411s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 411s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 411s CMdl = compact (Mdl); 411s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 411s 0.092721, 0.115388, 0.055244, 0.032710; ... 411s 0.167514, 0.055244, 0.185188, 0.042665; ... 411s 0.038401, 0.032710, 0.042665, 0.041882]; 411s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 411s 5.9360, 2.7700, 4.2600, 1.3260; ... 411s 6.5880, 2.9740, 5.5520, 2.0260]; 411s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 411s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 411s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 411s assert (class (CMdl), "CompactClassificationDiscriminant"); 411s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 411s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 411s assert (CMdl.ClassNames, unique (species)) 411s assert (CMdl.Sigma, sigma, 1e-6) 411s assert (CMdl.Mu, mu, 1e-14) 411s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 411s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 411s assert (CMdl.PredictorNames, PredictorNames) 411s ***** test 411s load fisheriris 411s x = meas; 411s y = species; 411s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 411s CMdl = compact (Mdl); 411s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 411s 0.046361, 0.115388, 0.027622, 0.016355; ... 411s 0.083757, 0.027622, 0.185188, 0.021333; ... 411s 0.019201, 0.016355, 0.021333, 0.041882]; 411s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 411s 5.9360, 2.7700, 4.2600, 1.3260; ... 411s 6.5880, 2.9740, 5.5520, 2.0260]; 411s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 411s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 411s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 411s assert (class (CMdl), "CompactClassificationDiscriminant"); 411s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 411s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 411s assert (CMdl.ClassNames, unique (species)) 411s assert (CMdl.Sigma, sigma, 1e-6) 411s assert (CMdl.Mu, mu, 1e-14) 411s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 411s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 411s ***** error ... 411s CompactClassificationDiscriminant (1) 411s ***** test 411s load fisheriris 411s x = meas; 411s y = species; 411s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 411s CMdl = compact (Mdl); 411s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 411s assert (label, {'versicolor'}) 411s assert (score, [0, 0.9999, 0.0001], 1e-4) 411s assert (cost, [1, 0.0001, 0.9999], 1e-4) 411s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 411s assert (label, {'versicolor'}) 411s assert (score, [0, 0.6368, 0.3632], 1e-4) 411s assert (cost, [1, 0.3632, 0.6368], 1e-4) 411s ***** test 411s load fisheriris 411s x = meas; 411s y = species; 411s xc = [min(x); mean(x); max(x)]; 411s Mdl = fitcdiscr (x, y); 411s CMdl = compact (Mdl); 411s [label, score, cost] = predict (CMdl, xc); 411s l = {'setosa'; 'versicolor'; 'virginica'}; 411s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 411s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 411s assert (label, l) 411s assert (score, s, 1e-4) 411s assert (cost, c, 1e-4) 411s ***** shared MODEL 411s X = rand (10,2); 411s Y = [ones(5,1);2*ones(5,1)]; 411s MODEL = compact (ClassificationDiscriminant (X, Y)); 411s ***** error ... 411s predict (MODEL) 411s ***** error ... 411s predict (MODEL, []) 411s ***** error ... 411s predict (MODEL, 1) 411s ***** test 411s load fisheriris 411s model = fitcdiscr (meas, species); 411s x = mean (meas); 411s y = {'versicolor'}; 411s L = loss (model, x, y); 411s assert (L, 0) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6]; 411s y = {'A'; 'B'; 'A'}; 411s model = fitcdiscr (x, y, "Gamma", 0.4); 411s x_test = [1, 6; 3, 3]; 411s y_test = {'A'; 'B'}; 411s L = loss (model, x_test, y_test); 411s assert (L, 0.3333, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6; 7, 8]; 411s y = ['1'; '2'; '3'; '1']; 411s model = fitcdiscr (x, y, "gamma" , 0.5); 411s x_test = [3, 3]; 411s y_test = ['1']; 411s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 411s assert (L, 0.2423, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6; 7, 8]; 411s y = ['1'; '2'; '3'; '1']; 411s model = fitcdiscr (x, y, "gamma" , 0.5); 411s x_test = [3, 3; 5, 7]; 411s y_test = ['1'; '2']; 411s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 411s assert (L, 0.3333, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6; 7, 8]; 411s y = ['1'; '2'; '3'; '1']; 411s model = fitcdiscr (x, y, "gamma" , 0.5); 411s x_test = [3, 3; 5, 7]; 411s y_test = ['1'; '2']; 411s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 411s assert (L, 0.5886, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6; 7, 8]; 411s y = ['1'; '2'; '3'; '1']; 411s model = fitcdiscr (x, y, "gamma" , 0.5); 411s x_test = [3, 3; 5, 7]; 411s y_test = ['1'; '2']; 411s W = [1; 2]; 411s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 411s assert (L, 0.5107, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6]; 411s y = {'A'; 'B'; 'A'}; 411s model = fitcdiscr (x, y, "gamma" , 0.5); 411s x_with_nan = [1, 2; NaN, 4]; 411s y_test = {'A'; 'B'}; 411s L = loss (model, x_with_nan, y_test); 411s assert (L, 0.3333, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6]; 411s y = {'A'; 'B'; 'A'}; 411s model = fitcdiscr (x, y); 411s x_with_nan = [1, 2; NaN, 4]; 411s y_test = {'A'; 'B'}; 411s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 411s assert (isnan (L)) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6]; 411s y = {'A'; 'B'; 'A'}; 411s model = fitcdiscr (x, y); 411s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 411s L = loss (model, x, y, 'LossFun', customLossFun); 411s assert (L, 0.8889, 1e-4) 411s ***** test 411s x = [1, 2; 3, 4; 5, 6]; 411s y = [1; 2; 1]; 411s model = fitcdiscr (x, y); 411s L = loss (model, x, y, 'LossFun', 'classiferror'); 411s assert (L, 0.3333, 1e-4) 411s ***** error ... 411s loss (MODEL) 411s ***** error ... 411s loss (MODEL, ones (4,2)) 411s ***** error ... 411s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 411s ***** error ... 411s loss (MODEL, ones (4,2), ones (3,1)) 411s ***** error ... 411s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 411s ***** error ... 411s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 411s load fisheriris 411s mdl = fitcdiscr (meas, species); 411s X = mean (meas); 411s Y = {'versicolor'}; 411s m = margin (mdl, X, Y); 411s assert (m, 1, 1e-6) 411s ***** test 411s X = [1, 2; 3, 4; 5, 6]; 411s Y = [1; 2; 1]; 411s mdl = fitcdiscr (X, Y, "gamma", 0.5); 411s m = margin (mdl, X, Y); 411s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 411s ***** error ... 411s margin (MODEL) 411s ***** error ... 411s margin (MODEL, ones (4,2)) 411s ***** error ... 411s margin (MODEL, ones (4,2), ones (3,1)) 411s 28 tests, 28 passed, 0 known failure, 0 skipped 411s [inst/Classification/ClassificationNeuralNetwork.m] 411s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationNeuralNetwork.m 411s ***** error ... 411s ClassificationNeuralNetwork () 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2)) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 411s ***** error ... 411s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 411s ***** error ... 411s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 412s "Activations", {"sigmoid", "unsupported_type"}) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 412s ***** error ... 412s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 412s ***** error ... 412s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 412s ***** error ... 412s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 412s ***** shared x, y, objST, Mdl 412s load fisheriris 412s x = meas; 412s y = grp2idx (species); 412s Mdl = fitcnet (x, y, "IterationLimit", 100); 412s ***** error ... 412s predict (Mdl) 412s ***** error ... 412s predict (Mdl, []) 412s ***** error ... 412s predict (Mdl, 1) 412s ***** test 412s objST = fitcnet (x, y, "IterationLimit", 100); 412s objST.ScoreTransform = "a"; 412s ***** error ... 412s [labels, scores] = predict (objST, x); 412s ***** error ... 412s [labels, scores] = resubPredict (objST); 412s ***** test 412s CVMdl = crossval (Mdl, "KFold", 5); 412s assert (class (CVMdl), "ClassificationPartitionedModel") 412s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 412s assert (CVMdl.KFold == 5) 412s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 412s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 412s ***** test 412s CVMdl = crossval (Mdl, "HoldOut", 0.2); 412s assert (class (CVMdl), "ClassificationPartitionedModel") 412s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 412s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 412s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 412s ***** error ... 412s crossval (Mdl, "KFold") 412s ***** error ... 412s crossval (Mdl, "KFold", 5, "leaveout", 'on') 412s ***** error ... 412s crossval (Mdl, "KFold", 'a') 412s ***** error ... 412s crossval (Mdl, "KFold", 1) 412s ***** error ... 412s crossval (Mdl, "KFold", -1) 412s ***** error ... 412s crossval (Mdl, "KFold", 11.5) 412s ***** error ... 412s crossval (Mdl, "KFold", [1,2]) 412s ***** error ... 412s crossval (Mdl, "Holdout", 'a') 412s ***** error ... 412s crossval (Mdl, "Holdout", 11.5) 412s ***** error ... 412s crossval (Mdl, "Holdout", -1) 412s ***** error ... 412s crossval (Mdl, "Holdout", 0) 412s ***** error ... 412s crossval (Mdl, "Holdout", 1) 412s ***** error ... 412s crossval (Mdl, "Leaveout", 1) 412s ***** error ... 412s crossval (Mdl, "CVPartition", 1) 412s ***** error ... 412s crossval (Mdl, "CVPartition", 'a') 412s ***** error ... 412s crossval (Mdl, "some", "some") 412s 59 tests, 59 passed, 0 known failure, 0 skipped 412s [inst/Classification/ClassificationPartitionedModel.m] 412s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationPartitionedModel.m 412s ***** demo 412s 412s load fisheriris 412s x = meas; 412s y = species; 412s 412s ## Create a KNN classifier model 412s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 412s 412s ## Create a partition for 5-fold cross-validation 412s partition = cvpartition (y, "KFold", 5); 412s 412s ## Create the ClassificationPartitionedModel object 412s cvModel = crossval (obj, 'cvPartition', partition) 412s ***** demo 412s 412s load fisheriris 412s x = meas; 412s y = species; 412s 412s ## Create a KNN classifier model 412s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 412s 412s ## Create the ClassificationPartitionedModel object 412s cvModel = crossval (obj); 412s 412s ## Predict the class labels for the observations not used for training 412s [label, score, cost] = kfoldPredict (cvModel); 412s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 412s sum (strcmp (label, y)) / numel (y) *100, ... 412s sum (strcmp (label, y)), numel (y)) 412s ***** test 412s load fisheriris 412s a = fitcdiscr (meas, species, "gamma", 0.3); 412s cvModel = crossval (a, "KFold", 5); 412s assert (class (cvModel), "ClassificationPartitionedModel"); 412s assert (cvModel.NumObservations, 150); 412s assert (numel (cvModel.Trained), 5); 412s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 412s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 412s assert (cvModel.KFold, 5); 412s ***** test 412s load fisheriris 412s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 412s cvModel = crossval (a, "HoldOut", 0.3); 412s assert (class (cvModel), "ClassificationPartitionedModel"); 412s assert ({cvModel.X, cvModel.Y}, {meas, species}); 412s assert (cvModel.NumObservations, 150); 412s assert (numel (cvModel.Trained), 1); 412s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 412s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 412s ***** test 412s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 412s y = ["a"; "a"; "b"; "b"]; 412s a = fitcgam (x, y, "Interactions", "all"); 412s cvModel = crossval (a, "KFold", 5); 412s assert (class (cvModel), "ClassificationPartitionedModel"); 412s assert (cvModel.NumObservations, 4); 412s assert (numel (cvModel.Trained), 5); 412s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 412s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 412s assert (cvModel.KFold, 5); 429s ***** test 429s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 429s y = ["a"; "a"; "b"; "b"]; 429s a = fitcgam (x, y); 429s cvModel = crossval (a, "LeaveOut", "on"); 429s assert (class (cvModel), "ClassificationPartitionedModel"); 429s assert ({cvModel.X, cvModel.Y}, {x, y}); 429s assert (cvModel.NumObservations, 4); 429s assert (numel (cvModel.Trained), 4); 429s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 429s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 434s ***** test 434s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 434s y = ["a"; "a"; "b"; "b"]; 434s a = fitcknn (x, y); 434s partition = cvpartition (y, "KFold", 5); 434s cvModel = ClassificationPartitionedModel (a, partition); 434s assert (class (cvModel), "ClassificationPartitionedModel"); 434s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 434s assert (cvModel.NumObservations, 4); 434s assert (cvModel.ModelParameters.NumNeighbors, 1); 434s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 434s assert (cvModel.ModelParameters.Distance, "euclidean"); 434s assert (! cvModel.ModelParameters.Standardize); 434s ***** test 434s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 434s y = ["a"; "a"; "b"; "b"]; 434s a = fitcknn (x, y, "NSMethod", "exhaustive"); 434s partition = cvpartition (y, "HoldOut", 0.2); 434s cvModel = ClassificationPartitionedModel (a, partition); 434s assert (class (cvModel), "ClassificationPartitionedModel"); 434s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 434s assert ({cvModel.X, cvModel.Y}, {x, y}); 434s assert (cvModel.NumObservations, 4); 434s assert (cvModel.ModelParameters.NumNeighbors, 1); 434s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 434s assert (cvModel.ModelParameters.Distance, "euclidean"); 434s assert (! cvModel.ModelParameters.Standardize); 434s ***** test 434s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 434s y = ["a"; "a"; "b"; "b"]; 434s k = 3; 434s a = fitcknn (x, y, "NumNeighbors" ,k); 434s partition = cvpartition (y, "LeaveOut"); 434s cvModel = ClassificationPartitionedModel (a, partition); 434s assert (class (cvModel), "ClassificationPartitionedModel"); 434s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 434s assert ({cvModel.X, cvModel.Y}, {x, y}); 434s assert (cvModel.NumObservations, 4); 434s assert (cvModel.ModelParameters.NumNeighbors, k); 434s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 434s assert (cvModel.ModelParameters.Distance, "euclidean"); 434s assert (! cvModel.ModelParameters.Standardize); 434s ***** test 434s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 434s y = {"a"; "a"; "b"; "b"}; 434s a = fitcnet (x, y, "IterationLimit", 50); 434s cvModel = crossval (a, "KFold", 5); 434s assert (class (cvModel), "ClassificationPartitionedModel"); 434s assert (cvModel.NumObservations, 4); 434s assert (numel (cvModel.Trained), 5); 434s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 434s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 434s assert (cvModel.KFold, 5); 434s ***** test 434s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 434s y = {"a"; "a"; "b"; "b"}; 434s a = fitcnet (x, y, "LayerSizes", [5, 3]); 434s cvModel = crossval (a, "LeaveOut", "on"); 434s assert (class (cvModel), "ClassificationPartitionedModel"); 434s assert ({cvModel.X, cvModel.Y}, {x, y}); 434s assert (cvModel.NumObservations, 4); 434s assert (numel (cvModel.Trained), 4); 434s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 434s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 434s ***** test 434s load fisheriris 434s inds = ! strcmp (species, 'setosa'); 434s x = meas(inds, 3:4); 434s y = grp2idx (species(inds)); 434s SVMModel = fitcsvm (x,y); 434s CVMdl = crossval (SVMModel, "KFold", 5); 434s assert (class (CVMdl), "ClassificationPartitionedModel") 434s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 434s assert (CVMdl.KFold == 5) 434s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 434s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 434s ***** test 434s load fisheriris 434s inds = ! strcmp (species, 'setosa'); 434s x = meas(inds, 3:4); 434s y = grp2idx (species(inds)); 434s obj = fitcsvm (x, y); 434s CVMdl = crossval (obj, "HoldOut", 0.2); 434s assert (class (CVMdl), "ClassificationPartitionedModel") 434s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 434s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 434s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 434s ***** test 434s load fisheriris 434s inds = ! strcmp (species, 'setosa'); 434s x = meas(inds, 3:4); 434s y = grp2idx (species(inds)); 434s obj = fitcsvm (x, y); 434s CVMdl = crossval (obj, "LeaveOut", 'on'); 434s assert (class (CVMdl), "ClassificationPartitionedModel") 434s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 434s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 434s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 435s ***** error ... 435s ClassificationPartitionedModel () 435s ***** error ... 435s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 435s ***** error ... 435s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 435s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 435s ***** error ... 435s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 435s ones (4,1)), 'Holdout') 435s ***** test 435s load fisheriris 435s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 435s cvModel = crossval (a, "Kfold", 4); 435s [label, score, cost] = kfoldPredict (cvModel); 435s assert (class(cvModel), "ClassificationPartitionedModel"); 435s assert ({cvModel.X, cvModel.Y}, {meas, species}); 435s assert (cvModel.NumObservations, 150); 435s ***** # assert (label, {"b"; "b"; "a"; "a"}); 435s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 435s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 435s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 435s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 435s ***** test 435s x = ones(4, 11); 435s y = {"a"; "a"; "b"; "b"}; 435s k = 3; 435s a = fitcknn (x, y, "NumNeighbors", k); 435s partition = cvpartition (y, "LeaveOut"); 435s cvModel = ClassificationPartitionedModel (a, partition); 435s [label, score, cost] = kfoldPredict (cvModel); 435s assert (class(cvModel), "ClassificationPartitionedModel"); 435s assert ({cvModel.X, cvModel.Y}, {x, y}); 435s assert (cvModel.NumObservations, 4); 435s assert (cvModel.ModelParameters.NumNeighbors, k); 435s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 435s assert (cvModel.ModelParameters.Distance, "euclidean"); 435s assert (! cvModel.ModelParameters.Standardize); 435s assert (label, {"b"; "b"; "a"; "a"}); 435s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 435s 0.6667, 0.3333], 1e-4); 435s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 435s 0.3333, 0.6667], 1e-4); 435s ***** error ... 435s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 435s ***** error ... 435s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 437s 20 tests, 20 passed, 0 known failure, 0 skipped 437s [inst/Classification/CompactClassificationNeuralNetwork.m] 437s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/CompactClassificationNeuralNetwork.m 437s ***** demo 437s ## Create a neural network classifier and its compact version 437s # and compare their size 437s 437s load fisheriris 437s X = meas; 437s Y = species; 437s 437s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 437s CMdl = crossval (Mdl) 437s ***** error ... 437s CompactClassificationDiscriminant (1) 437s ***** shared x, y, CMdl 437s load fisheriris 437s x = meas; 437s y = grp2idx (species); 437s Mdl = fitcnet (x, y, "IterationLimit", 100); 437s CMdl = compact (Mdl); 437s ***** error ... 437s predict (CMdl) 437s ***** error ... 437s predict (CMdl, []) 437s ***** error ... 437s predict (CMdl, 1) 437s ***** test 437s CMdl.ScoreTransform = "a"; 437s ***** error ... 437s [labels, scores] = predict (CMdl, x); 437s 6 tests, 6 passed, 0 known failure, 0 skipped 437s [inst/Classification/ClassificationDiscriminant.m] 437s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationDiscriminant.m 437s ***** demo 437s ## Create discriminant classifier 437s ## Evaluate some model predictions on new data. 437s 437s load fisheriris 437s x = meas; 437s y = species; 437s xc = [min(x); mean(x); max(x)]; 437s obj = fitcdiscr (x, y); 437s [label, score, cost] = predict (obj, xc); 437s ***** demo 437s load fisheriris 437s model = fitcdiscr (meas, species); 437s X = mean (meas); 437s Y = {'versicolor'}; 437s ## Compute loss for discriminant model 437s L = loss (model, X, Y) 437s ***** demo 437s load fisheriris 437s mdl = fitcdiscr (meas, species); 437s X = mean (meas); 437s Y = {'versicolor'}; 437s ## Margin for discriminant model 437s m = margin (mdl, X, Y) 437s ***** demo 437s load fisheriris 437s x = meas; 437s y = species; 437s obj = fitcdiscr (x, y, "gamma", 0.4); 437s ## Cross-validation for discriminant model 437s CVMdl = crossval (obj) 437s ***** test 437s load fisheriris 437s x = meas; 437s y = species; 437s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 437s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 437s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 437s 0.092721, 0.115388, 0.055244, 0.032710; ... 437s 0.167514, 0.055244, 0.185188, 0.042665; ... 437s 0.038401, 0.032710, 0.042665, 0.041882]; 437s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 437s 5.9360, 2.7700, 4.2600, 1.3260; ... 437s 6.5880, 2.9740, 5.5520, 2.0260]; 437s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 437s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 437s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 437s assert (class (Mdl), "ClassificationDiscriminant"); 437s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 437s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 437s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 437s assert (Mdl.ClassNames, unique (species)) 437s assert (Mdl.Sigma, sigma, 1e-6) 437s assert (Mdl.Mu, mu, 1e-14) 437s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 437s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 437s assert (Mdl.PredictorNames, PredictorNames) 437s ***** test 437s load fisheriris 437s x = meas; 437s y = species; 437s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 437s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 437s 0.046361, 0.115388, 0.027622, 0.016355; ... 437s 0.083757, 0.027622, 0.185188, 0.021333; ... 437s 0.019201, 0.016355, 0.021333, 0.041882]; 437s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 437s 5.9360, 2.7700, 4.2600, 1.3260; ... 437s 6.5880, 2.9740, 5.5520, 2.0260]; 437s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 437s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 437s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 437s assert (class (Mdl), "ClassificationDiscriminant"); 437s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 437s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 437s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 437s assert (Mdl.ClassNames, unique (species)) 437s assert (Mdl.Sigma, sigma, 1e-6) 437s assert (Mdl.Mu, mu, 1e-14) 437s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 437s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 437s ***** shared X, Y, MODEL 437s X = rand (10,2); 437s Y = [ones(5,1);2*ones(5,1)]; 437s MODEL = ClassificationDiscriminant (X, Y); 437s ***** error ClassificationDiscriminant () 437s ***** error ... 437s ClassificationDiscriminant (ones(4, 1)) 437s ***** error ... 437s ClassificationDiscriminant (ones (4,2), ones (1,4)) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "ResponseName", 1) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 437s ***** error ... 437s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 437s ***** error ... 437s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 437s ***** error ... 437s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 437s ***** error ... 437s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "Cost", "string") 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 437s ***** error ... 437s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 437s ***** error ... 437s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 437s ***** error ... 437s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 437s ***** error ... 437s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 437s ***** error ... 437s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 437s ***** test 437s load fisheriris 437s x = meas; 437s y = species; 437s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 437s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 437s assert (label, {'versicolor'}) 437s assert (score, [0, 0.9999, 0.0001], 1e-4) 437s assert (cost, [1, 0.0001, 0.9999], 1e-4) 437s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 437s assert (label, {'versicolor'}) 437s assert (score, [0, 0.6368, 0.3632], 1e-4) 437s assert (cost, [1, 0.3632, 0.6368], 1e-4) 437s ***** test 437s load fisheriris 437s x = meas; 437s y = species; 437s xc = [min(x); mean(x); max(x)]; 437s Mdl = fitcdiscr (x, y); 437s [label, score, cost] = predict (Mdl, xc); 437s l = {'setosa'; 'versicolor'; 'virginica'}; 437s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 437s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 437s assert (label, l) 437s assert (score, s, 1e-4) 437s assert (cost, c, 1e-4) 437s ***** error ... 437s predict (MODEL) 437s ***** error ... 437s predict (MODEL, []) 437s ***** error ... 437s predict (MODEL, 1) 437s ***** test 437s load fisheriris 437s model = fitcdiscr (meas, species); 437s x = mean (meas); 437s y = {'versicolor'}; 437s L = loss (model, x, y); 437s assert (L, 0) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6]; 437s y = {'A'; 'B'; 'A'}; 437s model = fitcdiscr (x, y, "Gamma", 0.4); 437s x_test = [1, 6; 3, 3]; 437s y_test = {'A'; 'B'}; 437s L = loss (model, x_test, y_test); 437s assert (L, 0.3333, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6; 7, 8]; 437s y = ['1'; '2'; '3'; '1']; 437s model = fitcdiscr (x, y, "gamma" , 0.5); 437s x_test = [3, 3]; 437s y_test = ['1']; 437s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 437s assert (L, 0.2423, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6; 7, 8]; 437s y = ['1'; '2'; '3'; '1']; 437s model = fitcdiscr (x, y, "gamma" , 0.5); 437s x_test = [3, 3; 5, 7]; 437s y_test = ['1'; '2']; 437s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 437s assert (L, 0.3333, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6; 7, 8]; 437s y = ['1'; '2'; '3'; '1']; 437s model = fitcdiscr (x, y, "gamma" , 0.5); 437s x_test = [3, 3; 5, 7]; 437s y_test = ['1'; '2']; 437s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 437s assert (L, 0.5886, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6; 7, 8]; 437s y = ['1'; '2'; '3'; '1']; 437s model = fitcdiscr (x, y, "gamma" , 0.5); 437s x_test = [3, 3; 5, 7]; 437s y_test = ['1'; '2']; 437s W = [1; 2]; 437s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 437s assert (L, 0.5107, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6]; 437s y = {'A'; 'B'; 'A'}; 437s model = fitcdiscr (x, y, "gamma" , 0.5); 437s x_with_nan = [1, 2; NaN, 4]; 437s y_test = {'A'; 'B'}; 437s L = loss (model, x_with_nan, y_test); 437s assert (L, 0.3333, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6]; 437s y = {'A'; 'B'; 'A'}; 437s model = fitcdiscr (x, y); 437s x_with_nan = [1, 2; NaN, 4]; 437s y_test = {'A'; 'B'}; 437s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 437s assert (isnan (L)) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6]; 437s y = {'A'; 'B'; 'A'}; 437s model = fitcdiscr (x, y); 437s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 437s L = loss (model, x, y, 'LossFun', customLossFun); 437s assert (L, 0.8889, 1e-4) 437s ***** test 437s x = [1, 2; 3, 4; 5, 6]; 437s y = [1; 2; 1]; 437s model = fitcdiscr (x, y); 437s L = loss (model, x, y, 'LossFun', 'classiferror'); 437s assert (L, 0.3333, 1e-4) 437s ***** error ... 437s loss (MODEL) 437s ***** error ... 437s loss (MODEL, ones (4,2)) 437s ***** error ... 437s loss (MODEL, [], zeros (2)) 437s ***** error ... 437s loss (MODEL, 1, zeros (2)) 437s ***** error ... 437s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 437s ***** error ... 437s loss (MODEL, ones (4,2), ones (3,1)) 437s ***** error ... 437s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 437s ***** error ... 437s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 437s load fisheriris 437s mdl = fitcdiscr (meas, species); 437s X = mean (meas); 437s Y = {'versicolor'}; 437s m = margin (mdl, X, Y); 437s assert (m, 1, 1e-6) 437s ***** test 437s X = [1, 2; 3, 4; 5, 6]; 437s Y = [1; 2; 1]; 437s mdl = fitcdiscr (X, Y, "gamma", 0.5); 437s m = margin (mdl, X, Y); 437s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 437s ***** error ... 437s margin (MODEL) 437s ***** error ... 437s margin (MODEL, ones (4,2)) 437s ***** error ... 437s margin (MODEL, [], zeros (2)) 437s ***** error ... 437s margin (MODEL, 1, zeros (2)) 437s ***** error ... 437s margin (MODEL, ones (4,2), ones (3,1)) 437s ***** shared x, y, obj 437s load fisheriris 437s x = meas; 437s y = species; 437s obj = fitcdiscr (x, y, "gamma", 0.4); 437s ***** test 437s CVMdl = crossval (obj); 437s assert (class (CVMdl), "ClassificationPartitionedModel") 437s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 437s assert (CVMdl.KFold == 10) 437s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 437s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 437s ***** test 437s CVMdl = crossval (obj, "KFold", 3); 437s assert (class (CVMdl), "ClassificationPartitionedModel") 437s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 437s assert (CVMdl.KFold == 3) 437s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 437s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 437s ***** test 437s CVMdl = crossval (obj, "HoldOut", 0.2); 437s assert (class (CVMdl), "ClassificationPartitionedModel") 437s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 437s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 437s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 437s ***** test 437s CVMdl = crossval (obj, "LeaveOut", 'on'); 437s assert (class (CVMdl), "ClassificationPartitionedModel") 437s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 437s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 437s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 438s ***** test 438s partition = cvpartition (y, 'KFold', 3); 438s CVMdl = crossval (obj, 'cvPartition', partition); 438s assert (class (CVMdl), "ClassificationPartitionedModel") 438s assert (CVMdl.KFold == 3) 438s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 438s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 438s ***** error ... 438s crossval (obj, "kfold") 438s ***** error... 438s crossval (obj, "kfold", 12, "holdout", 0.2) 438s ***** error ... 438s crossval (obj, "kfold", 'a') 438s ***** error ... 438s crossval (obj, "holdout", 2) 438s ***** error ... 438s crossval (obj, "leaveout", 1) 438s ***** error ... 438s crossval (obj, "cvpartition", 1) 438s 65 tests, 65 passed, 0 known failure, 0 skipped 438s [inst/Classification/ClassificationGAM.m] 438s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ClassificationGAM.m 438s ***** demo 438s ## Train a GAM classifier for binary classification 438s ## using specific data and plot the decision boundaries. 438s 438s ## Define specific data 438s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 438s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 438s Y = [0; 0; 0; 0; 0; ... 438s 1; 1; 1; 1; 1]; 438s 438s ## Train the GAM model 438s obj = fitcgam (X, Y, "Interactions", "all") 438s 438s ## Create a grid of values for prediction 438s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 438s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 438s [x1G, x2G] = meshgrid (x1, x2); 438s XGrid = [x1G(:), x2G(:)]; 438s [labels, score] = predict (obj, XGrid); 438s ***** test 438s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 438s y = [0; 0; 1; 1]; 438s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 438s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 438s assert (class (a), "ClassificationGAM"); 438s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 438s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 438s assert (a.ClassNames, {'0'; '1'}) 438s assert (a.PredictorNames, PredictorNames) 438s assert (a.BaseModel.Intercept, 0) 439s ***** test 439s load fisheriris 439s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 439s X = meas(inds, :); 439s Y = species(inds, :)'; 439s Y = strcmp (Y, 'virginica')'; 439s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 439s assert (class (a), "ClassificationGAM"); 439s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 439s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 439s assert (a.ClassNames, {'0'; '1'}) 439s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 439s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 439s assert (a.ModelwInt.Intercept, 0) 443s ***** test 443s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 443s Y = [0; 1; 0; 1; 1]; 443s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 443s assert (class (a), "ClassificationGAM"); 443s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 443s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 443s assert (a.ClassNames, {'0'; '1'}) 443s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 443s assert (a.Knots, [4, 4, 4]) 443s assert (a.Order, [3, 3, 3]) 443s assert (a.DoF, [7, 7, 7]) 443s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 444s ***** error ClassificationGAM () 444s ***** error ... 444s ClassificationGAM (ones(4, 1)) 444s ***** error ... 444s ClassificationGAM (ones (4,2), ones (1,4)) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 444s ***** error ... 444s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 444s ***** error ... 444s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 444s ***** error ... 444s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 444s ***** error ... 444s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 444s ***** error ... 444s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 444s ***** error ... 444s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 444s ***** test 444s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 444s y = [1; 0; 1; 0; 1]; 444s a = ClassificationGAM (x, y, "interactions", "all"); 444s l = {'0'; '0'; '0'; '0'; '0'}; 444s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 444s 0.4259, 0.5741; 0.3760, 0.6240]; 444s [labels, scores] = predict (a, x); 444s assert (class (a), "ClassificationGAM"); 444s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 444s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 444s assert (a.ClassNames, {'1'; '0'}) 444s assert (a.PredictorNames, {'x1', 'x2'}) 444s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 444s assert (labels, l) 444s assert (scores, s, 1e-1) 445s ***** test 445s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 445s y = [0; 0; 1; 1]; 445s interactions = [false, true, false; true, false, true; false, true, false]; 445s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 445s [label, score] = predict (a, x, "includeinteractions", true); 445s l = {'0'; '0'; '1'; '1'}; 445s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 445s assert (class (a), "ClassificationGAM"); 445s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 445s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 445s assert (a.ClassNames, {'0'; '1'}) 445s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 445s assert (a.ModelwInt.Intercept, 0) 445s assert (label, l) 445s assert (score, s, 1e-1) 448s ***** error ... 448s predict (ClassificationGAM (ones (4,2), ones (4,1))) 448s ***** error ... 448s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 449s ***** error ... 449s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 450s ***** shared x, y, obj 450s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 450s y = [0; 0; 1; 1]; 450s obj = fitcgam (x, y); 450s ***** test 450s CVMdl = crossval (obj); 450s assert (class (CVMdl), "ClassificationPartitionedModel") 450s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 450s assert (CVMdl.KFold == 10) 450s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 450s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 460s ***** test 460s CVMdl = crossval (obj, "KFold", 5); 460s assert (class (CVMdl), "ClassificationPartitionedModel") 460s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 460s assert (CVMdl.KFold == 5) 460s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 460s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 465s ***** test 465s CVMdl = crossval (obj, "HoldOut", 0.2); 465s assert (class (CVMdl), "ClassificationPartitionedModel") 465s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 465s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 465s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 465s ***** test 465s partition = cvpartition (y, 'KFold', 3); 465s CVMdl = crossval (obj, 'cvPartition', partition); 465s assert (class (CVMdl), "ClassificationPartitionedModel") 465s assert (CVMdl.KFold == 3) 465s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 465s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 468s ***** error ... 468s crossval (obj, "kfold") 468s ***** error... 468s crossval (obj, "kfold", 12, "holdout", 0.2) 468s ***** error ... 468s crossval (obj, "kfold", 'a') 468s ***** error ... 468s crossval (obj, "holdout", 2) 468s ***** error ... 468s crossval (obj, "leaveout", 1) 468s ***** error ... 468s crossval (obj, "cvpartition", 1) 468s 34 tests, 34 passed, 0 known failure, 0 skipped 468s [inst/Classification/CompactClassificationSVM.m] 468s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/CompactClassificationSVM.m 468s ***** demo 468s ## Create a support vectors machine classifier and its compact version 468s # and compare their size 468s 468s load fisheriris 468s X = meas; 468s Y = species; 468s 468s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 468s CMdl = crossval (Mdl) 468s ***** error ... 468s CompactClassificationSVM (1) 468s ***** shared x, y, CMdl 468s load fisheriris 468s inds = ! strcmp (species, 'setosa'); 468s x = meas(inds, 3:4); 468s y = grp2idx (species(inds)); 468s ***** test 468s xc = [min(x); mean(x); max(x)]; 468s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 468s CMdl = compact (Mdl); 468s assert (isempty (CMdl.Alpha), true) 468s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 468s [label, score] = predict (CMdl, xc); 468s assert (label, [1; 2; 2]); 468s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 468s assert (score(:,1), -score(:,2), eps) 468s ***** test 468s Mdl = fitcsvm (x, y); 468s CMdl = compact (Mdl); 468s assert (isempty (CMdl.Beta), true) 468s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 468s assert (numel (CMdl.Alpha), 24) 468s assert (CMdl.Bias, -14.415, 1e-3) 468s xc = [min(x); mean(x); max(x)]; 468s label = predict (CMdl, xc); 468s assert (label, [1; 2; 2]); 468s ***** error ... 468s predict (CMdl) 468s ***** error ... 468s predict (CMdl, []) 468s ***** error ... 468s predict (CMdl, 1) 468s ***** test 468s CMdl.ScoreTransform = "a"; 468s ***** error ... 468s [labels, scores] = predict (CMdl, x); 468s ***** test 468s rand ("seed", 1); 468s C = cvpartition (y, 'HoldOut', 0.15); 468s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 468s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 468s CMdl = compact (Mdl); 468s testInds = test (C); 468s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 468s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 468s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 468s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 468s assert (computed_margin, expected_margin, 1e-4); 468s ***** error ... 468s margin (CMdl) 468s ***** error ... 468s margin (CMdl, zeros (2)) 468s ***** error ... 468s margin (CMdl, [], 1) 468s ***** error ... 468s margin (CMdl, 1, 1) 468s ***** error ... 468s margin (CMdl, [1, 2], []) 468s ***** error ... 468s margin (CMdl, [1, 2], [1; 2]) 468s ***** test 468s rand ("seed", 1); 468s C = cvpartition (y, 'HoldOut', 0.15); 468s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 468s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 468s CMdl = compact (Mdl); 468s testInds = test (C); 468s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 468s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 468s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 468s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 468s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 468s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 468s assert (L1, 2.8711, 1e-4); 468s assert (L2, 0.5333, 1e-4); 468s assert (L3, 10.9685, 1e-4); 468s assert (L4, 1.9827, 1e-4); 468s assert (L5, 1.5849, 1e-4); 468s assert (L6, 7.6739, 1e-4); 468s ***** error ... 468s loss (CMdl) 468s ***** error ... 468s loss (CMdl, zeros (2)) 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "LossFun") 468s ***** error ... 468s loss (CMdl, [], zeros (2)) 468s ***** error ... 468s loss (CMdl, 1, zeros (2)) 468s ***** error ... 468s loss (CMdl, [1, 2], []) 468s ***** error ... 468s loss (CMdl, [1, 2], [1; 2]) 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "LossFun", 1) 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "LossFun", "some") 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "Weights", 'a') 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 468s ***** error ... 468s loss (CMdl, [1, 2], 1, "some", "some") 468s 29 tests, 29 passed, 0 known failure, 0 skipped 468s [inst/Classification/ConfusionMatrixChart.m] 468s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Classification/ConfusionMatrixChart.m 468s ***** demo 468s ## Create a simple ConfusionMatrixChart Object 468s 468s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 468s NormalizedValues = cm.NormalizedValues 468s ClassLabels = cm.ClassLabels 468s ***** test 468s hf = figure ("visible", "off"); 468s unwind_protect 468s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 468s assert (isa (cm, "ConfusionMatrixChart"), true); 468s unwind_protect_cleanup 468s close (hf); 468s end_unwind_protect 468s 1 test, 1 passed, 0 known failure, 0 skipped 468s [inst/dendrogram.m] 468s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dendrogram.m 468s ***** demo 468s ## simple dendrogram 468s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 468s y(:,3) = 1:5; 468s dendrogram (y); 468s title ("simple dendrogram"); 468s ***** demo 468s ## another simple dendrogram 468s v = 2 * rand (30, 1) - 1; 468s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 468s y = linkage (squareform (d, "tovector")); 468s dendrogram (y); 468s title ("another simple dendrogram"); 468s ***** demo 468s ## collapsed tree, find all the leaves of node 5 468s X = randn (60, 2); 468s D = pdist (X); 468s y = linkage (D, "average"); 468s subplot (2, 1, 1); 468s title ("original tree"); 468s dendrogram (y, 0); 468s subplot (2, 1, 2); 468s title ("collapsed tree"); 468s [~, t] = dendrogram (y, 20); 468s find(t == 5) 468s ***** demo 468s ## optimal leaf order 468s X = randn (30, 2); 468s D = pdist (X); 468s y = linkage (D, "average"); 468s order = optimalleaforder (y, D); 468s subplot (2, 1, 1); 468s title ("original leaf order"); 468s dendrogram (y); 468s subplot (2, 1, 2); 468s title ("optimal leaf order"); 468s dendrogram (y, "Reorder", order); 468s ***** demo 468s ## horizontal orientation and labels 468s X = randn (8, 2); 468s D = pdist (X); 468s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 468s "Sneezy"; "Dopey"]; 468s y = linkage (D, "average"); 468s dendrogram (y, "Orientation", "left", "Labels", L); 468s title ("horizontal orientation and labels"); 468s ***** shared visibility_setting 468s visibility_setting = get (0, "DefaultFigureVisible"); 468s ***** test 468s hf = figure ("visible", "off"); 468s unwind_protect 468s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 468s y(:,3) = 1:5; 468s dendrogram (y); 468s unwind_protect_cleanup 468s close (hf); 468s end_unwind_protect 468s ***** test 468s hf = figure ("visible", "off"); 468s unwind_protect 468s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 468s y(:,3) = 1:5; 468s dendrogram (y); 468s unwind_protect_cleanup 468s close (hf); 468s end_unwind_protect 468s ***** test 468s hf = figure ("visible", "off"); 468s unwind_protect 468s v = 2 * rand (30, 1) - 1; 468s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 468s y = linkage (squareform (d, "tovector")); 468s dendrogram (y); 468s unwind_protect_cleanup 468s close (hf); 468s end_unwind_protect 469s ***** test 469s hf = figure ("visible", "off"); 469s unwind_protect 469s X = randn (30, 2); 469s D = pdist (X); 469s y = linkage (D, "average"); 469s order = optimalleaforder (y, D); 469s subplot (2, 1, 1); 469s title ("original leaf order"); 469s dendrogram (y); 469s subplot (2, 1, 2); 469s title ("optimal leaf order"); 469s dendrogram (y, "Reorder", order); 469s unwind_protect_cleanup 469s close (hf); 469s end_unwind_protect 470s ***** error dendrogram (); 470s ***** error dendrogram (ones (2, 2), 1); 470s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 470s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 470s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 470s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 470s 9 tests, 9 passed, 0 known failure, 0 skipped 470s [inst/runstest.m] 470s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/runstest.m 470s ***** test 470s ## NIST beam deflection data 470s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 470s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 470s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 470s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 470s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 470s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 470s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 470s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 470s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 470s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 470s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 470s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 470s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 470s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 470s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 470s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 470s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 470s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 470s [h, p, stats] = runstest (data, median (data)); 470s expected_h = 1; 470s expected_p = 0.008562; 470s expected_z = 2.6229; 470s assert (h, expected_h); 470s assert (p, expected_p, 1E-6); 470s assert (stats.z, expected_z, 1E-4); 470s ***** shared x 470s x = [45, -60, 1.225, 55.4, -9 27]; 470s ***** test 470s [h, p, stats] = runstest (x); 470s assert (h, 0); 470s assert (p, 0.6, 1e-14); 470s assert (stats.nruns, 5); 470s assert (stats.n1, 3); 470s assert (stats.n0, 3); 470s assert (stats.z, 0.456435464587638, 1e-14); 470s ***** test 470s [h, p, stats] = runstest (x, [], "method", "approximate"); 470s assert (h, 0); 470s assert (p, 0.6481, 1e-4); 470s assert (stats.z, 0.456435464587638, 1e-14); 470s ***** test 470s [h, p, stats] = runstest (x, [], "tail", "left"); 470s assert (h, 0); 470s assert (p, 0.9, 1e-14); 470s assert (stats.z, 1.369306393762915, 1e-14); 470s ***** error runstest (ones (2,20)) 470s ***** error runstest (["asdasda"]) 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], "updown") 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "method", "some") 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 470s ***** error ... 470s runstest ([2 3 4 3 2 3 4], [], "option", "some") 470s 14 tests, 14 passed, 0 known failure, 0 skipped 470s [inst/vartestn.m] 470s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/vartestn.m 470s ***** demo 470s ## Test the null hypothesis that the variances are equal across the five 470s ## columns of data in the students’ exam grades matrix, grades. 470s 470s load examgrades 470s vartestn (grades) 470s ***** demo 470s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 470s ## equal across different model years. 470s 470s load carsmall 470s vartestn (MPG, Model_Year) 470s ***** demo 470s ## Use Levene’s test to test the null hypothesis that the variances in miles 470s ## per gallon (MPG) are equal across different model years. 470s 470s load carsmall 470s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 470s ***** demo 470s ## Test the null hypothesis that the variances are equal across the five 470s ## columns of data in the students’ exam grades matrix, grades, using the 470s ## Brown-Forsythe test. Suppress the display of the summary table of 470s ## statistics and the box plot. 470s 470s load examgrades 470s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 470s ***** error vartestn (); 470s ***** error vartestn (1); 470s ***** error ... 470s vartestn ([1, 2, 3, 4, 5, 6, 7]); 470s ***** error ... 470s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 470s ***** error ... 470s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 470s ***** error ... 470s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 470s ***** error ... 470s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 470s ***** error ... 470s vartestn (ones (50,3), "Display", "some"); 470s ***** error ... 470s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 470s ***** error ... 470s vartestn (ones (50,3), [], "som"); 470s ***** error ... 470s vartestn (ones (50,3), [], "some", "some"); 470s ***** error ... 470s vartestn (ones (50,3), [1, 2], "Display", "off"); 470s ***** test 470s load examgrades 470s [p, stat] = vartestn (grades, "Display", "off"); 470s assert (p, 7.908647337018238e-08, 1e-14); 470s assert (stat.chisqstat, 38.7332, 1e-4); 470s assert (stat.df, 4); 470s ***** test 470s load examgrades 470s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 470s assert (p, 9.523239714592791e-07, 1e-14); 470s assert (stat.fstat, 8.5953, 1e-4); 470s assert (stat.df, [4, 595]); 470s ***** test 470s load examgrades 470s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 470s assert (p, 7.219514351897161e-07, 1e-14); 470s assert (stat.fstat, 8.7503, 1e-4); 470s assert (stat.df, [4, 595]); 470s ***** test 470s load examgrades 470s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 470s assert (p, 1.312093241723211e-06, 1e-14); 470s assert (stat.fstat, 8.4160, 1e-4); 470s assert (stat.df, [4, 595]); 470s ***** test 470s load examgrades 470s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 470s assert (p, 8.235660885480556e-07, 1e-14); 470s assert (stat.fstat, 8.6766, 1e-4); 470s assert (stat.df, [4, 595]); 470s 17 tests, 17 passed, 0 known failure, 0 skipped 470s [inst/hotelling_t2test.m] 470s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hotelling_t2test.m 470s ***** error hotelling_t2test (); 470s ***** error ... 470s hotelling_t2test (1); 470s ***** error ... 470s hotelling_t2test (ones(2,2,2)); 470s ***** error ... 470s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 470s ***** error ... 470s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 470s ***** error ... 470s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 470s ***** error ... 470s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 470s ***** error ... 470s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 470s ***** error ... 470s hotelling_t2test (ones(20,1), [0, 0]); 470s ***** error ... 470s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 470s ***** error ... 470s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 470s ***** test 470s randn ("seed", 1); 470s x = randn (50000, 5); 470s [h, pval, stats] = hotelling_t2test (x); 470s assert (h, 0); 470s assert (stats.df1, 5); 470s assert (stats.df2, 49995); 470s ***** test 470s randn ("seed", 1); 470s x = randn (50000, 5); 470s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 470s assert (h, 1); 470s assert (stats.df1, 5); 470s assert (stats.df2, 49995); 470s 13 tests, 13 passed, 0 known failure, 0 skipped 470s [inst/vartest.m] 470s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/vartest.m 470s ***** error vartest (); 470s ***** error vartest ([1, 2, 3, 4], -0.5); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 0); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "tail", "val"); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "dim", 3); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 470s ***** error ... 470s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 470s ***** test 470s load carsmall 470s [h, pval, ci] = vartest (MPG, 7^2); 470s assert (h, 1); 470s assert (pval, 0.04335086742174443, 1e-14); 470s assert (ci, [49.397; 88.039], 1e-3); 471s 12 tests, 12 passed, 0 known failure, 0 skipped 471s [inst/fitcgam.m] 471s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitcgam.m 471s ***** demo 471s ## Train a GAM classifier for binary classification 471s ## using specific data and plot the decision boundaries. 471s 471s ## Define specific data 471s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 471s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 471s Y = [0; 0; 0; 0; 0; ... 471s 1; 1; 1; 1; 1]; 471s 471s ## Train the GAM model 471s obj = fitcgam (X, Y, "Interactions", "all"); 471s 471s ## Create a grid of values for prediction 471s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 471s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 471s [x1G, x2G] = meshgrid (x1, x2); 471s XGrid = [x1G(:), x2G(:)]; 471s pred = predict (obj, XGrid); 471s 471s ## Plot decision boundaries and data points 471s predNumeric = str2double (pred); 471s gidx = predNumeric > 0.5; 471s 471s figure 471s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 471s hold on 471s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 471s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 471s xlabel("Feature 1"); 471s ylabel("Feature 2"); 471s title("Generalized Additive Model (GAM) Decision Boundary"); 471s legend({"Class 1 Region", "Class 0 Region", ... 471s "Class 1 Samples", "Class 0 Samples"}, ... 471s "location", "northwest") 471s axis tight 471s hold off 471s ***** test 471s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 471s y = [0; 0; 1; 1]; 471s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 471s a = fitcgam (x, y, "PredictorNames", PredictorNames); 471s assert (class (a), "ClassificationGAM"); 471s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 471s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 471s assert (a.ClassNames, {'0'; '1'}) 471s assert (a.PredictorNames, PredictorNames) 471s assert (a.BaseModel.Intercept, 0) 471s ***** test 471s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 471s y = [1; 0; 1; 0; 1]; 471s a = fitcgam (x, y, "interactions", "all"); 471s assert (class (a), "ClassificationGAM"); 471s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 471s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 471s assert (a.ClassNames, {'1'; '0'}) 471s assert (a.PredictorNames, {'x1', 'x2'}) 471s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 473s ***** test 473s load fisheriris 473s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 473s X = meas(inds, :); 473s Y = species(inds, :)'; 473s Y = strcmp (Y, 'virginica')'; 473s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 473s assert (class (a), "ClassificationGAM"); 473s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 473s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 473s assert (a.ClassNames, {'0'; '1'}) 473s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 473s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 473s assert (a.ModelwInt.Intercept, 0) 476s ***** error fitcgam () 476s ***** error fitcgam (ones (4,1)) 476s ***** error 476s fitcgam (ones (4,2), ones (4, 1), "K") 476s ***** error 476s fitcgam (ones (4,2), ones (3, 1)) 476s ***** error 476s fitcgam (ones (4,2), ones (3, 1), "K", 2) 476s 8 tests, 8 passed, 0 known failure, 0 skipped 476s [inst/regression_ttest.m] 476s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/regression_ttest.m 476s ***** error regression_ttest (); 476s ***** error regression_ttest (1); 476s ***** error ... 476s regression_ttest ([1 2 NaN]', [2 3 4]'); 476s ***** error ... 476s regression_ttest ([1 2 Inf]', [2 3 4]'); 476s ***** error ... 476s regression_ttest ([1 2 3+i]', [2 3 4]'); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 NaN]'); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 Inf]'); 476s ***** error ... 476s regression_ttest ([1 2 3]', [3 4 3+i]'); 476s ***** error ... 476s regression_ttest ([1 2 3]', [3 4 4 5]'); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 476s ***** error ... 476s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 476s 16 tests, 16 passed, 0 known failure, 0 skipped 476s [inst/ridge.m] 476s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ridge.m 476s ***** demo 476s ## Perform ridge regression for a range of ridge parameters and observe 476s ## how the coefficient estimates change based on the acetylene dataset. 476s 476s load acetylene 476s 476s X = [x1, x2, x3]; 476s 476s x1x2 = x1 .* x2; 476s x1x3 = x1 .* x3; 476s x2x3 = x2 .* x3; 476s 476s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 476s 476s k = 0:1e-5:5e-3; 476s 476s b = ridge (y, D, k); 476s 476s figure 476s plot (k, b, "LineWidth", 2) 476s ylim ([-100, 100]) 476s grid on 476s xlabel ("Ridge Parameter") 476s ylabel ("Standardized Coefficient") 476s title ("Ridge Trace") 476s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 476s 476s ***** demo 476s 476s load carbig 476s X = [Acceleration Weight Displacement Horsepower]; 476s y = MPG; 476s 476s n = length(y); 476s 476s rand("seed",1); % For reproducibility 476s 476s c = cvpartition(n,'HoldOut',0.3); 476s idxTrain = training(c,1); 476s idxTest = ~idxTrain; 476s 476s idxTrain = training(c,1); 476s idxTest = ~idxTrain; 476s 476s k = 5; 476s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 476s 476s % Predict MPG values for the test data using the model. 476s yhat = b(1) + X(idxTest,:)*b(2:end); 476s scatter(y(idxTest),yhat) 476s 476s hold on 476s plot(y(idxTest),y(idxTest),"r") 476s xlabel('Actual MPG') 476s ylabel('Predicted MPG') 476s hold off 476s 476s ***** test 476s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 476s assert (b, [0.5533; 0.5533], 1e-4); 476s ***** test 476s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 476s assert (b, [0.4841; 0.4841], 1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0); 476s assert (b,[10.2273;1.97128;-0.601818],1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0.0005); 476s assert (b,[10.2233;1.9712;-0.6056],1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0.001); 476s assert (b,[10.2194;1.9711;-0.6094],1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0.002); 476s assert (b,[10.2116;1.9709;-0.6169],1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0.005); 476s assert (b,[10.1882;1.9704;-0.6393],1e-4); 476s ***** test 476s load acetylene 476s x = [x1, x2, x3]; 476s b = ridge (y, x, 0.01); 476s assert (b,[10.1497;1.9695;-0.6761],1e-4); 476s ***** error ridge (1) 476s ***** error ridge (1, 2) 476s ***** error ridge (ones (3), ones (3), 2) 476s ***** error ridge ([1, 2], ones (2), 2) 476s ***** error ridge ([], ones (3), 2) 476s ***** error ridge (ones (5,1), [], 2) 476s ***** error ... 476s ridge ([1; 2; 3; 4; 5], ones (3), 3) 476s ***** error ... 476s ridge ([1; 2; 3], ones (3), 3, 2) 476s ***** error ... 476s ridge ([1; 2; 3], ones (3), 3, "some") 476s 17 tests, 17 passed, 0 known failure, 0 skipped 476s [inst/sigma_pts.m] 476s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/sigma_pts.m 476s ***** demo 476s K = [1 0.5; 0.5 1]; # covaraince matrix 476s # calculate and build associated ellipse 476s [R,S,~] = svd (K); 476s theta = atan2 (R(2,1), R(1,1)); 476s v = sqrt (diag (S)); 476s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 476s t = linspace (0, 2*pi, 100).'; 476s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 476s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 476s 476s figure(1); clf; hold on 476s # Plot ellipse and axes 476s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 476s plot (xe,ye,'-r'); 476s 476s col = 'rgb'; 476s l = [-1.8 -1 1.5]; 476s for li = 1:3 476s p = sigma_pts (2, [], K, l(li)); 476s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 476s p(1,1), p(1,2), ['o' col(li)]); 476s h(li) = tmp(1); 476s endfor 476s hold off 476s axis image 476s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 476s ***** test 476s p = sigma_pts (5); 476s assert (mean (p), zeros(1,5), sqrt(eps)); 476s assert (cov (p), eye(5), sqrt(eps)); 476s ***** test 476s m = randn(1, 5); 476s p = sigma_pts (5, m); 476s assert (mean (p), m, sqrt(eps)); 476s assert (cov (p), eye(5), sqrt(eps)); 476s ***** test 476s x = linspace (0,1,5); 476s K = exp (- (x.' - x).^2/ 0.5); 476s p = sigma_pts (5, [], K); 476s assert (mean (p), zeros(1,5), sqrt(eps)); 476s assert (cov (p), K, sqrt(eps)); 476s ***** error sigma_pts(2,1); 476s ***** error sigma_pts(2,[],1); 476s ***** error sigma_pts(2,1,1); 476s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 476s 7 tests, 7 passed, 0 known failure, 0 skipped 476s [inst/slicesample.m] 476s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/slicesample.m 476s ***** demo 476s ## Define function to sample 476s d = 2; 476s mu = [-1; 2]; 476s rand ("seed", 5) # for reproducibility 476s Sigma = rand (d); 476s Sigma = (Sigma + Sigma'); 476s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 476s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 476s 476s ## Inputs 476s start = ones (1,2); 476s nsamples = 500; 476s K = 500; 476s m = 10; 476s rande ("seed", 4); rand ("seed", 5) # for reproducibility 476s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 476s figure; 476s hold on; 476s plot (smpl(:,1), smpl(:,2), 'x'); 476s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 476s z = reshape (pdf ([x(:), y(:)]), size(x)); 476s mesh (x, y, z, "facecolor", "None"); 476s 476s ## Using sample points to find the volume of half a sphere with radius of .5 476s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 476s int = mean (f (smpl) ./ pdf (smpl)); 476s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 476s trueerr = abs (2/3*pi*.25^(3/2)-int); 476s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 476s fprintf ("Monte Carlo integral error estimate %f\n", errest); 476s fprintf ("The actual error %f\n", trueerr); 476s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 476s ***** demo 476s ## Integrate truncated normal distribution to find normilization constant 476s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 476s nsamples = 1e3; 476s rande ("seed", 4); rand ("seed", 5) # for reproducibility 476s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 476s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 476s x = linspace (-3, 3, 1000); 476s area (x, f(x)); 476s xlabel ("x"); 476s ylabel ("f(x)"); 476s int = mean (f (smpl) ./ pdf (smpl)); 476s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 476s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 476s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 476s fprintf("Monte Carlo integral error estimate %f\n", errest); 476s fprintf("The actual error %f\n", trueerr); 476s ***** test 476s start = 0.5; 476s nsamples = 1e3; 476s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 476s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 476s assert (mean (smpl, 1), 1, .15); 476s assert (var (smpl, 1), 1, .25); 477s ***** error slicesample (); 477s ***** error slicesample (1); 477s ***** error slicesample (1, 1); 477s 4 tests, 4 passed, 0 known failure, 0 skipped 477s [inst/procrustes.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/procrustes.m 477s ***** demo 477s ## Create some random points in two dimensions 477s n = 10; 477s randn ("seed", 1); 477s X = normrnd (0, 1, [n, 2]); 477s 477s ## Those same points, rotated, scaled, translated, plus some noise 477s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 477s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 477s 477s ## Conform Y to X, plot original X and Y, and transformed Y 477s [d, Z] = procrustes (X, Y); 477s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 477s ***** demo 477s ## Find Procrustes distance and plot superimposed shape 477s 477s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 477s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 477s plot (X(:,1),X(:,2),"x"); 477s hold on 477s plot (Y(:,1),Y(:,2),"o"); 477s xlim ([0 100]); 477s ylim ([0 100]); 477s legend ("Target shape (X)", "Source shape (Y)"); 477s [d, Z] = procrustes (X, Y) 477s plot (Z(:,1), Z(:,2), "s"); 477s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 477s hold off 477s ***** demo 477s ## Apply Procrustes transformation to larger set of points 477s 477s ## Create matrices with landmark points for two triangles 477s X = [5, 0; 5, 5; 8, 5]; # target 477s Y = [0, 0; 1, 0; 1, 1]; # source 477s 477s ## Create a matrix with more points on the source triangle 477s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 477s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 477s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 477s 477s ## Plot both shapes, including the larger set of points for the source shape 477s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 477s hold on 477s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 477s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 477s xlim ([-1 10]); 477s ylim ([-1 6]); 477s legend ("Target shape (X)", "Source shape (Y)", ... 477s "More points on Y", "Location", "northwest"); 477s hold off 477s 477s ## Obtain the Procrustes transformation 477s [d, Z, transform] = procrustes (X, Y) 477s 477s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 477s ## on the source shape onto the target shape, and then visualize the results. 477s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 477s figure 477s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 477s hold on 477s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 477s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 477s xlim ([-1 10]); 477s ylim ([-1 6]); 477s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 477s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 477s legend ("Target shape (X)", "Source shape (Y)", ... 477s "More points on Y", "Transformed source shape (Z)", ... 477s "Transformed additional points", "Location", "northwest"); 477s hold off 477s ***** demo 477s ## Compare shapes without reflection 477s 477s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 477s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 477s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 477s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 477s plot (T(:,1), T(:,2), "x-"); 477s hold on 477s plot (S(:,1), S(:,2), "o-"); 477s legend ("Target shape (d)", "Source shape (b)"); 477s hold off 477s d_false = procrustes (T, S, "reflection", false); 477s printf ("Procrustes distance without reflection: %f\n", d_false); 477s d_true = procrustes (T, S, "reflection", true); 477s printf ("Procrustes distance with reflection: %f\n", d_true); 477s d_best = procrustes (T, S, "reflection", "best"); 477s printf ("Procrustes distance with best fit: %f\n", d_true); 477s ***** error procrustes (); 477s ***** error procrustes (1, 2, 3, 4, 5, 6); 477s ***** error ... 477s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (11, 3)); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 4)); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), true); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 477s 15 tests, 15 passed, 0 known failure, 0 skipped 477s [inst/bar3h.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/bar3h.m 477s ***** demo 477s ## Ploting 5 bars in the same series. 477s 477s y = [50; 40; 30; 20; 10]; 477s bar3h (y); 477s ***** demo 477s ## Ploting 5 bars in different groups. 477s 477s y = [50, 40, 30, 20, 10]; 477s bar3h (y); 477s ***** demo 477s ## A 3D bar graph with each series corresponding to a column in y. 477s 477s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 477s bar3h (y); 477s ***** demo 477s ## Specify z-axis locations as tick names. z must be a column vector! 477s 477s z = [1950, 1960, 1970, 1980, 1990]'; 477s y = [16, 8, 4, 2, 1]'; 477s bar3h (z, y); 477s ***** demo 477s ## Plot 3 series as a grouped plot without any space between the grouped bars 477s 477s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 477s bar3h (y, 1, 'grouped'); 477s ***** demo 477s ## Plot a stacked style 3D bar graph 477s 477s y = [19, 30, 21, 30; 40, 16, 32, 12]; 477s b = bar3h (y, 0.5, 'stacked'); 477s ***** error bar3h ("A") 477s ***** error bar3h ({2,3,4,5}) 477s ***** error ... 477s bar3h ([1,2,3]', ones (2)) 477s ***** error ... 477s bar3h ([1:5], 1.2) 477s ***** error ... 477s bar3h ([1:5]', ones (5), 1.2) 477s ***** error ... 477s bar3h ([1:5]', ones (5), [0.8, 0.7]) 477s ***** error ... 477s bar3h (ones (5), 'width') 477s ***** error ... 477s bar3h (ones (5), 'width', 1.2) 477s ***** error ... 477s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 477s ***** error ... 477s bar3h (ones (5), 'color') 477s ***** error ... 477s bar3h (ones (5), 'color', [0.8, 0.8]) 477s ***** error ... 477s bar3h (ones (5), 'color', "brown") 477s ***** error ... 477s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 477s ***** error ... 477s bar3h (ones (5), 'xlabel') 477s ***** error ... 477s bar3h (ones (5), 'xlabel', 4) 477s ***** error ... 477s bar3h (ones (5), 'zlabel') 477s ***** error ... 477s bar3h (ones (5), 'zlabel', 4) 477s ***** error bar3h (ones (5), 'this', 4) 477s ***** error ... 477s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 477s ***** error ... 477s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 477s 20 tests, 20 passed, 0 known failure, 0 skipped 477s [inst/linkage.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/linkage.m 477s ***** shared x, t 477s x = reshape (mod (magic (6),5), [], 3); 477s t = 1e-6; 477s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 477s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 477s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 477s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 477s lastwarn(); # Clear last warning before the test 477s ***** warning linkage (pdist (x), "centroid"); 477s ***** test 477s warning off Octave:clustering 477s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 477s warning on Octave:clustering 477s ***** warning linkage (pdist (x), "median"); 477s ***** test 477s warning off Octave:clustering 477s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 477s warning on Octave:clustering 477s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 477s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 477s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 477s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 477s 12 tests, 12 passed, 0 known failure, 0 skipped 477s [inst/combnk.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/combnk.m 477s ***** demo 477s c = combnk (1:5, 2); 477s disp ("All pairs of integers between 1 and 5:"); 477s disp (c); 477s ***** test 477s c = combnk (1:3, 2); 477s assert (c, [1, 2; 1, 3; 2, 3]); 477s ***** test 477s c = combnk (1:3, 6); 477s assert (isempty (c)); 477s ***** test 477s c = combnk ({1, 2, 3}, 2); 477s assert (c, {1, 2; 1, 3; 2, 3}); 477s ***** test 477s c = combnk ("hello", 2); 477s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 477s 4 tests, 4 passed, 0 known failure, 0 skipped 477s [inst/binotest.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/binotest.m 477s ***** demo 477s % flip a coin 1000 times, showing 475 heads 477s % Hypothesis: coin is fair, i.e. p=1/2 477s [h,p_val,ci] = binotest(475,1000,0.5) 477s % Result: h = 0 : null hypothesis not rejected, coin could be fair 477s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 477s % 0.444 <= p <= 0.506 with 95% confidence 477s ***** demo 477s % flip a coin 100 times, showing 65 heads 477s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 477s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 477s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 477s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 477s % 0 <= p <= 0.76 with 99% confidence 477s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 477s [h,p_val,ci] = binotest (51,235,1/6); 477s assert (p_val, 0.0437, 0.00005) 477s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 477s assert (p_val, 0.027, 0.0005) 477s 1 test, 1 passed, 0 known failure, 0 skipped 477s [inst/levene_test.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/levene_test.m 477s ***** error levene_test () 477s ***** error ... 477s levene_test (1, 2, 3, 4, 5); 477s ***** error levene_test (randn (50, 2), 0); 477s ***** error ... 477s levene_test (randn (50, 2), [1, 2, 3]); 477s ***** error ... 477s levene_test (randn (50, 1), ones (55, 1)); 477s ***** error ... 477s levene_test (randn (50, 1), ones (50, 2)); 477s ***** error ... 477s levene_test (randn (50, 2), [], 1.2); 477s ***** error ... 477s levene_test (randn (50, 2), "some_string"); 477s ***** error ... 477s levene_test (randn (50, 2), [], "alpha"); 477s ***** error ... 477s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 477s ***** error ... 477s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 477s ***** error ... 477s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 477s ***** warning ... 477s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades); 477s assert (h, 1); 477s assert (pval, 9.523239714592791e-07, 1e-14); 477s assert (W, 8.59529, 1e-5); 477s assert (df, [4, 595]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 477s assert (h, 1); 477s assert (pval, 9.523239714592791e-07, 1e-14); 477s assert (W, 8.59529, 1e-5); 477s assert (df, [4, 595]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades, [], "median"); 477s assert (h, 1); 477s assert (pval, 1.312093241723211e-06, 1e-14); 477s assert (W, 8.415969, 1e-6); 477s assert (df, [4, 595]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades(:,[1:3])); 477s assert (h, 1); 477s assert (pval, 0.004349390980463497, 1e-14); 477s assert (W, 5.52139, 1e-5); 477s assert (df, [2, 357]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 477s assert (h, 1); 477s assert (pval, 0.004355216763951453, 1e-14); 477s assert (W, 5.52001, 1e-5); 477s assert (df, [2, 357]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 477s assert (h, 0); 477s assert (pval, 0.1807494957440653, 2e-14); 477s assert (W, 1.80200, 1e-5); 477s assert (df, [1, 238]); 477s ***** test 477s load examgrades 477s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 477s assert (h, 0); 477s assert (pval, 0.1978225622063785, 2e-14); 477s assert (W, 1.66768, 1e-5); 477s assert (df, [1, 238]); 477s 20 tests, 20 passed, 0 known failure, 0 skipped 477s [inst/evalclusters.m] 477s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/evalclusters.m 477s ***** demo 477s load fisheriris; 477s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 477s plot (eva) 477s ***** error evalclusters () 477s ***** error evalclusters ([1 1;0 1]) 477s ***** error evalclusters ([1 1;0 1], "kmeans") 477s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 477s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 477s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 477s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 477s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 477s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 477s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 477s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 477s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 477s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 477s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 477s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 477s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 477s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 477s "distance", "a") 477s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 477s "distance", "a") 477s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 477s "clusterpriors", "equal") 477s ***** error evalclusters ([1 1;0 1], [1; 2], ... 477s "silhouette", "clusterpriors", "xxx") 477s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 477s ***** test 477s load fisheriris; 477s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 477s assert (isa (eva, "CalinskiHarabaszEvaluation")); 477s assert (eva.NumObservations, 150); 477s assert (eva.OptimalK, 3); 477s assert (eva.InspectedK, [1 2 3 4 5 6]); 478s 22 tests, 22 passed, 0 known failure, 0 skipped 478s [inst/einstein.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/einstein.m 478s ***** demo 478s einstein (0.4, 0.6) 478s ***** demo 478s einstein (0.2, 0.5) 478s ***** demo 478s einstein (0.6, 0.1) 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s tiles = einstein (0.4, 0.6); 478s assert (isstruct (tiles), true); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** error einstein 478s ***** error einstein (0.5) 478s ***** error einstein (0, 0.9) 478s ***** error einstein (0.4, 1) 478s ***** error einstein (-0.4, 1) 478s 6 tests, 6 passed, 0 known failure, 0 skipped 478s [inst/fitcdiscr.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitcdiscr.m 478s ***** demo 478s ## Train a linear discriminant classifier for Gamma = 0.5 478s ## and plot the decision boundaries. 478s 478s load fisheriris 478s idx = ! strcmp (species, "setosa"); 478s X = meas(idx,3:4); 478s Y = cast (strcmpi (species(idx), "virginica"), "double"); 478s obj = fitcdiscr (X, Y, "Gamma", 0.5) 478s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 478s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 478s [x1G, x2G] = meshgrid (x1, x2); 478s XGrid = [x1G(:), x2G(:)]; 478s pred = predict (obj, XGrid); 478s gidx = logical (str2num (cell2mat (pred))); 478s 478s figure 478s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 478s hold on 478s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 478s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 478s xlabel ("Petal length (cm)"); 478s ylabel ("Petal width (cm)"); 478s title ("Linear Discriminant Analysis Decision Boundary"); 478s legend ({"Versicolor Region", "Virginica Region", ... 478s "Sampled Versicolor", "Sampled Virginica"}, ... 478s "location", "northwest") 478s axis tight 478s hold off 478s ***** test 478s load fisheriris 478s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 478s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 478s assert (label, {'versicolor'}) 478s assert (score, [0, 0.9999, 0.0001], 1e-4) 478s assert (cost, [1, 0.0001, 0.9999], 1e-4) 478s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 478s assert (label, {'versicolor'}) 478s assert (score, [0, 0.6368, 0.3632], 1e-4) 478s assert (cost, [1, 0.3632, 0.6368], 1e-4) 478s assert (class (Mdl), "ClassificationDiscriminant"); 478s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 478s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 478s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 478s assert (Mdl.ClassNames, unique (species)) 478s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 478s 0.046361, 0.115388, 0.027622, 0.016355; ... 478s 0.083757, 0.027622, 0.185188, 0.021333; ... 478s 0.019201, 0.016355, 0.021333, 0.041882]; 478s assert (Mdl.Sigma, sigma, 1e-6) 478s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 478s 5.9360, 2.7700, 4.2600, 1.3260; ... 478s 6.5880, 2.9740, 5.5520, 2.0260]; 478s assert (Mdl.Mu, mu, 1e-14) 478s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 478s ***** error fitcdiscr () 478s ***** error fitcdiscr (ones (4,1)) 478s ***** error 478s fitcdiscr (ones (4,2), ones (4, 1), "K") 478s ***** error 478s fitcdiscr (ones (4,2), ones (3, 1)) 478s ***** error 478s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 478s 6 tests, 6 passed, 0 known failure, 0 skipped 478s [inst/ttest2.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ttest2.m 478s ***** test 478s a = 1:5; 478s b = 6:10; 478s b(5) = NaN; 478s [h,p,ci,stats] = ttest2 (a,b); 478s assert (h, 1); 478s assert (p, 0.002535996080258229, 1e-14); 478s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 478s assert (stats.tstat, -4.582575694955839, 1e-14); 478s assert (stats.df, 7); 478s assert (stats.sd, 1.4638501094228, 1e-13); 478s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 478s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 478s 3 tests, 3 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/logllike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/logllike.m 478s ***** test 478s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 478s assert (nlogL, 211.2965, 1e-4); 478s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 478s ***** test 478s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 478s assert (nlogL, 9.2206, 1e-4); 478s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 478s ***** error logllike (3.25) 478s ***** error logllike ([5, 0.2], ones (2)) 478s ***** error ... 478s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 478s ***** error ... 478s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 478s ***** error ... 478s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 478s ***** error ... 478s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 478s 8 tests, 8 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/wbllike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/wbllike.m 478s ***** test 478s x = 1:50; 478s [nlogL, acov] = wbllike ([2.3, 1.2], x); 478s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 478s assert (nlogL, 945.9589180651594, 1e-12); 478s assert (acov, avar_out, 1e-4); 478s ***** test 478s x = 1:50; 478s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 478s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 478s assert (nlogL, 424.9879809704742, 6e-14); 478s assert (acov, avar_out, 1e-4); 478s ***** test 478s x = 1:50; 478s [nlogL, acov] = wbllike ([21, 15], x); 478s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 478s assert (nlogL, 1635190.328991511, 1e-8); 478s assert (acov, avar_out, 1e-8); 478s ***** error wbllike ([12, 15]); 478s ***** error wbllike ([12, 15, 3], [1:50]); 478s ***** error wbllike ([12, 3], ones (10, 2)); 478s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 478s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 478s ***** error ... 478s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 478s 9 tests, 9 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/gumbellike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gumbellike.m 478s ***** test 478s x = 1:50; 478s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 478s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 478s assert (nlogL, 3.242264755689906e+17, 1e-14); 478s assert (avar, avar_out, 1e-3); 478s ***** test 478s x = 1:50; 478s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 478s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 478s assert (nlogL, 481898704.0472211, 1e-6); 478s assert (avar, avar_out, 1e-3); 478s ***** test 478s x = 1:50; 478s [nlogL, avar] = gumbellike ([21, 15], x); 478s avar_out = [11.73913876598908, -5.9546128523121216; ... 478s -5.954612852312121, 3.708060045170236]; 478s assert (nlogL, 223.7612479380652, 1e-13); 478s assert (avar, avar_out, 1e-14); 478s ***** error gumbellike ([12, 15]); 478s ***** error gumbellike ([12, 15, 3], [1:50]); 478s ***** error gumbellike ([12, 3], ones (10, 2)); 478s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 478s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 478s 8 tests, 8 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/hnfit.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/hnfit.m 478s ***** demo 478s ## Sample 2 populations from different half-normal distibutions 478s rand ("seed", 1); # for reproducibility 478s r1 = hnrnd (0, 5, 5000, 1); 478s rand ("seed", 2); # for reproducibility 478s r2 = hnrnd (0, 2, 5000, 1); 478s r = [r1, r2]; 478s 478s ## Plot them normalized and fix their colors 478s hist (r, [0.5:20], 1); 478s h = findobj (gca, "Type", "patch"); 478s set (h(1), "facecolor", "c"); 478s set (h(2), "facecolor", "g"); 478s hold on 478s 478s ## Estimate their shape parameters 478s mu_sigmaA = hnfit (r(:,1), 0); 478s mu_sigmaB = hnfit (r(:,2), 0); 478s 478s ## Plot their estimated PDFs 478s x = [0:0.2:10]; 478s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 478s plot (x, y, "-pr"); 478s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 478s plot (x, y, "-sg"); 478s xlim ([0, 10]) 478s ylim ([0, 0.5]) 478s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 478s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 478s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 478s mu_sigmaA(1), mu_sigmaA(2)), ... 478s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 478s mu_sigmaB(1), mu_sigmaB(2))}) 478s title ("Two population samples from different half-normal distibutions") 478s hold off 478s ***** test 478s x = 1:20; 478s [paramhat, paramci] = hnfit (x, 0); 478s assert (paramhat, [0, 11.9791], 1e-4); 478s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 478s ***** test 478s x = 1:20; 478s [paramhat, paramci] = hnfit (x, 0, 0.01); 478s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 478s ***** error hnfit () 478s ***** error hnfit (1) 478s ***** error hnfit ([0.2, 0.5+i], 0); 478s ***** error hnfit (ones (2,2) * 0.5, 0); 478s ***** error ... 478s hnfit ([0.5, 1.2], [0, 1]); 478s ***** error ... 478s hnfit ([0.5, 1.2], 5+i); 478s ***** error ... 478s hnfit ([1:5], 2); 478s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 478s ***** error hnfit ([0.01:0.1:0.99], 0, i); 478s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 478s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 478s ***** error 478s hnfit ([1 2 3], 0, [], [1 5]) 478s ***** error 478s hnfit ([1 2 3], 0, [], [1 5 -1]) 478s 15 tests, 15 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/betalike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/betalike.m 478s ***** test 478s x = 0.01:0.02:0.99; 478s [nlogL, avar] = betalike ([2.3, 1.2], x); 478s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 478s assert (nlogL, 17.873477715879040, 3e-14); 478s assert (avar, avar_out, 1e-7); 478s ***** test 478s x = 0.01:0.02:0.99; 478s [nlogL, avar] = betalike ([1, 4], x); 478s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 478s assert (nlogL, 79.648061114839550, 1e-13); 478s assert (avar, avar_out, 1e-7); 478s ***** test 478s x = 0.00:0.02:1; 478s [nlogL, avar] = betalike ([1, 4], x); 478s avar_out = [0.00000801564765, 0.00000131397245; ... 478s 0.00000131397245, 0.00070827639442]; 478s assert (nlogL, 573.2008434477486, 1e-10); 478s assert (avar, avar_out, 1e-14); 478s ***** error ... 478s betalike ([12, 15]); 478s ***** error betalike ([12, 15, 3], [1:50]); 478s ***** error ... 478s betalike ([12, 15], ones (10, 1), ones (8,1)) 478s ***** error ... 478s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 478s ***** error ... 478s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 478s 8 tests, 8 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/binolike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/binolike.m 478s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 478s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 478s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 478s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 478s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 478s ***** test 478s [nlogL, acov] = binolike ([3, 0.333], 3); 478s assert (acov(4), 0.0740, 1e-4) 478s ***** error binolike (3.25) 478s ***** error binolike ([5, 0.2], ones (2)) 478s ***** error ... 478s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 478s ***** error binolike ([1.5, 0.2], 1) 478s ***** error binolike ([-1, 0.2], 1) 478s ***** error binolike ([Inf, 0.2], 1) 478s ***** error binolike ([5, 1.2], [3, 5]) 478s ***** error binolike ([5, -0.2], [3, 5]) 478s ***** error ... 478s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 478s ***** error ... 478s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 478s ***** error binolike ([5, 0.2], [-1, 3]) 478s ***** error binolike ([5, 0.2], [3, 5, 7]) 478s 18 tests, 18 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/nbinfit.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/nbinfit.m 478s ***** demo 478s ## Sample 2 populations from different negative binomial distibutions 478s randp ("seed", 5); randg ("seed", 5); # for reproducibility 478s r1 = nbinrnd (2, 0.15, 5000, 1); 478s randp ("seed", 8); randg ("seed", 8); # for reproducibility 478s r2 = nbinrnd (5, 0.2, 5000, 1); 478s r = [r1, r2]; 478s 478s ## Plot them normalized and fix their colors 478s hist (r, [0:51], 1); 478s h = findobj (gca, "Type", "patch"); 478s set (h(1), "facecolor", "c"); 478s set (h(2), "facecolor", "g"); 478s hold on 478s 478s ## Estimate their probability of success 478s r_psA = nbinfit (r(:,1)); 478s r_psB = nbinfit (r(:,2)); 478s 478s ## Plot their estimated PDFs 478s x = [0:40]; 478s y = nbinpdf (x, r_psA(1), r_psA(2)); 478s plot (x, y, "-pg"); 478s x = [min(r(:,2)):max(r(:,2))]; 478s y = nbinpdf (x, r_psB(1), r_psB(2)); 478s plot (x, y, "-sc"); 478s ylim ([0, 0.1]) 478s xlim ([0, 50]) 478s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 478s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 478s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 478s r_psA(1), r_psA(2)), ... 478s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 478s r_psB(1), r_psB(2))}) 478s title ("Two population samples from negative different binomial distibutions") 478s hold off 478s ***** test 478s [paramhat, paramci] = nbinfit ([1:50]); 478s assert (paramhat, [2.420857, 0.086704], 1e-6); 478s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 478s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 478s ***** test 478s [paramhat, paramci] = nbinfit ([1:20]); 478s assert (paramhat, [3.588233, 0.254697], 1e-6); 478s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 478s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 478s ***** test 478s [paramhat, paramci] = nbinfit ([1:10]); 478s assert (paramhat, [8.8067, 0.6156], 1e-4); 478s assert (paramci(:,1), [0; 30.7068], 1e-4); 478s assert (paramci(:,2), [0.0217; 1], 1e-4); 478s ***** test 478s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 478s assert (paramhat, [8.8067, 0.6156], 1e-4); 478s assert (paramci(:,1), [0; 30.7068], 1e-4); 478s assert (paramci(:,2), [0.0217; 1], 1e-4); 478s ***** test 478s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 478s assert (paramhat, [8.8067, 0.6156], 1e-4); 478s assert (paramci(:,1), [0; 30.7068], 1e-4); 478s assert (paramci(:,2), [0.0217; 1], 1e-4); 478s ***** error nbinfit ([-1 2 3 3]) 478s ***** error nbinfit (ones (2)) 478s ***** error nbinfit ([1 2 1.2 3]) 478s ***** error nbinfit ([1 2 3], 0) 478s ***** error nbinfit ([1 2 3], 1.2) 478s ***** error nbinfit ([1 2 3], [0.02 0.05]) 478s ***** error ... 478s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 478s ***** error ... 478s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 478s ***** error ... 478s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 478s ***** error ... 478s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 478s ***** error ... 478s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 478s 16 tests, 16 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/binofit.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/binofit.m 478s ***** demo 478s ## Sample 2 populations from different binomial distibutions 478s rand ("seed", 1); # for reproducibility 478s r1 = binornd (50, 0.15, 1000, 1); 478s rand ("seed", 2); # for reproducibility 478s r2 = binornd (100, 0.5, 1000, 1); 478s r = [r1, r2]; 478s 478s ## Plot them normalized and fix their colors 478s hist (r, 23, 0.35); 478s h = findobj (gca, "Type", "patch"); 478s set (h(1), "facecolor", "c"); 478s set (h(2), "facecolor", "g"); 478s hold on 478s 478s ## Estimate their probability of success 478s pshatA = binofit (r(:,1), 50); 478s pshatB = binofit (r(:,2), 100); 478s 478s ## Plot their estimated PDFs 478s x = [min(r(:,1)):max(r(:,1))]; 478s y = binopdf (x, 50, mean (pshatA)); 478s plot (x, y, "-pg"); 478s x = [min(r(:,2)):max(r(:,2))]; 478s y = binopdf (x, 100, mean (pshatB)); 478s plot (x, y, "-sc"); 478s ylim ([0, 0.2]) 478s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 478s "Normalized HIST of sample 2 with ps=0.50", ... 478s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 478s mean (pshatA)), ... 478s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 478s mean (pshatB))}) 478s title ("Two population samples from different binomial distibutions") 478s hold off 478s ***** test 478s x = 0:3; 478s [pshat, psci] = binofit (x, 3); 478s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 478s assert (psci(1,:), [0, 0.7076], 1e-4); 478s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 478s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 478s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 478s ***** error ... 478s binofit ([1 2 3 4]) 478s ***** error ... 478s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 478s ***** error binofit (ones(2), [1, 2, 3, 3]) 478s ***** error ... 478s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 478s ***** error ... 478s binofit ([1, 4, 3, 2], [5, 5, 5]) 478s ***** error ... 478s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 478s ***** error binofit ([1, 2, 1], 3, 1.2); 478s ***** error binofit ([1, 2, 1], 3, 0); 478s ***** error binofit ([1, 2, 1], 3, "alpha"); 478s 10 tests, 10 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/tlslike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/tlslike.m 478s ***** test 478s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 478s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 478s acov_out = [0.2525, 0.0670, 0.0288; ... 478s 0.0670, 0.5724, 0.1786; ... 478s 0.0288, 0.1786, 0.1789]; 478s assert (nlogL, 17.9979636579, 1e-10); 478s assert (acov, acov_out, 1e-4); 478s ***** error tlslike ([12, 15, 1]); 478s ***** error tlslike ([12, 15], [1:50]); 478s ***** error tlslike ([12, 3, 1], ones (10, 2)); 478s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 478s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 478s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 478s 7 tests, 7 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/rayllike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/rayllike.m 478s ***** test 478s x = [1 3 2 4 5 4 3 4]; 478s [nlogL, acov] = rayllike (3.25, x); 478s assert (nlogL, 14.7442, 1e-4) 478s ***** test 478s x = [1 2 3 4 5]; 478s f = [1 1 2 3 1]; 478s [nlogL, acov] = rayllike (3.25, x, [], f); 478s assert (nlogL, 14.7442, 1e-4) 478s ***** test 478s x = [1 2 3 4 5 6]; 478s f = [1 1 2 3 1 0]; 478s [nlogL, acov] = rayllike (3.25, x, [], f); 478s assert (nlogL, 14.7442, 1e-4) 478s ***** test 478s x = [1 2 3 4 5 6]; 478s c = [0 0 0 0 0 1]; 478s f = [1 1 2 3 1 0]; 478s [nlogL, acov] = rayllike (3.25, x, c, f); 478s assert (nlogL, 14.7442, 1e-4) 478s ***** error rayllike (1) 478s ***** error rayllike ([1 2 3], [1 2]) 478s ***** error ... 478s rayllike (3.25, ones (10, 2)) 478s ***** error ... 478s rayllike (3.25, [1 2 3 -4 5]) 478s ***** error ... 478s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 478s ***** error ... 478s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 478s ***** error ... 478s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 478s ***** error ... 478s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 478s ***** error ... 478s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 478s 13 tests, 13 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/normfit.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/normfit.m 478s ***** demo 478s ## Sample 3 populations from 3 different normal distibutions 478s randn ("seed", 1); # for reproducibility 478s r1 = normrnd (2, 5, 5000, 1); 478s randn ("seed", 2); # for reproducibility 478s r2 = normrnd (5, 2, 5000, 1); 478s randn ("seed", 3); # for reproducibility 478s r3 = normrnd (9, 4, 5000, 1); 478s r = [r1, r2, r3]; 478s 478s ## Plot them normalized and fix their colors 478s hist (r, 15, 0.4); 478s h = findobj (gca, "Type", "patch"); 478s set (h(1), "facecolor", "c"); 478s set (h(2), "facecolor", "g"); 478s set (h(3), "facecolor", "r"); 478s hold on 478s 478s ## Estimate their mu and sigma parameters 478s [muhat, sigmahat] = normfit (r); 478s 478s ## Plot their estimated PDFs 478s x = [min(r(:)):max(r(:))]; 478s y = normpdf (x, muhat(1), sigmahat(1)); 478s plot (x, y, "-pr"); 478s y = normpdf (x, muhat(2), sigmahat(2)); 478s plot (x, y, "-sg"); 478s y = normpdf (x, muhat(3), sigmahat(3)); 478s plot (x, y, "-^c"); 478s ylim ([0, 0.5]) 478s xlim ([-20, 20]) 478s hold off 478s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 478s "Normalized HIST of sample 2 with mu=5, σ=2", ... 478s "Normalized HIST of sample 3 with mu=9, σ=4", ... 478s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 478s muhat(1), sigmahat(1)), ... 478s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 478s muhat(2), sigmahat(2)), ... 478s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 478s muhat(3), sigmahat(3))}, "location", "northwest") 478s title ("Three population samples from different normal distibutions") 478s hold off 478s ***** test 478s load lightbulb 478s idx = find (lightbulb(:,2) == 0); 478s censoring = lightbulb(idx,3) == 1; 478s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 478s assert (muHat, 9496.59586737857, 1e-11); 478s assert (sigmaHat, 3064.021012796456, 2e-12); 478s ***** test 478s randn ("seed", 234); 478s x = normrnd (3, 5, [1000, 1]); 478s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 478s assert (muCI(1) < 3); 478s assert (muCI(2) > 3); 478s assert (sigmaCI(1) < 5); 478s assert (sigmaCI(2) > 5); 478s ***** error ... 478s normfit (ones (3,3,3)) 478s ***** error ... 478s normfit (ones (20,3), [], zeros (20,1)) 478s ***** error normfit (ones (20,1), 0) 478s ***** error normfit (ones (20,1), -0.3) 478s ***** error normfit (ones (20,1), 1.2) 478s ***** error normfit (ones (20,1), [0.05 0.1]) 478s ***** error normfit (ones (20,1), 0.02+i) 478s ***** error ... 478s normfit (ones (20,1), [], zeros(15,1)) 478s ***** error ... 478s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 478s ***** error ... 478s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 478s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 478s 13 tests, 13 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/gamlike.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gamlike.m 478s ***** test 478s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 478s assert (nlogL, 19.4426, 1e-4); 478s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 478s ***** test 478s [nlogL, acov] = gamlike([2, 3], [5:45]); 478s assert (nlogL, 305.8070, 1e-4); 478s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 478s ***** test 478s [nlogL, acov] = gamlike([2, 13], [5:45]); 478s assert (nlogL, 163.2261, 1e-4); 478s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 478s ***** error ... 478s gamlike ([12, 15]) 478s ***** error gamlike ([12, 15, 3], [1:50]) 478s ***** error gamlike ([12, 3], ones (10, 2)) 478s ***** error ... 478s gamlike ([12, 15], [1:50], [1, 2, 3]) 478s ***** error ... 478s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 478s 8 tests, 8 passed, 0 known failure, 0 skipped 478s [inst/dist_fit/burrfit.m] 478s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/burrfit.m 478s ***** demo 478s ## Sample 3 populations from different Burr type XII distibutions 478s rand ("seed", 4); # for reproducibility 478s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 478s rand ("seed", 2); # for reproducibility 478s r2 = burrrnd (1, 3, 1, 10000, 1); 478s rand ("seed", 9); # for reproducibility 478s r3 = burrrnd (0.5, 2, 3, 10000, 1); 478s r = [r1, r2, r3]; 478s 478s ## Plot them normalized and fix their colors 478s hist (r, [0.1:0.2:20], [18, 5, 3]); 478s h = findobj (gca, "Type", "patch"); 478s set (h(1), "facecolor", "c"); 478s set (h(2), "facecolor", "g"); 478s set (h(3), "facecolor", "r"); 478s ylim ([0, 3]); 478s xlim ([0, 5]); 478s hold on 478s 478s ## Estimate their α and β parameters 478s lambda_c_kA = burrfit (r(:,1)); 478s lambda_c_kB = burrfit (r(:,2)); 478s lambda_c_kC = burrfit (r(:,3)); 478s 478s ## Plot their estimated PDFs 478s x = [0.01:0.15:15]; 478s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 478s plot (x, y, "-pr"); 478s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 478s plot (x, y, "-sg"); 478s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 478s plot (x, y, "-^c"); 478s hold off 478s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 478s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 478s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 478s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 478s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 478s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 478s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 478s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 478s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 478s title ("Three population samples from different Burr type XII distibutions") 478s hold off 478s ***** test 478s l = 1; c = 2; k = 3; 478s r = burrrnd (l, c, k, 100000, 1); 478s lambda_c_kA = burrfit (r); 478s assert (lambda_c_kA(1), l, 0.2); 478s assert (lambda_c_kA(2), c, 0.2); 478s assert (lambda_c_kA(3), k, 0.3); 480s ***** test 480s l = 0.5; c = 1; k = 3; 480s r = burrrnd (l, c, k, 100000, 1); 480s lambda_c_kA = burrfit (r); 480s assert (lambda_c_kA(1), l, 0.2); 480s assert (lambda_c_kA(2), c, 0.2); 480s assert (lambda_c_kA(3), k, 0.3); 482s ***** test 482s l = 1; c = 3; k = 1; 482s r = burrrnd (l, c, k, 100000, 1); 482s lambda_c_kA = burrfit (r); 482s assert (lambda_c_kA(1), l, 0.2); 482s assert (lambda_c_kA(2), c, 0.2); 482s assert (lambda_c_kA(3), k, 0.3); 484s ***** test 484s l = 3; c = 2; k = 1; 484s r = burrrnd (l, c, k, 100000, 1); 484s lambda_c_kA = burrfit (r); 484s assert (lambda_c_kA(1), l, 0.2); 484s assert (lambda_c_kA(2), c, 0.2); 484s assert (lambda_c_kA(3), k, 0.3); 486s ***** test 486s l = 4; c = 2; k = 4; 486s r = burrrnd (l, c, k, 100000, 1); 486s lambda_c_kA = burrfit (r); 486s assert (lambda_c_kA(1), l, 0.2); 486s assert (lambda_c_kA(2), c, 0.2); 486s assert (lambda_c_kA(3), k, 0.3); 488s ***** error burrfit (ones (2,5)); 488s ***** error burrfit ([-1 2 3 4]); 488s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 488s ***** error burrfit ([1, 2, 3, 4, 5], 0); 488s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 488s ***** error ... 488s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 488s ***** error ... 488s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 488s ***** error 488s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 488s ***** error 488s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 488s ***** error ... 488s burrfit ([1:10], 0.05, [], [], 5) 488s 15 tests, 15 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/gevlike.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gevlike.m 488s ***** test 488s x = 1; 488s k = 0.2; 488s sigma = 0.3; 488s mu = 0.5; 488s [L, C] = gevlike ([k sigma mu], x); 488s expected_L = 0.75942; 488s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 488s assert (L, expected_L, 0.001); 488s assert (C, inv (expected_C), 0.001); 488s ***** test 488s x = 1; 488s k = 0; 488s sigma = 0.3; 488s mu = 0.5; 488s [L, C] = gevlike ([k sigma mu], x); 488s expected_L = 0.65157; 488s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 488s assert (L, expected_L, 0.001); 488s assert (C, inv (expected_C), 0.001); 488s ***** test 488s x = -5:-1; 488s k = -0.2; 488s sigma = 0.3; 488s mu = 0.5; 488s [L, C] = gevlike ([k sigma mu], x); 488s expected_L = 3786.4; 488s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 488s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 488s 8.7297e-05, 1.2034e-05, -0.0019125]; 488s assert (L, expected_L, -0.001); 488s assert (C, expected_C, -0.001); 488s ***** test 488s x = -5:0; 488s k = -0.2; 488s sigma = 0.3; 488s mu = 0.5; 488s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 488s expected_L = 3786.4; 488s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 488s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 488s 8.7297e-05, 1.2034e-05, -0.0019125]; 488s assert (L, expected_L, -0.001); 488s assert (C, expected_C, -0.001); 488s ***** error gevlike (3.25) 488s ***** error gevlike ([1, 2, 3], ones (2)) 488s ***** error ... 488s gevlike ([1, 2], [1, 3, 5, 7]) 488s ***** error ... 488s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 488s ***** error ... 488s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 488s ***** error ... 488s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 488s ***** error ... 488s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 488s 11 tests, 11 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/geofit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/geofit.m 488s ***** demo 488s ## Sample 2 populations from different geometric distibutions 488s rande ("seed", 1); # for reproducibility 488s r1 = geornd (0.15, 1000, 1); 488s rande ("seed", 2); # for reproducibility 488s r2 = geornd (0.5, 1000, 1); 488s r = [r1, r2]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, 0:0.5:20.5, 1); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s hold on 488s 488s ## Estimate their probability of success 488s pshatA = geofit (r(:,1)); 488s pshatB = geofit (r(:,2)); 488s 488s ## Plot their estimated PDFs 488s x = [0:15]; 488s y = geopdf (x, pshatA); 488s plot (x, y, "-pg"); 488s y = geopdf (x, pshatB); 488s plot (x, y, "-sc"); 488s xlim ([0, 15]) 488s ylim ([0, 0.6]) 488s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 488s "Normalized HIST of sample 2 with ps=0.50", ... 488s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 488s mean (pshatA)), ... 488s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 488s mean (pshatB))}) 488s title ("Two population samples from different geometric distibutions") 488s hold off 488s ***** test 488s x = 0:5; 488s [pshat, psci] = geofit (x); 488s assert (pshat, 0.2857, 1e-4); 488s assert (psci, [0.092499; 0.478929], 1e-5); 488s ***** test 488s x = 0:5; 488s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 488s assert (pshat, 0.2857, 1e-4); 488s assert (psci, [0.092499; 0.478929], 1e-5); 488s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 488s ***** error geofit () 488s ***** error geofit (-1, [1 2 3 3]) 488s ***** error geofit (1, 0) 488s ***** error geofit (1, 1.2) 488s ***** error geofit (1, [0.02 0.05]) 488s ***** error ... 488s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 488s ***** error ... 488s geofit ([1.5, 0.2], [], [1, 1, 1]) 488s 10 tests, 10 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/lognfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/lognfit.m 488s ***** demo 488s ## Sample 3 populations from 3 different log-normal distibutions 488s randn ("seed", 1); # for reproducibility 488s r1 = lognrnd (0, 0.25, 1000, 1); 488s randn ("seed", 2); # for reproducibility 488s r2 = lognrnd (0, 0.5, 1000, 1); 488s randn ("seed", 3); # for reproducibility 488s r3 = lognrnd (0, 1, 1000, 1); 488s r = [r1, r2, r3]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, 30, 2); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s set (h(3), "facecolor", "r"); 488s hold on 488s 488s ## Estimate their mu and sigma parameters 488s mu_sigmaA = lognfit (r(:,1)); 488s mu_sigmaB = lognfit (r(:,2)); 488s mu_sigmaC = lognfit (r(:,3)); 488s 488s ## Plot their estimated PDFs 488s x = [0:0.1:6]; 488s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 488s plot (x, y, "-pr"); 488s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 488s plot (x, y, "-sg"); 488s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 488s plot (x, y, "-^c"); 488s ylim ([0, 2]) 488s xlim ([0, 6]) 488s hold off 488s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 488s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 488s "Normalized HIST of sample 3 with mu=0, σ=1", ... 488s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 488s mu_sigmaA(1), mu_sigmaA(2)), ... 488s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 488s mu_sigmaB(1), mu_sigmaB(2)), ... 488s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 488s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 488s title ("Three population samples from different log-normal distibutions") 488s hold off 488s ***** test 488s randn ("seed", 1); 488s x = lognrnd (3, 5, [1000, 1]); 488s [paramhat, paramci] = lognfit (x, 0.01); 488s assert (paramci(1,1) < 3); 488s assert (paramci(1,2) > 3); 488s assert (paramci(2,1) < 5); 488s assert (paramci(2,2) > 5); 488s ***** error ... 488s lognfit (ones (20,3)) 488s ***** error ... 488s lognfit ({1, 2, 3, 4, 5}) 488s ***** error ... 488s lognfit ([-1, 2, 3, 4, 5]) 488s ***** error lognfit (ones (20,1), 0) 488s ***** error lognfit (ones (20,1), -0.3) 488s ***** error lognfit (ones (20,1), 1.2) 488s ***** error lognfit (ones (20,1), [0.05, 0.1]) 488s ***** error lognfit (ones (20,1), 0.02+i) 488s ***** error ... 488s lognfit (ones (20,1), [], zeros(15,1)) 488s ***** error ... 488s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 488s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 488s 12 tests, 12 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/nakalike.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/nakalike.m 488s ***** test 488s nlogL = nakalike ([0.735504, 858.5], [1:50]); 488s assert (nlogL, 202.8689, 1e-4); 488s ***** test 488s nlogL = nakalike ([1.17404, 11], [1:5]); 488s assert (nlogL, 8.6976, 1e-4); 488s ***** test 488s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 488s assert (nlogL, 8.6976, 1e-4); 488s ***** test 488s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 488s assert (nlogL, 8.6976, 1e-4); 488s ***** error nakalike (3.25) 488s ***** error nakalike ([5, 0.2], ones (2)) 488s ***** error ... 488s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 488s ***** error ... 488s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 488s ***** error ... 488s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 488s ***** error ... 488s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 488s ***** error ... 488s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 488s 11 tests, 11 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/invgfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/invgfit.m 488s ***** demo 488s ## Sample 3 populations from different inverse Gaussian distibutions 488s rand ("seed", 5); randn ("seed", 5); # for reproducibility 488s r1 = invgrnd (1, 0.2, 2000, 1); 488s rand ("seed", 2); randn ("seed", 2); # for reproducibility 488s r2 = invgrnd (1, 3, 2000, 1); 488s rand ("seed", 7); randn ("seed", 7); # for reproducibility 488s r3 = invgrnd (3, 1, 2000, 1); 488s r = [r1, r2, r3]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, [0.1:0.1:3.2], 9); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s set (h(3), "facecolor", "r"); 488s ylim ([0, 3]); 488s xlim ([0, 3]); 488s hold on 488s 488s ## Estimate their MU and LAMBDA parameters 488s mu_lambdaA = invgfit (r(:,1)); 488s mu_lambdaB = invgfit (r(:,2)); 488s mu_lambdaC = invgfit (r(:,3)); 488s 488s ## Plot their estimated PDFs 488s x = [0:0.1:3]; 488s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 488s plot (x, y, "-pr"); 488s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 488s plot (x, y, "-sg"); 488s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 488s plot (x, y, "-^c"); 488s hold off 488s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 488s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 488s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 488s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 488s mu_lambdaA(1), mu_lambdaA(2)), ... 488s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 488s mu_lambdaB(1), mu_lambdaB(2)), ... 488s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 488s mu_lambdaC(1), mu_lambdaC(2))}) 488s title ("Three population samples from different inverse Gaussian distibutions") 488s hold off 488s ***** test 488s paramhat = invgfit ([1:50]); 488s paramhat_out = [25.5, 19.6973]; 488s assert (paramhat, paramhat_out, 1e-4); 488s ***** test 488s paramhat = invgfit ([1:5]); 488s paramhat_out = [3, 8.1081]; 488s assert (paramhat, paramhat_out, 1e-4); 488s ***** error invgfit (ones (2,5)); 488s ***** error invgfit ([-1 2 3 4]); 488s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 488s ***** error invgfit ([1, 2, 3, 4, 5], 0); 488s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 488s ***** error ... 488s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 488s ***** error ... 488s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 488s ***** error ... 488s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 488s ***** error ... 488s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 488s ***** error ... 488s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 488s 12 tests, 12 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/unidfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/unidfit.m 488s ***** demo 488s ## Sample 2 populations from different discrete uniform distibutions 488s rand ("seed", 1); # for reproducibility 488s r1 = unidrnd (5, 1000, 1); 488s rand ("seed", 2); # for reproducibility 488s r2 = unidrnd (9, 1000, 1); 488s r = [r1, r2]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, 0:0.5:20.5, 1); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s hold on 488s 488s ## Estimate their probability of success 488s NhatA = unidfit (r(:,1)); 488s NhatB = unidfit (r(:,2)); 488s 488s ## Plot their estimated PDFs 488s x = [0:10]; 488s y = unidpdf (x, NhatA); 488s plot (x, y, "-pg"); 488s y = unidpdf (x, NhatB); 488s plot (x, y, "-sc"); 488s xlim ([0, 10]) 488s ylim ([0, 0.4]) 488s legend ({"Normalized HIST of sample 1 with N=5", ... 488s "Normalized HIST of sample 2 with N=9", ... 488s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 488s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 488s title ("Two population samples from different discrete uniform distibutions") 488s hold off 488s ***** test 488s x = 0:5; 488s [Nhat, Nci] = unidfit (x); 488s assert (Nhat, 5); 488s assert (Nci, [5; 9]); 488s ***** test 488s x = 0:5; 488s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 488s assert (Nhat, 5); 488s assert (Nci, [5; 9]); 488s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 488s ***** error unidfit () 488s ***** error unidfit (-1, [1 2 3 3]) 488s ***** error unidfit (1, 0) 488s ***** error unidfit (1, 1.2) 488s ***** error unidfit (1, [0.02 0.05]) 488s ***** error ... 488s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 488s ***** error ... 488s unidfit ([1.5, 0.2], [], [1, 1, 1]) 488s ***** error ... 488s unidfit ([1.5, 0.2], [], [1, -1]) 488s 11 tests, 11 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/wblfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/wblfit.m 488s ***** demo 488s ## Sample 3 populations from 3 different Weibull distibutions 488s rande ("seed", 1); # for reproducibility 488s r1 = wblrnd(2, 4, 2000, 1); 488s rande ("seed", 2); # for reproducibility 488s r2 = wblrnd(5, 2, 2000, 1); 488s rande ("seed", 5); # for reproducibility 488s r3 = wblrnd(1, 5, 2000, 1); 488s r = [r1, r2, r3]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, 30, [2.5 2.1 3.2]); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s set (h(3), "facecolor", "r"); 488s ylim ([0, 2]); 488s xlim ([0, 10]); 488s hold on 488s 488s ## Estimate their lambda parameter 488s lambda_kA = wblfit (r(:,1)); 488s lambda_kB = wblfit (r(:,2)); 488s lambda_kC = wblfit (r(:,3)); 488s 488s ## Plot their estimated PDFs 488s x = [0:0.1:15]; 488s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 488s plot (x, y, "-pr"); 488s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 488s plot (x, y, "-sg"); 488s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 488s plot (x, y, "-^c"); 488s hold off 488s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 488s "Normalized HIST of sample 2 with λ=5 and k=2", ... 488s "Normalized HIST of sample 3 with λ=1 and k=5", ... 488s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 488s lambda_kA(1), lambda_kA(2)), ... 488s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 488s lambda_kB(1), lambda_kB(2)), ... 488s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 488s lambda_kC(1), lambda_kC(2))}) 488s title ("Three population samples from different Weibull distibutions") 488s hold off 488s ***** test 488s x = 1:50; 488s [paramhat, paramci] = wblfit (x); 488s paramhat_out = [28.3636, 1.7130]; 488s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 488s assert (paramhat, paramhat_out, 1e-4); 488s assert (paramci, paramci_out, 1e-4); 488s ***** test 488s x = 1:50; 488s [paramhat, paramci] = wblfit (x, 0.01); 488s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 488s assert (paramci, paramci_out, 1e-4); 488s ***** error wblfit (ones (2,5)); 488s ***** error wblfit ([-1 2 3 4]); 488s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 488s ***** error wblfit ([1, 2, 3, 4, 5], 0); 488s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 488s ***** error ... 488s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 488s 13 tests, 13 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/gpfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gpfit.m 488s ***** demo 488s ## Sample 2 populations from different generalized Pareto distibutions 488s ## Assume location parameter θ is known 488s theta = 0; 488s rand ("seed", 5); # for reproducibility 488s r1 = gprnd (1, 2, theta, 20000, 1); 488s rand ("seed", 2); # for reproducibility 488s r2 = gprnd (3, 1, theta, 20000, 1); 488s r = [r1, r2]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, [0.1:0.2:100], 5); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "r"); 488s set (h(2), "facecolor", "c"); 488s ylim ([0, 1]); 488s xlim ([0, 5]); 488s hold on 488s 488s ## Estimate their α and β parameters 488s k_sigmaA = gpfit (r(:,1), theta); 488s k_sigmaB = gpfit (r(:,2), theta); 488s 488s ## Plot their estimated PDFs 488s x = [0.01, 0.1:0.2:18]; 488s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 488s plot (x, y, "-pc"); 488s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 488s plot (x, y, "-sr"); 488s hold off 488s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 488s "Normalized HIST of sample 2 with k=2 and σ=2", ... 488s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 488s k_sigmaA(1), k_sigmaA(2)), ... 488s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 488s k_sigmaB(1), k_sigmaB(2))}) 488s title ("Three population samples from different generalized Pareto distibutions") 488s text (2, 0.7, "Known location parameter θ = 0") 488s hold off 488s ***** test 488s k = 0.8937; sigma = 1.3230; theta = 1; 488s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 488s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 488s [hat, ci] = gpfit (x, theta); 488s assert (hat, [k, sigma, theta], 1e-4); 488s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 488s ***** error gpfit () 488s ***** error gpfit (1) 488s ***** error gpfit ([0.2, 0.5+i], 0); 488s ***** error gpfit (ones (2,2) * 0.5, 0); 488s ***** error ... 488s gpfit ([0.5, 1.2], [0, 1]); 488s ***** error ... 488s gpfit ([0.5, 1.2], 5+i); 488s ***** error ... 488s gpfit ([1:5], 2); 488s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 488s ***** error gpfit ([0.01:0.1:0.99], 0, i); 488s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 488s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 488s ***** error 488s gpfit ([1 2 3], 0, [], [1 5]) 488s ***** error 488s gpfit ([1 2 3], 0, [], [1 5 -1]) 488s ***** error ... 488s gpfit ([1:10], 1, 0.05, [], 5) 488s 15 tests, 15 passed, 0 known failure, 0 skipped 488s [inst/dist_fit/gevfit.m] 488s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gevfit.m 488s ***** demo 488s ## Sample 2 populations from 2 different exponential distibutions 488s rand ("seed", 1); # for reproducibility 488s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 488s rand ("seed", 2); # for reproducibility 488s r2 = gevrnd (0, 1, -4, 5000, 1); 488s r = [r1, r2]; 488s 488s ## Plot them normalized and fix their colors 488s hist (r, 50, 5); 488s h = findobj (gca, "Type", "patch"); 488s set (h(1), "facecolor", "c"); 488s set (h(2), "facecolor", "g"); 488s hold on 488s 488s ## Estimate their k, sigma, and mu parameters 488s k_sigma_muA = gevfit (r(:,1)); 488s k_sigma_muB = gevfit (r(:,2)); 488s 488s ## Plot their estimated PDFs 488s x = [-10:0.5:20]; 488s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 488s plot (x, y, "-pr"); 488s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 488s plot (x, y, "-sg"); 488s ylim ([0, 0.7]) 488s xlim ([-7, 5]) 488s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 488s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 488s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 488s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 488s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 488s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 488s title ("Two population samples from different exponential distibutions") 488s hold off 488s ***** test 488s x = 1:50; 488s [pfit, pci] = gevfit (x); 488s pfit_out = [-0.4407, 15.1923, 21.5309]; 488s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 488s assert (pfit, pfit_out, 1e-3); 488s assert (pci, pci_out, 1e-3); 488s ***** test 488s x = 1:2:50; 488s [pfit, pci] = gevfit (x); 488s pfit_out = [-0.4434, 15.2024, 21.0532]; 488s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 488s assert (pfit, pfit_out, 1e-3); 488s assert (pci, pci_out, 1e-3); 488s ***** error gevfit (ones (2,5)); 488s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 488s ***** error gevfit ([1, 2, 3, 4, 5], 0); 488s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 488s ***** error ... 488s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 488s ***** error ... 488s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 488s ***** error ... 488s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 488s ***** error ... 488s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 488s ***** error ... 488s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 489s 11 tests, 11 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/gplike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gplike.m 489s ***** test 489s k = 0.8937; sigma = 1.3230; theta = 1; 489s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 489s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 489s [nlogL, acov] = gplike ([k, sigma, theta], x); 489s assert (nlogL, 21.736, 1e-3); 489s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 489s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 489s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 489s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 489s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 489s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 489s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 489s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 489s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 489s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 489s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 489s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 489s ***** error gplike () 489s ***** error gplike (1) 489s ***** error gplike ([1, 2, 0], []) 489s ***** error gplike ([1, 2, 0], ones (2)) 489s ***** error gplike (2, [1:10]) 489s ***** error gplike ([2, 3], [1:10]) 489s ***** error ... 489s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 489s ***** error ... 489s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 489s 20 tests, 20 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/gumbelfit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gumbelfit.m 489s ***** demo 489s ## Sample 3 populations from different Gumbel distibutions 489s rand ("seed", 1); # for reproducibility 489s r1 = gumbelrnd (2, 5, 400, 1); 489s rand ("seed", 11); # for reproducibility 489s r2 = gumbelrnd (-5, 3, 400, 1); 489s rand ("seed", 16); # for reproducibility 489s r3 = gumbelrnd (14, 8, 400, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, 25, 0.32); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s ylim ([0, 0.28]) 489s xlim ([-11, 50]); 489s hold on 489s 489s ## Estimate their MU and BETA parameters 489s mu_betaA = gumbelfit (r(:,1)); 489s mu_betaB = gumbelfit (r(:,2)); 489s mu_betaC = gumbelfit (r(:,3)); 489s 489s ## Plot their estimated PDFs 489s x = [min(r(:)):max(r(:))]; 489s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 489s plot (x, y, "-pr"); 489s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 489s plot (x, y, "-sg"); 489s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 489s plot (x, y, "-^c"); 489s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 489s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 489s "Normalized HIST of sample 3 with μ=14 and β=8", ... 489s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 489s mu_betaA(1), mu_betaA(2)), ... 489s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 489s mu_betaB(1), mu_betaB(2)), ... 489s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 489s mu_betaC(1), mu_betaC(2))}) 489s title ("Three population samples from different Gumbel distibutions") 489s hold off 489s ***** test 489s x = 1:50; 489s [paramhat, paramci] = gumbelfit (x); 489s paramhat_out = [18.3188, 13.0509]; 489s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 489s assert (paramhat, paramhat_out, 1e-4); 489s assert (paramci, paramci_out, 1e-4); 489s ***** test 489s x = 1:50; 489s [paramhat, paramci] = gumbelfit (x, 0.01); 489s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 489s assert (paramci, paramci_out, 1e-4); 489s ***** error gumbelfit (ones (2,5)); 489s ***** error ... 489s gumbelfit (single (ones (1,5))); 489s ***** error ... 489s gumbelfit ([1, 2, 3, 4, NaN]); 489s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 489s ***** error ... 489s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 489s ***** error ... 489s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 489s ***** error 489s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 489s ***** error ... 489s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 489s 10 tests, 10 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/explike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/explike.m 489s ***** test 489s x = 12; 489s beta = 5; 489s [L, V] = explike (beta, x); 489s expected_L = 4.0094; 489s expected_V = 6.5789; 489s assert (L, expected_L, 0.001); 489s assert (V, expected_V, 0.001); 489s ***** test 489s x = 1:5; 489s beta = 2; 489s [L, V] = explike (beta, x); 489s expected_L = 10.9657; 489s expected_V = 0.4; 489s assert (L, expected_L, 0.001); 489s assert (V, expected_V, 0.001); 489s ***** error explike () 489s ***** error explike (2) 489s ***** error explike ([12, 3], [1:50]) 489s ***** error explike (3, ones (10, 2)) 489s ***** error ... 489s explike (3, [1:50], [1, 2, 3]) 489s ***** error ... 489s explike (3, [1:50], [], [1, 2, 3]) 489s 8 tests, 8 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/ricelike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/ricelike.m 489s ***** test 489s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 489s assert (nlogL, 204.5230311010569, 1e-12); 489s ***** test 489s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 489s assert (nlogL, 8.65562164930058, 1e-12); 489s ***** error ricelike (3.25) 489s ***** error ricelike ([5, 0.2], ones (2)) 489s ***** error ... 489s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 489s ***** error ... 489s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 489s ***** error ... 489s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 489s ***** error ... 489s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 489s ***** error ... 489s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 489s 9 tests, 9 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/hnlike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/hnlike.m 489s ***** test 489s x = 1:20; 489s paramhat = hnfit (x, 0); 489s [nlogL, acov] = hnlike (paramhat, x); 489s assert (nlogL, 64.179177404891300, 1e-14); 489s ***** test 489s x = 1:20; 489s paramhat = hnfit (x, 0); 489s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 489s assert (nlogL, 64.179177404891300, 1e-14); 489s ***** error ... 489s hnlike ([12, 15]); 489s ***** error hnlike ([12, 15, 3], [1:50]); 489s ***** error hnlike ([3], [1:50]); 489s ***** error ... 489s hnlike ([0, 3], ones (2)); 489s ***** error ... 489s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 489s ***** error ... 489s hnlike ([1, 2], ones (10, 1), ones (8,1)) 489s ***** error ... 489s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 489s 9 tests, 9 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/invglike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/invglike.m 489s ***** test 489s nlogL = invglike ([25.5, 19.6973], [1:50]); 489s assert (nlogL, 219.1516, 1e-4); 489s ***** test 489s nlogL = invglike ([3, 8.1081], [1:5]); 489s assert (nlogL, 9.0438, 1e-4); 489s ***** error invglike (3.25) 489s ***** error invglike ([5, 0.2], ones (2)) 489s ***** error invglike ([5, 0.2], [-1, 3]) 489s ***** error ... 489s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 489s ***** error ... 489s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 489s ***** error ... 489s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 489s ***** error ... 489s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 489s 9 tests, 9 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/logifit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/logifit.m 489s ***** demo 489s ## Sample 3 populations from different logistic distibutions 489s rand ("seed", 5) # for reproducibility 489s r1 = logirnd (2, 1, 2000, 1); 489s rand ("seed", 2) # for reproducibility 489s r2 = logirnd (5, 2, 2000, 1); 489s rand ("seed", 7) # for reproducibility 489s r3 = logirnd (9, 4, 2000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, [-6:20], 1); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s ylim ([0, 0.3]); 489s xlim ([-5, 20]); 489s hold on 489s 489s ## Estimate their MU and LAMBDA parameters 489s mu_sA = logifit (r(:,1)); 489s mu_sB = logifit (r(:,2)); 489s mu_sC = logifit (r(:,3)); 489s 489s ## Plot their estimated PDFs 489s x = [-5:0.5:20]; 489s y = logipdf (x, mu_sA(1), mu_sA(2)); 489s plot (x, y, "-pr"); 489s y = logipdf (x, mu_sB(1), mu_sB(2)); 489s plot (x, y, "-sg"); 489s y = logipdf (x, mu_sC(1), mu_sC(2)); 489s plot (x, y, "-^c"); 489s hold off 489s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 489s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 489s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 489s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 489s mu_sA(1), mu_sA(2)), ... 489s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 489s mu_sB(1), mu_sB(2)), ... 489s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 489s mu_sC(1), mu_sC(2))}) 489s title ("Three population samples from different logistic distibutions") 489s hold off 489s ***** test 489s paramhat = logifit ([1:50]); 489s paramhat_out = [25.5, 8.7724]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = logifit ([1:5]); 489s paramhat_out = [3, 0.8645]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 489s paramhat_out = [3, 0.8645]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 489s paramhat_out = logifit ([1:5, 5]); 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** error logifit (ones (2,5)); 489s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 489s ***** error logifit ([1, 2, 3, 4, 5], 0); 489s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 489s ***** error ... 489s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 489s ***** error ... 489s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 489s ***** error ... 489s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 489s ***** error ... 489s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 489s ***** error ... 489s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 489s 13 tests, 13 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/expfit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/expfit.m 489s ***** demo 489s ## Sample 3 populations from 3 different exponential distibutions 489s rande ("seed", 1); # for reproducibility 489s r1 = exprnd (2, 4000, 1); 489s rande ("seed", 2); # for reproducibility 489s r2 = exprnd (5, 4000, 1); 489s rande ("seed", 3); # for reproducibility 489s r3 = exprnd (12, 4000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, 48, 0.52); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s hold on 489s 489s ## Estimate their mu parameter 489s muhat = expfit (r); 489s 489s ## Plot their estimated PDFs 489s x = [0:max(r(:))]; 489s y = exppdf (x, muhat(1)); 489s plot (x, y, "-pr"); 489s y = exppdf (x, muhat(2)); 489s plot (x, y, "-sg"); 489s y = exppdf (x, muhat(3)); 489s plot (x, y, "-^c"); 489s ylim ([0, 0.6]) 489s xlim ([0, 40]) 489s legend ({"Normalized HIST of sample 1 with μ=2", ... 489s "Normalized HIST of sample 2 with μ=5", ... 489s "Normalized HIST of sample 3 with μ=12", ... 489s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 489s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 489s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 489s title ("Three population samples from different exponential distibutions") 489s hold off 489s ***** assert (expfit (1), 1) 489s ***** assert (expfit (1:3), 2) 489s ***** assert (expfit ([1:3]'), 2) 489s ***** assert (expfit (1:3, []), 2) 489s ***** assert (expfit (1:3, [], [], []), 2) 489s ***** assert (expfit (magic (3)), [5 5 5]) 489s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 489s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 489s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 489s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 489s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 489s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 489s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 489s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 489s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 489s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 489s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 489s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 489s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 489s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 489s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 489s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 489s [1.75 4.75 7.75]) 489s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 489s [1.75 4.75 7.75]) 489s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 489s [3.5 19/3 31/3]) 489s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 489s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 489s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 489s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 489s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 489s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 489s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 489s 1000*eps) 489s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 489s [0.953017262058213; 7.337731146400207], 1000*eps) 489s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 489s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 489s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 489s 1000*eps) 489s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 489s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 489s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 489s 1000*eps) 489s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 489s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 489s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 489s 1000*eps) 489s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 489s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 489s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 489s 1000*eps) 489s ***** test 489s x = reshape (1:8, [4 2]); 489s x(4) = NaN; 489s [muhat,muci] = expfit (x); 489s assert ({muhat, muci}, {[NaN, 6.5], ... 489s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 489s ***** test 489s x = magic (3); 489s censor = [0 1 0; 0 1 0; 0 1 0]; 489s freq = [1 1 0; 1 1 0; 1 1 0]; 489s [muhat,muci] = expfit (x, [], censor, freq); 489s assert ({muhat, muci}, {[5 NaN NaN], ... 489s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 489s ***** error expfit () 489s ***** error expfit (1,2,3,4,5) 489s ***** error [a b censor] = expfit (1) 489s ***** error expfit (1, [1 2]) 489s ***** error expfit ([-1 2 3 4 5]) 489s ***** error expfit ([1:5], [], "test") 489s ***** error expfit ([1:5], [], [], "test") 489s ***** error expfit ([1:5], [], [0 0 0 0]) 489s ***** error expfit ([1:5], [], [], [1 1 1 1]) 489s 47 tests, 47 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/poissfit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/poissfit.m 489s ***** demo 489s ## Sample 3 populations from 3 different Poisson distibutions 489s randp ("seed", 2); # for reproducibility 489s r1 = poissrnd (1, 1000, 1); 489s randp ("seed", 2); # for reproducibility 489s r2 = poissrnd (4, 1000, 1); 489s randp ("seed", 3); # for reproducibility 489s r3 = poissrnd (10, 1000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, [0:20], 1); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s hold on 489s 489s ## Estimate their lambda parameter 489s lambdahat = poissfit (r); 489s 489s ## Plot their estimated PDFs 489s x = [0:20]; 489s y = poisspdf (x, lambdahat(1)); 489s plot (x, y, "-pr"); 489s y = poisspdf (x, lambdahat(2)); 489s plot (x, y, "-sg"); 489s y = poisspdf (x, lambdahat(3)); 489s plot (x, y, "-^c"); 489s xlim ([0, 20]) 489s ylim ([0, 0.4]) 489s legend ({"Normalized HIST of sample 1 with λ=1", ... 489s "Normalized HIST of sample 2 with λ=4", ... 489s "Normalized HIST of sample 3 with λ=10", ... 489s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 489s lambdahat(1)), ... 489s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 489s lambdahat(2)), ... 489s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 489s lambdahat(3))}) 489s title ("Three population samples from different Poisson distibutions") 489s hold off 489s ***** test 489s x = [1 3 2 4 5 4 3 4]; 489s [lhat, lci] = poissfit (x); 489s assert (lhat, 3.25) 489s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 489s ***** test 489s x = [1 3 2 4 5 4 3 4]; 489s [lhat, lci] = poissfit (x, 0.01); 489s assert (lhat, 3.25) 489s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 489s ***** test 489s x = [1 2 3 4 5]; 489s f = [1 1 2 3 1]; 489s [lhat, lci] = poissfit (x, [], f); 489s assert (lhat, 3.25) 489s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 489s ***** test 489s x = [1 2 3 4 5]; 489s f = [1 1 2 3 1]; 489s [lhat, lci] = poissfit (x, 0.01, f); 489s assert (lhat, 3.25) 489s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 489s ***** error poissfit ([1 2 -1 3]) 489s ***** error poissfit ([1 2 3], 0) 489s ***** error poissfit ([1 2 3], 1.2) 489s ***** error poissfit ([1 2 3], [0.02 0.05]) 489s ***** error 489s poissfit ([1 2 3], [], [1 5]) 489s ***** error 489s poissfit ([1 2 3], [], [1 5 -1]) 489s 10 tests, 10 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/raylfit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/raylfit.m 489s ***** demo 489s ## Sample 3 populations from 3 different Rayleigh distibutions 489s rand ("seed", 2); # for reproducibility 489s r1 = raylrnd (1, 1000, 1); 489s rand ("seed", 2); # for reproducibility 489s r2 = raylrnd (2, 1000, 1); 489s rand ("seed", 3); # for reproducibility 489s r3 = raylrnd (4, 1000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, [0.5:0.5:10.5], 2); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s hold on 489s 489s ## Estimate their lambda parameter 489s sigmaA = raylfit (r(:,1)); 489s sigmaB = raylfit (r(:,2)); 489s sigmaC = raylfit (r(:,3)); 489s 489s ## Plot their estimated PDFs 489s x = [0:0.1:10]; 489s y = raylpdf (x, sigmaA); 489s plot (x, y, "-pr"); 489s y = raylpdf (x, sigmaB); 489s plot (x, y, "-sg"); 489s y = raylpdf (x, sigmaC); 489s plot (x, y, "-^c"); 489s xlim ([0, 10]) 489s ylim ([0, 0.7]) 489s legend ({"Normalized HIST of sample 1 with σ=1", ... 489s "Normalized HIST of sample 2 with σ=2", ... 489s "Normalized HIST of sample 3 with σ=4", ... 489s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 489s sigmaA), ... 489s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 489s sigmaB), ... 489s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 489s sigmaC)}) 489s title ("Three population samples from different Rayleigh distibutions") 489s hold off 489s ***** test 489s x = [1 3 2 4 5 4 3 4]; 489s [shat, sci] = raylfit (x); 489s assert (shat, 2.4495, 1e-4) 489s assert (sci, [1.8243; 3.7279], 1e-4) 489s ***** test 489s x = [1 3 2 4 5 4 3 4]; 489s [shat, sci] = raylfit (x, 0.01); 489s assert (shat, 2.4495, 1e-4) 489s assert (sci, [1.6738; 4.3208], 1e-4) 489s ***** test 489s x = [1 2 3 4 5]; 489s f = [1 1 2 3 1]; 489s [shat, sci] = raylfit (x, [], [], f); 489s assert (shat, 2.4495, 1e-4) 489s assert (sci, [1.8243; 3.7279], 1e-4) 489s ***** test 489s x = [1 2 3 4 5]; 489s f = [1 1 2 3 1]; 489s [shat, sci] = raylfit (x, 0.01, [], f); 489s assert (shat, 2.4495, 1e-4) 489s assert (sci, [1.6738; 4.3208], 1e-4) 489s ***** test 489s x = [1 2 3 4 5 6]; 489s c = [0 0 0 0 0 1]; 489s f = [1 1 2 3 1 1]; 489s [shat, sci] = raylfit (x, 0.01, c, f); 489s assert (shat, 2.4495, 1e-4) 489s assert (sci, [1.6738; 4.3208], 1e-4) 489s ***** error raylfit (ones (2,5)); 489s ***** error raylfit ([1 2 -1 3]) 489s ***** error raylfit ([1 2 3], 0) 489s ***** error raylfit ([1 2 3], 1.2) 489s ***** error raylfit ([1 2 3], [0.02 0.05]) 489s ***** error ... 489s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 489s ***** error ... 489s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 489s ***** error ... 489s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 489s ***** error ... 489s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 489s ***** error 489s raylfit ([1 2 3], [], [], [1 5]) 489s ***** error 489s raylfit ([1 2 3], [], [], [1 5 -1]) 489s 16 tests, 16 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/nakafit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/nakafit.m 489s ***** demo 489s ## Sample 3 populations from different Nakagami distibutions 489s randg ("seed", 5) # for reproducibility 489s r1 = nakarnd (0.5, 1, 2000, 1); 489s randg ("seed", 2) # for reproducibility 489s r2 = nakarnd (5, 1, 2000, 1); 489s randg ("seed", 7) # for reproducibility 489s r3 = nakarnd (2, 2, 2000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, [0.05:0.1:3.5], 10); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s ylim ([0, 2.5]); 489s xlim ([0, 3.0]); 489s hold on 489s 489s ## Estimate their MU and LAMBDA parameters 489s mu_omegaA = nakafit (r(:,1)); 489s mu_omegaB = nakafit (r(:,2)); 489s mu_omegaC = nakafit (r(:,3)); 489s 489s ## Plot their estimated PDFs 489s x = [0.01:0.1:3.01]; 489s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 489s plot (x, y, "-pr"); 489s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 489s plot (x, y, "-sg"); 489s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 489s plot (x, y, "-^c"); 489s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 489s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 489s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 489s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 489s mu_omegaA(1), mu_omegaA(2)), ... 489s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 489s mu_omegaB(1), mu_omegaB(2)), ... 489s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 489s mu_omegaC(1), mu_omegaC(2))}) 489s title ("Three population samples from different Nakagami distibutions") 489s hold off 489s ***** test 489s paramhat = nakafit ([1:50]); 489s paramhat_out = [0.7355, 858.5]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = nakafit ([1:5]); 489s paramhat_out = [1.1740, 11]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 489s paramhat_out = [1.1740, 11]; 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** test 489s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 489s paramhat_out = nakafit ([1:5, 5]); 489s assert (paramhat, paramhat_out, 1e-4); 489s ***** error nakafit (ones (2,5)); 489s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 489s ***** error nakafit ([1, 2, 3, 4, 5], 0); 489s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 489s ***** error ... 489s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 489s 15 tests, 15 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/nbinlike.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/nbinlike.m 489s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 489s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 489s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 489s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 489s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 489s ***** error nbinlike (3.25) 489s ***** error nbinlike ([5, 0.2], ones (2)) 489s ***** error nbinlike ([5, 0.2], [-1, 3]) 489s ***** error ... 489s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 489s ***** error nbinlike ([-5, 0.2], [1:15]) 489s ***** error nbinlike ([0, 0.2], [1:15]) 489s ***** error nbinlike ([5, 1.2], [3, 5]) 489s ***** error nbinlike ([5, -0.2], [3, 5]) 489s ***** error ... 489s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 489s ***** error ... 489s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 489s ***** error ... 489s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 489s 16 tests, 16 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/unifit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/unifit.m 489s ***** demo 489s ## Sample 2 populations from different continuous uniform distibutions 489s rand ("seed", 5); # for reproducibility 489s r1 = unifrnd (2, 5, 2000, 1); 489s rand ("seed", 6); # for reproducibility 489s r2 = unifrnd (3, 9, 2000, 1); 489s r = [r1, r2]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, 0:0.5:10, 2); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s hold on 489s 489s ## Estimate their probability of success 489s a_bA = unifit (r(:,1)); 489s a_bB = unifit (r(:,2)); 489s 489s ## Plot their estimated PDFs 489s x = [0:10]; 489s y = unifpdf (x, a_bA(1), a_bA(2)); 489s plot (x, y, "-pg"); 489s y = unifpdf (x, a_bB(1), a_bB(2)); 489s plot (x, y, "-sc"); 489s xlim ([1, 10]) 489s ylim ([0, 0.5]) 489s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 489s "Normalized HIST of sample 2 with a=3 and b=9", ... 489s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 489s a_bA(1), a_bA(2)), ... 489s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 489s a_bB(1), a_bB(2))}) 489s title ("Two population samples from different continuous uniform distibutions") 489s hold off 489s ***** test 489s x = 0:5; 489s [paramhat, paramci] = unifit (x); 489s assert (paramhat, [0, 5]); 489s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 489s ***** test 489s x = 0:5; 489s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 489s assert (paramhat, [0, 5]); 489s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 489s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 489s ***** error unifit () 489s ***** error unifit (-1, [1 2 3 3]) 489s ***** error unifit (1, 0) 489s ***** error unifit (1, 1.2) 489s ***** error unifit (1, [0.02 0.05]) 489s ***** error ... 489s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 489s ***** error ... 489s unifit ([1.5, 0.2], [], [1, -1]) 489s ***** error ... 489s unifit ([1.5, 0.2], [], [1, 1, 1]) 489s 11 tests, 11 passed, 0 known failure, 0 skipped 489s [inst/dist_fit/tlsfit.m] 489s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/tlsfit.m 489s ***** demo 489s ## Sample 3 populations from 3 different location-scale T distibutions 489s randn ("seed", 1); # for reproducibility 489s randg ("seed", 2); # for reproducibility 489s r1 = tlsrnd (-4, 3, 1, 2000, 1); 489s randn ("seed", 3); # for reproducibility 489s randg ("seed", 4); # for reproducibility 489s r2 = tlsrnd (0, 3, 1, 2000, 1); 489s randn ("seed", 5); # for reproducibility 489s randg ("seed", 6); # for reproducibility 489s r3 = tlsrnd (5, 5, 4, 2000, 1); 489s r = [r1, r2, r3]; 489s 489s ## Plot them normalized and fix their colors 489s hist (r, [-21:21], [1, 1, 1]); 489s h = findobj (gca, "Type", "patch"); 489s set (h(1), "facecolor", "c"); 489s set (h(2), "facecolor", "g"); 489s set (h(3), "facecolor", "r"); 489s ylim ([0, 0.25]); 489s xlim ([-20, 20]); 489s hold on 489s 489s ## Estimate their lambda parameter 489s mu_sigma_nuA = tlsfit (r(:,1)); 489s mu_sigma_nuB = tlsfit (r(:,2)); 489s mu_sigma_nuC = tlsfit (r(:,3)); 489s 489s ## Plot their estimated PDFs 489s x = [-20:0.1:20]; 489s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 489s plot (x, y, "-pr"); 489s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 489s plot (x, y, "-sg"); 489s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 489s plot (x, y, "-^c"); 489s hold off 489s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 489s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 489s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 489s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 489s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 489s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 489s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 489s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 489s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 489s title ("Three population samples from different location-scale T distibutions") 489s hold off 489s ***** test 489s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 489s [paramhat, paramci] = tlsfit (x); 489s paramhat_out = [0.035893, 0.862711, 0.649261]; 489s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 489s assert (paramhat, paramhat_out, 1e-6); 489s assert (paramci, paramci_out, 1e-5); 489s ***** test 489s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 489s [paramhat, paramci] = tlsfit (x, 0.01); 489s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 489s assert (paramci, paramci_out, 1e-4); 490s ***** error tlsfit (ones (2,5)); 490s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 490s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 490s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 490s ***** error ... 490s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 490s 12 tests, 12 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/bisalike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/bisalike.m 490s ***** test 490s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 490s assert (nlogL, 215.5905, 1e-4); 490s ***** test 490s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 490s assert (nlogL, 8.9950, 1e-4); 490s ***** error bisalike (3.25) 490s ***** error bisalike ([5, 0.2], ones (2)) 490s ***** error bisalike ([5, 0.2], [-1, 3]) 490s ***** error ... 490s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 490s ***** error ... 490s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 490s ***** error ... 490s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 490s ***** error ... 490s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 490s 9 tests, 9 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/normlike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/normlike.m 490s ***** error normlike ([12, 15]); 490s ***** error normlike ([12, 15], ones (2)); 490s ***** error ... 490s normlike ([12, 15, 3], [1:50]); 490s ***** error ... 490s normlike ([12, 15], [1:50], [1, 2, 3]); 490s ***** error ... 490s normlike ([12, 15], [1:50], [], [1, 2, 3]); 490s ***** error ... 490s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = normlike ([2.3, 1.2], x); 490s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 490s assert (nlogL, 13014.95883783327, 1e-10); 490s assert (avar, avar_out, 1e-4); 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 490s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 490s assert (nlogL, 2854.802587833265, 1e-10); 490s assert (avar, avar_out, 1e-4); 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = normlike ([21, 15], x); 490s avar_out = [5.460474308300396, -1.600790513833993; ... 490s -1.600790513833993, 2.667984189723321]; 490s assert (nlogL, 206.738325604233, 1e-12); 490s assert (avar, avar_out, 1e-14); 490s ***** test 490s x = 1:50; 490s censor = ones (1, 50); 490s censor([2, 4, 6, 8, 12, 14]) = 0; 490s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 490s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 490s assert (nlogL, Inf); 490s assert (avar, [NaN, NaN; NaN, NaN]); 490s ***** test 490s x = 1:50; 490s censor = ones (1, 50); 490s censor([2, 4, 6, 8, 12, 14]) = 0; 490s [nlogL, avar] = normlike ([21, 15], x, censor); 490s avar_out = [24.4824488866131, -10.6649544179636; ... 490s -10.6649544179636, 6.22827849965737]; 490s assert (nlogL, 86.9254371829733, 1e-12); 490s assert (avar, avar_out, 8e-14); 490s 11 tests, 11 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/burrlike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/burrlike.m 490s ***** error burrlike (3.25) 490s ***** error burrlike ([1, 2, 3], ones (2)) 490s ***** error burrlike ([1, 2, 3], [-1, 3]) 490s ***** error ... 490s burrlike ([1, 2], [1, 3, 5, 7]) 490s ***** error ... 490s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 490s ***** error ... 490s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 490s ***** error ... 490s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 490s ***** error ... 490s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 490s 8 tests, 8 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/evlike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/evlike.m 490s ***** test 490s x = 1:50; 490s [nlogL, acov] = evlike ([2.3, 1.2], x); 490s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 490s assert (nlogL, 3.242264755689906e+17, 1e-14); 490s assert (acov, avar_out, 1e-3); 490s ***** test 490s x = 1:50; 490s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 490s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 490s assert (nlogL, 481898704.0472211, 1e-6); 490s assert (acov, avar_out, 1e-3); 490s ***** test 490s x = 1:50; 490s [nlogL, acov] = evlike ([21, 15], x); 490s avar_out = [11.73913876598908, -5.9546128523121216; ... 490s -5.954612852312121, 3.708060045170236]; 490s assert (nlogL, 223.7612479380652, 1e-13); 490s assert (acov, avar_out, 1e-14); 490s ***** error evlike ([12, 15]) 490s ***** error evlike ([12, 15, 3], [1:50]) 490s ***** error evlike ([12, 3], ones (10, 2)) 490s ***** error ... 490s evlike ([12, 15], [1:50], [1, 2, 3]) 490s ***** error ... 490s evlike ([12, 15], [1:50], [], [1, 2, 3]) 490s 8 tests, 8 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/gevfit_lmom.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gevfit_lmom.m 490s ***** xtest <31070> 490s data = 1:50; 490s [pfit, pci] = gevfit_lmom (data); 490s expected_p = [-0.28 15.01 20.22]'; 490s assert (pfit, expected_p, 0.1); 490s 1 test, 1 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/bisafit.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/bisafit.m 490s ***** demo 490s ## Sample 3 populations from different Birnbaum-Saunders distibutions 490s rand ("seed", 5); # for reproducibility 490s r1 = bisarnd (1, 0.5, 2000, 1); 490s rand ("seed", 2); # for reproducibility 490s r2 = bisarnd (2, 0.3, 2000, 1); 490s rand ("seed", 7); # for reproducibility 490s r3 = bisarnd (4, 0.5, 2000, 1); 490s r = [r1, r2, r3]; 490s 490s ## Plot them normalized and fix their colors 490s hist (r, 80, 4.2); 490s h = findobj (gca, "Type", "patch"); 490s set (h(1), "facecolor", "c"); 490s set (h(2), "facecolor", "g"); 490s set (h(3), "facecolor", "r"); 490s ylim ([0, 1.1]); 490s xlim ([0, 8]); 490s hold on 490s 490s ## Estimate their α and β parameters 490s beta_gammaA = bisafit (r(:,1)); 490s beta_gammaB = bisafit (r(:,2)); 490s beta_gammaC = bisafit (r(:,3)); 490s 490s ## Plot their estimated PDFs 490s x = [0:0.1:8]; 490s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 490s plot (x, y, "-pr"); 490s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 490s plot (x, y, "-sg"); 490s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 490s plot (x, y, "-^c"); 490s hold off 490s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 490s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 490s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 490s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 490s beta_gammaA(1), beta_gammaA(2)), ... 490s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 490s beta_gammaB(1), beta_gammaB(2)), ... 490s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 490s beta_gammaC(1), beta_gammaC(2))}) 490s title ("Three population samples from different Birnbaum-Saunders distibutions") 490s hold off 490s ***** test 490s paramhat = bisafit ([1:50]); 490s paramhat_out = [16.2649, 1.0156]; 490s assert (paramhat, paramhat_out, 1e-4); 490s ***** test 490s paramhat = bisafit ([1:5]); 490s paramhat_out = [2.5585, 0.5839]; 490s assert (paramhat, paramhat_out, 1e-4); 490s ***** error bisafit (ones (2,5)); 490s ***** error bisafit ([-1 2 3 4]); 490s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 490s ***** error bisafit ([1, 2, 3, 4, 5], 0); 490s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 490s ***** error ... 490s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 490s ***** error ... 490s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 490s ***** error ... 490s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 490s ***** error ... 490s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 490s ***** error ... 490s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 490s 12 tests, 12 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/poisslike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/poisslike.m 490s ***** test 490s x = [1 3 2 4 5 4 3 4]; 490s [nlogL, avar] = poisslike (3.25, x); 490s assert (nlogL, 13.9533, 1e-4) 490s ***** test 490s x = [1 2 3 4 5]; 490s f = [1 1 2 3 1]; 490s [nlogL, avar] = poisslike (3.25, x, f); 490s assert (nlogL, 13.9533, 1e-4) 490s ***** error poisslike (1) 490s ***** error poisslike ([1 2 3], [1 2]) 490s ***** error ... 490s poisslike (3.25, ones (10, 2)) 490s ***** error ... 490s poisslike (3.25, [1 2 3 -4 5]) 490s ***** error ... 490s poisslike (3.25, ones (10, 1), ones (8,1)) 490s ***** error ... 490s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 490s 8 tests, 8 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/betafit.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/betafit.m 490s ***** demo 490s ## Sample 2 populations from different Beta distibutions 490s randg ("seed", 1); # for reproducibility 490s r1 = betarnd (2, 5, 500, 1); 490s randg ("seed", 2); # for reproducibility 490s r2 = betarnd (2, 2, 500, 1); 490s r = [r1, r2]; 490s 490s ## Plot them normalized and fix their colors 490s hist (r, 12, 15); 490s h = findobj (gca, "Type", "patch"); 490s set (h(1), "facecolor", "c"); 490s set (h(2), "facecolor", "g"); 490s hold on 490s 490s ## Estimate their shape parameters 490s a_b_A = betafit (r(:,1)); 490s a_b_B = betafit (r(:,2)); 490s 490s ## Plot their estimated PDFs 490s x = [min(r(:)):0.01:max(r(:))]; 490s y = betapdf (x, a_b_A(1), a_b_A(2)); 490s plot (x, y, "-pr"); 490s y = betapdf (x, a_b_B(1), a_b_B(2)); 490s plot (x, y, "-sg"); 490s ylim ([0, 4]) 490s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 490s "Normalized HIST of sample 2 with α=2 and β=2", ... 490s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 490s a_b_A(1), a_b_A(2)), ... 490s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 490s a_b_B(1), a_b_B(2))}) 490s title ("Two population samples from different Beta distibutions") 490s hold off 490s ***** test 490s x = 0.01:0.02:0.99; 490s [paramhat, paramci] = betafit (x); 490s paramhat_out = [1.0199, 1.0199]; 490s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 490s assert (paramhat, paramhat_out, 1e-4); 490s assert (paramci, paramci_out, 1e-4); 490s ***** test 490s x = 0.01:0.02:0.99; 490s [paramhat, paramci] = betafit (x, 0.01); 490s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 490s assert (paramci, paramci_out, 1e-4); 490s ***** test 490s x = 0.00:0.02:1; 490s [paramhat, paramci] = betafit (x); 490s paramhat_out = [0.0875, 0.1913]; 490s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 490s assert (paramhat, paramhat_out, 1e-4); 490s assert (paramci, paramci_out, 1e-4); 490s ***** error betafit ([0.2, 0.5+i]); 490s ***** error betafit (ones (2,2) * 0.5); 490s ***** error betafit ([0.5, 1.2]); 490s ***** error betafit ([0.1, 0.1]); 490s ***** error betafit ([0.01:0.1:0.99], 1.2); 490s ***** error ... 490s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 490s ***** error ... 490s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 490s ***** error ... 490s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 490s ***** error ... 490s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 490s ***** error ... 490s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 490s 13 tests, 13 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/loglfit.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/loglfit.m 490s ***** demo 490s ## Sample 3 populations from different log-logistic distibutions 490s rand ("seed", 5) # for reproducibility 490s r1 = loglrnd (0, 1, 2000, 1); 490s rand ("seed", 2) # for reproducibility 490s r2 = loglrnd (0, 0.5, 2000, 1); 490s rand ("seed", 7) # for reproducibility 490s r3 = loglrnd (0, 0.125, 2000, 1); 490s r = [r1, r2, r3]; 490s 490s ## Plot them normalized and fix their colors 490s hist (r, [0.05:0.1:2.5], 10); 490s h = findobj (gca, "Type", "patch"); 490s set (h(1), "facecolor", "c"); 490s set (h(2), "facecolor", "g"); 490s set (h(3), "facecolor", "r"); 490s ylim ([0, 3.5]); 490s xlim ([0, 2.0]); 490s hold on 490s 490s ## Estimate their MU and LAMBDA parameters 490s a_bA = loglfit (r(:,1)); 490s a_bB = loglfit (r(:,2)); 490s a_bC = loglfit (r(:,3)); 490s 490s ## Plot their estimated PDFs 490s x = [0.01:0.1:2.01]; 490s y = loglpdf (x, a_bA(1), a_bA(2)); 490s plot (x, y, "-pr"); 490s y = loglpdf (x, a_bB(1), a_bB(2)); 490s plot (x, y, "-sg"); 490s y = loglpdf (x, a_bC(1), a_bC(2)); 490s plot (x, y, "-^c"); 490s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 490s "Normalized HIST of sample 2 with α=1 and β=2", ... 490s "Normalized HIST of sample 3 with α=1 and β=8", ... 490s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 490s a_bA(1), a_bA(2)), ... 490s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 490s a_bB(1), a_bB(2)), ... 490s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 490s a_bC(1), a_bC(2))}) 490s title ("Three population samples from different log-logistic distibutions") 490s hold off 490s ***** test 490s [paramhat, paramci] = loglfit ([1:50]); 490s paramhat_out = [3.09717, 0.468525]; 490s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 490s assert (paramhat, paramhat_out, 1e-5); 490s assert (paramci, paramci_out, 1e-5); 490s ***** test 490s paramhat = loglfit ([1:5]); 490s paramhat_out = [1.01124, 0.336449]; 490s assert (paramhat, paramhat_out, 1e-5); 490s ***** test 490s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 490s paramhat_out = [1.01124, 0.336449]; 490s assert (paramhat, paramhat_out, 1e-4); 490s ***** test 490s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 490s paramhat_out = loglfit ([1:5, 5]); 490s assert (paramhat, paramhat_out, 1e-4); 490s ***** error loglfit (ones (2,5)); 490s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 490s ***** error loglfit ([1, 2, 3, 4, 5], 0); 490s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 490s ***** error ... 490s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 490s ***** error ... 490s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 490s ***** error ... 490s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 490s ***** error ... 490s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 490s ***** error ... 490s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 490s 13 tests, 13 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/lognlike.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/lognlike.m 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = lognlike ([0, 0.25], x); 490s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 490s assert (nlogL, 3962.330333301793, 1e-10); 490s assert (avar, avar_out, 1e-7); 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 490s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 490s assert (nlogL, 2473.183051225747, 1e-10); 490s assert (avar, avar_out, 1e-7); 490s ***** test 490s x = 1:50; 490s [nlogL, avar] = lognlike ([0, 0.5], x); 490s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 490s assert (nlogL, 1119.072424020455, 1e-12); 490s assert (avar, avar_out, 1e-6); 490s ***** test 490s x = 1:50; 490s censor = ones (1, 50); 490s censor([2, 4, 6, 8, 12, 14]) = 0; 490s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 490s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 490s assert (nlogL, 1091.746371145497, 1e-12); 490s assert (avar, avar_out, 1e-6); 490s ***** test 490s x = 1:50; 490s censor = ones (1, 50); 490s censor([2, 4, 6, 8, 12, 14]) = 0; 490s [nlogL, avar] = lognlike ([0, 1], x, censor); 490s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 490s assert (nlogL, 349.3969104144271, 1e-12); 490s assert (avar, avar_out, 1e-6); 490s ***** error ... 490s lognlike ([12, 15]); 490s ***** error lognlike ([12, 15], ones (2)); 490s ***** error ... 490s lognlike ([12, 15, 3], [1:50]); 490s ***** error ... 490s lognlike ([12, 15], [1:50], [1, 2, 3]); 490s ***** error ... 490s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 490s 10 tests, 10 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/gamfit.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/gamfit.m 490s ***** demo 490s ## Sample 3 populations from different Gamma distibutions 490s randg ("seed", 5); # for reproducibility 490s r1 = gamrnd (1, 2, 2000, 1); 490s randg ("seed", 2); # for reproducibility 490s r2 = gamrnd (2, 2, 2000, 1); 490s randg ("seed", 7); # for reproducibility 490s r3 = gamrnd (7.5, 1, 2000, 1); 490s r = [r1, r2, r3]; 490s 490s ## Plot them normalized and fix their colors 490s hist (r, 75, 4); 490s h = findobj (gca, "Type", "patch"); 490s set (h(1), "facecolor", "c"); 490s set (h(2), "facecolor", "g"); 490s set (h(3), "facecolor", "r"); 490s ylim ([0, 0.62]); 490s xlim ([0, 12]); 490s hold on 490s 490s ## Estimate their α and β parameters 490s a_bA = gamfit (r(:,1)); 490s a_bB = gamfit (r(:,2)); 490s a_bC = gamfit (r(:,3)); 490s 490s ## Plot their estimated PDFs 490s x = [0.01,0.1:0.2:18]; 490s y = gampdf (x, a_bA(1), a_bA(2)); 490s plot (x, y, "-pr"); 490s y = gampdf (x, a_bB(1), a_bB(2)); 490s plot (x, y, "-sg"); 490s y = gampdf (x, a_bC(1), a_bC(2)); 490s plot (x, y, "-^c"); 490s hold off 490s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 490s "Normalized HIST of sample 2 with α=2 and β=2", ... 490s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 490s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 490s a_bA(1), a_bA(2)), ... 490s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 490s a_bB(1), a_bB(2)), ... 490s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 490s a_bC(1), a_bC(2))}) 490s title ("Three population samples from different Gamma distibutions") 490s hold off 490s ***** shared x 490s 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]; 490s ***** test 490s [paramhat, paramci] = gamfit (x); 490s assert (paramhat, [3.4248, 0.9752], 1e-4); 490s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 490s ***** test 490s [paramhat, paramci] = gamfit (x, 0.01); 490s assert (paramhat, [3.4248, 0.9752], 1e-4); 490s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 490s ***** test 490s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 490s [paramhat, paramci] = gamfit (x, [], [], freq); 490s assert (paramhat, [3.3025, 1.0615], 1e-4); 490s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 490s ***** test 490s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 490s assert (paramhat, [4.4484, 0.9689], 1e-4); 490s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 490s ***** test 490s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 490s assert (paramhat, [4.4484, 0.9689], 1e-4); 490s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 490s ***** test 490s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 490s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 490s assert (paramhat, [4.7537, 0.9308], 1e-4); 490s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 490s ***** test 490s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 490s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 490s [paramhat, paramci] = gamfit (x, [], cens, freq); 490s assert (paramhat, [3.4736, 1.0847], 1e-4); 490s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 490s ***** test 490s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 490s assert (paramhat, [Inf, 0]); 490s assert (paramci, [Inf, 0; Inf, 0]); 490s ***** test 490s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 490s assert (paramhat, [NaN, NaN]); 490s assert (paramci, [NaN, NaN; NaN, NaN]); 490s ***** test 490s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 490s assert (paramhat, [Inf, 0]); 490s assert (paramci, [Inf, 0; Inf, 0]); 490s ***** assert (class (gamfit (single (x))), "single") 490s ***** error gamfit (ones (2)) 490s ***** error gamfit (x, 1) 490s ***** error gamfit (x, -1) 490s ***** error gamfit (x, {0.05}) 490s ***** error gamfit (x, "a") 490s ***** error gamfit (x, i) 490s ***** error gamfit (x, [0.01 0.02]) 490s ***** error 490s gamfit ([1 2 3], 0.05, [], [1 5]) 490s ***** error 490s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 490s ***** error ... 490s gamfit ([1:10], 0.05, [], [], 5) 490s ***** error gamfit ([1 2 3 -4]) 490s ***** error ... 490s gamfit ([1 2 0], [], [1 0 0]) 490s 23 tests, 23 passed, 0 known failure, 0 skipped 490s [inst/dist_fit/ricefit.m] 490s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/ricefit.m 490s ***** demo 490s ## Sample 3 populations from different Gamma distibutions 490s randg ("seed", 5); # for reproducibility 490s randp ("seed", 6); 490s r1 = ricernd (1, 2, 3000, 1); 490s randg ("seed", 2); # for reproducibility 490s randp ("seed", 8); 490s r2 = ricernd (2, 4, 3000, 1); 490s randg ("seed", 7); # for reproducibility 490s randp ("seed", 9); 490s r3 = ricernd (7.5, 1, 3000, 1); 490s r = [r1, r2, r3]; 490s 490s ## Plot them normalized and fix their colors 490s hist (r, 75, 4); 490s h = findobj (gca, "Type", "patch"); 490s set (h(1), "facecolor", "c"); 490s set (h(2), "facecolor", "g"); 490s set (h(3), "facecolor", "r"); 490s ylim ([0, 0.7]); 490s xlim ([0, 12]); 490s hold on 490s 490s ## Estimate their α and β parameters 490s s_sigmaA = ricefit (r(:,1)); 490s s_sigmaB = ricefit (r(:,2)); 490s s_sigmaC = ricefit (r(:,3)); 490s 490s ## Plot their estimated PDFs 490s x = [0.01,0.1:0.2:18]; 490s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 490s plot (x, y, "-pr"); 490s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 490s plot (x, y, "-sg"); 490s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 490s plot (x, y, "-^c"); 490s hold off 490s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 490s "Normalized HIST of sample 2 with s=2 and σ=4", ... 490s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 490s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 490s s_sigmaA(1), s_sigmaA(2)), ... 490s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 490s s_sigmaB(1), s_sigmaB(2)), ... 490s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 490s s_sigmaC(1), s_sigmaC(2))}) 490s title ("Three population samples from different Rician distibutions") 490s hold off 490s ***** test 490s [paramhat, paramci] = ricefit ([1:50]); 490s assert (paramhat, [15.3057, 17.6668], 1e-4); 490s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 490s ***** test 490s [paramhat, paramci] = ricefit ([1:50], 0.01); 490s assert (paramhat, [15.3057, 17.6668], 1e-4); 490s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 490s ***** test 490s [paramhat, paramci] = ricefit ([1:5]); 490s assert (paramhat, [2.3123, 1.6812], 1e-4); 490s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 490s ***** test 490s [paramhat, paramci] = ricefit ([1:5], 0.01); 490s assert (paramhat, [2.3123, 1.6812], 1e-4); 490s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 490s ***** test 490s freq = [1 1 1 1 5]; 490s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 490s assert (paramhat, [3.5181, 1.5565], 1e-4); 490s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 491s ***** test 491s censor = [1 0 0 0 0]; 491s [paramhat, paramci] = ricefit ([1:5], [], censor); 491s assert (paramhat, [3.2978, 1.1527], 1e-4); 491s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 491s ***** assert (class (ricefit (single ([1:50]))), "single") 491s ***** error ricefit (ones (2)) 491s ***** error ricefit ([1:50], 1) 491s ***** error ricefit ([1:50], -1) 491s ***** error ricefit ([1:50], {0.05}) 491s ***** error ricefit ([1:50], "k") 491s ***** error ricefit ([1:50], i) 491s ***** error ricefit ([1:50], [0.01 0.02]) 491s ***** error ricefit ([1:50], [], [1 1]) 491s ***** error ricefit ([1:50], [], [], [1 1]) 491s ***** error ... 491s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 491s ***** error ricefit ([1 2 3 -4]) 491s ***** error ricefit ([1 2 0], [], [1 0 0]) 491s 19 tests, 19 passed, 0 known failure, 0 skipped 491s [inst/dist_fit/evfit.m] 491s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/evfit.m 491s ***** demo 491s ## Sample 3 populations from different extreme value distibutions 491s rand ("seed", 1); # for reproducibility 491s r1 = evrnd (2, 5, 400, 1); 491s rand ("seed", 12); # for reproducibility 491s r2 = evrnd (-5, 3, 400, 1); 491s rand ("seed", 13); # for reproducibility 491s r3 = evrnd (14, 8, 400, 1); 491s r = [r1, r2, r3]; 491s 491s ## Plot them normalized and fix their colors 491s hist (r, 25, 0.4); 491s h = findobj (gca, "Type", "patch"); 491s set (h(1), "facecolor", "c"); 491s set (h(2), "facecolor", "g"); 491s set (h(3), "facecolor", "r"); 491s ylim ([0, 0.28]) 491s xlim ([-30, 30]); 491s hold on 491s 491s ## Estimate their MU and SIGMA parameters 491s mu_sigmaA = evfit (r(:,1)); 491s mu_sigmaB = evfit (r(:,2)); 491s mu_sigmaC = evfit (r(:,3)); 491s 491s ## Plot their estimated PDFs 491s x = [min(r(:)):max(r(:))]; 491s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 491s plot (x, y, "-pr"); 491s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 491s plot (x, y, "-sg"); 491s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 491s plot (x, y, "-^c"); 491s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 491s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 491s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 491s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 491s mu_sigmaA(1), mu_sigmaA(2)), ... 491s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 491s mu_sigmaB(1), mu_sigmaB(2)), ... 491s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 491s mu_sigmaC(1), mu_sigmaC(2))}) 491s title ("Three population samples from different extreme value distibutions") 491s hold off 491s ***** test 491s x = 1:50; 491s [paramhat, paramci] = evfit (x); 491s paramhat_out = [32.6811, 13.0509]; 491s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 491s assert (paramhat, paramhat_out, 1e-4); 491s assert (paramci, paramci_out, 1e-4); 491s ***** test 491s x = 1:50; 491s [paramhat, paramci] = evfit (x, 0.01); 491s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 491s assert (paramci, paramci_out, 1e-4); 491s ***** error evfit (ones (2,5)); 491s ***** error evfit (single (ones (1,5))); 491s ***** error evfit ([1, 2, 3, 4, NaN]); 491s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 491s ***** error 491s evfit ([1 2 3], 0.05, [], [1 5]) 491s ***** error 491s evfit ([1 2 3], 0.05, [], [1 5 -1]) 491s ***** error ... 491s evfit ([1:10], 0.05, [], [], 5) 491s 9 tests, 9 passed, 0 known failure, 0 skipped 491s [inst/dist_fit/logilike.m] 491s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fit/logilike.m 491s ***** test 491s nlogL = logilike ([25.5, 8.7725], [1:50]); 491s assert (nlogL, 206.6769, 1e-4); 491s ***** test 491s nlogL = logilike ([3, 0.8645], [1:5]); 491s assert (nlogL, 9.0699, 1e-4); 491s ***** error logilike (3.25) 491s ***** error logilike ([5, 0.2], ones (2)) 491s ***** error ... 491s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 491s ***** error ... 491s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 491s ***** error ... 491s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 491s ***** error ... 491s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 491s 8 tests, 8 passed, 0 known failure, 0 skipped 491s [inst/kstest2.m] 491s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/kstest2.m 491s ***** error kstest2 ([1,2,3,4,5,5]) 491s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 491s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 491s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 491s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 491s ***** test 491s load examgrades 491s [h, p] = kstest2 (grades(:,1), grades(:,2)); 491s assert (h, false); 491s assert (p, 0.1222791870137312, 1e-14); 491s ***** test 491s load examgrades 491s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 491s assert (h, false); 491s assert (p, 0.1844421391011258, 1e-14); 491s ***** test 491s load examgrades 491s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 491s assert (h, false); 491s assert (p, 0.06115357930171663, 1e-14); 491s ***** test 491s load examgrades 491s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 491s assert (h, true); 491s assert (p, 0.06115357930171663, 1e-14); 491s 14 tests, 14 passed, 0 known failure, 0 skipped 491s [inst/confusionchart.m] 491s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/confusionchart.m 491s ***** demo 491s ## Setting the chart properties 491s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 491s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 491s confusionchart (Yt, Yp, "Title", ... 491s "Demonstration with summaries","Normalization",... 491s "absolute","ColumnSummary", "column-normalized","RowSummary",... 491s "row-normalized") 491s ***** demo 491s ## Cellstr as inputs 491s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 491s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 491s m = confusionmat (Yt, Yp); 491s confusionchart (m, {"Positive", "Negative"}); 491s ***** demo 491s ## Editing the object properties 491s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 491s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 491s cm = confusionchart (Yt, Yp); 491s cm.Title = "This is an example with a green diagonal"; 491s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 491s ***** demo 491s ## Confusion chart in a uipanel 491s h = uipanel (); 491s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 491s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 491s cm = confusionchart (h, Yt, Yp); 491s ***** demo 491s ## Sorting classes 491s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 491s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 491s cm = confusionchart (Yt, Yp, "Title", ... 491s "Classes are sorted in ascending order"); 491s cm = confusionchart (Yt, Yp, "Title", ... 491s "Classes are sorted according to clusters"); 491s sortClasses (cm, "cluster"); 491s ***** shared visibility_setting 491s visibility_setting = get (0, "DefaultFigureVisible"); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ()", "Invalid call"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 491s ".* YLabel .* string"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 491s ".* FontName .* string"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 491s ".* FontSize .* numeric"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 491s ".* DiagonalColor .* color"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 491s ".* OffDiagonalColor .* color"); 491s set (0, "DefaultFigureVisible", visibility_setting); 491s ***** test 491s set (0, "DefaultFigureVisible", "off"); 491s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 491s ".* invalid .* Normalization"); 491s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 492s ".* invalid .* ColumnSummary"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 492s ".* invalid .* RowSummary"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 492s ".* invalid .* GridVisible"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 492s ".* invalid .* HandleVisibility"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 492s ".* invalid .* OuterPosition"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 492s ".* invalid .* Position"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s 18 tests, 18 passed, 0 known failure, 0 skipped 492s [inst/tabulate.m] 492s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/tabulate.m 492s ***** demo 492s ## Generate a frequency table for a vector of data in a cell array 492s load patients 492s 492s ## Display the first seven entries of the Gender variable 492s gender = Gender(1:7) 492s 492s ## Compute the equency table that shows the number and 492s ## percentage of Male and Female patients 492s tabulate (Gender) 492s ***** demo 492s ## Create a frequency table for a vector of positive integers 492s load patients 492s 492s ## Display the first seven entries of the Gender variable 492s height = Height(1:7) 492s 492s ## Create a frequency table that shows, in its second and third columns, 492s ## the number and percentage of patients with a particular height. 492s table = tabulate (Height); 492s 492s ## Display the first and last seven entries of the frequency table 492s first = table(1:7,:) 492s 492s last = table(end-6:end,:) 492s ***** demo 492s ## Create a frequency table from a character array 492s load carsmall 492s 492s ## Tabulate the data in the Origin variable, which shows the 492s ## country of origin of each car in the data set 492s tabulate (Origin) 492s ***** demo 492s ## Create a frequency table from a numeric vector with NaN values 492s load carsmall 492s 492s ## The carsmall dataset contains measurements of 100 cars 492s total_cars = length (MPG) 492s ## For six cars, the MPG value is missing 492s missingMPG = length (MPG(isnan (MPG))) 492s 492s ## Create a frequency table using MPG 492s tabulate (MPG) 492s table = tabulate (MPG); 492s 492s ## Only 94 cars were used 492s valid_cars = sum (table(:,2)) 492s ***** test 492s load patients 492s table = tabulate (Gender); 492s assert (table{1,1}, "Male"); 492s assert (table{2,1}, "Female"); 492s assert (table{1,2}, 47); 492s assert (table{2,2}, 53); 492s ***** test 492s load patients 492s table = tabulate (Height); 492s assert (table(end-4,:), [68, 15, 15]); 492s assert (table(end-3,:), [69, 8, 8]); 492s assert (table(end-2,:), [70, 11, 11]); 492s assert (table(end-1,:), [71, 10, 10]); 492s assert (table(end,:), [72, 4, 4]); 492s ***** error tabulate (ones (3)) 492s ***** error tabulate ({1, 2, 3, 4}) 492s ***** error ... 492s tabulate ({"a", "b"; "a", "c"}) 492s 5 tests, 5 passed, 0 known failure, 0 skipped 492s [inst/multcompare.m] 492s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/multcompare.m 492s ***** demo 492s 492s ## Demonstration using balanced one-way ANOVA from anova1 492s 492s x = ones (50, 4) .* [-2, 0, 1, 5]; 492s randn ("seed", 1); # for reproducibility 492s x = x + normrnd (0, 2, 50, 4); 492s groups = {"A", "B", "C", "D"}; 492s [p, tbl, stats] = anova1 (x, groups, "off"); 492s multcompare (stats); 492s ***** demo 492s 492s ## Demonstration using unbalanced one-way ANOVA example from anovan 492s 492s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 492s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 492s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 492s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 492s 25.694 ]'; 492s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 492s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 492s 492s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 492s "ControlGroup", 1, "display", "on") 492s 492s ***** demo 492s 492s ## Demonstration using factorial ANCOVA example from anovan 492s 492s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 492s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 492s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 492s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 492s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 492s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 492s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 492s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 492s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 492s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 492s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 492s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 492s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 492s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 492s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 492s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 492s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 492s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 492s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 492s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 492s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 492s 492s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 492s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 492s "sstype", "h", "display", "off", "contrasts", ... 492s {"simple","poly",""}); 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 492s "display", "on") 492s 492s ***** demo 492s 492s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 492s ## squares to account for heteroskedasticity. 492s 492s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 492s 2, 2, 2, 2, 2, 2, 2, 2, ... 492s 3, 3, 3, 3, 3, 3, 3, 3]'; 492s 492s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 492s 10, 25, 66, 43, 47, 56, 6, 39, ... 492s 11, 39, 26, 35, 25, 14, 24, 17]'; 492s 492s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 492s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 492s b = polyfit (fitted, abs (STATS.resid), 1); 492s v = polyval (b, fitted); # Variance as a function of the fitted values 492s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 492s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 492s ***** demo 492s 492s ## Demonstration of p-value adjustments to control the false discovery rate 492s ## Data from Westfall (1997) JASA. 92(437):299-306 492s 492s p = [.005708; .023544; .024193; .044895; ... 492s .048805; .221227; .395867; .693051; .775755]; 492s 492s padj = multcompare(p,'ctype','fdr') 492s ***** test 492s 492s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 492s 492s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 492s 492s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 492s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 492s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 492s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 492s 25.694 ]'; 492s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 492s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 492s 492s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 492s "display", "off"); 492s assert (C(1,6), 2.85812420217898e-05, 1e-09); 492s assert (C(2,6), 5.22936741204085e-07, 1e-09); 492s assert (C(3,6), 2.12794763209146e-08, 1e-09); 492s assert (C(4,6), 7.82091664406946e-15, 1e-09); 492s assert (C(5,6), 0.546591417210693, 1e-09); 492s assert (C(6,6), 0.0845897945254446, 1e-09); 492s assert (C(7,6), 9.47436557975328e-08, 1e-09); 492s assert (C(8,6), 0.188873478781067, 1e-09); 492s assert (C(9,6), 4.08974010364197e-08, 1e-09); 492s assert (C(10,6), 4.44427348175241e-06, 1e-09); 492s assert (M(1,1), 10, 1e-09); 492s assert (M(2,1), 18, 1e-09); 492s assert (M(3,1), 19, 1e-09); 492s assert (M(4,1), 21.0001428571429, 1e-09); 492s assert (M(5,1), 29.0001111111111, 1e-09); 492s assert (M(1,2), 1.0177537954095, 1e-09); 492s assert (M(2,2), 1.28736803631001, 1e-09); 492s assert (M(3,2), 1.0177537954095, 1e-09); 492s assert (M(4,2), 1.0880245732889, 1e-09); 492s assert (M(5,2), 0.959547480416536, 1e-09); 492s 492s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 492s "display", "off"); 492s assert (C(1,6), 4.08303457454140e-05, 1e-09); 492s assert (C(2,6), 1.04587348240817e-06, 1e-09); 492s assert (C(3,6), 1.06397381604573e-07, 1e-09); 492s assert (C(4,6), 7.82091664406946e-14, 1e-09); 492s assert (C(5,6), 5.46591417210693e-01, 1e-09); 492s assert (C(6,6), 1.05737243156806e-01, 1e-09); 492s assert (C(7,6), 2.36859139493832e-07, 1e-09); 492s assert (C(8,6), 2.09859420867852e-01, 1e-09); 492s assert (C(9,6), 1.36324670121399e-07, 1e-09); 492s assert (C(10,6), 7.40712246958735e-06, 1e-09); 492s 492s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 492s "display", "off"); 492s assert (C(1,6), 1.14324968087159e-04, 1e-09); 492s assert (C(2,6), 3.13762044722451e-06, 1e-09); 492s assert (C(3,6), 1.91515286888231e-07, 1e-09); 492s assert (C(4,6), 7.82091664406946e-14, 1e-09); 492s assert (C(5,6), 5.46591417210693e-01, 1e-09); 492s assert (C(6,6), 2.53769383576334e-01, 1e-09); 492s assert (C(7,6), 6.63205590582730e-07, 1e-09); 492s assert (C(8,6), 3.77746957562134e-01, 1e-09); 492s assert (C(9,6), 3.27179208291358e-07, 1e-09); 492s assert (C(10,6), 2.22213674087620e-05, 1e-09); 492s 492s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 492s "display", "off"); 492s assert (C(1,6), 1.14324968087159e-04, 1e-09); 492s assert (C(2,6), 3.13762044722451e-06, 1e-09); 492s assert (C(3,6), 1.91515286888231e-07, 1e-09); 492s assert (C(4,6), 7.82091664406946e-14, 1e-09); 492s assert (C(5,6), 5.46591417210693e-01, 1e-09); 492s assert (C(6,6), 2.53769383576334e-01, 1e-09); 492s assert (C(7,6), 6.63205590582730e-07, 1e-09); 492s assert (C(8,6), 3.77746957562134e-01, 1e-09); 492s assert (C(9,6), 3.27179208291358e-07, 1e-09); 492s assert (C(10,6), 2.22213674087620e-05, 1e-09); 492s 492s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 492s "display", "off"); 492s assert (C(1,6), 0.00108105386141085, 1e-09); 492s assert (C(2,6), 2.7779386789517e-05, 1e-09); 492s assert (C(3,6), 1.3599854038198e-06, 1e-09); 492s assert (C(4,6), 7.58830197867751e-13, 1e-09); 492s assert (C(5,6), 0.984039948220281, 1e-09); 492s assert (C(6,6), 0.539077018557706, 1e-09); 492s assert (C(7,6), 5.59475764460574e-06, 1e-09); 492s assert (C(8,6), 0.771173490574105, 1e-09); 492s assert (C(9,6), 2.52838425729905e-06, 1e-09); 492s assert (C(10,6), 0.000200719143889168, 1e-09); 492s 492s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 492s 492s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 492s "display", "off"); 492s assert (C(1,6), 2.85812420217898e-04, 1e-09); 492s assert (C(2,6), 5.22936741204085e-06, 1e-09); 492s assert (C(3,6), 2.12794763209146e-07, 1e-09); 492s assert (C(4,6), 7.82091664406946e-14, 1e-09); 492s assert (C(5,6), 1.00000000000000e+00, 1e-09); 492s assert (C(6,6), 8.45897945254446e-01, 1e-09); 492s assert (C(7,6), 9.47436557975328e-07, 1e-09); 492s assert (C(8,6), 1.00000000000000e+00, 1e-09); 492s assert (C(9,6), 4.08974010364197e-07, 1e-09); 492s assert (C(10,6), 4.44427348175241e-05, 1e-09); 492s 492s ## Test for anova1 ("equal")- comparison of results from Matlab 492s 492s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 492s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 2.85812420217898e-05, 1e-09); 492s assert (C(2,6), 5.22936741204085e-07, 1e-09); 492s assert (C(3,6), 2.12794763209146e-08, 1e-09); 492s assert (C(4,6), 7.82091664406946e-15, 1e-09); 492s assert (C(5,6), 0.546591417210693, 1e-09); 492s assert (C(6,6), 0.0845897945254446, 1e-09); 492s assert (C(7,6), 9.47436557975328e-08, 1e-09); 492s assert (C(8,6), 0.188873478781067, 1e-09); 492s assert (C(9,6), 4.08974010364197e-08, 1e-09); 492s assert (C(10,6), 4.44427348175241e-06, 1e-09); 492s assert (M(1,1), 10, 1e-09); 492s assert (M(2,1), 18, 1e-09); 492s assert (M(3,1), 19, 1e-09); 492s assert (M(4,1), 21.0001428571429, 1e-09); 492s assert (M(5,1), 29.0001111111111, 1e-09); 492s assert (M(1,2), 1.0177537954095, 1e-09); 492s assert (M(2,2), 1.28736803631001, 1e-09); 492s assert (M(3,2), 1.0177537954095, 1e-09); 492s assert (M(4,2), 1.0880245732889, 1e-09); 492s assert (M(5,2), 0.959547480416536, 1e-09); 492s 492s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 492s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 492s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 0.001247025266382, 1e-09); 492s assert (C(2,6), 0.000018037115146, 1e-09); 492s assert (C(3,6), 0.000002974595187, 1e-09); 492s assert (C(4,6), 0.000000000786046, 1e-09); 492s assert (C(5,6), 0.5693192886650109, 1e-09); 492s assert (C(6,6), 0.110501699029776, 1e-09); 492s assert (C(7,6), 0.000131226488700, 1e-09); 492s assert (C(8,6), 0.1912101409715992, 1e-09); 492s assert (C(9,6), 0.000005385256394, 1e-09); 492s assert (C(10,6), 0.000074089106171, 1e-09); 492s ***** test 492s 492s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 492s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 492s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 492s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 492s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 492s "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 1.49311100811177e-05, 1e-09); 492s assert (C(2,6), 2.20506904243535e-07, 1e-09); 492s assert (C(3,6), 0.00449897860490058, 1e-09); 492s assert (M(1,1), 6.25, 1e-09); 492s assert (M(2,1), 4.75, 1e-09); 492s assert (M(3,1), 4, 1e-09); 492s assert (M(1,2), 0.152145154862547, 1e-09); 492s assert (M(2,2), 0.152145154862547, 1e-09); 492s assert (M(3,2), 0.152145154862547, 1e-09); 492s ***** test 492s 492s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 492s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 492s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 492s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 492s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 492s "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 0.000020799832702, 1e-09); 492s assert (C(2,6), 0.000000035812410, 1e-09); 492s assert (C(3,6), 0.003038942449215, 1e-09); 492s ***** test 492s 492s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 492s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 492s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 492s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 492s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 492s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 492s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 492s "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 0.261031111511073, 1e-09); 492s assert (C(2,6), 0.065879755907745, 1e-09); 492s assert (C(3,6), 0.241874613529270, 1e-09); 492s ***** shared visibility_setting 492s visibility_setting = get (0, "DefaultFigureVisible"); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s 492s ## Test for kruskalwallis - comparison with results from MATLAB 492s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 492s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 492s group = [1:3] .* ones (10,3); 492s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 492s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 0.000163089828959986, 1e-09); 492s assert (C(2,6), 0.630298044801257, 1e-09); 492s assert (C(3,6), 0.00100567660695682, 1e-09); 492s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 492s assert (C(1,6), 0.000489269486879958, 1e-09); 492s assert (C(2,6), 1, 1e-09); 492s assert (C(3,6), 0.00301702982087047, 1e-09); 492s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 492s assert (C(1,6), 0.000819054880289573, 1e-09); 492s assert (C(2,6), 0.890628039849261, 1e-09); 492s assert (C(3,6), 0.00447816059021654, 1e-09); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s ## Test for friedman - comparison with results from MATLAB 492s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 492s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 492s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 492s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 0.227424558028569, 1e-09); 492s assert (C(2,6), 0.0327204848315735, 1e-09); 492s assert (C(3,6), 0.353160353315988, 1e-09); 492s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 492s assert (C(1,6), 0.682273674085708, 1e-09); 492s assert (C(2,6), 0.0981614544947206, 1e-09); 492s assert (C(3,6), 1, 1e-09); 492s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 492s assert (C(1,6), 0.482657360384373, 1e-09); 492s assert (C(2,6), 0.102266573027672, 1e-09); 492s assert (C(3,6), 0.649836502233148, 1e-09); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s set (0, "DefaultFigureVisible", "off"); 492s ## Test for fitlm - same comparisons as for first anovan example 492s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 492s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 492s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 492s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 492s 25.694 ]'; 492s 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]'; 492s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 492s "contrasts","simple"); 492s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 492s assert (C(1,6), 2.85812420217898e-05, 1e-09); 492s assert (C(2,6), 5.22936741204085e-07, 1e-09); 492s assert (C(3,6), 2.12794763209146e-08, 1e-09); 492s assert (C(4,6), 7.82091664406946e-15, 1e-09); 492s assert (C(5,6), 0.546591417210693, 1e-09); 492s assert (C(6,6), 0.0845897945254446, 1e-09); 492s assert (C(7,6), 9.47436557975328e-08, 1e-09); 492s assert (C(8,6), 0.188873478781067, 1e-09); 492s assert (C(9,6), 4.08974010364197e-08, 1e-09); 492s assert (C(10,6), 4.44427348175241e-06, 1e-09); 492s assert (M(1,1), 10, 1e-09); 492s assert (M(2,1), 18, 1e-09); 492s assert (M(3,1), 19, 1e-09); 492s assert (M(4,1), 21.0001428571429, 1e-09); 492s assert (M(5,1), 29.0001111111111, 1e-09); 492s assert (M(1,2), 1.0177537954095, 1e-09); 492s assert (M(2,2), 1.28736803631001, 1e-09); 492s assert (M(3,2), 1.0177537954095, 1e-09); 492s assert (M(4,2), 1.0880245732889, 1e-09); 492s assert (M(5,2), 0.959547480416536, 1e-09); 492s set (0, "DefaultFigureVisible", visibility_setting); 492s ***** test 492s ## Test p-value adjustments compared to R stats package function p.adjust 492s ## Data from Westfall (1997) JASA. 92(437):299-306 492s p = [.005708; .023544; .024193; .044895; ... 492s .048805; .221227; .395867; .693051; .775755]; 492s padj = multcompare (p); 492s assert (padj(1), 0.051372, 1e-06); 492s assert (padj(2), 0.188352, 1e-06); 492s assert (padj(3), 0.188352, 1e-06); 492s assert (padj(4), 0.269370, 1e-06); 492s assert (padj(5), 0.269370, 1e-06); 492s assert (padj(6), 0.884908, 1e-06); 492s assert (padj(7), 1.000000, 1e-06); 492s assert (padj(8), 1.000000, 1e-06); 492s assert (padj(9), 1.000000, 1e-06); 492s padj = multcompare(p,'ctype','holm'); 492s assert (padj(1), 0.051372, 1e-06); 492s assert (padj(2), 0.188352, 1e-06); 492s assert (padj(3), 0.188352, 1e-06); 492s assert (padj(4), 0.269370, 1e-06); 492s assert (padj(5), 0.269370, 1e-06); 492s assert (padj(6), 0.884908, 1e-06); 492s assert (padj(7), 1.000000, 1e-06); 492s assert (padj(8), 1.000000, 1e-06); 492s assert (padj(9), 1.000000, 1e-06); 492s padj = multcompare(p,'ctype','hochberg'); 492s assert (padj(1), 0.051372, 1e-06); 492s assert (padj(2), 0.169351, 1e-06); 492s assert (padj(3), 0.169351, 1e-06); 492s assert (padj(4), 0.244025, 1e-06); 492s assert (padj(5), 0.244025, 1e-06); 492s assert (padj(6), 0.775755, 1e-06); 492s assert (padj(7), 0.775755, 1e-06); 492s assert (padj(8), 0.775755, 1e-06); 492s assert (padj(9), 0.775755, 1e-06); 492s padj = multcompare(p,'ctype','fdr'); 492s assert (padj(1), 0.0513720, 1e-07); 492s assert (padj(2), 0.0725790, 1e-07); 492s assert (padj(3), 0.0725790, 1e-07); 492s assert (padj(4), 0.0878490, 1e-07); 492s assert (padj(5), 0.0878490, 1e-07); 492s assert (padj(6), 0.3318405, 1e-07); 492s assert (padj(7), 0.5089719, 1e-07); 492s assert (padj(8), 0.7757550, 1e-07); 492s assert (padj(9), 0.7757550, 1e-07); 492s 8 tests, 8 passed, 0 known failure, 0 skipped 492s [inst/shadow9/median.m] 492s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/shadow9/median.m 492s ***** assert (median (1), 1) 492s ***** assert (median ([1,2,3]), 2) 492s ***** assert (median ([1,2,3]'), 2) 492s ***** assert (median (cat(3,3,1,2)), 2) 492s ***** assert (median ([3,1,2]), 2) 492s ***** assert (median ([2,4,6,8]), 5) 492s ***** assert (median ([8,2,6,4]), 5) 493s ***** assert (median (single ([1,2,3])), single (2)) 493s ***** assert (median ([1,2], 3), [1,2]) 493s ***** test 493s x = [1, 2, 3, 4, 5, 6]; 493s x2 = x'; 493s y = [1, 2, 3, 4, 5, 6, 7]; 493s y2 = y'; 493s 493s assert (median (x) == median (x2) && median (x) == 3.5); 493s assert (median (y) == median (y2) && median (y) == 4); 493s assert (median ([x2, 2 * x2]), [3.5, 7]); 493s assert (median ([y2, 3 * y2]), [4, 12]); 493s ***** test 493s in = [1 2 3]; 493s out = 2; 493s assert (median (in, "default"), median (in)); 493s assert (median (in, "default"), out); 493s ***** test 493s in = single ([1 2 3]); 493s out = 2; 493s assert (median (in, "default"), single (median (in))); 493s assert (median (in, "default"), single (out)); 493s assert (median (in, "double"), double (out)); 493s assert (median (in, "native"), single (out)); 493s ***** test 493s in = uint8 ([1 2 3]); 493s out = 2; 493s assert (median (in, "default"), double (median (in))); 493s assert (median (in, "default"), double (out)); 493s assert (median (in, "double"), out); 493s assert (median (in, "native"), uint8 (out)); 493s ***** test 493s in = logical ([1 0 1]); 493s out = 1; 493s assert (median (in, "default"), double (median (in))); 493s assert (median (in, "default"), double (out)); 493s assert (median (in, "double"), double (out)); 493s assert (median (in, "native"), double (out)); 493s ***** test 493s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 493s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 493s assert (median (x), y); 493s assert (median (x, 1), y); 493s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 493s assert (median (x, "omitnan"), y); 493s assert (median (x, 1, "omitnan"), y); 493s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 493s assert (median (x, 2, "omitnan"), y); 493s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 493s assert (median (x, 2), y); 493s assert (median (x, "all"), NaN); 493s assert (median (x, "all", "omitnan"), 2); 493s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 493s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 493s ***** test 493s assert (median (true, "all"), logical (1)); 493s assert (median (false), logical (0)); 493s assert (median ([true false true]), true); 493s assert (median ([true false true], 2), true); 493s assert (median ([true false true], 1), logical ([1 0 1])); 493s assert (median ([true false NaN], 1), [1 0 NaN]); 493s assert (median ([true false NaN], 2), NaN); 493s assert (median ([true false NaN], 2, "omitnan"), 0.5); 493s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 493s ***** test 493s x = repmat ([1:20;6:25], [5 2 6 3]); 493s assert (size (median (x, [3 2])), [10 1 1 3]); 493s assert (size (median (x, [1 2])), [1 1 6 3]); 493s assert (size (median (x, [1 2 4])), [1 1 6]); 493s assert (size (median (x, [1 4 3])), [1 40]); 493s assert (size (median (x, [1 2 3 4])), [1 1]); 493s ***** assert (median (ones (2,2), 3), ones (2,2)) 493s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 493s ***** assert (median (magic (3), 3), magic (3)) 493s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 493s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 493s ***** test 493s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 493s assert (median (x, [3 2]), [NaN NaN 1.4]'); 493s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 493s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 493s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 493s ***** assert (median (NaN), NaN) 493s ***** assert (median (NaN, "omitnan"), NaN) 493s ***** assert (median (NaN (2)), [NaN NaN]) 493s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 493s ***** assert (median ([1 NaN 3]), NaN) 493s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 493s ***** assert (median ([1 NaN 3], 2), NaN) 493s ***** assert (median ([1 NaN 3]'), NaN) 493s ***** assert (median ([1 NaN 3]', 1), NaN) 493s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 493s ***** assert (median ([1 NaN 3], "omitnan"), 2) 493s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 493s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 493s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 493s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 493s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 493s ***** assert (median ([1 2 NaN 3]), NaN) 493s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 493s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 493s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 493s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 493s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 493s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 493s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 493s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 493s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 493s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 493s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 493s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 493s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 493s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 493s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 493s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 493s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 493s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 493s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 493s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 493s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 493s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 493s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 493s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 493s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 493s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 493s ***** assert (median (NaN("single")), NaN("single")) 493s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 493s ***** assert (median (NaN("single"), "double"), NaN("double")) 493s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 493s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 493s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 493s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 493s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 493s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 493s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 493s ***** test <*64011> 493s x = [magic(3), magic(3)]; 493s x([3, 7, 11, 12, 16, 17]) = NaN; 493s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 493s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 493s assert (median (x), ynan); 493s assert (median (x, "omitnan"), yomitnan, eps); 493s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 493s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 493s ***** assert (median (Inf), Inf) 493s ***** assert (median (-Inf), -Inf) 493s ***** assert (median ([-Inf Inf]), NaN) 493s ***** assert (median ([3 Inf]), Inf) 493s ***** assert (median ([3 4 Inf]), 4) 493s ***** assert (median ([Inf 3 4]), 4) 493s ***** assert (median ([Inf 3 Inf]), Inf) 493s ***** assert (median ([1, 2, Inf]), 2) 493s ***** assert (median ([1, 2, Inf, Inf]), Inf) 493s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 493s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 493s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 493s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 493s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 493s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 493s ***** assert (median ([]), NaN) 493s ***** assert (median (ones(1,0)), NaN) 493s ***** assert (median (ones(0,1)), NaN) 493s ***** assert (median ([], 1), NaN(1,0)) 493s ***** assert (median ([], 2), NaN(0,1)) 493s ***** assert (median ([], 3), NaN(0,0)) 493s ***** assert (median (ones(1,0), 1), NaN(1,0)) 493s ***** assert (median (ones(1,0), 2), NaN(1,1)) 493s ***** assert (median (ones(1,0), 3), NaN(1,0)) 493s ***** assert (median (ones(0,1), 1), NaN(1,1)) 493s ***** assert (median (ones(0,1), 2), NaN(0,1)) 493s ***** assert (median (ones(0,1), 3), NaN(0,1)) 493s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 493s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 493s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 493s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 493s ***** assert (median([1 3 3i 2 1i]), 2) 493s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 493s ***** shared a, b, x, y 493s old_state = rand ("state"); 493s restore_state = onCleanup (@() rand ("state", old_state)); 493s rand ("state", 2); 493s a = rand (2,3,4,5); 493s b = rand (3,4,6,5); 493s x = sort (a, 4); 493s y = sort (b, 3); 493s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 493s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 493s ***** shared ## Clear shared to prevent variable echo for any later test failures 493s ***** test 493s x = ones(15,1,4); 493s x([13,15],1,:) = NaN; 493s assert (median (x, 1, "omitnan"), ones (1,1,4)) 493s ***** assert (median ([true, false]), true) 493s ***** assert (median (logical ([])), false) 493s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 493s ***** assert (median (uint8 ([])), uint8 (NaN)) 493s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 493s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 493s ***** assert (median (int8 ([])), int8 (NaN)) 493s ***** assert (median (single ([1, 3, 4])), single (3)) 493s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 493s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 493s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 493s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 493s int8 ([64 65 65 67])) 493s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 493s int8 ([126; 4])) 493s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 493s intmax ("int64") - 1) 493s ***** assert <54567> (median ( ... 493s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 493s int64([intmax("int64") - 1; 2])) 493s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 493s intmax ("uint64") - 1) 493s ***** assert <54567> (median ( ... 493s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 493s uint64([intmax("uint64") - 1; 2])) 493s ***** assert <54567> (median (... 493s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 493s int8(-1)) 493s ***** assert <54567> (median ([int8([1 2 3 4]); ... 493s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 493s int8([3;-1])) 493s ***** assert <54567> (median (... 493s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 493s int64(-1)) 493s ***** assert <54567> (median ([int64([1 2 3 4]); ... 493s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 493s int64([3;-1])) 493s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 493s intmax("uint64")-1) 493s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 493s double(intmax("uint64")-1)) 493s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 493s double(intmax("uint64")-1)) 493s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 493s intmax("uint64")-1) 493s ***** assert (median ([1 2 3], "aLL"), 2) 493s ***** assert (median ([1 2 3], "OmitNan"), 2) 493s ***** assert (median ([1 2 3], "DOUBle"), 2) 493s ***** error median () 493s ***** error median (1, 2, 3) 493s ***** error median (1, 2, 3, 4) 493s ***** error median (1, "all", 3) 493s ***** error median (1, "b") 493s ***** error median (1, 1, "foo") 494s ***** error <'all' cannot be used with> median (1, 3, "all") 494s ***** error <'all' cannot be used with> median (1, [2 3], "all") 494s ***** error median ({1:5}) 494s ***** error median ("char") 494s ***** error median(1, "double", "native") 494s ***** error median (1, ones (2,2)) 494s ***** error median (1, 1.5) 494s ***** error median (1, 0) 494s ***** error median ([1 2 3], [-1 1]) 494s ***** error median(1, [1 2 2]) 494s 159 tests, 159 passed, 0 known failure, 0 skipped 494s [inst/shadow9/var.m] 494s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/shadow9/var.m 494s ***** assert (var (13), 0) 494s ***** assert (var (single (13)), single (0)) 494s ***** assert (var ([1,2,3]), 1) 494s ***** assert (var ([1,2,3], 1), 2/3, eps) 494s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 494s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 494s ***** assert (var (5, 99), 0) 494s ***** assert (var (5, 99, 1), 0) 494s ***** assert (var (5, 99, 2), 0) 494s ***** assert (var ([5 3], [99 99], 2), 1) 494s ***** assert (var ([1:7], [1:7]), 3) 494s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 494s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 494s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 494s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 494s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 494s ***** test 494s x = [-10:10]; 494s y = [x;x+5;x-5]; 494s assert (var (x), 38.5); 494s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 494s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 494s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 494s assert (var (y, "all"), 54.19354838709678, 1e-14); 494s y(2,4) = NaN; 494s assert (var (y, "all"), NaN); 494s assert (var (y, "all", "includenan"), NaN); 494s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 494s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 494s assert (var (y, [], 2), [38.5; NaN; 38.5]); 494s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 494s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 494s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 494s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 494s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 494s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 494s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 494s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 494s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 494s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 494s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 494s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 494s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 494s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 494s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 494s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 494s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 494s 60 * ones(1,1,2)) 494s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 494s 6 * ones(1,3,2)) 494s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 494s ***** test 494s x = reshape(1:18, [3 3 2]); 494s x([2, 14]) = NaN; 494s w = ones (3,3,2); 494s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 494s ***** test 494s x = reshape(1:18, [3 3 2]); 494s w = ones (3,3,2); 494s w([2, 14]) = NaN; 494s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 494s ***** assert (var ([1 2 3], "aLl"), 1); 494s ***** assert (var ([1 2 3], "OmitNan"), 1); 494s ***** assert (var ([1 2 3], "IncludeNan"), 1); 494s ***** test 494s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 494s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 494s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 494s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 494s assert (size (var (x, 0, [1 4 3])), [1, 40]); 494s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 494s ***** assert (var (3*magic(3)), [63 144 63]) 494s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 494s ***** assert (var (3*magic(3), 1), [42 96 42]) 494s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 494s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 494s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 494s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 494s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 494s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 494s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 494s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 494s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 494s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 494s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 494s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 494s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 494s ***** test 494s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 494s v = repmat (33.38912133891213, [10, 1, 1, 3]); 494s assert (var (x, 0, [3, 2]), v, 1e-14); 494s v = repmat (33.250, [10, 1, 1, 3]); 494s assert (var (x, 1, [3, 2]), v, 1e-14); 494s x(2,5,6,3) = NaN; 494s v(2,1,1,3) = NaN; 494s assert (var (x, 1, [3, 2]), v, 4e-14); 494s v = repmat (33.38912133891213, [10 1 1 3]); 494s v(2,1,1,3) = NaN; 494s assert (var (x, [], [3, 2]), v, 4e-14); 494s v(2,1,1,3) = 33.40177912169048; 494s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 494s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 494s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 494s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 494s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 494s ***** assert (var (magic (3), [], 3), zeros (3,3)) 494s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 494s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 494s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 494s ***** assert (var ([]), NaN) 494s ***** assert (class (var (single ([]))), "single") 494s ***** assert (var ([],[],1), NaN(1,0)) 494s ***** assert (var ([],[],2), NaN(0,1)) 494s ***** assert (var ([],[],3), []) 494s ***** assert (class (var (single ([]), [], 1)), "single") 494s ***** assert (var (ones (1,0)), NaN) 494s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 494s ***** assert (var (ones (1,0), [], 2), NaN) 494s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 494s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 494s ***** assert (var (ones (0,1)), NaN) 494s ***** assert (var (ones (0,1), [], 1), NaN) 494s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 494s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 494s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 494s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 494s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 494s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 494s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 494s ***** test 494s [~, m] = var ([]); 494s assert (m, NaN); 494s ***** test <*62395> 494s [~, m] = var (13); 494s assert (m, 13); 494s [~, m] = var (single(13)); 494s assert (m, single(13)); 494s [~, m] = var ([1, 2, 3; 3 2 1], []); 494s assert (m, [2 2 2]); 494s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 494s assert (m, [2 2 2]); 494s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 494s assert (m, [2 2]'); 494s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 494s assert (m, [1 2 3; 3 2 1]); 494s ***** test <*62395> 494s [~, m] = var (5,99); 494s assert (m, 5); 494s [~, m] = var ([1:7], [1:7]); 494s assert (m, 5); 494s [~, m] = var ([eye(3)], [1:3]); 494s assert (m, [1/6, 1/3, 0.5], eps); 494s [~, m] = var (ones (2,2,2), [1:2], 3); 494s assert (m, ones (2,2)); 494s [~, m] = var ([1 2; 3 4], 0, 'all'); 494s assert (m, 2.5, eps); 494s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 494s assert (m, [3.5, 5.5], eps); 494s ***** test 494s [v, m] = var (4 * eye (2), [1, 3]); 494s assert (v, [3, 3]); 494s assert (m, [1, 3]); 494s ***** test <*62395> 494s [~, m] = var ([]); 494s assert (m, NaN); 494s ***** test <*62395> 494s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 494s [~, m] = var (x, 0, [3 2]); 494s assert (m, mean (x, [3 2])); 494s [~, m] = var (x, 0, [1 2]); 494s assert (m, mean (x, [1 2])); 494s [~, m] = var (x, 0, [1 3 4]); 494s assert (m, mean (x, [1 3 4])); 494s ***** test 494s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 494s x(2,5,6,3) = NaN; 494s [~, m] = var (x, 0, [3 2], "omitnan"); 494s assert (m, mean (x, [3 2], "omitnan")); 494s ***** test <*63203> 494s [v, m] = var (Inf); 494s assert (v, NaN); 494s assert (m, Inf); 494s ***** test <*63203> 494s [v, m] = var (NaN); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3]); 494s assert (v, NaN); 494s assert (m, Inf); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3]'); 494s assert (v, NaN); 494s assert (m, Inf); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3]); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3]'); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3], [], 1); 494s assert (v, [0, NaN, 0]); 494s assert (m, [1, Inf, 3]); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3], [], 2); 494s assert (v, NaN); 494s assert (m, Inf); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3], [], 3); 494s assert (v, [0, NaN, 0]); 494s assert (m, [1, Inf, 3]); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3], [], 1); 494s assert (v, [0, NaN, 0]); 494s assert (m, [1, NaN, 3]); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3], [], 2); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3], [], 3); 494s assert (v, [0, NaN, 0]); 494s assert (m, [1, NaN, 3]); 494s ***** test <*63203> 494s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 494s assert (v, [2, NaN, 2]); 494s assert (m, [2, Inf, 4]); 494s ***** test <*63203> 494s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 494s assert (v, [2, NaN, 2]); 494s assert (m, [2, Inf, 4]); 494s ***** test <*63203> 494s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 494s assert (v, [2, NaN, 2]); 494s assert (m, [2, NaN, 4]); 494s ***** test <*63203> 494s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 494s assert (v, [2, NaN, 2]); 494s assert (m, [2, NaN, 4]); 494s ***** test <*63203> 494s [v, m] = var ([Inf, 2, NaN]); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([Inf, 2, NaN]'); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([NaN, 2, Inf]); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([NaN, 2, Inf]'); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([Inf, 2, NaN], [], 1); 494s assert (v, [NaN, 0, NaN]); 494s assert (m, [Inf, 2, NaN]); 494s ***** test <*63203> 494s [v, m] = var ([Inf, 2, NaN], [], 2); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([NaN, 2, Inf], [], 1); 494s assert (v, [NaN, 0, NaN]); 494s assert (m, [NaN, 2, Inf]); 494s ***** test <*63203> 494s [v, m] = var ([NaN, 2, Inf], [], 2); 494s assert (v, NaN); 494s assert (m, NaN); 494s ***** test <*63203> 494s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 494s assert (v, [2, 2, NaN]); 494s assert (m, [2, 4, NaN]); 494s ***** test <*63203> 494s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 494s assert (v, [2, 2, NaN]); 494s assert (m, [2, 4, NaN]); 494s ***** test <*63291> 494s [v, m] = var (2 * eye (2)); 494s assert (v, [2, 2]); 494s assert (m, [1, 1]); 494s ***** test <*63291> 494s [v, m] = var (4 * eye (2), [1, 3]); 494s assert (v, [3, 3]); 494s assert (m, [1, 3]); 494s ***** test <*63291> 494s [v, m] = var (sparse (2 * eye (2))); 494s assert (full (v), [2, 2]); 494s assert (full (m), [1, 1]); 494s ***** test <*63291> 494s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 494s assert (full (v), [3, 3]); 494s assert (full (m), [1, 3]); 494s ***** test<*63291> 494s [v, m] = var (sparse (eye (2))); 494s assert (issparse (v)); 494s assert (issparse (m)); 494s ***** test<*63291> 494s [v, m] = var (sparse (eye (2)), [1, 3]); 494s assert (issparse (v)); 494s assert (issparse (m)); 494s ***** error var () 494s ***** error var (1, 2, "omitnan", 3) 494s ***** error var (1, 2, 3, 4) 494s ***** error var (1, 2, 3, 4, 5) 494s ***** error var (1, "foo") 495s ***** error var (1, [], "foo") 495s ***** error var ([1 2 3], 2) 495s ***** error var ([1 2], 2, "all") 495s ***** error var ([1 2],0.5, "all") 495s ***** error var (1, -1) 495s ***** error var (1, [1 -1]) 495s ***** error ... 495s var ([1 2 3], [1 -1 0]) 495s ***** error var ({1:5}) 495s ***** error var ("char") 495s ***** error var (['A'; 'B']) 495s ***** error var (1, [], ones (2,2)) 495s ***** error var (1, 0, 1.5) 495s ***** error var (1, [], 0) 495s ***** error var (1, [], 1.5) 495s ***** error var ([1 2 3], [], [-1 1]) 495s ***** error ... 495s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 495s ***** error ... 495s var ([1 2], eye (2)) 495s ***** error ... 495s var ([1 2 3 4], [1 2; 3 4]) 495s ***** error ... 495s var ([1 2 3 4], [1 2; 3 4], 1) 495s ***** error ... 495s var ([1 2 3 4], [1 2; 3 4], [2 3]) 495s ***** error ... 495s var (ones (2, 2), [1 2], [1 2]) 495s ***** error ... 495s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 495s ***** error ... 495s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 495s ***** error var ([1 2 3; 2 3 4], [1 3 4]) 495s ***** error var ([1 2], [1 2 3]) 495s ***** error var (1, [1 2]) 495s ***** error var ([1 2 3; 2 3 4], [1 3 4], 1) 495s ***** error var ([1 2 3; 2 3 4], [1 3], 2) 495s ***** error var ([1 2], [1 2], 1) 495s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 495s var (1, [], 1, "all") 495s ***** error ... 495s var ([1 2 3; 2 3 4], [1 3], "all") 495s ***** error ... 495s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 495s 162 tests, 162 passed, 0 known failure, 0 skipped 495s [inst/shadow9/mean.m] 495s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/shadow9/mean.m 495s ***** test 495s x = -10:10; 495s y = x'; 495s z = [y, y+10]; 495s assert (mean (x), 0); 495s assert (mean (y), 0); 495s assert (mean (z), [0, 10]); 495s ***** assert (mean (magic (3), 1), [5, 5, 5]) 495s ***** assert (mean (magic (3), 2), [5; 5; 5]) 495s ***** assert (mean (logical ([1 0 1 1])), 0.75) 495s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 495s ***** assert (mean ([1 2], 3), [1 2]) 495s ***** test 495s in = [1 2 3]; 495s out = 2; 495s assert (mean (in, "default"), mean (in)); 495s assert (mean (in, "default"), out); 495s assert (mean (in, "double"), out); 495s assert (mean (in, "native"), out); 495s ***** test 495s in = single ([1 2 3]); 495s out = 2; 495s assert (mean (in, "default"), mean (in)); 495s assert (mean (in, "default"), single (out)); 495s assert (mean (in, "double"), out); 495s assert (mean (in, "native"), single (out)); 495s ***** test 495s in = logical ([1 0 1]); 495s out = 2/3; 495s assert (mean (in, "default"), mean (in), eps); 495s assert (mean (in, "default"), out, eps); 495s assert (mean (in, "double"), out, eps); 495s assert (mean (in, "native"), out, eps); 495s ***** test 495s in = char ("ab"); 495s out = 97.5; 495s assert (mean (in, "default"), mean (in), eps); 495s assert (mean (in, "default"), out, eps); 495s assert (mean (in, "double"), out, eps); 495s ***** test 495s in = uint8 ([1 2 3]); 495s out = 2; 495s assert (mean (in, "default"), mean (in)); 495s assert (mean (in, "default"), out); 495s assert (mean (in, "double"), out); 495s assert (mean (in, "native"), uint8 (out)); 495s ***** test 495s in = uint8 ([0 1 2 3]); 495s out = 1.5; 495s out_u8 = 2; 495s assert (mean (in, "default"), mean (in), eps); 495s assert (mean (in, "default"), out, eps); 495s assert (mean (in, "double"), out, eps); 495s assert (mean (in, "native"), uint8 (out_u8)); 495s assert (class (mean (in, "native")), "uint8"); 495s ***** test # internal sum exceeding intmax 495s in = uint8 ([3 141 141 255]); 495s out = 135; 495s assert (mean (in, "default"), mean (in)); 495s assert (mean (in, "default"), out); 495s assert (mean (in, "double"), out); 495s assert (mean (in, "native"), uint8 (out)); 495s assert (class (mean (in, "native")), "uint8"); 495s ***** test # fractional answer with internal sum exceeding intmax 495s in = uint8 ([1 141 141 255]); 495s out = 134.5; 495s out_u8 = 135; 495s assert (mean (in, "default"), mean (in)); 495s assert (mean (in, "default"), out); 495s assert (mean (in, "double"), out); 495s assert (mean (in, "native"), uint8 (out_u8)); 495s assert (class (mean (in, "native")), "uint8"); 495s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 495s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 495s out_same = intmax ("uint64")-1; 495s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 495s out_opp = -1; 495s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 495s out_neg = intmin ("int64")+1; 495s 495s ## both positive 495s assert (mean (in_same, "default"), mean (in_same)); 495s assert (mean (in_same, "default"), double (out_same)); 495s assert (mean (in_same, "double"), double (out_same)); 495s assert (mean (in_same, "native"), uint64 (out_same)); 495s assert (class (mean (in_same, "native")), "uint64"); 495s 495s ## opposite signs 495s assert (mean (in_opp, "default"), mean (in_opp)); 495s assert (mean (in_opp, "default"), double (out_opp)); 495s assert (mean (in_opp, "double"), double (out_opp)); 495s assert (mean (in_opp, "native"), int64 (out_opp)); 495s assert (class (mean (in_opp, "native")), "int64"); 495s 495s ## both negative 495s assert (mean (in_neg, "default"), mean (in_neg)); 495s assert (mean (in_neg, "default"), double(out_neg)); 495s assert (mean (in_neg, "double"), double(out_neg)); 495s assert (mean (in_neg, "native"), int64(out_neg)); 495s assert (class (mean (in_neg, "native")), "int64"); 495s ***** test <54567> 495s in = [(intmin('int64')+5), (intmax('int64'))-5]; 495s assert (mean (in, "native"), int64(-1)); 495s assert (class (mean (in, "native")), "int64"); 495s assert (mean (double(in)), double(0) ); 495s assert (mean (in), double(-0.5) ); 495s assert (mean (in, "default"), double(-0.5) ); 495s assert (mean (in, "double"), double(-0.5) ); 495s assert (mean (in, "all", "native"), int64(-1)); 495s assert (mean (in, 2, "native"), int64(-1)); 495s assert (mean (in, [1 2], "native"), int64(-1)); 495s assert (mean (in, [2 3], "native"), int64(-1)); 495s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 495s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 495s ***** test 495s x = [-10:10]; 495s y = [x;x+5;x-5]; 495s assert (mean (x), 0); 495s assert (mean (y, 2), [0, 5, -5]'); 495s assert (mean (y, "all"), 0); 495s y(2,4) = NaN; 495s assert (mean (y', "omitnan"), [0 5.35 -5]); 495s z = y + 20; 495s assert (mean (z, "all"), NaN); 495s assert (mean (z, "all", "includenan"), NaN); 495s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 495s m = [20 NaN 15]; 495s assert (mean (z'), m); 495s assert (mean (z', "includenan"), m); 495s m = [20 25.35 15]; 495s assert (mean (z', "omitnan"), m); 495s assert (mean (z, 2, "omitnan"), m'); 495s assert (mean (z, 2, "native", "omitnan"), m'); 495s assert (mean (z, 2, "omitnan", "native"), m'); 495s ***** test 495s assert (mean (true, "all"), 1); 495s assert (mean (false), 0); 495s assert (mean ([true false true]), 2/3, 4e-14); 495s assert (mean ([true false true], 1), [1 0 1]); 495s assert (mean ([true false NaN], 1), [1 0 NaN]); 495s assert (mean ([true false NaN], 2), NaN); 495s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 495s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 495s ***** assert (mean ("abc"), double (98)) 495s ***** assert (mean ("ab"), double (97.5), eps) 495s ***** assert (mean ("abc", "double"), double (98)) 495s ***** assert (mean ("abc", "default"), double (98)) 495s ***** test 495s x = magic (4); 495s x([2, 9:12]) = NaN; 495s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 495s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 495s assert (mean (x,2), NaN(4,1), eps); 495s assert (mean (x,3), x, eps); 495s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 495s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 495s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 495s assert (mean (x, 3, 'omitnan'), x, eps); 495s ***** assert (mean ([]), NaN(1,1)) 495s ***** assert (mean (single([])), NaN(1,1,"single")) 495s ***** assert (mean ([], 1), NaN(1,0)) 495s ***** assert (mean ([], 2), NaN(0,1)) 495s ***** assert (mean ([], 3), NaN(0,0)) 495s ***** assert (mean (ones(1,0)), NaN(1,1)) 495s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 495s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 495s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 495s ***** assert (mean (ones(0,1)), NaN(1,1)) 495s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 495s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 495s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 495s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 495s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 495s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 495s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 495s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 495s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 495s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 495s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 495s ***** test 495s x = repmat ([1:20;6:25], [5 2 6 3]); 495s assert (size (mean (x, [3 2])), [10 1 1 3]); 495s assert (size (mean (x, [1 2])), [1 1 6 3]); 495s assert (size (mean (x, [1 2 4])), [1 1 6]); 495s assert (size (mean (x, [1 4 3])), [1 40]); 495s assert (size (mean (x, [1 2 3 4])), [1 1]); 495s ***** assert (mean (ones (2,2), 3), ones (2,2)) 495s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 495s ***** assert (mean (magic (3), 3), magic (3)) 495s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 495s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 495s ***** test 495s x = repmat ([1:20;6:25], [5 2 6 3]); 495s m = repmat ([10.5;15.5], [5 1 1 3]); 495s assert (mean (x, [3 2]), m, 4e-14); 495s x(2,5,6,3) = NaN; 495s m(2,1,1,3) = NaN; 495s assert (mean (x, [3 2]), m, 4e-14); 495s m(2,1,1,3) = 15.52301255230125; 495s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 495s ***** assert (mean ([1 2 3], "aLL"), 2) 495s ***** assert (mean ([1 2 3], "OmitNan"), 2) 495s ***** assert (mean ([1 2 3], "DOUBle"), 2) 495s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 495s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 496s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 496s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 496s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 497s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 497s 35184372088833-1/(2^8), eps(35184372088833)) 497s !!!!! known bug: https://octave.org/testfailure/?63848 497s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 497s 497s Location | Observed | Expected | Reason 497s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 497s ***** error mean () 498s ***** error mean (1, 2, 3) 498s ***** error mean (1, 2, 3, 4) 498s ***** error mean (1, "all", 3) 498s ***** error mean (1, "b") 498s ***** error mean (1, 1, "foo") 498s ***** error mean ("abc", "native") 498s ***** error mean ({1:5}) 498s ***** error mean (1, ones (2,2)) 498s ***** error mean (1, 1.5) 498s ***** error mean (1, 0) 498s ***** error mean (1, []) 498s ***** error mean (1, -1) 498s ***** error mean (1, -1.5) 498s ***** error mean (1, NaN) 498s ***** error mean (1, Inf) 498s ***** error mean (repmat ([1:20;6:25], [5 2]), -1) 498s ***** error mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 498s ***** error mean (1, ones(1,0)) 498s ***** error mean (1, [2 2]) 498s 80 tests, 79 passed, 0 known failure, 1 skipped 498s [inst/shadow9/std.m] 498s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/shadow9/std.m 498s ***** assert (std (13), 0) 498s ***** assert (std (single (13)), single (0)) 498s ***** assert (std ([1,2,3]), 1) 498s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 498s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 498s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 498s ***** assert (std (5, 99), 0) 498s ***** assert (std (5, 99, 1), 0) 498s ***** assert (std (5, 99, 2), 0) 498s ***** assert (std ([5 3], [99 99], 2), 1) 498s ***** assert (std ([1:7], [1:7]), sqrt (3)) 498s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 498s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 498s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 498s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 498s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 498s ***** test 498s x = [-10:10]; 498s y = [x;x+5;x-5]; 498s assert (std (x), sqrt (38.5), 1e-14); 498s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 498s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 498s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 498s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 498s y(2,4) = NaN; 498s assert (std (y, "all"), NaN); 498s assert (std (y, "all", "includenan"), NaN); 498s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 498s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 498s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 498s assert (std (y, [], 2, "omitnan"), ... 498s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 498s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 498s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 498s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 498s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 498s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 498s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 498s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 498s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 498s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 498s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 498s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 498s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 498s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 498s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 498s sqrt(5)*ones(1,3,2), eps) 498s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 498s sqrt(5)*ones(3,1,2), eps) 498s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 498s sqrt(60)*ones(1,1,2),eps) 498s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 498s sqrt(6)*ones(1,3,2),eps) 498s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 498s sqrt(969),eps) 498s ***** test 498s x = reshape(1:18, [3 3 2]); 498s x([2, 14]) = NaN; 498s w = ones (3,3,2); 498s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 498s ***** test 498s x = reshape(1:18, [3 3 2]); 498s w = ones (3,3,2); 498s w([2, 14]) = NaN; 498s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 498s ***** assert (std ([1 2 3], "aLl"), 1); 498s ***** assert (std ([1 2 3], "OmitNan"), 1); 498s ***** assert (std ([1 2 3], "IncludeNan"), 1); 498s ***** test 498s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 498s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 498s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 498s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 498s assert (size (std (x, 0, [1 4 3])), [1, 40]); 498s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 498s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 498s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 498s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 498s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 498s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 498s sqrt([42 36 42]), eps) 498s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 498s sqrt([42 36 42]), eps) 498s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 498s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 498s sqrt([42 36 42]), eps) 498s ***** test 498s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 498s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 498s assert (std (x, 0, [3, 2]), v, 1e-14); 498s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 498s assert (std (x, 1, [3, 2]), v, 1e-14); 498s x(2,5,6,3) = NaN; 498s v(2,1,1,3) = NaN; 498s assert (std (x, 1, [3, 2]), v, 1e-14); 498s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 498s v(2,1,1,3) = NaN; 498s assert (std (x, [], [3, 2]), v, 1e-14); 498s v(2,1,1,3) = sqrt (33.40177912169048); 498s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 498s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 498s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 498s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 498s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 498s ***** assert (std (magic (3), [], 3), zeros (3,3)) 498s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 498s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 498s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 498s ***** assert (std ([]), NaN) 498s ***** assert (class (var (single ([]))), "single") 498s ***** assert (std ([],[],1), NaN(1,0)) 498s ***** assert (std ([],[],2), NaN(0,1)) 498s ***** assert (std ([],[],3), []) 498s ***** assert (class (var (single ([]), [], 1)), "single") 498s ***** assert (std (ones (1,0)), NaN) 498s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 498s ***** assert (std (ones (1,0), [], 2), NaN) 498s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 498s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 498s ***** assert (std (ones (0,1)), NaN) 498s ***** assert (std (ones (0,1), [], 1), NaN) 498s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 498s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 498s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 498s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 498s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 498s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 498s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 498s ***** test 498s [~, m] = std ([]); 498s assert (m, NaN); 498s ***** test <*62395> 498s [~, m] = std (13); 498s assert (m, 13); 498s [~, m] = std (single(13)); 498s assert (m, single(13)); 498s [~, m] = std ([1, 2, 3; 3 2 1], []); 498s assert (m, [2 2 2]); 498s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 498s assert (m, [2 2 2]); 498s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 498s assert (m, [2 2]'); 498s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 498s assert (m, [1 2 3; 3 2 1]); 498s ***** test <*62395> 498s [~, m] = std (5,99); 498s assert (m, 5); 498s [~, m] = std ([1:7], [1:7]); 498s assert (m, 5); 498s [~, m] = std ([eye(3)], [1:3]); 498s assert (m, [1/6, 1/3, 0.5], eps); 498s [~, m] = std (ones (2,2,2), [1:2], 3); 498s assert (m, ones (2,2)); 498s [~, m] = std ([1 2; 3 4], 0, 'all'); 498s assert (m, 2.5, eps); 498s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 498s assert (m, [3.5, 5.5], eps); 498s ***** test 498s [v, m] = std (4 * eye (2), [1, 3]); 498s assert (v, sqrt ([3, 3]), 1e-14); 498s assert (m, [1, 3]); 498s ***** test <*62395> 498s [~, m] = std ([]); 498s assert (m, NaN); 498s ***** test 498s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 498s [~, m] = std (x, 0, [3 2]); 498s assert (m, mean (x, [3 2])); 498s [~, m] = std (x, 0, [1 2]); 498s assert (m, mean (x, [1 2])); 498s [~, m] = std (x, 0, [1 3 4]); 498s assert (m, mean (x, [1 3 4])); 498s ***** test 498s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 498s x(2,5,6,3) = NaN; 498s [~, m] = std (x, 0, [3 2], "omitnan"); 498s assert (m, mean (x, [3 2], "omitnan")); 498s ***** test <*63203> 498s [v, m] = std (Inf); 498s assert (v, NaN); 498s assert (m, Inf); 498s ***** test <*63203> 498s [v, m] = std (NaN); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3]); 498s assert (v, NaN); 498s assert (m, Inf); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3]'); 498s assert (v, NaN); 498s assert (m, Inf); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3]); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3]'); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3], [], 1); 498s assert (v, [0, NaN, 0]); 498s assert (m, [1, Inf, 3]); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3], [], 2); 498s assert (v, NaN); 498s assert (m, Inf); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3], [], 3); 498s assert (v, [0, NaN, 0]); 498s assert (m, [1, Inf, 3]); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3], [], 1); 498s assert (v, [0, NaN, 0]); 498s assert (m, [1, NaN, 3]); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3], [], 2); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3], [], 3); 498s assert (v, [0, NaN, 0]); 498s assert (m, [1, NaN, 3]); 498s ***** test <*63203> 498s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 498s assert (v, sqrt ([2, NaN, 2])); 498s assert (m, [2, Inf, 4]); 498s ***** test <*63203> 498s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 498s assert (v, sqrt ([2, NaN, 2])); 498s assert (m, [2, Inf, 4]); 498s ***** test <*63203> 498s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 498s assert (v, sqrt ([2, NaN, 2])); 498s assert (m, [2, NaN, 4]); 498s ***** test <*63203> 498s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 498s assert (v, sqrt ([2, NaN, 2])); 498s assert (m, [2, NaN, 4]); 498s ***** test <*63203> 498s [v, m] = std ([Inf, 2, NaN]); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([Inf, 2, NaN]'); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([NaN, 2, Inf]); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([NaN, 2, Inf]'); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([Inf, 2, NaN], [], 1); 498s assert (v, [NaN, 0, NaN]); 498s assert (m, [Inf, 2, NaN]); 498s ***** test <*63203> 498s [v, m] = std ([Inf, 2, NaN], [], 2); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([NaN, 2, Inf], [], 1); 498s assert (v, [NaN, 0, NaN]); 498s assert (m, [NaN, 2, Inf]); 498s ***** test <*63203> 498s [v, m] = std ([NaN, 2, Inf], [], 2); 498s assert (v, NaN); 498s assert (m, NaN); 498s ***** test <*63203> 498s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 498s assert (v, sqrt ([2, 2, NaN])); 498s assert (m, [2, 4, NaN]); 498s ***** test <*63203> 498s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 498s assert (v, sqrt ([2, 2, NaN])); 498s assert (m, [2, 4, NaN]); 498s ***** test <*63291> 498s [v, m] = std (2 * eye (2)); 498s assert (v, sqrt ([2, 2])); 498s assert (m, [1, 1]); 498s ***** test <*63291> 498s [v, m] = std (4 * eye (2), [1, 3]); 498s assert (v, sqrt ([3, 3])); 498s assert (m, [1, 3]); 498s ***** test <*63291> 498s [v, m] = std (sparse (2 * eye (2))); 498s assert (full (v), sqrt ([2, 2])); 498s assert (full (m), [1, 1]); 498s ***** test <*63291> 498s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 498s assert (full (v), sqrt ([3, 3])); 498s assert (full (m), [1, 3]); 498s ***** test <*63291> 498s [v, m] = std (sparse (eye (2))); 498s assert (issparse (v)); 498s assert (issparse (m)); 498s ***** test <*63291> 498s [v, m] = std (sparse (eye (2)), [1, 3]); 498s assert (issparse (v)); 498s assert (issparse (m)); 498s ***** error std () 499s ***** error std (1, 2, "omitnan", 3) 499s ***** error std (1, 2, 3, 4) 499s ***** error std (1, 2, 3, 4, 5) 499s ***** error std (1, "foo") 499s ***** error std (1, [], "foo") 499s ***** error std ([1 2 3], 2) 499s ***** error std ([1 2], 2, "all") 499s ***** error std ([1 2],0.5, "all") 499s ***** error std (1, -1) 499s ***** error std (1, [1 -1]) 499s ***** error ... 499s std ([1 2 3], [1 -1 0]) 499s ***** error std ({1:5}) 499s ***** error std ("char") 499s ***** error std (['A'; 'B']) 499s ***** error std (1, [], ones (2,2)) 499s ***** error std (1, 0, 1.5) 499s ***** error std (1, [], 0) 499s ***** error std (1, [], 1.5) 499s ***** error std ([1 2 3], [], [-1 1]) 499s ***** error ... 499s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 499s ***** error ... 499s std ([1 2], eye (2)) 499s ***** error ... 499s std ([1 2 3 4], [1 2; 3 4]) 499s ***** error ... 499s std ([1 2 3 4], [1 2; 3 4], 1) 499s ***** error ... 499s std ([1 2 3 4], [1 2; 3 4], [2 3]) 499s ***** error ... 499s std (ones (2, 2), [1 2], [1 2]) 499s ***** error ... 499s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 499s ***** error ... 499s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 499s ***** error std ([1 2 3; 2 3 4], [1 3 4]) 499s ***** error std ([1 2], [1 2 3]) 499s ***** error std (1, [1 2]) 499s ***** error std ([1 2 3; 2 3 4], [1 3 4], 1) 499s ***** error std ([1 2 3; 2 3 4], [1 3], 2) 499s ***** error std ([1 2], [1 2], 1) 499s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 499s std (1, [], 1, "all") 499s ***** error ... 499s std ([1 2 3; 2 3 4], [1 3], "all") 499s ***** error ... 499s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 499s 162 tests, 162 passed, 0 known failure, 0 skipped 499s [inst/cdfcalc.m] 499s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cdfcalc.m 499s ***** test 499s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 499s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 499s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 499s assert (xCDF, [2, 3, 4, 5, 6]'); 499s assert (n, 10); 499s ***** shared x 499s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 499s ***** error yCDF = cdfcalc (x); 499s ***** error [yCDF, xCDF] = cdfcalc (); 499s ***** error [yCDF, xCDF] = cdfcalc (x, x); 499s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 499s 5 tests, 5 passed, 0 known failure, 0 skipped 499s [inst/bar3.m] 499s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/bar3.m 499s ***** demo 499s ## Ploting 5 bars in the same series. 499s 499s z = [50; 40; 30; 20; 10]; 499s bar3 (z); 499s ***** demo 499s ## Ploting 5 bars in different groups. 499s 499s z = [50, 40, 30, 20, 10]; 499s bar3 (z); 499s ***** demo 499s ## A 3D bar graph with each series corresponding to a column in z. 499s 499s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 499s bar3 (z); 499s ***** demo 499s ## Specify y-axis locations as tick names. y must be a column vector! 499s 499s y = [1950, 1960, 1970, 1980, 1990]'; 499s z = [16, 8, 4, 2, 1]'; 499s bar3 (y, z); 499s ***** demo 499s ## Plot 3 series as a grouped plot without any space between the grouped bars 499s 499s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 499s bar3 (z, 1, 'grouped'); 499s ***** demo 499s ## Plot a stacked style 3D bar graph 499s 499s z = [19, 30, 21, 30; 40, 16, 32, 12]; 499s b = bar3 (z, 0.5, 'stacked'); 499s ***** error bar3 ("A") 499s ***** error bar3 ({2,3,4,5}) 499s ***** error ... 499s bar3 ([1,2,3]', ones (2)) 499s ***** error ... 499s bar3 ([1:5], 1.2) 499s ***** error ... 499s bar3 ([1:5]', ones (5), 1.2) 499s ***** error ... 499s bar3 ([1:5]', ones (5), [0.8, 0.7]) 499s ***** error ... 499s bar3 (ones (5), 'width') 499s ***** error ... 499s bar3 (ones (5), 'width', 1.2) 499s ***** error ... 499s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 499s ***** error ... 499s bar3 (ones (5), 'color') 499s ***** error ... 499s bar3 (ones (5), 'color', [0.8, 0.8]) 499s ***** error ... 499s bar3 (ones (5), 'color', "brown") 499s ***** error ... 499s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 499s ***** error ... 499s bar3 (ones (5), 'xlabel') 499s ***** error ... 499s bar3 (ones (5), 'xlabel', 4) 499s ***** error ... 499s bar3 (ones (5), 'ylabel') 499s ***** error ... 499s bar3 (ones (5), 'ylabel', 4) 499s ***** error bar3 (ones (5), 'this', 4) 499s ***** error ... 499s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 499s ***** error ... 499s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 499s 20 tests, 20 passed, 0 known failure, 0 skipped 499s [inst/rangesearch.m] 499s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/rangesearch.m 499s ***** demo 499s ## Generate 1000 random 2D points from each of five distinct multivariate 499s ## normal distributions that form five separate classes 499s N = 1000; 499s d = 10; 499s randn ("seed", 5); 499s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 499s randn ("seed", 6); 499s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 499s randn ("seed", 7); 499s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 499s randn ("seed", 8); 499s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 499s randn ("seed", 8); 499s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 499s X = [X1; X2; X3; X4; X5]; 499s 499s ## For each point in X, find the points in X that are within a radius d 499s ## away from the points in X. 499s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 499s 499s ## Select the first point in X (corresponding to the first class) and find 499s ## its nearest neighbors within the radius d. Display these points in 499s ## one color and the remaining points in a different color. 499s x = X(1,:); 499s nearestPoints = X (Idx{1},:); 499s nonNearestIdx = true (size (X, 1), 1); 499s nonNearestIdx(Idx{1}) = false; 499s 499s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 499s hold on 499s scatter (nearestPoints(:,1),nearestPoints(:,2)) 499s scatter (x(1), x(2), "black", "filled") 499s hold off 499s 499s ## Select the last point in X (corresponding to the fifth class) and find 499s ## its nearest neighbors within the radius d. Display these points in 499s ## one color and the remaining points in a different color. 499s x = X(end,:); 499s nearestPoints = X (Idx{1},:); 499s nonNearestIdx = true (size (X, 1), 1); 499s nonNearestIdx(Idx{1}) = false; 499s 499s figure 499s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 499s hold on 499s scatter (nearestPoints(:,1),nearestPoints(:,2)) 499s scatter (x(1), x(2), "black", "filled") 499s hold off 499s ***** shared x, y, X, Y 499s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 499s y = [2, 3, 4; 1, 4, 3]; 499s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 499s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 499s ***** test 499s [idx, D] = rangesearch (x, y, 4); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 499s assert (idx, {[1, 2, 4]; [1, 4]}); 499s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 499s "SortIndices", false); 499s assert (idx, {[1, 2, 4]; [1, 4]}); 499s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 499s ***** test 499s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 499s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 499s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 499s "NSMethod", "exhaustive"); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 499s "NSMethod", "exhaustive"); 499s assert (idx, {[1, 4, 2]; [1, 4]}); 499s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 499s "NSMethod", "exhaustive", "SortIndices", false); 499s assert (idx, {[1, 2, 4]; [1, 4]}); 499s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (X, Y, 4); 499s assert (idx, {[1, 2]; [1, 2, 3]}); 499s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (X, Y, 2); 499s assert (idx, {[1]; [1, 2]}); 499s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 499s ***** test 499s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 499s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 499s assert (idx, {[1, 2]; [1, 2, 3]}); 499s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 499s assert (idx, {[1, 2]; [1, 2, 3]}); 499s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 499s ***** test 499s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 499s "NSMethod", "exhaustive"); 499s assert (idx, {[1, 2]; [1, 2, 3]}); 499s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 499s ***** error rangesearch (1) 499s ***** error ... 499s rangesearch (ones (4, 5), ones (4)) 499s ***** error ... 499s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 499s ***** error ... 499s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 499s 31 tests, 31 passed, 0 known failure, 0 skipped 499s [inst/anova1.m] 499s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/anova1.m 499s ***** demo 499s x = meshgrid (1:6); 499s randn ("seed", 15); # for reproducibility 499s x = x + normrnd (0, 1, 6, 6); 499s anova1 (x, [], 'off'); 499s ***** demo 499s x = meshgrid (1:6); 499s randn ("seed", 15); # for reproducibility 499s x = x + normrnd (0, 1, 6, 6); 499s [p, atab] = anova1(x); 499s ***** demo 499s x = ones (50, 4) .* [-2, 0, 1, 5]; 499s randn ("seed", 13); # for reproducibility 499s x = x + normrnd (0, 2, 50, 4); 499s groups = {"A", "B", "C", "D"}; 499s anova1 (x, groups); 499s ***** demo 499s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 499s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 499s anova1 (y(:), g(:), "on", "unequal"); 499s ***** test 499s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 499s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 499s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 499s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 499s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 499s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 499s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 499s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 499s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 499s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 499s group = [1:10] .* ones (10,10); 499s group = group(:); 499s [p, tbl] = anova1 (data, group, "off"); 499s assert (p, 0.022661, 1e-6); 499s assert (tbl{2,5}, 2.2969, 1e-4); 499s assert (tbl{2,3}, 9, 0); 499s assert (tbl{4,2}, 0.003903, 1e-6); 499s data = reshape (data, 10, 10); 499s [p, tbl, stats] = anova1 (data, [], "off"); 499s assert (p, 0.022661, 1e-6); 499s assert (tbl{2,5}, 2.2969, 1e-4); 499s assert (tbl{2,3}, 9, 0); 499s assert (tbl{4,2}, 0.003903, 1e-6); 499s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 499s N = 10 * ones (1, 10); 499s assert (stats.means, means, 1e-6); 499s assert (length (stats.gnames), 10, 0); 499s assert (stats.n, N, 0); 499s ***** test 499s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 499s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 499s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 499s assert (p, 0.00004163, 1e-6); 499s assert (tbl{2,5}, 22.573418, 1e-6); 499s assert (tbl{2,3}, 2, 0); 499s assert (tbl{3,3}, 14, 0); 499s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 499s assert (p, 0.00208877, 1e-8); 499s assert (tbl{2,5}, 15.523192, 1e-6); 499s assert (tbl{2,3}, 2, 0); 499s assert (tbl{2,4}, 7.5786897, 1e-6); 499s 2 tests, 2 passed, 0 known failure, 0 skipped 499s [inst/chi2gof.m] 499s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/chi2gof.m 499s ***** demo 499s x = normrnd (50, 5, 100, 1); 499s [h, p, stats] = chi2gof (x) 499s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 499s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 499s ***** demo 499s x = rand (100,1 ); 499s n = length (x); 499s binedges = linspace (0, 1, 11); 499s expectedCounts = n * diff (binedges); 499s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 499s ***** demo 499s bins = 0:5; 499s obsCounts = [6 16 10 12 4 2]; 499s n = sum(obsCounts); 499s lambdaHat = sum(bins.*obsCounts) / n; 499s expCounts = n * poisspdf(bins,lambdaHat); 499s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 499s "expected", expCounts, "nparams",1) 499s ***** error chi2gof () 499s ***** error chi2gof ([2,3;3,4]) 499s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 499s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 499s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 499s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 499s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 499s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 499s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 499s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 500s ***** test 500s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 500s [h, p, stats] = chi2gof (x); 500s assert (h, 0); 500s assert (p, NaN); 500s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 500s assert (stats.df, 0); 500s assert (stats.edges, [1, 2.5, 4], 1e-14); 500s assert (stats.O, [7, 5], 1e-14); 500s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 500s 11 tests, 11 passed, 0 known failure, 0 skipped 500s [inst/ppplot.m] 500s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ppplot.m 500s ***** test 500s hf = figure ("visible", "off"); 500s unwind_protect 500s 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]); 500s unwind_protect_cleanup 500s close (hf); 500s end_unwind_protect 500s ***** error ppplot () 500s ***** error ppplot (ones (2,2)) 500s ***** error ppplot (1, 2) 500s ***** error ppplot ([1 2 3 4], 2) 500s 5 tests, 5 passed, 0 known failure, 0 skipped 500s [inst/datasample.m] 500s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/datasample.m 500s ***** error datasample(); 500s ***** error datasample(1); 500s ***** error datasample({1, 2, 3}, 1); 500s ***** error datasample([1 2], -1); 500s ***** error datasample([1 2], 1.5); 500s ***** error datasample([1 2], [1 1]); 500s ***** error datasample([1 2], 'g', [1 1]); 500s ***** error datasample([1 2], 1, -1); 500s ***** error datasample([1 2], 1, 1.5); 500s ***** error datasample([1 2], 1, [1 1]); 500s ***** error datasample([1 2], 1, 1, "Replace", -2); 500s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 500s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 500s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 500s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 500s ***** test 500s dat = randn (10, 4); 500s assert (size (datasample (dat, 3, 1)), [3 4]); 500s ***** test 500s dat = randn (10, 4); 500s assert (size (datasample (dat, 3, 2)), [10 3]); 500s 17 tests, 17 passed, 0 known failure, 0 skipped 500s [inst/pdist.m] 500s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/pdist.m 500s ***** shared xy, t, eucl, x 500s xy = [0 1; 0 2; 7 6; 5 6]; 500s t = 1e-3; 500s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 500s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 500s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 500s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 500s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 500s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 500s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 500s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 500s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 500s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 500s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 500s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 500s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 500s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 500s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 500s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 500s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 500s ***** assert (pdist (x, "euclidean"), ... 500s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 500s ***** assert (pdist (x, eucl), ... 500s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 500s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 500s ***** assert (pdist (x, "seuclidean"), ... 500s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 500s ***** warning ... 500s pdist (x, "mahalanobis"); 500s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 500s ***** assert (pdist (x, "minkowski"), ... 500s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 500s ***** assert (pdist (x, "minkowski", 3), ... 500s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 500s ***** assert (pdist (x, "cosine"), ... 500s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 500s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 500s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 500s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 500s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 500s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 500s 29 tests, 29 passed, 0 known failure, 0 skipped 500s [inst/anovan.m] 500s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/anovan.m 500s ***** demo 500s 500s # Two-sample unpaired test on independent samples (equivalent to Student's 500s # t-test). Note that the absolute value of t-statistic can be obtained by 500s # taking the square root of the reported F statistic. In this example, 500s # t = sqrt (1.44) = 1.20. 500s 500s score = [54 23 45 54 45 43 34 65 77 46 65]'; 500s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 500s "female" "female" "female"}'; 500s 500s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 500s ***** demo 500s 500s # Two-sample paired test on dependent or matched samples equivalent to a 500s # paired t-test. As for the first example, the t-statistic can be obtained by 500s # taking the square root of the reported F statistic. Note that the interaction 500s # between treatment x subject was dropped from the full model by assigning 500s # subject as a random factor ('). 500s 500s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 500s treatment = {"before" "after"; "before" "after"; "before" "after"; 500s "before" "after"; "before" "after"}'; 500s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 500s 500s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 500s "model", "full", "random", 2, "sstype", 2, ... 500s "varnames", {"treatment", "subject"}, ... 500s "display", "on"); 500s ***** demo 500s 500s # One-way ANOVA on the data from a study on the strength of structural beams, 500s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 500s 500s strength = [82 86 79 83 84 85 86 87 74 82 ... 500s 78 75 76 77 79 79 77 78 82 79]'; 500s alloy = {"st","st","st","st","st","st","st","st", ... 500s "al1","al1","al1","al1","al1","al1", ... 500s "al2","al2","al2","al2","al2","al2"}'; 500s 500s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 500s "varnames", "alloy"); 500s ***** demo 500s 500s # One-way repeated measures ANOVA on the data from a study on the number of 500s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 500s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 500s # between seconds x subject was dropped from the full model by assigning 500s # subject as a random factor ('). 500s 500s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 500s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 500s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 500s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 500s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 500s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 500s 500s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 500s "model", "full", "random", 2, "sstype", 2, ... 500s "display", "on", "varnames", {"seconds", "subject"}); 500s ***** demo 500s 500s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 500s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 500s # New York: MacMillan 500s 500s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 500s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 500s brands = {"Gourmet", "National", "Generic"; ... 500s "Gourmet", "National", "Generic"; ... 500s "Gourmet", "National", "Generic"; ... 500s "Gourmet", "National", "Generic"; ... 500s "Gourmet", "National", "Generic"; ... 500s "Gourmet", "National", "Generic"}; 500s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 500s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 500s 500s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 500s "display", "on", "model", "full", ... 500s "varnames", {"brands", "popper"}); 500s ***** demo 500s 500s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 500s # gender and having a college degree on salaries of company employees, 500s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 500s 500s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 500s 25 29 27 19 18 21 20 21 22 19]'; 500s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 500s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 500s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 500s 500s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 500s "sstype", 3, "display", "on", "varnames", ... 500s {"gender", "degree"}); 500s ***** demo 500s 500s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 500s # adding sugar and/or milk on the tendency of coffee to make people babble, 500s # in from Navarro (2019): 16.10 500s 500s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 500s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 500s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 500s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 500s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 500s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 500s 500s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 500s "sstype", 3, "display", "on", ... 500s "varnames", {"sugar", "milk"}); 500s ***** demo 500s 500s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 500s # of three different drugs, biofeedback and diet on patient blood pressure, 500s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 500s # * Missing values introduced to make the sample sizes unequal to test the 500s # calculation of different types of sums-of-squares 500s 500s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 500s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 500s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 500s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 500s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 500s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 500s 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; 500s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 500s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 500s 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; 500s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 500s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 500s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 500s 173 194 197 190 176 198 164 190 169 164 176 175; 500s 186 194 201 215 219 209 164 166 159 182 187 174 ... 500s 189 194 217 206 199 195 171 173 196 199 180 NaN; 500s 180 187 199 170 204 194 162 184 183 156 180 173 ... 500s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 500s 500s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 500s "model", "full", "sstype", 3, ... 500s "display", "on", ... 500s "varnames", {"drug", "feedback", "diet"}); 500s ***** demo 500s 500s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 500s # factor. The data is from a randomized block design study on the effects 500s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 500s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 500s # Note that all interactions involving block were dropped from the full model 500s # by assigning block as a random factor ('). 500s 500s measurement = [444 614 423 625 408 856 447 719 ... 500s 764 831 586 782 609 1002 606 766]'; 500s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 500s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 500s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 500s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 500s 500s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 500s "sstype", 2, "model", "full", "random", 3, ... 500s "display", "on", ... 500s "varnames", {"strain", "treatment", "block"}); 500s ***** demo 500s 500s # One-way ANCOVA on data from a study of the additive effects of species 500s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 500s # Text eveR 500s 500s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 500s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 500s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 500s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 500s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 500s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 500s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 500s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 500s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 500s 500s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 500s "continuous", 2, "sstype", "h", "display", "on", ... 500s "varnames", {"species", "temp"}); 500s ***** demo 500s 500s # Factorial ANCOVA on data from a study of the effects of treatment and 500s # exercise on stress reduction score after adjusting for age. Data from R 500s # datarium package). 500s 500s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 500s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 500s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 500s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 500s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 500s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 500s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 500s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 500s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 500s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 500s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 500s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 500s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 500s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 500s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 500s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 500s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 500s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 500s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 500s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 500s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 500s 500s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 500s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 500s "continuous", 3, "sstype", "h", "display", "on", ... 500s "varnames", {"treatment", "exercise", "age"}); 500s ***** demo 500s 500s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 500s # relating to the contrasts are shown in the table of model parameters, and 500s # can be retrieved from the STATS.coeffs output. 500s 500s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 500s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 500s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 500s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 500s 25.694 ]'; 500s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 500s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 500s C = [ 0.4001601 0.3333333 0.5 0.0 500s 0.4001601 0.3333333 -0.5 0.0 500s 0.4001601 -0.6666667 0.0 0.0 500s -0.6002401 0.0000000 0.0 0.5 500s -0.6002401 0.0000000 0.0 -0.5]; 500s 500s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 500s "alpha", 0.05, "display", "on"); 500s ***** demo 500s 500s # One-way ANOVA with the linear model fit by weighted least squares to 500s # account for heteroskedasticity. In this example, the variance appears 500s # proportional to the outcome, so weights have been estimated by initially 500s # fitting the model without weights and regressing the absolute residuals on 500s # the fitted values. Although this data could have been analysed by Welch's 500s # ANOVA test, the approach here can generalize to ANOVA models with more than 500s # one factor. 500s 500s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 500s 2, 2, 2, 2, 2, 2, 2, 2, ... 500s 3, 3, 3, 3, 3, 3, 3, 3]'; 500s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 500s 10, 25, 66, 43, 47, 56, 6, 39, ... 500s 11, 39, 26, 35, 25, 14, 24, 17]'; 500s 500s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 500s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 500s b = polyfit (fitted, abs (STATS.resid), 1); 500s v = polyval (b, fitted); # Variance as a function of the fitted values 500s figure("Name", "Regression of the absolute residuals on the fitted values"); 500s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 500s xlabel("Fitted values"); ylabel("Absolute residuals"); 500s 500s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 500s ***** test 500s score = [54 23 45 54 45 43 34 65 77 46 65]'; 500s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 500s 'female' 'female' 'female'}'; 500s 500s [P, T, STATS] = anovan (score,gender,'display','off'); 500s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 500s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 500s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 500s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 500s ***** test 500s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 500s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 500s 'before' 'after'; 'before' 'after'}'; 500s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 500s 500s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 500s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 500s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 500s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 500s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 500s ***** test 500s strength = [82 86 79 83 84 85 86 87 74 82 ... 500s 78 75 76 77 79 79 77 78 82 79]'; 500s alloy = {'st','st','st','st','st','st','st','st', ... 500s 'al1','al1','al1','al1','al1','al1', ... 500s 'al2','al2','al2','al2','al2','al2'}'; 500s 500s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 500s assert (P(1), 0.000152643638830491, 1e-09); 500s assert (ATAB{2,6}, 15.4, 1e-09); 500s ***** test 500s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 500s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 500s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 500s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 500s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 500s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 500s 500s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 500s assert (P(1), 1.51865926758752e-07, 1e-09); 500s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 500s assert (ATAB{3,2}, 942.533333333333, 1e-09); 500s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 500s ***** test 500s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 500s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 500s brands = {'Gourmet', 'National', 'Generic'; ... 500s 'Gourmet', 'National', 'Generic'; ... 500s 'Gourmet', 'National', 'Generic'; ... 500s 'Gourmet', 'National', 'Generic'; ... 500s 'Gourmet', 'National', 'Generic'; ... 500s 'Gourmet', 'National', 'Generic'}; 500s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 500s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 500s 500s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 500s assert (P(1), 7.67895738278171e-07, 1e-09); 500s assert (P(2), 0.000100373896304998, 1e-09); 500s assert (P(3), 0.746215396636649, 1e-09); 500s assert (ATAB{2,6}, 56.7, 1e-09); 500s assert (ATAB{3,6}, 32.4, 1e-09); 500s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 500s ***** test 500s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 500s 25 29 27 19 18 21 20 21 22 19]'; 500s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 500s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 500s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 500s 500s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 500s assert (P(1), 0.747462549227232, 1e-09); 500s assert (P(2), 1.03809316857694e-08, 1e-09); 500s assert (P(3), 0.523689833702691, 1e-09); 500s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 500s assert (ATAB{3,2}, 272.391841491841, 1e-09); 500s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 500s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 500s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 500s assert (P(1), 2.53445097305047e-08, 1e-09); 500s assert (P(2), 0.00388133678528749, 1e-09); 500s assert (P(3), 0.523689833702671, 1e-09); 500s assert (ATAB{2,2}, 242.227272727273, 1e-09); 500s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 500s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 500s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 500s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 500s assert (P(1), 0.00388133678528743, 1e-09); 500s assert (P(2), 1.03809316857694e-08, 1e-09); 500s assert (P(3), 0.523689833702691, 1e-09); 500s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 500s assert (ATAB{3,2}, 272.391841491841, 1e-09); 500s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 500s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 500s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 500s assert (P(1), 0.00442898146583742, 1e-09); 500s assert (P(2), 1.30634252053587e-08, 1e-09); 500s assert (P(3), 0.523689833702691, 1e-09); 500s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 500s assert (ATAB{3,2}, 264.335664335664, 1e-09); 500s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 500s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 500s ***** test 500s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 500s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 500s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 500s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 500s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 500s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 500s 500s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 500s assert (P(1), 0.0108632139833963, 1e-09); 500s assert (P(2), 0.0810606976703546, 1e-09); 500s assert (P(3), 0.00175433329935627, 1e-09); 500s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 500s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 500s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 500s assert (ATAB{5,2}, 3.1625, 1e-09); 500s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 500s assert (P(1), 0.0373333189297505, 1e-09); 500s assert (P(2), 0.017075098787169, 1e-09); 500s assert (P(3), 0.00175433329935627, 1e-09); 500s assert (ATAB{2,2}, 1.444, 1e-09); 500s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 500s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 500s assert (ATAB{5,2}, 3.1625, 1e-09); 500s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 500s assert (P(1), 0.017075098787169, 1e-09); 500s assert (P(2), 0.0810606976703546, 1e-09); 500s assert (P(3), 0.00175433329935627, 1e-09); 500s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 500s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 500s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 500s assert (ATAB{5,2}, 3.1625, 1e-09); 500s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 500s assert (P(1), 0.0454263063473954, 1e-09); 500s assert (P(2), 0.0746719907091438, 1e-09); 500s assert (P(3), 0.00175433329935627, 1e-09); 500s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 500s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 500s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 500s assert (ATAB{5,2}, 3.1625, 1e-09); 500s ***** test 500s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 500s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 500s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 500s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 500s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 500s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 500s 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; 500s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 500s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 500s 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; 500s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 500s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 500s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 500s 173 194 197 190 176 198 164 190 169 164 176 175; 500s 186 194 201 215 219 209 164 166 159 182 187 174 ... 500s 189 194 217 206 199 195 171 173 196 199 180 NaN; 500s 180 187 199 170 204 194 162 184 183 156 180 173 ... 500s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 500s 500s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 500s assert (P(1), 7.02561843825325e-05, 1e-09); 500s assert (P(2), 0.000425806013389362, 1e-09); 500s assert (P(3), 6.16780773446401e-07, 1e-09); 500s assert (P(4), 0.261347622678438, 1e-09); 500s assert (P(5), 0.0542278432357043, 1e-09); 500s assert (P(6), 0.590353225626655, 1e-09); 500s assert (P(7), 0.0861628249564267, 1e-09); 500s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 500s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 500s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 500s assert (ATAB{5,2}, 437.066007908781, 1e-09); 500s assert (ATAB{6,2}, 976.180770397332, 1e-09); 500s assert (ATAB{7,2}, 46.616653365254, 1e-09); 500s assert (ATAB{8,2}, 814.345251396648, 1e-09); 500s assert (ATAB{9,2}, 9065.8, 1e-09); 500s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 500s assert (P(1), 9.4879638470754e-05, 1e-09); 500s assert (P(2), 0.00124177666315809, 1e-09); 500s assert (P(3), 6.86162012732911e-07, 1e-09); 500s assert (P(4), 0.260856132341256, 1e-09); 500s assert (P(5), 0.0523758623892078, 1e-09); 500s assert (P(6), 0.590353225626655, 1e-09); 500s assert (P(7), 0.0861628249564267, 1e-09); 500s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 500s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 500s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 500s assert (ATAB{5,2}, 437.693674777847, 1e-09); 500s assert (ATAB{6,2}, 988.431929811402, 1e-09); 500s assert (ATAB{7,2}, 46.616653365254, 1e-09); 500s assert (ATAB{8,2}, 814.345251396648, 1e-09); 500s assert (ATAB{9,2}, 9065.8, 1e-09); 500s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 500s assert (P(1), 0.000106518678028207, 1e-09); 500s assert (P(2), 0.00125371366571508, 1e-09); 500s assert (P(3), 5.30813260778464e-07, 1e-09); 500s assert (P(4), 0.308353667232981, 1e-09); 500s assert (P(5), 0.0562901327343161, 1e-09); 500s assert (P(6), 0.599091042141092, 1e-09); 500s assert (P(7), 0.0861628249564267, 1e-09); 500s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 500s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 500s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 500s assert (ATAB{5,2}, 382.07709497207, 1e-09); 500s assert (ATAB{6,2}, 963.037988826813, 1e-09); 500s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 500s assert (ATAB{8,2}, 814.345251396648, 1e-09); 500s assert (ATAB{9,2}, 9065.8, 1e-09); 500s ***** test 500s measurement = [444 614 423 625 408 856 447 719 ... 500s 764 831 586 782 609 1002 606 766]'; 500s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 500s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 500s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 500s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 500s 500s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 500s assert (P(1), 0.0914352969909372, 1e-09); 500s assert (P(2), 5.04077373924908e-05, 1e-09); 500s assert (P(4), 0.0283196918836667, 1e-09); 500s assert (ATAB{2,2}, 286.132500000002, 1e-09); 500s assert (ATAB{3,2}, 2275.29, 1e-09); 500s assert (ATAB{4,2}, 1242.5625, 1e-09); 500s assert (ATAB{5,2}, 495.905000000001, 1e-09); 500s assert (ATAB{6,2}, 207.007499999999, 1e-09); 500s ***** test 500s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 500s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 500s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 500s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 500s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 500s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 500s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 500s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 500s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 500s 500s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 500s assert (P(1), 6.27153318786007e-14, 1e-09); 500s assert (P(2), 2.48773241196644e-25, 1e-09); 500s assert (ATAB{2,2}, 598.003953318404, 1e-09); 500s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 500s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 500s assert (ATAB{2,6}, 187.399388123951, 1e-09); 500s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 500s ***** test 500s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 500s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 500s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 500s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 500s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 500s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 500s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 500s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 500s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 500s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 500s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 500s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 500s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 500s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 500s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 500s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 500s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 500s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 500s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 500s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 500s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 500s 500s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 500s assert (P(5), 0.9245630968248468, 1e-09); 500s assert (P(6), 0.791115159521822, 1e-09); 500s assert (P(7), 0.9296668751457956, 1e-09); 500s [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'); 500s assert (P(1), 0.00158132928938933, 1e-09); 500s assert (P(2), 2.12537505039986e-07, 1e-09); 500s assert (P(3), 0.00390292555160047, 1e-09); 500s assert (P(4), 0.0164086580775543, 1e-09); 500s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 500s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 500s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 500s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 500s ***** test 500s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 500s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 500s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 500s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 500s 25.694 ]'; 500s 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]'; 500s C = [ 0.4001601 0.3333333 0.5 0.0 500s 0.4001601 0.3333333 -0.5 0.0 500s 0.4001601 -0.6666667 0.0 0.0 500s -0.6002401 0.0000000 0.0 0.5 500s -0.6002401 0.0000000 0.0 -0.5]; 500s 500s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 500s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 500s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 500s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 500s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 500s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 500s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 500s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 500s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 500s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 500s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 500s assert (STATS.coeffs(1,5), 40.161, 1e-03); 500s assert (STATS.coeffs(2,5), -9.624, 1e-03); 500s assert (STATS.coeffs(3,5), -3.825, 1e-03); 500s assert (STATS.coeffs(4,5), -4.875, 1e-03); 500s assert (STATS.coeffs(5,5), -5.515, 1e-03); 500s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 500s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 500s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 500s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 500s 12 tests, 12 passed, 0 known failure, 0 skipped 500s [inst/violin.m] 500s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/violin.m 500s ***** demo 500s clf 500s x = zeros (9e2, 10); 500s for i=1:10 500s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 500s endfor 500s h = violin (x, "color", "c"); 500s axis tight 500s set (h.violin, "linewidth", 2); 500s set (gca, "xgrid", "on"); 500s xlabel ("Variables") 500s ylabel ("Values") 500s ***** demo 500s clf 500s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 500s subplot (1,2,1) 500s title ("Grade 3 heights - vertical"); 500s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 500s violin (data, "Nbins", 10); 500s axis tight 500s 500s subplot(1,2,2) 500s title ("Grade 3 heights - horizontal"); 500s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 500s violin (data, "horizontal", "Nbins", 10); 500s axis tight 500s ***** demo 500s clf 500s data = exprnd (0.1, 500,4); 500s violin (data, "nbins", {5,10,50,100}); 500s axis ([0 5 0 max(data(:))]) 500s ***** demo 500s clf 500s data = exprnd (0.1, 500,4); 500s violin (data, "color", jet(4)); 500s axis ([0 5 0 max(data(:))]) 500s ***** demo 500s clf 500s data = repmat(exprnd (0.1, 500,1), 1, 4); 500s violin (data, "width", linspace (0.1,0.5,4)); 500s axis ([0 5 0 max(data(:))]) 500s ***** demo 500s clf 500s data = repmat(exprnd (0.1, 500,1), 1, 4); 500s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 500s axis ([0 5 0 max(data(:))]) 500s ***** test 500s hf = figure ("visible", "off"); 500s unwind_protect 500s data = exprnd (0.1, 500,4); 500s violin (data, "color", jet(4)); 500s axis ([0 5 0 max(data(:))]) 500s unwind_protect_cleanup 500s close (hf); 500s end_unwind_protect 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 501s subplot (1,2,1) 501s title ("Grade 3 heights - vertical"); 501s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 501s violin (data, "Nbins", 10); 501s axis tight 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 501s subplot (1,2,1) 501s title ("Grade 3 heights - vertical"); 501s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 501s violin (data, "Nbins", 10); 501s axis tight 501s subplot(1,2,2) 501s title ("Grade 3 heights - horizontal"); 501s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 501s violin (data, "horizontal", "Nbins", 10); 501s axis tight 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s data = repmat(exprnd (0.1, 500,1), 1, 4); 501s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 501s axis ([0 5 0 max(data(:))]) 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 502s ***** test 502s hf = figure ("visible", "off"); 502s unwind_protect 502s data = repmat(exprnd (0.1, 500,1), 1, 4); 502s violin (data, "width", linspace (0.1,0.5,4)); 502s axis ([0 5 0 max(data(:))]) 502s unwind_protect_cleanup 502s close (hf); 502s end_unwind_protect 502s 5 tests, 5 passed, 0 known failure, 0 skipped 502s [inst/manova1.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/manova1.m 502s ***** demo 502s load carbig 502s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 502s ***** test 502s load carbig 502s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 502s assert (d, 3); 502s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 502s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 502s ***** test 502s load carbig 502s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 502s assert (d, 2); 502s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 502s [1e-12, 1e-12, 1e-12]'); 502s 2 tests, 2 passed, 0 known failure, 0 skipped 502s [inst/fitrgam.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitrgam.m 502s ***** demo 502s # Train a RegressionGAM Model for synthetic values 502s 502s f1 = @(x) cos (3 *x); 502s f2 = @(x) x .^ 3; 502s 502s # generate x1 and x2 for f1 and f2 502s x1 = 2 * rand (50, 1) - 1; 502s x2 = 2 * rand (50, 1) - 1; 502s 502s # calculate y 502s y = f1(x1) + f2(x2); 502s 502s # add noise 502s y = y + y .* 0.2 .* rand (50,1); 502s X = [x1, x2]; 502s 502s # create an object 502s a = fitrgam (X, y, "tol", 1e-3) 502s ***** test 502s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 502s y = [1; 2; 3; 4]; 502s a = fitrgam (x, y); 502s assert ({a.X, a.Y}, {x, y}) 502s assert ({a.BaseModel.Intercept}, {2.5000}) 502s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 502s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 502s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 502s assert ({a.Formula}, {[]}) 502s ***** test 502s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 502s y = [1; 2; 3; 4]; 502s pnames = {"A", "B", "C", "D"}; 502s formula = "Y ~ A + B + C + D + A:C"; 502s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 502s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 502s assert ({a.IntMatrix}, {intMat}) 502s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 502s assert ({a.Formula}, {formula}) 502s ***** error fitrgam () 502s ***** error fitrgam (ones(10,2)) 502s ***** error 502s fitrgam (ones (4,2), ones (4, 1), "K") 502s ***** error 502s fitrgam (ones (4,2), ones (3, 1)) 502s ***** error 502s fitrgam (ones (4,2), ones (3, 1), "K", 2) 502s 7 tests, 7 passed, 0 known failure, 0 skipped 502s [inst/cophenet.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cophenet.m 502s ***** demo 502s randn ("seed", 5) # for reproducibility 502s X = randn (10,2); 502s y = pdist (X); 502s Z = linkage (y, "average"); 502s cophenet (Z, y) 502s ***** error cophenet () 502s ***** error cophenet (1) 502s ***** error ... 502s cophenet (ones (2,2), 1) 502s ***** error ... 502s cophenet ([1 2 1], "a") 502s ***** error ... 502s cophenet ([1 2 1], [1 2]) 502s 5 tests, 5 passed, 0 known failure, 0 skipped 502s [inst/crosstab.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/crosstab.m 502s ***** error crosstab () 502s ***** error crosstab (1) 502s ***** error crosstab (ones (2), [1 1]) 502s ***** error crosstab ([1 1], ones (2)) 502s ***** error crosstab ([1], [1 2]) 502s ***** error crosstab ([1 2], [1]) 502s ***** test 502s load carbig 502s [table, chisq, p, labels] = crosstab (cyl4, when, org); 502s assert (table(2,3,1), 38); 502s assert (labels{3,3}, "Japan"); 502s ***** test 502s load carbig 502s [table, chisq, p, labels] = crosstab (cyl4, when, org); 502s assert (table(2,3,2), 17); 502s assert (labels{1,3}, "USA"); 502s 8 tests, 8 passed, 0 known failure, 0 skipped 502s [inst/vartest2.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/vartest2.m 502s ***** error vartest2 (); 502s ***** error vartest2 (ones (20,1)); 502s ***** error ... 502s vartest2 (rand (20,1), 5); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 502s ***** error ... 502s vartest2 (rand (20,1), rand (25,1)*2, "some"); 502s ***** test 502s load carsmall 502s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 502s assert (h, 0); 502s assert (pval, 0.6288022362718455, 1e-13); 502s assert (ci, [0.4139; 1.7193], 1e-4); 502s assert (stat.fstat, 0.8384, 1e-4); 502s assert (stat.df1, 30); 502s assert (stat.df2, 33); 502s 14 tests, 14 passed, 0 known failure, 0 skipped 502s [inst/gscatter.m] 502s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/gscatter.m 502s ***** demo 502s load fisheriris; 502s X = meas(:,3:4); 502s cidcs = kmeans (X, 3, "Replicates", 5); 502s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 502s title ("Fisher's iris data"); 502s ***** shared visibility_setting 502s visibility_setting = get (0, "DefaultFigureVisible"); 502s ***** test 502s hf = figure ("visible", "off"); 502s unwind_protect 502s load fisheriris; 502s X = meas(:,3:4); 502s cidcs = kmeans (X, 3, "Replicates", 5); 502s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 502s title ("Fisher's iris data"); 502s unwind_protect_cleanup 502s close (hf); 502s end_unwind_protect 502s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 503s ***** error gscatter (); 503s ***** error gscatter ([1]); 503s ***** error gscatter ([1], [2]); 503s ***** error gscatter ('abc', [1 2 3], [1]); 503s ***** error gscatter ([1 2 3], [1 2], [1]); 503s ***** error gscatter ([1 2 3], 'abc', [1]); 503s ***** error gscatter ([1 2], [1 2], [1]); 503s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 503s 9 tests, 9 passed, 0 known failure, 0 skipped 503s [inst/kmeans.m] 503s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/kmeans.m 503s ***** demo 503s ## Generate a two-cluster problem 503s randn ("seed", 31) # for reproducibility 503s C1 = randn (100, 2) + 1; 503s randn ("seed", 32) # for reproducibility 503s C2 = randn (100, 2) - 1; 503s data = [C1; C2]; 503s 503s ## Perform clustering 503s rand ("seed", 1) # for reproducibility 503s [idx, centers] = kmeans (data, 2); 503s 503s ## Plot the result 503s figure; 503s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 503s hold on; 503s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 503s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 503s hold off; 503s ***** demo 503s ## Cluster data using k-means clustering, then plot the cluster regions 503s ## Load Fisher's iris data set and use the petal lengths and widths as 503s ## predictors 503s 503s load fisheriris 503s X = meas(:,3:4); 503s 503s figure; 503s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 503s title ("Fisher's Iris Data"); 503s xlabel ("Petal Lengths (cm)"); 503s ylabel ("Petal Widths (cm)"); 503s 503s ## Cluster the data. Specify k = 3 clusters 503s rand ("seed", 1) # for reproducibility 503s [idx, C] = kmeans (X, 3); 503s x1 = min (X(:,1)):0.01:max (X(:,1)); 503s x2 = min (X(:,2)):0.01:max (X(:,2)); 503s [x1G, x2G] = meshgrid (x1, x2); 503s XGrid = [x1G(:), x2G(:)]; 503s 503s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 503s figure; 503s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 503s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 503s hold on; 503s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 503s title ("Fisher's Iris Data"); 503s xlabel ("Petal Lengths (cm)"); 503s ylabel ("Petal Widths (cm)"); 503s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 503s hold off 503s ***** demo 503s ## Partition Data into Two Clusters 503s 503s randn ("seed", 1) # for reproducibility 503s r1 = randn (100, 2) * 0.75 + ones (100, 2); 503s randn ("seed", 2) # for reproducibility 503s r2 = randn (100, 2) * 0.5 - ones (100, 2); 503s X = [r1; r2]; 503s 503s figure; 503s plot (X(:,1), X(:,2), "."); 503s title ("Randomly Generated Data"); 503s rand ("seed", 1) # for reproducibility 503s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 503s "Replicates", 5, "Display", "final"); 503s figure; 503s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 503s hold on 503s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 503s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 503s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 503s title ("Cluster Assignments and Centroids"); 503s hold off 503s ***** demo 503s ## Assign New Data to Existing Clusters 503s 503s ## Generate a training data set using three distributions 503s randn ("seed", 5) # for reproducibility 503s r1 = randn (100, 2) * 0.75 + ones (100, 2); 503s randn ("seed", 7) # for reproducibility 503s r2 = randn (100, 2) * 0.5 - ones (100, 2); 503s randn ("seed", 9) # for reproducibility 503s r3 = randn (100, 2) * 0.75; 503s X = [r1; r2; r3]; 503s 503s ## Partition the training data into three clusters by using kmeans 503s 503s rand ("seed", 1) # for reproducibility 503s [idx, C] = kmeans (X, 3); 503s 503s ## Plot the clusters and the cluster centroids 503s 503s figure 503s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 503s hold on 503s plot (C(:,1), C(:,2), "kx"); 503s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 503s 503s ## Generate a test data set 503s randn ("seed", 25) # for reproducibility 503s r1 = randn (100, 2) * 0.75 + ones (100, 2); 503s randn ("seed", 27) # for reproducibility 503s r2 = randn (100, 2) * 0.5 - ones (100, 2); 503s randn ("seed", 29) # for reproducibility 503s r3 = randn (100, 2) * 0.75; 503s Xtest = [r1; r2; r3]; 503s 503s ## Classify the test data set using the existing clusters 503s ## Find the nearest centroid from each test data point by using pdist2 503s 503s D = pdist2 (C, Xtest, "euclidean"); 503s [group, ~] = find (D == min (D)); 503s 503s ## Plot the test data and label the test data using idx_test with gscatter 503s 503s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 503s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 503s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 503s "Data classified to Cluster 3", "Location", "NorthWest"); 503s title ("Assign New Data to Existing Clusters"); 503s ***** test 503s samples = 4; 503s dims = 3; 503s k = 2; 503s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 503s "emptyAction", "singleton"); 503s assert (size (cls), [samples, 1]); 503s assert (size (c), [k, dims]); 503s assert (size (d), [k, 1]); 503s assert (size (z), [samples, k]); 503s ***** test 503s samples = 4; 503s dims = 3; 503s k = 2; 503s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 503s "emptyAction", "singleton"); 503s assert (size (cls), [samples, 1]); 503s assert (size (c), [k, dims]); 503s assert (size (d), [k, 1]); 503s assert (size (z), [samples, k]); 503s ***** test 503s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 503s assert (cls, [1; 1]); 503s assert (c, [1.5, 0; NA, NA]); 503s ***** test 503s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 503s "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 503s ***** test 503s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 503s ***** test 503s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 503s ***** error kmeans (rand (3,2), 4); 503s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 503s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 503s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 503s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 503s ***** error kmeans (rand (3,4), 2, "start", "normal"); 503s ***** error kmeans (rand (4,3), 2, "replicates", i); 503s ***** error kmeans (rand (4,3), 2, "replicates", -1); 503s ***** error kmeans (rand (4,3), 2, "replicates", []); 503s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 503s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 503s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 503s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 503s ***** error kmeans (rand (4,3), 2, "maxiter", []); 503s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 503s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 503s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 503s 31 tests, 31 passed, 0 known failure, 0 skipped 503s [inst/fishertest.m] 503s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fishertest.m 503s ***** demo 503s ## A Fisher's exact test example 503s 503s x = [3, 1; 1, 3] 503s [h, p, stats] = fishertest(x) 503s ***** assert (fishertest ([3, 4; 5, 7]), false); 503s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 503s ***** test 503s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 503s assert (pval, 1, 1e-14); 503s assert (stats.OddsRatio, 1.05); 503s CI = [0.159222057151289, 6.92429189601808]; 503s assert (stats.ConfidenceInterval, CI, 1e-14) 503s ***** test 503s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 503s assert (pval, 0.08080808080808080, 1e-14); 503s assert (stats.OddsRatio, 0); 503s assert (stats.ConfidenceInterval, [-Inf, Inf]) 503s ***** error fishertest (); 503s ***** error fishertest (1, 2, 3, 4, 5, 6); 503s ***** error ... 503s fishertest (ones (2, 2, 2)); 503s ***** error ... 503s fishertest ([1, 2; -3, 4]); 503s ***** error ... 503s fishertest ([1, 2; 3, 4+i]); 503s ***** error ... 503s fishertest ([1, 2; 3, 4.2]); 503s ***** error ... 503s fishertest ([NaN, 2; 3, 4]); 503s ***** error ... 503s fishertest ([1, Inf; 3, 4]); 503s ***** error ... 503s fishertest (ones (2) * 1e8); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "alpha", 0); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "alpha", 1.2); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "alpha", "val"); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "tail", "val"); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 503s ***** error ... 503s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 503s 19 tests, 19 passed, 0 known failure, 0 skipped 503s [inst/Clustering/SilhouetteEvaluation.m] 503s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Clustering/SilhouetteEvaluation.m 503s ***** test 503s load fisheriris 503s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 503s assert (class (eva), "SilhouetteEvaluation"); 503s 1 test, 1 passed, 0 known failure, 0 skipped 503s [inst/Clustering/GapEvaluation.m] 503s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Clustering/GapEvaluation.m 503s ***** test 503s load fisheriris 503s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 503s "referencedistribution", "uniform"); 503s assert (class (eva), "GapEvaluation"); 506s 1 test, 1 passed, 0 known failure, 0 skipped 506s [inst/Clustering/CalinskiHarabaszEvaluation.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Clustering/CalinskiHarabaszEvaluation.m 506s ***** test 506s load fisheriris 506s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 506s assert (class (eva), "CalinskiHarabaszEvaluation"); 506s 1 test, 1 passed, 0 known failure, 0 skipped 506s [inst/Clustering/DaviesBouldinEvaluation.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Clustering/DaviesBouldinEvaluation.m 506s ***** test 506s load fisheriris 506s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 506s assert (class (eva), "DaviesBouldinEvaluation"); 506s 1 test, 1 passed, 0 known failure, 0 skipped 506s [inst/Clustering/ClusterCriterion.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Clustering/ClusterCriterion.m 506s ***** error ... 506s ClusterCriterion ("1", "kmeans", [1:6]) 506s ***** error ... 506s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 506s ***** error ... 506s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 506s ***** error ... 506s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 506s 4 tests, 4 passed, 0 known failure, 0 skipped 506s [inst/ttest.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ttest.m 506s ***** test 506s x = 8:0.1:12; 506s [h, pval, ci] = ttest (x, 10); 506s assert (h, 0) 506s assert (pval, 1, 10*eps) 506s assert (ci, [9.6219 10.3781], 1E-5) 506s [h, pval, ci0] = ttest (x, 0); 506s assert (h, 1) 506s assert (pval, 0) 506s assert (ci0, ci, 2e-15) 506s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 506s assert (h, 0) 506s assert (pval, 0.5, 10*eps) 506s assert (ci, [9.68498 Inf], 1E-5) 506s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 506s ***** error ttest ([8:0.1:12], 10, "tail", 25); 506s 3 tests, 3 passed, 0 known failure, 0 skipped 506s [inst/cluster.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cluster.m 506s ***** error cluster () 506s ***** error cluster ([1 1], "Cutoff", 1) 506s ***** error cluster ([1 2 1], "Bogus", 1) 506s ***** error cluster ([1 2 1], "Cutoff", -1) 506s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 506s ***** test 506s 6 tests, 6 passed, 0 known failure, 0 skipped 506s [inst/pcares.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/pcares.m 506s ***** demo 506s x = [ 7 26 6 60; 506s 1 29 15 52; 506s 11 56 8 20; 506s 11 31 8 47; 506s 7 52 6 33; 506s 11 55 9 22; 506s 3 71 17 6; 506s 1 31 22 44; 506s 2 54 18 22; 506s 21 47 4 26; 506s 1 40 23 34; 506s 11 66 9 12; 506s 10 68 8 12]; 506s 506s ## As we increase the number of principal components, the norm 506s ## of the residuals matrix will decrease 506s r1 = pcares (x,1); 506s n1 = norm (r1) 506s r2 = pcares (x,2); 506s n2 = norm (r2) 506s r3 = pcares (x,3); 506s n3 = norm (r3) 506s r4 = pcares (x,4); 506s n4 = norm (r4) 506s ***** test 506s load hald 506s r1 = pcares (ingredients,1); 506s r2 = pcares (ingredients,2); 506s r3 = pcares (ingredients,3); 506s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 506s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 506s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 506s ***** error pcares (ones (20, 3)) 506s ***** error ... 506s pcares (ones (30, 2), 3) 506s 3 tests, 3 passed, 0 known failure, 0 skipped 506s [inst/manovacluster.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/manovacluster.m 506s ***** demo 506s load carbig 506s X = [MPG Acceleration Weight Displacement]; 506s [d, p, stats] = manova1 (X, Origin); 506s manovacluster (stats) 506s ***** test 506s hf = figure ("visible", "off"); 506s unwind_protect 506s load carbig 506s X = [MPG Acceleration Weight Displacement]; 506s [d, p, stats] = manova1 (X, Origin); 506s manovacluster (stats); 506s unwind_protect_cleanup 506s close (hf); 506s end_unwind_protect 506s ***** error manovacluster (stats, "some"); 506s 2 tests, 2 passed, 0 known failure, 0 skipped 506s [inst/stepwisefit.m] 506s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/stepwisefit.m 506s ***** test 506s % Sample data from Draper and Smith (n = 13, k = 4) 506s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 506s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 506s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 506s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 506s 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]'; 506s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 506s assert(X_use, [4 1]) 506s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 506s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 506s assert(X_use, [4 1]) 506s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 506s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 506s assert(X_use, [4 1]) 506s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 507s 1 test, 1 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/ricestat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/ricestat.m 507s ***** error ricestat () 507s ***** error ricestat (1) 507s ***** error ricestat ({}, 2) 507s ***** error ricestat (1, "") 507s ***** error ricestat (i, 2) 507s ***** error ricestat (1, i) 507s ***** error ... 507s ricestat (ones (3), ones (2)) 507s ***** error ... 507s ricestat (ones (2), ones (3)) 507s ***** shared s, sigma 507s s = [2, 0, -1, 1, 4]; 507s sigma = [1, NaN, 3, -1, 2]; 507s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 507s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 507s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 507s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 507s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 507s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 507s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 507s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 507s 16 tests, 16 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/normstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/normstat.m 507s ***** error normstat () 507s ***** error normstat (1) 507s ***** error normstat ({}, 2) 507s ***** error normstat (1, "") 507s ***** error normstat (i, 2) 507s ***** error normstat (1, i) 507s ***** error ... 507s normstat (ones (3), ones (2)) 507s ***** error ... 507s normstat (ones (2), ones (3)) 507s ***** test 507s mu = 1:6; 507s sigma = 0.2:0.2:1.2; 507s [m, v] = normstat (mu, sigma); 507s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 507s assert (m, mu); 507s assert (v, expected_v, 0.001); 507s ***** test 507s sigma = 0.2:0.2:1.2; 507s [m, v] = normstat (0, sigma); 507s expected_mn = [0, 0, 0, 0, 0, 0]; 507s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 507s assert (m, expected_mn, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/tlsstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/tlsstat.m 507s ***** error tlsstat () 507s ***** error tlsstat (1) 507s ***** error tlsstat (1, 2) 507s ***** error tlsstat ({}, 2, 3) 507s ***** error tlsstat (1, "", 3) 507s ***** error tlsstat (1, 2, ["d"]) 507s ***** error tlsstat (i, 2, 3) 507s ***** error tlsstat (1, i, 3) 507s ***** error tlsstat (1, 2, i) 507s ***** error ... 507s tlsstat (ones (3), ones (2), 1) 507s ***** error ... 507s tlsstat (ones (2), 1, ones (3)) 507s ***** error ... 507s tlsstat (1, ones (2), ones (3)) 507s ***** test 507s [m, v] = tlsstat (0, 1, 0); 507s assert (m, NaN); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (0, 1, 1); 507s assert (m, NaN); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (2, 1, 1); 507s assert (m, NaN); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (-2, 1, 1); 507s assert (m, NaN); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (0, 1, 2); 507s assert (m, 0); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (2, 1, 2); 507s assert (m, 2); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (-2, 1, 2); 507s assert (m, -2); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (0, 2, 2); 507s assert (m, 0); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (2, 2, 2); 507s assert (m, 2); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (-2, 2, 2); 507s assert (m, -2); 507s assert (v, NaN); 507s ***** test 507s [m, v] = tlsstat (0, 1, 3); 507s assert (m, 0); 507s assert (v, 3); 507s ***** test 507s [m, v] = tlsstat (0, 2, 3); 507s assert (m, 0); 507s assert (v, 6); 507s ***** test 507s [m, v] = tlsstat (2, 1, 3); 507s assert (m, 2); 507s assert (v, 3); 507s ***** test 507s [m, v] = tlsstat (2, 2, 3); 507s assert (m, 2); 507s assert (v, 6); 507s ***** test 507s [m, v] = tlsstat (-2, 1, 3); 507s assert (m, -2); 507s assert (v, 3); 507s ***** test 507s [m, v] = tlsstat (-2, 2, 3); 507s assert (m, -2); 507s assert (v, 6); 507s 28 tests, 28 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/tstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/tstat.m 507s ***** error tstat () 507s ***** error tstat ({}) 507s ***** error tstat ("") 507s ***** error tstat (i) 507s ***** test 507s df = 3:8; 507s [m, v] = tstat (df); 507s expected_m = [0, 0, 0, 0, 0, 0]; 507s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 507s assert (m, expected_m); 507s assert (v, expected_v, 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/gevstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/gevstat.m 507s ***** error gevstat () 507s ***** error gevstat (1) 507s ***** error gevstat (1, 2) 507s ***** error gevstat ({}, 2, 3) 507s ***** error gevstat (1, "", 3) 507s ***** error gevstat (1, 2, "") 507s ***** error gevstat (i, 2, 3) 507s ***** error gevstat (1, i, 3) 507s ***** error gevstat (1, 2, i) 507s ***** error ... 507s gevstat (ones (3), ones (2), 3) 507s ***** error ... 507s gevstat (ones (2), 2, ones (3)) 507s ***** error ... 507s gevstat (1, ones (2), ones (3)) 507s ***** test 507s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 507s sigma = 2; 507s mu = 1; 507s [m, v] = gevstat (k, sigma, mu); 507s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 507s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 507s assert (m, expected_m, -0.001); 507s assert (v, expected_v, -0.001); 507s 13 tests, 13 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/betastat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/betastat.m 507s ***** error betastat () 507s ***** error betastat (1) 507s ***** error betastat ({}, 2) 507s ***** error betastat (1, "") 507s ***** error betastat (i, 2) 507s ***** error betastat (1, i) 507s ***** error ... 507s betastat (ones (3), ones (2)) 507s ***** error ... 507s betastat (ones (2), ones (3)) 507s ***** test 507s a = -2:6; 507s b = 0.4:0.2:2; 507s [m, v] = betastat (a, b); 507s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 507s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 507s assert (m, expected_m, eps*100); 507s assert (v, expected_v, 0.001); 507s ***** test 507s a = -2:1:6; 507s [m, v] = betastat (a, 1.5); 507s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 507s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 507s assert (m, expected_m); 507s assert (v, expected_v, 0.001); 507s ***** test 507s a = [14 Inf 10 NaN 10]; 507s b = [12 9 NaN Inf 12]; 507s [m, v] = betastat (a, b); 507s expected_m = [14/26 NaN NaN NaN 10/22]; 507s expected_v = [168/18252 NaN NaN NaN 120/11132]; 507s assert (m, expected_m); 507s assert (v, expected_v); 507s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 507s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 507s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 507s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 507s 15 tests, 15 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/ncx2stat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/ncx2stat.m 507s ***** error ncx2stat () 507s ***** error ncx2stat (1) 507s ***** error ncx2stat ({}, 2) 507s ***** error ncx2stat (1, "") 507s ***** error ncx2stat (i, 2) 507s ***** error ncx2stat (1, i) 507s ***** error ... 507s ncx2stat (ones (3), ones (2)) 507s ***** error ... 507s ncx2stat (ones (2), ones (3)) 507s ***** shared df, d1 507s df = [2, 0, -1, 1, 4]; 507s d1 = [1, NaN, 3, -1, 2]; 507s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 507s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 507s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 507s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 507s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 507s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 507s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 507s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 507s 16 tests, 16 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/logistat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/logistat.m 507s ***** error logistat () 507s ***** error logistat (1) 507s ***** error logistat ({}, 2) 507s ***** error logistat (1, "") 507s ***** error logistat (i, 2) 507s ***** error logistat (1, i) 507s ***** error ... 507s logistat (ones (3), ones (2)) 507s ***** error ... 507s logistat (ones (2), ones (3)) 507s ***** test 507s [m, v] = logistat (0, 1); 507s assert (m, 0); 507s assert (v, 3.2899, 0.001); 507s ***** test 507s [m, v] = logistat (0, 0.8); 507s assert (m, 0); 507s assert (v, 2.1055, 0.001); 507s ***** test 507s [m, v] = logistat (1, 0.6); 507s assert (m, 1); 507s assert (v, 1.1844, 0.001); 507s ***** test 507s [m, v] = logistat (0, 0.4); 507s assert (m, 0); 507s assert (v, 0.5264, 0.001); 507s ***** test 507s [m, v] = logistat (-1, 0.2); 507s assert (m, -1); 507s assert (v, 0.1316, 0.001); 507s 13 tests, 13 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/hnstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/hnstat.m 507s ***** error hnstat () 507s ***** error hnstat (1) 507s ***** error hnstat ({}, 2) 507s ***** error hnstat (1, "") 507s ***** error hnstat (i, 2) 507s ***** error hnstat (1, i) 507s ***** error ... 507s hnstat (ones (3), ones (2)) 507s ***** error ... 507s hnstat (ones (2), ones (3)) 507s ***** test 507s [m, v] = hnstat (0, 1); 507s assert (m, 0.7979, 1e-4); 507s assert (v, 0.3634, 1e-4); 507s ***** test 507s [m, v] = hnstat (2, 1); 507s assert (m, 2.7979, 1e-4); 507s assert (v, 0.3634, 1e-4); 507s ***** test 507s [m, v] = hnstat (2, 2); 507s assert (m, 3.5958, 1e-4); 507s assert (v, 1.4535, 1e-4); 507s ***** test 507s [m, v] = hnstat (2, 2.5); 507s assert (m, 3.9947, 1e-4); 507s assert (v, 2.2711, 1e-4); 507s ***** test 507s [m, v] = hnstat (1.5, 0.5); 507s assert (m, 1.8989, 1e-4); 507s assert (v, 0.0908, 1e-4); 507s ***** test 507s [m, v] = hnstat (-1.5, 0.5); 507s assert (m, -1.1011, 1e-4); 507s assert (v, 0.0908, 1e-4); 507s 14 tests, 14 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/gamstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/gamstat.m 507s ***** error gamstat () 507s ***** error gamstat (1) 507s ***** error gamstat ({}, 2) 507s ***** error gamstat (1, "") 507s ***** error gamstat (i, 2) 507s ***** error gamstat (1, i) 507s ***** error ... 507s gamstat (ones (3), ones (2)) 507s ***** error ... 507s gamstat (ones (2), ones (3)) 507s ***** test 507s a = 1:6; 507s b = 1:0.2:2; 507s [m, v] = gamstat (a, b); 507s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 507s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s a = 1:6; 507s [m, v] = gamstat (a, 1.5); 507s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 507s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/lognstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/lognstat.m 507s ***** error lognstat () 507s ***** error lognstat (1) 507s ***** error lognstat ({}, 2) 507s ***** error lognstat (1, "") 507s ***** error lognstat (i, 2) 507s ***** error lognstat (1, i) 507s ***** error ... 507s lognstat (ones (3), ones (2)) 507s ***** error ... 507s lognstat (ones (2), ones (3)) 507s ***** test 507s mu = 0:0.2:1; 507s sigma = 0.2:0.2:1.2; 507s [m, v] = lognstat (mu, sigma); 507s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 507s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s sigma = 0.2:0.2:1.2; 507s [m, v] = lognstat (0, sigma); 507s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 507s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/unidstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/unidstat.m 507s ***** error unidstat () 507s ***** error unidstat ({}) 507s ***** error unidstat ("") 507s ***** error unidstat (i) 507s ***** test 507s N = 1:6; 507s [m, v] = unidstat (N); 507s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 507s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/unifstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/unifstat.m 507s ***** error unifstat () 507s ***** error unifstat (1) 507s ***** error unifstat ({}, 2) 507s ***** error unifstat (1, "") 507s ***** error unifstat (i, 2) 507s ***** error unifstat (1, i) 507s ***** error ... 507s unifstat (ones (3), ones (2)) 507s ***** error ... 507s unifstat (ones (2), ones (3)) 507s ***** test 507s a = 1:6; 507s b = 2:2:12; 507s [m, v] = unifstat (a, b); 507s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 507s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s a = 1:6; 507s [m, v] = unifstat (a, 10); 507s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 507s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/evstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/evstat.m 507s ***** error evstat () 507s ***** error evstat (1) 507s ***** error evstat ({}, 2) 507s ***** error evstat (1, "") 507s ***** error evstat (i, 2) 507s ***** error evstat (1, i) 507s ***** error ... 507s evstat (ones (3), ones (2)) 507s ***** error ... 507s evstat (ones (2), ones (3)) 507s ***** shared x, y0, y1 507s x = [-5, 0, 1, 2, 3]; 507s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 507s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 507s ***** assert (evstat (x, x), y0, 1e-4) 507s ***** assert (evstat (x, x+6), y1, 1e-4) 507s ***** assert (evstat (x, x-6), NaN (1,5)) 507s 11 tests, 11 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/ncfstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/ncfstat.m 507s ***** error ncfstat () 507s ***** error ncfstat (1) 507s ***** error ncfstat (1, 2) 507s ***** error ncfstat ({}, 2, 3) 507s ***** error ncfstat (1, "", 3) 507s ***** error ncfstat (1, 2, "") 507s ***** error ncfstat (i, 2, 3) 507s ***** error ncfstat (1, i, 3) 507s ***** error ncfstat (1, 2, i) 507s ***** error ... 507s ncfstat (ones (3), ones (2), 3) 507s ***** error ... 507s ncfstat (ones (2), 2, ones (3)) 507s ***** error ... 507s ncfstat (1, ones (2), ones (3)) 507s ***** shared df1, df2, lambda 507s df1 = [2, 0, -1, 1, 4, 5]; 507s df2 = [2, 4, -1, 5, 6, 7]; 507s lambda = [1, NaN, 3, 0, 2, -1]; 507s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 507s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 507s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 507s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 507s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 507s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 507s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 507s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 507s 20 tests, 20 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/tristat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/tristat.m 507s ***** error tristat () 507s ***** error tristat (1) 507s ***** error tristat (1, 2) 507s ***** error tristat ("i", 2, 1) 507s ***** error tristat (0, "d", 1) 507s ***** error tristat (0, 3, {}) 507s ***** error tristat (i, 2, 1) 507s ***** error tristat (0, i, 1) 507s ***** error tristat (0, 3, i) 507s ***** test 507s a = 1:5; 507s b = 3:7; 507s c = 5:9; 507s [m, v] = tristat (a, b, c); 507s expected_m = [3, 4, 5, 6, 7]; 507s assert (m, expected_m); 507s assert (v, ones (1, 5) * (2/3)); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/chi2stat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/chi2stat.m 507s ***** error chi2stat () 507s ***** error chi2stat ({}) 507s ***** error chi2stat ("") 507s ***** error chi2stat (i) 507s ***** test 507s df = 1:6; 507s [m, v] = chi2stat (df); 507s assert (m, df); 507s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/burrstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/burrstat.m 507s ***** error burrstat () 507s ***** error burrstat (1) 507s ***** error burrstat (1, 2) 507s ***** error burrstat ({}, 2, 3) 507s ***** error burrstat (1, "", 3) 507s ***** error burrstat (1, 2, "") 507s ***** error burrstat (i, 2, 3) 507s ***** error burrstat (1, i, 3) 507s ***** error burrstat (1, 2, i) 507s ***** error ... 507s burrstat (ones (3), ones (2), 3) 507s ***** error ... 507s burrstat (ones (2), 2, ones (3)) 507s ***** error ... 507s burrstat (1, ones (2), ones (3)) 507s ***** test 507s [m, v] = burrstat (1, 2, 5); 507s assert (m, 0.4295, 1e-4); 507s assert (v, 0.0655, 1e-4); 507s ***** test 507s [m, v] = burrstat (1, 1, 1); 507s assert (m, Inf); 507s assert (v, Inf); 507s ***** test 507s [m, v] = burrstat (2, 4, 1); 507s assert (m, 2.2214, 1e-4); 507s assert (v, 1.3484, 1e-4); 507s 15 tests, 15 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/nctstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/nctstat.m 507s ***** error nctstat () 507s ***** error nctstat (1) 507s ***** error nctstat ({}, 2) 507s ***** error nctstat (1, "") 507s ***** error nctstat (i, 2) 507s ***** error nctstat (1, i) 507s ***** error ... 507s nctstat (ones (3), ones (2)) 507s ***** error ... 507s nctstat (ones (2), ones (3)) 507s ***** shared df, mu 507s df = [2, 0, -1, 1, 4]; 507s mu = [1, NaN, 3, -1, 2]; 507s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 507s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 507s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 507s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 507s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 507s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 507s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 507s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 507s 16 tests, 16 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/geostat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/geostat.m 507s ***** error geostat () 507s ***** error geostat ({}) 507s ***** error geostat ("") 507s ***** error geostat (i) 507s ***** test 507s ps = 1 ./ (1:6); 507s [m, v] = geostat (ps); 507s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 507s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/fstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/fstat.m 507s ***** error fstat () 507s ***** error fstat (1) 507s ***** error fstat ({}, 2) 507s ***** error fstat (1, "") 507s ***** error fstat (i, 2) 507s ***** error fstat (1, i) 507s ***** error ... 507s fstat (ones (3), ones (2)) 507s ***** error ... 507s fstat (ones (2), ones (3)) 507s ***** test 507s df1 = 1:6; 507s df2 = 5:10; 507s [m, v] = fstat (df1, df2); 507s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 507s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 507s assert (m, expected_mn, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s df1 = 1:6; 507s [m, v] = fstat (df1, 5); 507s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 507s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 507s assert (m, expected_mn, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/expstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/expstat.m 507s ***** error expstat () 507s ***** error expstat ({}) 507s ***** error expstat ("") 507s ***** error expstat (i) 507s ***** test 507s mu = 1:6; 507s [m, v] = expstat (mu); 507s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 507s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/wblstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/wblstat.m 507s ***** error wblstat () 507s ***** error wblstat (1) 507s ***** error wblstat ({}, 2) 507s ***** error wblstat (1, "") 507s ***** error wblstat (i, 2) 507s ***** error wblstat (1, i) 507s ***** error ... 507s wblstat (ones (3), ones (2)) 507s ***** error ... 507s wblstat (ones (2), ones (3)) 507s ***** test 507s lambda = 3:8; 507s k = 1:6; 507s [m, v] = wblstat (lambda, k); 507s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 507s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s k = 1:6; 507s [m, v] = wblstat (6, k); 507s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 507s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/gpstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/gpstat.m 507s ***** error gpstat () 507s ***** error gpstat (1) 507s ***** error gpstat (1, 2) 507s ***** error gpstat ({}, 2, 3) 507s ***** error gpstat (1, "", 3) 507s ***** error gpstat (1, 2, "") 507s ***** error gpstat (i, 2, 3) 507s ***** error gpstat (1, i, 3) 507s ***** error gpstat (1, 2, i) 507s ***** error ... 507s gpstat (ones (3), ones (2), 3) 507s ***** error ... 507s gpstat (ones (2), 2, ones (3)) 507s ***** error ... 507s gpstat (1, ones (2), ones (3)) 507s ***** shared x, y 507s x = [-Inf, -1, 0, 1/2, 1, Inf]; 507s y = [0, 0.5, 1, 2, Inf, Inf]; 507s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 507s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 507s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 507s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 507s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 507s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 507s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 507s 19 tests, 19 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/binostat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/binostat.m 507s ***** error binostat () 507s ***** error binostat (1) 507s ***** error binostat ({}, 2) 507s ***** error binostat (1, "") 507s ***** error binostat (i, 2) 507s ***** error binostat (1, i) 507s ***** error ... 507s binostat (ones (3), ones (2)) 507s ***** error ... 507s binostat (ones (2), ones (3)) 507s ***** test 507s n = 1:6; 507s ps = 0:0.2:1; 507s [m, v] = binostat (n, ps); 507s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 507s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s n = 1:6; 507s [m, v] = binostat (n, 0.5); 507s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 507s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 507s [m, v] = binostat (n, 0.5); 507s assert (isnan (m), [true true false true false true false false]) 507s assert (isnan (v), [true true false true false true false false]) 507s assert (m(end), Inf); 507s assert (v(end), Inf); 507s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 507s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 507s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 507s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 507s 15 tests, 15 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/loglstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/loglstat.m 507s ***** error loglstat () 507s ***** error loglstat (1) 507s ***** error loglstat ({}, 2) 507s ***** error loglstat (1, "") 507s ***** error loglstat (i, 2) 507s ***** error loglstat (1, i) 507s ***** error ... 507s loglstat (ones (3), ones (2)) 507s ***** error ... 507s loglstat (ones (2), ones (3)) 507s ***** test 507s [m, v] = loglstat (0, 1); 507s assert (m, Inf, 0.001); 507s assert (v, Inf, 0.001); 507s ***** test 507s [m, v] = loglstat (0, 0.8); 507s assert (m, 4.2758, 0.001); 507s assert (v, Inf, 0.001); 507s ***** test 507s [m, v] = loglstat (0, 0.6); 507s assert (m, 1.9820, 0.001); 507s assert (v, Inf, 0.001); 507s ***** test 507s [m, v] = loglstat (0, 0.4); 507s assert (m, 1.3213, 0.001); 507s assert (v, 2.5300, 0.001); 507s ***** test 507s [m, v] = loglstat (0, 0.2); 507s assert (m, 1.0690, 0.001); 507s assert (v, 0.1786, 0.001); 507s 13 tests, 13 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/plstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/plstat.m 507s ***** shared x, Fx 507s x = [0, 1, 3, 4, 7, 10]; 507s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 507s ***** assert (plstat (x, Fx), 4.15) 507s ***** test 507s [m, v] = plstat (x, Fx); 507s assert (v, 10.3775, 1e-14) 507s ***** error plstat () 507s ***** error plstat (1) 507s ***** error ... 507s plstat ([0, 1, 2], [0, 1]) 507s ***** error ... 507s plstat ([0], [1]) 507s ***** error ... 507s plstat ([0, 1, 2], [0, 1, 1.5]) 507s ***** error ... 507s plstat ([0, 1, 2], [0, i, 1]) 507s ***** error ... 507s plstat ([0, i, 2], [0, 0.5, 1]) 507s ***** error ... 507s plstat ([0, i, 2], [0, 0.5i, 1]) 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/poisstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/poisstat.m 507s ***** error poisstat () 507s ***** error poisstat ({}) 507s ***** error poisstat ("") 507s ***** error poisstat (i) 507s ***** test 507s lambda = 1 ./ (1:6); 507s [m, v] = poisstat (lambda); 507s assert (m, lambda); 507s assert (v, lambda); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/invgstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/invgstat.m 507s ***** error invgstat () 507s ***** error invgstat (1) 507s ***** error invgstat ({}, 2) 507s ***** error invgstat (1, "") 507s ***** error invgstat (i, 2) 507s ***** error invgstat (1, i) 507s ***** error ... 507s invgstat (ones (3), ones (2)) 507s ***** error ... 507s invgstat (ones (2), ones (3)) 507s ***** test 507s [m, v] = invgstat (1, 1); 507s assert (m, 1); 507s assert (v, 1); 507s ***** test 507s [m, v] = invgstat (2, 1); 507s assert (m, 2); 507s assert (v, 8); 507s ***** test 507s [m, v] = invgstat (2, 2); 507s assert (m, 2); 507s assert (v, 4); 507s ***** test 507s [m, v] = invgstat (2, 2.5); 507s assert (m, 2); 507s assert (v, 3.2); 507s ***** test 507s [m, v] = invgstat (1.5, 0.5); 507s assert (m, 1.5); 507s assert (v, 6.75); 507s 13 tests, 13 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/nbinstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/nbinstat.m 507s ***** error nbinstat () 507s ***** error nbinstat (1) 507s ***** error nbinstat ({}, 2) 507s ***** error nbinstat (1, "") 507s ***** error nbinstat (i, 2) 507s ***** error nbinstat (1, i) 507s ***** error ... 507s nbinstat (ones (3), ones (2)) 507s ***** error ... 507s nbinstat (ones (2), ones (3)) 507s ***** test 507s r = 1:4; 507s ps = 0.2:0.2:0.8; 507s [m, v] = nbinstat (r, ps); 507s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 507s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s r = 1:4; 507s [m, v] = nbinstat (r, 0.5); 507s expected_m = [1, 2, 3, 4]; 507s expected_v = [2, 4, 6, 8]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/raylstat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/raylstat.m 507s ***** error raylstat () 507s ***** error raylstat ({}) 507s ***** error raylstat ("") 507s ***** error raylstat (i) 507s ***** test 507s sigma = 1:6; 507s [m, v] = raylstat (sigma); 507s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 507s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 507s assert (m, expected_m, 0.001); 507s assert (v, expected_v, 0.001); 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/bisastat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/bisastat.m 507s ***** error bisastat () 507s ***** error bisastat (1) 507s ***** error bisastat ({}, 2) 507s ***** error bisastat (1, "") 507s ***** error bisastat (i, 2) 507s ***** error bisastat (1, i) 507s ***** error ... 507s bisastat (ones (3), ones (2)) 507s ***** error ... 507s bisastat (ones (2), ones (3)) 507s ***** test 507s beta = 1:6; 507s gamma = 1:0.2:2; 507s [m, v] = bisastat (beta, gamma); 507s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 507s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 507s assert (m, expected_m, 1e-2); 507s assert (v, expected_v, 1e-3); 507s ***** test 507s beta = 1:6; 507s [m, v] = bisastat (beta, 1.5); 507s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 507s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 507s assert (m, expected_m, 1e-3); 507s assert (v, expected_v, 1e-4); 507s 10 tests, 10 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/hygestat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/hygestat.m 507s ***** error hygestat () 507s ***** error hygestat (1) 507s ***** error hygestat (1, 2) 507s ***** error hygestat ({}, 2, 3) 507s ***** error hygestat (1, "", 3) 507s ***** error hygestat (1, 2, "") 507s ***** error hygestat (i, 2, 3) 507s ***** error hygestat (1, i, 3) 507s ***** error hygestat (1, 2, i) 507s ***** error ... 507s hygestat (ones (3), ones (2), 3) 507s ***** error ... 507s hygestat (ones (2), 2, ones (3)) 507s ***** error ... 507s hygestat (1, ones (2), ones (3)) 507s ***** test 507s m = 4:9; 507s k = 0:5; 507s n = 1:6; 507s [mn, v] = hygestat (m, k, n); 507s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 507s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 507s assert (mn, expected_mn, 0.001); 507s assert (v, expected_v, 0.001); 507s ***** test 507s m = 4:9; 507s k = 0:5; 507s [mn, v] = hygestat (m, k, 2); 507s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 507s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 507s assert (mn, expected_mn, 0.001); 507s assert (v, expected_v, 0.001); 507s 14 tests, 14 passed, 0 known failure, 0 skipped 507s [inst/dist_stat/nakastat.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_stat/nakastat.m 507s ***** error nakastat () 507s ***** error nakastat (1) 507s ***** error nakastat ({}, 2) 507s ***** error nakastat (1, "") 507s ***** error nakastat (i, 2) 507s ***** error nakastat (1, i) 507s ***** error ... 507s nakastat (ones (3), ones (2)) 507s ***** error ... 507s nakastat (ones (2), ones (3)) 507s ***** test 507s [m, v] = nakastat (1, 1); 507s assert (m, 0.8862269254, 1e-10); 507s assert (v, 0.2146018366, 1e-10); 507s ***** test 507s [m, v] = nakastat (1, 2); 507s assert (m, 1.25331413731, 1e-10); 507s assert (v, 0.42920367321, 1e-10); 507s ***** test 507s [m, v] = nakastat (2, 1); 507s assert (m, 0.93998560299, 1e-10); 507s assert (v, 0.11642706618, 1e-10); 507s 11 tests, 11 passed, 0 known failure, 0 skipped 507s [inst/ranksum.m] 507s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ranksum.m 507s ***** test 507s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 507s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 507s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 507s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 507s assert (p, 0.004329004329004329, 1e-14); 507s assert (h, true); 507s assert (stats.ranksum, 21.5); 507s ***** test 507s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 507s 49 47 50 60 59 60 62 61 71]'; 507s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 507s 54 50 53 62 62 62 72 60 67]'; 507s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 507s assert (p, 0.1270832752950605, 1e-14); 507s assert (h, false); 507s assert (stats.ranksum, 837.5); 507s assert (stats.zval, -1.140287483634606, 1e-14); 507s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 507s "method", "exact"); 507s assert (p, 0.127343916432862, 1e-14); 507s assert (h, false); 507s assert (stats.ranksum, 837.5); 515s 2 tests, 2 passed, 0 known failure, 0 skipped 515s [inst/ztest2.m] 515s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ztest2.m 515s ***** error ztest2 (); 515s ***** error ztest2 (1); 515s ***** error ztest2 (1, 2); 515s ***** error ztest2 (1, 2, 3); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha") 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha", 0); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha", 1.2); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha", "val"); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "tail", "val"); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 515s ***** error ... 515s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 515s 11 tests, 11 passed, 0 known failure, 0 skipped 515s [inst/signrank.m] 515s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/signrank.m 515s ***** test 515s load gradespaired.mat 515s [p, h, stats] = signrank (gradespaired(:,1), ... 515s gradespaired(:,2), 'tail', 'left'); 515s assert (p, 0.0047, 1e-4); 515s assert (h, true); 515s assert (stats.zval, -2.5982, 1e-4); 515s assert (stats.signedrank, 2017.5); 515s ***** test 515s load ('gradespaired.mat'); 515s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 515s 'tail', 'left', 'method', 'exact'); 515s assert (p, 0.0045, 1e-4); 515s assert (h, true); 515s assert (stats.zval, NaN); 515s assert (stats.signedrank, 2017.5); 515s ***** test 515s load mileage 515s [p, h, stats] = signrank (mileage(:,2), 33); 515s assert (p, 0.0312, 1e-4); 515s assert (h, true); 515s assert (stats.zval, NaN); 515s assert (stats.signedrank, 21); 515s ***** test 515s load mileage 515s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 515s assert (p, 0.0156, 1e-4); 515s assert (h, true); 515s assert (stats.zval, NaN); 515s assert (stats.signedrank, 21); 515s ***** test 515s load mileage 515s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 515s 'alpha', 0.01, 'method', 'approximate'); 515s assert (p, 0.0180, 1e-4); 515s assert (h, false); 515s assert (stats.zval, 2.0966, 1e-4); 515s assert (stats.signedrank, 21); 515s ***** error signrank (ones (2)) 515s ***** error ... 515s signrank ([1, 2, 3, 4], ones (2)) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [1, 2, 3]) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'tail') 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'alpha', 0) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'alpha', "a") 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'tail', "some") 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'method', 0.01) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'method', "some") 515s ***** error ... 515s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 515s 22 tests, 22 passed, 0 known failure, 0 skipped 515s [inst/qqplot.m] 515s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/qqplot.m 515s ***** test 515s hf = figure ("visible", "off"); 515s unwind_protect 515s 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]); 515s unwind_protect_cleanup 515s close (hf); 515s end_unwind_protect 515s ***** error qqplot () 515s ***** error qqplot ({1}) 515s ***** error qqplot (ones (2,2)) 515s ***** error qqplot (1, "foobar") 515s ***** error qqplot ([1 2 3], "foobar") 515s 6 tests, 6 passed, 0 known failure, 0 skipped 515s [inst/mahal.m] 515s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/mahal.m 515s ***** error mahal () 516s ***** error mahal (1, 2, 3) 516s ***** error mahal ("A", "B") 516s ***** error mahal ([1, 2], ["A", "B"]) 516s ***** error mahal (ones (2, 2, 2)) 516s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 516s ***** error mahal (ones (2, 2), ones (2, 3)) 516s ***** test 516s X = [1 0; 0 1; 1 1; 0 0]; 516s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 516s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 516s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 516s 9 tests, 9 passed, 0 known failure, 0 skipped 516s [inst/standardizeMissing.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/standardizeMissing.m 516s ***** assert (standardizeMissing (1, 1), NaN) 516s ***** assert (standardizeMissing (1, 0), 1) 516s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 516s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 516s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 516s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 516s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 516s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 516s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 516s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 516s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 516s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 516s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 516s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 516s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 516s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 516s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 516s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 516s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 516s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 516s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 516s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 516s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 516s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 516s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 516s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 516s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 516s ***** assert (standardizeMissing (single (1), true), single (NaN)) 516s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 516s ***** assert (standardizeMissing (true, true), true) 516s ***** assert (standardizeMissing (true, 1), true) 516s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 516s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 516s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 516s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 516s ***** error standardizeMissing (); 516s ***** error standardizeMissing (1); 516s ***** error standardizeMissing (1,2,3); 516s ***** error standardizeMissing ({'abc', 1}, 1); 516s ***** error standardizeMissing (struct ('a','b'), 1); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 516s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 516s 49 tests, 49 passed, 0 known failure, 0 skipped 516s [inst/squareform.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/squareform.m 516s ***** shared v, m 516s v = 1:6; 516s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 516s ***** assert (squareform (v), m) 516s ***** assert (squareform (squareform (v)), v) 516s ***** assert (squareform (m), v) 516s ***** assert (squareform (v'), m) 516s ***** assert (squareform (1), [0 1;1 0]) 516s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 516s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 516s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 516s ***** test 516s for c = {@single, @double, @uint8, @uint32, @uint64} 516s f = c{1}; 516s assert (squareform (f (v)), f (m)) 516s assert (squareform (f (m)), f (v)) 516s endfor 516s 9 tests, 9 passed, 0 known failure, 0 skipped 516s [inst/inconsistent.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/inconsistent.m 516s ***** error inconsistent () 516s ***** error inconsistent ([1 2 1], 2, 3) 516s ***** error inconsistent (ones (2, 2)) 516s ***** error inconsistent ([1 2 1], -1) 516s ***** error inconsistent ([1 2 1], 1.3) 516s ***** error inconsistent ([1 2 1], [1 1]) 516s ***** error inconsistent (ones (2, 3)) 516s ***** test 516s load fisheriris; 516s Z = linkage(meas, 'average', 'chebychev'); 516s assert (cond (inconsistent (Z)), 39.9, 1e-3); 516s 8 tests, 8 passed, 0 known failure, 0 skipped 516s [inst/hotelling_t2test2.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hotelling_t2test2.m 516s ***** error hotelling_t2test2 (); 516s ***** error ... 516s hotelling_t2test2 ([2, 3, 4, 5, 6]); 516s ***** error ... 516s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 516s ***** error ... 516s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 516s ***** error ... 516s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 516s ***** error ... 516s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 516s ***** error ... 516s hotelling_t2test2 (ones (20,1), ones (20,2)); 516s ***** error ... 516s hotelling_t2test2 (ones (20,2), ones (25,3)); 516s ***** test 516s randn ("seed", 1); 516s x1 = randn (60000, 5); 516s randn ("seed", 5); 516s x2 = randn (30000, 5); 516s [h, pval, stats] = hotelling_t2test2 (x1, x2); 516s assert (h, 0); 516s assert (stats.df1, 5); 516s assert (stats.df2, 89994); 516s 14 tests, 14 passed, 0 known failure, 0 skipped 516s [inst/grp2idx.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/grp2idx.m 516s ***** test 516s in = [true false false true]; 516s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 516s assert (nthargout (1:3, @grp2idx, in), out) 516s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 516s ***** test 516s assert (nthargout (1:3, @grp2idx, [false, true]), 516s {[1; 2] {"0"; "1"} [false; true]}); 516s assert (nthargout (1:3, @grp2idx, [true, false]), 516s {[1; 2] {"1"; "0"} [true; false]}); 516s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 516s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 516s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 516s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 516s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 516s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 516s [1; -3; -2; 2; -1; 3]}); 516s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 516s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 516s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 516s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 516s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 516s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 516s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 516s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 516s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 516s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 516s 10 tests, 10 passed, 0 known failure, 0 skipped 516s [inst/dist_wrap/makedist.m] 516s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/makedist.m 516s ***** test 516s pd = makedist ("beta"); 516s assert (class (pd), "BetaDistribution"); 516s assert (pd.a, 1); 516s assert (pd.b, 1); 516s ***** test 516s pd = makedist ("beta", "a", 5); 516s assert (pd.a, 5); 516s assert (pd.b, 1); 516s ***** test 516s pd = makedist ("beta", "b", 5); 516s assert (pd.a, 1); 516s assert (pd.b, 5); 516s ***** test 516s pd = makedist ("beta", "a", 3, "b", 5); 516s assert (pd.a, 3); 516s assert (pd.b, 5); 516s ***** test 516s pd = makedist ("binomial"); 516s assert (class (pd), "BinomialDistribution"); 516s assert (pd.N, 1); 516s assert (pd.p, 0.5); 517s ***** test 517s pd = makedist ("binomial", "N", 5); 517s assert (pd.N, 5); 517s assert (pd.p, 0.5); 517s ***** test 517s pd = makedist ("binomial", "p", 0.2); 517s assert (pd.N, 1); 517s assert (pd.p, 0.2); 517s ***** test 517s pd = makedist ("binomial", "N", 3, "p", 0.3); 517s assert (pd.N, 3); 517s assert (pd.p, 0.3); 517s ***** test 517s pd = makedist ("birnbaumsaunders"); 517s assert (class (pd), "BirnbaumSaundersDistribution"); 517s assert (pd.beta, 1); 517s assert (pd.gamma, 1); 517s ***** test 517s pd = makedist ("birnbaumsaunders", "beta", 5); 517s assert (pd.beta, 5); 517s assert (pd.gamma, 1); 517s ***** test 517s pd = makedist ("birnbaumsaunders", "gamma", 5); 517s assert (pd.beta, 1); 517s assert (pd.gamma, 5); 517s ***** test 517s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 517s assert (pd.beta, 3); 517s assert (pd.gamma, 5); 517s ***** test 517s pd = makedist ("burr"); 517s assert (class (pd), "BurrDistribution"); 517s assert (pd.alpha, 1); 517s assert (pd.c, 1); 517s assert (pd.k, 1); 517s ***** test 517s pd = makedist ("burr", "k", 5); 517s assert (pd.alpha, 1); 517s assert (pd.c, 1); 517s assert (pd.k, 5); 517s ***** test 517s pd = makedist ("burr", "c", 5); 517s assert (pd.alpha, 1); 517s assert (pd.c, 5); 517s assert (pd.k, 1); 517s ***** test 517s pd = makedist ("burr", "alpha", 3, "c", 5); 517s assert (pd.alpha, 3); 517s assert (pd.c, 5); 517s assert (pd.k, 1); 517s ***** test 517s pd = makedist ("burr", "k", 3, "c", 5); 517s assert (pd.alpha, 1); 517s assert (pd.c, 5); 517s assert (pd.k, 3); 517s ***** test 517s pd = makedist ("exponential"); 517s assert (class (pd), "ExponentialDistribution"); 517s assert (pd.mu, 1); 517s ***** test 517s pd = makedist ("exponential", "mu", 5); 517s assert (pd.mu, 5); 517s ***** test 517s pd = makedist ("extremevalue"); 517s assert (class (pd), "ExtremeValueDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("extremevalue", "mu", 5); 517s assert (class (pd), "ExtremeValueDistribution"); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("ev", "sigma", 5); 517s assert (class (pd), "ExtremeValueDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("ev", "mu", -3, "sigma", 5); 517s assert (class (pd), "ExtremeValueDistribution"); 517s assert (pd.mu, -3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("gamma"); 517s assert (class (pd), "GammaDistribution"); 517s assert (pd.a, 1); 517s assert (pd.b, 1); 517s ***** test 517s pd = makedist ("gamma", "a", 5); 517s assert (pd.a, 5); 517s assert (pd.b, 1); 517s ***** test 517s pd = makedist ("gamma", "b", 5); 517s assert (pd.a, 1); 517s assert (pd.b, 5); 517s ***** test 517s pd = makedist ("gamma", "a", 3, "b", 5); 517s assert (pd.a, 3); 517s assert (pd.b, 5); 517s ***** test 517s pd = makedist ("GeneralizedExtremeValue"); 517s assert (class (pd), "GeneralizedExtremeValueDistribution"); 517s assert (pd.k, 0); 517s assert (pd.sigma, 1); 517s assert (pd.mu, 0); 517s ***** test 517s pd = makedist ("GeneralizedExtremeValue", "k", 5); 517s assert (pd.k, 5); 517s assert (pd.sigma, 1); 517s assert (pd.mu, 0); 517s ***** test 517s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 517s assert (pd.k, 0); 517s assert (pd.sigma, 5); 517s assert (pd.mu, 0); 517s ***** test 517s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 517s assert (pd.k, 3); 517s assert (pd.sigma, 5); 517s assert (pd.mu, 0); 517s ***** test 517s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 517s assert (pd.k, 0); 517s assert (pd.sigma, 5); 517s assert (pd.mu, 3); 517s ***** test 517s pd = makedist ("GeneralizedPareto"); 517s assert (class (pd), "GeneralizedParetoDistribution"); 517s assert (pd.k, 1); 517s assert (pd.sigma, 1); 517s assert (pd.theta, 1); 517s ***** test 517s pd = makedist ("GeneralizedPareto", "k", 5); 517s assert (pd.k, 5); 517s assert (pd.sigma, 1); 517s assert (pd.theta, 1); 517s ***** test 517s pd = makedist ("GeneralizedPareto", "sigma", 5); 517s assert (pd.k, 1); 517s assert (pd.sigma, 5); 517s assert (pd.theta, 1); 517s ***** test 517s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 517s assert (pd.k, 3); 517s assert (pd.sigma, 5); 517s assert (pd.theta, 1); 517s ***** test 517s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 517s assert (pd.k, 1); 517s assert (pd.sigma, 5); 517s assert (pd.theta, 3); 517s ***** test 517s pd = makedist ("HalfNormal"); 517s assert (class (pd), "HalfNormalDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("HalfNormal", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("HalfNormal", "sigma", 5); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 517s assert (pd.mu, 3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("InverseGaussian"); 517s assert (class (pd), "InverseGaussianDistribution"); 517s assert (pd.mu, 1); 517s assert (pd.lambda, 1); 517s ***** test 517s pd = makedist ("InverseGaussian", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.lambda, 1); 517s ***** test 517s pd = makedist ("InverseGaussian", "lambda", 5); 517s assert (pd.mu, 1); 517s assert (pd.lambda, 5); 517s ***** test 517s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 517s assert (pd.mu, 3); 517s assert (pd.lambda, 5); 517s ***** test 517s pd = makedist ("logistic"); 517s assert (class (pd), "LogisticDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("logistic", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("logistic", "sigma", 5); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("logistic", "mu", 3, "sigma", 5); 517s assert (pd.mu, 3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("loglogistic"); 517s assert (class (pd), "LoglogisticDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("loglogistic", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("loglogistic", "sigma", 5); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 517s assert (pd.mu, 3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("Lognormal"); 517s assert (class (pd), "LognormalDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Lognormal", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Lognormal", "sigma", 5); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 517s assert (pd.mu, -3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("Loguniform"); 517s assert (class (pd), "LoguniformDistribution"); 517s assert (pd.Lower, 1); 517s assert (pd.Upper, 4); 517s ***** test 517s pd = makedist ("Loguniform", "Lower", 2); 517s assert (pd.Lower, 2); 517s assert (pd.Upper, 4); 517s ***** test 517s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 517s assert (pd.Lower, 1); 517s assert (pd.Upper, 3); 517s ***** test 517s pd = makedist ("Multinomial"); 517s assert (class (pd), "MultinomialDistribution"); 517s assert (pd.Probabilities, [0.5, 0.5]); 517s ***** test 517s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 517s assert (class (pd), "MultinomialDistribution"); 517s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 517s ***** test 517s pd = makedist ("Nakagami"); 517s assert (class (pd), "NakagamiDistribution"); 517s assert (pd.mu, 1); 517s assert (pd.omega, 1); 517s ***** test 517s pd = makedist ("Nakagami", "mu", 5); 517s assert (class (pd), "NakagamiDistribution"); 517s assert (pd.mu, 5); 517s assert (pd.omega, 1); 517s ***** test 517s pd = makedist ("Nakagami", "omega", 0.3); 517s assert (class (pd), "NakagamiDistribution"); 517s assert (pd.mu, 1); 517s assert (pd.omega, 0.3); 517s ***** test 517s pd = makedist ("NegativeBinomial"); 517s assert (class (pd), "NegativeBinomialDistribution"); 517s assert (pd.R, 1); 517s assert (pd.P, 0.5); 517s ***** test 517s pd = makedist ("NegativeBinomial", "R", 5); 517s assert (class (pd), "NegativeBinomialDistribution"); 517s assert (pd.R, 5); 517s assert (pd.P, 0.5); 517s ***** test 517s pd = makedist ("NegativeBinomial", "p", 0.3); 517s assert (class (pd), "NegativeBinomialDistribution"); 517s assert (pd.R, 1); 517s assert (pd.P, 0.3); 517s ***** test 517s pd = makedist ("Normal"); 517s assert (class (pd), "NormalDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Normal", "mu", 5); 517s assert (class (pd), "NormalDistribution"); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Normal", "sigma", 5); 517s assert (class (pd), "NormalDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("Normal", "mu", -3, "sigma", 5); 517s assert (class (pd), "NormalDistribution"); 517s assert (pd.mu, -3); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("PiecewiseLinear"); 517s assert (class (pd), "PiecewiseLinearDistribution"); 517s assert (pd.x, [0; 1]); 517s assert (pd.Fx, [0; 1]); 517s ***** test 517s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 517s assert (pd.x, [0; 1; 2]); 517s assert (pd.Fx, [0; 0.5; 1]); 517s ***** test 517s pd = makedist ("Poisson"); 517s assert (class (pd), "PoissonDistribution"); 517s assert (pd.lambda, 1); 517s ***** test 517s pd = makedist ("Poisson", "lambda", 5); 517s assert (pd.lambda, 5); 517s ***** test 517s pd = makedist ("Rayleigh"); 517s assert (class (pd), "RayleighDistribution"); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Rayleigh", "sigma", 5); 517s assert (pd.sigma, 5); 517s ***** test 517s pd = makedist ("Rician"); 517s assert (class (pd), "RicianDistribution"); 517s assert (pd.s, 1); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Rician", "s", 3); 517s assert (pd.s, 3); 517s assert (pd.sigma, 1); 517s ***** test 517s pd = makedist ("Rician", "sigma", 3); 517s assert (pd.s, 1); 517s assert (pd.sigma, 3); 517s ***** test 517s pd = makedist ("Rician", "s", 2, "sigma", 3); 517s assert (pd.s, 2); 517s assert (pd.sigma, 3); 517s ***** warning 517s pd = makedist ("stable"); 517s assert (class (pd), "double"); 517s assert (isempty (pd), true); 517s ***** test 517s pd = makedist ("tlocationscale"); 517s assert (class (pd), "tLocationScaleDistribution"); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 1); 517s assert (pd.nu, 5); 517s ***** test 517s pd = makedist ("tlocationscale", "mu", 5); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 1); 517s assert (pd.nu, 5); 517s ***** test 517s pd = makedist ("tlocationscale", "sigma", 2); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 2); 517s assert (pd.nu, 5); 517s ***** test 517s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 517s assert (pd.mu, 5); 517s assert (pd.sigma, 2); 517s assert (pd.nu, 5); 517s ***** test 517s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 517s assert (pd.mu, 0); 517s assert (pd.sigma, 2); 517s assert (pd.nu, 1); 517s ***** test 517s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 517s assert (pd.mu, -2); 517s assert (pd.sigma, 3); 517s assert (pd.nu, 1); 517s ***** test 517s pd = makedist ("Triangular"); 517s assert (class (pd), "TriangularDistribution"); 517s assert (pd.A, 0); 517s assert (pd.B, 0.5); 517s assert (pd.C, 1); 517s ***** test 517s pd = makedist ("Triangular", "A", -2); 517s assert (pd.A, -2); 517s assert (pd.B, 0.5); 517s assert (pd.C, 1); 517s ***** test 517s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 517s assert (pd.A, 0.5); 517s assert (pd.B, 0.9); 517s assert (pd.C, 1); 517s ***** test 517s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 517s assert (pd.A, 1); 517s assert (pd.B, 2); 517s assert (pd.C, 5); 517s ***** test 517s pd = makedist ("Uniform"); 517s assert (class (pd), "UniformDistribution"); 517s assert (pd.Lower, 0); 517s assert (pd.Upper, 1); 517s ***** test 517s pd = makedist ("Uniform", "Lower", -2); 517s assert (pd.Lower, -2); 517s assert (pd.Upper, 1); 517s ***** test 517s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 517s assert (pd.Lower, 1); 517s assert (pd.Upper, 3); 517s ***** test 517s pd = makedist ("Weibull"); 517s assert (class (pd), "WeibullDistribution"); 517s assert (pd.lambda, 1); 517s assert (pd.k, 1); 517s ***** test 517s pd = makedist ("Weibull", "lambda", 3); 517s assert (pd.lambda, 3); 517s assert (pd.k, 1); 517s ***** test 517s pd = makedist ("Weibull", "lambda", 3, "k", 2); 517s assert (pd.lambda, 3); 517s assert (pd.k, 2); 517s ***** error makedist (1) 517s ***** error makedist (["as";"sd"]) 517s ***** error makedist ("some") 517s ***** error ... 517s makedist ("Beta", "a") 517s ***** error ... 517s makedist ("Beta", "a", 1, "Q", 23) 517s ***** error ... 517s makedist ("Binomial", "N", 1, "Q", 23) 517s ***** error ... 517s makedist ("BirnbaumSaunders", "N", 1) 517s ***** error ... 517s makedist ("Burr", "lambda", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("extremevalue", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("exponential", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Gamma", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("HalfNormal", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Logistic", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Loglogistic", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Lognormal", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Loguniform", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Multinomial", "k", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Nakagami", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Normal", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Poisson", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Rician", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Stable", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Triangular", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Uniform", "mu", 1, "sdfs", 34) 517s ***** error ... 517s makedist ("Weibull", "mu", 1, "sdfs", 34) 517s 131 tests, 131 passed, 0 known failure, 0 skipped 517s [inst/dist_wrap/icdf.m] 517s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/icdf.m 517s ***** shared p 517s p = [0.05:0.05:0.5]; 517s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 517s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 517s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 517s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 517s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 517s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 517s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 517s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 517s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 517s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 517s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 517s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 517s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 517s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 517s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 517s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 517s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 517s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 517s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 517s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 517s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 517s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 517s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 517s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 517s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 517s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 517s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 517s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 517s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 517s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 517s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 517s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 517s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 517s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 517s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 517s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 517s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 517s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 517s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 517s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 517s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 517s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 517s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 517s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 517s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 517s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 517s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 517s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 517s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 518s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 518s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 518s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 519s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 519s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 519s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 519s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 519s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 519s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 519s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 519s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 520s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 520s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 520s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 520s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 520s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 520s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 520s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 520s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 520s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 520s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 520s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 525s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 530s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 530s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 530s ***** error icdf (1) 530s ***** error icdf ({"beta"}) 530s ***** error icdf ("beta", {[1 2 3 4 5]}) 530s ***** error icdf ("beta", "text") 530s ***** error icdf ("beta", 1+i) 530s ***** error ... 530s icdf ("Beta", p, "a", 2) 530s ***** error ... 530s icdf ("Beta", p, 5, "") 530s ***** error ... 530s icdf ("Beta", p, 5, {2}) 530s ***** error icdf ("chi2", p) 530s ***** error icdf ("Beta", p, 5) 530s ***** error icdf ("Burr", p, 5) 530s ***** error icdf ("Burr", p, 5, 2) 530s 86 tests, 86 passed, 0 known failure, 0 skipped 530s [inst/dist_wrap/pdf.m] 530s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/pdf.m 530s ***** shared x 530s x = [1:5]; 530s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 530s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 530s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 530s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 530s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 530s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 530s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 530s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 530s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 530s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 530s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 530s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 530s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 530s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 530s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 530s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 530s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 530s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 530s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 530s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 530s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 530s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 530s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 530s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 530s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 530s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 530s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 530s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 530s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 530s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 531s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 531s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 531s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 531s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 531s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 531s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 531s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 531s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 531s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 531s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 531s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 531s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 531s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 531s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 531s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 531s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 531s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 531s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 531s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 531s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 531s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 531s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 531s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 531s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 531s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 531s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 531s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 531s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 531s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 531s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 531s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 531s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 531s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 531s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 531s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 531s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 531s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 531s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 531s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 531s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 531s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 531s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 531s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 531s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 531s ***** error pdf (1) 531s ***** error pdf ({"beta"}) 531s ***** error pdf ("beta", {[1 2 3 4 5]}) 531s ***** error pdf ("beta", "text") 531s ***** error pdf ("beta", 1+i) 531s ***** error ... 531s pdf ("Beta", x, "a", 2) 531s ***** error ... 531s pdf ("Beta", x, 5, "") 531s ***** error ... 531s pdf ("Beta", x, 5, {2}) 531s ***** error pdf ("chi2", x) 531s ***** error pdf ("Beta", x, 5) 531s ***** error pdf ("Burr", x, 5) 531s ***** error pdf ("Burr", x, 5, 2) 531s 86 tests, 86 passed, 0 known failure, 0 skipped 531s [inst/dist_wrap/random.m] 531s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/random.m 531s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 531s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 531s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 531s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 531s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 531s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 531s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 531s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 531s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 531s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 531s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 531s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 531s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 531s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 531s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 531s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 531s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 531s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 531s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 531s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 531s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 531s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 531s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 531s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 531s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 531s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 531s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 531s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 531s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 531s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 531s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 531s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 531s ***** error random (1) 531s ***** error random ({"beta"}) 531s ***** error ... 531s random ("Beta", "a", 2) 531s ***** error ... 531s random ("Beta", 5, "") 531s ***** error ... 531s random ("Beta", 5, {2}) 531s ***** error ... 531s random ("Beta", "a", 2, 2, 10) 531s ***** error ... 531s random ("Beta", 5, "", 2, 10) 531s ***** error ... 531s random ("Beta", 5, {2}, 2, 10) 531s ***** error ... 531s random ("Beta", 5, "", 2, 10) 531s ***** error random ("chi2") 531s ***** error random ("Beta", 5) 531s ***** error random ("Burr", 5) 531s ***** error random ("Burr", 5, 2) 531s 87 tests, 87 passed, 0 known failure, 0 skipped 531s [inst/dist_wrap/fitdist.m] 531s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/fitdist.m 531s ***** test 531s x = betarnd (1, 1, 100, 1); 531s pd = fitdist (x, "Beta"); 531s [phat, pci] = betafit (x); 531s assert ([pd.a, pd.b], phat); 531s assert (paramci (pd), pci); 531s ***** test 531s x1 = betarnd (1, 1, 100, 1); 531s x2 = betarnd (5, 2, 100, 1); 531s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 531s [phat, pci] = betafit (x1); 531s assert ([pd(1).a, pd(1).b], phat); 531s assert (paramci (pd(1)), pci); 531s [phat, pci] = betafit (x2); 531s assert ([pd(2).a, pd(2).b], phat); 531s assert (paramci (pd(2)), pci); 531s ***** test 531s N = 1; 531s x = binornd (N, 0.5, 100, 1); 531s pd = fitdist (x, "binomial"); 531s [phat, pci] = binofit (sum (x), numel (x)); 531s assert ([pd.N, pd.p], [N, phat]); 531s assert (paramci (pd), pci); 531s ***** test 531s N = 3; 531s x = binornd (N, 0.4, 100, 1); 531s pd = fitdist (x, "binomial", "ntrials", N); 531s [phat, pci] = binofit (sum (x), numel (x) * N); 531s assert ([pd.N, pd.p], [N, phat]); 531s assert (paramci (pd), pci); 531s ***** test 531s N = 1; 531s x1 = binornd (N, 0.5, 100, 1); 531s x2 = binornd (N, 0.7, 100, 1); 531s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 531s [phat, pci] = binofit (sum (x1), numel (x1)); 531s assert ([pd(1).N, pd(1).p], [N, phat]); 531s assert (paramci (pd(1)), pci); 531s [phat, pci] = binofit (sum (x2), numel (x2)); 531s assert ([pd(2).N, pd(2).p], [N, phat]); 531s assert (paramci (pd(2)), pci); 531s ***** test 531s N = 5; 531s x1 = binornd (N, 0.5, 100, 1); 531s x2 = binornd (N, 0.8, 100, 1); 531s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 531s "By", [ones(100,1); 2*ones(100,1)]); 531s [phat, pci] = binofit (sum (x1), numel (x1) * N); 531s assert ([pd(1).N, pd(1).p], [N, phat]); 531s assert (paramci (pd(1)), pci); 531s [phat, pci] = binofit (sum (x2), numel (x2) * N); 531s assert ([pd(2).N, pd(2).p], [N, phat]); 531s assert (paramci (pd(2)), pci); 532s ***** test 532s x = bisarnd (1, 1, 100, 1); 532s pd = fitdist (x, "BirnbaumSaunders"); 532s [phat, pci] = bisafit (x); 532s assert ([pd.beta, pd.gamma], phat); 532s assert (paramci (pd), pci); 532s ***** test 532s x1 = bisarnd (1, 1, 100, 1); 532s x2 = bisarnd (5, 2, 100, 1); 532s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 532s [phat, pci] = bisafit (x1); 532s assert ([pd(1).beta, pd(1).gamma], phat); 532s assert (paramci (pd(1)), pci); 532s [phat, pci] = bisafit (x2); 532s assert ([pd(2).beta, pd(2).gamma], phat); 532s assert (paramci (pd(2)), pci); 532s ***** test 532s x = burrrnd (1, 2, 1, 100, 1); 532s pd = fitdist (x, "Burr"); 532s [phat, pci] = burrfit (x); 532s assert ([pd.alpha, pd.c, pd.k], phat); 532s assert (paramci (pd), pci); 532s ***** xtest 532s x1 = burrrnd (1, 2, 1, 100, 1); 532s x2 = burrrnd (1, 0.5, 2, 100, 1); 532s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 532s [phat, pci] = burrfit (x1); 532s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 532s assert (paramci (pd(1)), pci); 532s [phat, pci] = burrfit (x2); 532s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 532s assert (paramci (pd(2)), pci); 533s ***** test 533s x = exprnd (1, 100, 1); 533s pd = fitdist (x, "exponential"); 533s [muhat, muci] = expfit (x); 533s assert ([pd.mu], muhat); 533s assert (paramci (pd), muci); 533s ***** test 533s x1 = exprnd (1, 100, 1); 533s x2 = exprnd (5, 100, 1); 533s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 533s [muhat, muci] = expfit (x1); 533s assert ([pd(1).mu], muhat); 533s assert (paramci (pd(1)), muci); 533s [muhat, muci] = expfit (x2); 533s assert ([pd(2).mu], muhat); 533s assert (paramci (pd(2)), muci); 533s ***** test 533s x = evrnd (1, 1, 100, 1); 533s pd = fitdist (x, "ev"); 533s [phat, pci] = evfit (x); 533s assert ([pd.mu, pd.sigma], phat); 533s assert (paramci (pd), pci); 533s ***** test 533s x1 = evrnd (1, 1, 100, 1); 533s x2 = evrnd (5, 2, 100, 1); 533s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 533s [phat, pci] = evfit (x1); 533s assert ([pd(1).mu, pd(1).sigma], phat); 533s assert (paramci (pd(1)), pci); 533s [phat, pci] = evfit (x2); 533s assert ([pd(2).mu, pd(2).sigma], phat); 533s assert (paramci (pd(2)), pci); 533s ***** test 533s x = gamrnd (1, 1, 100, 1); 533s pd = fitdist (x, "Gamma"); 533s [phat, pci] = gamfit (x); 533s assert ([pd.a, pd.b], phat); 533s assert (paramci (pd), pci); 533s ***** test 533s x1 = gamrnd (1, 1, 100, 1); 533s x2 = gamrnd (5, 2, 100, 1); 533s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 533s [phat, pci] = gamfit (x1); 533s assert ([pd(1).a, pd(1).b], phat); 533s assert (paramci (pd(1)), pci); 533s [phat, pci] = gamfit (x2); 533s assert ([pd(2).a, pd(2).b], phat); 533s assert (paramci (pd(2)), pci); 533s ***** test 533s rand ("seed", 4); # for reproducibility 533s x = gevrnd (-0.5, 1, 2, 1000, 1); 533s pd = fitdist (x, "generalizedextremevalue"); 533s [phat, pci] = gevfit (x); 533s assert ([pd.k, pd.sigma, pd.mu], phat); 533s assert (paramci (pd), pci); 533s ***** test 533s rand ("seed", 5); # for reproducibility 533s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 533s rand ("seed", 9); # for reproducibility 533s x2 = gevrnd (0, 1, -4, 1000, 1); 533s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 533s [phat, pci] = gevfit (x1); 533s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 533s assert (paramci (pd(1)), pci); 533s [phat, pci] = gevfit (x2); 533s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 533s assert (paramci (pd(2)), pci); 534s ***** test 534s x = gprnd (1, 1, 1, 100, 1); 534s pd = fitdist (x, "GeneralizedPareto"); 534s [phat, pci] = gpfit (x, 1); 534s assert ([pd.k, pd.sigma, pd.theta], phat); 534s assert (paramci (pd), pci); 534s ***** test 534s x = gprnd (1, 1, 2, 100, 1); 534s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 534s [phat, pci] = gpfit (x, 2); 534s assert ([pd.k, pd.sigma, pd.theta], phat); 534s assert (paramci (pd), pci); 534s ***** test 534s x1 = gprnd (1, 1, 1, 100, 1); 534s x2 = gprnd (0, 2, 1, 100, 1); 534s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 534s [phat, pci] = gpfit (x1, 1); 534s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 534s assert (paramci (pd(1)), pci); 534s [phat, pci] = gpfit (x2, 1); 534s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 534s assert (paramci (pd(2)), pci); 534s ***** test 534s x1 = gprnd (3, 2, 2, 100, 1); 534s x2 = gprnd (2, 3, 2, 100, 1); 534s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 534s "By", [ones(100,1); 2*ones(100,1)]); 534s [phat, pci] = gpfit (x1, 2); 534s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 534s assert (paramci (pd(1)), pci); 534s [phat, pci] = gpfit (x2, 2); 534s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 534s assert (paramci (pd(2)), pci); 534s ***** test 534s x = hnrnd (0, 1, 100, 1); 534s pd = fitdist (x, "HalfNormal"); 534s [phat, pci] = hnfit (x, 0); 534s assert ([pd.mu, pd.sigma], phat); 534s assert (paramci (pd), pci); 534s ***** test 534s x = hnrnd (1, 1, 100, 1); 534s pd = fitdist (x, "HalfNormal", "mu", 1); 534s [phat, pci] = hnfit (x, 1); 534s assert ([pd.mu, pd.sigma], phat); 534s assert (paramci (pd), pci); 534s ***** test 534s x1 = hnrnd (0, 1, 100, 1); 534s x2 = hnrnd (0, 2, 100, 1); 534s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 534s [phat, pci] = hnfit (x1, 0); 534s assert ([pd(1).mu, pd(1).sigma], phat); 534s assert (paramci (pd(1)), pci); 534s [phat, pci] = hnfit (x2, 0); 534s assert ([pd(2).mu, pd(2).sigma], phat); 534s assert (paramci (pd(2)), pci); 535s ***** test 535s x1 = hnrnd (2, 1, 100, 1); 535s x2 = hnrnd (2, 2, 100, 1); 535s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 535s "By", [ones(100,1); 2*ones(100,1)]); 535s [phat, pci] = hnfit (x1, 2); 535s assert ([pd(1).mu, pd(1).sigma], phat); 535s assert (paramci (pd(1)), pci); 535s [phat, pci] = hnfit (x2, 2); 535s assert ([pd(2).mu, pd(2).sigma], phat); 535s assert (paramci (pd(2)), pci); 535s ***** test 535s x = invgrnd (1, 1, 100, 1); 535s pd = fitdist (x, "InverseGaussian"); 535s [phat, pci] = invgfit (x); 535s assert ([pd.mu, pd.lambda], phat); 535s assert (paramci (pd), pci); 535s ***** test 535s x1 = invgrnd (1, 1, 100, 1); 535s x2 = invgrnd (5, 2, 100, 1); 535s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 535s [phat, pci] = invgfit (x1); 535s assert ([pd(1).mu, pd(1).lambda], phat); 535s assert (paramci (pd(1)), pci); 535s [phat, pci] = invgfit (x2); 535s assert ([pd(2).mu, pd(2).lambda], phat); 535s assert (paramci (pd(2)), pci); 535s ***** test 535s x = logirnd (1, 1, 100, 1); 535s pd = fitdist (x, "logistic"); 535s [phat, pci] = logifit (x); 535s assert ([pd.mu, pd.sigma], phat); 535s assert (paramci (pd), pci); 535s ***** test 535s x1 = logirnd (1, 1, 100, 1); 535s x2 = logirnd (5, 2, 100, 1); 535s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 535s [phat, pci] = logifit (x1); 535s assert ([pd(1).mu, pd(1).sigma], phat); 535s assert (paramci (pd(1)), pci); 535s [phat, pci] = logifit (x2); 535s assert ([pd(2).mu, pd(2).sigma], phat); 535s assert (paramci (pd(2)), pci); 535s ***** test 535s x = loglrnd (1, 1, 100, 1); 535s pd = fitdist (x, "loglogistic"); 535s [phat, pci] = loglfit (x); 535s assert ([pd.mu, pd.sigma], phat); 535s assert (paramci (pd), pci); 535s ***** test 535s x1 = loglrnd (1, 1, 100, 1); 535s x2 = loglrnd (5, 2, 100, 1); 535s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 535s [phat, pci] = loglfit (x1); 535s assert ([pd(1).mu, pd(1).sigma], phat); 535s assert (paramci (pd(1)), pci); 535s [phat, pci] = loglfit (x2); 535s assert ([pd(2).mu, pd(2).sigma], phat); 535s assert (paramci (pd(2)), pci); 535s ***** test 535s x = lognrnd (1, 1, 100, 1); 535s pd = fitdist (x, "lognormal"); 535s [phat, pci] = lognfit (x); 535s assert ([pd.mu, pd.sigma], phat); 535s assert (paramci (pd), pci); 536s ***** test 536s x1 = lognrnd (1, 1, 100, 1); 536s x2 = lognrnd (5, 2, 100, 1); 536s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 536s [phat, pci] = lognfit (x1); 536s assert ([pd(1).mu, pd(1).sigma], phat); 536s assert (paramci (pd(1)), pci); 536s [phat, pci] = lognfit (x2); 536s assert ([pd(2).mu, pd(2).sigma], phat); 536s assert (paramci (pd(2)), pci); 536s ***** test 536s x = nakarnd (2, 0.5, 100, 1); 536s pd = fitdist (x, "Nakagami"); 536s [phat, pci] = nakafit (x); 536s assert ([pd.mu, pd.omega], phat); 536s assert (paramci (pd), pci); 536s ***** test 536s x1 = nakarnd (2, 0.5, 100, 1); 536s x2 = nakarnd (5, 0.8, 100, 1); 536s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 536s [phat, pci] = nakafit (x1); 536s assert ([pd(1).mu, pd(1).omega], phat); 536s assert (paramci (pd(1)), pci); 536s [phat, pci] = nakafit (x2); 536s assert ([pd(2).mu, pd(2).omega], phat); 536s assert (paramci (pd(2)), pci); 536s ***** test 536s randp ("seed", 123); 536s randg ("seed", 321); 536s x = nbinrnd (2, 0.5, 100, 1); 536s pd = fitdist (x, "negativebinomial"); 536s [phat, pci] = nbinfit (x); 536s assert ([pd.R, pd.P], phat); 536s assert (paramci (pd), pci); 536s ***** test 536s randp ("seed", 345); 536s randg ("seed", 543); 536s x1 = nbinrnd (2, 0.5, 100, 1); 536s randp ("seed", 432); 536s randg ("seed", 234); 536s x2 = nbinrnd (5, 0.8, 100, 1); 536s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 536s [phat, pci] = nbinfit (x1); 536s assert ([pd(1).R, pd(1).P], phat); 536s assert (paramci (pd(1)), pci); 536s [phat, pci] = nbinfit (x2); 536s assert ([pd(2).R, pd(2).P], phat); 536s assert (paramci (pd(2)), pci); 536s ***** test 536s x = normrnd (1, 1, 100, 1); 536s pd = fitdist (x, "normal"); 536s [muhat, sigmahat, muci, sigmaci] = normfit (x); 536s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 536s assert (paramci (pd), [muci, sigmaci]); 536s ***** test 536s x1 = normrnd (1, 1, 100, 1); 536s x2 = normrnd (5, 2, 100, 1); 536s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 536s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 536s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 536s assert (paramci (pd(1)), [muci, sigmaci]); 536s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 536s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 536s assert (paramci (pd(2)), [muci, sigmaci]); 537s ***** test 537s x = poissrnd (1, 100, 1); 537s pd = fitdist (x, "poisson"); 537s [phat, pci] = poissfit (x); 537s assert (pd.lambda, phat); 537s assert (paramci (pd), pci); 537s ***** test 537s x1 = poissrnd (1, 100, 1); 537s x2 = poissrnd (5, 100, 1); 537s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 537s [phat, pci] = poissfit (x1); 537s assert (pd(1).lambda, phat); 537s assert (paramci (pd(1)), pci); 537s [phat, pci] = poissfit (x2); 537s assert (pd(2).lambda, phat); 537s assert (paramci (pd(2)), pci); 537s ***** test 537s x = raylrnd (1, 100, 1); 537s pd = fitdist (x, "rayleigh"); 537s [phat, pci] = raylfit (x); 537s assert (pd.sigma, phat); 537s assert (paramci (pd), pci); 537s ***** test 537s x1 = raylrnd (1, 100, 1); 537s x2 = raylrnd (5, 100, 1); 537s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 537s [phat, pci] = raylfit (x1); 537s assert ( pd(1).sigma, phat); 537s assert (paramci (pd(1)), pci); 537s [phat, pci] = raylfit (x2); 537s assert (pd(2).sigma, phat); 537s assert (paramci (pd(2)), pci); 537s ***** test 537s x = ricernd (1, 1, 100, 1); 537s pd = fitdist (x, "rician"); 537s [phat, pci] = ricefit (x); 537s assert ([pd.s, pd.sigma], phat); 537s assert (paramci (pd), pci); 537s ***** test 537s x1 = ricernd (1, 1, 100, 1); 537s x2 = ricernd (5, 2, 100, 1); 537s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 537s [phat, pci] = ricefit (x1); 537s assert ([pd(1).s, pd(1).sigma], phat); 537s assert (paramci (pd(1)), pci); 537s [phat, pci] = ricefit (x2); 537s assert ([pd(2).s, pd(2).sigma], phat); 537s assert (paramci (pd(2)), pci); 537s ***** warning ... 537s fitdist ([1 2 3 4 5], "Stable"); 537s ***** test 537s x = tlsrnd (0, 1, 1, 100, 1); 537s pd = fitdist (x, "tlocationscale"); 537s [phat, pci] = tlsfit (x); 537s assert ([pd.mu, pd.sigma, pd.nu], phat); 537s assert (paramci (pd), pci); 538s ***** test 538s x1 = tlsrnd (0, 1, 1, 100, 1); 538s x2 = tlsrnd (5, 2, 1, 100, 1); 538s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 538s [phat, pci] = tlsfit (x1); 538s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 538s assert (paramci (pd(1)), pci); 538s [phat, pci] = tlsfit (x2); 538s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 538s assert (paramci (pd(2)), pci); 538s ***** test 538s x = [1 2 3 4 5]; 538s pd = fitdist (x, "weibull"); 538s [phat, pci] = wblfit (x); 538s assert ([pd.lambda, pd.k], phat); 538s assert (paramci (pd), pci); 538s ***** test 538s x = [1 2 3 4 5 6 7 8 9 10]; 538s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 538s [phat, pci] = wblfit (x(1:5)); 538s assert ([pd(1).lambda, pd(1).k], phat); 538s assert (paramci (pd(1)), pci); 538s [phat, pci] = wblfit (x(6:10)); 538s assert ([pd(2).lambda, pd(2).k], phat); 538s assert (paramci (pd(2)), pci); 538s ***** error fitdist (1) 538s ***** error fitdist (1, ["as";"sd"]) 538s ***** error fitdist (1, "some") 538s ***** error ... 538s fitdist (ones (2), "normal") 538s ***** error ... 538s fitdist ([i, 2, 3], "normal") 538s ***** error ... 538s fitdist (["a", "s", "d"], "normal") 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "By") 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 538s ***** error ... 538s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "alpha", i) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "ntrials", 0) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "options", 0) 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 538s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 538s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 538s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 538s ***** error ... 538s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 538s ***** error ... 538s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 538s ***** error ... 538s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 538s ***** error ... 538s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 538s 77 tests, 77 passed, 0 known failure, 0 skipped 538s [inst/dist_wrap/mle.m] 538s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/mle.m 538s ***** error mle (ones (2)) 538s ***** error mle ("text") 538s ***** error mle ([1, 2, 3, i, 5]) 538s ***** error ... 538s mle ([1:50], "distribution") 538s ***** error ... 538s mle ([1:50], "censoring", logical ([1,0,1,0])) 538s ***** error ... 538s mle ([1:50], "frequency", [1,0,1,0]) 538s ***** error ... 538s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 538s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 538s ***** error mle ([1:50], "alpha", 1) 538s ***** error mle ([1:50], "alpha", -1) 538s ***** error mle ([1:50], "alpha", i) 538s ***** error ... 538s mle ([1:50], "ntrials", -1) 538s ***** error ... 538s mle ([1:50], "ntrials", [20, 50]) 538s ***** error ... 538s mle ([1:50], "ntrials", [20.3]) 538s ***** error ... 538s mle ([1:50], "ntrials", 3i) 538s ***** error ... 538s mle ([1:50], "options", 4) 538s ***** error ... 538s mle ([1:50], "options", struct ("x", 3)) 538s ***** error mle ([1:50], "NAME", "value") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 2 1 0], "distribution", "bernoulli") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "bino") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 -1 0], "distribution", "gp") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 -1 0], "distribution", "hn") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 538s ***** error mle ([1:50], "distribution", "value") 538s ***** error ... 538s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 538s 36 tests, 36 passed, 0 known failure, 0 skipped 538s [inst/dist_wrap/cdf.m] 538s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_wrap/cdf.m 538s ***** shared x 538s x = [1:5]; 538s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 538s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 538s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 538s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 538s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 538s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 538s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 538s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 538s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 538s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 538s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 538s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 538s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 538s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 538s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 538s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 538s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 538s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 538s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 538s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 538s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 538s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 538s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 538s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 538s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 538s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 538s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 538s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 538s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 538s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 538s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 538s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 538s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 538s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 538s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 538s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 538s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 538s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 538s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 538s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 538s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 538s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 538s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 538s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 538s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 538s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 538s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 539s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 539s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 539s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 539s ***** error cdf (1) 539s ***** error cdf ({"beta"}) 539s ***** error cdf ("beta", {[1 2 3 4 5]}) 539s ***** error cdf ("beta", "text") 539s ***** error cdf ("beta", 1+i) 539s ***** error ... 539s cdf ("Beta", x, "a", 2) 539s ***** error ... 539s cdf ("Beta", x, 5, "") 539s ***** error ... 539s cdf ("Beta", x, 5, {2}) 539s ***** error cdf ("chi2", x) 539s ***** error cdf ("Beta", x, 5) 539s ***** error cdf ("Burr", x, 5) 539s ***** error cdf ("Burr", x, 5, 2) 539s 86 tests, 86 passed, 0 known failure, 0 skipped 539s [inst/x2fx.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/x2fx.m 539s ***** test 539s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 539s D = x2fx(X,'quadratic'); 539s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 539s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 539s ***** test 539s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 539s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 539s D = x2fx(X,model); 539s assert (D(1,:) , [1, 1, 10, 10, 1]); 539s assert (D(2,:) , [1, 2, 20, 40, 4]); 539s assert (D(4,:) , [1, 4, 20, 80, 16]); 539s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 539s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 539s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 539s 5 tests, 5 passed, 0 known failure, 0 skipped 539s [inst/barttest.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/barttest.m 539s ***** error barttest () 539s ***** error barttest ([2,NaN;3,4]) 539s ***** error barttest (ones (30, 4), "alpha") 539s ***** error barttest (ones (30, 4), 0) 539s ***** error barttest (ones (30, 4), 1.2) 539s ***** error barttest (ones (30, 4), [0.2, 0.05]) 539s ***** error barttest (ones (30, 1)) 539s ***** error barttest (ones (30, 1), 0.05) 539s ***** test 539s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 539s [ndim, pval, chisq] = barttest (x); 539s assert (ndim, 2); 539s assert (pval, 0); 539s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 539s ***** test 539s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 539s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 539s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 539s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 539s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 539s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 539s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 539s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 539s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 539s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 539s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 539s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 539s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 539s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 539s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 539s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 539s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 539s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 539s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 539s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 539s [ndim, pval, chisq] = barttest (x); 539s assert (ndim, 3); 539s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 539s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 539s assert (chisq, chisq_out, 1e-4); 539s 10 tests, 10 passed, 0 known failure, 0 skipped 539s [inst/ismissing.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ismissing.m 539s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 539s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 539s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 539s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 539s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 539s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 539s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 539s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 539s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 539s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 539s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 539s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 539s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 539s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 539s ***** assert (ismissing (double (NaN)), true) 539s ***** assert (ismissing (single (NaN)), true) 539s ***** assert (ismissing (' '), true) 539s ***** assert (ismissing ({''}), true) 539s ***** assert (ismissing ({' '}), false) 539s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 539s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 539s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 539s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 539s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 539s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 539s ***** assert (ismissing ({'123', '', 123}), [false false false]) 539s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 539s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 539s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 539s ***** assert (ismissing ({1, 2, 3}), [false false false]) 539s ***** assert (ismissing ([struct struct struct]), [false false false]) 539s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 539s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 539s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 539s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 539s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 539s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 539s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 539s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 539s ***** assert (ismissing ([]), logical([])) 539s ***** assert (ismissing (''), logical([])) 539s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 539s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 539s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 539s ***** error ismissing () 539s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 539s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 539s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 539s ***** error ismissing (struct, 1) 539s 49 tests, 49 passed, 0 known failure, 0 skipped 539s [inst/gmdistribution.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/gmdistribution.m 539s ***** test 539s mu = eye(2); 539s Sigma = eye(2); 539s GM = gmdistribution (mu, Sigma); 539s density = GM.pdf ([0 0; 1 1]); 539s assert (density(1) - density(2), 0, 1e-6); 539s 539s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 539s assert (idx, [1; 2]); 539s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 539s assert (nlogl - nlogl2, 0, 1e-6); 539s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 539s assert (P - P3, zeros (2), 1e-6); 539s [idx4,nlogl4] = cluster (GM, eye(2)); 539s assert (size (nlogl4), [1 1]); 539s idx5 = cluster (GM, eye(2)); 539s assert (idx - idx5, zeros (2,1)); 539s 539s D = GM.mahal ([1;0]); 539s assert (D - M(1,:), zeros (1,2), 1e-6); 539s 539s P = GM.posterior ([0 1]); 539s assert (P - P2(2,:), zeros (1,2), 1e-6); 539s 539s R = GM.random(20); 539s assert (size(R), [20, 2]); 539s 539s R = GM.random(); 539s assert (size(R), [1, 2]); 539s 1 test, 1 passed, 0 known failure, 0 skipped 539s [inst/fitcknn.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitcknn.m 539s ***** demo 539s ## Train a k-nearest neighbor classifier for k = 10 539s ## and plot the decision boundaries. 539s 539s load fisheriris 539s idx = ! strcmp (species, "setosa"); 539s X = meas(idx,3:4); 539s Y = cast (strcmpi (species(idx), "virginica"), "double"); 539s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 539s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 539s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 539s [x1G, x2G] = meshgrid (x1, x2); 539s XGrid = [x1G(:), x2G(:)]; 539s pred = predict (obj, XGrid); 539s gidx = logical (str2num (cell2mat (pred))); 539s 539s figure 539s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 539s hold on 539s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 539s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 539s xlabel ("Petal length (cm)"); 539s ylabel ("Petal width (cm)"); 539s title ("5-Nearest Neighbor Classifier Decision Boundary"); 539s legend ({"Versicolor Region", "Virginica Region", ... 539s "Sampled Versicolor", "Sampled Virginica"}, ... 539s "location", "northwest") 539s axis tight 539s hold off 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "NSMethod", "exhaustive"); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s k = 10; 539s a = fitcknn (x, y, "NumNeighbors" ,k); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = ones (4, 11); 539s y = ["a"; "a"; "b"; "b"]; 539s k = 10; 539s a = fitcknn (x, y, "NumNeighbors" ,k); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s k = 10; 539s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s k = 10; 539s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s weights = ones (4,1); 539s a = fitcknn (x, y, "Standardize", 1); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.Standardize}, {true}) 539s assert ({a.Sigma}, {std(x, [], 1)}) 539s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s weights = ones (4,1); 539s a = fitcknn (x, y, "Standardize", false); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.Standardize}, {false}) 539s assert ({a.Sigma}, {[]}) 539s assert ({a.Mu}, {[]}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s s = ones (1, 3); 539s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.DistParameter}, {s}) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 539s assert (class (a), "ClassificationKNN"); 539s assert (a.DistParameter, 5) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 539s "NSMethod", "exhaustive"); 539s assert (class (a), "ClassificationKNN"); 539s assert (a.DistParameter, 5) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 539s assert (class (a), "ClassificationKNN"); 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 539s assert ({a.BucketSize}, {20}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "IncludeTies", true); 539s assert (class (a), "ClassificationKNN"); 539s assert (a.IncludeTies, true); 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y); 539s assert (class (a), "ClassificationKNN"); 539s assert (a.IncludeTies, false); 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Prior, [0.5; 0.5]) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s prior = [0.5; 0.5]; 539s a = fitcknn (x, y, "Prior", "empirical"); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Prior, prior) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "a"; "b"]; 539s prior = [0.75; 0.25]; 539s a = fitcknn (x, y, "Prior", "empirical"); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Prior, prior) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "a"; "b"]; 539s prior = [0.5; 0.5]; 539s a = fitcknn (x, y, "Prior", "uniform"); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Prior, prior) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s cost = eye (2); 539s a = fitcknn (x, y, "Cost", cost); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Cost, [1, 0; 0, 1]) 539s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s cost = eye (2); 539s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 539s assert (class (a), "ClassificationKNN") 539s assert (a.Cost, [1, 0; 0, 1]) 539s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 539s assert ({a.BucketSize}, {50}) 539s ***** test 539s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 539s y = ["a"; "a"; "b"; "b"]; 539s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 539s assert (class (a), "ClassificationPartitionedModel"); 539s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 539s assert (a.ModelParameters.NSMethod, "exhaustive") 539s assert (a.ModelParameters.Distance, "euclidean") 539s assert ({a.Trained{1}.BucketSize}, {50}) 539s ***** error fitcknn () 539s ***** error fitcknn (ones (4,1)) 539s ***** error 539s fitcknn (ones (4,2), ones (4, 1), "K") 539s ***** error 539s fitcknn (ones (4,2), ones (3, 1)) 539s ***** error 539s fitcknn (ones (4,2), ones (3, 1), "K", 2) 539s ***** error 539s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 539s ***** error 539s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 539s ***** error ... 539s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 539s 29 tests, 29 passed, 0 known failure, 0 skipped 539s [inst/hist3.m] 539s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hist3.m 539s ***** demo 539s X = [ 539s 1 1 539s 1 1 539s 1 10 539s 1 10 539s 5 5 539s 5 5 539s 5 5 539s 5 5 539s 5 5 539s 7 3 539s 7 3 539s 7 3 539s 10 10 539s 10 10]; 539s hist3 (X) 539s ***** test 539s N_exp = [ 0 0 0 5 20 539s 0 0 10 15 0 539s 0 15 10 0 0 539s 20 5 0 0 0]; 539s 539s n = 100; 539s x = [1:n]'; 539s y = [n:-1:1]'; 539s D = [x y]; 539s N = hist3 (D, [4 5]); 539s assert (N, N_exp); 539s ***** test 539s N_exp = [0 0 0 0 1 539s 0 0 0 0 1 539s 0 0 0 0 1 539s 1 1 1 1 93]; 539s 539s n = 100; 539s x = [1:n]'; 539s y = [n:-1:1]'; 539s D = [x y]; 539s C{1} = [1 1.7 3 4]; 539s C{2} = [1:5]; 539s N = hist3 (D, C); 539s assert (N, N_exp); 539s ***** test 539s D = [1 1; 3 1; 3 3; 3 1]; 539s [c, nn] = hist3 (D, {0:4, 0:4}); 539s exp_c = zeros (5); 539s exp_c([7 9 19]) = [1 2 1]; 539s assert (c, exp_c); 539s assert (nn, {0:4, 0:4}); 539s ***** test 539s for i = 10 539s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 539s endfor 539s ***** test 539s edge_1 = linspace (0, 10, 10); 539s edge_2 = linspace (0, 50, 10); 539s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 539s exp_c = zeros (10, 10); 539s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 539s assert (c, exp_c); 539s 539s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 539s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 539s ***** shared X 539s X = [ 539s 5 2 539s 5 3 539s 1 4 539s 5 3 539s 4 4 539s 1 2 539s 2 3 539s 3 3 539s 5 4 539s 5 3]; 539s ***** test 539s N = zeros (10); 539s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 539s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 539s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 539s ***** test 539s N = zeros (5, 7); 539s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 539s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 539s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 539s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 540s ***** test 540s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 540s C = {(2:5), (2.5:1:4.5)}; 540s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 540s ***** test 540s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 540s C = {(1.2:3.2), (0:5)}; 540s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 540s assert (nthargout ([1 2], @hist3, X, C), {N C}) 540s ***** test 540s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 540s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 540s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 540s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 540s assert (C, C_exp, eps*10^2) 540s ***** test 540s Xv = repmat ([1:10]', [1 2]); 540s 540s ## Test Centers 540s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 540s 540s N_exp = eye (6); 540s N_exp([1 end]) = 3; 540s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 540s 540s N_exp = zeros (8, 6); 540s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 540s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 540s 540s ## Test Edges 540s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 540s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 540s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 540s 540s N_exp = zeros (14); 540s N_exp(3:12, 3:12) = eye (10); 540s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 540s 540s ## Test for Nbins 540s assert (hist3 (Xv), eye (10)) 540s assert (hist3 (Xv, [10 10]), eye (10)) 540s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 540s assert (hist3 (Xv, [5 5]), eye (5) * 2) 540s 540s N_exp = zeros (7, 5); 540s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 540s assert (hist3 (Xv, [7 5]), N_exp) 540s ***** test # bug #51059 540s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 540s [c, nn] = hist3 (D, {0:4, 0:4}); 540s exp_c = zeros (5); 540s exp_c([7 9 19]) = [1 2 1]; 540s assert (c, exp_c) 540s assert (nn, {0:4, 0:4}) 540s ***** test 540s [c, nn] = hist3 ([1 8]); 540s exp_c = zeros (10, 10); 540s exp_c(6, 6) = 1; 540s exp_nn = {-4:5, 3:12}; 540s assert (c, exp_c) 540s assert (nn, exp_nn, eps) 540s 540s [c, nn] = hist3 ([1 8], [10 11]); 540s exp_c = zeros (10, 11); 540s exp_c(6, 6) = 1; 540s exp_nn = {-4:5, 3:13}; 540s assert (c, exp_c) 540s assert (nn, exp_nn, eps) 540s ***** test 540s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 540s exp_c = zeros (10, 10); 540s exp_c(2, 1) = 1; 540s exp_c(8, 10) = 1; 540s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 540s assert (c, exp_c) 540s assert (nn, exp_nn, eps*100) 540s ***** test 540s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 540s exp_c = zeros (10, 10); 540s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 540s assert (c, exp_c) 540s assert (nn, exp_nn, eps*100) 540s ***** test 540s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 540s exp_c = zeros (10, 10); 540s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 540s assert (c, exp_c) 540s assert (nn, exp_nn, eps*100) 540s 16 tests, 16 passed, 0 known failure, 0 skipped 540s [inst/qrandn.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/qrandn.m 540s ***** demo 540s z = qrandn (-5, 5e6); 540s [c x] = hist (z,linspace(-1.5,1.5,200),1); 540s figure(1) 540s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 540s 540s z = qrandn (-0.14286, 5e6); 540s [c x] = hist (z,linspace(-2,2,200),1); 540s figure(2) 540s plot(x,c,"r."); axis tight; axis([-2,2]); 540s 540s z = qrandn (2.75, 5e6); 540s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 540s figure(3) 540s semilogy(x,c,"r."); axis tight; axis([-100,100]); 540s 540s # --------- 540s # Figures from the reference paper. 540s ***** error qrandn ([1 2], 1) 540s ***** error qrandn (4, 1) 540s ***** error qrandn (3, 1) 540s ***** error qrandn (2.5, 1, 2, 3) 540s ***** error qrandn (2.5) 540s ***** test 540s q = 1.5; 540s s = [2, 3]; 540s z = qrandn (q, s); 540s assert (isnumeric (z) && isequal (size (z), s)); 540s 6 tests, 6 passed, 0 known failure, 0 skipped 540s [inst/fullfact.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fullfact.m 540s ***** demo 540s ## Full factorial design with 3 binary variables 540s fullfact (3) 540s ***** demo 540s ## Full factorial design with 3 ordinal variables 540s fullfact ([2, 3, 4]) 540s ***** error fullfact (); 540s ***** error fullfact (2, 5); 540s ***** error fullfact (2.5); 540s ***** error fullfact (0); 540s ***** error fullfact (-3); 540s ***** error fullfact (3+2i); 540s ***** error fullfact (Inf); 540s ***** error fullfact (NaN); 540s ***** error fullfact ([1, 2, -3]); 540s ***** error fullfact ([0, 1, 2]); 540s ***** error fullfact ([1, 2, NaN]); 540s ***** error fullfact ([1, 2, Inf]); 540s ***** test 540s A = fullfact (2); 540s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 540s ***** test 540s A = fullfact ([1, 2]); 540s assert (A, [1, 1; 1, 2]); 540s ***** test 540s A = fullfact ([1, 2, 4]); 540s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 540s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 540s assert (A, A_out); 540s 15 tests, 15 passed, 0 known failure, 0 skipped 540s [inst/silhouette.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/silhouette.m 540s ***** demo 540s load fisheriris; 540s X = meas(:,3:4); 540s cidcs = kmeans (X, 3, "Replicates", 5); 540s silhouette (X, cidcs); 540s y_labels(cidcs([1 51 101])) = unique (species); 540s set (gca, "yticklabel", y_labels); 540s title ("Fisher's iris data"); 540s ***** error silhouette (); 540s ***** error silhouette ([1 2; 1 1]); 540s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 540s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 540s 4 tests, 4 passed, 0 known failure, 0 skipped 540s [inst/logistic_regression.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/logistic_regression.m 540s ***** test 540s # Output compared to following MATLAB commands 540s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 540s # P = mnrval(B,X) 540s X = [1.489381332449196, 1.1534152241851305; ... 540s 1.8110085304863965, 0.9449666896938425; ... 540s -0.04453299665130296, 0.34278203449678646; ... 540s -0.36616019468850347, 1.130254275908322; ... 540s 0.15339143291005095, -0.7921044310668951; ... 540s -1.6031878794469698, -1.8343471035233376; ... 540s -0.14349521143198166, -0.6762996896828459; ... 540s -0.4403818557740143, -0.7921044310668951; ... 540s -0.7372685001160434, -0.027793137932169563; ... 540s -0.11875465773681024, 0.5512305689880763]; 540s Y = [1,1,1,1,1,0,0,0,0,0]'; 540s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 540s ***** test 540s # Output compared to following MATLAB commands 540s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 540s load carbig 540s X = [Acceleration Displacement Horsepower Weight]; 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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, ... 540s 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]'; 540s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 540s assert (DEV, 433.197174495549, 1e-05); 540s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 540s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 540s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 540s assert (SLOPE(1), 0.104762463756714, 1e-05); 540s assert (SLOPE(2), 0.0103357623191891, 1e-05); 540s assert (SLOPE(3), 0.0645199313242276, 1e-05); 540s assert (SLOPE(4), 0.00166377028388103, 1e-05); 540s 2 tests, 2 passed, 0 known failure, 0 skipped 540s [inst/pcacov.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/pcacov.m 540s ***** demo 540s x = [ 7 26 6 60; 540s 1 29 15 52; 540s 11 56 8 20; 540s 11 31 8 47; 540s 7 52 6 33; 540s 11 55 9 22; 540s 3 71 17 6; 540s 1 31 22 44; 540s 2 54 18 22; 540s 21 47 4 26; 540s 1 40 23 34; 540s 11 66 9 12; 540s 10 68 8 12 540s ]; 540s Kxx = cov (x); 540s [coeff, latent, explained] = pcacov (Kxx) 540s ***** test 540s load hald 540s Kxx = cov (ingredients); 540s [coeff,latent,explained] = pcacov(Kxx); 540s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 540s -0.6785, -0.0200, -0.5440, 0.4933; ... 540s 0.0290, 0.7553, 0.4036, 0.5156; ... 540s 0.7309, -0.1085, -0.4684, 0.4844]; 540s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 540s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 540s assert (coeff, c_out, 1e-4); 540s assert (latent, l_out, 1e-4); 540s assert (explained, e_out, 1e-4); 540s ***** error pcacov (ones (2,3)) 540s ***** error pcacov (ones (3,3,3)) 540s 3 tests, 3 passed, 0 known failure, 0 skipped 540s [inst/correlation_test.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/correlation_test.m 540s ***** error correlation_test (); 540s ***** error correlation_test (1); 540s ***** error ... 540s correlation_test ([1 2 NaN]', [2 3 4]'); 540s ***** error ... 540s correlation_test ([1 2 Inf]', [2 3 4]'); 540s ***** error ... 540s correlation_test ([1 2 3+i]', [2 3 4]'); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 NaN]'); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 Inf]'); 540s ***** error ... 540s correlation_test ([1 2 3]', [3 4 3+i]'); 540s ***** error ... 540s correlation_test ([1 2 3]', [3 4 4 5]'); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 540s ***** error ... 540s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 540s ***** test 540s x = [6 7 7 9 10 12 13 14 15 17]; 540s y = [19 22 27 25 30 28 30 29 25 32]; 540s [h, pval, stats] = correlation_test (x, y); 540s assert (stats.corrcoef, corr (x', y'), 1e-14); 540s assert (pval, 0.0223, 1e-4); 540s ***** test 540s x = [6 7 7 9 10 12 13 14 15 17]'; 540s y = [19 22 27 25 30 28 30 29 25 32]'; 540s [h, pval, stats] = correlation_test (x, y); 540s assert (stats.corrcoef, corr (x, y), 1e-14); 540s assert (pval, 0.0223, 1e-4); 540s 20 tests, 20 passed, 0 known failure, 0 skipped 540s [inst/cholcov.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cholcov.m 540s ***** demo 540s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 540s T = cholcov (C1) 540s C2 = T'*T 540s ***** test 540s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 540s T = cholcov (C1); 540s assert (C1, T'*T, 1e-15 * ones (size (C1))); 540s 1 test, 1 passed, 0 known failure, 0 skipped 540s [inst/wblplot.m] 540s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/wblplot.m 540s ***** demo 540s x = [16 34 53 75 93 120]; 540s wblplot (x); 540s ***** demo 540s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 540s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 540s [h, p] = wblplot (x, c); 540s p 540s ***** demo 540s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 540s [h, p] = wblplot (x, [], [], 0.05); 540s p 540s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 540s ***** demo 540s x = [46 64 83 105 123 150 150]; 540s c = [0 0 0 0 0 0 1]; 540s f = [1 1 1 1 1 1 4]; 540s wblplot (x, c, f, 0.05); 540s ***** demo 540s x = [46 64 83 105 123 150 150]; 540s c = [0 0 0 0 0 0 1]; 540s f = [1 1 1 1 1 1 4]; 540s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 540s wblplot (x - 30.92, c, f, 0.05); 540s ***** test 540s hf = figure ("visible", "off"); 540s unwind_protect 540s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 540s [h, p] = wblplot (x, [], [], 0.05); 540s assert (numel (h), 4) 540s assert (p(1), 146.2545, 1E-4) 540s assert (p(2), 1.1973, 1E-4) 540s assert (p(3), 0.9999, 5E-5) 540s unwind_protect_cleanup 540s close (hf); 540s end_unwind_protect 541s 1 test, 1 passed, 0 known failure, 0 skipped 541s [inst/cmdscale.m] 541s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cmdscale.m 541s ***** shared m, n, X, D 541s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 541s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 541s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 541s 2 tests, 2 passed, 0 known failure, 0 skipped 541s [inst/regression_ftest.m] 541s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/regression_ftest.m 541s ***** error regression_ftest (); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 541s ***** error ... 541s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 541s ***** error ... 541s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 541s 18 tests, 18 passed, 0 known failure, 0 skipped 541s [inst/logit.m] 541s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/logit.m 541s ***** test 541s p = [0.01:0.01:0.99]; 541s assert (logit (p), log (p ./ (1-p)), 25*eps); 541s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 541s ***** error logit () 541s ***** error logit (1, 2) 541s 4 tests, 4 passed, 0 known failure, 0 skipped 541s [inst/nanmax.m] 541s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/nanmax.m 541s ***** demo 541s ## Find the column maximum values and their indices 541s ## for matrix data with missing values. 541s 541s x = magic (3); 541s x([1, 6:9]) = NaN 541s [y, ind] = nanmax (x) 541s ***** demo 541s ## Find the maximum of all the values in an array, ignoring missing values. 541s ## Create a 2-by-5-by-3 array x with some missing values. 541s 541s x = reshape (1:30, [2, 5, 3]); 541s x([10:12, 25]) = NaN 541s 541s ## Find the maximum of the elements of x. 541s 541s y = nanmax (x, [], 'all') 541s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 541s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 541s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 541s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 541s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 541s ***** shared x, y 541s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 541s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 541s y = x; 541s y(2,3,1) = 0.51; 541s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 541s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 541s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 541s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 541s ***** assert (nanmax (x, [], 'all'), 6.77) 541s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 541s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 541s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 541s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 541s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 541s ***** test 541s xx = repmat ([1:20;6:25], [5 2 6 3]); 541s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 541s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 541s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 541s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 541s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 541s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 541s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 541s ***** assert (nanmax (magic (3), [], 3), magic (3)) 541s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 541s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 541s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 541s ***** error ... 541s nanmax (y, [], [1, 1, 2]) 541s ***** error ... 541s [v, idx] = nanmax(x, y, [1 2]) 541s 24 tests, 24 passed, 0 known failure, 0 skipped 541s [inst/probit.m] 541s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/probit.m 541s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 541s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 541s ***** error probit () 542s ***** error probit (1, 2) 542s 4 tests, 4 passed, 0 known failure, 0 skipped 542s [inst/bartlett_test.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/bartlett_test.m 542s ***** error bartlett_test () 542s ***** error ... 542s bartlett_test (1, 2, 3, 4); 542s ***** error bartlett_test (randn (50, 2), 0); 542s ***** error ... 542s bartlett_test (randn (50, 2), [1, 2, 3]); 542s ***** error ... 542s bartlett_test (randn (50, 1), ones (55, 1)); 542s ***** error ... 542s bartlett_test (randn (50, 1), ones (50, 2)); 542s ***** error ... 542s bartlett_test (randn (50, 2), [], 1.2); 542s ***** error ... 542s bartlett_test (randn (50, 2), [], "alpha"); 542s ***** error ... 542s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 542s ***** error ... 542s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 542s ***** warning ... 542s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 542s ***** test 542s load examgrades 542s [h, pval, chisq, df] = bartlett_test (grades); 542s assert (h, 1); 542s assert (pval, 7.908647337018238e-08, 1e-14); 542s assert (chisq, 38.73324, 1e-5); 542s assert (df, 4); 542s ***** test 542s load examgrades 542s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 542s assert (h, 1); 542s assert (pval, 0.01172, 1e-5); 542s assert (chisq, 8.89274, 1e-5); 542s assert (df, 2); 542s ***** test 542s load examgrades 542s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 542s assert (h, 0); 542s assert (pval, 0.88118, 1e-5); 542s assert (chisq, 0.02234, 1e-5); 542s assert (df, 1); 542s ***** test 542s load examgrades 542s grades = [grades; nan(10, 5)]; 542s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 542s assert (h, 0); 542s assert (pval, 0.88118, 1e-5); 542s assert (chisq, 0.02234, 1e-5); 542s assert (df, 1); 542s ***** test 542s load examgrades 542s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 542s assert (h, 0); 542s assert (pval, 0.01791, 1e-5); 542s assert (chisq, 5.60486, 1e-5); 542s assert (df, 1); 542s 16 tests, 16 passed, 0 known failure, 0 skipped 542s [inst/hmmestimate.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hmmestimate.m 542s ***** test 542s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 542s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 542s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 542s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 542s [transprobest, outprobest] = hmmestimate (sequence, states); 542s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 542s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 542s assert (transprobest, expectedtransprob, 0.001); 542s assert (outprobest, expectedoutprob, 0.001); 542s ***** test 542s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 542s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 542s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 542s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 542s "Two", "One", "One", "One", "One", "One", "One"}; 542s symbols = {"A", "B", "C"}; 542s statenames = {"One", "Two"}; 542s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 542s symbols, "statenames", statenames); 542s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 542s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 542s assert (transprobest, expectedtransprob, 0.001); 542s assert (outprobest, expectedoutprob, 0.001); 542s ***** test 542s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 542s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 542s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 542s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 542s pseudotransitions = [8, 2; 4, 6]; 542s pseudoemissions = [2, 4, 4; 7, 2, 1]; 542s [transprobest, outprobest] = hmmestimate (sequence, states, ... 542s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 542s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 542s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 542s 0.823529, 0.117647, 0.058824]; 542s assert (transprobest, expectedtransprob, 0.001); 542s assert (outprobest, expectedoutprob, 0.001); 542s 3 tests, 3 passed, 0 known failure, 0 skipped 542s [inst/regress.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/regress.m 542s ***** test 542s % Longley data from the NIST Statistical Reference Dataset 542s Z = [ 60323 83.0 234289 2356 1590 107608 1947 542s 61122 88.5 259426 2325 1456 108632 1948 542s 60171 88.2 258054 3682 1616 109773 1949 542s 61187 89.5 284599 3351 1650 110929 1950 542s 63221 96.2 328975 2099 3099 112075 1951 542s 63639 98.1 346999 1932 3594 113270 1952 542s 64989 99.0 365385 1870 3547 115094 1953 542s 63761 100.0 363112 3578 3350 116219 1954 542s 66019 101.2 397469 2904 3048 117388 1955 542s 67857 104.6 419180 2822 2857 118734 1956 542s 68169 108.4 442769 2936 2798 120445 1957 542s 66513 110.8 444546 4681 2637 121950 1958 542s 68655 112.6 482704 3813 2552 123366 1959 542s 69564 114.2 502601 3931 2514 125368 1960 542s 69331 115.7 518173 4806 2572 127852 1961 542s 70551 116.9 554894 4007 2827 130081 1962 ]; 542s % Results certified by NIST using 500 digit arithmetic 542s % b and standard error in b 542s V = [ -3482258.63459582 890420.383607373 542s 15.0618722713733 84.9149257747669 542s -0.358191792925910E-01 0.334910077722432E-01 542s -2.02022980381683 0.488399681651699 542s -1.03322686717359 0.214274163161675 542s -0.511041056535807E-01 0.226073200069370 542s 1829.15146461355 455.478499142212 ]; 542s Rsq = 0.995479004577296; 542s F = 330.285339234588; 542s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 542s alpha = 0.05; 542s [b, bint, r, rint, stats] = regress (y, X, alpha); 542s assert(b,V(:,1),4e-6); 542s assert(stats(1),Rsq,1e-12); 542s assert(stats(2),F,3e-8); 542s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 542s warning: matrix singular to machine precision, rcond = 3.50566e-20 542s warning: called from 542s regress at line 131 column 7 542s __test__ at line 33 column 28 542s test at line 682 column 11 542s /tmp/tmp.sb70tqLAQ5 at line 1702 column 31 542s 542s 1 test, 1 passed, 0 known failure, 0 skipped 542s [inst/hmmviterbi.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/hmmviterbi.m 542s ***** test 542s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 542s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 542s transprob = [0.8, 0.2; 0.4, 0.6]; 542s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 542s vpath = hmmviterbi (sequence, transprob, outprob); 542s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 542s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 542s assert (vpath, expected); 542s ***** test 542s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 542s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 542s transprob = [0.8, 0.2; 0.4, 0.6]; 542s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 542s symbols = {"A", "B", "C"}; 542s statenames = {"One", "Two"}; 542s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 542s "statenames", statenames); 542s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 542s "One", "One", "One", "One", "One", "One", "One", "Two", ... 542s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 542s assert (vpath, expected); 542s 2 tests, 2 passed, 0 known failure, 0 skipped 542s [inst/fitcsvm.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitcsvm.m 542s ***** demo 542s ## Use a subset of Fisher's iris data set 542s 542s load fisheriris 542s inds = ! strcmp (species, 'setosa'); 542s X = meas(inds, [3,4]); 542s Y = species(inds); 542s 542s ## Train a linear SVM classifier 542s SVMModel = fitcsvm (X, Y) 542s 542s ## Plot a scatter diagram of the data and circle the support vectors. 542s sv = SVMModel.SupportVectors; 542s figure 542s gscatter (X(:,1), X(:,2), Y) 542s hold on 542s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 542s legend ('versicolor', 'virginica', 'Support Vector') 542s hold off 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = {"a"; "a"; "b"; "b"}; 542s a = fitcsvm (x, y); 542s assert (class (a), "ClassificationSVM"); 542s assert ({a.X, a.Y}, {x, y}) 542s assert (a.NumObservations, 4) 542s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 542s assert (a.ModelParameters.SVMtype, "c_svc") 542s assert (a.ClassNames, {"a"; "b"}) 542s ***** test 542s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 542s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 542s a = fitcsvm (x, y); 542s assert (class (a), "ClassificationSVM"); 542s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 542s assert (a.ModelParameters.BoxConstraint, 1) 542s assert (a.ModelParameters.KernelOffset, 0) 542s assert (a.ClassNames, [1; -1]) 542s ***** test 542s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 542s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 542s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 542s "KernelOffset", 2); 542s assert (class (a), "ClassificationSVM"); 542s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 542s assert (a.ModelParameters.BoxConstraint, 2) 542s assert (a.ModelParameters.KernelOffset, 2) 542s assert (isempty (a.Alpha), true) 542s assert (isempty (a.Beta), false) 542s ***** test 542s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 542s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 542s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 542s assert (class (a), "ClassificationSVM"); 542s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 542s assert (a.ModelParameters.PolynomialOrder, 3) 542s assert (isempty (a.Alpha), true) 542s assert (isempty (a.Beta), false) 542s ***** test 542s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 542s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 542s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 542s assert (class (a), "ClassificationSVM"); 542s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 542s assert (a.ModelParameters.PolynomialOrder, 3) 542s assert (isempty (a.Alpha), false) 542s assert (isempty (a.Beta), true) 542s ***** test 542s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 542s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 542s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 542s assert (class (a), "ClassificationPartitionedModel"); 542s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 542s assert (a.ModelParameters.PolynomialOrder, 3) 542s assert (isempty (a.Trained{1}.Alpha), false) 542s assert (isempty (a.Trained{1}.Beta), true) 542s ***** error fitcsvm () 542s ***** error fitcsvm (ones (4,1)) 542s ***** error 542s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 542s ***** error 542s fitcsvm (ones (4,2), ones (3, 1)) 542s ***** error 542s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 542s ***** error 542s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 542s ***** error 542s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 542s ***** error ... 542s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 542s 14 tests, 14 passed, 0 known failure, 0 skipped 542s [inst/ztest.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ztest.m 542s ***** error ztest (); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 2, -0.5); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 542s ***** error ... 542s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 542s ***** test 542s load carsmall 542s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 542s assert (h, 0); 542s assert (pval, 1, 1e-14); 542s assert (ci, [22.094; 25.343], 1e-3); 542s ***** test 542s load carsmall 542s [h, pval, ci] = ztest (MPG, 26, 8); 542s assert (h, 1); 542s assert (pval, 0.00568359158544743, 1e-14); 542s assert (ci, [22.101; 25.335], 1e-3); 542s ***** test 542s load carsmall 542s [h, pval, ci] = ztest (MPG, 26, 4); 542s assert (h, 1); 542s assert (pval, 3.184168011941316e-08, 1e-14); 542s assert (ci, [22.909; 24.527], 1e-3); 542s 13 tests, 13 passed, 0 known failure, 0 skipped 542s [inst/chi2test.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/chi2test.m 542s ***** error chi2test (); 542s ***** error chi2test ([1, 2, 3, 4, 5]); 542s ***** error chi2test ([1, 2; 2, 1+3i]); 542s ***** error chi2test ([NaN, 6; 34, 12]); 542s ***** error ... 542s p = chi2test (ones (3, 3), "mutual", []); 542s ***** error ... 542s p = chi2test (ones (3, 3, 3), "testtype", 2); 542s ***** error ... 542s p = chi2test (ones (3, 3, 3), "mutual"); 542s ***** error ... 542s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 542s ***** error ... 542s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 542s ***** error ... 542s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 542s ***** warning p = chi2test (ones (2)); 542s ***** warning p = chi2test (ones (3, 2)); 542s ***** warning p = chi2test (0.4 * ones (3)); 542s ***** test 542s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 542s p = chi2test (x); 542s assert (p, 0.017787, 1e-6); 542s ***** test 542s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 542s [p, chisq] = chi2test (x); 542s assert (chisq, 11.9421, 1e-4); 542s ***** test 542s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 542s [p, chisq, df] = chi2test (x); 542s assert (df, 4); 542s ***** test 542s ***** shared x 542s x(:,:,1) = [59, 32; 9,16]; 542s x(:,:,2) = [55, 24;12,33]; 542s x(:,:,3) = [107,80;17,56];%! 542s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 542s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 542s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 542s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 542s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 542s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 542s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 542s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 542s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 542s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 542s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 542s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 542s ***** test 542s [pval, chisq, df, E] = chi2test (x); 542s assert (chisq, 64.0982, 1e-4); 542s assert (df, 7); 542s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 542s ***** test 542s [pval, chisq, df, E] = chi2test (x, "joint", 2); 542s assert (chisq, 56.0943, 1e-4); 542s assert (df, 5); 542s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 542s ***** test 542s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 542s assert (chisq, 146.6058, 1e-4); 542s assert (df, 9); 542s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 542s ***** test 542s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 542s assert (chisq, 52.2509, 1e-4); 542s assert (df, 3); 542s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 542s ***** test 542s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 542s assert (chisq, 1.6034, 1e-4); 542s assert (df, 2); 542s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 542s 34 tests, 34 passed, 0 known failure, 0 skipped 542s [inst/histfit.m] 542s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/histfit.m 542s ***** demo 542s histfit (randn (100, 1)) 542s ***** demo 542s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 542s ***** demo 542s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 542s ***** test 542s hf = figure ("visible", "off"); 542s unwind_protect 542s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 542s histfit (x); 542s unwind_protect_cleanup 542s close (hf); 542s end_unwind_protect 542s ***** test 542s hf = figure ("visible", "off"); 542s unwind_protect 542s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 542s histfit (x); 542s unwind_protect_cleanup 542s close (hf); 542s end_unwind_protect 542s ***** test 542s hf = figure ("visible", "off"); 542s unwind_protect 542s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 542s histfit (x, 3); 542s unwind_protect_cleanup 542s close (hf); 542s end_unwind_protect 542s ***** test 542s hf = figure ("visible", "off"); 542s unwind_protect 542s histfit (randn (100, 1)); 542s unwind_protect_cleanup 542s close (hf); 542s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s ax = gca (); 543s histfit (ax, randn (100, 1)); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s ax = gca (); 543s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s ax = gca (); 543s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s ax = axes ("parent", hf); 543s fail ("histfit (ax)", "histfit: too few input arguments."); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** error ... 543s histfit ('wer') 543s ***** error histfit ([NaN, NaN, NaN]); 543s ***** error ... 543s histfit (randn (100, 1), 5.6) 543s ***** error ... 543s histfit (randn (100, 1), 8, 5) 543s ***** error ... 543s histfit (randn (100, 1), 8, {'normal'}) 543s ***** error ... 543s histfit (randn (100, 1), 8, 'Kernel') 543s ***** error ... 543s histfit (randn (100, 1), 8, 'ASDASDASD') 543s 17 tests, 17 passed, 0 known failure, 0 skipped 543s [inst/normplot.m] 543s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/normplot.m 543s ***** demo 543s h = normplot([1:20]); 543s ***** demo 543s h = normplot([1:20;5:2:44]'); 543s ***** demo 543s ax = newplot(); 543s h = normplot(ax, [1:20]); 543s ax = gca; 543s h = normplot(ax, [-10:10]); 543s set (ax, "xlim", [-11, 21]); 543s ***** error normplot (); 543s ***** error normplot (23); 543s ***** error normplot (23, [1:20]); 543s ***** error normplot (ones(3,4,5)); 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s ax = newplot (hf); 543s h = normplot (ax, [1:20]); 543s ax = gca; 543s h = normplot(ax, [-10:10]); 543s set (ax, "xlim", [-11, 21]); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s ***** test 543s hf = figure ("visible", "off"); 543s unwind_protect 543s h = normplot([1:20;5:2:44]'); 543s unwind_protect_cleanup 543s close (hf); 543s end_unwind_protect 543s 6 tests, 6 passed, 0 known failure, 0 skipped 543s [inst/normalise_distribution.m] 543s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/normalise_distribution.m 543s ***** test 543s v = normalise_distribution ([1 2 3], [], 1); 543s assert (v, [0 0 0]) 543s ***** test 543s v = normalise_distribution ([1 2 3], [], 2); 543s assert (v, norminv ([1 3 5] / 6), 3 * eps) 543s ***** test 543s v = normalise_distribution ([1 2 3]', [], 2); 543s assert (v, [0 0 0]') 543s ***** test 543s v = normalise_distribution ([1 2 3]', [], 1); 543s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 543s ***** test 543s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 543s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 543s ***** test 543s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 543s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 543s ***** test 543s A = randn ( 10 ); 543s N = normalise_distribution (A, @normcdf); 543s assert (A, N, 10000 * eps) 543s ***** test 543s A = exprnd (1, 100); 543s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 543s assert (mean (vec (N)), 0, 0.1) 543s assert (std (vec (N)), 1, 0.1) 543s ***** test 543s A = rand (1000,1); 543s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 543s assert (mean (vec (N)), 0, 0.2) 543s assert (std (vec (N)), 1, 0.1) 543s ***** test 543s A = [rand(1000,1), randn(1000, 1)]; 543s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 543s assert (mean (N), [0, 0], 0.2) 543s assert (std (N), [1, 1], 0.1) 543s ***** test 543s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 543s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 543s assert (mean (N, 2), [0, 0, 0]', 0.2); 543s assert (std (N, [], 2), [1, 1, 1]', 0.1); 543s ***** xtest 543s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 543s N = normalise_distribution (A); 543s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 543s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 543s ***** test 543s ***** error normalise_distribution (zeros (3, 4), ... 543s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 543s 14 tests, 14 passed, 0 known failure, 0 skipped 543s [inst/pca.m] 543s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/pca.m 543s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 543s ***** test 543s x=[7 4 3 543s 4 1 8 543s 6 3 5 543s 8 6 1 543s 8 5 7 543s 7 2 9 543s 5 3 3 543s 9 5 8 543s 7 4 5 543s 8 2 2]; 543s R = corrcoef (x); 543s [V, lambda] = eig (R); 543s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 543s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 543s ***** 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 543s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 543s F = zscore(x)*B; 543s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 544s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 544s ***** test 544s x=[1,2,3;2,1,3]'; 544s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 544s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 544s m(:,1) = m(:,1)*sign(COEFF(1,1)); 544s m(:,2) = m(:,2)*sign(COEFF(1,2)); 544s ***** assert(COEFF,m(1:2,:),10*eps); 544s ***** assert(SCORE,-m,10*eps); 544s ***** assert(latent,[1.5;.5],10*eps); 544s ***** assert(tsquare,[4;4;4]/3,10*eps); 544s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 544s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 544s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 544s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 544s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 544s !!!!! known failure 544s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 544s 544s Location | Observed | Expected | Reason 544s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 544s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 544s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 544s ***** test 544s x=x'; 544s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 544s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 544s m(:,1) = m(:,1)*sign(COEFF(1,1)); 544s m(:,2) = m(:,2)*sign(COEFF(1,2)); 544s m(:,3) = m(:,3)*sign(COEFF(3,3)); 544s ***** assert(COEFF,m,10*eps); 544s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 544s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 544s ***** assert(latent,[1;0;0],10*eps); 544s ***** assert(tsquare,[0.5;0.5],10*eps) 544s ***** test 544s [COEFF,SCORE,latent,tsquare] = pca(x); 544s ***** assert(COEFF,m(:, 1),10*eps); 544s ***** assert(SCORE,-m(1:2,1),10*eps); 544s ***** assert(latent,[1],10*eps); 544s ***** assert(tsquare,[0.5;0.5],10*eps) 544s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 544s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 544s ***** error pca([1 2; 3 4], "NumComponents", -4) 544s ***** error pca([1 2; 3 4], "Rows", 1) 544s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 544s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 544s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 544s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 544s ***** error pca([1 2; 3 4], "XXX", 1) 544s 32 tests, 31 passed, 1 known failure, 0 skipped 544s [inst/mnrfit.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/mnrfit.m 544s ***** error mnrfit (ones (50,1)) 544s ***** error ... 544s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 544s ***** error ... 544s mnrfit (ones (50, 4, 2), ones (50, 1)) 544s ***** error ... 544s mnrfit (ones (50, 4), ones (50, 1, 3)) 544s ***** error ... 544s mnrfit (ones (50, 4), ones (45,1)) 544s ***** error ... 544s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 544s ***** error ... 544s mnrfit (ones (5, 4), ones (5, 1), "model") 544s ***** error ... 544s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 544s ***** error ... 544s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 544s ***** error ... 544s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 544s ***** error ... 544s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 544s ***** error ... 544s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 544s ***** error ... 544s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 544s 13 tests, 13 passed, 0 known failure, 0 skipped 544s [inst/dcov.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dcov.m 544s ***** demo 544s base=@(x) (x- min(x))./(max(x)-min(x)); 544s N = 5e2; 544s x = randn (N,1); x = base (x); 544s z = randn (N,1); z = base (z); 544s # Linear relations 544s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 544s ly = x .* cy; 544s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 544s # Correlated Gaussian 544s cz = 1 - abs (cy); 544s gy = base ( ly + cz.*z); 544s # Shapes 544s sx = repmat (x,1,7); 544s sy = zeros (size (ly)); 544s v = 2 * rand (size(x,1),2) - 1; 544s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 544s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 544s tmp = R(35) * v.'; 544s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 544s tmp = R(45) * v.'; 544s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 544s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 544s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 544s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 544s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 544s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 544s sy = base (sy); 544s sx = base (sx); 544s # scaled shape 544s sc = 1/3; 544s ssy = (sy-0.5) * sc + 0.5; 544s n = size (ly,2); 544s ym = 1.2; 544s xm = 0.5; 544s fmt={'horizontalalignment','center'}; 544s ff = "% .2f"; 544s figure (1) 544s for i=1:n 544s subplot(4,n,i); 544s plot (x, gy(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 544s 544s subplot(4,n,i+n); 544s plot (x, ly(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 544s 544s subplot(4,n,i+2*n); 544s plot (sx(:,i), sy(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 544s v = axis (); 544s 544s subplot(4,n,i+3*n); 544s plot (sx(:,i), ssy(:,i), '.b'); 544s axis (v) 544s axis off 544s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 544s endfor 544s ***** error dcov (randn (30, 5), randn (25,5)) 544s 1 test, 1 passed, 0 known failure, 0 skipped 544s [inst/pdist2.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/pdist2.m 544s ***** shared x, y, xx 544s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 544s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 544s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 544s ***** test 544s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 544s assert (pdist2 (x, y), d); 544s ***** test 544s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 544s 3.4641, 2.2361, 3.3166, 5.4772]; 544s i = [3, 1, 1, 1; 2, 3, 3, 2]; 544s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 544s 3.4641, 2.2361, 3.3166, 5.4772]; 544s i = [1, 2, 2, 3;2, 1, 1, 2]; 544s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s yy = [1 2 3;5 6 7;9 5 1]; 544s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 544s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 544s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 544s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s yy = [1 2 3;5 6 7;9 5 1]; 544s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 544s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 544s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s yy = [1 2 3;5 6 7;9 5 1]; 544s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 544s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 544s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 544s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 544s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 544s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 544s ***** test 544s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 544s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 544s i = [2, 2, 2; 3, 4, 4]; 544s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 544s i = [1, 1, 3; 4, 3, 1]; 544s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 544s assert ({D, I}, {d, i}, 1e-4); 544s ***** test 544s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 544s assert (pdist2 (x, y, "cityblock"), d); 544s ***** test 544s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 544s assert (pdist2 (x, y, "chebychev"), d); 544s ***** test 544s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 544s assert (pdist2 (x, y, "cosine"), d, 1e-4); 544s ***** test 544s yy = [1 2 3;5 6 7;9 5 1]; 544s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 544s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 544s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 544s assert ({D, I}, {d, i}, eps); 544s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 544s assert ({D, I}, {d, i}, eps); 544s ***** test 544s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 544s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 544s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 544s assert ({D, I}, {d, i}, eps); 544s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 544s assert ({D, I}, {d, i}, eps); 544s ***** test 544s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 544s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 544s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 544s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 544s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 544s assert ({D, I}, {d, i}); 544s ***** warning ... 544s pdist2 (xx, xx, "mahalanobis"); 544s ***** error pdist2 (1) 544s ***** error ... 544s pdist2 (ones (4, 5), ones (4)) 544s ***** error ... 544s pdist2 (ones (4, 2, 3), ones (3, 2)) 544s ***** error ... 544s pdist2 (ones (3), ones (3), "euclidean", "Largest") 544s ***** error ... 544s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 544s ***** error ... 544s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 544s ***** error ... 544s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 544s ***** error ... 544s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 544s ***** error ... 544s pdist2 (ones (3), ones (3), "seuclidean", 3) 544s ***** error ... 544s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 544s ***** error ... 544s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 544s ***** error ... 544s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 544s ***** error ... 544s pdist2 (ones (3), eye (3), "minkowski", 0) 544s ***** error ... 544s pdist2 (ones (3), eye (3), "minkowski", -5) 544s ***** error ... 544s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 544s ***** error ... 544s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 544s ***** error ... 544s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 544s 33 tests, 33 passed, 0 known failure, 0 skipped 544s [inst/loadmodel.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/loadmodel.m 544s ***** error loadmodel () 544s ***** error ... 544s loadmodel ("fisheriris.mat") 544s ***** error ... 544s loadmodel ("fail_loadmodel.mdl") 544s ***** error ... 544s loadmodel ("fail_load_model.mdl") 544s 4 tests, 4 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/tpdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tpdf.m 544s ***** demo 544s ## Plot various PDFs from the Student's T distribution 544s x = -5:0.01:5; 544s y1 = tpdf (x, 1); 544s y2 = tpdf (x, 2); 544s y3 = tpdf (x, 5); 544s y4 = tpdf (x, Inf); 544s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 544s grid on 544s xlim ([-5, 5]) 544s ylim ([0, 0.41]) 544s legend ({"df = 1", "df = 2", ... 544s "df = 5", 'df = \infty'}, "location", "northeast") 544s title ("Student's T PDF") 544s xlabel ("values in x") 544s ylabel ("density") 544s ***** test 544s x = rand (10,1); 544s y = 1./(pi * (1 + x.^2)); 544s assert (tpdf (x, 1), y, 5*eps); 544s ***** shared x, y 544s x = [-Inf 0 0.5 1 Inf]; 544s y = 1./(pi * (1 + x.^2)); 544s ***** assert (tpdf (x, ones (1,5)), y, eps) 544s ***** assert (tpdf (x, 1), y, eps) 544s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 544s ***** assert (tpdf (x, Inf), normpdf (x)) 544s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 544s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 544s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 544s ***** error tpdf () 544s ***** error tpdf (1) 544s ***** error ... 544s tpdf (ones (3), ones (2)) 544s ***** error ... 544s tpdf (ones (2), ones (3)) 544s ***** error tpdf (i, 2) 544s ***** error tpdf (2, i) 544s 14 tests, 14 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/ncx2pdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncx2pdf.m 544s ***** demo 544s ## Plot various PDFs from the noncentral chi-squared distribution 544s x = 0:0.1:10; 544s y1 = ncx2pdf (x, 2, 1); 544s y2 = ncx2pdf (x, 2, 2); 544s y3 = ncx2pdf (x, 2, 3); 544s y4 = ncx2pdf (x, 4, 1); 544s y5 = ncx2pdf (x, 4, 2); 544s y6 = ncx2pdf (x, 4, 3); 544s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 544s x, y4, "-m", x, y5, "-c", x, y6, "-y") 544s grid on 544s xlim ([0, 10]) 544s ylim ([0, 0.32]) 544s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 544s "df = 2, λ = 3", "df = 4, λ = 1", ... 544s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 544s title ("Noncentral chi-squared PDF") 544s xlabel ("values in x") 544s ylabel ("density") 544s ***** demo 544s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 544s ## chi-squared PDF with the same number of degrees of freedom (4). 544s 544s x = 0:0.1:10; 544s y1 = ncx2pdf (x, 4, 2); 544s y2 = chi2pdf (x, 4); 544s plot (x, y1, "-", x, y2, "-"); 544s grid on 544s xlim ([0, 10]) 544s ylim ([0, 0.32]) 544s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 544s title ("Noncentral chi-squared vs chi-squared PDFs") 544s xlabel ("values in x") 544s ylabel ("density") 544s ***** shared x1, df, d1 544s x1 = [-Inf, 2, NaN, 4, Inf]; 544s df = [2, 0, -1, 1, 4]; 544s d1 = [1, NaN, 3, -1, 2]; 544s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 544s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 544s 0.06160064323277038, 0], 1e-14); 544s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 544s 0.09631299762429098, 0], 1e-14); 544s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 544s 0.08430464047296625, 0], 1e-14); 544s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 544s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 544s NaN, 0.1076346446244688], 1e-14); 544s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 544s NaN, 0.1192317192431485], 1e-14); 544s ***** error ncx2pdf () 544s ***** error ncx2pdf (1) 544s ***** error ncx2pdf (1, 2) 544s ***** error ... 544s ncx2pdf (ones (3), ones (2), ones (2)) 544s ***** error ... 544s ncx2pdf (ones (2), ones (3), ones (2)) 544s ***** error ... 544s ncx2pdf (ones (2), ones (2), ones (3)) 544s ***** error ncx2pdf (i, 2, 2) 544s ***** error ncx2pdf (2, i, 2) 544s ***** error ncx2pdf (2, 2, i) 544s 16 tests, 16 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/invgpdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/invgpdf.m 544s ***** demo 544s ## Plot various PDFs from the inverse Gaussian distribution 544s x = 0:0.001:3; 544s y1 = invgpdf (x, 1, 0.2); 544s y2 = invgpdf (x, 1, 1); 544s y3 = invgpdf (x, 1, 3); 544s y4 = invgpdf (x, 3, 0.2); 544s y5 = invgpdf (x, 3, 1); 544s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 544s grid on 544s xlim ([0, 3]) 544s ylim ([0, 3]) 544s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 544s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 544s title ("Inverse Gaussian PDF") 544s xlabel ("values in x") 544s ylabel ("density") 544s ***** shared x, y 544s x = [-Inf, -1, 0, 1/2, 1, Inf]; 544s y = [0, 0, 0, 0.8788, 0.3989, 0]; 544s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 544s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 544s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 544s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 544s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 544s ***** error invgpdf () 544s ***** error invgpdf (1) 544s ***** error invgpdf (1, 2) 544s ***** error ... 544s invgpdf (1, ones (2), ones (3)) 544s ***** error ... 544s invgpdf (ones (2), 1, ones (3)) 544s ***** error ... 544s invgpdf (ones (2), ones (3), 1) 544s ***** error invgpdf (i, 2, 3) 544s ***** error invgpdf (1, i, 3) 544s ***** error invgpdf (1, 2, i) 544s 14 tests, 14 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/gumbelcdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gumbelcdf.m 544s ***** demo 544s ## Plot various CDFs from the Gumbel distribution 544s x = -5:0.01:20; 544s p1 = gumbelcdf (x, 0.5, 2); 544s p2 = gumbelcdf (x, 1.0, 2); 544s p3 = gumbelcdf (x, 1.5, 3); 544s p4 = gumbelcdf (x, 3.0, 4); 544s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 544s grid on 544s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 544s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 544s title ("Gumbel CDF") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** shared x, y 544s x = [-Inf, 1, 2, Inf]; 544s y = [0, 0.3679, 0.6922, 1]; 544s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 544s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 544s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 544s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 544s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 544s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 544s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 544s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 544s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 544s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 544s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 544s ***** error gumbelcdf () 544s ***** error gumbelcdf (1,2,3,4,5,6,7) 544s ***** error gumbelcdf (1, 2, 3, 4, "uper") 544s ***** error ... 544s gumbelcdf (ones (3), ones (2), ones (2)) 544s ***** error gumbelcdf (2, 3, 4, [1, 2]) 544s ***** error ... 544s [p, plo, pup] = gumbelcdf (1, 2, 3) 544s ***** error [p, plo, pup] = ... 544s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 544s ***** error [p, plo, pup] = ... 544s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 544s ***** error [p, plo, pup] = ... 544s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 544s ***** error gumbelcdf (i, 2, 2) 544s ***** error gumbelcdf (2, i, 2) 544s ***** error gumbelcdf (2, 2, i) 544s ***** error ... 544s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 544s 24 tests, 24 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/invgrnd.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/invgrnd.m 544s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 544s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 544s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 544s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 544s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 544s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 544s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 544s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 544s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 544s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 544s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 544s ***** test 544s r = invgrnd (1, [1, 0, -1]); 544s assert (r([2:3]), [NaN, NaN]) 544s ***** assert (class (invgrnd (1, 0)), "double") 544s ***** assert (class (invgrnd (1, single (0))), "single") 544s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 544s ***** assert (class (invgrnd (1, single (1))), "single") 544s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 544s ***** assert (class (invgrnd (single (1), 1)), "single") 544s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 544s ***** error invgrnd () 544s ***** error invgrnd (1) 544s ***** error ... 544s invgrnd (ones (3), ones (2)) 544s ***** error ... 544s invgrnd (ones (2), ones (3)) 544s ***** error invgrnd (i, 2, 3) 544s ***** error invgrnd (1, i, 3) 544s ***** error ... 544s invgrnd (1, 2, -1) 544s ***** error ... 544s invgrnd (1, 2, 1.2) 544s ***** error ... 544s invgrnd (1, 2, ones (2)) 544s ***** error ... 544s invgrnd (1, 2, [2 -1 2]) 544s ***** error ... 544s invgrnd (1, 2, [2 0 2.5]) 544s ***** error ... 544s invgrnd (1, 2, 2, -1, 5) 544s ***** error ... 544s invgrnd (1, 2, 2, 1.5, 5) 544s ***** error ... 544s invgrnd (2, ones (2), 3) 544s ***** error ... 544s invgrnd (2, ones (2), [3, 2]) 544s ***** error ... 544s invgrnd (2, ones (2), 3, 2) 544s 35 tests, 35 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/cauchycdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/cauchycdf.m 544s ***** demo 544s ## Plot various CDFs from the Cauchy distribution 544s x = -5:0.01:5; 544s p1 = cauchycdf (x, 0, 0.5); 544s p2 = cauchycdf (x, 0, 1); 544s p3 = cauchycdf (x, 0, 2); 544s p4 = cauchycdf (x, -2, 1); 544s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 544s grid on 544s xlim ([-5, 5]) 544s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 544s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 544s title ("Cauchy CDF") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** shared x, y 544s x = [-1 0 0.5 1 2]; 544s y = 1/pi * atan ((x-1) / 2) + 1/2; 544s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 544s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 544s ***** assert (cauchycdf (x, ones (1,5), 2), y) 544s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 544s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 544s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 544s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 544s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 544s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 544s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 544s ***** error cauchycdf () 544s ***** error cauchycdf (1) 544s ***** error ... 544s cauchycdf (1, 2) 544s ***** error ... 544s cauchycdf (1, 2, 3, 4, 5) 544s ***** error cauchycdf (1, 2, 3, "tail") 544s ***** error cauchycdf (1, 2, 3, 4) 544s ***** error ... 544s cauchycdf (ones (3), ones (2), ones (2)) 544s ***** error ... 544s cauchycdf (ones (2), ones (3), ones (2)) 544s ***** error ... 544s cauchycdf (ones (2), ones (2), ones (3)) 544s ***** error cauchycdf (i, 2, 2) 544s ***** error cauchycdf (2, i, 2) 544s ***** error cauchycdf (2, 2, i) 544s 22 tests, 22 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/fcdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/fcdf.m 544s ***** demo 544s ## Plot various CDFs from the F distribution 544s x = 0.01:0.01:4; 544s p1 = fcdf (x, 1, 2); 544s p2 = fcdf (x, 2, 1); 544s p3 = fcdf (x, 5, 2); 544s p4 = fcdf (x, 10, 1); 544s p5 = fcdf (x, 100, 100); 544s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 544s grid on 544s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 544s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 544s "df1 = 100, df2 = 100"}, "location", "southeast") 544s title ("F CDF") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** shared x, y 544s x = [-1, 0, 0.5, 1, 2, Inf]; 544s y = [0, 0, 1/3, 1/2, 2/3, 1]; 544s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 544s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 544s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 544s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 544s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 544s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 544s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 544s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 544s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 544s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 544s ***** error fcdf () 544s ***** error fcdf (1) 544s ***** error fcdf (1, 2) 544s ***** error fcdf (1, 2, 3, 4) 544s ***** error fcdf (1, 2, 3, "tail") 544s ***** error ... 544s fcdf (ones (3), ones (2), ones (2)) 544s ***** error ... 544s fcdf (ones (2), ones (3), ones (2)) 544s ***** error ... 544s fcdf (ones (2), ones (2), ones (3)) 544s ***** error fcdf (i, 2, 2) 544s ***** error fcdf (2, i, 2) 544s ***** error fcdf (2, 2, i) 544s 21 tests, 21 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/tricdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tricdf.m 544s ***** demo 544s ## Plot various CDFs from the triangular distribution 544s x = 0.001:0.001:10; 544s p1 = tricdf (x, 3, 4, 6); 544s p2 = tricdf (x, 1, 2, 5); 544s p3 = tricdf (x, 2, 3, 9); 544s p4 = tricdf (x, 2, 5, 9); 544s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 544s grid on 544s xlim ([0, 10]) 544s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 544s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 544s "location", "southeast") 544s title ("Triangular CDF") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** shared x, y 544s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 544s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 544s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 544s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 544s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 544s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 544s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 544s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 544s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 544s [y(1:2), NaN, y(4:7)], eps) 544s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 544s [y(1:2), NaN, y(4:7)], eps) 544s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 544s [y(1:2), NaN, y(4:7)], eps) 544s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 544s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 544s single ([y, NaN]), eps("single")) 544s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 544s single ([y, NaN]), eps("single")) 544s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 544s single ([y, NaN]), eps("single")) 544s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 544s single ([y, NaN]), eps("single")) 544s ***** error tricdf () 544s ***** error tricdf (1) 544s ***** error tricdf (1, 2) 544s ***** error tricdf (1, 2, 3) 544s ***** error ... 544s tricdf (1, 2, 3, 4, 5, 6) 544s ***** error tricdf (1, 2, 3, 4, "tail") 544s ***** error tricdf (1, 2, 3, 4, 5) 544s ***** error ... 544s tricdf (ones (3), ones (2), ones(2), ones(2)) 544s ***** error ... 544s tricdf (ones (2), ones (3), ones(2), ones(2)) 544s ***** error ... 544s tricdf (ones (2), ones (2), ones(3), ones(2)) 544s ***** error ... 544s tricdf (ones (2), ones (2), ones(2), ones(3)) 544s ***** error tricdf (i, 2, 3, 4) 544s ***** error tricdf (1, i, 3, 4) 544s ***** error tricdf (1, 2, i, 4) 544s ***** error tricdf (1, 2, 3, i) 544s 29 tests, 29 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/cauchyrnd.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/cauchyrnd.m 544s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 544s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 544s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 544s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 544s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 544s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 544s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 544s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 544s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 544s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 544s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 544s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 544s ***** assert (class (cauchyrnd (1, 1)), "double") 544s ***** assert (class (cauchyrnd (1, single (1))), "single") 544s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 544s ***** assert (class (cauchyrnd (single (1), 1)), "single") 544s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 544s ***** error cauchyrnd () 544s ***** error cauchyrnd (1) 544s ***** error ... 544s cauchyrnd (ones (3), ones (2)) 544s ***** error ... 544s cauchyrnd (ones (2), ones (3)) 544s ***** error cauchyrnd (i, 2, 3) 544s ***** error cauchyrnd (1, i, 3) 544s ***** error ... 544s cauchyrnd (1, 2, -1) 544s ***** error ... 544s cauchyrnd (1, 2, 1.2) 544s ***** error ... 544s cauchyrnd (1, 2, ones (2)) 544s ***** error ... 544s cauchyrnd (1, 2, [2 -1 2]) 544s ***** error ... 544s cauchyrnd (1, 2, [2 0 2.5]) 544s ***** error ... 544s cauchyrnd (1, 2, 2, -1, 5) 544s ***** error ... 544s cauchyrnd (1, 2, 2, 1.5, 5) 544s ***** error ... 544s cauchyrnd (2, ones (2), 3) 544s ***** error ... 544s cauchyrnd (2, ones (2), [3, 2]) 544s ***** error ... 544s cauchyrnd (2, ones (2), 3, 2) 544s 33 tests, 33 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/poissrnd.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/poissrnd.m 544s ***** assert (size (poissrnd (2)), [1, 1]) 544s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 544s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 544s ***** assert (size (poissrnd (1, 3)), [3, 3]) 544s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 544s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 544s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 544s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 544s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 544s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 544s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 544s ***** assert (poissrnd (0, 1, 1), 0) 544s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 544s ***** assert (class (poissrnd (2)), "double") 544s ***** assert (class (poissrnd (single (2))), "single") 544s ***** assert (class (poissrnd (single ([2 2]))), "single") 544s ***** error poissrnd () 544s ***** error poissrnd (i) 544s ***** error ... 544s poissrnd (1, -1) 544s ***** error ... 544s poissrnd (1, 1.2) 544s ***** error ... 544s poissrnd (1, ones (2)) 544s ***** error ... 544s poissrnd (1, [2 -1 2]) 544s ***** error ... 544s poissrnd (1, [2 0 2.5]) 544s ***** error ... 544s poissrnd (ones (2), ones (2)) 544s ***** error ... 544s poissrnd (1, 2, -1, 5) 544s ***** error ... 544s poissrnd (1, 2, 1.5, 5) 544s ***** error poissrnd (ones (2,2), 3) 544s ***** error poissrnd (ones (2,2), [3, 2]) 544s ***** error poissrnd (ones (2,2), 2, 3) 544s 29 tests, 29 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/ncx2cdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncx2cdf.m 544s ***** demo 544s ## Plot various CDFs from the noncentral chi-squared distribution 544s x = 0:0.1:10; 544s p1 = ncx2cdf (x, 2, 1); 544s p2 = ncx2cdf (x, 2, 2); 544s p3 = ncx2cdf (x, 2, 3); 544s p4 = ncx2cdf (x, 4, 1); 544s p5 = ncx2cdf (x, 4, 2); 544s p6 = ncx2cdf (x, 4, 3); 544s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 544s x, p4, "-m", x, p5, "-c", x, p6, "-y") 544s grid on 544s xlim ([0, 10]) 544s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 544s "df = 2, λ = 3", "df = 4, λ = 1", ... 544s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 544s title ("Noncentral chi-squared CDF") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** demo 544s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 544s ## chi-squared CDF with the same number of degrees of freedom (4). 544s 544s x = 0:0.1:10; 544s p1 = ncx2cdf (x, 4, 2); 544s p2 = chi2cdf (x, 4); 544s plot (x, p1, "-", x, p2, "-") 544s grid on 544s xlim ([0, 10]) 544s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 544s title ("Noncentral chi-squared vs chi-squared CDFs") 544s xlabel ("values in x") 544s ylabel ("probability") 544s ***** test 544s x = -2:0.1:2; 544s p = ncx2cdf (x, 10, 1); 544s assert (p([1:21]), zeros (1, 21), 3e-84); 544s assert (p(22), 1.521400636466575e-09, 1e-14); 544s assert (p(30), 6.665480510026046e-05, 1e-14); 544s assert (p(41), 0.002406447308399836, 1e-14); 544s ***** test 544s p = ncx2cdf (12, 10, 3); 544s assert (p, 0.4845555602398649, 1e-14); 544s ***** test 544s p = ncx2cdf (2, 3, 2); 544s assert (p, 0.2207330870741212, 1e-14); 544s ***** test 544s p = ncx2cdf (2, 3, 2, "upper"); 544s assert (p, 0.7792669129258789, 1e-14); 544s ***** test 544s p = ncx2cdf ([3, 6], 3, 2, "upper"); 544s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 544s ***** error ncx2cdf () 544s ***** error ncx2cdf (1) 544s ***** error ncx2cdf (1, 2) 544s ***** error ncx2cdf (1, 2, 3, "tail") 544s ***** error ncx2cdf (1, 2, 3, 4) 544s ***** error ... 544s ncx2cdf (ones (3), ones (2), ones (2)) 544s ***** error ... 544s ncx2cdf (ones (2), ones (3), ones (2)) 544s ***** error ... 544s ncx2cdf (ones (2), ones (2), ones (3)) 544s ***** error ncx2cdf (i, 2, 2) 544s ***** error ncx2cdf (2, i, 2) 544s ***** error ncx2cdf (2, 2, i) 544s 16 tests, 16 passed, 0 known failure, 0 skipped 544s [inst/dist_fun/wishpdf.m] 544s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wishpdf.m 544s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 544s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 544s ***** 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); 544s ***** error wishpdf () 544s ***** error wishpdf (1, 2) 545s ***** error wishpdf (1, 2, 0) 545s ***** error wishpdf (1, 2) 545s 7 tests, 7 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/copulacdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/copulacdf.m 545s ***** test 545s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 545s theta = [1; 2]; 545s p = copulacdf ("Clayton", x, theta); 545s expected_p = [0.1395; 0.1767]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 545s p = copulacdf ("Gumbel", x, 2); 545s expected_p = [0.1464; 0.1464]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 545s theta = [1; 2]; 545s p = copulacdf ("Frank", x, theta); 545s expected_p = [0.0699; 0.0930]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 545s theta = [0.3; 0.7]; 545s p = copulacdf ("AMH", x, theta); 545s expected_p = [0.0629; 0.0959]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 545s theta = [0.2, 0.1, 0.1, 0.05]; 545s p = copulacdf ("FGM", x, theta); 545s expected_p = [0.0558; 0.0293]; 545s assert (p, expected_p, 0.001); 545s 5 tests, 5 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/mvtrnd.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvtrnd.m 545s ***** test 545s rho = [1, 0.5; 0.5, 1]; 545s df = 3; 545s n = 10; 545s r = mvtrnd (rho, df, n); 545s assert (size (r), [10, 2]); 545s ***** test 545s rho = [1, 0.5; 0.5, 1]; 545s df = [2; 3]; 545s n = 2; 545s r = mvtrnd (rho, df, 2); 545s assert (size (r), [2, 2]); 545s 2 tests, 2 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/plinv.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/plinv.m 545s ***** demo 545s ## Plot various iCDFs from the Piecewise linear distribution 545s p = 0.001:0.001:0.999; 545s x1 = [0, 1, 3, 4, 7, 10]; 545s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 545s x2 = [0, 2, 5, 6, 7, 8]; 545s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 545s data1 = plinv (p, x1, Fx1); 545s data2 = plinv (p, x2, Fx2); 545s plot (p, data1, "-b", p, data2, "-g") 545s grid on 545s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 545s title ("Piecewise linear iCDF") 545s xlabel ("probability") 545s ylabel ("values in data") 545s ***** test 545s p = 0:0.2:1; 545s data = plinv (p, [0, 1], [0, 1]); 545s assert (data, p); 545s ***** test 545s p = 0:0.2:1; 545s data = plinv (p, [0, 2], [0, 1]); 545s assert (data, 2 * p); 545s ***** test 545s p = 0:0.2:1; 545s data_out = 1:6; 545s data = plinv (p, [0, 1], [0, 0.5]); 545s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 545s ***** test 545s p = 0:0.2:1; 545s data_out = 1:6; 545s data = plinv (p, [0, 0.5], [0, 1]); 545s assert (data, [0:0.1:0.5]); 545s ***** error plinv () 545s ***** error plinv (1) 545s ***** error plinv (1, 2) 545s ***** error ... 545s plinv (1, [0, 1, 2], [0, 1]) 545s ***** error ... 545s plinv (1, [0], [1]) 545s ***** error ... 545s plinv (1, [0, 1, 2], [0, 1, 1.5]) 545s ***** error ... 545s plinv (1, [0, 1, 2], [0, i, 1]) 545s ***** error ... 545s plinv (i, [0, 1, 2], [0, 0.5, 1]) 545s ***** error ... 545s plinv (1, [0, i, 2], [0, 0.5, 1]) 545s ***** error ... 545s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 545s 14 tests, 14 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/raylrnd.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/raylrnd.m 545s ***** assert (size (raylrnd (2)), [1, 1]) 545s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 545s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 545s ***** assert (size (raylrnd (1, 3)), [3, 3]) 545s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 545s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 545s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 545s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 545s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 545s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 545s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 545s ***** assert (raylrnd (0, 1, 1), NaN) 545s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 545s ***** assert (class (raylrnd (2)), "double") 545s ***** assert (class (raylrnd (single (2))), "single") 545s ***** assert (class (raylrnd (single ([2 2]))), "single") 545s ***** error raylrnd () 545s ***** error raylrnd (i) 545s ***** error ... 545s raylrnd (1, -1) 545s ***** error ... 545s raylrnd (1, 1.2) 545s ***** error ... 545s raylrnd (1, ones (2)) 545s ***** error ... 545s raylrnd (1, [2 -1 2]) 545s ***** error ... 545s raylrnd (1, [2 0 2.5]) 545s ***** error ... 545s raylrnd (ones (2), ones (2)) 545s ***** error ... 545s raylrnd (1, 2, -1, 5) 545s ***** error ... 545s raylrnd (1, 2, 1.5, 5) 545s ***** error raylrnd (ones (2,2), 3) 545s ***** error raylrnd (ones (2,2), [3, 2]) 545s ***** error raylrnd (ones (2,2), 2, 3) 545s 29 tests, 29 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/unidpdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unidpdf.m 545s ***** demo 545s ## Plot various PDFs from the discrete uniform distribution 545s x = 0:10; 545s y1 = unidpdf (x, 5); 545s y2 = unidpdf (x, 9); 545s plot (x, y1, "*b", x, y2, "*g") 545s grid on 545s xlim ([0, 10]) 545s ylim ([0, 0.25]) 545s legend ({"N = 5", "N = 9"}, "location", "northeast") 545s title ("Descrete uniform PDF") 545s xlabel ("values in x") 545s ylabel ("density") 545s ***** shared x, y 545s x = [-1 0 1 2 10 11]; 545s y = [0 0 0.1 0.1 0.1 0]; 545s ***** assert (unidpdf (x, 10*ones (1,6)), y) 545s ***** assert (unidpdf (x, 10), y) 545s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 545s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 545s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 545s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 545s ***** error unidpdf () 545s ***** error unidpdf (1) 545s ***** error ... 545s unidpdf (ones (3), ones (2)) 545s ***** error ... 545s unidpdf (ones (2), ones (3)) 545s ***** error unidpdf (i, 2) 545s ***** error unidpdf (2, i) 545s 12 tests, 12 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/betacdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/betacdf.m 545s ***** demo 545s ## Plot various CDFs from the Beta distribution 545s x = 0:0.005:1; 545s p1 = betacdf (x, 0.5, 0.5); 545s p2 = betacdf (x, 5, 1); 545s p3 = betacdf (x, 1, 3); 545s p4 = betacdf (x, 2, 2); 545s p5 = betacdf (x, 2, 5); 545s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 545s grid on 545s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 545s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 545s title ("Beta CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** shared x, y, x1, x2 545s x = [-1 0 0.5 1 2]; 545s y = [0 0 0.75 1 1]; 545s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 545s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 545s ***** assert (betacdf (x, ones (1, 5), 2), y) 545s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 545s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 545s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 545s x1 = [0.1:0.2:0.9]; 545s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 545s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 545s 1e-14); 545s x2 = [1, 2, 3]; 545s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 545s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 545s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 545s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 545s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 545s ***** error betacdf () 545s ***** error betacdf (1) 545s ***** error betacdf (1, 2) 545s ***** error betacdf (1, 2, 3, 4, 5) 545s ***** error betacdf (1, 2, 3, "tail") 545s ***** error betacdf (1, 2, 3, 4) 545s ***** error ... 545s betacdf (ones (3), ones (2), ones (2)) 545s ***** error ... 545s betacdf (ones (2), ones (3), ones (2)) 545s ***** error ... 545s betacdf (ones (2), ones (2), ones (3)) 545s ***** error betacdf (i, 2, 2) 545s ***** error betacdf (2, i, 2) 545s ***** error betacdf (2, 2, i) 545s 25 tests, 25 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/invgcdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/invgcdf.m 545s ***** demo 545s ## Plot various CDFs from the inverse Gaussian distribution 545s x = 0:0.001:3; 545s p1 = invgcdf (x, 1, 0.2); 545s p2 = invgcdf (x, 1, 1); 545s p3 = invgcdf (x, 1, 3); 545s p4 = invgcdf (x, 3, 0.2); 545s p5 = invgcdf (x, 3, 1); 545s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 545s grid on 545s xlim ([0, 3]) 545s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 545s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 545s title ("Inverse Gaussian CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** shared x, p1, p1u, y2, y2u, y3, y3u 545s x = [-Inf, -1, 0, 1/2, 1, Inf]; 545s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 545s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 545s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 545s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 545s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 545s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 545s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 545s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 545s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 545s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 545s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 545s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 545s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 545s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 545s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 545s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 545s ***** error invgcdf () 545s ***** error invgcdf (1) 545s ***** error invgcdf (1, 2) 545s ***** error invgcdf (1, 2, 3, "tail") 545s ***** error invgcdf (1, 2, 3, 5) 545s ***** error ... 545s invgcdf (ones (3), ones (2), ones(2)) 545s ***** error ... 545s invgcdf (ones (2), ones (3), ones(2)) 545s ***** error ... 545s invgcdf (ones (2), ones (2), ones(3)) 545s ***** error invgcdf (i, 2, 3) 545s ***** error invgcdf (1, i, 3) 545s ***** error invgcdf (1, 2, i) 545s 25 tests, 25 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/gevcdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gevcdf.m 545s ***** demo 545s ## Plot various CDFs from the generalized extreme value distribution 545s x = -1:0.001:10; 545s p1 = gevcdf (x, 1, 1, 1); 545s p2 = gevcdf (x, 0.5, 1, 1); 545s p3 = gevcdf (x, 1, 1, 5); 545s p4 = gevcdf (x, 1, 2, 5); 545s p5 = gevcdf (x, 1, 5, 5); 545s p6 = gevcdf (x, 1, 0.5, 5); 545s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 545s x, p4, "-c", x, p5, "-m", x, p6, "-k") 545s grid on 545s xlim ([-1, 10]) 545s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 545s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 545s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 545s "location", "southeast") 545s title ("Generalized extreme value CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** test 545s x = 0:0.5:2.5; 545s sigma = 1:6; 545s k = 1; 545s mu = 0; 545s p = gevcdf (x, k, sigma, mu); 545s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = -0.5:0.5:2.5; 545s sigma = 0.5; 545s k = 1; 545s mu = 0; 545s p = gevcdf (x, k, sigma, mu); 545s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 545s assert (p, expected_p, 0.001); 545s ***** test # check for continuity for k near 0 545s x = 1; 545s sigma = 0.5; 545s k = -0.03:0.01:0.03; 545s mu = 0; 545s p = gevcdf (x, k, sigma, mu); 545s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 545s assert (p, expected_p, 0.001); 545s ***** error gevcdf () 545s ***** error gevcdf (1) 545s ***** error gevcdf (1, 2) 545s ***** error gevcdf (1, 2, 3) 545s ***** error ... 545s gevcdf (1, 2, 3, 4, 5, 6) 545s ***** error gevcdf (1, 2, 3, 4, "tail") 545s ***** error gevcdf (1, 2, 3, 4, 5) 545s ***** error ... 545s gevcdf (ones (3), ones (2), ones(2), ones(2)) 545s ***** error ... 545s gevcdf (ones (2), ones (3), ones(2), ones(2)) 545s ***** error ... 545s gevcdf (ones (2), ones (2), ones(3), ones(2)) 545s ***** error ... 545s gevcdf (ones (2), ones (2), ones(2), ones(3)) 545s ***** error gevcdf (i, 2, 3, 4) 545s ***** error gevcdf (1, i, 3, 4) 545s ***** error gevcdf (1, 2, i, 4) 545s ***** error gevcdf (1, 2, 3, i) 545s 18 tests, 18 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/expcdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/expcdf.m 545s ***** demo 545s ## Plot various CDFs from the exponential distribution 545s x = 0:0.01:5; 545s p1 = expcdf (x, 2/3); 545s p2 = expcdf (x, 1.0); 545s p3 = expcdf (x, 2.0); 545s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 545s grid on 545s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 545s title ("Exponential CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** shared x, p 545s x = [-1 0 0.5 1 Inf]; 545s p = [0, 1 - exp(-x(2:end)/2)]; 545s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 545s ***** assert (expcdf (x, 2), p, 1e-16) 545s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 545s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 545s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 545s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 545s ***** test 545s [p, plo, pup] = expcdf (1, 2, 3); 545s assert (p, 0.39346934028737, 1e-14); 545s assert (plo, 0.08751307220484, 1e-14); 545s assert (pup, 0.93476821257933, 1e-14); 545s ***** test 545s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 545s assert (p, 0.39346934028737, 1e-14); 545s assert (plo, 0.14466318041675, 1e-14); 545s assert (pup, 0.79808291849140, 1e-14); 545s ***** test 545s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 545s assert (p, 0.60653065971263, 1e-14); 545s assert (plo, 0.20191708150860, 1e-14); 545s assert (pup, 0.85533681958325, 1e-14); 545s ***** error expcdf () 545s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 545s ***** error expcdf (1, 2, 3, 4, "uper") 545s ***** error ... 545s expcdf (ones (3), ones (2)) 545s ***** error ... 545s expcdf (2, 3, [1, 2]) 545s ***** error ... 545s [p, plo, pup] = expcdf (1, 2) 545s ***** error [p, plo, pup] = ... 545s expcdf (1, 2, 3, 0) 545s ***** error [p, plo, pup] = ... 545s expcdf (1, 2, 3, 1.22) 545s ***** error [p, plo, pup] = ... 545s expcdf (1, 2, 3, "alpha", "upper") 545s ***** error expcdf (i, 2) 545s ***** error expcdf (2, i) 545s ***** error ... 545s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 545s 21 tests, 21 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/lognpdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/lognpdf.m 545s ***** demo 545s ## Plot various PDFs from the log-normal distribution 545s x = 0:0.01:5; 545s y1 = lognpdf (x, 0, 1); 545s y2 = lognpdf (x, 0, 0.5); 545s y3 = lognpdf (x, 0, 0.25); 545s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 545s grid on 545s ylim ([0, 2]) 545s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 545s "location", "northeast") 545s title ("Log-normal PDF") 545s xlabel ("values in x") 545s ylabel ("density") 545s ***** shared x, y 545s x = [-1 0 e Inf]; 545s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 545s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 545s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 545s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 545s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 545s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 545s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 545s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 545s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 545s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 545s ***** error lognpdf () 545s ***** error lognpdf (1,2,3,4) 545s ***** error lognpdf (ones (3), ones (2), ones (2)) 545s ***** error lognpdf (ones (2), ones (3), ones (2)) 545s ***** error lognpdf (ones (2), ones (2), ones (3)) 545s ***** error lognpdf (i, 2, 2) 545s ***** error lognpdf (2, i, 2) 545s ***** error lognpdf (2, 2, i) 545s 17 tests, 17 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/ricecdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ricecdf.m 545s ***** demo 545s ## Plot various CDFs from the Rician distribution 545s x = 0:0.01:10; 545s p1 = ricecdf (x, 0, 1); 545s p2 = ricecdf (x, 0.5, 1); 545s p3 = ricecdf (x, 1, 1); 545s p4 = ricecdf (x, 2, 1); 545s p5 = ricecdf (x, 4, 1); 545s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 545s grid on 545s ylim ([0, 1]) 545s xlim ([0, 8]) 545s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 545s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 545s title ("Rician CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** demo 545s ## Plot various CDFs from the Rician distribution 545s x = 0:0.01:10; 545s p1 = ricecdf (x, 0, 0.5); 545s p2 = ricecdf (x, 0, 2); 545s p3 = ricecdf (x, 0, 3); 545s p4 = ricecdf (x, 2, 2); 545s p5 = ricecdf (x, 4, 2); 545s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 545s grid on 545s ylim ([0, 1]) 545s xlim ([0, 8]) 545s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 545s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 545s title ("Rician CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** test 545s x = 0:0.5:2.5; 545s s = 1:6; 545s p = ricecdf (x, s, 1); 545s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = 0:0.5:2.5; 545s sigma = 1:6; 545s p = ricecdf (x, 1, sigma); 545s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = 0:0.5:2.5; 545s p = ricecdf (x, 0, 1); 545s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 545s assert (p, expected_p, 0.001); 545s ***** test 545s x = 0:0.5:2.5; 545s p = ricecdf (x, 1, 1); 545s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 545s assert (p, expected_p, 0.001); 545s ***** shared x, p 545s x = [-1, 0, 1, 2, Inf]; 545s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 545s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 545s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 545s ***** error ricecdf () 545s ***** error ricecdf (1) 545s ***** error ricecdf (1, 2) 545s ***** error ricecdf (1, 2, 3, "uper") 545s ***** error ricecdf (1, 2, 3, 4) 545s ***** error ... 545s ricecdf (ones (3), ones (2), ones (2)) 545s ***** error ... 545s ricecdf (ones (2), ones (3), ones (2)) 545s ***** error ... 545s ricecdf (ones (2), ones (2), ones (3)) 545s ***** error ricecdf (i, 2, 3) 545s ***** error ricecdf (2, i, 3) 545s ***** error ricecdf (2, 2, i) 545s 17 tests, 17 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/laplacernd.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/laplacernd.m 545s ***** assert (size (laplacernd (1, 1)), [1 1]) 545s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 545s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 545s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 545s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 545s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 545s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 545s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 545s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 545s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 545s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 545s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 545s ***** assert (class (laplacernd (1, 1)), "double") 545s ***** assert (class (laplacernd (1, single (1))), "single") 545s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 545s ***** assert (class (laplacernd (single (1), 1)), "single") 545s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 545s ***** error laplacernd () 545s ***** error laplacernd (1) 545s ***** error ... 545s laplacernd (ones (3), ones (2)) 545s ***** error ... 545s laplacernd (ones (2), ones (3)) 545s ***** error laplacernd (i, 2, 3) 545s ***** error laplacernd (1, i, 3) 545s ***** error ... 545s laplacernd (1, 2, -1) 545s ***** error ... 545s laplacernd (1, 2, 1.2) 545s ***** error ... 545s laplacernd (1, 2, ones (2)) 545s ***** error ... 545s laplacernd (1, 2, [2 -1 2]) 545s ***** error ... 545s laplacernd (1, 2, [2 0 2.5]) 545s ***** error ... 545s laplacernd (1, 2, 2, -1, 5) 545s ***** error ... 545s laplacernd (1, 2, 2, 1.5, 5) 545s ***** error ... 545s laplacernd (2, ones (2), 3) 545s ***** error ... 545s laplacernd (2, ones (2), [3, 2]) 545s ***** error ... 545s laplacernd (2, ones (2), 3, 2) 545s 33 tests, 33 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/unidcdf.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unidcdf.m 545s ***** demo 545s ## Plot various CDFs from the discrete uniform distribution 545s x = 0:10; 545s p1 = unidcdf (x, 5); 545s p2 = unidcdf (x, 9); 545s plot (x, p1, "*b", x, p2, "*g") 545s grid on 545s xlim ([0, 10]) 545s ylim ([0, 1]) 545s legend ({"N = 5", "N = 9"}, "location", "southeast") 545s title ("Discrete uniform CDF") 545s xlabel ("values in x") 545s ylabel ("probability") 545s ***** shared x, y 545s x = [0 1 2.5 10 11]; 545s y = [0, 0.1 0.2 1.0 1.0]; 545s ***** assert (unidcdf (x, 10*ones (1,5)), y) 545s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 545s ***** assert (unidcdf (x, 10), y) 545s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 545s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 545s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 545s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 545s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 545s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 545s ***** error unidcdf () 545s ***** error unidcdf (1) 545s ***** error unidcdf (1, 2, 3) 545s ***** error unidcdf (1, 2, "tail") 545s ***** error ... 545s unidcdf (ones (3), ones (2)) 545s ***** error ... 545s unidcdf (ones (2), ones (3)) 545s ***** error unidcdf (i, 2) 545s ***** error unidcdf (2, i) 545s 17 tests, 17 passed, 0 known failure, 0 skipped 545s [inst/dist_fun/ncfinv.m] 545s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncfinv.m 545s ***** demo 545s ## Plot various iCDFs from the noncentral F distribution 545s p = 0.001:0.001:0.999; 545s x1 = ncfinv (p, 2, 5, 1); 545s x2 = ncfinv (p, 2, 5, 2); 545s x3 = ncfinv (p, 5, 10, 1); 545s x4 = ncfinv (p, 10, 20, 10); 545s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 545s grid on 545s ylim ([0, 5]) 545s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 545s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 545s "location", "northwest") 545s title ("Noncentral F iCDF") 545s xlabel ("probability") 545s ylabel ("values in x") 545s ***** demo 545s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 545s ## same number of numerator and denominator degrees of freedom (5, 20) 545s 545s p = 0.001:0.001:0.999; 545s x1 = ncfinv (p, 5, 20, 10); 545s x2 = finv (p, 5, 20); 545s plot (p, x1, "-", p, x2, "-"); 545s grid on 545s ylim ([0, 10]) 545s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 545s title ("Noncentral F vs F quantile functions") 545s xlabel ("probability") 545s ylabel ("values in x") 545s ***** test 545s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 545s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 545s ***** test 545s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 545s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 545s ***** test 545s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 545s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 545s ***** test 545s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 545s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 545s ***** test 545s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 545s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 545s ***** test 545s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 545s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 546s ***** test 546s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 546s ***** error ncfinv () 546s ***** error ncfinv (1) 546s ***** error ncfinv (1, 2) 546s ***** error ncfinv (1, 2, 3) 546s ***** error ... 546s ncfinv (ones (3), ones (2), ones (2), ones (2)) 546s ***** error ... 546s ncfinv (ones (2), ones (3), ones (2), ones (2)) 546s ***** error ... 546s ncfinv (ones (2), ones (2), ones (3), ones (2)) 546s ***** error ... 546s ncfinv (ones (2), ones (2), ones (2), ones (3)) 546s ***** error ncfinv (i, 2, 2, 2) 546s ***** error ncfinv (2, i, 2, 2) 546s ***** error ncfinv (2, 2, i, 2) 546s ***** error ncfinv (2, 2, 2, i) 546s 19 tests, 19 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/mvtpdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvtpdf.m 546s ***** demo 546s ## Compute the pdf of a multivariate t distribution with correlation 546s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 546s 546s rho = [1, 0.4; 0.4, 1]; 546s df = 2; 546s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 546s X = [X1(:), X2(:)]; 546s y = mvtpdf (X, rho, df); 546s surf (X1, X2, reshape (y, 25, 25)); 546s title ("Bivariate Student's t probability density function"); 546s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 546s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 546s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 546s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 546s [0.04713313 0.03722421 0.02069011]', 1E-7) 546s 3 tests, 3 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/ncfpdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncfpdf.m 546s ***** demo 546s ## Plot various PDFs from the noncentral F distribution 546s x = 0:0.01:5; 546s y1 = ncfpdf (x, 2, 5, 1); 546s y2 = ncfpdf (x, 2, 5, 2); 546s y3 = ncfpdf (x, 5, 10, 1); 546s y4 = ncfpdf (x, 10, 20, 10); 546s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 546s grid on 546s xlim ([0, 5]) 546s ylim ([0, 0.8]) 546s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 546s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 546s "location", "northeast") 546s title ("Noncentral F PDF") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** demo 546s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 546s ## same number of numerator and denominator degrees of freedom (5, 20) 546s 546s x = 0.01:0.1:10.01; 546s y1 = ncfpdf (x, 5, 20, 10); 546s y2 = fpdf (x, 5, 20); 546s plot (x, y1, "-", x, y2, "-"); 546s grid on 546s xlim ([0, 10]) 546s ylim ([0, 0.8]) 546s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 546s title ("Noncentral F vs F PDFs") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** shared x1, df1, df2, lambda 546s x1 = [-Inf, 2, NaN, 4, Inf]; 546s df1 = [2, 0, -1, 1, 4]; 546s df2 = [2, 4, 5, 6, 8]; 546s lambda = [1, NaN, 3, -1, 2]; 546s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 546s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 546s 0.05607937264237208, NaN], 1e-14); 546s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 546s 0.080125760971946518, NaN], 1e-14); 546s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 546s 0.0715902008258656, NaN], 1e-14); 546s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 546s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 546s NaN, 0.2152571783045893], 1e-14); 546s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 546s NaN, 0.05560846335398539], 1e-14); 546s ***** error ncfpdf () 546s ***** error ncfpdf (1) 546s ***** error ncfpdf (1, 2) 546s ***** error ncfpdf (1, 2, 3) 546s ***** error ... 546s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 546s ***** error ... 546s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 546s ***** error ... 546s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 546s ***** error ... 546s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 546s ***** error ncfpdf (i, 2, 2, 2) 546s ***** error ncfpdf (2, i, 2, 2) 546s ***** error ncfpdf (2, 2, i, 2) 546s ***** error ncfpdf (2, 2, 2, i) 546s 19 tests, 19 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/tcdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tcdf.m 546s ***** demo 546s ## Plot various CDFs from the Student's T distribution 546s x = -5:0.01:5; 546s p1 = tcdf (x, 1); 546s p2 = tcdf (x, 2); 546s p3 = tcdf (x, 5); 546s p4 = tcdf (x, Inf); 546s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 546s grid on 546s xlim ([-5, 5]) 546s ylim ([0, 1]) 546s legend ({"df = 1", "df = 2", ... 546s "df = 5", 'df = \infty'}, "location", "southeast") 546s title ("Student's T CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** shared x,y 546s x = [-Inf 0 1 Inf]; 546s y = [0 1/2 3/4 1]; 546s ***** assert (tcdf (x, ones (1,4)), y, eps) 546s ***** assert (tcdf (x, 1), y, eps) 546s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 546s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 546s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 546s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 546s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 546s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 546s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 546s ***** error tcdf () 546s ***** error tcdf (1) 546s ***** error tcdf (1, 2, "uper") 546s ***** error tcdf (1, 2, 3) 546s ***** error ... 546s tcdf (ones (3), ones (2)) 546s ***** error ... 546s tcdf (ones (3), ones (2)) 546s ***** error ... 546s tcdf (ones (3), ones (2), "upper") 546s ***** error tcdf (i, 2) 546s ***** error tcdf (2, i) 546s ***** shared tol_rel 546s tol_rel = 10 * eps; 546s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 546s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 546s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 546s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 546s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 546s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 546s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 546s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 546s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 546s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 546s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 546s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 546s 30 tests, 30 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/nbinrnd.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nbinrnd.m 546s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 546s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 546s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 546s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 546s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 546s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 546s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 546s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 546s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 546s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 546s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 546s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 546s ***** assert (class (nbinrnd (1, 0.5)), "double") 546s ***** assert (class (nbinrnd (1, single (0.5))), "single") 546s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 546s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 546s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 546s ***** error nbinrnd () 546s ***** error nbinrnd (1) 546s ***** error ... 546s nbinrnd (ones (3), ones (2)) 546s ***** error ... 546s nbinrnd (ones (2), ones (3)) 546s ***** error nbinrnd (i, 2, 3) 546s ***** error nbinrnd (1, i, 3) 546s ***** error ... 546s nbinrnd (1, 2, -1) 546s ***** error ... 546s nbinrnd (1, 2, 1.2) 546s ***** error ... 546s nbinrnd (1, 2, ones (2)) 546s ***** error ... 546s nbinrnd (1, 2, [2 -1 2]) 546s ***** error ... 546s nbinrnd (1, 2, [2 0 2.5]) 546s ***** error ... 546s nbinrnd (1, 2, 2, -1, 5) 546s ***** error ... 546s nbinrnd (1, 2, 2, 1.5, 5) 546s ***** error ... 546s nbinrnd (2, ones (2), 3) 546s ***** error ... 546s nbinrnd (2, ones (2), [3, 2]) 546s ***** error ... 546s nbinrnd (2, ones (2), 3, 2) 546s 33 tests, 33 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/chi2cdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/chi2cdf.m 546s ***** demo 546s ## Plot various CDFs from the chi-squared distribution 546s x = 0:0.01:8; 546s p1 = chi2cdf (x, 1); 546s p2 = chi2cdf (x, 2); 546s p3 = chi2cdf (x, 3); 546s p4 = chi2cdf (x, 4); 546s p5 = chi2cdf (x, 6); 546s p6 = chi2cdf (x, 9); 546s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 546s x, p4, "-c", x, p5, "-m", x, p6, "-y") 546s grid on 546s xlim ([0, 8]) 546s legend ({"df = 1", "df = 2", "df = 3", ... 546s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 546s title ("Chi-squared CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** shared x, p, u 546s x = [-1, 0, 0.5, 1, 2]; 546s p = [0, (1 - exp (-x(2:end) / 2))]; 546s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 546s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 546s ***** assert (chi2cdf (x, 2), p, eps) 546s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 546s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 546s [p(1), 1, NaN, u(4:5)], eps) 546s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 546s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 546s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 546s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 546s ***** error chi2cdf () 546s ***** error chi2cdf (1) 546s ***** error chi2cdf (1, 2, 3, 4) 546s ***** error chi2cdf (1, 2, 3) 546s ***** error chi2cdf (1, 2, "uper") 546s ***** error ... 546s chi2cdf (ones (3), ones (2)) 546s ***** error ... 546s chi2cdf (ones (2), ones (3)) 546s ***** error chi2cdf (i, 2) 546s ***** error chi2cdf (2, i) 546s 17 tests, 17 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/burrrnd.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/burrrnd.m 546s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 546s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 546s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 546s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 546s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 546s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 546s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 546s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 546s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 546s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 546s ***** assert (class (burrrnd (1,1,1)), "double") 546s ***** assert (class (burrrnd (single (1),1,1)), "single") 546s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 546s ***** assert (class (burrrnd (1,single (1),1)), "single") 546s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 546s ***** assert (class (burrrnd (1,1,single (1))), "single") 546s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 546s ***** error burrrnd () 546s ***** error burrrnd (1) 546s ***** error burrrnd (1, 2) 546s ***** error ... 546s burrrnd (ones (3), ones (2), ones (2)) 546s ***** error ... 546s burrrnd (ones (2), ones (3), ones (2)) 546s ***** error ... 546s burrrnd (ones (2), ones (2), ones (3)) 546s ***** error burrrnd (i, 2, 3) 546s ***** error burrrnd (1, i, 3) 546s ***** error burrrnd (1, 2, i) 546s ***** error ... 546s burrrnd (1, 2, 3, -1) 546s ***** error ... 546s burrrnd (1, 2, 3, 1.2) 546s ***** error ... 546s burrrnd (1, 2, 3, ones (2)) 546s ***** error ... 546s burrrnd (1, 2, 3, [2 -1 2]) 546s ***** error ... 546s burrrnd (1, 2, 3, [2 0 2.5]) 546s ***** error ... 546s burrrnd (1, 2, 3, 2, -1, 5) 546s ***** error ... 546s burrrnd (1, 2, 3, 2, 1.5, 5) 546s ***** error ... 546s burrrnd (2, ones (2), 2, 3) 546s ***** error ... 546s burrrnd (2, ones (2), 2, [3, 2]) 546s ***** error ... 546s burrrnd (2, ones (2), 2, 3, 2) 546s 36 tests, 36 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/tlspdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tlspdf.m 546s ***** demo 546s ## Plot various PDFs from the Student's T distribution 546s x = -8:0.01:8; 546s y1 = tlspdf (x, 0, 1, 1); 546s y2 = tlspdf (x, 0, 2, 2); 546s y3 = tlspdf (x, 3, 2, 5); 546s y4 = tlspdf (x, -1, 3, Inf); 546s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 546s grid on 546s xlim ([-8, 8]) 546s ylim ([0, 0.41]) 546s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 546s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 546s "location", "northwest") 546s title ("Location-scale Student's T PDF") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** test 546s x = rand (10,1); 546s y = 1./(pi * (1 + x.^2)); 546s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 546s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 546s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 546s ***** shared x, y 546s x = [-Inf 0 0.5 1 Inf]; 546s y = 1./(pi * (1 + x.^2)); 546s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 546s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 546s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 546s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 546s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 546s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 546s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 546s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 546s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 546s ***** error tlspdf () 546s ***** error tlspdf (1) 546s ***** error tlspdf (1, 2) 546s ***** error tlspdf (1, 2, 3) 546s ***** error ... 546s tlspdf (ones (3), ones (2), 1, 1) 546s ***** error ... 546s tlspdf (ones (2), 1, ones (3), 1) 546s ***** error ... 546s tlspdf (ones (2), 1, 1, ones (3)) 546s ***** error tlspdf (i, 2, 1, 1) 546s ***** error tlspdf (2, i, 1, 1) 546s ***** error tlspdf (2, 1, i, 1) 546s ***** error tlspdf (2, 1, 1, i) 546s 21 tests, 21 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/copulapdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/copulapdf.m 546s ***** test 546s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 546s theta = [1; 2]; 546s y = copulapdf ("Clayton", x, theta); 546s expected_p = [0.9872; 0.7295]; 546s assert (y, expected_p, 0.001); 546s ***** test 546s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 546s y = copulapdf ("Gumbel", x, 2); 546s expected_p = [0.9468; 0.9468]; 546s assert (y, expected_p, 0.001); 546s ***** test 546s x = [0.2, 0.6; 0.2, 0.6]; 546s theta = [1; 2]; 546s y = copulapdf ("Frank", x, theta); 546s expected_p = [0.9378; 0.8678]; 546s assert (y, expected_p, 0.001); 546s ***** test 546s x = [0.2, 0.6; 0.2, 0.6]; 546s theta = [0.3; 0.7]; 546s y = copulapdf ("AMH", x, theta); 546s expected_p = [0.9540; 0.8577]; 546s assert (y, expected_p, 0.001); 546s 4 tests, 4 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/jsupdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/jsupdf.m 546s ***** error jsupdf () 546s ***** error jsupdf (1, 2, 3, 4) 546s ***** error ... 546s jsupdf (1, ones (2), ones (3)) 546s 3 tests, 3 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/nakacdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nakacdf.m 546s ***** demo 546s ## Plot various CDFs from the Nakagami distribution 546s x = 0:0.01:3; 546s p1 = nakacdf (x, 0.5, 1); 546s p2 = nakacdf (x, 1, 1); 546s p3 = nakacdf (x, 1, 2); 546s p4 = nakacdf (x, 1, 3); 546s p5 = nakacdf (x, 2, 1); 546s p6 = nakacdf (x, 2, 2); 546s p7 = nakacdf (x, 5, 1); 546s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 546s x, p5, "-k", x, p6, "-b", x, p7, "-c") 546s grid on 546s xlim ([0, 3]) 546s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 546s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 546s "μ = 5, ω = 1"}, "location", "southeast") 546s title ("Nakagami CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** shared x, y 546s x = [-1, 0, 1, 2, Inf]; 546s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 546s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 546s ***** assert (nakacdf (x, 1, 1), y, eps) 546s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 546s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 546s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 546s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 546s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 546s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 546s ***** error nakacdf () 546s ***** error nakacdf (1) 546s ***** error nakacdf (1, 2) 546s ***** error nakacdf (1, 2, 3, "tail") 546s ***** error nakacdf (1, 2, 3, 4) 546s ***** error ... 546s nakacdf (ones (3), ones (2), ones (2)) 546s ***** error ... 546s nakacdf (ones (2), ones (3), ones (2)) 546s ***** error ... 546s nakacdf (ones (2), ones (2), ones (3)) 546s ***** error nakacdf (i, 2, 2) 546s ***** error nakacdf (2, i, 2) 546s ***** error nakacdf (2, 2, i) 546s 19 tests, 19 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/raylcdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/raylcdf.m 546s ***** demo 546s ## Plot various CDFs from the Rayleigh distribution 546s x = 0:0.01:10; 546s p1 = raylcdf (x, 0.5); 546s p2 = raylcdf (x, 1); 546s p3 = raylcdf (x, 2); 546s p4 = raylcdf (x, 3); 546s p5 = raylcdf (x, 4); 546s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 546s grid on 546s ylim ([0, 1]) 546s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 546s "σ = 3", "σ = 4"}, "location", "southeast") 546s title ("Rayleigh CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** test 546s x = 0:0.5:2.5; 546s sigma = 1:6; 546s p = raylcdf (x, sigma); 546s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 546s assert (p, expected_p, 0.001); 546s ***** test 546s x = 0:0.5:2.5; 546s p = raylcdf (x, 0.5); 546s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 546s assert (p, expected_p, 0.001); 546s ***** shared x, p 546s x = [-1, 0, 1, 2, Inf]; 546s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 546s ***** assert (raylcdf (x, 1), p, 1e-14) 546s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 546s ***** error raylcdf () 546s ***** error raylcdf (1) 546s ***** error raylcdf (1, 2, "uper") 546s ***** error raylcdf (1, 2, 3) 546s ***** error ... 546s raylcdf (ones (3), ones (2)) 546s ***** error ... 546s raylcdf (ones (2), ones (3)) 546s ***** error raylcdf (i, 2) 546s ***** error raylcdf (2, i) 546s 12 tests, 12 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/gumbelpdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gumbelpdf.m 546s ***** demo 546s ## Plot various PDFs from the Extreme value distribution 546s x = -5:0.001:20; 546s y1 = gumbelpdf (x, 0.5, 2); 546s y2 = gumbelpdf (x, 1.0, 2); 546s y3 = gumbelpdf (x, 1.5, 3); 546s y4 = gumbelpdf (x, 3.0, 4); 546s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 546s grid on 546s ylim ([0, 0.2]) 546s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 546s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 546s title ("Extreme value PDF") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** shared x, y0, y1 546s x = [-5, 0, 1, 2, 3]; 546s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 546s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 546s ***** assert (gumbelpdf (x), y0, 1e-4) 546s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 546s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 546s ***** error gumbelpdf () 546s ***** error ... 546s gumbelpdf (ones (3), ones (2), ones (2)) 546s ***** error gumbelpdf (i, 2, 2) 546s ***** error gumbelpdf (2, i, 2) 546s ***** error gumbelpdf (2, 2, i) 546s 8 tests, 8 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/logipdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logipdf.m 546s ***** demo 546s ## Plot various PDFs from the logistic distribution 546s x = -5:0.01:20; 546s y1 = logipdf (x, 5, 2); 546s y2 = logipdf (x, 9, 3); 546s y3 = logipdf (x, 9, 4); 546s y4 = logipdf (x, 6, 2); 546s y5 = logipdf (x, 2, 1); 546s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 546s grid on 546s ylim ([0, 0.3]) 546s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 546s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 546s title ("Logistic PDF") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** shared x, y 546s x = [-Inf -log(4) 0 log(4) Inf]; 546s y = [0, 0.16, 1/4, 0.16, 0]; 546s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 546s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 546s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 546s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 546s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 546s ***** error logipdf () 546s ***** error logipdf (1) 546s ***** error ... 546s logipdf (1, 2) 546s ***** error ... 546s logipdf (1, ones (2), ones (3)) 546s ***** error ... 546s logipdf (ones (2), 1, ones (3)) 546s ***** error ... 546s logipdf (ones (2), ones (3), 1) 546s ***** error logipdf (i, 2, 3) 546s ***** error logipdf (1, i, 3) 546s ***** error logipdf (1, 2, i) 546s 14 tests, 14 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/bvtcdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bvtcdf.m 546s ***** test 546s x = [1, 2]; 546s rho = [1, 0.5; 0.5, 1]; 546s df = 4; 546s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 546s ***** test 546s x = [3, 2;2, 4;1, 5]; 546s rho = [1, 0.5; 0.5, 1]; 546s df = 4; 546s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 546s 2 tests, 2 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/loglrnd.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/loglrnd.m 546s ***** assert (size (loglrnd (1, 1)), [1 1]) 546s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 546s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 546s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 546s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 546s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 546s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 546s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 546s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 546s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 546s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 546s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 546s ***** assert (class (loglrnd (1, 1)), "double") 546s ***** assert (class (loglrnd (1, single (1))), "single") 546s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 546s ***** assert (class (loglrnd (single (1), 1)), "single") 546s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 546s ***** error loglrnd () 546s ***** error loglrnd (1) 546s ***** error ... 546s loglrnd (ones (3), ones (2)) 546s ***** error ... 546s loglrnd (ones (2), ones (3)) 546s ***** error loglrnd (i, 2, 3) 546s ***** error loglrnd (1, i, 3) 546s ***** error ... 546s loglrnd (1, 2, -1) 546s ***** error ... 546s loglrnd (1, 2, 1.2) 546s ***** error ... 546s loglrnd (1, 2, ones (2)) 546s ***** error ... 546s loglrnd (1, 2, [2 -1 2]) 546s ***** error ... 546s loglrnd (1, 2, [2 0 2.5]) 546s ***** error ... 546s loglrnd (1, 2, 2, -1, 5) 546s ***** error ... 546s loglrnd (1, 2, 2, 1.5, 5) 546s ***** error ... 546s loglrnd (2, ones (2), 3) 546s ***** error ... 546s loglrnd (2, ones (2), [3, 2]) 546s ***** error ... 546s loglrnd (2, ones (2), 3, 2) 546s 33 tests, 33 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/hncdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hncdf.m 546s ***** demo 546s ## Plot various CDFs from the half-normal distribution 546s x = 0:0.001:10; 546s p1 = hncdf (x, 0, 1); 546s p2 = hncdf (x, 0, 2); 546s p3 = hncdf (x, 0, 3); 546s p4 = hncdf (x, 0, 5); 546s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 546s grid on 546s xlim ([0, 10]) 546s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 546s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 546s title ("Half-normal CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** demo 546s ## Plot half-normal against normal cumulative distribution function 546s x = -5:0.001:5; 546s p1 = hncdf (x, 0, 1); 546s p2 = normcdf (x); 546s plot (x, p1, "-b", x, p2, "-g") 546s grid on 546s xlim ([-5, 5]) 546s legend ({"half-normal with μ = 0, σ = 1", ... 546s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 546s title ("Half-normal against standard normal CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** shared x, p1, p1u, y2, y2u, y3, y3u 546s x = [-Inf, -1, 0, 1/2, 1, Inf]; 546s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 546s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 546s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 546s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 546s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 546s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 546s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 546s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 546s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 546s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 546s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 546s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 546s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 546s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 546s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 546s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 546s ***** error hncdf () 546s ***** error hncdf (1) 546s ***** error hncdf (1, 2) 546s ***** error hncdf (1, 2, 3, "tail") 546s ***** error hncdf (1, 2, 3, 5) 546s ***** error ... 546s hncdf (ones (3), ones (2), ones(2)) 546s ***** error ... 546s hncdf (ones (2), ones (3), ones(2)) 546s ***** error ... 546s hncdf (ones (2), ones (2), ones(3)) 546s ***** error hncdf (i, 2, 3) 546s ***** error hncdf (1, i, 3) 546s ***** error hncdf (1, 2, i) 546s 25 tests, 25 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/betarnd.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/betarnd.m 546s ***** assert (size (betarnd (2, 1/2)), [1 1]) 546s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 546s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 546s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 546s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 546s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 546s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 546s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 546s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 546s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 546s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 546s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 546s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 546s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 546s ***** assert (class (betarnd (1, 1)), "double") 546s ***** assert (class (betarnd (1, single (0))), "single") 546s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 546s ***** assert (class (betarnd (1, single (1), 2)), "single") 546s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 546s ***** assert (class (betarnd (single (1), 1, 2)), "single") 546s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 546s ***** error betarnd () 546s ***** error betarnd (1) 546s ***** error ... 546s betarnd (ones (3), ones (2)) 546s ***** error ... 546s betarnd (ones (2), ones (3)) 546s ***** error betarnd (i, 2) 546s ***** error betarnd (1, i) 546s ***** error ... 546s betarnd (1, 1/2, -1) 546s ***** error ... 546s betarnd (1, 1/2, 1.2) 546s ***** error ... 546s betarnd (1, 1/2, ones (2)) 546s ***** error ... 546s betarnd (1, 1/2, [2 -1 2]) 546s ***** error ... 546s betarnd (1, 1/2, [2 0 2.5]) 546s ***** error ... 546s betarnd (1, 1/2, 2, -1, 5) 546s ***** error ... 546s betarnd (1, 1/2, 2, 1.5, 5) 546s ***** error ... 546s betarnd (2, 1/2 * ones (2), 3) 546s ***** error ... 546s betarnd (2, 1/2 * ones (2), [3, 2]) 546s ***** error ... 546s betarnd (2, 1/2 * ones (2), 3, 2) 546s ***** error ... 546s betarnd (2 * ones (2), 1/2, 3) 546s ***** error ... 546s betarnd (2 * ones (2), 1/2, [3, 2]) 546s ***** error ... 546s betarnd (2 * ones (2), 1/2, 3, 2) 546s 40 tests, 40 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/exppdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/exppdf.m 546s ***** demo 546s ## Plot various PDFs from the exponential distribution 546s x = 0:0.01:5; 546s y1 = exppdf (x, 2/3); 546s y2 = exppdf (x, 1.0); 546s y3 = exppdf (x, 2.0); 546s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 546s grid on 546s ylim ([0, 1.5]) 546s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 546s title ("Exponential PDF") 546s xlabel ("values in x") 546s ylabel ("density") 546s ***** shared x,y 546s x = [-1 0 0.5 1 Inf]; 546s y = gampdf (x, 1, 2); 546s ***** assert (exppdf (x, 2*ones (1,5)), y) 546s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 546s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 546s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 546s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 546s ***** error exppdf () 546s ***** error exppdf (1,2,3) 546s ***** error ... 546s exppdf (ones (3), ones (2)) 546s ***** error ... 546s exppdf (ones (2), ones (3)) 546s ***** error exppdf (i, 2) 546s ***** error exppdf (2, i) 546s 11 tests, 11 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/bisainv.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bisainv.m 546s ***** demo 546s ## Plot various iCDFs from the Birnbaum-Saunders distribution 546s p = 0.001:0.001:0.999; 546s x1 = bisainv (p, 1, 0.5); 546s x2 = bisainv (p, 1, 1); 546s x3 = bisainv (p, 1, 2); 546s x4 = bisainv (p, 1, 5); 546s x5 = bisainv (p, 1, 10); 546s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 546s grid on 546s ylim ([0, 10]) 546s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 546s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 546s title ("Birnbaum-Saunders iCDF") 546s xlabel ("probability") 546s ylabel ("values in x") 546s ***** demo 546s ## Plot various iCDFs from the Birnbaum-Saunders distribution 546s p = 0.001:0.001:0.999; 546s x1 = bisainv (p, 1, 0.3); 546s x2 = bisainv (p, 2, 0.3); 546s x3 = bisainv (p, 1, 0.5); 546s x4 = bisainv (p, 3, 0.5); 546s x5 = bisainv (p, 5, 0.5); 546s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 546s grid on 546s ylim ([0, 10]) 546s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 546s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 546s title ("Birnbaum-Saunders iCDF") 546s xlabel ("probability") 546s ylabel ("values in x") 546s ***** shared p, y, f 546s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 546s p = [-1, 0, 1/4, 1/2, 1, 2]; 546s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 546s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 546s ***** assert (bisainv (p, 1, ones (1,6)), y) 546s ***** assert (bisainv (p, ones (1,6), 1), y) 546s ***** assert (bisainv (p, 1, 1), y) 546s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 546s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 546s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 546s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 546s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 546s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 546s ***** error bisainv () 546s ***** error bisainv (1) 546s ***** error bisainv (1, 2) 546s ***** error bisainv (1, 2, 3, 4) 546s ***** error ... 546s bisainv (ones (3), ones (2), ones(2)) 546s ***** error ... 546s bisainv (ones (2), ones (3), ones(2)) 546s ***** error ... 546s bisainv (ones (2), ones (2), ones(3)) 546s ***** error bisainv (i, 4, 3) 546s ***** error bisainv (1, i, 3) 546s ***** error bisainv (1, 4, i) 546s 20 tests, 20 passed, 0 known failure, 0 skipped 546s [inst/dist_fun/vmcdf.m] 546s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/vmcdf.m 546s ***** demo 546s ## Plot various CDFs from the von Mises distribution 546s x1 = [-pi:0.1:pi]; 546s p1 = vmcdf (x1, 0, 0.5); 546s p2 = vmcdf (x1, 0, 1); 546s p3 = vmcdf (x1, 0, 2); 546s p4 = vmcdf (x1, 0, 4); 546s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 546s grid on 546s xlim ([-pi, pi]) 546s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 546s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 546s title ("Von Mises CDF") 546s xlabel ("values in x") 546s ylabel ("probability") 546s ***** shared x, p0, p1 546s x = [-pi:pi/2:pi]; 546s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 546s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 546s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 547s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 547s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 547s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 547s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 547s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 547s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 547s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 547s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 547s ***** error vmcdf () 547s ***** error vmcdf (1) 547s ***** error vmcdf (1, 2) 547s ***** error vmcdf (1, 2, 3, "tail") 547s ***** error vmcdf (1, 2, 3, 4) 547s ***** error ... 547s vmcdf (ones (3), ones (2), ones (2)) 547s ***** error ... 547s vmcdf (ones (2), ones (3), ones (2)) 547s ***** error ... 547s vmcdf (ones (2), ones (2), ones (3)) 547s ***** error vmcdf (i, 2, 2) 547s ***** error vmcdf (2, i, 2) 547s ***** error vmcdf (2, 2, i) 547s 20 tests, 20 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/ncfcdf.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncfcdf.m 547s ***** demo 547s ## Plot various CDFs from the noncentral F distribution 547s x = 0:0.01:5; 547s p1 = ncfcdf (x, 2, 5, 1); 547s p2 = ncfcdf (x, 2, 5, 2); 547s p3 = ncfcdf (x, 5, 10, 1); 547s p4 = ncfcdf (x, 10, 20, 10); 547s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 547s grid on 547s xlim ([0, 5]) 547s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 547s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 547s "location", "southeast") 547s title ("Noncentral F CDF") 547s xlabel ("values in x") 547s ylabel ("probability") 547s ***** demo 547s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 547s ## same number of numerator and denominator degrees of freedom (5, 20) 547s 547s x = 0.01:0.1:10.01; 547s p1 = ncfcdf (x, 5, 20, 10); 547s p2 = fcdf (x, 5, 20); 547s plot (x, p1, "-", x, p2, "-"); 547s grid on 547s xlim ([0, 10]) 547s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 547s title ("Noncentral F vs F CDFs") 547s xlabel ("values in x") 547s ylabel ("probability") 547s ***** test 547s x = -2:0.1:2; 547s p = ncfcdf (x, 10, 1, 3); 547s assert (p([1:21]), zeros (1, 21), 1e-76); 547s assert (p(22), 0.004530737275319753, 1e-14); 547s assert (p(30), 0.255842099135669, 1e-14); 547s assert (p(41), 0.4379890998457305, 1e-14); 547s ***** test 547s p = ncfcdf (12, 10, 3, 2); 547s assert (p, 0.9582287900447416, 1e-14); 547s ***** test 547s p = ncfcdf (2, 3, 2, 1); 547s assert (p, 0.5731985522994989, 1e-14); 547s ***** test 547s p = ncfcdf (2, 3, 2, 1, "upper"); 547s assert (p, 0.4268014477004823, 1e-14); 547s ***** test 547s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 547s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 547s ***** error ncfcdf () 547s ***** error ncfcdf (1) 547s ***** error ncfcdf (1, 2) 547s ***** error ncfcdf (1, 2, 3) 547s ***** error ncfcdf (1, 2, 3, 4, "tail") 547s ***** error ncfcdf (1, 2, 3, 4, 5) 547s ***** error ... 547s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 547s ***** error ... 547s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 547s ***** error ... 547s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 547s ***** error ... 547s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 547s ***** error ncfcdf (i, 2, 2, 2) 547s ***** error ncfcdf (2, i, 2, 2) 547s ***** error ncfcdf (2, 2, i, 2) 547s ***** error ncfcdf (2, 2, 2, i) 547s 19 tests, 19 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/gamrnd.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gamrnd.m 547s ***** assert (size (gamrnd (1, 1)), [1 1]) 547s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 547s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 547s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 547s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 547s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 547s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 547s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 547s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 547s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 547s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 547s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 547s ***** assert (class (gamrnd (1, 1)), "double") 547s ***** assert (class (gamrnd (1, single (1))), "single") 547s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 547s ***** assert (class (gamrnd (single (1), 1)), "single") 547s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 547s ***** error gamrnd () 547s ***** error gamrnd (1) 547s ***** error ... 547s gamrnd (ones (3), ones (2)) 547s ***** error ... 547s gamrnd (ones (2), ones (3)) 547s ***** error gamrnd (i, 2, 3) 547s ***** error gamrnd (1, i, 3) 547s ***** error ... 547s gamrnd (1, 2, -1) 547s ***** error ... 547s gamrnd (1, 2, 1.2) 547s ***** error ... 547s gamrnd (1, 2, ones (2)) 547s ***** error ... 547s gamrnd (1, 2, [2 -1 2]) 547s ***** error ... 547s gamrnd (1, 2, [2 0 2.5]) 547s ***** error ... 547s gamrnd (1, 2, 2, -1, 5) 547s ***** error ... 547s gamrnd (1, 2, 2, 1.5, 5) 547s ***** error ... 547s gamrnd (2, ones (2), 3) 547s ***** error ... 547s gamrnd (2, ones (2), [3, 2]) 547s ***** error ... 547s gamrnd (2, ones (2), 3, 2) 547s 33 tests, 33 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/tlsrnd.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tlsrnd.m 547s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 547s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 547s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 547s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 547s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 547s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 547s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 547s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 547s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 547s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 547s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 547s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 547s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 547s ***** assert (class (tlsrnd (1, 2, 3)), "double") 547s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 547s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 547s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 547s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 547s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 547s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 547s ***** error tlsrnd () 547s ***** error tlsrnd (1) 547s ***** error tlsrnd (1, 2) 547s ***** error ... 547s tlsrnd (ones (3), ones (2), 1) 547s ***** error ... 547s tlsrnd (ones (2), 1, ones (3)) 547s ***** error ... 547s tlsrnd (1, ones (2), ones (3)) 547s ***** error tlsrnd (i, 2, 3) 547s ***** error tlsrnd (1, i, 3) 547s ***** error tlsrnd (1, 2, i) 547s ***** error ... 547s tlsrnd (1, 2, 3, -1) 547s ***** error ... 547s tlsrnd (1, 2, 3, 1.2) 547s ***** error ... 547s tlsrnd (1, 2, 3, ones (2)) 547s ***** error ... 547s tlsrnd (1, 2, 3, [2 -1 2]) 547s ***** error ... 547s tlsrnd (1, 2, 3, [2 0 2.5]) 547s ***** error ... 547s tlsrnd (ones (2), 2, 3, ones (2)) 547s ***** error ... 547s tlsrnd (1, 2, 3, 2, -1, 5) 547s ***** error ... 547s tlsrnd (1, 2, 3, 2, 1.5, 5) 547s ***** error ... 547s tlsrnd (ones (2,2), 2, 3, 3) 547s ***** error ... 547s tlsrnd (1, ones (2,2), 3, 3) 547s ***** error ... 547s tlsrnd (1, 2, ones (2,2), 3) 547s ***** error ... 547s tlsrnd (1, 2, ones (2,2), [3, 3]) 547s ***** error ... 547s tlsrnd (1, 2, ones (2,2), 2, 3) 547s 42 tests, 42 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/gprnd.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gprnd.m 547s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 547s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 547s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 547s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 547s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 547s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 547s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 547s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 547s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 547s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 547s ***** assert (size (gprnd (1,1,0)), [1, 1]) 547s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 547s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 547s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 547s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 547s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 547s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 547s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 547s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 547s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 547s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 547s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 547s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 547s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 547s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 547s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 547s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 547s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 547s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 547s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 547s ***** assert (class (gprnd (0, 1, 0)), "double") 547s ***** assert (class (gprnd (0, 1, single (0))), "single") 547s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 547s ***** assert (class (gprnd (0, single (1),0)), "single") 547s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 547s ***** assert (class (gprnd (single (0), 1, 0)), "single") 547s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 547s ***** error gprnd () 547s ***** error gprnd (1) 547s ***** error gprnd (1, 2) 547s ***** error ... 547s gprnd (ones (3), ones (2), ones (2)) 547s ***** error ... 547s gprnd (ones (2), ones (3), ones (2)) 547s ***** error ... 547s gprnd (ones (2), ones (2), ones (3)) 547s ***** error gprnd (i, 2, 3) 547s ***** error gprnd (1, i, 3) 547s ***** error gprnd (1, 2, i) 547s ***** error ... 547s gprnd (1, 2, 3, -1) 547s ***** error ... 547s gprnd (1, 2, 3, 1.2) 547s ***** error ... 547s gprnd (1, 2, 3, ones (2)) 547s ***** error ... 547s gprnd (1, 2, 3, [2 -1 2]) 547s ***** error ... 547s gprnd (1, 2, 3, [2 0 2.5]) 547s ***** error ... 547s gprnd (1, 2, 3, 2, -1, 5) 547s ***** error ... 547s gprnd (1, 2, 3, 2, 1.5, 5) 547s ***** error ... 547s gprnd (2, ones (2), 2, 3) 547s ***** error ... 547s gprnd (2, ones (2), 2, [3, 2]) 547s ***** error ... 547s gprnd (2, ones (2), 2, 3, 2) 547s 56 tests, 56 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/unifrnd.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unifrnd.m 547s ***** assert (size (unifrnd (1, 1)), [1 1]) 547s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 547s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 547s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 547s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 547s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 547s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 547s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 547s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 547s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 547s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 547s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 547s ***** assert (class (unifrnd (1, 1)), "double") 547s ***** assert (class (unifrnd (1, single (1))), "single") 547s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 547s ***** assert (class (unifrnd (single (1), 1)), "single") 547s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 547s ***** error unifrnd () 547s ***** error unifrnd (1) 547s ***** error ... 547s unifrnd (ones (3), ones (2)) 547s ***** error ... 547s unifrnd (ones (2), ones (3)) 547s ***** error unifrnd (i, 2, 3) 547s ***** error unifrnd (1, i, 3) 547s ***** error ... 547s unifrnd (1, 2, -1) 547s ***** error ... 547s unifrnd (1, 2, 1.2) 547s ***** error ... 547s unifrnd (1, 2, ones (2)) 547s ***** error ... 547s unifrnd (1, 2, [2 -1 2]) 547s ***** error ... 547s unifrnd (1, 2, [2 0 2.5]) 547s ***** error ... 547s unifrnd (1, 2, 2, -1, 5) 547s ***** error ... 547s unifrnd (1, 2, 2, 1.5, 5) 547s ***** error ... 547s unifrnd (2, ones (2), 3) 547s ***** error ... 547s unifrnd (2, ones (2), [3, 2]) 547s ***** error ... 547s unifrnd (2, ones (2), 3, 2) 547s 33 tests, 33 passed, 0 known failure, 0 skipped 547s [inst/dist_fun/nctinv.m] 547s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nctinv.m 547s ***** demo 547s ## Plot various iCDFs from the noncentral T distribution 547s p = 0.001:0.001:0.999; 547s x1 = nctinv (p, 1, 0); 547s x2 = nctinv (p, 4, 0); 547s x3 = nctinv (p, 1, 2); 547s x4 = nctinv (p, 4, 2); 547s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 547s grid on 547s ylim ([-5, 5]) 547s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 547s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 547s title ("Noncentral T iCDF") 547s xlabel ("probability") 547s ylabel ("values in x") 547s ***** demo 547s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 547s ## with the same number of degrees of freedom (10). 547s 547s p = 0.001:0.001:0.999; 547s x1 = nctinv (p, 10, 1); 547s x2 = tinv (p, 10); 547s plot (p, x1, "-", p, x2, "-"); 547s grid on 547s ylim ([-5, 5]) 547s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 547s title ("Noncentral T vs T quantile functions") 547s xlabel ("probability") 547s ylabel ("values in x") 547s ***** test 547s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 547s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 548s ***** test 548s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 548s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 548s ***** test 548s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 548s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 549s ***** test 549s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 549s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 549s ***** test 549s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 549s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 550s ***** test 550s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 550s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 550s ***** test 550s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 552s ***** error nctinv () 552s ***** error nctinv (1) 552s ***** error nctinv (1, 2) 552s ***** error ... 552s nctinv (ones (3), ones (2), ones (2)) 552s ***** error ... 552s nctinv (ones (2), ones (3), ones (2)) 552s ***** error ... 552s nctinv (ones (2), ones (2), ones (3)) 552s ***** error nctinv (i, 2, 2) 552s ***** error nctinv (2, i, 2) 552s ***** error nctinv (2, 2, i) 552s 16 tests, 16 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/laplaceinv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/laplaceinv.m 552s ***** demo 552s ## Plot various iCDFs from the Laplace distribution 552s p = 0.001:0.001:0.999; 552s x1 = cauchyinv (p, 0, 1); 552s x2 = cauchyinv (p, 0, 2); 552s x3 = cauchyinv (p, 0, 4); 552s x4 = cauchyinv (p, -5, 4); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 552s grid on 552s ylim ([-10, 10]) 552s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 552s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 552s title ("Laplace iCDF") 552s xlabel ("probability") 552s ylabel ("values in x") 552s ***** shared p, x 552s p = [-1 0 0.5 1 2]; 552s x = [NaN, -Inf, 0, Inf, NaN]; 552s ***** assert (laplaceinv (p, 0, 1), x) 552s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 552s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 552s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 552s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 552s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 552s ***** error laplaceinv () 552s ***** error laplaceinv (1) 552s ***** error ... 552s laplaceinv (1, 2) 552s ***** error laplaceinv (1, 2, 3, 4) 552s ***** error ... 552s laplaceinv (1, ones (2), ones (3)) 552s ***** error ... 552s laplaceinv (ones (2), 1, ones (3)) 552s ***** error ... 552s laplaceinv (ones (2), ones (3), 1) 552s ***** error laplaceinv (i, 2, 3) 552s ***** error laplaceinv (1, i, 3) 552s ***** error laplaceinv (1, 2, i) 552s 16 tests, 16 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/normrnd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/normrnd.m 552s ***** assert (size (normrnd (1, 1)), [1 1]) 552s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 552s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 552s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 552s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 552s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 552s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 552s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 552s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 552s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 552s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 552s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 552s ***** assert (class (normrnd (1, 1)), "double") 552s ***** assert (class (normrnd (1, single (1))), "single") 552s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 552s ***** assert (class (normrnd (single (1), 1)), "single") 552s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 552s ***** error normrnd () 552s ***** error normrnd (1) 552s ***** error ... 552s normrnd (ones (3), ones (2)) 552s ***** error ... 552s normrnd (ones (2), ones (3)) 552s ***** error normrnd (i, 2, 3) 552s ***** error normrnd (1, i, 3) 552s ***** error ... 552s normrnd (1, 2, -1) 552s ***** error ... 552s normrnd (1, 2, 1.2) 552s ***** error ... 552s normrnd (1, 2, ones (2)) 552s ***** error ... 552s normrnd (1, 2, [2 -1 2]) 552s ***** error ... 552s normrnd (1, 2, [2 0 2.5]) 552s ***** error ... 552s normrnd (1, 2, 2, -1, 5) 552s ***** error ... 552s normrnd (1, 2, 2, 1.5, 5) 552s ***** error ... 552s normrnd (2, ones (2), 3) 552s ***** error ... 552s normrnd (2, ones (2), [3, 2]) 552s ***** error ... 552s normrnd (2, ones (2), 3, 2) 552s 33 tests, 33 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/geornd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/geornd.m 552s ***** assert (size (geornd (0.5)), [1, 1]) 552s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 552s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 552s ***** assert (size (geornd (0.5, 3)), [3, 3]) 552s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 552s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 552s ***** assert (class (geornd (0.5)), "double") 552s ***** assert (class (geornd (single (0.5))), "single") 552s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 552s ***** assert (class (geornd (single (0))), "single") 552s ***** assert (class (geornd (single (1))), "single") 552s ***** error geornd () 552s ***** error geornd (i) 552s ***** error ... 552s geornd (1, -1) 552s ***** error ... 552s geornd (1, 1.2) 552s ***** error ... 552s geornd (1, ones (2)) 552s ***** error ... 552s geornd (1, [2 -1 2]) 552s ***** error ... 552s geornd (1, [2 0 2.5]) 552s ***** error ... 552s geornd (ones (2), ones (2)) 552s ***** error ... 552s geornd (1, 2, -1, 5) 552s ***** error ... 552s geornd (1, 2, 1.5, 5) 552s ***** error geornd (ones (2,2), 3) 552s ***** error geornd (ones (2,2), [3, 2]) 552s ***** error geornd (ones (2,2), 2, 3) 552s 24 tests, 24 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/gevinv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gevinv.m 552s ***** demo 552s ## Plot various iCDFs from the generalized extreme value distribution 552s p = 0.001:0.001:0.999; 552s x1 = gevinv (p, 1, 1, 1); 552s x2 = gevinv (p, 0.5, 1, 1); 552s x3 = gevinv (p, 1, 1, 5); 552s x4 = gevinv (p, 1, 2, 5); 552s x5 = gevinv (p, 1, 5, 5); 552s x6 = gevinv (p, 1, 0.5, 5); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 552s p, x4, "-c", p, x5, "-m", p, x6, "-k") 552s grid on 552s ylim ([-1, 10]) 552s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 552s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 552s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 552s "location", "northwest") 552s title ("Generalized extreme value iCDF") 552s xlabel ("probability") 552s ylabel ("values in x") 552s ***** test 552s p = 0.1:0.1:0.9; 552s k = 0; 552s sigma = 1; 552s mu = 0; 552s x = gevinv (p, k, sigma, mu); 552s c = gevcdf(x, k, sigma, mu); 552s assert (c, p, 0.001); 552s ***** test 552s p = 0.1:0.1:0.9; 552s k = 1; 552s sigma = 1; 552s mu = 0; 552s x = gevinv (p, k, sigma, mu); 552s c = gevcdf(x, k, sigma, mu); 552s assert (c, p, 0.001); 552s ***** test 552s p = 0.1:0.1:0.9; 552s k = 0.3; 552s sigma = 1; 552s mu = 0; 552s x = gevinv (p, k, sigma, mu); 552s c = gevcdf(x, k, sigma, mu); 552s assert (c, p, 0.001); 552s ***** error gevinv () 552s ***** error gevinv (1) 552s ***** error gevinv (1, 2) 552s ***** error gevinv (1, 2, 3) 552s ***** error ... 552s gevinv (ones (3), ones (2), ones(2), ones(2)) 552s ***** error ... 552s gevinv (ones (2), ones (3), ones(2), ones(2)) 552s ***** error ... 552s gevinv (ones (2), ones (2), ones(3), ones(2)) 552s ***** error ... 552s gevinv (ones (2), ones (2), ones(2), ones(3)) 552s ***** error gevinv (i, 2, 3, 4) 552s ***** error gevinv (1, i, 3, 4) 552s ***** error gevinv (1, 2, i, 4) 552s ***** error gevinv (1, 2, 3, i) 552s 15 tests, 15 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/nbincdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nbincdf.m 552s ***** demo 552s ## Plot various CDFs from the negative binomial distribution 552s x = 0:50; 552s p1 = nbincdf (x, 2, 0.15); 552s p2 = nbincdf (x, 5, 0.2); 552s p3 = nbincdf (x, 4, 0.4); 552s p4 = nbincdf (x, 10, 0.3); 552s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 552s grid on 552s xlim ([0, 40]) 552s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 552s "r = 10, ps = 0.3"}, "location", "southeast") 552s title ("Negative binomial CDF") 552s xlabel ("values in x (number of failures)") 552s ylabel ("probability") 552s ***** shared x, y 552s x = [-1 0 1 2 Inf]; 552s y = [0 1/2 3/4 7/8 1]; 552s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 552s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 552s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 552s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 552s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 552s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 552s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 552s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 552s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 552s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 552s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 552s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 552s ***** error nbincdf () 552s ***** error nbincdf (1) 552s ***** error nbincdf (1, 2) 552s ***** error nbincdf (1, 2, 3, 4) 552s ***** error nbincdf (1, 2, 3, "some") 552s ***** error ... 552s nbincdf (ones (3), ones (2), ones (2)) 552s ***** error ... 552s nbincdf (ones (2), ones (3), ones (2)) 552s ***** error ... 552s nbincdf (ones (2), ones (2), ones (3)) 552s ***** error nbincdf (i, 2, 2) 552s ***** error nbincdf (2, i, 2) 552s ***** error nbincdf (2, 2, i) 552s 22 tests, 22 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/poisspdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/poisspdf.m 552s ***** demo 552s ## Plot various PDFs from the Poisson distribution 552s x = 0:20; 552s y1 = poisspdf (x, 1); 552s y2 = poisspdf (x, 4); 552s y3 = poisspdf (x, 10); 552s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 552s grid on 552s ylim ([0, 0.4]) 552s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 552s title ("Poisson PDF") 552s xlabel ("values in x (number of occurences)") 552s ylabel ("density") 552s ***** shared x, y 552s x = [-1 0 1 2 Inf]; 552s y = [0, exp(-1)*[1 1 0.5], 0]; 552s ***** assert (poisspdf (x, ones (1,5)), y, eps) 552s ***** assert (poisspdf (x, 1), y, eps) 552s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 552s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 552s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 552s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 552s ***** error poisspdf () 552s ***** error poisspdf (1) 552s ***** error ... 552s poisspdf (ones (3), ones (2)) 552s ***** error ... 552s poisspdf (ones (2), ones (3)) 552s ***** error poisspdf (i, 2) 552s ***** error poisspdf (2, i) 552s 12 tests, 12 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/hnpdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hnpdf.m 552s ***** demo 552s ## Plot various PDFs from the half-normal distribution 552s x = 0:0.001:10; 552s y1 = hnpdf (x, 0, 1); 552s y2 = hnpdf (x, 0, 2); 552s y3 = hnpdf (x, 0, 3); 552s y4 = hnpdf (x, 0, 5); 552s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 552s grid on 552s xlim ([0, 10]) 552s ylim ([0, 0.9]) 552s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 552s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 552s title ("Half-normal PDF") 552s xlabel ("values in x") 552s ylabel ("density") 552s ***** demo 552s ## Plot half-normal against normal probability density function 552s x = -5:0.001:5; 552s y1 = hnpdf (x, 0, 1); 552s y2 = normpdf (x); 552s plot (x, y1, "-b", x, y2, "-g") 552s grid on 552s xlim ([-5, 5]) 552s ylim ([0, 0.9]) 552s legend ({"half-normal with μ = 0, σ = 1", ... 552s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 552s title ("Half-normal against standard normal PDF") 552s xlabel ("values in x") 552s ylabel ("density") 552s ***** shared x, y 552s x = [-Inf, -1, 0, 1/2, 1, Inf]; 552s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 552s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 552s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 552s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 552s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 552s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 552s ***** error hnpdf () 552s ***** error hnpdf (1) 552s ***** error hnpdf (1, 2) 552s ***** error ... 552s hnpdf (1, ones (2), ones (3)) 552s ***** error ... 552s hnpdf (ones (2), 1, ones (3)) 552s ***** error ... 552s hnpdf (ones (2), ones (3), 1) 552s ***** error hnpdf (i, 2, 3) 552s ***** error hnpdf (1, i, 3) 552s ***** error hnpdf (1, 2, i) 552s 14 tests, 14 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/bisarnd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bisarnd.m 552s ***** assert (size (bisarnd (1, 1)), [1 1]) 552s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 552s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 552s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 552s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 552s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 552s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 552s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 552s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 552s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 552s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 552s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 552s ***** assert (class (bisarnd (1, 1)), "double") 552s ***** assert (class (bisarnd (1, single (1))), "single") 552s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 552s ***** assert (class (bisarnd (single (1), 1)), "single") 552s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 552s ***** error bisarnd () 552s ***** error bisarnd (1) 552s ***** error ... 552s bisarnd (ones (3), ones (2)) 552s ***** error ... 552s bisarnd (ones (2), ones (3)) 552s ***** error bisarnd (i, 2, 3) 552s ***** error bisarnd (1, i, 3) 552s ***** error ... 552s bisarnd (1, 2, -1) 552s ***** error ... 552s bisarnd (1, 2, 1.2) 552s ***** error ... 552s bisarnd (1, 2, ones (2)) 552s ***** error ... 552s bisarnd (1, 2, [2 -1 2]) 552s ***** error ... 552s bisarnd (1, 2, [2 0 2.5]) 552s ***** error ... 552s bisarnd (1, 2, 2, -1, 5) 552s ***** error ... 552s bisarnd (1, 2, 2, 1.5, 5) 552s ***** error ... 552s bisarnd (2, ones (2), 3) 552s ***** error ... 552s bisarnd (2, ones (2), [3, 2]) 552s ***** error ... 552s bisarnd (2, ones (2), 3, 2) 552s 33 tests, 33 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/binoinv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/binoinv.m 552s ***** demo 552s ## Plot various iCDFs from the binomial distribution 552s p = 0.001:0.001:0.999; 552s x1 = binoinv (p, 20, 0.5); 552s x2 = binoinv (p, 20, 0.7); 552s x3 = binoinv (p, 40, 0.5); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 552s grid on 552s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 552s "n = 40, ps = 0.5"}, "location", "southeast") 552s title ("Binomial iCDF") 552s xlabel ("probability") 552s ylabel ("values in x (number of successes)") 552s ***** shared p 552s p = [-1 0 0.5 1 2]; 552s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 552s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 552s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 552s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 552s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 552s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 552s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 552s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 552s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 552s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 552s ***** shared x, tol 552s x = magic (3) + 1; 552s tol = 1; 552s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 552s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 552s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 552s ***** error binoinv () 552s ***** error binoinv (1) 552s ***** error binoinv (1,2) 552s ***** error binoinv (1,2,3,4) 552s ***** error ... 552s binoinv (ones (3), ones (2), ones (2)) 552s ***** error ... 552s binoinv (ones (2), ones (3), ones (2)) 552s ***** error ... 552s binoinv (ones (2), ones (2), ones (3)) 552s ***** error binoinv (i, 2, 2) 552s ***** error binoinv (2, i, 2) 552s ***** error binoinv (2, 2, i) 552s 23 tests, 23 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/hygecdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hygecdf.m 552s ***** demo 552s ## Plot various CDFs from the hypergeometric distribution 552s x = 0:60; 552s p1 = hygecdf (x, 500, 50, 100); 552s p2 = hygecdf (x, 500, 60, 200); 552s p3 = hygecdf (x, 500, 70, 300); 552s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 552s grid on 552s xlim ([0, 60]) 552s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 552s "m = 500, k = 70, n = 300"}, "location", "southeast") 552s title ("Hypergeometric CDF") 552s xlabel ("values in x (number of successes)") 552s ylabel ("probability") 552s ***** shared x, y 552s x = [-1 0 1 2 3]; 552s y = [0 1/6 5/6 1 1]; 552s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 552s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 552s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 552s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 552s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 552s [y(5) NaN NaN NaN y(1)], 5*eps) 552s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 552s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 552s [y(5) NaN NaN NaN y(1)], 5*eps) 552s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 552s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 552s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 552s [y(5) NaN NaN NaN y(1)], 5*eps) 552s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 552s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 552s ***** test 552s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 552s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 552s ***** test 552s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 552s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 552s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 552s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 552s eps ("single")) 552s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 552s eps ("single")) 552s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 552s eps ("single")) 552s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 552s eps ("single")) 552s ***** error hygecdf () 552s ***** error hygecdf (1) 552s ***** error hygecdf (1,2) 552s ***** error hygecdf (1,2,3) 552s ***** error hygecdf (1,2,3,4,5) 552s ***** error hygecdf (1,2,3,4,"uper") 552s ***** error ... 552s hygecdf (ones (2), ones (3), 1, 1) 552s ***** error ... 552s hygecdf (1, ones (2), ones (3), 1) 552s ***** error ... 552s hygecdf (1, 1, ones (2), ones (3)) 552s ***** error hygecdf (i, 2, 2, 2) 552s ***** error hygecdf (2, i, 2, 2) 552s ***** error hygecdf (2, 2, i, 2) 552s ***** error hygecdf (2, 2, 2, i) 552s 32 tests, 32 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/loglpdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/loglpdf.m 552s ***** demo 552s ## Plot various PDFs from the log-logistic distribution 552s x = 0.001:0.001:2; 552s y1 = loglpdf (x, log (1), 1/0.5); 552s y2 = loglpdf (x, log (1), 1); 552s y3 = loglpdf (x, log (1), 1/2); 552s y4 = loglpdf (x, log (1), 1/4); 552s y5 = loglpdf (x, log (1), 1/8); 552s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 552s grid on 552s ylim ([0,3]) 552s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 552s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 552s title ("Log-logistic PDF") 552s xlabel ("values in x") 552s ylabel ("density") 552s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 552s ***** shared out1, out2 552s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 552s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 552s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 552s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 552s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 552s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 552s ***** assert (class (loglpdf (1, single (2), 3)), "single") 552s ***** assert (class (loglpdf (1, 2, single (3))), "single") 552s ***** error loglpdf (1) 552s ***** error loglpdf (1, 2) 552s ***** error ... 552s loglpdf (1, ones (2), ones (3)) 552s ***** error ... 552s loglpdf (ones (2), 1, ones (3)) 552s ***** error ... 552s loglpdf (ones (2), ones (3), 1) 552s ***** error loglpdf (i, 2, 3) 552s ***** error loglpdf (1, i, 3) 552s ***** error loglpdf (1, 2, i) 552s 14 tests, 14 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/wienrnd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wienrnd.m 552s ***** error wienrnd (0) 552s ***** error wienrnd (1, 3, -50) 552s ***** error wienrnd (5, 0) 552s ***** error wienrnd (0.4, 3, 5) 552s ***** error wienrnd ([1 4], 3, 5) 552s 5 tests, 5 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/geocdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/geocdf.m 552s ***** demo 552s ## Plot various CDFs from the geometric distribution 552s x = 0:10; 552s p1 = geocdf (x, 0.2); 552s p2 = geocdf (x, 0.5); 552s p3 = geocdf (x, 0.7); 552s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 552s grid on 552s xlim ([0, 10]) 552s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 552s title ("Geometric CDF") 552s xlabel ("values in x (number of failures)") 552s ylabel ("probability") 552s ***** test 552s p = geocdf ([1, 2, 3, 4], 0.25); 552s assert (p(1), 0.4375000000, 1e-14); 552s assert (p(2), 0.5781250000, 1e-14); 552s assert (p(3), 0.6835937500, 1e-14); 552s assert (p(4), 0.7626953125, 1e-14); 552s ***** test 552s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 552s assert (p(1), 0.5625000000, 1e-14); 552s assert (p(2), 0.4218750000, 1e-14); 552s assert (p(3), 0.3164062500, 1e-14); 552s assert (p(4), 0.2373046875, 1e-14); 552s ***** shared x, p 552s x = [-1 0 1 Inf]; 552s p = [0 0.5 0.75 1]; 552s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 552s ***** assert (geocdf (x, 0.5), p) 552s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 552s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 552s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 552s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 552s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 552s ***** error geocdf () 552s ***** error geocdf (1) 552s ***** error ... 552s geocdf (ones (3), ones (2)) 552s ***** error ... 552s geocdf (ones (2), ones (3)) 552s ***** error geocdf (i, 2) 552s ***** error geocdf (2, i) 552s ***** error geocdf (2, 3, "tail") 552s ***** error geocdf (2, 3, 5) 552s 17 tests, 17 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/finv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/finv.m 552s ***** demo 552s ## Plot various iCDFs from the F distribution 552s p = 0.001:0.001:0.999; 552s x1 = finv (p, 1, 1); 552s x2 = finv (p, 2, 1); 552s x3 = finv (p, 5, 2); 552s x4 = finv (p, 10, 1); 552s x5 = finv (p, 100, 100); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 552s grid on 552s ylim ([0, 4]) 552s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 552s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 552s "df1 = 100, df2 = 100"}, "location", "northwest") 552s title ("F iCDF") 552s xlabel ("probability") 552s ylabel ("values in x") 552s ***** shared p 552s p = [-1 0 0.5 1 2]; 552s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 552s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 552s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 552s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 552s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 552s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 552s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 552s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 552s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 552s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 552s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 552s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 552s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 552s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 552s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 552s ***** error finv () 552s ***** error finv (1) 552s ***** error finv (1,2) 552s ***** error ... 552s finv (ones (3), ones (2), ones (2)) 552s ***** error ... 552s finv (ones (2), ones (3), ones (2)) 552s ***** error ... 552s finv (ones (2), ones (2), ones (3)) 552s ***** error finv (i, 2, 2) 552s ***** error finv (2, i, 2) 552s ***** error finv (2, 2, i) 552s 24 tests, 24 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/evpdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/evpdf.m 552s ***** demo 552s ## Plot various PDFs from the Extreme value distribution 552s x = -10:0.001:10; 552s y1 = evpdf (x, 0.5, 2); 552s y2 = evpdf (x, 1.0, 2); 552s y3 = evpdf (x, 1.5, 3); 552s y4 = evpdf (x, 3.0, 4); 552s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 552s grid on 552s ylim ([0, 0.2]) 552s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 552s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 552s title ("Extreme value PDF") 552s xlabel ("values in x") 552s ylabel ("density") 552s ***** shared x, y0, y1 552s x = [-5, 0, 1, 2, 3]; 552s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 552s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 552s ***** assert (evpdf (x), y0, 1e-4) 552s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 552s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 552s ***** error evpdf () 552s ***** error ... 552s evpdf (ones (3), ones (2), ones (2)) 552s ***** error evpdf (i, 2, 2) 552s ***** error evpdf (2, i, 2) 552s ***** error evpdf (2, 2, i) 552s 8 tests, 8 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/chi2inv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/chi2inv.m 552s ***** demo 552s ## Plot various iCDFs from the chi-squared distribution 552s p = 0.001:0.001:0.999; 552s x1 = chi2inv (p, 1); 552s x2 = chi2inv (p, 2); 552s x3 = chi2inv (p, 3); 552s x4 = chi2inv (p, 4); 552s x5 = chi2inv (p, 6); 552s x6 = chi2inv (p, 9); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 552s p, x4, "-c", p, x5, "-m", p, x6, "-y") 552s grid on 552s ylim ([0, 8]) 552s legend ({"df = 1", "df = 2", "df = 3", ... 552s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 552s title ("Chi-squared iCDF") 552s xlabel ("probability") 552s ylabel ("values in x") 552s ***** shared p 552s p = [-1 0 0.3934693402873666 1 2]; 552s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 552s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 552s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 552s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 552s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 552s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 552s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 552s ***** error chi2inv () 552s ***** error chi2inv (1) 552s ***** error chi2inv (1,2,3) 552s ***** error ... 552s chi2inv (ones (3), ones (2)) 552s ***** error ... 552s chi2inv (ones (2), ones (3)) 552s ***** error chi2inv (i, 2) 552s ***** error chi2inv (2, i) 552s 14 tests, 14 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/expinv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/expinv.m 552s ***** demo 552s ## Plot various iCDFs from the exponential distribution 552s p = 0.001:0.001:0.999; 552s x1 = expinv (p, 2/3); 552s x2 = expinv (p, 1.0); 552s x3 = expinv (p, 2.0); 552s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 552s grid on 552s ylim ([0, 5]) 552s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 552s title ("Exponential iCDF") 552s xlabel ("probability") 552s ylabel ("values in x") 552s ***** shared p 552s p = [-1 0 0.3934693402873666 1 2]; 552s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 552s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 552s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 552s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 552s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 552s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 552s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 552s ***** error expinv () 552s ***** error expinv (1, 2 ,3 ,4 ,5) 552s ***** error ... 552s expinv (ones (3), ones (2)) 552s ***** error ... 552s expinv (2, 3, [1, 2]) 552s ***** error ... 552s [x, xlo, xup] = expinv (1, 2) 552s ***** error [x, xlo, xup] = ... 552s expinv (1, 2, 3, 0) 552s ***** error [x, xlo, xup] = ... 552s expinv (1, 2, 3, 1.22) 552s ***** error [x, xlo, xup] = ... 552s expinv (1, 2, 3, [0.05, 0.1]) 552s ***** error expinv (i, 2) 552s ***** error expinv (2, i) 552s ***** error ... 552s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 552s 18 tests, 18 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/unifcdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unifcdf.m 552s ***** demo 552s ## Plot various CDFs from the continuous uniform distribution 552s x = 0:0.1:10; 552s p1 = unifcdf (x, 2, 5); 552s p2 = unifcdf (x, 3, 9); 552s plot (x, p1, "-b", x, p2, "-g") 552s grid on 552s xlim ([0, 10]) 552s ylim ([0, 1]) 552s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 552s title ("Continuous uniform CDF") 552s xlabel ("values in x") 552s ylabel ("probability") 552s ***** shared x, y 552s x = [-1 0 0.5 1 2] + 1; 552s y = [0 0 0.5 1 1]; 552s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 552s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 552s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 552s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 552s ***** assert (unifcdf (x, ones (1,5), 2), y) 552s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 552s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 552s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 552s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 552s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 552s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 552s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 552s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 552s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 552s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 552s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 552s ***** error unifcdf () 552s ***** error unifcdf (1) 552s ***** error unifcdf (1, 2) 552s ***** error unifcdf (1, 2, 3, 4) 552s ***** error unifcdf (1, 2, 3, "tail") 552s ***** error ... 552s unifcdf (ones (3), ones (2), ones (2)) 552s ***** error ... 552s unifcdf (ones (2), ones (3), ones (2)) 552s ***** error ... 552s unifcdf (ones (2), ones (2), ones (3)) 552s ***** error unifcdf (i, 2, 2) 552s ***** error unifcdf (2, i, 2) 552s ***** error unifcdf (2, 2, i) 552s 27 tests, 27 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/ncx2rnd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncx2rnd.m 552s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 552s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 552s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 552s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 552s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 552s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 552s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 552s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 552s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 552s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 552s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 552s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 552s ***** assert (class (ncx2rnd (1, 1)), "double") 552s ***** assert (class (ncx2rnd (1, single (1))), "single") 552s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 552s ***** assert (class (ncx2rnd (single (1), 1)), "single") 552s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 552s ***** error ncx2rnd () 552s ***** error ncx2rnd (1) 552s ***** error ... 552s ncx2rnd (ones (3), ones (2)) 552s ***** error ... 552s ncx2rnd (ones (2), ones (3)) 552s ***** error ncx2rnd (i, 2) 552s ***** error ncx2rnd (1, i) 552s ***** error ... 552s ncx2rnd (1, 2, -1) 552s ***** error ... 552s ncx2rnd (1, 2, 1.2) 552s ***** error ... 552s ncx2rnd (1, 2, ones (2)) 552s ***** error ... 552s ncx2rnd (1, 2, [2 -1 2]) 552s ***** error ... 552s ncx2rnd (1, 2, [2 0 2.5]) 552s ***** error ... 552s ncx2rnd (1, 2, 2, -1, 5) 552s ***** error ... 552s ncx2rnd (1, 2, 2, 1.5, 5) 552s ***** error ... 552s ncx2rnd (2, ones (2), 3) 552s ***** error ... 552s ncx2rnd (2, ones (2), [3, 2]) 552s ***** error ... 552s ncx2rnd (2, ones (2), 3, 2) 552s 33 tests, 33 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/chi2rnd.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/chi2rnd.m 552s ***** assert (size (chi2rnd (2)), [1, 1]) 552s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 552s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 552s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 552s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 552s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 552s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 552s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 552s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 552s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 552s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 552s ***** assert (class (chi2rnd (2)), "double") 552s ***** assert (class (chi2rnd (single (2))), "single") 552s ***** assert (class (chi2rnd (single ([2 2]))), "single") 552s ***** error chi2rnd () 552s ***** error chi2rnd (i) 552s ***** error ... 552s chi2rnd (1, -1) 552s ***** error ... 552s chi2rnd (1, 1.2) 552s ***** error ... 552s chi2rnd (1, ones (2)) 552s ***** error ... 552s chi2rnd (1, [2 -1 2]) 552s ***** error ... 552s chi2rnd (1, [2 0 2.5]) 552s ***** error ... 552s chi2rnd (ones (2), ones (2)) 552s ***** error ... 552s chi2rnd (1, 2, -1, 5) 552s ***** error ... 552s chi2rnd (1, 2, 1.5, 5) 552s ***** error chi2rnd (ones (2,2), 3) 552s ***** error chi2rnd (ones (2,2), [3, 2]) 552s ***** error chi2rnd (ones (2,2), 2, 3) 552s 27 tests, 27 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/nakapdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nakapdf.m 552s ***** demo 552s ## Plot various PDFs from the Nakagami distribution 552s x = 0:0.01:3; 552s y1 = nakapdf (x, 0.5, 1); 552s y2 = nakapdf (x, 1, 1); 552s y3 = nakapdf (x, 1, 2); 552s y4 = nakapdf (x, 1, 3); 552s y5 = nakapdf (x, 2, 1); 552s y6 = nakapdf (x, 2, 2); 552s y7 = nakapdf (x, 5, 1); 552s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 552s x, y5, "-k", x, y6, "-b", x, y7, "-c") 552s grid on 552s xlim ([0, 3]) 552s ylim ([0, 2]) 552s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 552s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 552s "μ = 5, ω = 1"}, "location", "northeast") 552s title ("Nakagami PDF") 552s xlabel ("values in x") 552s ylabel ("density") 552s ***** shared x, y 552s x = [-1, 0, 1, 2, Inf]; 552s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 552s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 552s ***** assert (nakapdf (x, 1, 1), y, eps) 552s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 552s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 552s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 552s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 552s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 552s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 552s ***** error nakapdf () 552s ***** error nakapdf (1) 552s ***** error nakapdf (1, 2) 552s ***** error ... 552s nakapdf (ones (3), ones (2), ones(2)) 552s ***** error ... 552s nakapdf (ones (2), ones (3), ones(2)) 552s ***** error ... 552s nakapdf (ones (2), ones (2), ones(3)) 552s ***** error nakapdf (i, 4, 3) 552s ***** error nakapdf (1, i, 3) 552s ***** error nakapdf (1, 4, i) 552s 17 tests, 17 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/nbininv.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nbininv.m 552s ***** demo 552s ## Plot various iCDFs from the negative binomial distribution 552s p = 0.001:0.001:0.999; 552s x1 = nbininv (p, 2, 0.15); 552s x2 = nbininv (p, 5, 0.2); 552s x3 = nbininv (p, 4, 0.4); 552s x4 = nbininv (p, 10, 0.3); 552s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 552s grid on 552s ylim ([0, 40]) 552s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 552s "r = 10, ps = 0.3"}, "location", "northwest") 552s title ("Negative binomial iCDF") 552s xlabel ("probability") 552s ylabel ("values in x (number of failures)") 552s ***** shared p 552s p = [-1 0 3/4 1 2]; 552s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 552s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 552s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 552s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 552s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 552s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 552s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 552s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 552s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 552s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 552s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 552s ***** shared y, tol 552s y = magic (3) + 1; 552s tol = 1; 552s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 552s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 552s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 552s ***** error nbininv () 552s ***** error nbininv (1) 552s ***** error nbininv (1, 2) 552s ***** error ... 552s nbininv (ones (3), ones (2), ones (2)) 552s ***** error ... 552s nbininv (ones (2), ones (3), ones (2)) 552s ***** error ... 552s nbininv (ones (2), ones (2), ones (3)) 552s ***** error nbininv (i, 2, 2) 552s ***** error nbininv (2, i, 2) 552s ***** error nbininv (2, 2, i) 552s 23 tests, 23 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/nbinpdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nbinpdf.m 552s ***** demo 552s ## Plot various PDFs from the negative binomial distribution 552s x = 0:40; 552s y1 = nbinpdf (x, 2, 0.15); 552s y2 = nbinpdf (x, 5, 0.2); 552s y3 = nbinpdf (x, 4, 0.4); 552s y4 = nbinpdf (x, 10, 0.3); 552s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 552s grid on 552s xlim ([0, 40]) 552s ylim ([0, 0.12]) 552s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 552s "r = 10, ps = 0.3"}, "location", "northeast") 552s title ("Negative binomial PDF") 552s xlabel ("values in x (number of failures)") 552s ylabel ("density") 552s ***** shared x, y 552s x = [-1 0 1 2 Inf]; 552s y = [0 1/2 1/4 1/8 NaN]; 552s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 552s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 552s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 552s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 552s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 552s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 552s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 552s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 552s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 552s ***** error nbinpdf () 552s ***** error nbinpdf (1) 552s ***** error nbinpdf (1, 2) 552s ***** error ... 552s nbinpdf (ones (3), ones (2), ones (2)) 552s ***** error ... 552s nbinpdf (ones (2), ones (3), ones (2)) 552s ***** error ... 552s nbinpdf (ones (2), ones (2), ones (3)) 552s ***** error nbinpdf (i, 2, 2) 552s ***** error nbinpdf (2, i, 2) 552s ***** error nbinpdf (2, 2, i) 552s 18 tests, 18 passed, 0 known failure, 0 skipped 552s [inst/dist_fun/poisscdf.m] 552s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/poisscdf.m 552s ***** demo 552s ## Plot various CDFs from the Poisson distribution 552s x = 0:20; 552s p1 = poisscdf (x, 1); 552s p2 = poisscdf (x, 4); 552s p3 = poisscdf (x, 10); 552s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 552s grid on 552s ylim ([0, 1]) 552s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 552s title ("Poisson CDF") 552s xlabel ("values in x (number of occurences)") 552s ylabel ("probability") 552s ***** shared x, y 552s x = [-1 0 1 2 Inf]; 552s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 552s ***** assert (poisscdf (x, ones (1,5)), y) 552s ***** assert (poisscdf (x, 1), y) 552s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 553s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 553s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 553s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 553s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 553s ***** error poisscdf () 553s ***** error poisscdf (1) 553s ***** error poisscdf (1, 2, 3) 553s ***** error poisscdf (1, 2, "tail") 553s ***** error ... 553s poisscdf (ones (3), ones (2)) 553s ***** error ... 553s poisscdf (ones (2), ones (3)) 553s ***** error poisscdf (i, 2) 553s ***** error poisscdf (2, i) 553s 15 tests, 15 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/trirnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/trirnd.m 553s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 553s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 553s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 553s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 553s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 553s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 553s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 553s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 553s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 553s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 553s ***** assert (class (trirnd (1, 1.5, 2)), "double") 553s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 553s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 553s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 553s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 553s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 553s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 553s ***** error trirnd () 553s ***** error trirnd (1) 553s ***** error trirnd (1, 2) 553s ***** error ... 553s trirnd (ones (3), 5 * ones (2), ones (2)) 553s ***** error ... 553s trirnd (ones (2), 5 * ones (3), ones (2)) 553s ***** error ... 553s trirnd (ones (2), 5 * ones (2), ones (3)) 553s ***** error trirnd (i, 5, 3) 553s ***** error trirnd (1, 5+i, 3) 553s ***** error trirnd (1, 5, i) 553s ***** error ... 553s trirnd (1, 5, 3, -1) 553s ***** error ... 553s trirnd (1, 5, 3, 1.2) 553s ***** error ... 553s trirnd (1, 5, 3, ones (2)) 553s ***** error ... 553s trirnd (1, 5, 3, [2 -1 2]) 553s ***** error ... 553s trirnd (1, 5, 3, [2 0 2.5]) 553s ***** error ... 553s trirnd (1, 5, 3, 2, -1, 5) 553s ***** error ... 553s trirnd (1, 5, 3, 2, 1.5, 5) 553s ***** error ... 553s trirnd (2, 5 * ones (2), 2, 3) 553s ***** error ... 553s trirnd (2, 5 * ones (2), 2, [3, 2]) 553s ***** error ... 553s trirnd (2, 5 * ones (2), 2, 3, 2) 553s 36 tests, 36 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/wblinv.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wblinv.m 553s ***** demo 553s ## Plot various iCDFs from the Weibull distribution 553s p = 0.001:0.001:0.999; 553s x1 = wblinv (p, 1, 0.5); 553s x2 = wblinv (p, 1, 1); 553s x3 = wblinv (p, 1, 1.5); 553s x4 = wblinv (p, 1, 5); 553s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 553s ylim ([0, 2.5]) 553s grid on 553s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 553s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 553s title ("Weibull iCDF") 553s xlabel ("probability") 553s ylabel ("x") 553s ***** shared p 553s p = [-1 0 0.63212055882855778 1 2]; 553s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 553s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 553s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 553s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 553s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 553s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 553s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 553s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 553s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 553s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 553s ***** error wblinv () 553s ***** error wblinv (1,2,3,4) 553s ***** error ... 553s wblinv (ones (3), ones (2), ones (2)) 553s ***** error ... 553s wblinv (ones (2), ones (3), ones (2)) 553s ***** error ... 553s wblinv (ones (2), ones (2), ones (3)) 553s ***** error wblinv (i, 2, 2) 553s ***** error wblinv (2, i, 2) 553s ***** error wblinv (2, 2, i) 553s 18 tests, 18 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/burrcdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/burrcdf.m 553s ***** demo 553s ## Plot various CDFs from the Burr type XII distribution 553s x = 0.001:0.001:5; 553s p1 = burrcdf (x, 1, 1, 1); 553s p2 = burrcdf (x, 1, 1, 2); 553s p3 = burrcdf (x, 1, 1, 3); 553s p4 = burrcdf (x, 1, 2, 1); 553s p5 = burrcdf (x, 1, 3, 1); 553s p6 = burrcdf (x, 1, 0.5, 2); 553s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 553s x, p4, "-c", x, p5, "-m", x, p6, "-k") 553s grid on 553s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 553s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 553s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 553s "location", "southeast") 553s title ("Burr type XII CDF") 553s xlabel ("values in x") 553s ylabel ("probability") 553s ***** shared x, y 553s x = [-1, 0, 1, 2, Inf]; 553s y = [0, 0, 1/2, 2/3, 1]; 553s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 553s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 553s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 553s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 553s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 553s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 553s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 553s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 553s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 553s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 553s ***** error burrcdf () 553s ***** error burrcdf (1) 553s ***** error burrcdf (1, 2) 553s ***** error burrcdf (1, 2, 3) 553s ***** error ... 553s burrcdf (1, 2, 3, 4, 5, 6) 553s ***** error burrcdf (1, 2, 3, 4, "tail") 553s ***** error burrcdf (1, 2, 3, 4, 5) 553s ***** error ... 553s burrcdf (ones (3), ones (2), ones(2), ones(2)) 553s ***** error ... 553s burrcdf (ones (2), ones (3), ones(2), ones(2)) 553s ***** error ... 553s burrcdf (ones (2), ones (2), ones(3), ones(2)) 553s ***** error ... 553s burrcdf (ones (2), ones (2), ones(2), ones(3)) 553s ***** error burrcdf (i, 2, 3, 4) 553s ***** error burrcdf (1, i, 3, 4) 553s ***** error burrcdf (1, 2, i, 4) 553s ***** error burrcdf (1, 2, 3, i) 553s 25 tests, 25 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/wblcdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wblcdf.m 553s ***** demo 553s ## Plot various CDFs from the Weibull distribution 553s x = 0:0.001:2.5; 553s p1 = wblcdf (x, 1, 0.5); 553s p2 = wblcdf (x, 1, 1); 553s p3 = wblcdf (x, 1, 1.5); 553s p4 = wblcdf (x, 1, 5); 553s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 553s grid on 553s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 553s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 553s title ("Weibull CDF") 553s xlabel ("values in x") 553s ylabel ("probability") 553s ***** shared x, y 553s x = [-1 0 0.5 1 Inf]; 553s y = [0, 1-exp(-x(2:4)), 1]; 553s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 553s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 553s ***** assert (wblcdf (x, "upper"), 1 - y) 553s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 553s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 553s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 553s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 553s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 553s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 553s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 553s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 553s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 553s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 553s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 553s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 553s ***** error wblcdf () 553s ***** error wblcdf (1,2,3,4,5,6,7) 553s ***** error wblcdf (1, 2, 3, 4, "uper") 553s ***** error ... 553s wblcdf (ones (3), ones (2), ones (2)) 553s ***** error wblcdf (2, 3, 4, [1, 2]) 553s ***** error ... 553s [p, plo, pup] = wblcdf (1, 2, 3) 553s ***** error [p, plo, pup] = ... 553s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 553s ***** error [p, plo, pup] = ... 553s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 553s ***** error [p, plo, pup] = ... 553s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 553s ***** error wblcdf (i, 2, 2) 553s ***** error wblcdf (2, i, 2) 553s ***** error wblcdf (2, 2, i) 553s ***** error ... 553s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 553s 28 tests, 28 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/ncfrnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncfrnd.m 553s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 553s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 553s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 553s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 553s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 553s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 553s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 553s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 553s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 553s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 553s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 553s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 553s ***** assert (class (ncfrnd (1, 1, 1)), "double") 553s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 553s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 553s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 553s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 553s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 553s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 553s ***** error ncfrnd () 553s ***** error ncfrnd (1) 553s ***** error ncfrnd (1, 2) 553s ***** error ... 553s ncfrnd (ones (3), ones (2), ones (2)) 553s ***** error ... 553s ncfrnd (ones (2), ones (3), ones (2)) 553s ***** error ... 553s ncfrnd (ones (2), ones (2), ones (3)) 553s ***** error ncfrnd (i, 2, 3) 553s ***** error ncfrnd (1, i, 3) 553s ***** error ncfrnd (1, 2, i) 553s ***** error ... 553s ncfrnd (1, 2, 3, -1) 553s ***** error ... 553s ncfrnd (1, 2, 3, 1.2) 553s ***** error ... 553s ncfrnd (1, 2, 3, ones (2)) 553s ***** error ... 553s ncfrnd (1, 2, 3, [2 -1 2]) 553s ***** error ... 553s ncfrnd (1, 2, 3, [2 0 2.5]) 553s ***** error ... 553s ncfrnd (1, 2, 3, 2, -1, 5) 553s ***** error ... 553s ncfrnd (1, 2, 3, 2, 1.5, 5) 553s ***** error ... 553s ncfrnd (2, ones (2), 2, 3) 553s ***** error ... 553s ncfrnd (2, ones (2), 2, [3, 2]) 553s ***** error ... 553s ncfrnd (2, ones (2), 2, 3, 2) 553s 38 tests, 38 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/gaminv.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gaminv.m 553s ***** demo 553s ## Plot various iCDFs from the Gamma distribution 553s p = 0.001:0.001:0.999; 553s x1 = gaminv (p, 1, 2); 553s x2 = gaminv (p, 2, 2); 553s x3 = gaminv (p, 3, 2); 553s x4 = gaminv (p, 5, 1); 553s x5 = gaminv (p, 9, 0.5); 553s x6 = gaminv (p, 7.5, 1); 553s x7 = gaminv (p, 0.5, 1); 553s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 553s p, x5, "-k", p, x6, "-b", p, x7, "-c") 553s ylim ([0, 20]) 553s grid on 553s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 553s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 553s "α = 0.5, β = 1"}, "location", "northwest") 553s title ("Gamma iCDF") 553s xlabel ("probability") 553s ylabel ("x") 553s ***** shared p 553s p = [-1 0 0.63212055882855778 1 2]; 553s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 553s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 553s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 553s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 553s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 553s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 553s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 553s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 553s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 553s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 553s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 553s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 553s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 553s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 553s eps ("single")) 553s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 553s eps ("single")) 553s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 553s eps ("single")) 553s ***** error gaminv () 553s ***** error gaminv (1) 553s ***** error gaminv (1,2) 553s ***** error ... 553s gaminv (ones (3), ones (2), ones (2)) 553s ***** error ... 553s gaminv (ones (2), ones (3), ones (2)) 553s ***** error ... 553s gaminv (ones (2), ones (2), ones (3)) 553s ***** error gaminv (i, 2, 2) 553s ***** error gaminv (2, i, 2) 553s ***** error gaminv (2, 2, i) 553s 25 tests, 25 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/evcdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/evcdf.m 553s ***** demo 553s ## Plot various CDFs from the extreme value distribution 553s x = -10:0.01:10; 553s p1 = evcdf (x, 0.5, 2); 553s p2 = evcdf (x, 1.0, 2); 553s p3 = evcdf (x, 1.5, 3); 553s p4 = evcdf (x, 3.0, 4); 553s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 553s grid on 553s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 553s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 553s title ("Extreme value CDF") 553s xlabel ("values in x") 553s ylabel ("probability") 553s ***** shared x, y 553s x = [-Inf, 1, 2, Inf]; 553s y = [0, 0.6321, 0.9340, 1]; 553s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 553s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 553s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 553s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 553s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 553s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 553s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 553s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 553s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 553s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 553s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 553s ***** error evcdf () 553s ***** error evcdf (1,2,3,4,5,6,7) 553s ***** error evcdf (1, 2, 3, 4, "uper") 553s ***** error ... 553s evcdf (ones (3), ones (2), ones (2)) 553s ***** error evcdf (2, 3, 4, [1, 2]) 553s ***** error ... 553s [p, plo, pup] = evcdf (1, 2, 3) 553s ***** error [p, plo, pup] = ... 553s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 553s ***** error [p, plo, pup] = ... 553s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 553s ***** error [p, plo, pup] = ... 553s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 553s ***** error evcdf (i, 2, 2) 553s ***** error evcdf (2, i, 2) 553s ***** error evcdf (2, 2, i) 553s ***** error ... 553s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 553s 24 tests, 24 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/logirnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logirnd.m 553s ***** assert (size (logirnd (1, 1)), [1 1]) 553s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 553s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 553s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 553s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 553s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 553s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 553s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 553s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 553s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 553s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 553s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 553s ***** assert (class (logirnd (1, 1)), "double") 553s ***** assert (class (logirnd (1, single (1))), "single") 553s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 553s ***** assert (class (logirnd (single (1), 1)), "single") 553s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 553s ***** error logirnd () 553s ***** error logirnd (1) 553s ***** error ... 553s logirnd (ones (3), ones (2)) 553s ***** error ... 553s logirnd (ones (2), ones (3)) 553s ***** error logirnd (i, 2, 3) 553s ***** error logirnd (1, i, 3) 553s ***** error ... 553s logirnd (1, 2, -1) 553s ***** error ... 553s logirnd (1, 2, 1.2) 553s ***** error ... 553s logirnd (1, 2, ones (2)) 553s ***** error ... 553s logirnd (1, 2, [2 -1 2]) 553s ***** error ... 553s logirnd (1, 2, [2 0 2.5]) 553s ***** error ... 553s logirnd (1, 2, 2, -1, 5) 553s ***** error ... 553s logirnd (1, 2, 2, 1.5, 5) 553s ***** error ... 553s logirnd (2, ones (2), 3) 553s ***** error ... 553s logirnd (2, ones (2), [3, 2]) 553s ***** error ... 553s logirnd (2, ones (2), 3, 2) 553s 33 tests, 33 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/gevrnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gevrnd.m 553s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 553s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 553s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 553s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 553s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 553s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 553s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 553s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 553s ***** assert (class (gevrnd (1,1,1)), "double") 553s ***** assert (class (gevrnd (single (1),1,1)), "single") 553s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 553s ***** assert (class (gevrnd (1,single (1),1)), "single") 553s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 553s ***** assert (class (gevrnd (1,1,single (1))), "single") 553s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 553s ***** error gevrnd () 553s ***** error gevrnd (1) 553s ***** error gevrnd (1, 2) 553s ***** error ... 553s gevrnd (ones (3), ones (2), ones (2)) 553s ***** error ... 553s gevrnd (ones (2), ones (3), ones (2)) 553s ***** error ... 553s gevrnd (ones (2), ones (2), ones (3)) 553s ***** error gevrnd (i, 2, 3) 553s ***** error gevrnd (1, i, 3) 553s ***** error gevrnd (1, 2, i) 553s ***** error ... 553s gevrnd (1, 2, 3, -1) 553s ***** error ... 553s gevrnd (1, 2, 3, 1.2) 553s ***** error ... 553s gevrnd (1, 2, 3, ones (2)) 553s ***** error ... 553s gevrnd (1, 2, 3, [2 -1 2]) 553s ***** error ... 553s gevrnd (1, 2, 3, [2 0 2.5]) 553s ***** error ... 553s gevrnd (1, 2, 3, 2, -1, 5) 553s ***** error ... 553s gevrnd (1, 2, 3, 2, 1.5, 5) 553s ***** error ... 553s gevrnd (2, ones (2), 2, 3) 553s ***** error ... 553s gevrnd (2, ones (2), 2, [3, 2]) 553s ***** error ... 553s gevrnd (2, ones (2), 2, 3, 2) 553s 34 tests, 34 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/hnrnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hnrnd.m 553s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 553s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 553s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 553s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 553s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 553s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 553s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 553s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 553s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 553s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 553s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 553s ***** test 553s r = hnrnd (1, [1, 0, -1]); 553s assert (r([2:3]), [NaN, NaN]) 553s ***** assert (class (hnrnd (1, 0)), "double") 553s ***** assert (class (hnrnd (1, single (0))), "single") 553s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 553s ***** assert (class (hnrnd (1, single (1))), "single") 553s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 553s ***** assert (class (hnrnd (single (1), 1)), "single") 553s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 553s ***** error hnrnd () 553s ***** error hnrnd (1) 553s ***** error ... 553s hnrnd (ones (3), ones (2)) 553s ***** error ... 553s hnrnd (ones (2), ones (3)) 553s ***** error hnrnd (i, 2, 3) 553s ***** error hnrnd (1, i, 3) 553s ***** error ... 553s hnrnd (1, 2, -1) 553s ***** error ... 553s hnrnd (1, 2, 1.2) 553s ***** error ... 553s hnrnd (1, 2, ones (2)) 553s ***** error ... 553s hnrnd (1, 2, [2 -1 2]) 553s ***** error ... 553s hnrnd (1, 2, [2 0 2.5]) 553s ***** error ... 553s hnrnd (1, 2, 2, -1, 5) 553s ***** error ... 553s hnrnd (1, 2, 2, 1.5, 5) 553s ***** error ... 553s hnrnd (2, ones (2), 3) 553s ***** error ... 553s hnrnd (2, ones (2), [3, 2]) 553s ***** error ... 553s hnrnd (2, ones (2), 3, 2) 553s 35 tests, 35 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/betainv.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/betainv.m 553s ***** demo 553s ## Plot various iCDFs from the Beta distribution 553s p = 0.001:0.001:0.999; 553s x1 = betainv (p, 0.5, 0.5); 553s x2 = betainv (p, 5, 1); 553s x3 = betainv (p, 1, 3); 553s x4 = betainv (p, 2, 2); 553s x5 = betainv (p, 2, 5); 553s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 553s grid on 553s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 553s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 553s title ("Beta iCDF") 553s xlabel ("probability") 553s ylabel ("values in x") 553s ***** shared p 553s p = [-1 0 0.75 1 2]; 553s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 553s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 553s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 553s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 553s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 553s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 553s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 553s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 553s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 553s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 553s ***** error betainv () 553s ***** error betainv (1) 553s ***** error betainv (1,2) 553s ***** error betainv (1,2,3,4) 553s ***** error ... 553s betainv (ones (3), ones (2), ones (2)) 553s ***** error ... 553s betainv (ones (2), ones (3), ones (2)) 553s ***** error ... 553s betainv (ones (2), ones (2), ones (3)) 553s ***** error betainv (i, 2, 2) 553s ***** error betainv (2, i, 2) 553s ***** error betainv (2, 2, i) 553s 20 tests, 20 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/mvnrnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvnrnd.m 553s ***** error mvnrnd () 553s ***** error mvnrnd ([2, 3, 4]) 553s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 553s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 553s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 553s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 553s 6 tests, 6 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/gppdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gppdf.m 553s ***** demo 553s ## Plot various PDFs from the generalized Pareto distribution 553s x = 0:0.001:5; 553s y1 = gppdf (x, 1, 1, 0); 553s y2 = gppdf (x, 5, 1, 0); 553s y3 = gppdf (x, 20, 1, 0); 553s y4 = gppdf (x, 1, 2, 0); 553s y5 = gppdf (x, 5, 2, 0); 553s y6 = gppdf (x, 20, 2, 0); 553s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 553s x, y4, "-c", x, y5, "-m", x, y6, "-k") 553s grid on 553s xlim ([0, 5]) 553s ylim ([0, 1]) 553s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 553s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 553s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 553s "location", "northeast") 553s title ("Generalized Pareto PDF") 553s xlabel ("values in x") 553s ylabel ("density") 553s ***** shared x, y1, y2, y3 553s x = [-Inf, -1, 0, 1/2, 1, Inf]; 553s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 553s y2 = [0, 0, 1, 4/9, 1/4, 0]; 553s y3 = [0, 0, 1, 1, 1, 0]; 553s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 553s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 553s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 553s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 553s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 553s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 553s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 553s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 553s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 553s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 553s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 553s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 553s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 553s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 553s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 553s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 553s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 553s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 553s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 553s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 553s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 553s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 553s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 553s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 553s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 553s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 553s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 553s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 553s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 553s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 553s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 553s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 553s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 553s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 553s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 553s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 553s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 553s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 553s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 553s ***** error gpcdf () 553s ***** error gpcdf (1) 553s ***** error gpcdf (1, 2) 553s ***** error gpcdf (1, 2, 3) 553s ***** error ... 553s gpcdf (ones (3), ones (2), ones(2), ones(2)) 553s ***** error ... 553s gpcdf (ones (2), ones (3), ones(2), ones(2)) 553s ***** error ... 553s gpcdf (ones (2), ones (2), ones(3), ones(2)) 553s ***** error ... 553s gpcdf (ones (2), ones (2), ones(2), ones(3)) 553s ***** error gpcdf (i, 2, 3, 4) 553s ***** error gpcdf (1, i, 3, 4) 553s ***** error gpcdf (1, 2, i, 4) 553s ***** error gpcdf (1, 2, 3, i) 553s 51 tests, 51 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/vmpdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/vmpdf.m 553s ***** demo 553s ## Plot various PDFs from the von Mises distribution 553s x1 = [-pi:0.1:pi]; 553s y1 = vmpdf (x1, 0, 0.5); 553s y2 = vmpdf (x1, 0, 1); 553s y3 = vmpdf (x1, 0, 2); 553s y4 = vmpdf (x1, 0, 4); 553s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 553s grid on 553s xlim ([-pi, pi]) 553s ylim ([0, 0.8]) 553s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 553s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 553s title ("Von Mises PDF") 553s xlabel ("values in x") 553s ylabel ("density") 553s ***** shared x, y0, y1 553s x = [-pi:pi/2:pi]; 553s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 553s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 553s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 553s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 553s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 553s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 553s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 553s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 553s ***** error vmpdf () 553s ***** error vmpdf (1) 553s ***** error vmpdf (1, 2) 553s ***** error ... 553s vmpdf (ones (3), ones (2), ones (2)) 553s ***** error ... 553s vmpdf (ones (2), ones (3), ones (2)) 553s ***** error ... 553s vmpdf (ones (2), ones (2), ones (3)) 553s ***** error vmpdf (i, 2, 2) 553s ***** error vmpdf (2, i, 2) 553s ***** error vmpdf (2, 2, i) 553s 15 tests, 15 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/plpdf.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/plpdf.m 553s ***** demo 553s ## Plot various PDFs from the Piecewise linear distribution 553s data = 0:0.01:10; 553s x1 = [0, 1, 3, 4, 7, 10]; 553s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 553s x2 = [0, 2, 5, 6, 7, 8]; 553s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 553s y1 = plpdf (data, x1, Fx1); 553s y2 = plpdf (data, x2, Fx2); 553s plot (data, y1, "-b", data, y2, "g") 553s grid on 553s ylim ([0, 0.6]) 553s xlim ([0, 10]) 553s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 553s title ("Piecewise linear CDF") 553s xlabel ("values in data") 553s ylabel ("density") 553s ***** shared x, Fx 553s x = [0, 1, 3, 4, 7, 10]; 553s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 553s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 553s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 553s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 553s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 553s ***** assert (plpdf (8, x, Fx), 0.1, eps); 553s ***** error plpdf () 553s ***** error plpdf (1) 553s ***** error plpdf (1, 2) 553s ***** error ... 553s plpdf (1, [0, 1, 2], [0, 1]) 553s ***** error ... 553s plpdf (1, [0], [1]) 553s ***** error ... 553s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 553s ***** error ... 553s plpdf (1, [0, 1, 2], [0, i, 1]) 553s ***** error ... 553s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 553s ***** error ... 553s plpdf (1, [0, i, 2], [0, 0.5, 1]) 553s ***** error ... 553s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 553s 15 tests, 15 passed, 0 known failure, 0 skipped 553s [inst/dist_fun/frnd.m] 553s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/frnd.m 553s ***** assert (size (frnd (1, 1)), [1 1]) 553s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 553s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 553s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 553s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 553s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 553s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 553s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 553s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 553s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 553s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 553s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 553s ***** assert (class (frnd (1, 1)), "double") 553s ***** assert (class (frnd (1, single (1))), "single") 553s ***** assert (class (frnd (1, single ([1, 1]))), "single") 553s ***** assert (class (frnd (single (1), 1)), "single") 553s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 553s ***** error frnd () 553s ***** error frnd (1) 554s ***** error ... 554s frnd (ones (3), ones (2)) 554s ***** error ... 554s frnd (ones (2), ones (3)) 554s ***** error frnd (i, 2, 3) 554s ***** error frnd (1, i, 3) 554s ***** error ... 554s frnd (1, 2, -1) 554s ***** error ... 554s frnd (1, 2, 1.2) 554s ***** error ... 554s frnd (1, 2, ones (2)) 554s ***** error ... 554s frnd (1, 2, [2 -1 2]) 554s ***** error ... 554s frnd (1, 2, [2 0 2.5]) 554s ***** error ... 554s frnd (1, 2, 2, -1, 5) 554s ***** error ... 554s frnd (1, 2, 2, 1.5, 5) 554s ***** error ... 554s frnd (2, ones (2), 3) 554s ***** error ... 554s frnd (2, ones (2), [3, 2]) 554s ***** error ... 554s frnd (2, ones (2), 3, 2) 554s 33 tests, 33 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/loglcdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/loglcdf.m 554s ***** demo 554s ## Plot various CDFs from the log-logistic distribution 554s x = 0:0.001:2; 554s p1 = loglcdf (x, log (1), 1/0.5); 554s p2 = loglcdf (x, log (1), 1); 554s p3 = loglcdf (x, log (1), 1/2); 554s p4 = loglcdf (x, log (1), 1/4); 554s p5 = loglcdf (x, log (1), 1/8); 554s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 554s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 554s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 554s grid on 554s title ("Log-logistic CDF") 554s xlabel ("values in x") 554s ylabel ("probability") 554s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 554s ***** shared out1, out2 554s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 554s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 554s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 554s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 554s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 554s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 554s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 554s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 554s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 554s ***** assert (class (loglcdf (1, single (2), 3)), "single") 554s ***** assert (class (loglcdf (1, 2, single (3))), "single") 554s ***** error loglcdf (1) 554s ***** error loglcdf (1, 2) 554s ***** error ... 554s loglcdf (1, 2, 3, 4) 554s ***** error ... 554s loglcdf (1, 2, 3, "uper") 554s ***** error ... 554s loglcdf (1, ones (2), ones (3)) 554s ***** error ... 554s loglcdf (1, ones (2), ones (3), "upper") 554s ***** error ... 554s loglcdf (ones (2), 1, ones (3)) 554s ***** error ... 554s loglcdf (ones (2), 1, ones (3), "upper") 554s ***** error ... 554s loglcdf (ones (2), ones (3), 1) 554s ***** error ... 554s loglcdf (ones (2), ones (3), 1, "upper") 554s ***** error loglcdf (i, 2, 3) 554s ***** error loglcdf (i, 2, 3, "upper") 554s ***** error loglcdf (1, i, 3) 554s ***** error loglcdf (1, i, 3, "upper") 554s ***** error loglcdf (1, 2, i) 554s ***** error loglcdf (1, 2, i, "upper") 554s 25 tests, 25 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/raylinv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/raylinv.m 554s ***** demo 554s ## Plot various iCDFs from the Rayleigh distribution 554s p = 0.001:0.001:0.999; 554s x1 = raylinv (p, 0.5); 554s x2 = raylinv (p, 1); 554s x3 = raylinv (p, 2); 554s x4 = raylinv (p, 3); 554s x5 = raylinv (p, 4); 554s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 554s grid on 554s ylim ([0, 10]) 554s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 554s "σ = 3", "σ = 4"}, "location", "northwest") 554s title ("Rayleigh iCDF") 554s xlabel ("probability") 554s ylabel ("values in x") 554s ***** test 554s p = 0:0.1:0.5; 554s sigma = 1:6; 554s x = raylinv (p, sigma); 554s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 554s assert (x, expected_x, 0.001); 554s ***** test 554s p = 0:0.1:0.5; 554s x = raylinv (p, 0.5); 554s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 554s assert (x, expected_x, 0.001); 554s ***** error raylinv () 554s ***** error raylinv (1) 554s ***** error ... 554s raylinv (ones (3), ones (2)) 554s ***** error ... 554s raylinv (ones (2), ones (3)) 554s ***** error raylinv (i, 2) 554s ***** error raylinv (2, i) 554s 8 tests, 8 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/unifinv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unifinv.m 554s ***** demo 554s ## Plot various iCDFs from the continuous uniform distribution 554s p = 0.001:0.001:0.999; 554s x1 = unifinv (p, 2, 5); 554s x2 = unifinv (p, 3, 9); 554s plot (p, x1, "-b", p, x2, "-g") 554s grid on 554s xlim ([0, 1]) 554s ylim ([0, 10]) 554s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 554s title ("Continuous uniform iCDF") 554s xlabel ("probability") 554s ylabel ("values in x") 554s ***** shared p 554s p = [-1 0 0.5 1 2]; 554s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 554s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 554s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 554s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 554s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 554s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 554s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 554s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 554s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 554s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 554s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 554s ***** error unifinv () 554s ***** error unifinv (1, 2) 554s ***** error ... 554s unifinv (ones (3), ones (2), ones (2)) 554s ***** error ... 554s unifinv (ones (2), ones (3), ones (2)) 554s ***** error ... 554s unifinv (ones (2), ones (2), ones (3)) 554s ***** error unifinv (i, 2, 2) 554s ***** error unifinv (2, i, 2) 554s ***** error unifinv (2, 2, i) 554s 19 tests, 19 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/normcdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/normcdf.m 554s ***** demo 554s ## Plot various CDFs from the normal distribution 554s x = -5:0.01:5; 554s p1 = normcdf (x, 0, 0.5); 554s p2 = normcdf (x, 0, 1); 554s p3 = normcdf (x, 0, 2); 554s p4 = normcdf (x, -2, 0.8); 554s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 554s grid on 554s xlim ([-5, 5]) 554s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 554s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 554s title ("Normal CDF") 554s xlabel ("values in x") 554s ylabel ("probability") 554s ***** shared x, y 554s x = [-Inf 1 2 Inf]; 554s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 554s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 554s ***** assert (normcdf (x, 1, ones (1,4)), y) 554s ***** assert (normcdf (x, ones (1,4), 1), y) 554s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 554s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 554s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 554s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 554s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 554s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 554s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 554s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 554s ***** error normcdf () 554s ***** error normcdf (1,2,3,4,5,6,7) 554s ***** error normcdf (1, 2, 3, 4, "uper") 554s ***** error ... 554s normcdf (ones (3), ones (2), ones (2)) 554s ***** error normcdf (2, 3, 4, [1, 2]) 554s ***** error ... 554s [p, plo, pup] = normcdf (1, 2, 3) 554s ***** error [p, plo, pup] = ... 554s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 554s ***** error [p, plo, pup] = ... 554s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 554s ***** error [p, plo, pup] = ... 554s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 554s ***** error normcdf (i, 2, 2) 554s ***** error normcdf (2, i, 2) 554s ***** error normcdf (2, 2, i) 554s ***** error ... 554s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 554s 24 tests, 24 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/copularnd.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/copularnd.m 554s ***** test 554s theta = 0.5; 554s r = copularnd ("Gaussian", theta); 554s assert (size (r), [1, 2]); 554s assert (all ((r >= 0) & (r <= 1))); 554s ***** test 554s theta = 0.5; 554s df = 2; 554s r = copularnd ("t", theta, df); 554s assert (size (r), [1, 2]); 554s assert (all ((r >= 0) & (r <= 1))); 554s ***** test 554s theta = 0.5; 554s r = copularnd ("Clayton", theta); 554s assert (size (r), [1, 2]); 554s assert (all ((r >= 0) & (r <= 1))); 554s ***** test 554s theta = 0.5; 554s n = 2; 554s r = copularnd ("Clayton", theta, n); 554s assert (size (r), [n, 2]); 554s assert (all ((r >= 0) & (r <= 1))); 554s ***** test 554s theta = [1; 2]; 554s n = 2; 554s d = 3; 554s r = copularnd ("Clayton", theta, n, d); 554s assert (size (r), [n, d]); 554s assert (all ((r >= 0) & (r <= 1))); 554s 5 tests, 5 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/raylpdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/raylpdf.m 554s ***** demo 554s ## Plot various PDFs from the Rayleigh distribution 554s x = 0:0.01:10; 554s y1 = raylpdf (x, 0.5); 554s y2 = raylpdf (x, 1); 554s y3 = raylpdf (x, 2); 554s y4 = raylpdf (x, 3); 554s y5 = raylpdf (x, 4); 554s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 554s grid on 554s ylim ([0, 1.25]) 554s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 554s "σ = 3", "σ = 4"}, "location", "northeast") 554s title ("Rayleigh PDF") 554s xlabel ("values in x") 554s ylabel ("density") 554s ***** test 554s x = 0:0.5:2.5; 554s sigma = 1:6; 554s y = raylpdf (x, sigma); 554s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 554s assert (y, expected_y, 0.001); 554s ***** test 554s x = 0:0.5:2.5; 554s y = raylpdf (x, 0.5); 554s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 554s assert (y, expected_y, 0.001); 554s ***** error raylpdf () 554s ***** error raylpdf (1) 554s ***** error ... 554s raylpdf (ones (3), ones (2)) 554s ***** error ... 554s raylpdf (ones (2), ones (3)) 554s ***** error raylpdf (i, 2) 554s ***** error raylpdf (2, i) 554s 8 tests, 8 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/gevpdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gevpdf.m 554s ***** demo 554s ## Plot various PDFs from the generalized extreme value distribution 554s x = -1:0.001:10; 554s y1 = gevpdf (x, 1, 1, 1); 554s y2 = gevpdf (x, 0.5, 1, 1); 554s y3 = gevpdf (x, 1, 1, 5); 554s y4 = gevpdf (x, 1, 2, 5); 554s y5 = gevpdf (x, 1, 5, 5); 554s y6 = gevpdf (x, 1, 0.5, 5); 554s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 554s x, y4, "-c", x, y5, "-m", x, y6, "-k") 554s grid on 554s xlim ([-1, 10]) 554s ylim ([0, 1.1]) 554s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 554s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 554s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 554s "location", "northeast") 554s title ("Generalized extreme value PDF") 554s xlabel ("values in x") 554s ylabel ("density") 554s ***** test 554s x = 0:0.5:2.5; 554s sigma = 1:6; 554s k = 1; 554s mu = 0; 554s y = gevpdf (x, k, sigma, mu); 554s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 554s assert (y, expected_y, 0.001); 554s ***** test 554s x = -0.5:0.5:2.5; 554s sigma = 0.5; 554s k = 1; 554s mu = 0; 554s y = gevpdf (x, k, sigma, mu); 554s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 554s assert (y, expected_y, 0.001); 554s ***** test # check for continuity for k near 0 554s x = 1; 554s sigma = 0.5; 554s k = -0.03:0.01:0.03; 554s mu = 0; 554s y = gevpdf (x, k, sigma, mu); 554s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 554s assert (y, expected_y, 0.001); 554s ***** error gevpdf () 554s ***** error gevpdf (1) 554s ***** error gevpdf (1, 2) 554s ***** error gevpdf (1, 2, 3) 554s ***** error ... 554s gevpdf (ones (3), ones (2), ones(2), ones(2)) 554s ***** error ... 554s gevpdf (ones (2), ones (3), ones(2), ones(2)) 554s ***** error ... 554s gevpdf (ones (2), ones (2), ones(3), ones(2)) 554s ***** error ... 554s gevpdf (ones (2), ones (2), ones(2), ones(3)) 554s ***** error gevpdf (i, 2, 3, 4) 554s ***** error gevpdf (1, i, 3, 4) 554s ***** error gevpdf (1, 2, i, 4) 554s ***** error gevpdf (1, 2, 3, i) 554s 15 tests, 15 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/hygeinv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hygeinv.m 554s ***** demo 554s ## Plot various iCDFs from the hypergeometric distribution 554s p = 0.001:0.001:0.999; 554s x1 = hygeinv (p, 500, 50, 100); 554s x2 = hygeinv (p, 500, 60, 200); 554s x3 = hygeinv (p, 500, 70, 300); 554s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 554s grid on 554s ylim ([0, 60]) 554s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 554s "m = 500, k = 70, n = 300"}, "location", "northwest") 554s title ("Hypergeometric iCDF") 554s xlabel ("probability") 554s ylabel ("values in p (number of successes)") 554s ***** shared p 554s p = [-1 0 0.5 1 2]; 554s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 554s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 554s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 554s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 554s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 554s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 554s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 554s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 554s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 554s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 554s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 554s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 554s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 554s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 554s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 554s ***** error hygeinv () 554s ***** error hygeinv (1) 554s ***** error hygeinv (1,2) 554s ***** error hygeinv (1,2,3) 554s ***** error ... 554s hygeinv (ones (2), ones (3), 1, 1) 554s ***** error ... 554s hygeinv (1, ones (2), ones (3), 1) 554s ***** error ... 554s hygeinv (1, 1, ones (2), ones (3)) 554s ***** error hygeinv (i, 2, 2, 2) 554s ***** error hygeinv (2, i, 2, 2) 554s ***** error hygeinv (2, 2, i, 2) 554s ***** error hygeinv (2, 2, 2, i) 554s 26 tests, 26 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/bvncdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bvncdf.m 554s ***** demo 554s mu = [1, -1]; 554s sigma = [0.9, 0.4; 0.4, 0.3]; 554s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 554s x = [X1(:), X2(:)]; 554s p = bvncdf (x, mu, sigma); 554s Z = reshape (p, 25, 25); 554s surf (X1, X2, Z); 554s title ("Bivariate Normal Distribution"); 554s ylabel "X1" 554s xlabel "X2" 554s ***** test 554s mu = [1, -1]; 554s sigma = [0.9, 0.4; 0.4, 0.3]; 554s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 554s x = [X1(:), X2(:)]; 554s p = bvncdf (x, mu, sigma); 554s p_out = [0.00011878988774500, 0.00034404112322371, ... 554s 0.00087682502191813, 0.00195221905058185, ... 554s 0.00378235566873474, 0.00638175749734415, ... 554s 0.00943764224329656, 0.01239164888125426, ... 554s 0.01472750274376648, 0.01623228313374828]'; 554s assert (p([1:10]), p_out, 1e-16); 554s ***** test 554s mu = [1, -1]; 554s sigma = [0.9, 0.4; 0.4, 0.3]; 554s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 554s x = [X1(:), X2(:)]; 554s p = bvncdf (x, mu, sigma); 554s p_out = [0.8180695783608276, 0.8854485749482751, ... 554s 0.9308108777385832, 0.9579855743025508, ... 554s 0.9722897881414742, 0.9788150170059926, ... 554s 0.9813597788804785, 0.9821977956568989, ... 554s 0.9824283794464095, 0.9824809345614861]'; 554s assert (p([616:625]), p_out, 3e-16); 554s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 554s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 554s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 554s 5 tests, 5 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/tripdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tripdf.m 554s ***** demo 554s ## Plot various CDFs from the triangular distribution 554s x = 0.001:0.001:10; 554s y1 = tripdf (x, 3, 4, 6); 554s y2 = tripdf (x, 1, 2, 5); 554s y3 = tripdf (x, 2, 3, 9); 554s y4 = tripdf (x, 2, 5, 9); 554s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 554s grid on 554s xlim ([0, 10]) 554s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 554s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 554s "location", "northeast") 554s title ("Triangular CDF") 554s xlabel ("values in x") 554s ylabel ("probability") 554s ***** shared x, y, deps 554s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 554s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 554s deps = 2*eps; 554s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 554s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 554s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 554s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 554s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 554s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 554s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 554s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 554s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 554s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 554s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 554s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 554s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 554s ***** error tripdf () 554s ***** error tripdf (1) 554s ***** error tripdf (1, 2) 554s ***** error tripdf (1, 2, 3) 554s ***** error ... 554s tripdf (1, 2, 3, 4, 5) 554s ***** error ... 554s tripdf (ones (3), ones (2), ones(2), ones(2)) 554s ***** error ... 554s tripdf (ones (2), ones (3), ones(2), ones(2)) 554s ***** error ... 554s tripdf (ones (2), ones (2), ones(3), ones(2)) 554s ***** error ... 554s tripdf (ones (2), ones (2), ones(2), ones(3)) 554s ***** error tripdf (i, 2, 3, 4) 554s ***** error tripdf (1, i, 3, 4) 554s ***** error tripdf (1, 2, i, 4) 554s ***** error tripdf (1, 2, 3, i) 554s 26 tests, 26 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/mvnpdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvnpdf.m 554s ***** demo 554s mu = [1, -1]; 554s sigma = [0.9, 0.4; 0.4, 0.3]; 554s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 554s x = [X1(:), X2(:)]; 554s p = mvnpdf (x, mu, sigma); 554s surf (X1, X2, reshape (p, 25, 25)); 554s ***** error y = mvnpdf (); 554s ***** error y = mvnpdf ([]); 554s ***** error y = mvnpdf (ones (3,3,3)); 554s ***** error ... 554s y = mvnpdf (ones (10, 2), [4, 2, 3]); 554s ***** error ... 554s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 554s ***** error ... 554s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 554s ***** shared x, mu, sigma 554s x = [1, 2, 5, 4, 6]; 554s mu = [2, 0, -1, 1, 4]; 554s sigma = [2, 2, 2, 2, 2]; 554s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 554s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 554s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 554s 9 tests, 9 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/hninv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hninv.m 554s ***** demo 554s ## Plot various iCDFs from the half-normal distribution 554s p = 0.001:0.001:0.999; 554s x1 = hninv (p, 0, 1); 554s x2 = hninv (p, 0, 2); 554s x3 = hninv (p, 0, 3); 554s x4 = hninv (p, 0, 5); 554s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 554s grid on 554s ylim ([0, 10]) 554s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 554s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 554s title ("Half-normal iCDF") 554s xlabel ("probability") 554s ylabel ("x") 554s ***** shared p, x 554s p = [0, 0.3829, 0.6827, 1]; 554s x = [0, 1/2, 1, Inf]; 554s ***** assert (hninv (p, 0, 1), x, 1e-4); 554s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 554s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 554s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 554s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 554s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 554s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 554s ***** error hninv (1) 554s ***** error hninv (1, 2) 554s ***** error ... 554s hninv (1, ones (2), ones (3)) 554s ***** error ... 554s hninv (ones (2), 1, ones (3)) 554s ***** error ... 554s hninv (ones (2), ones (3), 1) 554s ***** error hninv (i, 2, 3) 554s ***** error hninv (1, i, 3) 554s ***** error hninv (1, 2, i) 554s 15 tests, 15 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/cauchyinv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/cauchyinv.m 554s ***** demo 554s ## Plot various iCDFs from the Cauchy distribution 554s p = 0.001:0.001:0.999; 554s x1 = cauchyinv (p, 0, 0.5); 554s x2 = cauchyinv (p, 0, 1); 554s x3 = cauchyinv (p, 0, 2); 554s x4 = cauchyinv (p, -2, 1); 554s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 554s grid on 554s ylim ([-5, 5]) 554s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 554s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 554s title ("Cauchy iCDF") 554s xlabel ("probability") 554s ylabel ("values in x") 554s ***** shared p 554s p = [-1 0 0.5 1 2]; 554s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 554s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 554s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 554s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 554s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 554s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 554s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 554s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 554s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 554s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 554s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 554s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 554s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 554s ***** error cauchyinv () 554s ***** error cauchyinv (1) 554s ***** error ... 554s cauchyinv (1, 2) 554s ***** error cauchyinv (1, 2, 3, 4) 554s ***** error ... 554s cauchyinv (ones (3), ones (2), ones(2)) 554s ***** error ... 554s cauchyinv (ones (2), ones (3), ones(2)) 554s ***** error ... 554s cauchyinv (ones (2), ones (2), ones(3)) 554s ***** error cauchyinv (i, 4, 3) 554s ***** error cauchyinv (1, i, 3) 554s ***** error cauchyinv (1, 4, i) 554s 20 tests, 20 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/geoinv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/geoinv.m 554s ***** demo 554s ## Plot various iCDFs from the geometric distribution 554s p = 0.001:0.001:0.999; 554s x1 = geoinv (p, 0.2); 554s x2 = geoinv (p, 0.5); 554s x3 = geoinv (p, 0.7); 554s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 554s grid on 554s ylim ([0, 10]) 554s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 554s title ("Geometric iCDF") 554s xlabel ("probability") 554s ylabel ("values in x (number of failures)") 554s ***** shared p 554s p = [-1 0 0.75 1 2]; 554s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 554s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 554s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 554s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 554s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 554s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 554s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 554s ***** error geoinv () 554s ***** error geoinv (1) 554s ***** error ... 554s geoinv (ones (3), ones (2)) 554s ***** error ... 554s geoinv (ones (2), ones (3)) 554s ***** error ... 554s geoinv (i, 2) 554s ***** error ... 554s geoinv (2, i) 554s 13 tests, 13 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/mnrnd.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mnrnd.m 554s ***** test 554s n = 10; 554s pk = [0.2, 0.5, 0.3]; 554s r = mnrnd (n, pk); 554s assert (size (r), size (pk)); 554s assert (all (r >= 0)); 554s assert (all (round (r) == r)); 554s assert (sum (r) == n); 554s ***** test 554s n = 10 * ones (3, 1); 554s pk = [0.2, 0.5, 0.3]; 554s r = mnrnd (n, pk); 554s assert (size (r), [length(n), length(pk)]); 554s assert (all (r >= 0)); 554s assert (all (round (r) == r)); 554s assert (all (sum (r, 2) == n)); 554s ***** test 554s n = (1:2)'; 554s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 554s r = mnrnd (n, pk); 554s assert (size (r), size (pk)); 554s assert (all (r >= 0)); 554s assert (all (round (r) == r)); 554s assert (all (sum (r, 2) == n)); 554s 3 tests, 3 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/nakarnd.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nakarnd.m 554s ***** assert (size (nakarnd (1, 1)), [1 1]) 554s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 554s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 554s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 554s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 554s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 554s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 554s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 554s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 554s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 554s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 554s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 554s ***** assert (class (nakarnd (1, 1)), "double") 554s ***** assert (class (nakarnd (1, single (1))), "single") 554s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 554s ***** assert (class (nakarnd (single (1), 1)), "single") 554s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 554s ***** error nakarnd () 554s ***** error nakarnd (1) 554s ***** error ... 554s nakarnd (ones (3), ones (2)) 554s ***** error ... 554s nakarnd (ones (2), ones (3)) 554s ***** error nakarnd (i, 2, 3) 554s ***** error nakarnd (1, i, 3) 554s ***** error ... 554s nakarnd (1, 2, -1) 554s ***** error ... 554s nakarnd (1, 2, 1.2) 554s ***** error ... 554s nakarnd (1, 2, ones (2)) 554s ***** error ... 554s nakarnd (1, 2, [2 -1 2]) 554s ***** error ... 554s nakarnd (1, 2, [2 0 2.5]) 554s ***** error ... 554s nakarnd (1, 2, 2, -1, 5) 554s ***** error ... 554s nakarnd (1, 2, 2, 1.5, 5) 554s ***** error ... 554s nakarnd (2, ones (2), 3) 554s ***** error ... 554s nakarnd (2, ones (2), [3, 2]) 554s ***** error ... 554s nakarnd (2, ones (2), 3, 2) 554s 33 tests, 33 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/gpcdf.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gpcdf.m 554s ***** demo 554s ## Plot various CDFs from the generalized Pareto distribution 554s x = 0:0.001:5; 554s p1 = gpcdf (x, 1, 1, 0); 554s p2 = gpcdf (x, 5, 1, 0); 554s p3 = gpcdf (x, 20, 1, 0); 554s p4 = gpcdf (x, 1, 2, 0); 554s p5 = gpcdf (x, 5, 2, 0); 554s p6 = gpcdf (x, 20, 2, 0); 554s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 554s x, p4, "-c", x, p5, "-m", x, p6, "-k") 554s grid on 554s xlim ([0, 5]) 554s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 554s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 554s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 554s "location", "northwest") 554s title ("Generalized Pareto CDF") 554s xlabel ("values in x") 554s ylabel ("probability") 554s ***** shared x, y1, y1u, y2, y2u, y3, y3u 554s x = [-Inf, -1, 0, 1/2, 1, Inf]; 554s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 554s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 554s y2 = [0, 0, 0, 1/3, 1/2, 1]; 554s y2u = [1, 1, 1, 2/3, 1/2, 0]; 554s y3 = [0, 0, 0, 1/2, 1, 1]; 554s y3u = [1, 1, 1, 1/2, 0, 0]; 554s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 554s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 554s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 554s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 554s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 554s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 554s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 554s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 554s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 554s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 554s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 554s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 554s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 554s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 554s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 554s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 554s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 554s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 554s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 554s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 554s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 554s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 554s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 554s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 554s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 554s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 554s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 554s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 554s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 554s [y2u(1:3), NaN, y2u(5:6)], eps) 554s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 554s [y2u(1:3), NaN, y2u(5:6)], eps) 554s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 554s [y2u(1:3), NaN, y2u(5:6)], eps) 554s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 554s [y2u(1:3), NaN, y2u(5:6)], eps) 554s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 554s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 554s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 554s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 554s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 554s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 554s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 554s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 554s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 554s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 554s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 554s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 554s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 554s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 554s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 554s [y3u(1:3), NaN, y3u(5:6)], eps) 554s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 554s [y3u(1:3), NaN, y3u(5:6)], eps) 554s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 554s [y3u(1:3), NaN, y3u(5:6)], eps) 554s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 554s [y3u(1:3), NaN, y3u(5:6)], eps) 554s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 554s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 554s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 554s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 554s ***** error gpcdf () 554s ***** error gpcdf (1) 554s ***** error gpcdf (1, 2) 554s ***** error gpcdf (1, 2, 3) 554s ***** error gpcdf (1, 2, 3, 4, "tail") 554s ***** error gpcdf (1, 2, 3, 4, 5) 554s ***** error ... 554s gpcdf (ones (3), ones (2), ones(2), ones(2)) 554s ***** error ... 554s gpcdf (ones (2), ones (3), ones(2), ones(2)) 554s ***** error ... 554s gpcdf (ones (2), ones (2), ones(3), ones(2)) 554s ***** error ... 554s gpcdf (ones (2), ones (2), ones(2), ones(3)) 554s ***** error gpcdf (i, 2, 3, 4) 554s ***** error gpcdf (1, i, 3, 4) 554s ***** error gpcdf (1, 2, i, 4) 554s ***** error gpcdf (1, 2, 3, i) 554s 76 tests, 76 passed, 0 known failure, 0 skipped 554s [inst/dist_fun/vminv.m] 554s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/vminv.m 554s ***** demo 554s ## Plot various iCDFs from the von Mises distribution 554s 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]; 554s x1 = vminv (p1, 0, 0.5); 554s x2 = vminv (p1, 0, 1); 554s x3 = vminv (p1, 0, 2); 554s x4 = vminv (p1, 0, 4); 554s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 554s grid on 554s ylim ([-pi, pi]) 554s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 554s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 554s title ("Von Mises iCDF") 554s xlabel ("probability") 554s ylabel ("values in x") 554s ***** shared x, p0, p1 554s x = [-pi:pi/2:pi]; 554s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 554s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 554s ***** assert (vminv (p0, 0, 1), x, 5e-5) 555s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 555s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 555s ***** error vminv () 555s ***** error vminv (1) 555s ***** error vminv (1, 2) 555s ***** error ... 555s vminv (ones (3), ones (2), ones (2)) 555s ***** error ... 555s vminv (ones (2), ones (3), ones (2)) 555s ***** error ... 555s vminv (ones (2), ones (2), ones (3)) 555s ***** error vminv (i, 2, 2) 555s ***** error vminv (2, i, 2) 555s ***** error vminv (2, 2, i) 555s 12 tests, 12 passed, 0 known failure, 0 skipped 555s [inst/dist_fun/hygernd.m] 555s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hygernd.m 555s ***** assert (size (hygernd (4,2,2)), [1, 1]) 555s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 555s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 555s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 555s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 555s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 555s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 555s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 555s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 555s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 555s ***** assert (class (hygernd (4,2,2)), "double") 555s ***** assert (class (hygernd (single (4),2,2)), "single") 555s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 555s ***** assert (class (hygernd (4,single (2),2)), "single") 555s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 555s ***** assert (class (hygernd (4,2,single (2))), "single") 555s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 555s ***** error hygernd () 555s ***** error hygernd (1) 555s ***** error hygernd (1, 2) 555s ***** error ... 555s hygernd (ones (3), ones (2), ones (2)) 555s ***** error ... 555s hygernd (ones (2), ones (3), ones (2)) 555s ***** error ... 555s hygernd (ones (2), ones (2), ones (3)) 555s ***** error hygernd (i, 2, 3) 555s ***** error hygernd (1, i, 3) 555s ***** error hygernd (1, 2, i) 555s ***** error ... 555s hygernd (1, 2, 3, -1) 555s ***** error ... 555s hygernd (1, 2, 3, 1.2) 555s ***** error ... 555s hygernd (1, 2, 3, ones (2)) 555s ***** error ... 555s hygernd (1, 2, 3, [2 -1 2]) 555s ***** error ... 555s hygernd (1, 2, 3, [2 0 2.5]) 555s ***** error ... 555s hygernd (1, 2, 3, 2, -1, 5) 555s ***** error ... 555s hygernd (1, 2, 3, 2, 1.5, 5) 555s ***** error ... 555s hygernd (2, ones (2), 2, 3) 555s ***** error ... 555s hygernd (2, ones (2), 2, [3, 2]) 555s ***** error ... 555s hygernd (2, ones (2), 2, 3, 2) 555s 36 tests, 36 passed, 0 known failure, 0 skipped 555s [inst/dist_fun/gampdf.m] 555s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gampdf.m 555s ***** demo 555s ## Plot various PDFs from the Gamma distribution 555s x = 0:0.01:20; 555s y1 = gampdf (x, 1, 2); 555s y2 = gampdf (x, 2, 2); 555s y3 = gampdf (x, 3, 2); 555s y4 = gampdf (x, 5, 1); 555s y5 = gampdf (x, 9, 0.5); 555s y6 = gampdf (x, 7.5, 1); 555s y7 = gampdf (x, 0.5, 1); 555s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 555s x, y5, "-k", x, y6, "-b", x, y7, "-c") 555s grid on 555s ylim ([0,0.5]) 555s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 555s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 555s "α = 0.5, β = 1"}, "location", "northeast") 555s title ("Gamma PDF") 555s xlabel ("values in x") 555s ylabel ("density") 555s ***** shared x, y 555s x = [-1 0 0.5 1 Inf]; 555s y = [0 exp(-x(2:end))]; 555s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 555s ***** assert (gampdf (x, 1, ones (1,5)), y) 555s ***** assert (gampdf (x, ones (1,5), 1), y) 555s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 555s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 555s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 555s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 555s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 555s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 555s ***** error gampdf () 555s ***** error gampdf (1) 555s ***** error gampdf (1,2) 555s ***** error ... 555s gampdf (ones (3), ones (2), ones (2)) 555s ***** error ... 555s gampdf (ones (2), ones (3), ones (2)) 555s ***** error ... 555s gampdf (ones (2), ones (2), ones (3)) 555s ***** error gampdf (i, 2, 2) 555s ***** error gampdf (2, i, 2) 555s ***** error gampdf (2, 2, i) 555s 18 tests, 18 passed, 0 known failure, 0 skipped 555s [inst/dist_fun/binopdf.m] 555s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/binopdf.m 555s ***** demo 555s ## Plot various PDFs from the binomial distribution 555s x = 0:40; 555s y1 = binopdf (x, 20, 0.5); 555s y2 = binopdf (x, 20, 0.7); 555s y3 = binopdf (x, 40, 0.5); 555s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 555s grid on 555s ylim ([0, 0.25]) 555s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 555s "n = 40, ps = 0.5"}, "location", "northeast") 555s title ("Binomial PDF") 555s xlabel ("values in x (number of successes)") 555s ylabel ("density") 555s ***** shared x, y 555s x = [-1 0 1 2 3]; 555s y = [0 1/4 1/2 1/4 0]; 555s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 555s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 555s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 555s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 555s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 555s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 555s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 556s ***** assert (binopdf (1, 1, 1), 1) 556s ***** assert (binopdf (0, 3, 0), 1) 556s ***** assert (binopdf (2, 2, 1), 1) 556s ***** assert (binopdf (1, 2, 1), 0) 556s ***** assert (binopdf (0, 1.1, 0), NaN) 556s ***** assert (binopdf (1, 2, -1), NaN) 556s ***** assert (binopdf (1, 2, 1.5), NaN) 556s ***** assert (binopdf ([], 1, 1), []) 556s ***** assert (binopdf (1, [], 1), []) 556s ***** assert (binopdf (1, 1, []), []) 556s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 556s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 556s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 556s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 556s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 556s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 556s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 556s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 556s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 556s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 556s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 556s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 556s ***** error binopdf () 556s ***** error binopdf (1) 556s ***** error binopdf (1, 2) 556s ***** error binopdf (1, 2, 3, 4) 556s ***** error ... 556s binopdf (ones (3), ones (2), ones (2)) 556s ***** error ... 556s binopdf (ones (2), ones (3), ones (2)) 556s ***** error ... 556s binopdf (ones (2), ones (2), ones (3)) 556s ***** error binopdf (i, 2, 2) 556s ***** error binopdf (2, i, 2) 556s ***** error binopdf (2, 2, i) 556s 39 tests, 39 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/plcdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/plcdf.m 556s ***** demo 556s ## Plot various CDFs from the Piecewise linear distribution 556s data = 0:0.01:10; 556s x1 = [0, 1, 3, 4, 7, 10]; 556s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 556s x2 = [0, 2, 5, 6, 7, 8]; 556s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 556s p1 = plcdf (data, x1, Fx1); 556s p2 = plcdf (data, x2, Fx2); 556s plot (data, p1, "-b", data, p2, "g") 556s grid on 556s ylim ([0, 1]) 556s xlim ([0, 10]) 556s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 556s title ("Piecewise linear CDF") 556s xlabel ("values in data") 556s ylabel ("probability") 556s ***** test 556s data = 0:0.2:1; 556s p = plcdf (data, [0, 1], [0, 1]); 556s assert (p, data); 556s ***** test 556s data = 0:0.2:1; 556s p = plcdf (data, [0, 2], [0, 1]); 556s assert (p, 0.5 * data); 556s ***** test 556s data = 0:0.2:1; 556s p = plcdf (data, [0, 1], [0, 0.5]); 556s assert (p, 0.5 * data); 556s ***** test 556s data = 0:0.2:1; 556s p = plcdf (data, [0, 0.5], [0, 1]); 556s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 556s ***** test 556s data = 0:0.2:1; 556s p = plcdf (data, [0, 1], [0, 1], "upper"); 556s assert (p, 1 - data); 556s ***** error plcdf () 556s ***** error plcdf (1) 556s ***** error plcdf (1, 2) 556s ***** error plcdf (1, 2, 3, "uper") 556s ***** error plcdf (1, 2, 3, 4) 556s ***** error ... 556s plcdf (1, [0, 1, 2], [0, 1]) 556s ***** error ... 556s plcdf (1, [0], [1]) 556s ***** error ... 556s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 556s ***** error ... 556s plcdf (1, [0, 1, 2], [0, i, 1]) 556s ***** error ... 556s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 556s ***** error ... 556s plcdf (1, [0, i, 2], [0, 0.5, 1]) 556s ***** error ... 556s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 556s 17 tests, 17 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/tlsinv.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tlsinv.m 556s ***** demo 556s ## Plot various iCDFs from the location-scale Student's T distribution 556s p = 0.001:0.001:0.999; 556s x1 = tlsinv (p, 0, 1, 1); 556s x2 = tlsinv (p, 0, 2, 2); 556s x3 = tlsinv (p, 3, 2, 5); 556s x4 = tlsinv (p, -1, 3, Inf); 556s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 556s grid on 556s xlim ([0, 1]) 556s ylim ([-8, 8]) 556s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 556s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 556s "location", "southeast") 556s title ("Location-scale Student's T iCDF") 556s xlabel ("probability") 556s ylabel ("values in x") 556s ***** shared p 556s p = [-1 0 0.5 1 2]; 556s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 556s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 556s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 556s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 556s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 556s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 556s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 556s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 556s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 556s ***** error tlsinv () 556s ***** error tlsinv (1) 556s ***** error tlsinv (1, 2) 556s ***** error tlsinv (1, 2, 3) 556s ***** error ... 556s tlsinv (ones (3), ones (2), 1, 1) 556s ***** error ... 556s tlsinv (ones (2), 1, ones (3), 1) 556s ***** error ... 556s tlsinv (ones (2), 1, 1, ones (3)) 556s ***** error tlsinv (i, 2, 3, 4) 556s ***** error tlsinv (2, i, 3, 4) 556s ***** error tlsinv (2, 2, i, 4) 556s ***** error tlsinv (2, 2, 3, i) 556s 20 tests, 20 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/mvtcdfqmc.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvtcdfqmc.m 556s ***** error mvtcdfqmc (1, 2, 3); 556s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 556s 2 tests, 2 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/binocdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/binocdf.m 556s ***** demo 556s ## Plot various CDFs from the binomial distribution 556s x = 0:40; 556s p1 = binocdf (x, 20, 0.5); 556s p2 = binocdf (x, 20, 0.7); 556s p3 = binocdf (x, 40, 0.5); 556s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 556s grid on 556s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 556s "n = 40, ps = 0.5"}, "location", "southeast") 556s title ("Binomial CDF") 556s xlabel ("values in x (number of successes)") 556s ylabel ("probability") 556s ***** shared x, p, p1 556s x = [-1 0 1 2 3]; 556s p = [0 1/4 3/4 1 1]; 556s p1 = 1 - p; 556s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 556s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 556s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 556s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 556s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 556s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 556s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 556s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 556s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 556s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 556s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 556s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 556s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 556s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 556s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 556s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 556s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 556s ***** error binocdf () 556s ***** error binocdf (1) 556s ***** error binocdf (1, 2) 556s ***** error binocdf (1, 2, 3, 4, 5) 556s ***** error binocdf (1, 2, 3, "tail") 556s ***** error binocdf (1, 2, 3, 4) 556s ***** error ... 556s binocdf (ones (3), ones (2), ones (2)) 556s ***** error ... 556s binocdf (ones (2), ones (3), ones (2)) 556s ***** error ... 556s binocdf (ones (2), ones (2), ones (3)) 556s ***** error binocdf (i, 2, 2) 556s ***** error binocdf (2, i, 2) 556s ***** error binocdf (2, 2, i) 556s 29 tests, 29 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/gumbelrnd.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gumbelrnd.m 556s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 556s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 556s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 556s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 556s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 556s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 556s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 556s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 556s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 556s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 556s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 556s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 556s ***** assert (class (gumbelrnd (1, 1)), "double") 556s ***** assert (class (gumbelrnd (1, single (1))), "single") 556s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 556s ***** assert (class (gumbelrnd (single (1), 1)), "single") 556s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 556s ***** error gumbelrnd () 556s ***** error gumbelrnd (1) 556s ***** error ... 556s gumbelrnd (ones (3), ones (2)) 556s ***** error ... 556s gumbelrnd (ones (2), ones (3)) 556s ***** error gumbelrnd (i, 2, 3) 556s ***** error gumbelrnd (1, i, 3) 556s ***** error ... 556s gumbelrnd (1, 2, -1) 556s ***** error ... 556s gumbelrnd (1, 2, 1.2) 556s ***** error ... 556s gumbelrnd (1, 2, ones (2)) 556s ***** error ... 556s gumbelrnd (1, 2, [2 -1 2]) 556s ***** error ... 556s gumbelrnd (1, 2, [2 0 2.5]) 556s ***** error ... 556s gumbelrnd (1, 2, 2, -1, 5) 556s ***** error ... 556s gumbelrnd (1, 2, 2, 1.5, 5) 556s ***** error ... 556s gumbelrnd (2, ones (2), 3) 556s ***** error ... 556s gumbelrnd (2, ones (2), [3, 2]) 556s ***** error ... 556s gumbelrnd (2, ones (2), 3, 2) 556s 33 tests, 33 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/nctcdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nctcdf.m 556s ***** demo 556s ## Plot various CDFs from the noncentral Τ distribution 556s x = -5:0.01:5; 556s p1 = nctcdf (x, 1, 0); 556s p2 = nctcdf (x, 4, 0); 556s p3 = nctcdf (x, 1, 2); 556s p4 = nctcdf (x, 4, 2); 556s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 556s grid on 556s xlim ([-5, 5]) 556s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 556s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 556s title ("Noncentral Τ CDF") 556s xlabel ("values in x") 556s ylabel ("probability") 556s ***** demo 556s ## Compare the noncentral T CDF with MU = 1 to the T CDF 556s ## with the same number of degrees of freedom (10). 556s 556s x = -5:0.1:5; 556s p1 = nctcdf (x, 10, 1); 556s p2 = tcdf (x, 10); 556s plot (x, p1, "-", x, p2, "-") 556s grid on 556s xlim ([-5, 5]) 556s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 556s title ("Noncentral T vs T CDFs") 556s xlabel ("values in x") 556s ylabel ("probability") 556s ***** test 556s x = -2:0.1:2; 556s p = nctcdf (x, 10, 1); 556s assert (p(1), 0.003302485766631558, 1e-14); 556s assert (p(2), 0.004084668193532631, 1e-14); 556s assert (p(3), 0.005052800319478737, 1e-14); 556s assert (p(41), 0.8076115625303751, 1e-14); 556s ***** test 556s p = nctcdf (12, 10, 3); 556s assert (p, 0.9997719343243797, 1e-14); 556s ***** test 556s p = nctcdf (2, 3, 2); 556s assert (p, 0.4430757822176028, 1e-14); 556s ***** test 556s p = nctcdf (2, 3, 2, "upper"); 556s assert (p, 0.5569242177823971, 1e-14); 556s ***** test 556s p = nctcdf ([3, 6], 3, 2, "upper"); 556s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 556s ***** error nctcdf () 556s ***** error nctcdf (1) 556s ***** error nctcdf (1, 2) 556s ***** error nctcdf (1, 2, 3, "tail") 556s ***** error nctcdf (1, 2, 3, 4) 556s ***** error ... 556s nctcdf (ones (3), ones (2), ones (2)) 556s ***** error ... 556s nctcdf (ones (2), ones (3), ones (2)) 556s ***** error ... 556s nctcdf (ones (2), ones (2), ones (3)) 556s ***** error nctcdf (i, 2, 2) 556s ***** error nctcdf (2, i, 2) 556s ***** error nctcdf (2, 2, i) 556s 16 tests, 16 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/ricernd.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ricernd.m 556s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 556s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 556s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 556s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 556s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 556s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 556s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 556s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 556s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 556s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 556s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 556s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 556s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 556s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 556s ***** assert (class (ricernd (1, 1)), "double") 556s ***** assert (class (ricernd (1, single (0))), "single") 556s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 556s ***** assert (class (ricernd (1, single (1), 2)), "single") 556s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 556s ***** assert (class (ricernd (single (1), 1, 2)), "single") 556s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 556s ***** error ricernd () 556s ***** error ricernd (1) 556s ***** error ... 556s ricernd (ones (3), ones (2)) 556s ***** error ... 556s ricernd (ones (2), ones (3)) 556s ***** error ricernd (i, 2) 556s ***** error ricernd (1, i) 556s ***** error ... 556s ricernd (1, 1/2, -1) 556s ***** error ... 556s ricernd (1, 1/2, 1.2) 556s ***** error ... 556s ricernd (1, 1/2, ones (2)) 556s ***** error ... 556s ricernd (1, 1/2, [2 -1 2]) 556s ***** error ... 556s ricernd (1, 1/2, [2 0 2.5]) 556s ***** error ... 556s ricernd (1, 1/2, 2, -1, 5) 556s ***** error ... 556s ricernd (1, 1/2, 2, 1.5, 5) 556s ***** error ... 556s ricernd (2, 1/2 * ones (2), 3) 556s ***** error ... 556s ricernd (2, 1/2 * ones (2), [3, 2]) 556s ***** error ... 556s ricernd (2, 1/2 * ones (2), 3, 2) 556s ***** error ... 556s ricernd (2 * ones (2), 1/2, 3) 556s ***** error ... 556s ricernd (2 * ones (2), 1/2, [3, 2]) 556s ***** error ... 556s ricernd (2 * ones (2), 1/2, 3, 2) 556s 40 tests, 40 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/norminv.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/norminv.m 556s ***** demo 556s ## Plot various iCDFs from the normal distribution 556s p = 0.001:0.001:0.999; 556s x1 = norminv (p, 0, 0.5); 556s x2 = norminv (p, 0, 1); 556s x3 = norminv (p, 0, 2); 556s x4 = norminv (p, -2, 0.8); 556s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 556s grid on 556s ylim ([-5, 5]) 556s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 556s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 556s title ("Normal iCDF") 556s xlabel ("probability") 556s ylabel ("values in x") 556s ***** shared p 556s p = [-1 0 0.5 1 2]; 556s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 556s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 556s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 556s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 556s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 556s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 556s ***** assert (norminv (p), probit (p)) 556s ***** assert (norminv (0.31254), probit (0.31254)) 556s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 556s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 556s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 556s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 556s ***** error norminv () 556s ***** error ... 556s norminv (ones (3), ones (2), ones (2)) 556s ***** error ... 556s norminv (ones (2), ones (3), ones (2)) 556s ***** error ... 556s norminv (ones (2), ones (2), ones (3)) 556s ***** error norminv (i, 2, 2) 556s ***** error norminv (2, i, 2) 556s ***** error norminv (2, 2, i) 556s 19 tests, 19 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/mvncdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvncdf.m 556s ***** demo 556s mu = [1, -1]; 556s Sigma = [0.9, 0.4; 0.4, 0.3]; 556s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 556s X = [X1(:), X2(:)]; 556s p = mvncdf (X, mu, Sigma); 556s Z = reshape (p, 25, 25); 556s surf (X1, X2, Z); 556s title ("Bivariate Normal Distribution"); 556s ylabel "X1" 556s xlabel "X2" 556s ***** demo 556s mu = [0, 0]; 556s Sigma = [0.25, 0.3; 0.3, 1]; 556s p = mvncdf ([0 0], [1 1], mu, Sigma); 556s x1 = -3:.2:3; 556s x2 = -3:.2:3; 556s [X1, X2] = meshgrid (x1, x2); 556s X = [X1(:), X2(:)]; 556s p = mvnpdf (X, mu, Sigma); 556s p = reshape (p, length (x2), length (x1)); 556s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 556s xlabel ("x"); 556s ylabel ("p"); 556s title ("Probability over Rectangular Region"); 556s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 556s ***** test 556s fD = (-2:2)'; 556s X = repmat (fD, 1, 4); 556s p = mvncdf (X); 556s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 556s ***** test 556s mu = [1, -1]; 556s Sigma = [0.9, 0.4; 0.4, 0.3]; 556s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 556s X = [X1(:), X2(:)]; 556s p = mvncdf (X, mu, Sigma); 556s p_out = [0.00011878988774500, 0.00034404112322371, ... 556s 0.00087682502191813, 0.00195221905058185, ... 556s 0.00378235566873474, 0.00638175749734415, ... 556s 0.00943764224329656, 0.01239164888125426, ... 556s 0.01472750274376648, 0.01623228313374828]'; 556s assert (p([1:10]), p_out, 1e-16); 556s ***** test 556s mu = [1, -1]; 556s Sigma = [0.9, 0.4; 0.4, 0.3]; 556s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 556s X = [X1(:), X2(:)]; 556s p = mvncdf (X, mu, Sigma); 556s p_out = [0.8180695783608276, 0.8854485749482751, ... 556s 0.9308108777385832, 0.9579855743025508, ... 556s 0.9722897881414742, 0.9788150170059926, ... 556s 0.9813597788804785, 0.9821977956568989, ... 556s 0.9824283794464095, 0.9824809345614861]'; 556s assert (p([616:625]), p_out, 3e-16); 556s ***** test 556s mu = [0, 0]; 556s Sigma = [0.25, 0.3; 0.3, 1]; 556s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 556s assert (p, 0.2097424404755626, 1e-16); 556s assert (err, 1e-08); 556s ***** test 556s x = [1 2]; 556s mu = [0.5 1.5]; 556s sigma = [1.0, 0.5; 0.5, 1.0]; 556s p = mvncdf (x, mu, sigma); 556s assert (p, 0.546244443857090, 1e-15); 556s ***** test 556s x = [1 2]; 556s mu = [0.5 1.5]; 556s sigma = [1.0, 0.5; 0.5, 1.0]; 556s a = [-inf 0]; 556s p = mvncdf (a, x, mu, sigma); 556s assert (p, 0.482672935215631, 1e-15); 556s ***** error p = mvncdf (randn (25,26), [], eye (26)); 556s ***** error p = mvncdf (randn (25,8), [], eye (9)); 556s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 556s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 556s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 556s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 556s 12 tests, 12 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/riceinv.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/riceinv.m 556s ***** demo 556s ## Plot various iCDFs from the Rician distribution 556s p = 0.001:0.001:0.999; 556s x1 = riceinv (p, 0, 1); 556s x2 = riceinv (p, 0.5, 1); 556s x3 = riceinv (p, 1, 1); 556s x4 = riceinv (p, 2, 1); 556s x5 = riceinv (p, 4, 1); 556s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 556s grid on 556s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 556s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 556s title ("Rician iCDF") 556s xlabel ("probability") 556s ylabel ("values in x") 556s ***** shared p 556s p = [-1 0 0.75 1 2]; 556s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 556s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 556s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 556s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 556s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 556s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 556s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 556s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 556s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 556s ***** assert (riceinv ([p, NaN], single (1), 2), ... 556s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 556s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 556s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 556s ***** error riceinv () 556s ***** error riceinv (1) 556s ***** error riceinv (1,2) 556s ***** error riceinv (1,2,3,4) 556s ***** error ... 556s riceinv (ones (3), ones (2), ones (2)) 556s ***** error ... 556s riceinv (ones (2), ones (3), ones (2)) 556s ***** error ... 556s riceinv (ones (2), ones (2), ones (3)) 556s ***** error riceinv (i, 2, 2) 556s ***** error riceinv (2, i, 2) 556s ***** error riceinv (2, 2, i) 556s 20 tests, 20 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/trnd.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/trnd.m 556s ***** assert (size (trnd (2)), [1, 1]) 556s ***** assert (size (trnd (ones (2,1))), [2, 1]) 556s ***** assert (size (trnd (ones (2,2))), [2, 2]) 556s ***** assert (size (trnd (1, 3)), [3, 3]) 556s ***** assert (size (trnd (1, [4 1])), [4, 1]) 556s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 556s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 556s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 556s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 556s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 556s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 556s ***** assert (trnd (0, 1, 1), NaN) 556s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 556s ***** assert (class (trnd (2)), "double") 556s ***** assert (class (trnd (single (2))), "single") 556s ***** assert (class (trnd (single ([2 2]))), "single") 556s ***** error trnd () 556s ***** error trnd (i) 556s ***** error ... 556s trnd (1, -1) 556s ***** error ... 556s trnd (1, 1.2) 556s ***** error ... 556s trnd (1, ones (2)) 556s ***** error ... 556s trnd (1, [2 -1 2]) 556s ***** error ... 556s trnd (1, [2 0 2.5]) 556s ***** error ... 556s trnd (ones (2), ones (2)) 556s ***** error ... 556s trnd (1, 2, -1, 5) 556s ***** error ... 556s trnd (1, 2, 1.5, 5) 556s ***** error trnd (ones (2,2), 3) 556s ***** error trnd (ones (2,2), [3, 2]) 556s ***** error trnd (ones (2,2), 2, 3) 556s 29 tests, 29 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/nakainv.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nakainv.m 556s ***** demo 556s ## Plot various iCDFs from the Nakagami distribution 556s p = 0.001:0.001:0.999; 556s x1 = nakainv (p, 0.5, 1); 556s x2 = nakainv (p, 1, 1); 556s x3 = nakainv (p, 1, 2); 556s x4 = nakainv (p, 1, 3); 556s x5 = nakainv (p, 2, 1); 556s x6 = nakainv (p, 2, 2); 556s x7 = nakainv (p, 5, 1); 556s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 556s p, x5, "-k", p, x6, "-b", p, x7, "-c") 556s grid on 556s ylim ([0, 3]) 556s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 556s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 556s "μ = 5, ω = 1"}, "location", "northwest") 556s title ("Nakagami iCDF") 556s xlabel ("probability") 556s ylabel ("values in x") 556s ***** shared p, y 556s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 556s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 556s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 556s ***** assert (nakainv (p, 1, 1), y, eps) 556s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 556s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 556s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 556s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 556s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 556s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 556s ***** error nakainv () 556s ***** error nakainv (1) 556s ***** error nakainv (1, 2) 556s ***** error ... 556s nakainv (ones (3), ones (2), ones(2)) 556s ***** error ... 556s nakainv (ones (2), ones (3), ones(2)) 556s ***** error ... 556s nakainv (ones (2), ones (2), ones(3)) 556s ***** error nakainv (i, 4, 3) 556s ***** error nakainv (1, i, 3) 556s ***** error nakainv (1, 4, i) 556s 17 tests, 17 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/fpdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/fpdf.m 556s ***** demo 556s ## Plot various PDFs from the F distribution 556s x = 0.01:0.01:4; 556s y1 = fpdf (x, 1, 1); 556s y2 = fpdf (x, 2, 1); 556s y3 = fpdf (x, 5, 2); 556s y4 = fpdf (x, 10, 1); 556s y5 = fpdf (x, 100, 100); 556s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 556s grid on 556s ylim ([0, 2.5]) 556s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 556s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 556s "df1 = 100, df2 = 100"}, "location", "northeast") 556s title ("F PDF") 556s xlabel ("values in x") 556s ylabel ("density") 556s ***** shared x, y 556s x = [-1 0 0.5 1 2]; 556s y = [0 0 4/9 1/4 1/9]; 556s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 556s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 556s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 556s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 556s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 556s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 556s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 556s rand ("seed", 1234); # for reproducibility 556s xr = rand (10,1); 556s xr = xr(x > 0.1 & x < 0.9); 556s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 556s assert (fpdf (xr, 1, 2), yr, 5*eps); 556s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 556s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 556s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 556s ***** error fpdf () 556s ***** error fpdf (1) 556s ***** error fpdf (1,2) 556s ***** error ... 556s fpdf (ones (3), ones (2), ones (2)) 556s ***** error ... 556s fpdf (ones (2), ones (3), ones (2)) 556s ***** error ... 556s fpdf (ones (2), ones (2), ones (3)) 556s ***** error fpdf (i, 2, 2) 556s ***** error fpdf (2, i, 2) 556s ***** error fpdf (2, 2, i) 556s 19 tests, 19 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/burrpdf.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/burrpdf.m 556s ***** demo 556s ## Plot various PDFs from the Burr type XII distribution 556s x = 0.001:0.001:3; 556s y1 = burrpdf (x, 1, 1, 1); 556s y2 = burrpdf (x, 1, 1, 2); 556s y3 = burrpdf (x, 1, 1, 3); 556s y4 = burrpdf (x, 1, 2, 1); 556s y5 = burrpdf (x, 1, 3, 1); 556s y6 = burrpdf (x, 1, 0.5, 2); 556s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 556s x, y4, "-c", x, y5, "-m", x, y6, "-k") 556s grid on 556s ylim ([0, 2]) 556s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 556s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 556s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 556s "location", "northeast") 556s title ("Burr type XII PDF") 556s xlabel ("values in x") 556s ylabel ("density") 556s ***** shared x, y 556s x = [-1, 0, 1, 2, Inf]; 556s y = [0, 1, 1/4, 1/9, 0]; 556s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 556s ***** assert (burrpdf (x, 1, 1, 1), y) 556s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 556s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 556s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 556s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 556s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 556s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 556s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 556s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 556s ***** error burrpdf () 556s ***** error burrpdf (1) 556s ***** error burrpdf (1, 2) 556s ***** error burrpdf (1, 2, 3) 556s ***** error ... 556s burrpdf (1, 2, 3, 4, 5) 556s ***** error ... 556s burrpdf (ones (3), ones (2), ones(2), ones(2)) 556s ***** error ... 556s burrpdf (ones (2), ones (3), ones(2), ones(2)) 556s ***** error ... 556s burrpdf (ones (2), ones (2), ones(3), ones(2)) 556s ***** error ... 556s burrpdf (ones (2), ones (2), ones(2), ones(3)) 556s ***** error burrpdf (i, 2, 3, 4) 556s ***** error burrpdf (1, i, 3, 4) 556s ***** error burrpdf (1, 2, i, 4) 556s ***** error burrpdf (1, 2, 3, i) 556s 23 tests, 23 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/exprnd.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/exprnd.m 556s ***** assert (size (exprnd (2)), [1, 1]) 556s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 556s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 556s ***** assert (size (exprnd (1, 3)), [3, 3]) 556s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 556s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 556s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 556s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 556s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 556s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 556s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 556s ***** assert (class (exprnd (2)), "double") 556s ***** assert (class (exprnd (single (2))), "single") 556s ***** assert (class (exprnd (single ([2 2]))), "single") 556s ***** error exprnd () 556s ***** error exprnd (i) 556s ***** error ... 556s exprnd (1, -1) 556s ***** error ... 556s exprnd (1, 1.2) 556s ***** error ... 556s exprnd (1, ones (2)) 556s ***** error ... 556s exprnd (1, [2 -1 2]) 556s ***** error ... 556s exprnd (1, [2 0 2.5]) 556s ***** error ... 556s exprnd (ones (2), ones (2)) 556s ***** error ... 556s exprnd (1, 2, -1, 5) 556s ***** error ... 556s exprnd (1, 2, 1.5, 5) 556s ***** error exprnd (ones (2,2), 3) 556s ***** error exprnd (ones (2,2), [3, 2]) 556s ***** error exprnd (ones (2,2), 2, 3) 556s 27 tests, 27 passed, 0 known failure, 0 skipped 556s [inst/dist_fun/plrnd.m] 556s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/plrnd.m 556s ***** shared x, Fx 556s x = [0, 1, 3, 4, 7, 10]; 556s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 556s ***** assert (size (plrnd (x, Fx)), [1, 1]) 556s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 556s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 556s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 556s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 557s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 557s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 557s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 557s ***** assert (class (plrnd (x, Fx)), "double") 557s ***** assert (class (plrnd (x, single (Fx))), "single") 557s ***** assert (class (plrnd (single (x), Fx)), "single") 557s ***** error plrnd () 557s ***** error plrnd (1) 557s ***** error ... 557s plrnd ([0, 1, 2], [0, 1]) 557s ***** error ... 557s plrnd ([0], [1]) 557s ***** error ... 557s plrnd ([0, 1, 2], [0, 1, 1.5]) 557s ***** error ... 557s plrnd ([0, 1, 2], [0, i, 1]) 557s ***** error ... 557s plrnd ([0, i, 2], [0, 0.5, 1]) 557s ***** error ... 557s plrnd ([0, i, 2], [0, 0.5i, 1]) 557s ***** error ... 557s plrnd (x, Fx, -1) 557s ***** error ... 557s plrnd (x, Fx, 1.2) 557s ***** error ... 557s plrnd (x, Fx, ones (2)) 557s ***** error ... 557s plrnd (x, Fx, [2 -1 2]) 557s ***** error ... 557s plrnd (x, Fx, [2 0 2.5]) 557s ***** error ... 557s plrnd (x, Fx, 2, -1, 5) 557s ***** error ... 557s plrnd (x, Fx, 2, 1.5, 5) 557s 26 tests, 26 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/wblpdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wblpdf.m 557s ***** demo 557s ## Plot various PDFs from the Weibul distribution 557s x = 0:0.001:2.5; 557s y1 = wblpdf (x, 1, 0.5); 557s y2 = wblpdf (x, 1, 1); 557s y3 = wblpdf (x, 1, 1.5); 557s y4 = wblpdf (x, 1, 5); 557s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 557s grid on 557s ylim ([0, 2.5]) 557s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 557s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 557s title ("Weibul PDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** shared x,y 557s x = [-1 0 0.5 1 Inf]; 557s y = [0, exp(-x(2:4)), NaN]; 557s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 557s ***** assert (wblpdf (x, 1, ones (1,5)), y) 557s ***** assert (wblpdf (x, ones (1,5), 1), y) 557s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 557s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 557s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 557s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 557s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 557s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 557s ***** error wblpdf () 557s ***** error wblpdf (1,2,3,4) 557s ***** error wblpdf (ones (3), ones (2), ones (2)) 557s ***** error wblpdf (ones (2), ones (3), ones (2)) 557s ***** error wblpdf (ones (2), ones (2), ones (3)) 557s ***** error wblpdf (i, 2, 2) 557s ***** error wblpdf (2, i, 2) 557s ***** error wblpdf (2, 2, i) 557s 17 tests, 17 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/chi2pdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/chi2pdf.m 557s ***** demo 557s ## Plot various PDFs from the chi-squared distribution 557s x = 0:0.01:8; 557s y1 = chi2pdf (x, 1); 557s y2 = chi2pdf (x, 2); 557s y3 = chi2pdf (x, 3); 557s y4 = chi2pdf (x, 4); 557s y5 = chi2pdf (x, 6); 557s y6 = chi2pdf (x, 9); 557s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 557s x, y4, "-c", x, y5, "-m", x, y6, "-y") 557s grid on 557s xlim ([0, 8]) 557s ylim ([0, 0.5]) 557s legend ({"df = 1", "df = 2", "df = 3", ... 557s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 557s title ("Chi-squared PDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** shared x, y 557s x = [-1 0 0.5 1 Inf]; 557s y = [0, 1/2 * exp(-x(2:5)/2)]; 557s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 557s ***** assert (chi2pdf (x, 2), y) 557s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 557s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 557s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 557s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 557s ***** error chi2pdf () 557s ***** error chi2pdf (1) 557s ***** error chi2pdf (1,2,3) 557s ***** error ... 557s chi2pdf (ones (3), ones (2)) 557s ***** error ... 557s chi2pdf (ones (2), ones (3)) 557s ***** error chi2pdf (i, 2) 557s ***** error chi2pdf (2, i) 557s 13 tests, 13 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/gamcdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gamcdf.m 557s ***** demo 557s ## Plot various CDFs from the Gamma distribution 557s x = 0:0.01:20; 557s p1 = gamcdf (x, 1, 2); 557s p2 = gamcdf (x, 2, 2); 557s p3 = gamcdf (x, 3, 2); 557s p4 = gamcdf (x, 5, 1); 557s p5 = gamcdf (x, 9, 0.5); 557s p6 = gamcdf (x, 7.5, 1); 557s p7 = gamcdf (x, 0.5, 1); 557s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 557s x, p5, "-k", x, p6, "-b", x, p7, "-c") 557s grid on 557s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 557s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 557s "α = 0.5, β = 1"}, "location", "southeast") 557s title ("Gamma CDF") 557s xlabel ("values in x") 557s ylabel ("probability") 557s ***** shared x, y, u 557s x = [-1, 0, 0.5, 1, 2, Inf]; 557s y = [0, gammainc(x(2:end), 1)]; 557s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 557s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 557s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 557s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 557s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 557s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 557s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 557s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 557s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 557s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 557s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 557s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 557s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 557s ***** error gamcdf () 557s ***** error gamcdf (1) 557s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 557s ***** error gamcdf (1, 2, 3, "uper") 557s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 557s ***** error gamcdf (2, 3, 4, [1, 2]) 557s ***** error ... 557s [p, plo, pup] = gamcdf (1, 2, 3) 557s ***** error ... 557s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 557s ***** error [p, plo, pup] = ... 557s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 557s ***** error [p, plo, pup] = ... 557s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 557s ***** error [p, plo, pup] = ... 557s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 557s ***** error ... 557s gamcdf (ones (3), ones (2), ones (2)) 557s ***** error ... 557s gamcdf (ones (2), ones (3), ones (2)) 557s ***** error ... 557s gamcdf (ones (2), ones (2), ones (3)) 557s ***** error gamcdf (i, 2, 2) 557s ***** error gamcdf (2, i, 2) 557s ***** error gamcdf (2, 2, i) 557s ***** error ... 557s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 557s 30 tests, 30 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/logiinv.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logiinv.m 557s ***** demo 557s ## Plot various iCDFs from the logistic distribution 557s p = 0.001:0.001:0.999; 557s x1 = logiinv (p, 5, 2); 557s x2 = logiinv (p, 9, 3); 557s x3 = logiinv (p, 9, 4); 557s x4 = logiinv (p, 6, 2); 557s x5 = logiinv (p, 2, 1); 557s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 557s grid on 557s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 557s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 557s title ("Logistic iCDF") 557s xlabel ("probability") 557s ylabel ("x") 557s ***** test 557s p = [0.01:0.01:0.99]; 557s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 557s ***** shared p 557s p = [-1 0 0.5 1 2]; 557s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 557s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 557s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 557s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 557s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 557s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 557s ***** error logiinv () 557s ***** error logiinv (1) 557s ***** error ... 557s logiinv (1, 2) 557s ***** error ... 557s logiinv (1, ones (2), ones (3)) 557s ***** error ... 557s logiinv (ones (2), 1, ones (3)) 557s ***** error ... 557s logiinv (ones (2), ones (3), 1) 557s ***** error logiinv (i, 2, 3) 557s ***** error logiinv (1, i, 3) 557s ***** error logiinv (1, 2, i) 557s 16 tests, 16 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/poissinv.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/poissinv.m 557s ***** demo 557s ## Plot various iCDFs from the Poisson distribution 557s p = 0.001:0.001:0.999; 557s x1 = poissinv (p, 13); 557s x2 = poissinv (p, 4); 557s x3 = poissinv (p, 10); 557s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 557s grid on 557s ylim ([0, 20]) 557s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 557s title ("Poisson iCDF") 557s xlabel ("probability") 557s ylabel ("values in x (number of occurences)") 557s ***** shared p 557s p = [-1 0 0.5 1 2]; 557s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 557s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 557s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 557s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 557s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 557s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 557s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 557s ***** error poissinv () 557s ***** error poissinv (1) 557s ***** error ... 557s poissinv (ones (3), ones (2)) 557s ***** error ... 557s poissinv (ones (2), ones (3)) 557s ***** error poissinv (i, 2) 557s ***** error poissinv (2, i) 557s 13 tests, 13 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/invginv.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/invginv.m 557s ***** demo 557s ## Plot various iCDFs from the inverse Gaussian distribution 557s p = 0.001:0.001:0.999; 557s x1 = invginv (p, 1, 0.2); 557s x2 = invginv (p, 1, 1); 557s x3 = invginv (p, 1, 3); 557s x4 = invginv (p, 3, 0.2); 557s x5 = invginv (p, 3, 1); 557s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 557s grid on 557s ylim ([0, 3]) 557s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 557s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 557s title ("Inverse Gaussian iCDF") 557s xlabel ("probability") 557s ylabel ("x") 557s ***** shared p, x 557s p = [0, 0.3829, 0.6827, 1]; 557s x = [0, 0.5207, 1.0376, Inf]; 557s ***** assert (invginv (p, 1, 1), x, 1e-4); 557s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 557s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 557s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 557s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 557s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 557s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 557s ***** error invginv (1) 557s ***** error invginv (1, 2) 557s ***** error ... 557s invginv (1, ones (2), ones (3)) 557s ***** error ... 557s invginv (ones (2), 1, ones (3)) 557s ***** error ... 557s invginv (ones (2), ones (3), 1) 557s ***** error invginv (i, 2, 3) 557s ***** error invginv (1, i, 3) 557s ***** error invginv (1, 2, i) 557s 15 tests, 15 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/hygepdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/hygepdf.m 557s ***** demo 557s ## Plot various PDFs from the hypergeometric distribution 557s x = 0:60; 557s y1 = hygepdf (x, 500, 50, 100); 557s y2 = hygepdf (x, 500, 60, 200); 557s y3 = hygepdf (x, 500, 70, 300); 557s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 557s grid on 557s xlim ([0, 60]) 557s ylim ([0, 0.18]) 557s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 557s "m = 500, k = 70, μ = 300"}, "location", "northeast") 557s title ("Hypergeometric PDF") 557s xlabel ("values in x (number of successes)") 557s ylabel ("density") 557s ***** shared x, y 557s x = [-1 0 1 2 3]; 557s y = [0 1/6 4/6 1/6 0]; 557s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 557s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 557s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 557s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 557s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 557s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 557s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 557s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 557s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 557s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 557s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 557s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 557s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 557s ***** test 557s z = zeros(3,5); 557s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 557s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 557s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 557s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 557s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 557s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 557s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 557s ***** error hygepdf () 557s ***** error hygepdf (1) 557s ***** error hygepdf (1,2) 557s ***** error hygepdf (1,2,3) 557s ***** error ... 557s hygepdf (1, ones (3), ones (2), ones (2)) 557s ***** error ... 557s hygepdf (1, ones (2), ones (3), ones (2)) 557s ***** error ... 557s hygepdf (1, ones (2), ones (2), ones (3)) 557s ***** error hygepdf (i, 2, 2, 2) 557s ***** error hygepdf (2, i, 2, 2) 557s ***** error hygepdf (2, 2, i, 2) 557s ***** error hygepdf (2, 2, 2, i) 557s 25 tests, 25 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/triinv.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/triinv.m 557s ***** demo 557s ## Plot various iCDFs from the triangular distribution 557s p = 0.001:0.001:0.999; 557s x1 = triinv (p, 3, 6, 4); 557s x2 = triinv (p, 1, 5, 2); 557s x3 = triinv (p, 2, 9, 3); 557s x4 = triinv (p, 2, 9, 5); 557s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 557s grid on 557s ylim ([0, 10]) 557s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 557s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 557s "location", "northwest") 557s title ("Triangular CDF") 557s xlabel ("probability") 557s ylabel ("values in x") 557s ***** shared p, y 557s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 557s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 557s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 557s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 557s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 557s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 557s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 557s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 557s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 557s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 557s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 557s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 557s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 557s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 557s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 557s ***** error triinv () 557s ***** error triinv (1) 557s ***** error triinv (1, 2) 557s ***** error triinv (1, 2, 3) 557s ***** error ... 557s triinv (1, 2, 3, 4, 5) 557s ***** error ... 557s triinv (ones (3), ones (2), ones(2), ones(2)) 557s ***** error ... 557s triinv (ones (2), ones (3), ones(2), ones(2)) 557s ***** error ... 557s triinv (ones (2), ones (2), ones(3), ones(2)) 557s ***** error ... 557s triinv (ones (2), ones (2), ones(2), ones(3)) 557s ***** error triinv (i, 2, 3, 4) 557s ***** error triinv (1, i, 3, 4) 557s ***** error triinv (1, 2, i, 4) 557s ***** error triinv (1, 2, 3, i) 557s 26 tests, 26 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/wblrnd.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wblrnd.m 557s ***** assert (size (wblrnd (1, 1)), [1 1]) 557s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 557s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 557s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 557s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 557s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 557s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 557s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 557s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 557s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 557s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 557s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 557s ***** assert (class (wblrnd (1, 1)), "double") 557s ***** assert (class (wblrnd (1, single (1))), "single") 557s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 557s ***** assert (class (wblrnd (single (1), 1)), "single") 557s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 557s ***** error wblrnd () 557s ***** error wblrnd (1) 557s ***** error ... 557s wblrnd (ones (3), ones (2)) 557s ***** error ... 557s wblrnd (ones (2), ones (3)) 557s ***** error wblrnd (i, 2, 3) 557s ***** error wblrnd (1, i, 3) 557s ***** error ... 557s wblrnd (1, 2, -1) 557s ***** error ... 557s wblrnd (1, 2, 1.2) 557s ***** error ... 557s wblrnd (1, 2, ones (2)) 557s ***** error ... 557s wblrnd (1, 2, [2 -1 2]) 557s ***** error ... 557s wblrnd (1, 2, [2 0 2.5]) 557s ***** error ... 557s wblrnd (1, 2, 2, -1, 5) 557s ***** error ... 557s wblrnd (1, 2, 2, 1.5, 5) 557s ***** error ... 557s wblrnd (2, ones (2), 3) 557s ***** error ... 557s wblrnd (2, ones (2), [3, 2]) 557s ***** error ... 557s wblrnd (2, ones (2), 3, 2) 557s 33 tests, 33 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/burrinv.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/burrinv.m 557s ***** demo 557s ## Plot various iCDFs from the Burr type XII distribution 557s p = 0.001:0.001:0.999; 557s x1 = burrinv (p, 1, 1, 1); 557s x2 = burrinv (p, 1, 1, 2); 557s x3 = burrinv (p, 1, 1, 3); 557s x4 = burrinv (p, 1, 2, 1); 557s x5 = burrinv (p, 1, 3, 1); 557s x6 = burrinv (p, 1, 0.5, 2); 557s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 557s p, x4, "-c", p, x5, "-m", p, x6, "-k") 557s grid on 557s ylim ([0, 5]) 557s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 557s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 557s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 557s "location", "northwest") 557s title ("Burr type XII iCDF") 557s xlabel ("probability") 557s ylabel ("values in x") 557s ***** shared p, y 557s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 557s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 557s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 557s ***** assert (burrinv (p, 1, 1, 1), y, eps) 557s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 557s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 557s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 557s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 557s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 557s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 557s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 557s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 557s ***** error burrinv () 557s ***** error burrinv (1) 557s ***** error burrinv (1, 2) 557s ***** error burrinv (1, 2, 3) 557s ***** error ... 557s burrinv (1, 2, 3, 4, 5) 557s ***** error ... 557s burrinv (ones (3), ones (2), ones(2), ones(2)) 557s ***** error ... 557s burrinv (ones (2), ones (3), ones(2), ones(2)) 557s ***** error ... 557s burrinv (ones (2), ones (2), ones(3), ones(2)) 557s ***** error ... 557s burrinv (ones (2), ones (2), ones(2), ones(3)) 557s ***** error burrinv (i, 2, 3, 4) 557s ***** error burrinv (1, i, 3, 4) 557s ***** error burrinv (1, 2, i, 4) 557s ***** error burrinv (1, 2, 3, i) 557s 23 tests, 23 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/wishrnd.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/wishrnd.m 557s ***** assert(size (wishrnd (1,2)), [1, 1]); 557s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 557s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 557s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 557s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 557s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 557s ***** error wishrnd () 557s ***** error wishrnd (1) 557s ***** error wishrnd ([1; 1], 2) 557s 9 tests, 9 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/cauchypdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/cauchypdf.m 557s ***** demo 557s ## Plot various PDFs from the Cauchy distribution 557s x = -5:0.01:5; 557s y1 = cauchypdf (x, 0, 0.5); 557s y2 = cauchypdf (x, 0, 1); 557s y3 = cauchypdf (x, 0, 2); 557s y4 = cauchypdf (x, -2, 1); 557s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 557s grid on 557s xlim ([-5, 5]) 557s ylim ([0, 0.7]) 557s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 557s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 557s title ("Cauchy PDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** shared x, y 557s x = [-1 0 0.5 1 2]; 557s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 557s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 557s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 557s ***** assert (cauchypdf (x, ones (1,5), 2), y) 557s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 557s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 557s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 557s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 557s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 557s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 557s ***** test 557s x = rand (10, 1); 557s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 557s ***** error cauchypdf () 557s ***** error cauchypdf (1) 557s ***** error ... 557s cauchypdf (1, 2) 557s ***** error cauchypdf (1, 2, 3, 4) 557s ***** error ... 557s cauchypdf (ones (3), ones (2), ones(2)) 557s ***** error ... 557s cauchypdf (ones (2), ones (3), ones(2)) 557s ***** error ... 557s cauchypdf (ones (2), ones (2), ones(3)) 557s ***** error cauchypdf (i, 4, 3) 557s ***** error cauchypdf (1, i, 3) 557s ***** error cauchypdf (1, 4, i) 557s 20 tests, 20 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/bisapdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bisapdf.m 557s ***** demo 557s ## Plot various PDFs from the Birnbaum-Saunders distribution 557s x = 0.01:0.01:4; 557s y1 = bisapdf (x, 1, 0.5); 557s y2 = bisapdf (x, 1, 1); 557s y3 = bisapdf (x, 1, 2); 557s y4 = bisapdf (x, 1, 5); 557s y5 = bisapdf (x, 1, 10); 557s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 557s grid on 557s ylim ([0, 1.5]) 557s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 557s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 557s title ("Birnbaum-Saunders PDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** demo 557s ## Plot various PDFs from the Birnbaum-Saunders distribution 557s x = 0.01:0.01:6; 557s y1 = bisapdf (x, 1, 0.3); 557s y2 = bisapdf (x, 2, 0.3); 557s y3 = bisapdf (x, 1, 0.5); 557s y4 = bisapdf (x, 3, 0.5); 557s y5 = bisapdf (x, 5, 0.5); 557s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 557s grid on 557s ylim ([0, 1.5]) 557s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 557s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 557s title ("Birnbaum-Saunders CDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** shared x, y 557s x = [-1, 0, 1, 2, Inf]; 557s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 557s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 557s ***** assert (bisapdf (x, 1, 1), y, eps) 557s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 557s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 557s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 557s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 557s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 557s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 557s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 557s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 557s ***** error bisapdf () 557s ***** error bisapdf (1) 557s ***** error bisapdf (1, 2) 557s ***** error bisapdf (1, 2, 3, 4) 557s ***** error ... 557s bisapdf (ones (3), ones (2), ones(2)) 557s ***** error ... 557s bisapdf (ones (2), ones (3), ones(2)) 557s ***** error ... 557s bisapdf (ones (2), ones (2), ones(3)) 557s ***** error bisapdf (i, 4, 3) 557s ***** error bisapdf (1, i, 3) 557s ***** error bisapdf (1, 4, i) 557s 20 tests, 20 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/ricepdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ricepdf.m 557s ***** demo 557s ## Plot various PDFs from the Rician distribution 557s x = 0:0.01:8; 557s y1 = ricepdf (x, 0, 1); 557s y2 = ricepdf (x, 0.5, 1); 557s y3 = ricepdf (x, 1, 1); 557s y4 = ricepdf (x, 2, 1); 557s y5 = ricepdf (x, 4, 1); 557s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 557s grid on 557s ylim ([0, 0.65]) 557s xlim ([0, 8]) 557s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 557s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 557s title ("Rician PDF") 557s xlabel ("values in x") 557s ylabel ("density") 557s ***** shared x, y 557s x = [-1 0 0.5 1 2]; 557s y = [0 0 0.1073 0.1978 0.2846]; 557s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 557s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 557s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 557s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 557s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 557s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 557s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 557s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 557s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 557s ***** error ricepdf () 557s ***** error ricepdf (1) 557s ***** error ricepdf (1,2) 557s ***** error ricepdf (1,2,3,4) 557s ***** error ... 557s ricepdf (ones (3), ones (2), ones (2)) 557s ***** error ... 557s ricepdf (ones (2), ones (3), ones (2)) 557s ***** error ... 557s ricepdf (ones (2), ones (2), ones (3)) 557s ***** error ricepdf (i, 2, 2) 557s ***** error ricepdf (2, i, 2) 557s ***** error ricepdf (2, 2, i) 557s 19 tests, 19 passed, 0 known failure, 0 skipped 557s [inst/dist_fun/mvtcdf.m] 557s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mvtcdf.m 557s ***** demo 557s ## Compute the cdf of a multivariate Student's t distribution with 557s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 557s 557s rho = [1, 0.4; 0.4, 1]; 557s df = 2; 557s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 557s X = [X1(:), X2(:)]; 557s p = mvtcdf (X, rho, df); 557s surf (X1, X2, reshape (p, 25, 25)); 557s title ("Bivariate Student's t cummulative distribution function"); 557s ***** test 557s x = [1, 2]; 557s rho = [1, 0.5; 0.5, 1]; 557s df = 4; 557s a = [-1, 0]; 557s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 557s ***** test 557s x = [1, 2;2, 4;1, 5]; 557s rho = [1, 0.5; 0.5, 1]; 557s df = 4; 557s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 557s assert (mvtcdf(x, rho, df), p, 1e-14); 557s ***** test 557s x = [1, 2, 2, 4, 1, 5]; 557s rho = eye (6); 557s rho(rho == 0) = 0.5; 557s df = 4; 557s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 566s ***** error mvtcdf (1) 566s ***** error mvtcdf (1, 2) 566s ***** error ... 566s mvtcdf (1, [2, 3; 3, 2], 1) 566s ***** error ... 566s mvtcdf ([2, 3, 4], ones (2), 1) 566s ***** error ... 566s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 566s ***** error ... 566s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 566s ***** error ... 566s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 566s 10 tests, 10 passed, 0 known failure, 0 skipped 566s [inst/dist_fun/logicdf.m] 566s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logicdf.m 566s ***** demo 566s ## Plot various CDFs from the logistic distribution 566s x = -5:0.01:20; 566s p1 = logicdf (x, 5, 2); 566s p2 = logicdf (x, 9, 3); 566s p3 = logicdf (x, 9, 4); 566s p4 = logicdf (x, 6, 2); 566s p5 = logicdf (x, 2, 1); 566s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 566s grid on 566s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 566s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 566s title ("Logistic CDF") 566s xlabel ("values in x") 566s ylabel ("probability") 566s ***** shared x, y 566s x = [-Inf -log(3) 0 log(3) Inf]; 566s y = [0, 1/4, 1/2, 3/4, 1]; 566s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 566s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 566s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 566s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 566s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 566s ***** error logicdf () 566s ***** error logicdf (1) 566s ***** error ... 566s logicdf (1, 2) 566s ***** error logicdf (1, 2, 3, "tail") 566s ***** error logicdf (1, 2, 3, 4) 566s ***** error ... 566s logicdf (1, ones (2), ones (3)) 566s ***** error ... 566s logicdf (ones (2), 1, ones (3)) 566s ***** error ... 566s logicdf (ones (2), ones (3), 1) 566s ***** error logicdf (i, 2, 3) 566s ***** error logicdf (1, i, 3) 566s ***** error logicdf (1, 2, i) 566s 16 tests, 16 passed, 0 known failure, 0 skipped 566s [inst/dist_fun/mnpdf.m] 566s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/mnpdf.m 566s ***** test 566s x = [1, 4, 2]; 566s pk = [0.2, 0.5, 0.3]; 566s y = mnpdf (x, pk); 566s assert (y, 0.11812, 0.001); 566s ***** test 566s x = [1, 4, 2; 1, 0, 9]; 566s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 566s y = mnpdf (x, pk); 566s assert (y, [0.11812; 0.13422], 0.001); 566s 2 tests, 2 passed, 0 known failure, 0 skipped 566s [inst/dist_fun/evinv.m] 566s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/evinv.m 566s ***** demo 566s ## Plot various iCDFs from the extreme value distribution 566s p = 0.001:0.001:0.999; 566s x1 = evinv (p, 0.5, 2); 566s x2 = evinv (p, 1.0, 2); 566s x3 = evinv (p, 1.5, 3); 566s x4 = evinv (p, 3.0, 4); 566s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 566s grid on 566s ylim ([-10, 10]) 566s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 566s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 566s title ("Extreme value iCDF") 566s xlabel ("probability") 566s ylabel ("values in x") 566s ***** shared p, x 566s p = [0, 0.05, 0.5 0.95]; 566s x = [-Inf, -2.9702, -0.3665, 1.0972]; 566s ***** assert (evinv (p), x, 1e-4) 566s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 566s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 566s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 566s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 566s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 566s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 566s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 566s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 566s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 566s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 566s ***** error evinv () 566s ***** error evinv (1,2,3,4,5,6) 566s ***** error ... 566s evinv (ones (3), ones (2), ones (2)) 566s ***** error ... 566s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 566s ***** error ... 566s [p, plo, pup] = evinv (1, 2, 3) 566s ***** error [p, plo, pup] = ... 566s evinv (1, 2, 3, [1, 0; 0, 1], 0) 566s ***** error [p, plo, pup] = ... 566s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 566s ***** error evinv (i, 2, 2) 566s ***** error evinv (2, i, 2) 566s ***** error evinv (2, 2, i) 566s ***** error ... 566s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 566s 22 tests, 22 passed, 0 known failure, 0 skipped 566s [inst/dist_fun/unidrnd.m] 566s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unidrnd.m 566s ***** assert (size (unidrnd (2)), [1, 1]) 566s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 566s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 566s ***** assert (size (unidrnd (1, 3)), [3, 3]) 566s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 566s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 566s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 566s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 566s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 566s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 566s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 566s ***** assert (unidrnd (0, 1, 1), NaN) 566s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 566s ***** assert (class (unidrnd (2)), "double") 566s ***** assert (class (unidrnd (single (2))), "single") 566s ***** assert (class (unidrnd (single ([2 2]))), "single") 566s ***** error unidrnd () 566s ***** error unidrnd (i) 566s ***** error ... 566s unidrnd (1, -1) 566s ***** error ... 566s unidrnd (1, 1.2) 566s ***** error ... 566s unidrnd (1, ones (2)) 566s ***** error ... 566s unidrnd (1, [2 -1 2]) 566s ***** error ... 566s unidrnd (1, [2 0 2.5]) 566s ***** error ... 566s unidrnd (ones (2), ones (2)) 566s ***** error ... 566s unidrnd (1, 2, -1, 5) 566s ***** error ... 566s unidrnd (1, 2, 1.5, 5) 566s ***** error unidrnd (ones (2,2), 3) 566s ***** error unidrnd (ones (2,2), [3, 2]) 566s ***** error unidrnd (ones (2,2), 2, 3) 566s 29 tests, 29 passed, 0 known failure, 0 skipped 566s [inst/dist_fun/gpinv.m] 566s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gpinv.m 566s ***** demo 566s ## Plot various iCDFs from the generalized Pareto distribution 566s p = 0.001:0.001:0.999; 566s x1 = gpinv (p, 1, 1, 0); 566s x2 = gpinv (p, 5, 1, 0); 566s x3 = gpinv (p, 20, 1, 0); 566s x4 = gpinv (p, 1, 2, 0); 566s x5 = gpinv (p, 5, 2, 0); 566s x6 = gpinv (p, 20, 2, 0); 566s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 566s p, x4, "-c", p, x5, "-m", p, x6, "-k") 566s grid on 566s ylim ([0, 5]) 566s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 566s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 566s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 566s "location", "southeast") 566s title ("Generalized Pareto iCDF") 566s xlabel ("probability") 566s ylabel ("values in x") 566s ***** shared p, y1, y2, y3 566s p = [-1, 0, 1/2, 1, 2]; 566s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 566s y2 = [NaN, 0, 1, Inf, NaN]; 566s y3 = [NaN, 0, 1/2, 1, NaN]; 566s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 566s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 566s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 566s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 566s ***** assert (gpinv (p, 0, 1, 0), y1) 566s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 566s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 566s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 566s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 566s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 566s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 566s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 566s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 566s ***** assert (gpinv (p, 1, 1, 0), y2) 566s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 566s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 566s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 566s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 566s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 566s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 566s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 566s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 566s ***** assert (gpinv (p, -1, 1, 0), y3) 566s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 566s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 566s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 566s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 566s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 566s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 566s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 566s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 566s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 567s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 567s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 567s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 567s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 567s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 567s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 567s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 567s ***** error gpinv () 567s ***** error gpinv (1) 567s ***** error gpinv (1, 2) 567s ***** error gpinv (1, 2, 3) 567s ***** error ... 567s gpinv (ones (3), ones (2), ones(2), ones(2)) 567s ***** error ... 567s gpinv (ones (2), ones (3), ones(2), ones(2)) 567s ***** error ... 567s gpinv (ones (2), ones (2), ones(3), ones(2)) 567s ***** error ... 567s gpinv (ones (2), ones (2), ones(2), ones(3)) 567s ***** error gpinv (i, 2, 3, 4) 567s ***** error gpinv (1, i, 3, 4) 567s ***** error gpinv (1, 2, i, 4) 567s ***** error gpinv (1, 2, 3, i) 567s 51 tests, 51 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/tinv.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tinv.m 567s ***** demo 567s ## Plot various iCDFs from the Student's T distribution 567s p = 0.001:0.001:0.999; 567s x1 = tinv (p, 1); 567s x2 = tinv (p, 2); 567s x3 = tinv (p, 5); 567s x4 = tinv (p, Inf); 567s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 567s grid on 567s xlim ([0, 1]) 567s ylim ([-5, 5]) 567s legend ({"df = 1", "df = 2", ... 567s "df = 5", 'df = \infty'}, "location", "northwest") 567s title ("Student's T iCDF") 567s xlabel ("probability") 567s ylabel ("values in x") 567s ***** shared p 567s p = [-1 0 0.5 1 2]; 567s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 567s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 567s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 567s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 567s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 567s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 567s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 567s ***** error tinv () 567s ***** error tinv (1) 567s ***** error ... 567s tinv (ones (3), ones (2)) 567s ***** error ... 567s tinv (ones (2), ones (3)) 567s ***** error tinv (i, 2) 567s ***** error tinv (2, i) 567s 13 tests, 13 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/iwishrnd.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/iwishrnd.m 567s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 567s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 567s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 567s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 567s ***** error iwishrnd () 567s ***** error iwishrnd (1) 567s ***** error iwishrnd ([-3 1; 1 3],1) 567s ***** error iwishrnd ([1; 1],1) 567s 8 tests, 8 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/bisacdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/bisacdf.m 567s ***** demo 567s ## Plot various CDFs from the Birnbaum-Saunders distribution 567s x = 0.01:0.01:4; 567s p1 = bisacdf (x, 1, 0.5); 567s p2 = bisacdf (x, 1, 1); 567s p3 = bisacdf (x, 1, 2); 567s p4 = bisacdf (x, 1, 5); 567s p5 = bisacdf (x, 1, 10); 567s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 567s grid on 567s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 567s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 567s title ("Birnbaum-Saunders CDF") 567s xlabel ("values in x") 567s ylabel ("probability") 567s ***** demo 567s ## Plot various CDFs from the Birnbaum-Saunders distribution 567s x = 0.01:0.01:6; 567s p1 = bisacdf (x, 1, 0.3); 567s p2 = bisacdf (x, 2, 0.3); 567s p3 = bisacdf (x, 1, 0.5); 567s p4 = bisacdf (x, 3, 0.5); 567s p5 = bisacdf (x, 5, 0.5); 567s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 567s grid on 567s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 567s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 567s title ("Birnbaum-Saunders CDF") 567s xlabel ("values in x") 567s ylabel ("probability") 567s ***** shared x, y 567s x = [-1, 0, 1, 2, Inf]; 567s y = [0, 0, 1/2, 0.76024993890652337, 1]; 567s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 567s ***** assert (bisacdf (x, 1, 1), y, eps) 567s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 567s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 567s ***** assert (bisacdf (x, 1, 1), y, eps) 567s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 567s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 567s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 567s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 567s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 567s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 567s ***** error bisacdf () 567s ***** error bisacdf (1) 567s ***** error bisacdf (1, 2) 567s ***** error ... 567s bisacdf (1, 2, 3, 4, 5) 567s ***** error bisacdf (1, 2, 3, "tail") 567s ***** error bisacdf (1, 2, 3, 4) 567s ***** error ... 567s bisacdf (ones (3), ones (2), ones(2)) 567s ***** error ... 567s bisacdf (ones (2), ones (3), ones(2)) 567s ***** error ... 567s bisacdf (ones (2), ones (2), ones(3)) 567s ***** error bisacdf (i, 4, 3) 567s ***** error bisacdf (1, i, 3) 567s ***** error bisacdf (1, 4, i) 567s 23 tests, 23 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/logninv.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logninv.m 567s ***** demo 567s ## Plot various iCDFs from the log-normal distribution 567s p = 0.001:0.001:0.999; 567s x1 = logninv (p, 0, 1); 567s x2 = logninv (p, 0, 0.5); 567s x3 = logninv (p, 0, 0.25); 567s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 567s grid on 567s ylim ([0, 3]) 567s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 567s "location", "northwest") 567s title ("Log-normal iCDF") 567s xlabel ("probability") 567s ylabel ("values in x") 567s ***** shared p 567s p = [-1 0 0.5 1 2]; 567s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 567s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 567s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 567s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 567s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 567s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 567s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 567s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 567s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 567s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 567s ***** error logninv () 567s ***** error logninv (1,2,3,4) 567s ***** error logninv (ones (3), ones (2), ones (2)) 567s ***** error logninv (ones (2), ones (3), ones (2)) 567s ***** error logninv (ones (2), ones (2), ones (3)) 567s ***** error logninv (i, 2, 2) 567s ***** error logninv (2, i, 2) 567s ***** error logninv (2, 2, i) 567s 18 tests, 18 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/betapdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/betapdf.m 567s ***** demo 567s ## Plot various PDFs from the Beta distribution 567s x = 0.001:0.001:0.999; 567s y1 = betapdf (x, 0.5, 0.5); 567s y2 = betapdf (x, 5, 1); 567s y3 = betapdf (x, 1, 3); 567s y4 = betapdf (x, 2, 2); 567s y5 = betapdf (x, 2, 5); 567s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 567s grid on 567s ylim ([0, 2.5]) 567s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 567s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 567s title ("Beta PDF") 567s xlabel ("values in x") 567s ylabel ("density") 567s ***** shared x, y 567s x = [-1 0 0.5 1 2]; 567s y = [0 2 1 0 0]; 567s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 567s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 567s ***** assert (betapdf (x, ones (1, 5), 2), y) 567s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 567s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 567s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 567s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 567s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 567s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 567s ***** test 567s x = rand (10,1); 567s y = 1 ./ (pi * sqrt (x .* (1 - x))); 567s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 567s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 567s ***** error betapdf () 567s ***** error betapdf (1) 567s ***** error betapdf (1,2) 567s ***** error betapdf (1,2,3,4) 567s ***** error ... 567s betapdf (ones (3), ones (2), ones (2)) 567s ***** error ... 567s betapdf (ones (2), ones (3), ones (2)) 567s ***** error ... 567s betapdf (ones (2), ones (2), ones (3)) 567s ***** error betapdf (i, 2, 2) 567s ***** error betapdf (2, i, 2) 567s ***** error betapdf (2, 2, i) 567s 21 tests, 21 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/jsucdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/jsucdf.m 567s ***** error jsucdf () 567s ***** error jsucdf (1, 2, 3, 4) 567s ***** error ... 567s jsucdf (1, ones (2), ones (3)) 567s 3 tests, 3 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/normpdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/normpdf.m 567s ***** demo 567s ## Plot various PDFs from the normal distribution 567s x = -5:0.01:5; 567s y1 = normpdf (x, 0, 0.5); 567s y2 = normpdf (x, 0, 1); 567s y3 = normpdf (x, 0, 2); 567s y4 = normpdf (x, -2, 0.8); 567s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 567s grid on 567s xlim ([-5, 5]) 567s ylim ([0, 0.9]) 567s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 567s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 567s title ("Normal PDF") 567s xlabel ("values in x") 567s ylabel ("density") 567s ***** shared x, y 567s x = [-Inf, 1, 2, Inf]; 567s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 567s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 567s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 567s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 567s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 567s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 567s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 567s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 567s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 567s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 567s ***** error normpdf () 567s ***** error ... 567s normpdf (ones (3), ones (2), ones (2)) 567s ***** error ... 567s normpdf (ones (2), ones (3), ones (2)) 567s ***** error ... 567s normpdf (ones (2), ones (2), ones (3)) 567s ***** error normpdf (i, 2, 2) 567s ***** error normpdf (2, i, 2) 567s ***** error normpdf (2, 2, i) 567s 16 tests, 16 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/unifpdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unifpdf.m 567s ***** demo 567s ## Plot various PDFs from the continuous uniform distribution 567s x = 0:0.001:10; 567s y1 = unifpdf (x, 2, 5); 567s y2 = unifpdf (x, 3, 9); 567s plot (x, y1, "-b", x, y2, "-g") 567s grid on 567s xlim ([0, 10]) 567s ylim ([0, 0.4]) 567s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 567s title ("Continuous uniform PDF") 567s xlabel ("values in x") 567s ylabel ("density") 567s ***** shared x, y 567s x = [-1 0 0.5 1 2] + 1; 567s y = [0 1 1 1 0]; 567s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 567s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 567s ***** assert (unifpdf (x, ones (1,5), 2), y) 567s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 567s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 567s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 567s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 567s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 567s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 567s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 567s ***** error unifpdf () 567s ***** error unifpdf (1) 567s ***** error unifpdf (1, 2) 567s ***** error ... 567s unifpdf (ones (3), ones (2), ones (2)) 567s ***** error ... 567s unifpdf (ones (2), ones (3), ones (2)) 567s ***** error ... 567s unifpdf (ones (2), ones (2), ones (3)) 567s ***** error unifpdf (i, 2, 2) 567s ***** error unifpdf (2, i, 2) 567s ***** error unifpdf (2, 2, i) 567s 19 tests, 19 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/unidinv.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/unidinv.m 567s ***** demo 567s ## Plot various iCDFs from the discrete uniform distribution 567s p = 0.001:0.001:0.999; 567s x1 = unidinv (p, 5); 567s x2 = unidinv (p, 9); 567s plot (p, x1, "-b", p, x2, "-g") 567s grid on 567s xlim ([0, 1]) 567s ylim ([0, 10]) 567s legend ({"N = 5", "N = 9"}, "location", "northwest") 567s title ("Discrete uniform iCDF") 567s xlabel ("probability") 567s ylabel ("values in x") 567s ***** shared p 567s p = [-1 0 0.5 1 2]; 567s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 567s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 567s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 567s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 567s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 567s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 567s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 567s ***** error unidinv () 567s ***** error unidinv (1) 567s ***** error ... 567s unidinv (ones (3), ones (2)) 567s ***** error ... 567s unidinv (ones (2), ones (3)) 567s ***** error unidinv (i, 2) 567s ***** error unidinv (2, i) 567s 13 tests, 13 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/loglinv.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/loglinv.m 567s ***** demo 567s ## Plot various iCDFs from the log-logistic distribution 567s p = 0.001:0.001:0.999; 567s x1 = loglinv (p, log (1), 1/0.5); 567s x2 = loglinv (p, log (1), 1); 567s x3 = loglinv (p, log (1), 1/2); 567s x4 = loglinv (p, log (1), 1/4); 567s x5 = loglinv (p, log (1), 1/8); 567s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 567s ylim ([0, 20]) 567s grid on 567s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 567s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 567s title ("Log-logistic iCDF") 567s xlabel ("probability") 567s ylabel ("x") 567s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 567s ***** shared p, out1, out2 567s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 567s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 567s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 567s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 567s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 567s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 567s ***** assert (class (loglinv (single (1), 2, 3)), "single") 567s ***** assert (class (loglinv (1, single (2), 3)), "single") 567s ***** assert (class (loglinv (1, 2, single (3))), "single") 567s ***** error loglinv (1) 567s ***** error loglinv (1, 2) 567s ***** error ... 567s loglinv (1, ones (2), ones (3)) 567s ***** error ... 567s loglinv (ones (2), 1, ones (3)) 567s ***** error ... 567s loglinv (ones (2), ones (3), 1) 567s ***** error loglinv (i, 2, 3) 567s ***** error loglinv (1, i, 3) 567s ***** error loglinv (1, 2, i) 567s 14 tests, 14 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/binornd.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/binornd.m 567s ***** assert (size (binornd (2, 1/2)), [1 1]) 567s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 567s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 567s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 567s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 567s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 567s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 567s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 567s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 567s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 567s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 567s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 567s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 567s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 567s ***** assert (class (binornd (1, 1)), "double") 567s ***** assert (class (binornd (1, single (0))), "single") 567s ***** assert (class (binornd (1, single ([0, 0]))), "single") 567s ***** assert (class (binornd (1, single (1), 2)), "single") 567s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 567s ***** assert (class (binornd (single (1), 1, 2)), "single") 567s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 567s ***** error binornd () 567s ***** error binornd (1) 567s ***** error ... 567s binornd (ones (3), ones (2)) 567s ***** error ... 567s binornd (ones (2), ones (3)) 567s ***** error binornd (i, 2) 567s ***** error binornd (1, i) 567s ***** error ... 567s binornd (1, 1/2, -1) 567s ***** error ... 567s binornd (1, 1/2, 1.2) 567s ***** error ... 567s binornd (1, 1/2, ones (2)) 567s ***** error ... 567s binornd (1, 1/2, [2 -1 2]) 567s ***** error ... 567s binornd (1, 1/2, [2 0 2.5]) 567s ***** error ... 567s binornd (1, 1/2, 2, -1, 5) 567s ***** error ... 567s binornd (1, 1/2, 2, 1.5, 5) 567s ***** error ... 567s binornd (2, 1/2 * ones (2), 3) 567s ***** error ... 567s binornd (2, 1/2 * ones (2), [3, 2]) 567s ***** error ... 567s binornd (2, 1/2 * ones (2), 3, 2) 567s ***** error ... 567s binornd (2 * ones (2), 1/2, 3) 567s ***** error ... 567s binornd (2 * ones (2), 1/2, [3, 2]) 567s ***** error ... 567s binornd (2 * ones (2), 1/2, 3, 2) 567s 40 tests, 40 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/laplacecdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/laplacecdf.m 567s ***** demo 567s ## Plot various CDFs from the Laplace distribution 567s x = -10:0.01:10; 567s p1 = laplacecdf (x, 0, 1); 567s p2 = laplacecdf (x, 0, 2); 567s p3 = laplacecdf (x, 0, 4); 567s p4 = laplacecdf (x, -5, 4); 567s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 567s grid on 567s xlim ([-10, 10]) 567s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 567s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 567s title ("Laplace CDF") 567s xlabel ("values in x") 567s ylabel ("probability") 567s ***** shared x, y 567s x = [-Inf, -log(2), 0, log(2), Inf]; 567s y = [0, 1/4, 1/2, 3/4, 1]; 567s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 567s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 567s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 567s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 567s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 567s ***** error laplacecdf () 567s ***** error laplacecdf (1) 567s ***** error ... 567s laplacecdf (1, 2) 567s ***** error ... 567s laplacecdf (1, 2, 3, 4, 5) 567s ***** error laplacecdf (1, 2, 3, "tail") 567s ***** error laplacecdf (1, 2, 3, 4) 567s ***** error ... 567s laplacecdf (ones (3), ones (2), ones (2)) 567s ***** error ... 567s laplacecdf (ones (2), ones (3), ones (2)) 567s ***** error ... 567s laplacecdf (ones (2), ones (2), ones (3)) 567s ***** error laplacecdf (i, 2, 2) 567s ***** error laplacecdf (2, i, 2) 567s ***** error laplacecdf (2, 2, i) 567s 17 tests, 17 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/gumbelinv.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/gumbelinv.m 567s ***** demo 567s ## Plot various iCDFs from the Gumbel distribution 567s p = 0.001:0.001:0.999; 567s x1 = gumbelinv (p, 0.5, 2); 567s x2 = gumbelinv (p, 1.0, 2); 567s x3 = gumbelinv (p, 1.5, 3); 567s x4 = gumbelinv (p, 3.0, 4); 567s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 567s grid on 567s ylim ([-5, 20]) 567s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 567s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 567s title ("Gumbel iCDF") 567s xlabel ("probability") 567s ylabel ("values in x") 567s ***** shared p, x 567s p = [0, 0.05, 0.5 0.95]; 567s x = [-Inf, -1.0972, 0.3665, 2.9702]; 567s ***** assert (gumbelinv (p), x, 1e-4) 567s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 567s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 567s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 567s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 567s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 567s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 567s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 567s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 567s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 567s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 567s p = [0.05, 0.5, 0.95]; 567s x = gumbelinv(p); 567s ***** assert (gumbelcdf(x), p, 1e-4) 567s ***** error gumbelinv () 567s ***** error gumbelinv (1,2,3,4,5,6) 567s ***** error ... 567s gumbelinv (ones (3), ones (2), ones (2)) 567s ***** error ... 567s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 567s ***** error ... 567s [p, plo, pup] = gumbelinv (1, 2, 3) 567s ***** error [p, plo, pup] = ... 567s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 567s ***** error [p, plo, pup] = ... 567s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 567s ***** error gumbelinv (i, 2, 2) 567s ***** error gumbelinv (2, i, 2) 567s ***** error gumbelinv (2, 2, i) 567s ***** error ... 567s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 567s 23 tests, 23 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/evrnd.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/evrnd.m 567s ***** assert (size (evrnd (1, 1)), [1 1]) 567s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 567s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 567s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 567s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 567s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 567s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 567s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 567s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 567s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 567s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 567s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 567s ***** assert (class (evrnd (1, 1)), "double") 567s ***** assert (class (evrnd (1, single (1))), "single") 567s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 567s ***** assert (class (evrnd (single (1), 1)), "single") 567s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 567s ***** error evrnd () 567s ***** error evrnd (1) 567s ***** error ... 567s evrnd (ones (3), ones (2)) 567s ***** error ... 567s evrnd (ones (2), ones (3)) 567s ***** error evrnd (i, 2, 3) 567s ***** error evrnd (1, i, 3) 567s ***** error ... 567s evrnd (1, 2, -1) 567s ***** error ... 567s evrnd (1, 2, 1.2) 567s ***** error ... 567s evrnd (1, 2, ones (2)) 567s ***** error ... 567s evrnd (1, 2, [2 -1 2]) 567s ***** error ... 567s evrnd (1, 2, [2 0 2.5]) 567s ***** error ... 567s evrnd (1, 2, 2, -1, 5) 567s ***** error ... 567s evrnd (1, 2, 2, 1.5, 5) 567s ***** error ... 567s evrnd (2, ones (2), 3) 567s ***** error ... 567s evrnd (2, ones (2), [3, 2]) 567s ***** error ... 567s evrnd (2, ones (2), 3, 2) 567s 33 tests, 33 passed, 0 known failure, 0 skipped 567s [inst/dist_fun/tlscdf.m] 567s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/tlscdf.m 567s ***** demo 567s ## Plot various CDFs from the location-scale Student's T distribution 567s x = -8:0.01:8; 567s p1 = tlscdf (x, 0, 1, 1); 567s p2 = tlscdf (x, 0, 2, 2); 567s p3 = tlscdf (x, 3, 2, 5); 567s p4 = tlscdf (x, -1, 3, Inf); 567s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 567s grid on 567s xlim ([-8, 8]) 567s ylim ([0, 1]) 567s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 567s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 567s "location", "northwest") 567s title ("Location-scale Student's T CDF") 567s xlabel ("values in x") 567s ylabel ("probability") 567s ***** shared x,y 567s x = [-Inf 0 1 Inf]; 567s y = [0 1/2 3/4 1]; 567s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 567s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 567s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 567s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 567s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 567s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 567s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 568s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 568s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 568s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 568s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 568s ***** error tlscdf () 568s ***** error tlscdf (1) 568s ***** error tlscdf (1, 2) 568s ***** error tlscdf (1, 2, 3) 568s ***** error tlscdf (1, 2, 3, 4, "uper") 568s ***** error tlscdf (1, 2, 3, 4, 5) 568s ***** error ... 568s tlscdf (ones (3), ones (2), 1, 1) 568s ***** error ... 568s tlscdf (ones (3), 1, ones (2), 1) 568s ***** error ... 568s tlscdf (ones (3), 1, 1, ones (2)) 568s ***** error ... 568s tlscdf (ones (3), ones (2), 1, 1, "upper") 568s ***** error ... 568s tlscdf (ones (3), 1, ones (2), 1, "upper") 568s ***** error ... 568s tlscdf (ones (3), 1, 1, ones (2), "upper") 568s ***** error tlscdf (i, 2, 1, 1) 568s ***** error tlscdf (2, i, 1, 1) 568s ***** error tlscdf (2, 1, i, 1) 568s ***** error tlscdf (2, 1, 1, i) 568s 27 tests, 27 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/nctrnd.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nctrnd.m 568s ***** assert (size (nctrnd (1, 1)), [1 1]) 568s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 568s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 568s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 568s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 568s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 568s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 568s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 568s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 568s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 568s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 568s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 568s ***** assert (class (nctrnd (1, 1)), "double") 568s ***** assert (class (nctrnd (1, single (1))), "single") 568s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 568s ***** assert (class (nctrnd (single (1), 1)), "single") 568s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 568s ***** error nctrnd () 568s ***** error nctrnd (1) 568s ***** error ... 568s nctrnd (ones (3), ones (2)) 568s ***** error ... 568s nctrnd (ones (2), ones (3)) 568s ***** error nctrnd (i, 2) 568s ***** error nctrnd (1, i) 568s ***** error ... 568s nctrnd (1, 2, -1) 568s ***** error ... 568s nctrnd (1, 2, 1.2) 568s ***** error ... 568s nctrnd (1, 2, ones (2)) 568s ***** error ... 568s nctrnd (1, 2, [2 -1 2]) 568s ***** error ... 568s nctrnd (1, 2, [2 0 2.5]) 568s ***** error ... 568s nctrnd (1, 2, 2, -1, 5) 568s ***** error ... 568s nctrnd (1, 2, 2, 1.5, 5) 568s ***** error ... 568s nctrnd (2, ones (2), 3) 568s ***** error ... 568s nctrnd (2, ones (2), [3, 2]) 568s ***** error ... 568s nctrnd (2, ones (2), 3, 2) 568s 33 tests, 33 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/laplacepdf.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/laplacepdf.m 568s ***** demo 568s ## Plot various PDFs from the Laplace distribution 568s x = -10:0.01:10; 568s y1 = laplacepdf (x, 0, 1); 568s y2 = laplacepdf (x, 0, 2); 568s y3 = laplacepdf (x, 0, 4); 568s y4 = laplacepdf (x, -5, 4); 568s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 568s grid on 568s xlim ([-10, 10]) 568s ylim ([0, 0.6]) 568s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 568s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 568s title ("Laplace PDF") 568s xlabel ("values in x") 568s ylabel ("density") 568s ***** shared x, y 568s x = [-Inf -log(2) 0 log(2) Inf]; 568s y = [0, 1/4, 1/2, 1/4, 0]; 568s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 568s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 568s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 568s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 568s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 568s ***** error laplacepdf () 568s ***** error laplacepdf (1) 568s ***** error ... 568s laplacepdf (1, 2) 568s ***** error laplacepdf (1, 2, 3, 4) 568s ***** error ... 568s laplacepdf (1, ones (2), ones (3)) 568s ***** error ... 568s laplacepdf (ones (2), 1, ones (3)) 568s ***** error ... 568s laplacepdf (ones (2), ones (3), 1) 568s ***** error laplacepdf (i, 2, 3) 568s ***** error laplacepdf (1, i, 3) 568s ***** error laplacepdf (1, 2, i) 568s 15 tests, 15 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/iwishpdf.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/iwishpdf.m 568s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 568s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 568s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 568s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 568s ***** error iwishpdf () 568s ***** error iwishpdf (1, 2) 568s ***** error iwishpdf (1, 2, 0) 568s 6 tests, 6 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/lognrnd.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/lognrnd.m 568s ***** assert (size (lognrnd (1, 1)), [1 1]) 568s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 568s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 568s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 568s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 568s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 568s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 568s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 568s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 568s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 568s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 568s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 568s ***** assert (class (lognrnd (1, 1)), "double") 568s ***** assert (class (lognrnd (1, single (1))), "single") 568s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 568s ***** assert (class (lognrnd (single (1), 1)), "single") 568s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 568s ***** error lognrnd () 568s ***** error lognrnd (1) 568s ***** error ... 568s lognrnd (ones (3), ones (2)) 568s ***** error ... 568s lognrnd (ones (2), ones (3)) 568s ***** error lognrnd (i, 2, 3) 568s ***** error lognrnd (1, i, 3) 568s ***** error ... 568s lognrnd (1, 2, -1) 568s ***** error ... 568s lognrnd (1, 2, 1.2) 568s ***** error ... 568s lognrnd (1, 2, ones (2)) 568s ***** error ... 568s lognrnd (1, 2, [2 -1 2]) 568s ***** error ... 568s lognrnd (1, 2, [2 0 2.5]) 568s ***** error ... 568s lognrnd (1, 2, 2, -1, 5) 568s ***** error ... 568s lognrnd (1, 2, 2, 1.5, 5) 568s ***** error ... 568s lognrnd (2, ones (2), 3) 568s ***** error ... 568s lognrnd (2, ones (2), [3, 2]) 568s ***** error ... 568s lognrnd (2, ones (2), 3, 2) 568s 33 tests, 33 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/nctpdf.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/nctpdf.m 568s ***** demo 568s ## Plot various PDFs from the noncentral T distribution 568s x = -5:0.01:10; 568s y1 = nctpdf (x, 1, 0); 568s y2 = nctpdf (x, 4, 0); 568s y3 = nctpdf (x, 1, 2); 568s y4 = nctpdf (x, 4, 2); 568s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 568s grid on 568s xlim ([-5, 10]) 568s ylim ([0, 0.4]) 568s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 568s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 568s title ("Noncentral T PDF") 568s xlabel ("values in x") 568s ylabel ("density") 568s ***** demo 568s ## Compare the noncentral T PDF with MU = 1 to the T PDF 568s ## with the same number of degrees of freedom (10). 568s 568s x = -5:0.1:5; 568s y1 = nctpdf (x, 10, 1); 568s y2 = tpdf (x, 10); 568s plot (x, y1, "-", x, y2, "-"); 568s grid on 568s xlim ([-5, 5]) 568s ylim ([0, 0.4]) 568s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 568s title ("Noncentral T vs T PDFs") 568s xlabel ("values in x") 568s ylabel ("density") 568s ***** shared x1, df, mu 568s x1 = [-Inf, 2, NaN, 4, Inf]; 568s df = [2, 0, -1, 1, 4]; 568s mu = [1, NaN, 3, -1, 2]; 568s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 568s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 568s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 568s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 568s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 568s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 568s 0.0146500727180389, 0.3082302682110299], 1e-14); 568s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 568s 0.00401787561306999, 0.0972086534042828], 1e-14); 568s ***** error nctpdf () 568s ***** error nctpdf (1) 568s ***** error nctpdf (1, 2) 568s ***** error ... 568s nctpdf (ones (3), ones (2), ones (2)) 568s ***** error ... 568s nctpdf (ones (2), ones (3), ones (2)) 568s ***** error ... 568s nctpdf (ones (2), ones (2), ones (3)) 568s ***** error nctpdf (i, 2, 2) 568s ***** error nctpdf (2, i, 2) 568s ***** error nctpdf (2, 2, i) 568s 16 tests, 16 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/logncdf.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/logncdf.m 568s ***** demo 568s ## Plot various CDFs from the log-normal distribution 568s x = 0:0.01:3; 568s p1 = logncdf (x, 0, 1); 568s p2 = logncdf (x, 0, 0.5); 568s p3 = logncdf (x, 0, 0.25); 568s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 568s grid on 568s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 568s "location", "southeast") 568s title ("Log-normal CDF") 568s xlabel ("values in x") 568s ylabel ("probability") 568s ***** shared x, y 568s x = [-1, 0, 1, e, Inf]; 568s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 568s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 568s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 568s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 568s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 568s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 568s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 568s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 568s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 568s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 568s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 568s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 568s ***** error logncdf () 568s ***** error logncdf (1,2,3,4,5,6,7) 568s ***** error logncdf (1, 2, 3, 4, "uper") 568s ***** error ... 568s logncdf (ones (3), ones (2), ones (2)) 568s ***** error logncdf (2, 3, 4, [1, 2]) 568s ***** error ... 568s [p, plo, pup] = logncdf (1, 2, 3) 568s ***** error [p, plo, pup] = ... 568s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 568s ***** error [p, plo, pup] = ... 568s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 568s ***** error [p, plo, pup] = ... 568s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 568s ***** error logncdf (i, 2, 2) 568s ***** error logncdf (2, i, 2) 568s ***** error logncdf (2, 2, i) 568s ***** error ... 568s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 568s 24 tests, 24 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/geopdf.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/geopdf.m 568s ***** demo 568s ## Plot various PDFs from the geometric distribution 568s x = 0:10; 568s y1 = geopdf (x, 0.2); 568s y2 = geopdf (x, 0.5); 568s y3 = geopdf (x, 0.7); 568s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 568s grid on 568s ylim ([0, 0.8]) 568s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 568s title ("Geometric PDF") 568s xlabel ("values in x (number of failures)") 568s ylabel ("density") 568s ***** shared x, y 568s x = [-1 0 1 Inf]; 568s y = [0, 1/2, 1/4, NaN]; 568s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 568s ***** assert (geopdf (x, 0.5), y) 568s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 568s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 568s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 568s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 568s ***** error geopdf () 568s ***** error geopdf (1) 568s ***** error geopdf (1,2,3) 568s ***** error geopdf (ones (3), ones (2)) 568s ***** error geopdf (ones (2), ones (3)) 568s ***** error geopdf (i, 2) 568s ***** error geopdf (2, i) 568s 13 tests, 13 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/vmrnd.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/vmrnd.m 568s ***** assert (size (vmrnd (1, 1)), [1 1]) 568s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 568s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 568s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 568s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 568s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 568s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 568s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 568s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 568s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 568s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 568s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 568s ***** assert (class (vmrnd (1, 1)), "double") 568s ***** assert (class (vmrnd (1, single (1))), "single") 568s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 568s ***** assert (class (vmrnd (single (1), 1)), "single") 568s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 568s ***** error vmrnd () 568s ***** error vmrnd (1) 568s ***** error ... 568s vmrnd (ones (3), ones (2)) 568s ***** error ... 568s vmrnd (ones (2), ones (3)) 568s ***** error vmrnd (i, 2, 3) 568s ***** error vmrnd (1, i, 3) 568s ***** error ... 568s vmrnd (1, 2, -1) 568s ***** error ... 568s vmrnd (1, 2, 1.2) 568s ***** error ... 568s vmrnd (1, 2, ones (2)) 568s ***** error ... 568s vmrnd (1, 2, [2 -1 2]) 568s ***** error ... 568s vmrnd (1, 2, [2 0 2.5]) 568s ***** error ... 568s vmrnd (1, 2, 2, -1, 5) 568s ***** error ... 568s vmrnd (1, 2, 2, 1.5, 5) 568s ***** error ... 568s vmrnd (2, ones (2), 3) 568s ***** error ... 568s vmrnd (2, ones (2), [3, 2]) 568s ***** error ... 568s vmrnd (2, ones (2), 3, 2) 568s 33 tests, 33 passed, 0 known failure, 0 skipped 568s [inst/dist_fun/ncx2inv.m] 568s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_fun/ncx2inv.m 568s ***** demo 568s ## Plot various iCDFs from the noncentral chi-squared distribution 568s p = 0.001:0.001:0.999; 568s x1 = ncx2inv (p, 2, 1); 568s x2 = ncx2inv (p, 2, 2); 568s x3 = ncx2inv (p, 2, 3); 568s x4 = ncx2inv (p, 4, 1); 568s x5 = ncx2inv (p, 4, 2); 568s x6 = ncx2inv (p, 4, 3); 568s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 568s p, x4, "-m", p, x5, "-c", p, x6, "-y") 568s grid on 568s ylim ([0, 10]) 568s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 568s "df = 2, λ = 3", "df = 4, λ = 1", ... 568s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 568s title ("Noncentral chi-squared iCDF") 568s xlabel ("probability") 568s ylabel ("values in x") 568s ***** demo 568s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 568s ## chi-squared CDF with the same number of degrees of freedom (4). 568s 568s p = 0.001:0.001:0.999; 568s x1 = ncx2inv (p, 4, 2); 568s x2 = chi2inv (p, 4); 568s plot (p, x1, "-", p, x2, "-"); 568s grid on 568s ylim ([0, 10]) 568s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 568s title ("Noncentral chi-squared vs chi-squared quantile functions") 568s xlabel ("probability") 568s ylabel ("values in x") 568s ***** test 568s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 568s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 568s ***** test 568s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 568s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 568s ***** test 568s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 568s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 569s ***** test 569s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 569s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 569s ***** test 569s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 569s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 569s ***** test 569s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 569s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 569s ***** test 569s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 569s ***** error ncx2inv () 569s ***** error ncx2inv (1) 569s ***** error ncx2inv (1, 2) 569s ***** error ... 569s ncx2inv (ones (3), ones (2), ones (2)) 569s ***** error ... 569s ncx2inv (ones (2), ones (3), ones (2)) 569s ***** error ... 569s ncx2inv (ones (2), ones (2), ones (3)) 569s ***** error ncx2inv (i, 2, 2) 569s ***** error ncx2inv (2, i, 2) 569s ***** error ncx2inv (2, 2, i) 569s 16 tests, 16 passed, 0 known failure, 0 skipped 569s [inst/canoncorr.m] 569s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/canoncorr.m 569s ***** shared X,Y,A,B,r,U,V,k 569s k = 10; 569s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 569s [A,B,r,U,V,stats] = canoncorr (X,Y); 569s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 569s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 569s ***** assert (r, [0.99590 0.26754], 1E-5); 569s ***** assert (U, center(X) * A, 10*eps); 569s ***** assert (V, center(Y) * B, 10*eps); 569s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 569s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 569s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 569s ***** assert (r, ones(1, 5), 10*eps); 569s 8 tests, 8 passed, 0 known failure, 0 skipped 569s [inst/plsregress.m] 569s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/plsregress.m 569s ***** demo 569s ## Perform Partial Least-Squares Regression 569s 569s ## Load the spectra data set and use the near infrared (NIR) spectral 569s ## intensities (NIR) as the predictor and the corresponding octave 569s ## ratings (octave) as the response. 569s load spectra 569s 569s ## Perform PLS regression with 10 components 569s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 569s 569s ## Plot the percentage of explained variance in the response variable 569s ## (PCTVAR) as a function of the number of components. 569s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 569s xlim ([1, 10]); 569s xlabel ("Number of PLS components"); 569s ylabel ("Percentage of Explained Variance in octane"); 569s title ("Explained Variance per PLS components"); 569s 569s ## Compute the fitted response and display the residuals. 569s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 569s residuals = octane - octane_fitted; 569s figure 569s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 569s xlabel ("Observations"); 569s ylabel ("Residuals"); 569s title ("Residuals in octane's fitted responce"); 569s ***** demo 569s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 569s 569s ## Load the spectra data set and use the near infrared (NIR) spectral 569s ## intensities (NIR) as the predictor and the corresponding octave 569s ## ratings (octave) as the response. Variables with a VIP score greater than 569s ## 1 are considered important for the projection of the PLS regression model. 569s load spectra 569s 569s ## Perform PLS regression with 10 components 569s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 569s plsregress (NIR, octane, 10); 569s 569s ## Calculate the normalized PLS weights 569s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 569s 569s ## Calculate the VIP scores for 10 components 569s nobs = size (xload, 1); 569s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 569s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 569s 569s ## Find variables with a VIP score greater than or equal to 1 569s VIPidx = find (VIPscore >= 1); 569s 569s ## Plot the VIP scores 569s scatter (1:length (VIPscore), VIPscore, "xb"); 569s hold on 569s scatter (VIPidx, VIPscore (VIPidx), "xr"); 569s plot ([1, length(VIPscore)], [1, 1], "--k"); 569s hold off 569s axis ("tight"); 569s xlabel ("Predictor Variables"); 569s ylabel ("VIP scores"); 569s title ("VIP scores for each predictror variable with 10 components"); 569s ***** test 569s load spectra 569s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 569s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 569s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 569s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 569s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 569s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 569s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 569s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 569s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 569s assert (xload(1,:), xload1_out, 1e-4); 569s assert (yload, yload_out, 1e-4); 569s assert (xscore(1,:), xscore1_out, 1e-4); 569s assert (yscore(1,:), yscore1_out, 1e-4); 569s ***** test 569s load spectra 569s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 569s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 569s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 569s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 569s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 569s assert (xload(1,:), xload1_out, 1e-4); 569s assert (yload, yload_out, 1e-4); 569s assert (xscore(1,:), xscore1_out, 1e-4); 569s assert (yscore(1,:), yscore1_out, 1e-4); 569s ***** error 569s plsregress (1) 569s ***** error plsregress (1, "asd") 569s ***** error plsregress (1, {1,2,3}) 569s ***** error plsregress ("asd", 1) 569s ***** error plsregress ({1,2,3}, 1) 569s ***** error ... 569s plsregress (ones (20,3), ones (15,1)) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 0) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), -5) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3.2) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), [2, 3]) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 4) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 569s ***** error ... 569s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 569s ***** error plsregress (1, 2) 569s 24 tests, 24 passed, 0 known failure, 0 skipped 569s [inst/nanmin.m] 569s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/nanmin.m 569s ***** demo 569s ## Find the column minimum values and their indices 569s ## for matrix data with missing values. 569s 569s x = magic (3); 569s x([1, 6:9]) = NaN 569s [y, ind] = nanmin (x) 569s ***** demo 569s ## Find the minimum of all the values in an array, ignoring missing values. 569s ## Create a 2-by-5-by-3 array x with some missing values. 569s 569s x = reshape (1:30, [2, 5, 3]); 569s x([10:12, 25]) = NaN 569s 569s ## Find the minimum of the elements of x. 569s 569s y = nanmin (x, [], 'all') 569s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 569s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 569s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 569s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 569s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 569s ***** shared x, y 569s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 569s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 569s y = x; 569s y(2,3,1) = 0.51; 569s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 569s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 569s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 569s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 569s ***** assert (nanmin (x, [], 'all'), -2.95) 569s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 569s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 569s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 569s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 569s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 569s ***** test 569s xx = repmat ([1:20;6:25], [5 2 6 3]); 569s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 569s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 569s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 569s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 569s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 569s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 569s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 569s ***** assert (nanmin (magic (3), [], 3), magic (3)) 569s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 569s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 569s ***** assert (nanmin (ones (2), 3), ones (2,2)) 569s ***** error ... 569s nanmin (y, [], [1, 1, 2]) 569s ***** error ... 569s [v, idx] = nanmin(x, y, [1 2]) 569s 24 tests, 24 passed, 0 known failure, 0 skipped 569s [inst/knnsearch.m] 569s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/knnsearch.m 569s ***** demo 569s ## find 10 nearest neighbour of a point using different distance metrics 569s ## and compare the results by plotting 569s load fisheriris 569s X = meas(:,3:4); 569s Y = species; 569s point = [5, 1.45]; 569s 569s ## calculate 10 nearest-neighbours by minkowski distance 569s [id, d] = knnsearch (X, point, "K", 10); 569s 569s ## calculate 10 nearest-neighbours by minkowski distance 569s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 569s 569s ## calculate 10 nearest-neighbours by chebychev distance 569s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 569s 569s ## plotting the results 569s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 569s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 569s xlabel("Petal length (cm)"); 569s ylabel("Petal width (cm)"); 569s 569s line (point(1), point(2), "marker", "X", "color", "k", ... 569s "linewidth", 2, "displayname", "query point") 569s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 569s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 569s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 569s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 569s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 569s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 569s xlim ([4.5 5.5]); 569s ylim ([1 2]); 569s axis square; 569s ***** demo 569s ## knnsearch on iris dataset using kdtree method 569s load fisheriris 569s X = meas(:,3:4); 569s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 569s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 569s 569s ## new point to be predicted 569s point = [5 1.45]; 569s 569s line (point(1), point(2), "marker", "X", "color", "k", ... 569s "linewidth", 2, "displayname", "query point") 569s 569s ## knnsearch using kdtree method 569s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 569s 569s ## plotting predicted neighbours 569s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 569s "linestyle", "none", "markersize", 10, ... 569s "displayname", "nearest neighbour") 569s xlim ([4 6]) 569s ylim ([1 3]) 569s axis square 569s ## details of predicted labels 569s tabulate (species(idx)) 569s 569s ctr = point - d(end); 569s diameter = 2 * d(end); 569s ## Draw a circle around the 10 nearest neighbors. 569s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 569s 569s ## here only 8 neighbours are plotted instead of 10 since the dataset 569s ## contains duplicate values 569s ***** shared X, Y 569s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 569s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 569s assert (idx, [1; 1]); 569s assert (D, ones (2, 1) * sqrt (2)); 569s ***** test 569s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 569s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 569s assert (idx, [1; 1]); 569s assert (D, ones (2, 1) * sqrt (2)); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 569s assert (iscell (idx), true); 569s assert (iscell (D), true) 569s assert (idx {1}, [1]); 569s assert (idx {2}, [1, 2]); 569s assert (D{1}, ones (1, 1) * sqrt (2)); 569s assert (D{2}, ones (1, 2) * sqrt (2)); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 569s assert (idx, [1, 2; 1, 2]); 569s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 569s assert (idx, [1; 1]); 569s assert (D, ones (2, 1) * sqrt (2)); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 569s assert (idx, [1, 2; 1, 2]); 569s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 569s ***** test 569s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 569s yy = [2, 4; 2, 6]; 569s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 569s assert (idx, [3; 2]); 569s assert (D, [0; 3.162277660168377], 1e-14); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 569s assert (idx, [1; 1]); 569s assert (D, ones (2, 1) * sqrt (2)); 569s ***** test 569s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 569s assert (idx, [1; 1]); 569s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 570s assert (idx, [1; 1]); 570s assert (D, [2; 2]); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 570s assert (idx, [1; 1]); 570s assert (D, [1; 1]); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 570s assert (idx, [2; 3]); 570s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 570s assert (idx, [1; 1]); 570s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 570s assert (idx, [1; 1]); 570s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 570s assert (idx, [1; 1]); 570s assert (D, [0.5; 0.5]); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 570s assert (idx, [1; 1]); 570s assert (D, [0.5; 0.5]); 570s ***** test 570s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 570s assert (idx, [1, 2; 1, 2]); 570s assert (D, [0.5, 1; 0.5, 0.5]); 570s ***** test 570s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 570s b = [1, 1]; 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 570s assert (iscell (idx), true); 570s assert (iscell (D), true) 570s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 570s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 570s ***** test 570s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 570s b = [1, 1]; 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 570s assert (iscell (idx), true); 570s assert (iscell (D), true) 570s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 570s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 570s ***** test 570s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 570s b = [1, 1]; 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 570s assert (iscell (idx), false); 570s assert (iscell (D), false) 570s assert (idx, [4, 2, 3, 6, 1]); 570s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 570s ***** test 570s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 570s b = [1, 1]; 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 570s assert (iscell (idx), false); 570s assert (iscell (D), false) 570s assert (idx, [4, 2, 3, 6, 1]); 570s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 570s ***** test 570s load fisheriris 570s a = meas; 570s b = min(meas); 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 570s assert (idx, [42, 9, 14, 39, 13]); 570s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 570s ***** test 570s load fisheriris 570s a = meas; 570s b = mean(meas); 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 570s assert (idx, [65, 83, 89, 72, 100]); 570s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 570s ***** test 570s load fisheriris 570s a = meas; 570s b = max(meas); 570s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 570s assert (idx, [118, 132, 110, 106, 136]); 570s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 570s 570s ***** test 570s load fisheriris 570s a = meas; 570s b = max(meas); 570s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 570s assert ( iscell (idx), true); 570s assert ( iscell (D), true); 570s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 570s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 570s ***** error knnsearch (1) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (4)) 570s ***** error ... 570s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 570s ***** error ... 570s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 570s 42 tests, 42 passed, 0 known failure, 0 skipped 570s [inst/dist_obj/TriangularDistribution.m] 570s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/TriangularDistribution.m 570s ***** shared pd, t 570s pd = TriangularDistribution (0, 3, 5); 570s t = truncate (pd, 2, 4); 570s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 570s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 570s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 570s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 570s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 570s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 570s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 570s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 570s ***** assert (iqr (pd), 1.4824, 1e-4); 570s ***** assert (iqr (t), 0.8678, 1e-4); 570s ***** assert (mean (pd), 2.6667, 1e-4); 570s ***** assert (mean (t), 2.9649, 1e-4); 570s ***** assert (median (pd), 2.7386, 1e-4); 570s ***** assert (median (t), 2.9580, 1e-4); 570s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 570s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 570s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 570s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 570s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 570s ***** assert (any (random (t, 1000, 1) < 2), false); 570s ***** assert (any (random (t, 1000, 1) > 4), false); 570s ***** assert (std (pd), 1.0274, 1e-4); 570s ***** assert (std (t), 0.5369, 1e-4); 570s ***** assert (var (pd), 1.0556, 1e-4); 570s ***** assert (var (t), 0.2882, 1e-4); 570s ***** error ... 570s TriangularDistribution (i, 1, 2) 570s ***** error ... 570s TriangularDistribution (Inf, 1, 2) 570s ***** error ... 570s TriangularDistribution ([1, 2], 1, 2) 570s ***** error ... 570s TriangularDistribution ("a", 1, 2) 570s ***** error ... 570s TriangularDistribution (NaN, 1, 2) 570s ***** error ... 570s TriangularDistribution (1, i, 2) 570s ***** error ... 570s TriangularDistribution (1, Inf, 2) 570s ***** error ... 570s TriangularDistribution (1, [1, 2], 2) 570s ***** error ... 570s TriangularDistribution (1, "a", 2) 570s ***** error ... 570s TriangularDistribution (1, NaN, 2) 570s ***** error ... 570s TriangularDistribution (1, 2, i) 570s ***** error ... 570s TriangularDistribution (1, 2, Inf) 570s ***** error ... 570s TriangularDistribution (1, 2, [1, 2]) 570s ***** error ... 570s TriangularDistribution (1, 2, "a") 570s ***** error ... 570s TriangularDistribution (1, 2, NaN) 570s ***** error ... 570s TriangularDistribution (1, 1, 1) 570s ***** error ... 570s TriangularDistribution (1, 0.5, 2) 570s ***** error ... 570s cdf (TriangularDistribution, 2, "uper") 570s ***** error ... 570s cdf (TriangularDistribution, 2, 3) 570s ***** error ... 570s plot (TriangularDistribution, "Parent") 570s ***** error ... 570s plot (TriangularDistribution, "PlotType", 12) 570s ***** error ... 570s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 570s ***** error ... 570s plot (TriangularDistribution, "PlotType", "pdfcdf") 570s ***** error ... 570s plot (TriangularDistribution, "Discrete", "pdfcdf") 570s ***** error ... 570s plot (TriangularDistribution, "Discrete", [1, 0]) 570s ***** error ... 570s plot (TriangularDistribution, "Discrete", {true}) 570s ***** error ... 570s plot (TriangularDistribution, "Parent", 12) 570s ***** error ... 570s plot (TriangularDistribution, "Parent", "hax") 570s ***** error ... 570s plot (TriangularDistribution, "invalidNAME", "pdf") 570s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 570s plot (TriangularDistribution, "PlotType", "probability") 570s ***** error ... 570s truncate (TriangularDistribution) 570s ***** error ... 570s truncate (TriangularDistribution, 2) 570s ***** error ... 570s truncate (TriangularDistribution, 4, 2) 570s ***** shared pd 570s pd = TriangularDistribution (0, 1, 2); 570s pd(2) = TriangularDistribution (0, 1, 2); 570s ***** error cdf (pd, 1) 570s ***** error icdf (pd, 0.5) 570s ***** error iqr (pd) 570s ***** error mean (pd) 570s ***** error median (pd) 570s ***** error pdf (pd, 1) 570s ***** error plot (pd) 570s ***** error random (pd) 570s ***** error std (pd) 570s ***** error ... 570s truncate (pd, 2, 4) 570s ***** error var (pd) 570s 69 tests, 69 passed, 0 known failure, 0 skipped 570s [inst/dist_obj/LoglogisticDistribution.m] 570s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/LoglogisticDistribution.m 570s ***** shared pd, t 570s pd = LoglogisticDistribution; 570s t = truncate (pd, 2, 4); 570s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 570s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 570s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 570s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 570s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 570s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 570s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 570s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 570s ***** assert (iqr (pd), 2.6667, 1e-4); 570s ***** assert (iqr (t), 0.9524, 1e-4); 570s ***** assert (mean (pd), Inf); 570s ***** assert (mean (t), 2.8312, 1e-4); 570s ***** assert (median (pd), 1, 1e-4); 570s ***** assert (median (t), 2.75, 1e-4); 570s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 570s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 570s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 570s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 570s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 570s ***** assert (any (random (t, 1000, 1) < 2), false); 570s ***** assert (any (random (t, 1000, 1) > 4), false); 570s ***** assert (std (pd), Inf); 570s ***** assert (std (t), 0.5674, 1e-4); 570s ***** assert (var (pd), Inf); 570s ***** assert (var (t), 0.3220, 1e-4); 570s ***** error ... 570s LoglogisticDistribution(Inf, 1) 570s ***** error ... 570s LoglogisticDistribution(i, 1) 570s ***** error ... 570s LoglogisticDistribution("a", 1) 570s ***** error ... 570s LoglogisticDistribution([1, 2], 1) 570s ***** error ... 570s LoglogisticDistribution(NaN, 1) 570s ***** error ... 570s LoglogisticDistribution(1, 0) 570s ***** error ... 570s LoglogisticDistribution(1, -1) 570s ***** error ... 570s LoglogisticDistribution(1, Inf) 570s ***** error ... 570s LoglogisticDistribution(1, i) 570s ***** error ... 570s LoglogisticDistribution(1, "a") 570s ***** error ... 570s LoglogisticDistribution(1, [1, 2]) 570s ***** error ... 570s LoglogisticDistribution(1, NaN) 570s ***** error ... 570s cdf (LoglogisticDistribution, 2, "uper") 570s ***** error ... 570s cdf (LoglogisticDistribution, 2, 3) 570s ***** shared x 570s x = loglrnd (1, 1, [1, 100]); 570s ***** error ... 570s paramci (LoglogisticDistribution.fit (x), "alpha") 570s ***** error ... 570s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 570s ***** error ... 570s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 570s ***** error ... 570s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", "") 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 571s "parameter", {"mu", "sigma", "param"}) 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 571s ***** error ... 571s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 571s "parameter", "mu", "NAME", "value") 571s ***** error ... 571s plot (LoglogisticDistribution, "Parent") 571s ***** error ... 571s plot (LoglogisticDistribution, "PlotType", 12) 571s ***** error ... 571s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 571s ***** error ... 571s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 571s ***** error ... 571s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 571s ***** error ... 571s plot (LoglogisticDistribution, "Discrete", [1, 0]) 571s ***** error ... 571s plot (LoglogisticDistribution, "Discrete", {true}) 571s ***** error ... 571s plot (LoglogisticDistribution, "Parent", 12) 571s ***** error ... 571s plot (LoglogisticDistribution, "Parent", "hax") 571s ***** error ... 571s plot (LoglogisticDistribution, "invalidNAME", "pdf") 571s ***** error ... 571s plot (LoglogisticDistribution, "PlotType", "probability") 571s ***** error ... 571s proflik (LoglogisticDistribution, 2) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 3) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), [1, 2]) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), {1}) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display") 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 571s ***** error ... 571s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 571s ***** error ... 571s truncate (LoglogisticDistribution) 571s ***** error ... 571s truncate (LoglogisticDistribution, 2) 571s ***** error ... 571s truncate (LoglogisticDistribution, 4, 2) 571s ***** shared pd 571s pd = LoglogisticDistribution(1, 1); 571s pd(2) = LoglogisticDistribution(1, 3); 571s ***** error cdf (pd, 1) 571s ***** error icdf (pd, 0.5) 571s ***** error iqr (pd) 571s ***** error mean (pd) 571s ***** error median (pd) 571s ***** error negloglik (pd) 571s ***** error paramci (pd) 571s ***** error pdf (pd, 1) 571s ***** error plot (pd) 571s ***** error proflik (pd, 2) 571s ***** error random (pd) 571s ***** error std (pd) 571s ***** error ... 571s truncate (pd, 2, 4) 571s ***** error var (pd) 571s 95 tests, 95 passed, 0 known failure, 0 skipped 571s [inst/dist_obj/PiecewiseLinearDistribution.m] 571s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/PiecewiseLinearDistribution.m 571s ***** shared pd, t 571s load patients 571s [f, x] = ecdf (Weight); 571s f = f(1:5:end); 571s x = x(1:5:end); 571s pd = PiecewiseLinearDistribution (x, f); 571s t = truncate (pd, 130, 180); 571s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 571s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 571s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 571s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 571s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 571s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 571s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 571s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 571s ***** assert (iqr (pd), 50.0833, 1e-4); 571s ***** assert (iqr (t), 36.8077, 1e-4); 571s ***** assert (mean (pd), 153.61, 1e-10); 571s ***** assert (mean (t), 152.311, 1e-3); 574s ***** assert (median (pd), 142, 1e-10); 574s ***** assert (median (t), 141.9462, 1e-4); 574s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 574s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 574s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 574s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 574s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 574s ***** assert (any (random (t, 1000, 1) < 130), false); 574s ***** assert (any (random (t, 1000, 1) > 180), false); 574s ***** assert (std (pd), 26.5196, 1e-4); 574s ***** assert (std (t), 18.2941, 1e-4); 580s ***** assert (var (pd), 703.2879, 1e-4); 580s ***** assert (var (t), 334.6757, 1e-4); 586s ***** error ... 586s PiecewiseLinearDistribution ([0, i], [0, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 1], [0, i]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0], [1]) 586s ***** error ... 586s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 586s ***** error ... 586s cdf (PiecewiseLinearDistribution, 2, "uper") 586s ***** error ... 586s cdf (PiecewiseLinearDistribution, 2, 3) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Parent") 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "PlotType", 12) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Discrete", {true}) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Parent", 12) 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "Parent", "hax") 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 586s ***** error ... 586s plot (PiecewiseLinearDistribution, "PlotType", "probability") 586s ***** error ... 586s truncate (PiecewiseLinearDistribution) 586s ***** error ... 586s truncate (PiecewiseLinearDistribution, 2) 586s ***** error ... 586s truncate (PiecewiseLinearDistribution, 4, 2) 586s ***** shared pd 586s pd = PiecewiseLinearDistribution (); 586s pd(2) = PiecewiseLinearDistribution (); 586s ***** error cdf (pd, 1) 586s ***** error icdf (pd, 0.5) 586s ***** error iqr (pd) 586s ***** error mean (pd) 586s ***** error median (pd) 586s ***** error pdf (pd, 1) 586s ***** error plot (pd) 586s ***** error random (pd) 586s ***** error std (pd) 586s ***** error ... 586s truncate (pd, 2, 4) 586s ***** error var (pd) 586s 63 tests, 63 passed, 0 known failure, 0 skipped 586s [inst/dist_obj/LoguniformDistribution.m] 586s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/LoguniformDistribution.m 586s ***** shared pd, t 586s pd = LoguniformDistribution (1, 4); 586s t = truncate (pd, 2, 4); 586s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 586s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 586s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 586s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 586s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 586s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 586s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 586s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 586s ***** assert (iqr (pd), 1.4142, 1e-4); 586s ***** assert (iqr (t), 0.9852, 1e-4); 586s ***** assert (mean (pd), 2.1640, 1e-4); 586s ***** assert (mean (t), 2.8854, 1e-4); 586s ***** assert (median (pd), 2); 586s ***** assert (median (t), 2.8284, 1e-4); 586s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 586s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 586s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 586s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 586s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 586s ***** assert (any (random (pd, 1000, 1) < 1), false); 586s ***** assert (any (random (pd, 1000, 1) > 4), false); 586s ***** assert (any (random (t, 1000, 1) < 2), false); 586s ***** assert (any (random (t, 1000, 1) > 4), false); 586s ***** assert (std (pd), 0.8527, 1e-4); 586s ***** assert (std (t), 0.5751, 1e-4); 586s ***** assert (var (pd), 0.7270, 1e-4); 586s ***** assert (var (t), 0.3307, 1e-4); 586s ***** error ... 586s LoguniformDistribution (i, 1) 586s ***** error ... 586s LoguniformDistribution (Inf, 1) 586s ***** error ... 586s LoguniformDistribution ([1, 2], 1) 586s ***** error ... 586s LoguniformDistribution ("a", 1) 586s ***** error ... 586s LoguniformDistribution (NaN, 1) 586s ***** error ... 586s LoguniformDistribution (1, i) 586s ***** error ... 586s LoguniformDistribution (1, Inf) 586s ***** error ... 586s LoguniformDistribution (1, [1, 2]) 586s ***** error ... 586s LoguniformDistribution (1, "a") 586s ***** error ... 586s LoguniformDistribution (1, NaN) 586s ***** error ... 586s LoguniformDistribution (2, 1) 586s ***** error ... 586s cdf (LoguniformDistribution, 2, "uper") 586s ***** error ... 586s cdf (LoguniformDistribution, 2, 3) 586s ***** error ... 586s plot (LoguniformDistribution, "Parent") 586s ***** error ... 586s plot (LoguniformDistribution, "PlotType", 12) 586s ***** error ... 586s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 586s ***** error ... 586s plot (LoguniformDistribution, "PlotType", "pdfcdf") 586s ***** error ... 586s plot (LoguniformDistribution, "Discrete", "pdfcdf") 586s ***** error ... 586s plot (LoguniformDistribution, "Discrete", [1, 0]) 586s ***** error ... 586s plot (LoguniformDistribution, "Discrete", {true}) 586s ***** error ... 586s plot (LoguniformDistribution, "Parent", 12) 586s ***** error ... 586s plot (LoguniformDistribution, "Parent", "hax") 586s ***** error ... 586s plot (LoguniformDistribution, "invalidNAME", "pdf") 586s ***** error ... 586s plot (LoguniformDistribution, "PlotType", "probability") 586s ***** error ... 586s truncate (LoguniformDistribution) 586s ***** error ... 586s truncate (LoguniformDistribution, 2) 586s ***** error ... 586s truncate (LoguniformDistribution, 4, 2) 586s ***** shared pd 586s pd = LoguniformDistribution(1, 4); 586s pd(2) = LoguniformDistribution(2, 5); 586s ***** error cdf (pd, 1) 586s ***** error icdf (pd, 0.5) 586s ***** error iqr (pd) 586s ***** error mean (pd) 586s ***** error median (pd) 586s ***** error pdf (pd, 1) 586s ***** error plot (pd) 586s ***** error random (pd) 586s ***** error std (pd) 586s ***** error ... 586s truncate (pd, 2, 4) 586s ***** error var (pd) 586s 65 tests, 65 passed, 0 known failure, 0 skipped 586s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 586s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 586s ***** shared pd, t 586s pd = GeneralizedExtremeValueDistribution; 586s t = truncate (pd, 2, 4); 586s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 586s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 586s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 586s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 586s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 586s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 586s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 586s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 586s ***** assert (iqr (pd), 1.5725, 1e-4); 586s ***** assert (iqr (t), 0.8164, 1e-4); 586s ***** assert (mean (pd), 0.5772, 1e-4); 586s ***** assert (mean (t), 2.7043, 1e-4); 586s ***** assert (median (pd), 0.3665, 1e-4); 586s ***** assert (median (t), 2.5887, 1e-4); 586s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 586s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 586s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 586s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 586s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 586s ***** assert (any (random (t, 1000, 1) < 2), false); 586s ***** assert (any (random (t, 1000, 1) > 4), false); 586s ***** assert (std (pd), 1.2825, 1e-4); 586s ***** assert (std (t), 0.5289, 1e-4); 586s ***** assert (var (pd), 1.6449, 1e-4); 586s ***** assert (var (t), 0.2798, 1e-4); 586s ***** error ... 586s GeneralizedExtremeValueDistribution(Inf, 1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(i, 1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution("a", 1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(NaN, 1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 0, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, -1, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, Inf, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, i, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, "a", 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, NaN, 1) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 1, Inf) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 1, i) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 1, "a") 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 586s ***** error ... 586s GeneralizedExtremeValueDistribution(1, 1, NaN) 586s ***** error ... 586s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 586s ***** error ... 586s cdf (GeneralizedExtremeValueDistribution, 2, 3) 586s ***** shared x 586s x = gevrnd (1, 1, 1, [1, 100]); 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 586s ***** error ... 586s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 587s "parameter", "sigma", "alpha", {0.05}) 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 587s "parameter", {"k", "sigma", "mu", "param"}) 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 587s "parameter", {"k", "sigma", "mu", "param"}) 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 587s "parameter", "param") 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 587s "NAME", "value") 587s ***** error ... 587s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 587s "parameter", "sigma", "NAME", "value") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Parent") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 587s ***** error ... 587s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution, 2) 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 587s ***** error ... 587s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 588s "Display", ["on"; "on"]) 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 588s ***** error ... 588s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 588s "Display", "on") 588s ***** error ... 588s truncate (GeneralizedExtremeValueDistribution) 588s ***** error ... 588s truncate (GeneralizedExtremeValueDistribution, 2) 588s ***** error ... 588s truncate (GeneralizedExtremeValueDistribution, 4, 2) 588s ***** shared pd 588s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 588s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 588s ***** error cdf (pd, 1) 588s ***** error icdf (pd, 0.5) 588s ***** error iqr (pd) 588s ***** error mean (pd) 588s ***** error median (pd) 588s ***** error negloglik (pd) 588s ***** error paramci (pd) 588s ***** error pdf (pd, 1) 588s ***** error plot (pd) 588s ***** error proflik (pd, 2) 588s ***** error random (pd) 588s ***** error std (pd) 588s ***** error ... 588s truncate (pd, 2, 4) 588s ***** error var (pd) 588s 100 tests, 100 passed, 0 known failure, 0 skipped 588s [inst/dist_obj/LognormalDistribution.m] 588s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/LognormalDistribution.m 588s ***** shared pd, t 588s pd = LognormalDistribution; 588s t = truncate (pd, 2, 4); 588s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 588s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 588s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 588s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 588s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 588s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 588s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 588s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 588s ***** assert (iqr (pd), 1.4536, 1e-4); 588s ***** assert (iqr (t), 0.8989, 1e-4); 588s ***** assert (mean (pd), 1.6487, 1e-4); 588s ***** assert (mean (t), 2.7692, 1e-4); 588s ***** assert (median (pd), 1, 1e-4); 588s ***** assert (median (t), 2.6653, 1e-4); 588s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 588s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 588s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 588s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 588s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 588s ***** assert (any (random (t, 1000, 1) < 2), false); 588s ***** assert (any (random (t, 1000, 1) > 4), false); 588s ***** assert (std (pd), 2.1612, 1e-4); 588s ***** assert (std (t), 0.5540, 1e-4); 588s ***** assert (var (pd), 4.6708, 1e-4); 588s ***** assert (var (t), 0.3069, 1e-4); 588s ***** error ... 588s LognormalDistribution(Inf, 1) 588s ***** error ... 588s LognormalDistribution(i, 1) 588s ***** error ... 588s LognormalDistribution("a", 1) 588s ***** error ... 588s LognormalDistribution([1, 2], 1) 588s ***** error ... 588s LognormalDistribution(NaN, 1) 588s ***** error ... 588s LognormalDistribution(1, 0) 588s ***** error ... 588s LognormalDistribution(1, -1) 588s ***** error ... 588s LognormalDistribution(1, Inf) 588s ***** error ... 588s LognormalDistribution(1, i) 588s ***** error ... 588s LognormalDistribution(1, "a") 588s ***** error ... 588s LognormalDistribution(1, [1, 2]) 588s ***** error ... 588s LognormalDistribution(1, NaN) 588s ***** error ... 588s cdf (LognormalDistribution, 2, "uper") 588s ***** error ... 588s cdf (LognormalDistribution, 2, 3) 588s ***** shared x 588s randn ("seed", 1); 588s x = lognrnd (1, 1, [1, 100]); 588s ***** error ... 588s paramci (LognormalDistribution.fit (x), "alpha") 588s ***** error ... 588s paramci (LognormalDistribution.fit (x), "alpha", 0) 588s ***** error ... 588s paramci (LognormalDistribution.fit (x), "alpha", 1) 588s ***** error ... 588s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", "") 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 589s "parameter", {"mu", "sigma", "param"}) 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "parameter", "param") 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "NAME", "value") 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 589s ***** error ... 589s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 589s "NAME", "value") 589s ***** error ... 589s plot (LognormalDistribution, "Parent") 589s ***** error ... 589s plot (LognormalDistribution, "PlotType", 12) 589s ***** error ... 589s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 589s ***** error ... 589s plot (LognormalDistribution, "PlotType", "pdfcdf") 589s ***** error ... 589s plot (LognormalDistribution, "Discrete", "pdfcdf") 589s ***** error ... 589s plot (LognormalDistribution, "Discrete", [1, 0]) 589s ***** error ... 589s plot (LognormalDistribution, "Discrete", {true}) 589s ***** error ... 589s plot (LognormalDistribution, "Parent", 12) 589s ***** error ... 589s plot (LognormalDistribution, "Parent", "hax") 589s ***** error ... 589s plot (LognormalDistribution, "invalidNAME", "pdf") 589s ***** error ... 589s plot (LognormalDistribution, "PlotType", "probability") 589s ***** error ... 589s proflik (LognormalDistribution, 2) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 3) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), [1, 2]) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), {1}) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 1, ones (2)) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 1, "Display") 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 589s ***** error ... 589s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 590s ***** error ... 590s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 590s ***** error ... 590s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 590s ***** error ... 590s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 590s ***** error ... 590s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 590s ***** error ... 590s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 590s ***** error ... 590s truncate (LognormalDistribution) 590s ***** error ... 590s truncate (LognormalDistribution, 2) 590s ***** error ... 590s truncate (LognormalDistribution, 4, 2) 590s ***** shared pd 590s pd = LognormalDistribution(1, 1); 590s pd(2) = LognormalDistribution(1, 3); 590s ***** error cdf (pd, 1) 590s ***** error icdf (pd, 0.5) 590s ***** error iqr (pd) 590s ***** error mean (pd) 590s ***** error median (pd) 590s ***** error negloglik (pd) 590s ***** error paramci (pd) 590s ***** error pdf (pd, 1) 590s ***** error plot (pd) 590s ***** error proflik (pd, 2) 590s ***** error random (pd) 590s ***** error std (pd) 590s ***** error ... 590s truncate (pd, 2, 4) 590s ***** error var (pd) 590s 95 tests, 95 passed, 0 known failure, 0 skipped 590s [inst/dist_obj/NormalDistribution.m] 590s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/NormalDistribution.m 590s ***** shared pd, t 590s pd = NormalDistribution; 590s t = truncate (pd, -2, 2); 590s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 590s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 590s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 590s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 590s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 590s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 590s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 590s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 590s ***** assert (iqr (pd), 1.3490, 1e-4); 590s ***** assert (iqr (t), 1.2782, 1e-4); 590s ***** assert (mean (pd), 0); 590s ***** assert (mean (t), 0, 3e-16); 590s ***** assert (median (pd), 0); 590s ***** assert (median (t), 0, 3e-16); 590s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 590s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 590s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 590s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 590s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 590s ***** assert (any (random (t, 1000, 1) < -2), false); 590s ***** assert (any (random (t, 1000, 1) > 2), false); 590s ***** assert (std (pd), 1); 590s ***** assert (std (t), 0.8796, 1e-4); 590s ***** assert (var (pd), 1); 590s ***** assert (var (t), 0.7737, 1e-4); 590s ***** error ... 590s NormalDistribution(Inf, 1) 590s ***** error ... 590s NormalDistribution(i, 1) 590s ***** error ... 590s NormalDistribution("a", 1) 590s ***** error ... 590s NormalDistribution([1, 2], 1) 590s ***** error ... 590s NormalDistribution(NaN, 1) 590s ***** error ... 590s NormalDistribution(1, 0) 590s ***** error ... 590s NormalDistribution(1, -1) 590s ***** error ... 590s NormalDistribution(1, Inf) 590s ***** error ... 590s NormalDistribution(1, i) 590s ***** error ... 590s NormalDistribution(1, "a") 590s ***** error ... 590s NormalDistribution(1, [1, 2]) 590s ***** error ... 590s NormalDistribution(1, NaN) 590s ***** error ... 590s cdf (NormalDistribution, 2, "uper") 590s ***** error ... 590s cdf (NormalDistribution, 2, 3) 590s ***** shared x 590s x = normrnd (1, 1, [1, 100]); 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha") 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", 0) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", 1) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", "") 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 590s "parameter", {"mu", "sigma", "param"}) 590s ***** error ... 590s paramci (NormalDistribution.fit (x), "parameter", "param") 591s ***** error ... 591s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 591s ***** error ... 591s paramci (NormalDistribution.fit (x), "NAME", "value") 591s ***** error ... 591s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 591s ***** error ... 591s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 591s "NAME", "value") 591s ***** error ... 591s plot (NormalDistribution, "Parent") 591s ***** error ... 591s plot (NormalDistribution, "PlotType", 12) 591s ***** error ... 591s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 591s ***** error ... 591s plot (NormalDistribution, "PlotType", "pdfcdf") 591s ***** error ... 591s plot (NormalDistribution, "Discrete", "pdfcdf") 591s ***** error ... 591s plot (NormalDistribution, "Discrete", [1, 0]) 591s ***** error ... 591s plot (NormalDistribution, "Discrete", {true}) 591s ***** error ... 591s plot (NormalDistribution, "Parent", 12) 591s ***** error ... 591s plot (NormalDistribution, "Parent", "hax") 591s ***** error ... 591s plot (NormalDistribution, "invalidNAME", "pdf") 591s ***** error ... 591s plot (NormalDistribution, "PlotType", "probability") 591s ***** error ... 591s proflik (NormalDistribution, 2) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 3) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), [1, 2]) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), {1}) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, ones (2)) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display") 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display", 1) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 591s ***** error ... 591s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 591s ***** error ... 591s truncate (NormalDistribution) 591s ***** error ... 591s truncate (NormalDistribution, 2) 591s ***** error ... 591s truncate (NormalDistribution, 4, 2) 591s ***** shared pd 591s pd = NormalDistribution(1, 1); 591s pd(2) = NormalDistribution(1, 3); 591s ***** error cdf (pd, 1) 591s ***** error icdf (pd, 0.5) 591s ***** error iqr (pd) 591s ***** error mean (pd) 591s ***** error median (pd) 591s ***** error negloglik (pd) 591s ***** error paramci (pd) 591s ***** error pdf (pd, 1) 591s ***** error plot (pd) 591s ***** error proflik (pd, 2) 591s ***** error random (pd) 591s ***** error std (pd) 591s ***** error ... 591s truncate (pd, 2, 4) 591s ***** error var (pd) 591s 95 tests, 95 passed, 0 known failure, 0 skipped 591s [inst/dist_obj/BetaDistribution.m] 591s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/BetaDistribution.m 591s ***** demo 591s ## Generate a data set of 5000 random samples from a Beta distribution with 591s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 591s ## a PDF of the fitted distribution superimposed on a histogram of the data 591s 591s pd = makedist ("Beta", "a", 2, "b", 4) 591s randg ("seed", 21); 591s data = random (pd, 5000, 1); 591s pd = fitdist (data, "Beta") 591s plot (pd) 591s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 591s pd.a, pd.b)) 591s ***** demo 591s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 591s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 591s ## this truncated distribution and superimpose a histogram with 100 bins 591s ## scaled accordingly 591s 591s pd = makedist ("Beta", "a", 2, "b", 4) 591s t = truncate (pd, 0.1, 0.8) 591s randg ("seed", 21); 591s data = random (t, 10000, 1); 591s plot (t) 591s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 591s hold on 591s hist (data, 100, 140) 591s hold off 591s ***** demo 591s ## Generate a data set of 100 random samples from a Beta distribution with 591s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 591s ## its CDF superimposed over an empirical CDF of the data 591s 591s pd = makedist ("Beta", "a", 2, "b", 4) 591s randg ("seed", 21); 591s data = random (pd, 100, 1); 591s pd = fitdist (data, "Beta") 591s plot (pd, "plottype", "cdf") 591s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 591s pd.a, pd.b)) 591s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 591s ***** demo 591s ## Generate a data set of 200 random samples from a Beta distribution with 591s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 591s ## distribution fit to the data. 591s 591s pd = makedist ("Beta", "a", 2, "b", 4) 591s randg ("seed", 21); 591s data = random (pd, 200, 1); 591s pd = fitdist (data, "Beta") 591s plot (pd, "plottype", "probability") 591s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 591s pd.a, pd.b)) 591s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 591s ***** shared pd, t 591s pd = BetaDistribution; 591s t = truncate (pd, 0.2, 0.8); 591s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 591s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 591s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 591s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 591s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 592s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 592s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 592s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 592s ***** assert (iqr (pd), 0.5, 1e-4); 592s ***** assert (iqr (t), 0.3, 1e-4); 592s ***** assert (mean (pd), 0.5); 592s ***** assert (mean (t), 0.5, 1e-6); 592s ***** assert (median (pd), 0.5); 592s ***** assert (median (t), 0.5, 1e-6); 592s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 592s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 592s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 592s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 592s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 592s ***** assert (any (random (t, 1000, 1) < 0.2), false); 592s ***** assert (any (random (t, 1000, 1) > 0.8), false); 592s ***** assert (std (pd), 0.2887, 1e-4); 592s ***** assert (std (t), 0.1732, 1e-4); 592s ***** assert (var (pd), 0.0833, 1e-4); 592s ***** assert (var (t), 0.0300, 1e-4); 592s ***** error ... 592s BetaDistribution(0, 1) 592s ***** error ... 592s BetaDistribution(Inf, 1) 592s ***** error ... 592s BetaDistribution(i, 1) 592s ***** error ... 592s BetaDistribution("a", 1) 592s ***** error ... 592s BetaDistribution([1, 2], 1) 592s ***** error ... 592s BetaDistribution(NaN, 1) 592s ***** error ... 592s BetaDistribution(1, 0) 592s ***** error ... 592s BetaDistribution(1, -1) 592s ***** error ... 592s BetaDistribution(1, Inf) 592s ***** error ... 592s BetaDistribution(1, i) 592s ***** error ... 592s BetaDistribution(1, "a") 592s ***** error ... 592s BetaDistribution(1, [1, 2]) 592s ***** error ... 592s BetaDistribution(1, NaN) 592s ***** error ... 592s cdf (BetaDistribution, 2, "uper") 592s ***** error ... 592s cdf (BetaDistribution, 2, 3) 592s ***** shared x 592s randg ("seed", 1); 592s x = betarnd (1, 1, [100, 1]); 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 0) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 1) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", "") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 592s "parameter", {"a", "b", "param"}) 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "parameter", "param") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "NAME", "value") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 592s ***** error ... 592s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 592s "NAME", "value") 592s ***** error ... 592s plot (BetaDistribution, "Parent") 592s ***** error ... 592s plot (BetaDistribution, "PlotType", 12) 592s ***** error ... 592s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 592s ***** error ... 592s plot (BetaDistribution, "PlotType", "pdfcdf") 592s ***** error ... 592s plot (BetaDistribution, "Discrete", "pdfcdf") 592s ***** error ... 592s plot (BetaDistribution, "Discrete", [1, 0]) 592s ***** error ... 592s plot (BetaDistribution, "Discrete", {true}) 592s ***** error ... 592s plot (BetaDistribution, "Parent", 12) 592s ***** error ... 592s plot (BetaDistribution, "Parent", "hax") 592s ***** error ... 592s plot (BetaDistribution, "invalidNAME", "pdf") 592s ***** error ... 592s plot (BetaDistribution, "PlotType", "probability") 592s ***** error ... 592s proflik (BetaDistribution, 2) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 3) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), [1, 2]) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), {1}) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, ones (2)) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display") 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display", 1) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 592s ***** error ... 592s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 592s ***** error ... 592s truncate (BetaDistribution) 592s ***** error ... 592s truncate (BetaDistribution, 2) 592s ***** error ... 592s truncate (BetaDistribution, 4, 2) 592s ***** shared pd 592s pd = BetaDistribution(1, 1); 592s pd(2) = BetaDistribution(1, 3); 592s ***** error cdf (pd, 1) 592s ***** error icdf (pd, 0.5) 592s ***** error iqr (pd) 592s ***** error mean (pd) 592s ***** error median (pd) 592s ***** error negloglik (pd) 592s ***** error paramci (pd) 592s ***** error pdf (pd, 1) 592s ***** error plot (pd) 592s ***** error proflik (pd, 2) 592s ***** error random (pd) 592s ***** error std (pd) 592s ***** error ... 592s truncate (pd, 2, 4) 592s ***** error var (pd) 592s 96 tests, 96 passed, 0 known failure, 0 skipped 592s [inst/dist_obj/NakagamiDistribution.m] 592s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/NakagamiDistribution.m 592s ***** shared pd, t 592s pd = NakagamiDistribution; 592s t = truncate (pd, 2, 4); 592s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 592s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 592s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 592s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 592s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 592s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 592s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 592s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 592s ***** assert (iqr (pd), 0.6411, 1e-4); 592s ***** assert (iqr (t), 0.2502, 1e-4); 592s ***** assert (mean (pd), 0.8862, 1e-4); 592s ***** assert (mean (t), 2.2263, 1e-4); 592s ***** assert (median (pd), 0.8326, 1e-4); 592s ***** assert (median (t), 2.1664, 1e-4); 592s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 592s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 592s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 592s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 592s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 592s ***** assert (any (random (t, 1000, 1) < 2), false); 592s ***** assert (any (random (t, 1000, 1) > 4), false); 592s ***** assert (std (pd), 0.4633, 1e-4); 592s ***** assert (std (t), 0.2083, 1e-4); 592s ***** assert (var (pd), 0.2146, 1e-4); 592s ***** assert (var (t), 0.0434, 1e-4); 592s ***** error ... 592s NakagamiDistribution(Inf, 1) 592s ***** error ... 592s NakagamiDistribution(i, 1) 592s ***** error ... 592s NakagamiDistribution("a", 1) 592s ***** error ... 592s NakagamiDistribution([1, 2], 1) 592s ***** error ... 592s NakagamiDistribution(NaN, 1) 592s ***** error ... 592s NakagamiDistribution(1, 0) 592s ***** error ... 592s NakagamiDistribution(1, -1) 592s ***** error ... 592s NakagamiDistribution(1, Inf) 592s ***** error ... 592s NakagamiDistribution(1, i) 592s ***** error ... 592s NakagamiDistribution(1, "a") 592s ***** error ... 592s NakagamiDistribution(1, [1, 2]) 592s ***** error ... 592s NakagamiDistribution(1, NaN) 592s ***** error ... 592s cdf (NakagamiDistribution, 2, "uper") 592s ***** error ... 592s cdf (NakagamiDistribution, 2, 3) 592s ***** shared x 592s x = nakarnd (1, 0.5, [1, 100]); 592s ***** error ... 592s paramci (NakagamiDistribution.fit (x), "alpha") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 0) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 1) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", "") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 593s "parameter", {"mu", "omega", "param"}) 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "parameter", "param") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "NAME", "value") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 593s ***** error ... 593s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 593s "NAME", "value") 593s ***** error ... 593s plot (NakagamiDistribution, "Parent") 593s ***** error ... 593s plot (NakagamiDistribution, "PlotType", 12) 593s ***** error ... 593s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 593s ***** error ... 593s plot (NakagamiDistribution, "PlotType", "pdfcdf") 593s ***** error ... 593s plot (NakagamiDistribution, "Discrete", "pdfcdf") 593s ***** error ... 593s plot (NakagamiDistribution, "Discrete", [1, 0]) 593s ***** error ... 593s plot (NakagamiDistribution, "Discrete", {true}) 593s ***** error ... 593s plot (NakagamiDistribution, "Parent", 12) 593s ***** error ... 593s plot (NakagamiDistribution, "Parent", "hax") 593s ***** error ... 593s plot (NakagamiDistribution, "invalidNAME", "pdf") 593s ***** error ... 593s plot (NakagamiDistribution, "PlotType", "probability") 593s ***** error ... 593s proflik (NakagamiDistribution, 2) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 3) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), [1, 2]) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), {1}) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display") 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 593s ***** error ... 593s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 593s ***** error ... 593s truncate (NakagamiDistribution) 593s ***** error ... 593s truncate (NakagamiDistribution, 2) 593s ***** error ... 593s truncate (NakagamiDistribution, 4, 2) 593s ***** shared pd 593s pd = NakagamiDistribution(1, 0.5); 593s pd(2) = NakagamiDistribution(1, 0.6); 593s ***** error cdf (pd, 1) 593s ***** error icdf (pd, 0.5) 593s ***** error iqr (pd) 593s ***** error mean (pd) 593s ***** error median (pd) 593s ***** error negloglik (pd) 593s ***** error paramci (pd) 593s ***** error pdf (pd, 1) 593s ***** error plot (pd) 593s ***** error proflik (pd, 2) 593s ***** error random (pd) 593s ***** error std (pd) 593s ***** error ... 593s truncate (pd, 2, 4) 593s ***** error var (pd) 593s 95 tests, 95 passed, 0 known failure, 0 skipped 593s [inst/dist_obj/ExtremeValueDistribution.m] 593s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/ExtremeValueDistribution.m 593s ***** shared pd, t 593s pd = ExtremeValueDistribution (0, 1); 593s t = truncate (pd, 2, 4); 593s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 593s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 593s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 593s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 593s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 593s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 593s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 593s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 593s ***** assert (iqr (pd), 1.5725, 1e-4); 593s ***** assert (iqr (t), 0.1338, 1e-4); 593s ***** assert (mean (pd), -0.5772, 1e-4); 593s ***** assert (mean (t), 2.1206, 1e-4); 593s ***** assert (median (pd), -0.3665, 1e-4); 593s ***** assert (median (t), 2.0897, 1e-4); 593s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 593s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 593s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 593s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 593s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 593s ***** assert (any (random (t, 1000, 1) < 2), false); 593s ***** assert (any (random (t, 1000, 1) > 4), false); 593s ***** assert (std (pd), 1.2825, 1e-4); 593s ***** assert (std (t), 0.1091, 1e-4); 593s ***** assert (var (pd), 1.6449, 1e-4); 593s ***** assert (var (t), 0.0119, 1e-4); 594s ***** error ... 594s ExtremeValueDistribution(Inf, 1) 594s ***** error ... 594s ExtremeValueDistribution(i, 1) 594s ***** error ... 594s ExtremeValueDistribution("a", 1) 594s ***** error ... 594s ExtremeValueDistribution([1, 2], 1) 594s ***** error ... 594s ExtremeValueDistribution(NaN, 1) 594s ***** error ... 594s ExtremeValueDistribution(1, 0) 594s ***** error ... 594s ExtremeValueDistribution(1, -1) 594s ***** error ... 594s ExtremeValueDistribution(1, Inf) 594s ***** error ... 594s ExtremeValueDistribution(1, i) 594s ***** error ... 594s ExtremeValueDistribution(1, "a") 594s ***** error ... 594s ExtremeValueDistribution(1, [1, 2]) 594s ***** error ... 594s ExtremeValueDistribution(1, NaN) 594s ***** error ... 594s cdf (ExtremeValueDistribution, 2, "uper") 594s ***** error ... 594s cdf (ExtremeValueDistribution, 2, 3) 594s ***** shared x 594s rand ("seed", 1); 594s x = evrnd (1, 1, [1000, 1]); 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), ... 594s "parameter", "mu", "alpha", {0.05}) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), ... 594s "parameter", {"mu", "sigma", "param"}) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 594s "parameter", {"mu", "sigma", "param"}) 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 594s "parameter", "param") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 594s ***** error ... 594s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 594s "parameter", "mu", "NAME", "value") 594s ***** error ... 594s plot (ExtremeValueDistribution, "Parent") 594s ***** error ... 594s plot (ExtremeValueDistribution, "PlotType", 12) 594s ***** error ... 594s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 594s ***** error ... 594s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 594s ***** error ... 594s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 594s ***** error ... 594s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 594s ***** error ... 594s plot (ExtremeValueDistribution, "Discrete", {true}) 594s ***** error ... 594s plot (ExtremeValueDistribution, "Parent", 12) 594s ***** error ... 594s plot (ExtremeValueDistribution, "Parent", "hax") 594s ***** error ... 594s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 594s ***** error ... 594s plot (ExtremeValueDistribution, "PlotType", "probability") 594s ***** error ... 594s proflik (ExtremeValueDistribution, 2) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 3) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), {1}) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 594s ***** error ... 594s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 594s ***** error ... 594s truncate (ExtremeValueDistribution) 594s ***** error ... 594s truncate (ExtremeValueDistribution, 2) 594s ***** error ... 594s truncate (ExtremeValueDistribution, 4, 2) 594s ***** shared pd 594s pd = ExtremeValueDistribution(1, 1); 594s pd(2) = ExtremeValueDistribution(1, 3); 594s ***** error cdf (pd, 1) 594s ***** error icdf (pd, 0.5) 594s ***** error iqr (pd) 594s ***** error mean (pd) 594s ***** error median (pd) 594s ***** error negloglik (pd) 594s ***** error paramci (pd) 594s ***** error pdf (pd, 1) 594s ***** error plot (pd) 594s ***** error proflik (pd, 2) 594s ***** error random (pd) 594s ***** error std (pd) 594s ***** error ... 594s truncate (pd, 2, 4) 594s ***** error var (pd) 594s 95 tests, 95 passed, 0 known failure, 0 skipped 594s [inst/dist_obj/UniformDistribution.m] 594s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/UniformDistribution.m 594s ***** shared pd, t 594s pd = UniformDistribution (0, 5); 594s t = truncate (pd, 2, 4); 594s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 594s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 594s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 594s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 594s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 594s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 594s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 594s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 594s ***** assert (iqr (pd), 2.5, 1e-14); 594s ***** assert (iqr (t), 1, 1e-14); 594s ***** assert (mean (pd), 2.5, 1e-14); 594s ***** assert (mean (t), 3, 1e-14); 594s ***** assert (median (pd), 2.5, 1e-14); 594s ***** assert (median (t), 3, 1e-14); 594s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 594s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 594s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 594s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 594s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 594s ***** assert (any (random (t, 1000, 1) < 2), false); 594s ***** assert (any (random (t, 1000, 1) > 4), false); 594s ***** assert (std (pd), 1.4434, 1e-4); 594s ***** assert (std (t), 0.5774, 1e-4); 594s ***** assert (var (pd), 2.0833, 1e-4); 594s ***** assert (var (t), 0.3333, 1e-4); 594s ***** error ... 594s UniformDistribution (i, 1) 594s ***** error ... 594s UniformDistribution (Inf, 1) 594s ***** error ... 594s UniformDistribution ([1, 2], 1) 594s ***** error ... 594s UniformDistribution ("a", 1) 594s ***** error ... 594s UniformDistribution (NaN, 1) 594s ***** error ... 594s UniformDistribution (1, i) 594s ***** error ... 594s UniformDistribution (1, Inf) 594s ***** error ... 594s UniformDistribution (1, [1, 2]) 594s ***** error ... 594s UniformDistribution (1, "a") 594s ***** error ... 594s UniformDistribution (1, NaN) 594s ***** error ... 594s UniformDistribution (2, 1) 594s ***** error ... 594s cdf (UniformDistribution, 2, "uper") 594s ***** error ... 594s cdf (UniformDistribution, 2, 3) 594s ***** error ... 594s plot (UniformDistribution, "Parent") 594s ***** error ... 594s plot (UniformDistribution, "PlotType", 12) 594s ***** error ... 594s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 594s ***** error ... 594s plot (UniformDistribution, "PlotType", "pdfcdf") 594s ***** error ... 594s plot (UniformDistribution, "Discrete", "pdfcdf") 594s ***** error ... 594s plot (UniformDistribution, "Discrete", [1, 0]) 594s ***** error ... 594s plot (UniformDistribution, "Discrete", {true}) 594s ***** error ... 594s plot (UniformDistribution, "Parent", 12) 594s ***** error ... 594s plot (UniformDistribution, "Parent", "hax") 594s ***** error ... 594s plot (UniformDistribution, "invalidNAME", "pdf") 594s ***** error ... 594s plot (UniformDistribution, "PlotType", "probability") 594s ***** error ... 594s truncate (UniformDistribution) 594s ***** error ... 594s truncate (UniformDistribution, 2) 594s ***** error ... 594s truncate (UniformDistribution, 4, 2) 594s ***** shared pd 594s pd = UniformDistribution (0, 1); 594s pd(2) = UniformDistribution (0, 2); 594s ***** error cdf (pd, 1) 594s ***** error icdf (pd, 0.5) 594s ***** error iqr (pd) 594s ***** error mean (pd) 594s ***** error median (pd) 594s ***** error pdf (pd, 1) 594s ***** error plot (pd) 594s ***** error random (pd) 594s ***** error std (pd) 594s ***** error ... 594s truncate (pd, 2, 4) 594s ***** error var (pd) 594s 63 tests, 63 passed, 0 known failure, 0 skipped 594s [inst/dist_obj/WeibullDistribution.m] 594s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/WeibullDistribution.m 594s ***** shared pd, t 594s pd = WeibullDistribution; 594s t = truncate (pd, 2, 4); 594s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 594s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 594s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 594s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 594s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 594s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 594s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 594s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 594s ***** assert (iqr (pd), 1.0986, 1e-4); 594s ***** assert (iqr (t), 0.8020, 1e-4); 594s ***** assert (mean (pd), 1, 1e-14); 594s ***** assert (mean (t), 2.6870, 1e-4); 594s ***** assert (median (pd), 0.6931, 1e-4); 594s ***** assert (median (t), 2.5662, 1e-4); 594s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 594s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 594s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 594s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 594s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 594s ***** assert (any (random (t, 1000, 1) < 2), false); 594s ***** assert (any (random (t, 1000, 1) > 4), false); 594s ***** assert (std (pd), 1, 1e-14); 594s ***** assert (std (t), 0.5253, 1e-4); 594s ***** assert (var (pd), 1, 1e-14); 594s ***** assert (var (t), 0.2759, 1e-4); 594s ***** error ... 594s WeibullDistribution(0, 1) 594s ***** error ... 594s WeibullDistribution(-1, 1) 594s ***** error ... 594s WeibullDistribution(Inf, 1) 594s ***** error ... 594s WeibullDistribution(i, 1) 594s ***** error ... 594s WeibullDistribution("a", 1) 594s ***** error ... 594s WeibullDistribution([1, 2], 1) 594s ***** error ... 594s WeibullDistribution(NaN, 1) 594s ***** error ... 594s WeibullDistribution(1, 0) 594s ***** error ... 594s WeibullDistribution(1, -1) 594s ***** error ... 594s WeibullDistribution(1, Inf) 594s ***** error ... 594s WeibullDistribution(1, i) 594s ***** error ... 594s WeibullDistribution(1, "a") 594s ***** error ... 594s WeibullDistribution(1, [1, 2]) 594s ***** error ... 594s WeibullDistribution(1, NaN) 594s ***** error ... 594s cdf (WeibullDistribution, 2, "uper") 594s ***** error ... 594s cdf (WeibullDistribution, 2, 3) 594s ***** shared x 594s x = wblrnd (1, 1, [1, 100]); 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 0) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 1) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", "") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 594s "parameter", {"lambda", "k", "param"}) 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "parameter", "param") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "NAME", "value") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 594s ***** error ... 594s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 594s "NAME", "value") 594s ***** error ... 594s plot (WeibullDistribution, "Parent") 594s ***** error ... 594s plot (WeibullDistribution, "PlotType", 12) 594s ***** error ... 594s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 594s ***** error ... 594s plot (WeibullDistribution, "PlotType", "pdfcdf") 594s ***** error ... 594s plot (WeibullDistribution, "Discrete", "pdfcdf") 594s ***** error ... 594s plot (WeibullDistribution, "Discrete", [1, 0]) 594s ***** error ... 594s plot (WeibullDistribution, "Discrete", {true}) 594s ***** error ... 594s plot (WeibullDistribution, "Parent", 12) 594s ***** error ... 594s plot (WeibullDistribution, "Parent", "hax") 594s ***** error ... 594s plot (WeibullDistribution, "invalidNAME", "pdf") 594s ***** error ... 594s plot (WeibullDistribution, "PlotType", "probability") 594s ***** error ... 594s proflik (WeibullDistribution, 2) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 3) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), [1, 2]) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), {1}) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, ones (2)) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display") 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 594s ***** error ... 594s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 594s ***** error ... 594s truncate (WeibullDistribution) 594s ***** error ... 594s truncate (WeibullDistribution, 2) 594s ***** error ... 594s truncate (WeibullDistribution, 4, 2) 594s ***** shared pd 594s pd = WeibullDistribution(1, 1); 594s pd(2) = WeibullDistribution(1, 3); 594s ***** error cdf (pd, 1) 594s ***** error icdf (pd, 0.5) 594s ***** error iqr (pd) 594s ***** error mean (pd) 594s ***** error median (pd) 594s ***** error negloglik (pd) 594s ***** error paramci (pd) 594s ***** error pdf (pd, 1) 594s ***** error plot (pd) 594s ***** error proflik (pd, 2) 594s ***** error random (pd) 594s ***** error std (pd) 594s ***** error ... 594s truncate (pd, 2, 4) 594s ***** error var (pd) 594s 97 tests, 97 passed, 0 known failure, 0 skipped 594s [inst/dist_obj/MultinomialDistribution.m] 594s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/MultinomialDistribution.m 594s ***** shared pd, t 594s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 594s t = truncate (pd, 2, 4); 594s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 594s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 594s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 594s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 594s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 594s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 594s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 594s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 594s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 594s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 594s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 594s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 594s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 594s ***** assert (iqr (pd), 2); 594s ***** assert (iqr (t), 2); 594s ***** assert (mean (pd), 3.3, 1e-14); 594s ***** assert (mean (t), 3, eps); 594s ***** assert (median (pd), 3); 594s ***** assert (median (t), 3); 594s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 594s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 594s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 594s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 594s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 594s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 594s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 594s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 594s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 594s ***** assert (std (pd), 1.4177, 1e-4); 594s ***** assert (std (t), 0.7559, 1e-4); 594s ***** assert (var (pd), 2.0100, 1e-4); 594s ***** assert (var (t), 0.5714, 1e-4); 594s ***** error ... 594s MultinomialDistribution(0) 594s ***** error ... 594s MultinomialDistribution(-1) 594s ***** error ... 594s MultinomialDistribution(Inf) 594s ***** error ... 594s MultinomialDistribution(i) 594s ***** error ... 594s MultinomialDistribution("a") 594s ***** error ... 594s MultinomialDistribution([1, 2]) 594s ***** error ... 594s MultinomialDistribution(NaN) 594s ***** error ... 594s cdf (MultinomialDistribution, 2, "uper") 594s ***** error ... 594s cdf (MultinomialDistribution, 2, 3) 594s ***** error ... 594s cdf (MultinomialDistribution, i) 594s ***** error ... 594s plot (MultinomialDistribution, "Parent") 594s ***** error ... 594s plot (MultinomialDistribution, "PlotType", 12) 594s ***** error ... 594s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 594s ***** error ... 594s plot (MultinomialDistribution, "PlotType", "pdfcdf") 594s ***** error ... 594s plot (MultinomialDistribution, "Discrete", "pdfcdf") 594s ***** error ... 594s plot (MultinomialDistribution, "Discrete", [1, 0]) 594s ***** error ... 594s plot (MultinomialDistribution, "Discrete", {true}) 594s ***** error ... 594s plot (MultinomialDistribution, "Parent", 12) 594s ***** error ... 594s plot (MultinomialDistribution, "Parent", "hax") 594s ***** error ... 594s plot (MultinomialDistribution, "invalidNAME", "pdf") 594s ***** error ... 594s plot (MultinomialDistribution, "PlotType", "probability") 594s ***** error ... 594s truncate (MultinomialDistribution) 594s ***** error ... 594s truncate (MultinomialDistribution, 2) 594s ***** error ... 594s truncate (MultinomialDistribution, 4, 2) 594s ***** shared pd 594s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 594s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 594s ***** error cdf (pd, 1) 594s ***** error icdf (pd, 0.5) 594s ***** error iqr (pd) 594s ***** error mean (pd) 594s ***** error median (pd) 594s ***** error pdf (pd, 1) 594s ***** error plot (pd) 594s ***** error random (pd) 594s ***** error std (pd) 594s ***** error ... 594s truncate (pd, 2, 4) 594s ***** error var (pd) 594s 64 tests, 64 passed, 0 known failure, 0 skipped 594s [inst/dist_obj/BurrDistribution.m] 594s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/BurrDistribution.m 594s ***** demo 594s ## Generate a data set of 5000 random samples from a Burr type XII 594s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 594s ## XII distribution to this data and plot a PDF of the fitted distribution 594s ## superimposed on a histogram of the data 594s 594s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 594s rand ("seed", 21); 594s data = random (pd, 5000, 1); 594s pd = fitdist (data, "Burr") 594s plot (pd) 594s msg = strcat (["Fitted Burr type XII distribution with"], ... 594s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 594s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 594s ***** demo 594s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 594s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 594s ## samples from this truncated distribution and superimpose a histogram with 594s ## 100 bins scaled accordingly 594s 594s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 594s t = truncate (pd, 0.5, 2.5) 594s rand ("seed", 21); 594s data = random (t, 10000, 1); 594s plot (t) 594s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 594s hold on 594s hist (data, 100, 50) 594s hold off 594s ***** demo 594s ## Generate a data set of 100 random samples from a Burr type XII 594s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 594s ## XII distribution to this data and plot its CDF superimposed over an 594s ## empirical CDF of the data 594s 594s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 594s rand ("seed", 21); 594s data = random (pd, 100, 1); 594s pd = fitdist (data, "Burr") 594s plot (pd, "plottype", "cdf") 594s msg = strcat (["Fitted Burr type XII distribution with"], ... 594s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 594s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 594s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 594s ***** shared pd, t 594s pd = BurrDistribution; 594s t = truncate (pd, 2, 4); 594s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 594s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 594s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 594s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 594s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 594s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 594s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 594s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 594s ***** assert (iqr (pd), 2.6667, 1e-4); 594s ***** assert (iqr (t), 0.9524, 1e-4); 594s ***** assert (mean (pd), Inf); 594s ***** assert (mean (t), 2.8312, 1e-4); 594s ***** assert (median (pd), 1, 1e-4); 594s ***** assert (median (t), 2.75, 1e-4); 594s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 594s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 594s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 594s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 594s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 594s ***** assert (any (random (t, 1000, 1) < 2), false); 594s ***** assert (any (random (t, 1000, 1) > 4), false); 594s ***** assert (std (pd), Inf); 594s ***** assert (std (t), 0.5674, 1e-4); 594s ***** assert (var (pd), Inf); 594s ***** assert (var (t), 0.3220, 1e-4); 594s ***** error ... 594s BurrDistribution(0, 1, 1) 594s ***** error ... 594s BurrDistribution(-1, 1, 1) 594s ***** error ... 594s BurrDistribution(Inf, 1, 1) 594s ***** error ... 594s BurrDistribution(i, 1, 1) 594s ***** error ... 594s BurrDistribution("a", 1, 1) 594s ***** error ... 594s BurrDistribution([1, 2], 1, 1) 594s ***** error ... 594s BurrDistribution(NaN, 1, 1) 594s ***** error ... 594s BurrDistribution(1, 0, 1) 594s ***** error ... 594s BurrDistribution(1, -1, 1) 594s ***** error ... 594s BurrDistribution(1, Inf, 1) 594s ***** error ... 594s BurrDistribution(1, i, 1) 594s ***** error ... 594s BurrDistribution(1, "a", 1) 594s ***** error ... 594s BurrDistribution(1, [1, 2], 1) 594s ***** error ... 594s BurrDistribution(1, NaN, 1) 594s ***** error ... 594s BurrDistribution(1, 1, 0) 594s ***** error ... 594s BurrDistribution(1, 1, -1) 594s ***** error ... 594s BurrDistribution(1, 1, Inf) 594s ***** error ... 594s BurrDistribution(1, 1, i) 594s ***** error ... 594s BurrDistribution(1, 1, "a") 594s ***** error ... 594s BurrDistribution(1, 1, [1, 2]) 594s ***** error ... 594s BurrDistribution(1, 1, NaN) 594s ***** error ... 594s cdf (BurrDistribution, 2, "uper") 594s ***** error ... 594s cdf (BurrDistribution, 2, 3) 594s ***** shared x 594s rand ("seed", 4); 594s x = burrrnd (1, 1, 1, [1, 100]); 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha") 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha", 0) 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha", 1) 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha", "") 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 594s ***** error ... 594s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 595s "parameter", {"alpha", "c", "k", "param"}) 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "parameter", "param") 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "NAME", "value") 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 595s ***** error ... 595s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 595s "NAME", "value") 595s ***** error ... 595s plot (BurrDistribution, "Parent") 595s ***** error ... 595s plot (BurrDistribution, "PlotType", 12) 595s ***** error ... 595s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 595s ***** error ... 595s plot (BurrDistribution, "PlotType", "pdfcdf") 595s ***** error ... 595s plot (BurrDistribution, "Discrete", "pdfcdf") 595s ***** error ... 595s plot (BurrDistribution, "Discrete", [1, 0]) 595s ***** error ... 595s plot (BurrDistribution, "Discrete", {true}) 595s ***** error ... 595s plot (BurrDistribution, "Parent", 12) 595s ***** error ... 595s plot (BurrDistribution, "Parent", "hax") 595s ***** error ... 595s plot (BurrDistribution, "invalidNAME", "pdf") 595s ***** error ... 595s plot (BurrDistribution, "PlotType", "probability") 595s ***** error ... 595s proflik (BurrDistribution, 2) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 4) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), [1, 2]) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), {1}) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, ones (2)) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, "Display") 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, "Display", 1) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 595s ***** error ... 595s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 596s ***** error ... 596s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 596s ***** error ... 596s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 596s ***** error ... 596s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 596s ***** error ... 596s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 596s ***** error ... 596s truncate (BurrDistribution) 596s ***** error ... 596s truncate (BurrDistribution, 2) 596s ***** error ... 596s truncate (BurrDistribution, 4, 2) 596s ***** shared pd 596s pd = BurrDistribution(1, 1, 1); 596s pd(2) = BurrDistribution(1, 3, 1); 596s ***** error cdf (pd, 1) 596s ***** error icdf (pd, 0.5) 596s ***** error iqr (pd) 596s ***** error mean (pd) 596s ***** error median (pd) 596s ***** error negloglik (pd) 596s ***** error paramci (pd) 596s ***** error pdf (pd, 1) 596s ***** error plot (pd) 596s ***** error proflik (pd, 2) 596s ***** error random (pd) 596s ***** error std (pd) 596s ***** error ... 596s truncate (pd, 2, 4) 596s ***** error var (pd) 596s 104 tests, 104 passed, 0 known failure, 0 skipped 596s [inst/dist_obj/RicianDistribution.m] 596s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/RicianDistribution.m 596s ***** shared pd, t 596s pd = RicianDistribution; 596s t = truncate (pd, 2, 4); 596s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 596s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 596s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 596s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 596s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 596s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 596s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 596s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 596s ***** assert (iqr (pd), 1.0890, 1e-4); 596s ***** assert (iqr (t), 0.5928, 1e-4); 596s ***** assert (mean (pd), 1.5486, 1e-4); 596s ***** assert (mean (t), 2.5380, 1e-4); 596s ***** assert (median (pd), 1.4755, 1e-4); 596s ***** assert (median (t), 2.4341, 1e-4); 596s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 596s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 596s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 596s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 596s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 596s ***** assert (any (random (t, 1000, 1) < 2), false); 596s ***** assert (any (random (t, 1000, 1) > 4), false); 596s ***** assert (std (pd), 0.7758, 1e-4); 596s ***** assert (std (t), 0.4294, 1e-4); 596s ***** assert (var (pd), 0.6019, 1e-4); 596s ***** assert (var (t), 0.1844, 1e-4); 596s ***** error ... 596s RicianDistribution(-eps, 1) 596s ***** error ... 596s RicianDistribution(-1, 1) 596s ***** error ... 596s RicianDistribution(Inf, 1) 596s ***** error ... 596s RicianDistribution(i, 1) 596s ***** error ... 596s RicianDistribution("a", 1) 596s ***** error ... 596s RicianDistribution([1, 2], 1) 596s ***** error ... 596s RicianDistribution(NaN, 1) 596s ***** error ... 596s RicianDistribution(1, 0) 596s ***** error ... 596s RicianDistribution(1, -1) 596s ***** error ... 596s RicianDistribution(1, Inf) 596s ***** error ... 596s RicianDistribution(1, i) 596s ***** error ... 596s RicianDistribution(1, "a") 596s ***** error ... 596s RicianDistribution(1, [1, 2]) 596s ***** error ... 596s RicianDistribution(1, NaN) 596s ***** error ... 596s cdf (RicianDistribution, 2, "uper") 596s ***** error ... 596s cdf (RicianDistribution, 2, 3) 596s ***** shared x 596s x = gevrnd (1, 1, 1, [1, 100]); 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha") 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha", 0) 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha", 1) 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha", "") 596s ***** error ... 596s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 597s "parameter", {"s", "sigma", "param"}) 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "parameter", "param") 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "NAME", "value") 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 597s ***** error ... 597s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 597s "NAME", "value") 597s ***** error ... 597s plot (RicianDistribution, "Parent") 597s ***** error ... 597s plot (RicianDistribution, "PlotType", 12) 597s ***** error ... 597s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 597s ***** error ... 597s plot (RicianDistribution, "PlotType", "pdfcdf") 597s ***** error ... 597s plot (RicianDistribution, "Discrete", "pdfcdf") 597s ***** error ... 597s plot (RicianDistribution, "Discrete", [1, 0]) 597s ***** error ... 597s plot (RicianDistribution, "Discrete", {true}) 597s ***** error ... 597s plot (RicianDistribution, "Parent", 12) 597s ***** error ... 597s plot (RicianDistribution, "Parent", "hax") 597s ***** error ... 597s plot (RicianDistribution, "invalidNAME", "pdf") 597s ***** error ... 597s plot (RicianDistribution, "PlotType", "probability") 597s ***** error ... 597s proflik (RicianDistribution, 2) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 3) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), [1, 2]) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), {1}) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, ones (2)) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display") 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display", 1) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 597s ***** error ... 597s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 598s ***** error ... 598s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 598s ***** error ... 598s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 598s ***** error ... 598s truncate (RicianDistribution) 598s ***** error ... 598s truncate (RicianDistribution, 2) 598s ***** error ... 598s truncate (RicianDistribution, 4, 2) 598s ***** shared pd 598s pd = RicianDistribution(1, 1); 598s pd(2) = RicianDistribution(1, 3); 598s ***** error cdf (pd, 1) 598s ***** error icdf (pd, 0.5) 598s ***** error iqr (pd) 598s ***** error mean (pd) 598s ***** error median (pd) 598s ***** error negloglik (pd) 598s ***** error paramci (pd) 598s ***** error pdf (pd, 1) 598s ***** error plot (pd) 598s ***** error proflik (pd, 2) 598s ***** error random (pd) 598s ***** error std (pd) 598s ***** error ... 598s truncate (pd, 2, 4) 598s ***** error var (pd) 598s 97 tests, 97 passed, 0 known failure, 0 skipped 598s [inst/dist_obj/RayleighDistribution.m] 598s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/RayleighDistribution.m 598s ***** shared pd, t 598s pd = RayleighDistribution; 598s t = truncate (pd, 2, 4); 598s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 598s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 598s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 598s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 598s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 598s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 598s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 598s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 598s ***** assert (iqr (pd), 0.9066, 1e-4); 598s ***** assert (iqr (t), 0.4609, 1e-4); 598s ***** assert (mean (pd), 1.2533, 1e-4); 598s ***** assert (mean (t), 2.4169, 1e-4); 598s ***** assert (median (pd), 1.1774, 1e-4); 598s ***** assert (median (t), 2.3198, 1e-4); 598s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 598s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 598s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 598s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 598s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 598s ***** assert (any (random (t, 1000, 1) < 2), false); 598s ***** assert (any (random (t, 1000, 1) > 4), false); 598s ***** assert (std (pd), 0.6551, 1e-4); 598s ***** assert (std (t), 0.3591, 1e-4); 598s ***** assert (var (pd), 0.4292, 1e-4); 598s ***** assert (var (t), 0.1290, 1e-4); 598s ***** error ... 598s RayleighDistribution(0) 598s ***** error ... 598s RayleighDistribution(-1) 598s ***** error ... 598s RayleighDistribution(Inf) 598s ***** error ... 598s RayleighDistribution(i) 598s ***** error ... 598s RayleighDistribution("a") 598s ***** error ... 598s RayleighDistribution([1, 2]) 598s ***** error ... 598s RayleighDistribution(NaN) 598s ***** error ... 598s cdf (RayleighDistribution, 2, "uper") 598s ***** error ... 598s cdf (RayleighDistribution, 2, 3) 598s ***** shared x 598s x = raylrnd (1, [1, 100]); 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 0) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 1) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", "") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 598s "parameter", {"sigma", "param"}) 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "parameter", "param") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "NAME", "value") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 598s ***** error ... 598s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 598s "parameter", "sigma", "NAME", "value") 598s ***** error ... 598s plot (RayleighDistribution, "Parent") 598s ***** error ... 598s plot (RayleighDistribution, "PlotType", 12) 598s ***** error ... 598s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 598s ***** error ... 598s plot (RayleighDistribution, "PlotType", "pdfcdf") 598s ***** error ... 598s plot (RayleighDistribution, "Discrete", "pdfcdf") 598s ***** error ... 598s plot (RayleighDistribution, "Discrete", [1, 0]) 598s ***** error ... 598s plot (RayleighDistribution, "Discrete", {true}) 598s ***** error ... 598s plot (RayleighDistribution, "Parent", 12) 598s ***** error ... 598s plot (RayleighDistribution, "Parent", "hax") 598s ***** error ... 598s plot (RayleighDistribution, "invalidNAME", "pdf") 598s ***** error ... 598s plot (RayleighDistribution, "PlotType", "probability") 598s ***** error ... 598s proflik (RayleighDistribution, 2) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 3) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), [1, 2]) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), {1}) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, ones (2)) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display") 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 598s ***** error ... 598s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 598s ***** error ... 598s truncate (RayleighDistribution) 598s ***** error ... 598s truncate (RayleighDistribution, 2) 598s ***** error ... 598s truncate (RayleighDistribution, 4, 2) 598s ***** shared pd 598s pd = RayleighDistribution(1); 598s pd(2) = RayleighDistribution(3); 598s ***** error cdf (pd, 1) 598s ***** error icdf (pd, 0.5) 598s ***** error iqr (pd) 598s ***** error mean (pd) 598s ***** error median (pd) 598s ***** error negloglik (pd) 598s ***** error paramci (pd) 598s ***** error pdf (pd, 1) 598s ***** error plot (pd) 598s ***** error proflik (pd, 2) 598s ***** error random (pd) 598s ***** error std (pd) 598s ***** error ... 598s truncate (pd, 2, 4) 598s ***** error var (pd) 598s 90 tests, 90 passed, 0 known failure, 0 skipped 598s [inst/dist_obj/NegativeBinomialDistribution.m] 598s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/NegativeBinomialDistribution.m 598s ***** shared pd, t, t_inf 598s pd = NegativeBinomialDistribution (5, 0.5); 598s t = truncate (pd, 2, 4); 598s t_inf = truncate (pd, 2, Inf); 598s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 598s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 598s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 598s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 598s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 598s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 598s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 598s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 598s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 598s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 598s ***** assert (iqr (pd), 4); 598s ***** assert (iqr (t), 2); 598s ***** assert (mean (pd), 5); 598s ***** assert (mean (t), 3.0500, 1e-4); 598s ***** assert (mean (t_inf), 5.5263, 1e-4); 598s ***** assert (median (pd), 4); 598s ***** assert (median (t), 3); 598s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 598s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 598s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 598s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 598s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 598s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 598s ***** assert (any (random (t, 1000, 1) < 2), false); 598s ***** assert (any (random (t, 1000, 1) > 4), false); 598s ***** assert (std (pd), 3.1623, 1e-4); 598s ***** assert (std (t), 0.8047, 1e-4); 598s ***** assert (std (t_inf), 2.9445, 1e-4); 598s ***** assert (var (pd), 10); 598s ***** assert (var (t), 0.6475, 1e-4); 598s ***** assert (var (t_inf), 8.6704, 1e-4); 598s ***** error ... 598s NegativeBinomialDistribution(Inf, 1) 598s ***** error ... 598s NegativeBinomialDistribution(i, 1) 598s ***** error ... 598s NegativeBinomialDistribution("a", 1) 598s ***** error ... 598s NegativeBinomialDistribution([1, 2], 1) 598s ***** error ... 598s NegativeBinomialDistribution(NaN, 1) 598s ***** error ... 598s NegativeBinomialDistribution(1, 0) 598s ***** error ... 598s NegativeBinomialDistribution(1, -1) 598s ***** error ... 598s NegativeBinomialDistribution(1, Inf) 598s ***** error ... 598s NegativeBinomialDistribution(1, i) 598s ***** error ... 598s NegativeBinomialDistribution(1, "a") 598s ***** error ... 598s NegativeBinomialDistribution(1, [1, 2]) 598s ***** error ... 598s NegativeBinomialDistribution(1, NaN) 598s ***** error ... 598s NegativeBinomialDistribution(1, 1.2) 598s ***** error ... 598s cdf (NegativeBinomialDistribution, 2, "uper") 598s ***** error ... 598s cdf (NegativeBinomialDistribution, 2, 3) 598s ***** shared x 598s x = nbinrnd (1, 0.5, [1, 100]); 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 598s "alpha", {0.05}) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), ... 598s "parameter", {"R", "P", "param"}) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 598s "parameter", {"R", "P", "param"}) 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 598s "parameter", "param") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 598s "NAME", "value") 598s ***** error ... 598s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 598s "parameter", "R", "NAME", "value") 598s ***** error ... 598s plot (NegativeBinomialDistribution, "Parent") 598s ***** error ... 598s plot (NegativeBinomialDistribution, "PlotType", 12) 598s ***** error ... 598s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 598s ***** error ... 598s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 598s ***** error ... 598s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 598s ***** error ... 598s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 598s ***** error ... 598s plot (NegativeBinomialDistribution, "Discrete", {true}) 599s ***** error ... 599s plot (NegativeBinomialDistribution, "Parent", 12) 599s ***** error ... 599s plot (NegativeBinomialDistribution, "Parent", "hax") 599s ***** error ... 599s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 599s ***** error ... 599s plot (NegativeBinomialDistribution, "PlotType", "probability") 599s ***** error ... 599s proflik (NegativeBinomialDistribution, 2) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 3) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), {1}) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 599s ***** error ... 599s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 599s ***** error ... 599s truncate (NegativeBinomialDistribution) 599s ***** error ... 599s truncate (NegativeBinomialDistribution, 2) 599s ***** error ... 599s truncate (NegativeBinomialDistribution, 4, 2) 599s ***** shared pd 599s pd = NegativeBinomialDistribution(1, 0.5); 599s pd(2) = NegativeBinomialDistribution(1, 0.6); 599s ***** error cdf (pd, 1) 599s ***** error icdf (pd, 0.5) 599s ***** error iqr (pd) 599s ***** error mean (pd) 599s ***** error median (pd) 599s ***** error negloglik (pd) 599s ***** error paramci (pd) 599s ***** error pdf (pd, 1) 599s ***** error plot (pd) 599s ***** error proflik (pd, 2) 599s ***** error random (pd) 599s ***** error std (pd) 599s ***** error ... 599s truncate (pd, 2, 4) 599s ***** error var (pd) 599s 102 tests, 102 passed, 0 known failure, 0 skipped 599s [inst/dist_obj/LogisticDistribution.m] 599s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/LogisticDistribution.m 599s ***** shared pd, t 599s pd = LogisticDistribution (0, 1); 599s t = truncate (pd, 2, 4); 599s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 599s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 599s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 599s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 599s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 599s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 599s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 599s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 599s ***** assert (iqr (pd), 2.1972, 1e-4); 599s ***** assert (iqr (t), 0.8286, 1e-4); 599s ***** assert (mean (pd), 0, 1e-4); 599s ***** assert (mean (t), 2.7193, 1e-4); 599s ***** assert (median (pd), 0); 599s ***** assert (median (t), 2.6085, 1e-4); 599s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 599s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 599s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 599s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 599s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 599s ***** assert (any (random (t, 1000, 1) < 2), false); 599s ***** assert (any (random (t, 1000, 1) > 4), false); 599s ***** assert (std (pd), 1.8138, 1e-4); 599s ***** assert (std (t), 0.5320, 1e-4); 599s ***** assert (var (pd), 3.2899, 1e-4); 599s ***** assert (var (t), 0.2830, 1e-4); 599s ***** error ... 599s LogisticDistribution(Inf, 1) 599s ***** error ... 599s LogisticDistribution(i, 1) 599s ***** error ... 599s LogisticDistribution("a", 1) 599s ***** error ... 599s LogisticDistribution([1, 2], 1) 599s ***** error ... 599s LogisticDistribution(NaN, 1) 599s ***** error ... 599s LogisticDistribution(1, 0) 599s ***** error ... 599s LogisticDistribution(1, -1) 599s ***** error ... 599s LogisticDistribution(1, Inf) 599s ***** error ... 599s LogisticDistribution(1, i) 599s ***** error ... 599s LogisticDistribution(1, "a") 599s ***** error ... 599s LogisticDistribution(1, [1, 2]) 599s ***** error ... 599s LogisticDistribution(1, NaN) 599s ***** error ... 599s cdf (LogisticDistribution, 2, "uper") 599s ***** error ... 599s cdf (LogisticDistribution, 2, 3) 599s ***** shared x 599s x = logirnd (1, 1, [1, 100]); 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 0) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 1) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", "") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 599s "parameter", {"mu", "sigma", "param"}) 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "parameter", "param") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "NAME", "value") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 599s ***** error ... 599s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 599s "NAME", "value") 599s ***** error ... 599s plot (LogisticDistribution, "Parent") 599s ***** error ... 599s plot (LogisticDistribution, "PlotType", 12) 599s ***** error ... 599s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 599s ***** error ... 599s plot (LogisticDistribution, "PlotType", "pdfcdf") 599s ***** error ... 599s plot (LogisticDistribution, "Discrete", "pdfcdf") 599s ***** error ... 599s plot (LogisticDistribution, "Discrete", [1, 0]) 599s ***** error ... 599s plot (LogisticDistribution, "Discrete", {true}) 599s ***** error ... 599s plot (LogisticDistribution, "Parent", 12) 599s ***** error ... 599s plot (LogisticDistribution, "Parent", "hax") 599s ***** error ... 599s plot (LogisticDistribution, "invalidNAME", "pdf") 599s ***** error ... 599s plot (LogisticDistribution, "PlotType", "probability") 599s ***** error ... 599s proflik (LogisticDistribution, 2) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 3) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), [1, 2]) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), {1}) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 1, ones (2)) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 1, "Display") 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 599s ***** error ... 599s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 600s ***** error ... 600s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 600s ***** error ... 600s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 600s ***** error ... 600s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 600s ***** error ... 600s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 600s ***** error ... 600s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 600s ***** error ... 600s truncate (LogisticDistribution) 600s ***** error ... 600s truncate (LogisticDistribution, 2) 600s ***** error ... 600s truncate (LogisticDistribution, 4, 2) 600s ***** shared pd 600s pd = LogisticDistribution(1, 1); 600s pd(2) = LogisticDistribution(1, 3); 600s ***** error cdf (pd, 1) 600s ***** error icdf (pd, 0.5) 600s ***** error iqr (pd) 600s ***** error mean (pd) 600s ***** error median (pd) 600s ***** error negloglik (pd) 600s ***** error paramci (pd) 600s ***** error pdf (pd, 1) 600s ***** error plot (pd) 600s ***** error proflik (pd, 2) 600s ***** error random (pd) 600s ***** error std (pd) 600s ***** error ... 600s truncate (pd, 2, 4) 600s ***** error var (pd) 600s 95 tests, 95 passed, 0 known failure, 0 skipped 600s [inst/dist_obj/BinomialDistribution.m] 600s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/BinomialDistribution.m 600s ***** shared pd, t, t_inf 600s pd = BinomialDistribution (5, 0.5); 600s t = truncate (pd, 2, 4); 600s t_inf = truncate (pd, 2, Inf); 600s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 600s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 600s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 600s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 600s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 600s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 600s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 600s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 600s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 600s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 600s ***** assert (iqr (pd), 1); 600s ***** assert (iqr (t), 1); 600s ***** assert (mean (pd), 2.5, 1e-10); 600s ***** assert (mean (t), 2.8, 1e-10); 600s ***** assert (mean (t_inf), 2.8846, 1e-4); 600s ***** assert (median (pd), 2.5); 600s ***** assert (median (t), 3); 600s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 600s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 600s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 600s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 600s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 600s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 600s ***** assert (any (random (t, 1000, 1) < 2), false); 600s ***** assert (any (random (t, 1000, 1) > 4), false); 600s ***** assert (std (pd), 1.1180, 1e-4); 600s ***** assert (std (t), 0.7483, 1e-4); 600s ***** assert (std (t_inf), 0.8470, 1e-4); 600s ***** assert (var (pd), 1.2500, 1e-4); 600s ***** assert (var (t), 0.5600, 1e-4); 600s ***** assert (var (t_inf), 0.7175, 1e-4); 600s ***** error ... 600s BinomialDistribution(Inf, 0.5) 600s ***** error ... 600s BinomialDistribution(i, 0.5) 600s ***** error ... 600s BinomialDistribution("a", 0.5) 600s ***** error ... 600s BinomialDistribution([1, 2], 0.5) 600s ***** error ... 600s BinomialDistribution(NaN, 0.5) 600s ***** error ... 600s BinomialDistribution(1, 1.01) 600s ***** error ... 600s BinomialDistribution(1, -0.01) 600s ***** error ... 600s BinomialDistribution(1, Inf) 600s ***** error ... 600s BinomialDistribution(1, i) 600s ***** error ... 600s BinomialDistribution(1, "a") 600s ***** error ... 600s BinomialDistribution(1, [1, 2]) 600s ***** error ... 600s BinomialDistribution(1, NaN) 600s ***** error ... 600s cdf (BinomialDistribution, 2, "uper") 600s ***** error ... 600s cdf (BinomialDistribution, 2, 3) 600s ***** shared x 600s rand ("seed", 2); 600s x = binornd (5, 0.5, [1, 100]); 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 600s "alpha", {0.05}) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), ... 600s "parameter", {"N", "p", "param"}) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 600s "parameter", {"N", "p", "param"}) 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 600s "parameter", "param") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 600s "NAME", "value") 600s ***** error ... 600s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 600s "parameter", "p", "NAME", "value") 600s ***** error ... 600s plot (BinomialDistribution, "Parent") 600s ***** error ... 600s plot (BinomialDistribution, "PlotType", 12) 600s ***** error ... 600s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 600s ***** error ... 600s plot (BinomialDistribution, "PlotType", "pdfcdf") 600s ***** error ... 600s plot (BinomialDistribution, "Discrete", "pdfcdf") 600s ***** error ... 600s plot (BinomialDistribution, "Discrete", [1, 0]) 600s ***** error ... 600s plot (BinomialDistribution, "Discrete", {true}) 600s ***** error ... 600s plot (BinomialDistribution, "Parent", 12) 600s ***** error ... 600s plot (BinomialDistribution, "Parent", "hax") 600s ***** error ... 600s plot (BinomialDistribution, "invalidNAME", "pdf") 600s ***** error ... 600s plot (BinomialDistribution, "PlotType", "probability") 600s ***** error ... 600s proflik (BinomialDistribution, 2) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 3) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), {1}) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 600s ***** error ... 600s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 600s ***** error ... 600s truncate (BinomialDistribution) 600s ***** error ... 600s truncate (BinomialDistribution, 2) 600s ***** error ... 600s truncate (BinomialDistribution, 4, 2) 600s ***** shared pd 600s pd = BinomialDistribution(1, 0.5); 600s pd(2) = BinomialDistribution(1, 0.6); 600s ***** error cdf (pd, 1) 600s ***** error icdf (pd, 0.5) 600s ***** error iqr (pd) 600s ***** error mean (pd) 600s ***** error median (pd) 600s ***** error negloglik (pd) 600s ***** error paramci (pd) 600s ***** error pdf (pd, 1) 600s ***** error plot (pd) 600s ***** error proflik (pd, 2) 600s ***** error random (pd) 600s ***** error std (pd) 600s ***** error ... 600s truncate (pd, 2, 4) 600s ***** error var (pd) 600s 102 tests, 102 passed, 0 known failure, 0 skipped 600s [inst/dist_obj/InverseGaussianDistribution.m] 600s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/InverseGaussianDistribution.m 600s ***** shared pd, t 600s pd = InverseGaussianDistribution (1, 1); 600s t = truncate (pd, 2, 4); 600s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 600s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 600s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 600s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 600s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 600s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 600s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 600s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 600s ***** assert (iqr (pd), 0.8643, 1e-4); 600s ***** assert (iqr (t), 0.8222, 1e-4); 600s ***** assert (mean (pd), 1); 600s ***** assert (mean (t), 2.6953, 1e-4); 600s ***** assert (median (pd), 0.6758, 1e-4); 600s ***** assert (median (t), 2.5716, 1e-4); 600s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 600s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 600s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 600s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 600s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 600s ***** assert (any (random (t, 1000, 1) < 2), false); 600s ***** assert (any (random (t, 1000, 1) > 4), false); 600s ***** assert (std (pd), 1); 600s ***** assert (std (t), 0.5332, 1e-4); 600s ***** assert (var (pd), 1); 600s ***** assert (var (t), 0.2843, 1e-4); 600s ***** error ... 600s InverseGaussianDistribution(0, 1) 600s ***** error ... 600s InverseGaussianDistribution(Inf, 1) 600s ***** error ... 600s InverseGaussianDistribution(i, 1) 600s ***** error ... 600s InverseGaussianDistribution("a", 1) 600s ***** error ... 600s InverseGaussianDistribution([1, 2], 1) 600s ***** error ... 600s InverseGaussianDistribution(NaN, 1) 600s ***** error ... 600s InverseGaussianDistribution(1, 0) 600s ***** error ... 600s InverseGaussianDistribution(1, -1) 600s ***** error ... 600s InverseGaussianDistribution(1, Inf) 600s ***** error ... 600s InverseGaussianDistribution(1, i) 600s ***** error ... 600s InverseGaussianDistribution(1, "a") 600s ***** error ... 600s InverseGaussianDistribution(1, [1, 2]) 600s ***** error ... 600s InverseGaussianDistribution(1, NaN) 600s ***** error ... 600s cdf (InverseGaussianDistribution, 2, "uper") 600s ***** error ... 600s cdf (InverseGaussianDistribution, 2, 3) 600s ***** shared x 600s x = invgrnd (1, 1, [1, 100]); 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 600s "alpha", {0.05}) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), ... 600s "parameter", {"mu", "lambda", "param"}) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 600s "parameter", {"mu", "lambda", "param"}) 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 600s "parameter", "param") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 600s ***** error ... 600s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 600s "parameter", "mu", "NAME", "value") 601s ***** error ... 601s plot (InverseGaussianDistribution, "Parent") 601s ***** error ... 601s plot (InverseGaussianDistribution, "PlotType", 12) 601s ***** error ... 601s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 601s ***** error ... 601s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 601s ***** error ... 601s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 601s ***** error ... 601s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 601s ***** error ... 601s plot (InverseGaussianDistribution, "Discrete", {true}) 601s ***** error ... 601s plot (InverseGaussianDistribution, "Parent", 12) 601s ***** error ... 601s plot (InverseGaussianDistribution, "Parent", "hax") 601s ***** error ... 601s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 601s ***** error ... 601s plot (InverseGaussianDistribution, "PlotType", "probability") 601s ***** error ... 601s proflik (InverseGaussianDistribution, 2) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 3) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), {1}) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 601s ***** error ... 601s truncate (InverseGaussianDistribution) 601s ***** error ... 601s truncate (InverseGaussianDistribution, 2) 601s ***** error ... 601s truncate (InverseGaussianDistribution, 4, 2) 601s ***** shared pd 601s pd = InverseGaussianDistribution(1, 1); 601s pd(2) = InverseGaussianDistribution(1, 3); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 96 tests, 96 passed, 0 known failure, 0 skipped 601s [inst/dist_obj/GammaDistribution.m] 601s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/GammaDistribution.m 601s ***** shared pd, t 601s pd = GammaDistribution (1, 1); 601s t = truncate (pd, 2, 4); 601s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 601s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 601s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 601s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 601s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 601s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 601s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 601s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 601s ***** assert (iqr (pd), 1.0986, 1e-4); 601s ***** assert (iqr (t), 0.8020, 1e-4); 601s ***** assert (mean (pd), 1); 601s ***** assert (mean (t), 2.6870, 1e-4); 601s ***** assert (median (pd), 0.6931, 1e-4); 601s ***** assert (median (t), 2.5662, 1e-4); 601s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 601s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 601s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 601s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 601s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 601s ***** assert (any (random (t, 1000, 1) < 2), false); 601s ***** assert (any (random (t, 1000, 1) > 4), false); 601s ***** assert (std (pd), 1); 601s ***** assert (std (t), 0.5253, 1e-4); 601s ***** assert (var (pd), 1); 601s ***** assert (var (t), 0.2759, 1e-4); 601s ***** error ... 601s GammaDistribution(0, 1) 601s ***** error ... 601s GammaDistribution(Inf, 1) 601s ***** error ... 601s GammaDistribution(i, 1) 601s ***** error ... 601s GammaDistribution("a", 1) 601s ***** error ... 601s GammaDistribution([1, 2], 1) 601s ***** error ... 601s GammaDistribution(NaN, 1) 601s ***** error ... 601s GammaDistribution(1, 0) 601s ***** error ... 601s GammaDistribution(1, -1) 601s ***** error ... 601s GammaDistribution(1, Inf) 601s ***** error ... 601s GammaDistribution(1, i) 601s ***** error ... 601s GammaDistribution(1, "a") 601s ***** error ... 601s GammaDistribution(1, [1, 2]) 601s ***** error ... 601s GammaDistribution(1, NaN) 601s ***** error ... 601s cdf (GammaDistribution, 2, "uper") 601s ***** error ... 601s cdf (GammaDistribution, 2, 3) 601s ***** shared x 601s x = gamrnd (1, 1, [100, 1]); 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 0) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 1) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", "") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 601s "parameter", {"a", "b", "param"}) 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "parameter", "param") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "NAME", "value") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 601s ***** error ... 601s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 601s "NAME", "value") 601s ***** error ... 601s plot (GammaDistribution, "Parent") 601s ***** error ... 601s plot (GammaDistribution, "PlotType", 12) 601s ***** error ... 601s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 601s ***** error ... 601s plot (GammaDistribution, "PlotType", "pdfcdf") 601s ***** error ... 601s plot (GammaDistribution, "Discrete", "pdfcdf") 601s ***** error ... 601s plot (GammaDistribution, "Discrete", [1, 0]) 601s ***** error ... 601s plot (GammaDistribution, "Discrete", {true}) 601s ***** error ... 601s plot (GammaDistribution, "Parent", 12) 601s ***** error ... 601s plot (GammaDistribution, "Parent", "hax") 601s ***** error ... 601s plot (GammaDistribution, "invalidNAME", "pdf") 601s ***** error ... 601s plot (GammaDistribution, "PlotType", "probability") 601s ***** error ... 601s proflik (GammaDistribution, 2) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 3) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), [1, 2]) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), {1}) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, ones (2)) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display") 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display", 1) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 601s ***** error ... 601s truncate (GammaDistribution) 601s ***** error ... 601s truncate (GammaDistribution, 2) 601s ***** error ... 601s truncate (GammaDistribution, 4, 2) 601s ***** shared pd 601s pd = GammaDistribution(1, 1); 601s pd(2) = GammaDistribution(1, 3); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 96 tests, 96 passed, 0 known failure, 0 skipped 601s [inst/dist_obj/PoissonDistribution.m] 601s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/PoissonDistribution.m 601s ***** shared pd, t, t_inf 601s pd = PoissonDistribution; 601s t = truncate (pd, 2, 4); 601s t_inf = truncate (pd, 2, Inf); 601s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 601s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 601s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 601s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 601s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 601s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 601s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 601s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 601s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 601s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 601s ***** assert (iqr (pd), 2); 601s ***** assert (iqr (t), 1); 601s ***** assert (mean (pd), 1); 601s ***** assert (mean (t), 2.3529, 1e-4); 601s ***** assert (mean (t_inf), 2.3922, 1e-4); 601s ***** assert (median (pd), 1); 601s ***** assert (median (t), 2); 601s ***** assert (median (t_inf), 2); 601s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 601s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 601s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 601s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 601s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 601s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 601s ***** assert (any (random (t, 1000, 1) < 2), false); 601s ***** assert (any (random (t, 1000, 1) > 4), false); 601s ***** assert (std (pd), 1); 601s ***** assert (std (t), 0.5882, 1e-4); 601s ***** assert (std (t_inf), 0.6738, 1e-4); 601s ***** assert (var (pd), 1); 601s ***** assert (var (t), 0.3460, 1e-4); 601s ***** assert (var (t_inf), 0.4540, 1e-4); 601s ***** error ... 601s PoissonDistribution(0) 601s ***** error ... 601s PoissonDistribution(-1) 601s ***** error ... 601s PoissonDistribution(Inf) 601s ***** error ... 601s PoissonDistribution(i) 601s ***** error ... 601s PoissonDistribution("a") 601s ***** error ... 601s PoissonDistribution([1, 2]) 601s ***** error ... 601s PoissonDistribution(NaN) 601s ***** error ... 601s cdf (PoissonDistribution, 2, "uper") 601s ***** error ... 601s cdf (PoissonDistribution, 2, 3) 601s ***** shared x 601s x = poissrnd (1, [1, 100]); 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 0) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 1) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", "") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 602s "parameter", {"lambda", "param"}) 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "parameter", "param") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "NAME", "value") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 602s ***** error ... 602s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 602s "parameter", "lambda", "NAME", "value") 602s ***** error ... 602s plot (PoissonDistribution, "Parent") 602s ***** error ... 602s plot (PoissonDistribution, "PlotType", 12) 602s ***** error ... 602s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 602s ***** error ... 602s plot (PoissonDistribution, "PlotType", "pdfcdf") 602s ***** error ... 602s plot (PoissonDistribution, "Discrete", "pdfcdf") 602s ***** error ... 602s plot (PoissonDistribution, "Discrete", [1, 0]) 602s ***** error ... 602s plot (PoissonDistribution, "Discrete", {true}) 602s ***** error ... 602s plot (PoissonDistribution, "Parent", 12) 602s ***** error ... 602s plot (PoissonDistribution, "Parent", "hax") 602s ***** error ... 602s plot (PoissonDistribution, "invalidNAME", "pdf") 602s ***** error ... 602s plot (PoissonDistribution, "PlotType", "probability") 602s ***** error ... 602s proflik (PoissonDistribution, 2) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 3) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), [1, 2]) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), {1}) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, ones (2)) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display") 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 602s ***** error ... 602s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 602s ***** error ... 602s truncate (PoissonDistribution) 602s ***** error ... 602s truncate (PoissonDistribution, 2) 602s ***** error ... 602s truncate (PoissonDistribution, 4, 2) 602s ***** shared pd 602s pd = PoissonDistribution(1); 602s pd(2) = PoissonDistribution(3); 602s ***** error cdf (pd, 1) 602s ***** error icdf (pd, 0.5) 602s ***** error iqr (pd) 602s ***** error mean (pd) 602s ***** error median (pd) 602s ***** error negloglik (pd) 602s ***** error paramci (pd) 602s ***** error pdf (pd, 1) 602s ***** error plot (pd) 602s ***** error proflik (pd, 2) 602s ***** error random (pd) 602s ***** error std (pd) 602s ***** error ... 602s truncate (pd, 2, 4) 602s ***** error var (pd) 602s 97 tests, 97 passed, 0 known failure, 0 skipped 602s [inst/dist_obj/HalfNormalDistribution.m] 602s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/HalfNormalDistribution.m 602s ***** shared pd, t 602s pd = HalfNormalDistribution (0, 1); 602s t = truncate (pd, 2, 4); 602s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 602s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 602s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 602s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 602s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 602s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 602s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 602s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 602s ***** assert (iqr (pd), 0.8317, 1e-4); 602s ***** assert (iqr (t), 0.4111, 1e-4); 602s ***** assert (mean (pd), 0.7979, 1e-4); 602s ***** assert (mean (t), 2.3706, 1e-4); 602s ***** assert (median (pd), 0.6745, 1e-4); 602s ***** assert (median (t), 2.2771, 1e-4); 602s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 602s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 602s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 602s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 602s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 602s ***** assert (any (random (t, 1000, 1) < 2), false); 602s ***** assert (any (random (t, 1000, 1) > 4), false); 602s ***** assert (std (pd), 0.6028, 1e-4); 602s ***** assert (std (t), 0.3310, 1e-4); 602s ***** assert (var (pd), 0.3634, 1e-4); 602s ***** assert (var (t), 0.1096, 1e-4); 602s ***** error ... 602s HalfNormalDistribution(Inf, 1) 602s ***** error ... 602s HalfNormalDistribution(i, 1) 602s ***** error ... 602s HalfNormalDistribution("a", 1) 602s ***** error ... 602s HalfNormalDistribution([1, 2], 1) 602s ***** error ... 602s HalfNormalDistribution(NaN, 1) 602s ***** error ... 602s HalfNormalDistribution(1, 0) 602s ***** error ... 602s HalfNormalDistribution(1, -1) 602s ***** error ... 602s HalfNormalDistribution(1, Inf) 602s ***** error ... 602s HalfNormalDistribution(1, i) 602s ***** error ... 602s HalfNormalDistribution(1, "a") 602s ***** error ... 602s HalfNormalDistribution(1, [1, 2]) 602s ***** error ... 602s HalfNormalDistribution(1, NaN) 602s ***** error ... 602s cdf (HalfNormalDistribution, 2, "uper") 602s ***** error ... 602s cdf (HalfNormalDistribution, 2, 3) 602s ***** shared x 602s x = hnrnd (1, 1, [1, 100]); 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 602s "alpha", {0.05}) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), ... 602s "parameter", {"mu", "sigma", "param"}) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 602s "parameter", {"mu", "sigma", "param"}) 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 602s "parameter", "param") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 602s "NAME", "value") 602s ***** error ... 602s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 602s "parameter", "sigma", "NAME", "value") 602s ***** error ... 602s plot (HalfNormalDistribution, "Parent") 602s ***** error ... 602s plot (HalfNormalDistribution, "PlotType", 12) 602s ***** error ... 602s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 602s ***** error ... 602s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 602s ***** error ... 602s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 602s ***** error ... 602s plot (HalfNormalDistribution, "Discrete", [1, 0]) 602s ***** error ... 602s plot (HalfNormalDistribution, "Discrete", {true}) 602s ***** error ... 602s plot (HalfNormalDistribution, "Parent", 12) 602s ***** error ... 602s plot (HalfNormalDistribution, "Parent", "hax") 602s ***** error ... 602s plot (HalfNormalDistribution, "invalidNAME", "pdf") 602s ***** error ... 602s plot (HalfNormalDistribution, "PlotType", "probability") 602s ***** error ... 602s proflik (HalfNormalDistribution, 2) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 3) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), {1}) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 1) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 602s ***** error ... 602s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 603s ***** error ... 603s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 603s ***** error ... 603s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 603s ***** error ... 603s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 603s ***** error ... 603s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 603s ***** error ... 603s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 603s "Display", "on") 603s ***** error ... 603s truncate (HalfNormalDistribution) 603s ***** error ... 603s truncate (HalfNormalDistribution, 2) 603s ***** error ... 603s truncate (HalfNormalDistribution, 4, 2) 603s ***** shared pd 603s pd = HalfNormalDistribution(1, 1); 603s pd(2) = HalfNormalDistribution(1, 3); 603s ***** error cdf (pd, 1) 603s ***** error icdf (pd, 0.5) 603s ***** error iqr (pd) 603s ***** error mean (pd) 603s ***** error median (pd) 603s ***** error negloglik (pd) 603s ***** error paramci (pd) 603s ***** error pdf (pd, 1) 603s ***** error plot (pd) 603s ***** error proflik (pd, 2) 603s ***** error random (pd) 603s ***** error std (pd) 603s ***** error ... 603s truncate (pd, 2, 4) 603s ***** error var (pd) 603s 96 tests, 96 passed, 0 known failure, 0 skipped 603s [inst/dist_obj/GeneralizedParetoDistribution.m] 603s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/GeneralizedParetoDistribution.m 603s ***** shared pd, t 603s pd = GeneralizedParetoDistribution (1, 1, 1); 603s t = truncate (pd, 2, 4); 603s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 603s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 603s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 603s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 603s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 603s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 603s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 603s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 603s ***** assert (iqr (pd), 2.6667, 1e-4); 603s ***** assert (iqr (t), 0.9143, 1e-4); 603s ***** assert (mean (pd), Inf); 603s ***** assert (mean (t), 2.7726, 1e-4); 603s ***** assert (median (pd), 2); 603s ***** assert (median (t), 2.6667, 1e-4); 603s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 603s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 603s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 603s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 603s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 603s ***** assert (any (random (t, 1000, 1) < 2), false); 603s ***** assert (any (random (t, 1000, 1) > 4), false); 603s ***** assert (std (pd), Inf); 603s ***** assert (std (t), 0.5592, 1e-4); 603s ***** assert (var (pd), Inf); 603s ***** assert (var (t), 0.3128, 1e-4); 603s ***** error ... 603s GeneralizedParetoDistribution(Inf, 1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(i, 1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution("a", 1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution([1, 2], 1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(NaN, 1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, 0, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, -1, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, Inf, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, i, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, "a", 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, [1, 2], 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, NaN, 1) 603s ***** error ... 603s GeneralizedParetoDistribution(1, 1, Inf) 603s ***** error ... 603s GeneralizedParetoDistribution(1, 1, i) 603s ***** error ... 603s GeneralizedParetoDistribution(1, 1, "a") 603s ***** error ... 603s GeneralizedParetoDistribution(1, 1, [1, 2]) 603s ***** error ... 603s GeneralizedParetoDistribution(1, 1, NaN) 603s ***** error ... 603s cdf (GeneralizedParetoDistribution, 2, "uper") 603s ***** error ... 603s cdf (GeneralizedParetoDistribution, 2, 3) 603s ***** shared x 603s x = gprnd (1, 1, 1, [1, 100]); 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 603s "parameter", "sigma", "alpha", {0.05}) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 603s "parameter", {"k", "sigma", "param"}) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 603s "parameter", {"k", "sigma", "param"}) 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 603s "parameter", "param") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 603s "NAME", "value") 603s ***** error ... 603s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 603s "parameter", "sigma", "NAME", "value") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Parent") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "PlotType", 12) 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Discrete", {true}) 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Parent", 12) 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "Parent", "hax") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 603s ***** error ... 603s plot (GeneralizedParetoDistribution, "PlotType", "probability") 603s ***** error ... 603s proflik (GeneralizedParetoDistribution, 2) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 603s "Display", ["on"; "on"]) 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 603s ***** error ... 603s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 603s "Display", "on") 603s ***** error ... 603s truncate (GeneralizedParetoDistribution) 603s ***** error ... 603s truncate (GeneralizedParetoDistribution, 2) 603s ***** error ... 603s truncate (GeneralizedParetoDistribution, 4, 2) 603s ***** shared pd 603s pd = GeneralizedParetoDistribution(1, 1, 1); 603s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 603s ***** error cdf (pd, 1) 603s ***** error icdf (pd, 0.5) 603s ***** error iqr (pd) 603s ***** error mean (pd) 603s ***** error median (pd) 603s ***** error negloglik (pd) 603s ***** error paramci (pd) 603s ***** error pdf (pd, 1) 603s ***** error plot (pd) 603s ***** error proflik (pd, 2) 603s ***** error random (pd) 603s ***** error std (pd) 603s ***** error ... 603s truncate (pd, 2, 4) 603s ***** error var (pd) 603s 100 tests, 100 passed, 0 known failure, 0 skipped 603s [inst/dist_obj/tLocationScaleDistribution.m] 603s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/tLocationScaleDistribution.m 603s ***** shared pd, t 603s pd = tLocationScaleDistribution; 603s t = truncate (pd, 2, 4); 603s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 603s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 603s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 603s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 603s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 603s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 603s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 603s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 603s ***** assert (iqr (pd), 1.4534, 1e-4); 603s ***** assert (iqr (t), 0.7139, 1e-4); 603s ***** assert (mean (pd), 0, eps); 603s ***** assert (mean (t), 2.6099, 1e-4); 603s ***** assert (median (pd), 0, eps); 603s ***** assert (median (t), 2.4758, 1e-4); 603s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 603s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 603s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 603s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 603s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 603s ***** assert (any (random (t, 1000, 1) < 2), false); 603s ***** assert (any (random (t, 1000, 1) > 4), false); 603s ***** assert (std (pd), 1.2910, 1e-4); 603s ***** assert (std (t), 0.4989, 1e-4); 603s ***** assert (var (pd), 1.6667, 1e-4); 603s ***** assert (var (t), 0.2489, 1e-4); 603s ***** error ... 603s tLocationScaleDistribution(i, 1, 1) 603s ***** error ... 603s tLocationScaleDistribution(Inf, 1, 1) 603s ***** error ... 603s tLocationScaleDistribution([1, 2], 1, 1) 603s ***** error ... 603s tLocationScaleDistribution("a", 1, 1) 603s ***** error ... 603s tLocationScaleDistribution(NaN, 1, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, 0, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, -1, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, Inf, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, i, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, "a", 1) 603s ***** error ... 603s tLocationScaleDistribution(0, [1, 2], 1) 603s ***** error ... 603s tLocationScaleDistribution(0, NaN, 1) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, 0) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, -1) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, Inf) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, i) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, "a") 603s ***** error ... 603s tLocationScaleDistribution(0, 1, [1, 2]) 603s ***** error ... 603s tLocationScaleDistribution(0, 1, NaN) 603s ***** error ... 603s cdf (tLocationScaleDistribution, 2, "uper") 603s ***** error ... 603s cdf (tLocationScaleDistribution, 2, 3) 603s ***** shared x 603s x = tlsrnd (0, 1, 1, [1, 100]); 603s ***** error ... 603s paramci (tLocationScaleDistribution.fit (x), "alpha") 603s ***** error ... 603s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 604s "alpha", {0.05}) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), ... 604s "parameter", {"mu", "sigma", "nu", "param"}) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 604s "parameter", {"mu", "sigma", "nu", "param"}) 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 604s "parameter", "param") 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 604s ***** error ... 604s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 604s "parameter", "mu", "NAME", "value") 605s ***** error ... 605s plot (tLocationScaleDistribution, "Parent") 605s ***** error ... 605s plot (tLocationScaleDistribution, "PlotType", 12) 605s ***** error ... 605s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 605s ***** error ... 605s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 605s ***** error ... 605s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 605s ***** error ... 605s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 605s ***** error ... 605s plot (tLocationScaleDistribution, "Discrete", {true}) 605s ***** error ... 605s plot (tLocationScaleDistribution, "Parent", 12) 605s ***** error ... 605s plot (tLocationScaleDistribution, "Parent", "hax") 605s ***** error ... 605s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 605s ***** error ... 605s plot (tLocationScaleDistribution, "PlotType", "probability") 605s ***** error ... 605s proflik (tLocationScaleDistribution, 2) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 4) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), {1}) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 605s ***** error ... 605s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 606s ***** error ... 606s truncate (tLocationScaleDistribution) 606s ***** error ... 606s truncate (tLocationScaleDistribution, 2) 606s ***** error ... 606s truncate (tLocationScaleDistribution, 4, 2) 606s ***** shared pd 606s pd = tLocationScaleDistribution (0, 1, 1); 606s pd(2) = tLocationScaleDistribution (0, 1, 3); 606s ***** error cdf (pd, 1) 606s ***** error icdf (pd, 0.5) 606s ***** error iqr (pd) 606s ***** error mean (pd) 606s ***** error median (pd) 606s ***** error negloglik (pd) 606s ***** error paramci (pd) 606s ***** error pdf (pd, 1) 606s ***** error plot (pd) 606s ***** error proflik (pd, 2) 606s ***** error random (pd) 606s ***** error std (pd) 606s ***** error ... 606s truncate (pd, 2, 4) 606s ***** error var (pd) 606s 102 tests, 102 passed, 0 known failure, 0 skipped 606s [inst/dist_obj/ExponentialDistribution.m] 606s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/ExponentialDistribution.m 606s ***** shared pd, t 606s pd = ExponentialDistribution (1); 606s t = truncate (pd, 2, 4); 606s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 606s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 606s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 606s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 606s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 606s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 606s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 606s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 606s ***** assert (iqr (pd), 1.0986, 1e-4); 606s ***** assert (iqr (t), 0.8020, 1e-4); 606s ***** assert (mean (pd), 1); 606s ***** assert (mean (t), 2.6870, 1e-4); 606s ***** assert (median (pd), 0.6931, 1e-4); 606s ***** assert (median (t), 2.5662, 1e-4); 606s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 606s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 606s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 606s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 606s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 606s ***** assert (any (random (t, 1000, 1) < 2), false); 606s ***** assert (any (random (t, 1000, 1) > 4), false); 606s ***** assert (std (pd), 1); 606s ***** assert (std (t), 0.5253, 1e-4); 606s ***** assert (var (pd), 1); 606s ***** assert (var (t), 0.2759, 1e-4); 606s ***** error ... 606s ExponentialDistribution(0) 606s ***** error ... 606s ExponentialDistribution(-1) 606s ***** error ... 606s ExponentialDistribution(Inf) 606s ***** error ... 606s ExponentialDistribution(i) 606s ***** error ... 606s ExponentialDistribution("a") 606s ***** error ... 606s ExponentialDistribution([1, 2]) 606s ***** error ... 606s ExponentialDistribution(NaN) 606s ***** error ... 606s cdf (ExponentialDistribution, 2, "uper") 606s ***** error ... 606s cdf (ExponentialDistribution, 2, 3) 606s ***** shared x 606s x = exprnd (1, [100, 1]); 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 0) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 1) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", "") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 606s "alpha", {0.05}) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 606s "parameter", {"mu", "param"}) 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "parameter", "param") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "NAME", "value") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 606s ***** error ... 606s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 606s "parameter", "mu", "NAME", "value") 606s ***** error ... 606s plot (ExponentialDistribution, "Parent") 606s ***** error ... 606s plot (ExponentialDistribution, "PlotType", 12) 606s ***** error ... 606s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 606s ***** error ... 606s plot (ExponentialDistribution, "PlotType", "pdfcdf") 606s ***** error ... 606s plot (ExponentialDistribution, "Discrete", "pdfcdf") 606s ***** error ... 606s plot (ExponentialDistribution, "Discrete", [1, 0]) 606s ***** error ... 606s plot (ExponentialDistribution, "Discrete", {true}) 606s ***** error ... 606s plot (ExponentialDistribution, "Parent", 12) 606s ***** error ... 606s plot (ExponentialDistribution, "Parent", "hax") 606s ***** error ... 606s plot (ExponentialDistribution, "invalidNAME", "pdf") 606s ***** error ... 606s plot (ExponentialDistribution, "PlotType", "probability") 606s ***** error ... 606s proflik (ExponentialDistribution, 2) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 3) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), [1, 2]) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), {1}) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display") 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 606s ***** error ... 606s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 606s ***** error ... 606s truncate (ExponentialDistribution) 606s ***** error ... 606s truncate (ExponentialDistribution, 2) 606s ***** error ... 606s truncate (ExponentialDistribution, 4, 2) 606s ***** shared pd 606s pd = ExponentialDistribution(1); 606s pd(2) = ExponentialDistribution(3); 606s ***** error cdf (pd, 1) 606s ***** error icdf (pd, 0.5) 606s ***** error iqr (pd) 606s ***** error mean (pd) 606s ***** error median (pd) 606s ***** error negloglik (pd) 606s ***** error paramci (pd) 606s ***** error pdf (pd, 1) 606s ***** error plot (pd) 606s ***** error proflik (pd, 2) 606s ***** error random (pd) 606s ***** error std (pd) 606s ***** error ... 606s truncate (pd, 2, 4) 606s ***** error var (pd) 606s 90 tests, 90 passed, 0 known failure, 0 skipped 606s [inst/dist_obj/BirnbaumSaundersDistribution.m] 606s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/dist_obj/BirnbaumSaundersDistribution.m 606s ***** demo 606s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 606s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 606s ## distribution to this data and plot a PDF of the fitted distribution 606s ## superimposed on a histogram of the data 606s 606s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 606s randg ("seed", 21); 606s data = random (pd, 5000, 1); 606s pd = fitdist (data, "BirnbaumSaunders") 606s plot (pd) 606s msg = "Fitted Birnbaum-Saunders distribution with a = %0.2f and b = %0.2f"; 606s title (sprintf (msg, pd.beta, pd.gamma)) 606s ***** demo 606s ## Plot the PDF of a Birnbaum-Saunders distribution, with parameters beta = 1 606s ## and gamma = 0.5, truncated at [0, 2] intervals. Generate 10000 random 606s ## samples from this truncated distribution and superimpose a histogram with 606s ## 100 bins scaled accordingly 606s 606s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 606s t = truncate (pd, 0, 2) 606s randg ("seed", 21); 606s data = random (t, 10000, 1); 606s plot (t) 606s title ("Birnbaum-Saunders distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 606s hold on 606s hist (data, 100, 50) 606s hold off 606s ***** demo 606s ## Generate a data set of 100 random samples from a Birnbaum-Saunders 606s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 606s ## distribution to this data and plot its CDF superimposed over an empirical 606s ## CDF of the data 606s 606s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 606s randg ("seed", 21); 606s data = random (pd, 100, 1); 606s pd = fitdist (data, "BirnbaumSaunders") 606s plot (pd, "plottype", "cdf") 606s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 606s pd.beta, pd.gamma)) 606s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 606s ***** shared pd, t 606s pd = BirnbaumSaundersDistribution; 606s t = truncate (pd, 2, 4); 606s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 606s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 606s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 606s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 606s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 606s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 606s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 606s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 606s ***** assert (iqr (pd), 1.4236, 1e-4); 606s ***** assert (iqr (t), 0.8968, 1e-4); 606s ***** assert (mean (pd), 1.5, eps); 606s ***** assert (mean (t), 2.7723, 1e-4); 606s ***** assert (median (pd), 1, 1e-4); 606s ***** assert (median (t), 2.6711, 1e-4); 606s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 606s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 606s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 606s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 606s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 606s ***** assert (any (random (t, 1000, 1) < 2), false); 606s ***** assert (any (random (t, 1000, 1) > 4), false); 606s ***** assert (std (pd), 1.5, eps); 606s ***** assert (std (t), 0.5528, 1e-4); 606s ***** assert (var (pd), 2.25, eps); 606s ***** assert (var (t), 0.3056, 1e-4); 606s ***** error ... 606s BirnbaumSaundersDistribution(0, 1) 606s ***** error ... 606s BirnbaumSaundersDistribution(Inf, 1) 606s ***** error ... 606s BirnbaumSaundersDistribution(i, 1) 606s ***** error ... 606s BirnbaumSaundersDistribution("beta", 1) 606s ***** error ... 606s BirnbaumSaundersDistribution([1, 2], 1) 606s ***** error ... 606s BirnbaumSaundersDistribution(NaN, 1) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, 0) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, -1) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, Inf) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, i) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, "beta") 606s ***** error ... 606s BirnbaumSaundersDistribution(1, [1, 2]) 606s ***** error ... 606s BirnbaumSaundersDistribution(1, NaN) 606s ***** error ... 606s cdf (BirnbaumSaundersDistribution, 2, "uper") 606s ***** error ... 606s cdf (BirnbaumSaundersDistribution, 2, 3) 606s ***** shared x 606s rand ("seed", 5); 606s x = bisarnd (1, 1, [100, 1]); 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 606s "beta", "alpha", {0.05}) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), ... 606s "parameter", {"beta", "gamma", "param"}) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 606s "parameter", {"beta", "gamma", "param"}) 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 606s ***** error ... 606s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 606s "parameter", "param") 607s ***** error ... 607s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 607s ***** error ... 607s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 607s "NAME", "value") 607s ***** error ... 607s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 607s "parameter", "beta", "NAME", "value") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Parent") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "PlotType", 12) 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Parent", 12) 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "Parent", "hax") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 607s ***** error ... 607s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution, 2) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 3) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 607s ***** error ... 607s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 607s ***** error ... 607s truncate (BirnbaumSaundersDistribution) 607s ***** error ... 607s truncate (BirnbaumSaundersDistribution, 2) 607s ***** error ... 607s truncate (BirnbaumSaundersDistribution, 4, 2) 607s ***** shared pd 607s pd = BirnbaumSaundersDistribution(1, 1); 607s pd(2) = BirnbaumSaundersDistribution(1, 3); 607s ***** error cdf (pd, 1) 607s ***** error icdf (pd, 0.5) 607s ***** error iqr (pd) 607s ***** error mean (pd) 607s ***** error median (pd) 607s ***** error negloglik (pd) 607s ***** error paramci (pd) 607s ***** error pdf (pd, 1) 607s ***** error plot (pd) 607s ***** error proflik (pd, 2) 607s ***** error random (pd) 607s ***** error std (pd) 607s ***** error ... 607s truncate (pd, 2, 4) 607s ***** error var (pd) 607s 96 tests, 96 passed, 0 known failure, 0 skipped 607s [inst/clusterdata.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/clusterdata.m 607s ***** demo 607s randn ("seed", 1) # for reproducibility 607s r1 = randn (10, 2) * 0.25 + 1; 607s randn ("seed", 5) # for reproducibility 607s r2 = randn (20, 2) * 0.5 - 1; 607s X = [r1; r2]; 607s 607s wnl = warning ("off", "Octave:linkage_savemem", "local"); 607s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 607s scatter (X(:,1), X(:,2), 36, T, "filled"); 607s ***** error ... 607s clusterdata () 607s ***** error ... 607s clusterdata (1) 607s ***** error clusterdata ([1 1], "Bogus", 1) 607s ***** error clusterdata ([1 1], "Depth", 1) 607s 4 tests, 4 passed, 0 known failure, 0 skipped 607s [inst/rmmissing.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/rmmissing.m 607s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 607s ***** assert (rmmissing ('abcd f'), 'abcdf') 607s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 607s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 607s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 607s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 607s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 607s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 607s ***** test 607s x = [1:6]; 607s x([2,4]) = NaN; 607s [~, idx] = rmmissing (x); 607s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 607s assert (class(idx), 'logical'); 607s x = reshape (x, [2, 3]); 607s [~, idx] = rmmissing (x); 607s assert (idx, logical ([0; 1])); 607s assert (class(idx), 'logical'); 607s [~, idx] = rmmissing (x, 2); 607s assert (idx, logical ([1, 1, 0])); 607s assert (class(idx), 'logical'); 607s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 607s assert (idx, logical ([0; 1])); 607s assert (class(idx), 'logical'); 607s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 607s assert (idx, logical ([0, 0, 0])); 607s assert (class(idx), 'logical'); 607s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 607s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 607s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 607s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 607s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 607s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 607s ***** assert (rmmissing ([]), []) 607s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 607s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 607s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 607s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 607s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 607s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 607s ***** error rmmissing (ones (0,1,2)) 607s ***** error rmmissing () 607s ***** error rmmissing (ones(2,2,2)) 607s ***** error rmmissing ([1 2; 3 4], 5) 607s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 607s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 607s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 607s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 607s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 607s 31 tests, 31 passed, 0 known failure, 0 skipped 607s [inst/glmval.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/glmval.m 607s ***** demo 607s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 607s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 607s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 607s b = glmfit (x, [y n], "binomial", "Link", "probit"); 607s yfit = glmval (b, x, "probit", "Size", n); 607s plot (x, y./n, 'o', x, yfit ./ n, '-') 607s ***** error glmval () 607s ***** error glmval (1) 607s ***** error glmval (1, 2) 607s ***** error ... 607s glmval ("asd", [1; 1; 1], 'probit') 607s ***** error ... 607s glmval ([], [1; 1; 1], 'probit') 607s ***** error ... 607s glmval ([0.1; 0.3; 0.4], [], 'probit') 607s ***** error ... 607s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {'log'}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), NaN) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), [1, 2]) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), [1i]) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), true) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 607s ***** error ... 607s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 607s ***** error ... 607s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 607s ***** error ... 607s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 607s 57 tests, 57 passed, 0 known failure, 0 skipped 607s [inst/kstest.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/kstest.m 607s ***** demo 607s ## Use the stock return data set to test the null hypothesis that the data 607s ## come from a standard normal distribution against the alternative 607s ## hypothesis that the population CDF of the data is larger that the 607s ## standard normal CDF. 607s 607s load stockreturns; 607s x = stocks(:,2); 607s [h, p, k, c] = kstest (x, "Tail", "larger") 607s 607s ## Compute the empirical CDF and plot against the standard normal CDF 607s [f, x_values] = ecdf (x); 607s h1 = plot (x_values, f); 607s hold on; 607s h2 = plot (x_values, normcdf (x_values), 'r--'); 607s set (h1, "LineWidth", 2); 607s set (h2, "LineWidth", 2); 607s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 607s "Location", "southeast"); 607s title ("Empirical CDF of stock return data against standard normal CDF") 607s ***** error kstest () 607s ***** error kstest (ones (2, 4)) 607s ***** error kstest ([2, 3, 5, 3+3i]) 607s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "tail") 607s ***** error ... 607s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "tail", 0) 607s ***** error ... 607s kstest ([2,3,4,5,6], "tail", "whatever") 607s ***** error ... 607s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 607s ***** error ... 607s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 607s ***** error ... 607s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 607s ***** error ... 607s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 607s ***** test 607s load examgrades 607s [h, p] = kstest (grades(:,1)); 607s assert (h, true); 607s assert (p, 7.58603305206105e-107, 1e-14); 607s ***** test 607s load examgrades 607s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 607s assert (h, false); 607s assert (p, 0.5612, 1e-4); 607s ***** test 607s load examgrades 607s x = grades(:,1); 607s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 607s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 607s assert (h, true); 607s assert (p, 0.0021, 1e-4); 607s ***** test 607s load stockreturns 607s x = stocks(:,3); 607s [h,p,k,c] = kstest (x, "Tail", "larger"); 607s assert (h, true); 607s assert (p, 5.085438806199252e-05, 1e-14); 607s assert (k, 0.2197, 1e-4); 607s assert (c, 0.1207, 1e-4); 607s 21 tests, 21 passed, 0 known failure, 0 skipped 607s [inst/@cvpartition/set.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/set.m 607s ***** shared C 607s C = cvpartition (ones (10, 1), "KFold", 5); 607s ***** test 607s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 607s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 607s ***** error set (C) 607s ***** error set (C, "NumObservations") 607s ***** error set (C, "some", 15) 607s ***** error set (C, 15, 15) 607s 5 tests, 5 passed, 0 known failure, 0 skipped 607s [inst/@cvpartition/training.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/training.m 607s ***** shared C 607s C = cvpartition (ones (10, 1), "KFold", 5); 607s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 607s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 607s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 607s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 607s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 607s ***** test 607s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 607s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 607s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 607s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 607s 9 tests, 9 passed, 0 known failure, 0 skipped 607s [inst/@cvpartition/get.m] 607s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/get.m 607s ***** shared C 607s C = cvpartition (ones (10, 1), "KFold", 5); 607s ***** assert (get (C, "NumObservations"), 10); 607s ***** assert (get (C, "NumTestSets"), 5); 607s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 607s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 607s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 607s ***** assert (get (C, "Type"), "kfold"); 607s ***** error get (C, "some") 607s ***** error get (C, 25) 607s ***** error get (C, {25}) 607s 9 tests, 9 passed, 0 known failure, 0 skipped 607s [inst/@cvpartition/repartition.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/repartition.m 608s ***** test 608s C = cvpartition (ones (10, 1), "KFold", 5); 608s Cnew = repartition (C); 608s assert (isa (Cnew, "cvpartition"), true); 608s ***** test 608s C = cvpartition (ones (100, 1), "HoldOut", 5); 608s Cnew = repartition (C); 608s indC = get (C, "inds"); 608s indCnew = get (Cnew, "inds"); 608s assert (isequal (indC, indCnew), false); 608s 2 tests, 2 passed, 0 known failure, 0 skipped 608s [inst/@cvpartition/cvpartition.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/cvpartition.m 608s ***** demo 608s ## Partition with Fisher iris dataset (n = 150) 608s ## Stratified by species 608s load fisheriris 608s y = species; 608s ## 10-fold cross-validation partition 608s c = cvpartition (species, 'KFold', 10) 608s ## leave-10-out partition 608s c1 = cvpartition (species, 'HoldOut', 10) 608s idx1 = test (c, 2); 608s idx2 = training (c, 2); 608s ## another leave-10-out partition 608s c2 = repartition (c1) 608s ***** test 608s C = cvpartition (ones (10, 1)); 608s assert (isa (C, "cvpartition"), true); 608s ***** test 608s C = cvpartition (ones (10, 1), "KFold", 5); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 5); 608s assert (get (C, "TrainSize"), ones(5,1) * 8); 608s assert (get (C, "TestSize"), ones (5,1) * 2); 608s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 608s assert (get (C, "Type"), "kfold"); 608s ***** test 608s C = cvpartition (ones (10, 1), "KFold", 2); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 2); 608s assert (get (C, "TrainSize"), [5; 5]); 608s assert (get (C, "TestSize"), [5; 5]); 608s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 608s assert (get (C, "Type"), "kfold"); 608s ***** test 608s C = cvpartition (ones (10, 1), "HoldOut", 5); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 1); 608s assert (get (C, "TrainSize"), 5); 608s assert (get (C, "TestSize"), 5); 608s assert (class (get (C, "inds")), "logical"); 608s assert (length (get (C, "inds")), 10); 608s assert (get (C, "Type"), "holdout"); 608s ***** test 608s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 10); 608s assert (get (C, "TrainSize"), ones (10, 1)); 608s assert (get (C, "TestSize"), ones (10, 1) * 9); 608s assert (get (C, "inds"), []); 608s assert (get (C, "Type"), "leaveout"); 608s ***** test 608s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 1); 608s assert (get (C, "TrainSize"), 10); 608s assert (get (C, "TestSize"), 10); 608s assert (get (C, "inds"), []); 608s assert (get (C, "Type"), "resubstitution"); 608s ***** test 608s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 608s assert (get (C, "NumObservations"), 10); 608s assert (get (C, "NumTestSets"), 10); 608s assert (get (C, "TrainSize"), ones (10, 1) * 9); 608s assert (get (C, "TestSize"), ones (10, 1)); 608s assert (get (C, "inds"), [1:10]'); 608s assert (get (C, "Type"), "given"); 608s ***** warning ... 608s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 608s 8 tests, 8 passed, 0 known failure, 0 skipped 608s [inst/@cvpartition/test.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/test.m 608s ***** shared C 608s C = cvpartition (ones (10, 1), "KFold", 5); 608s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 608s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 608s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 608s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 608s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 608s ***** test 608s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 608s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 608s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 608s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 608s 9 tests, 9 passed, 0 known failure, 0 skipped 608s [inst/@cvpartition/display.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/@cvpartition/display.m 608s ***** test 608s C = cvpartition (ones (10, 1), "KFold", 5); 608s s = evalc ("display (C)"); 608s sout = "K-fold cross validation partition"; 608s assert (strcmpi (s(1:length (sout)), sout), true); 608s ***** test 608s C = cvpartition (ones (10, 1), "HoldOut", 5); 608s s = evalc ("display (C)"); 608s sout = "HoldOut cross validation partition"; 608s assert (strcmpi (s(1:length (sout)), sout), true); 608s ***** test 608s C = cvpartition (ones (10, 1), "LeaveOut", 5); 608s s = evalc ("display (C)"); 608s sout = "Leave-One-Out cross validation partition"; 608s assert (strcmpi (s(1:length (sout)), sout), true); 608s ***** test 608s C = cvpartition (ones (10, 1), "resubstitution", 5); 608s s = evalc ("display (C)"); 608s sout = "Resubstitution cross validation partition"; 608s assert (strcmpi (s(1:length (sout)), sout), true); 608s ***** test 608s C = cvpartition (ones (10, 1), "Given", 5); 608s s = evalc ("display (C)"); 608s sout = "Given cross validation partition"; 608s assert (strcmpi (s(1:length (sout)), sout), true); 608s ***** error display () 608s 6 tests, 6 passed, 0 known failure, 0 skipped 608s [inst/jackknife.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/jackknife.m 608s ***** demo 608s for k = 1:1000 608s rand ("seed", k); # for reproducibility 608s x = rand (10, 1); 608s s(k) = std (x); 608s jackstat = jackknife (@std, x); 608s j(k) = 10 * std (x) - 9 * mean (jackstat); 608s endfor 608s figure(); 608s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 608s ***** demo 608s for k = 1:1000 608s randn ("seed", k); # for reproducibility 608s x = randn (1, 50); 608s rand ("seed", k); # for reproducibility 608s y = rand (1, 50); 608s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 608s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 608s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 608s endfor 608s t = (j - sqrt (1 / 12)) ./ sqrt (v); 608s figure(); 608s plot (sort (tcdf (t, 49)), ... 608s "-;Almost linear mapping indicates good fit with t-distribution.;") 608s ***** test 608s ##Example from Quenouille, Table 1 608s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 608s jackstat = jackknife ( @(x) 1/mean(x), d ); 608s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 608s 1 test, 1 passed, 0 known failure, 0 skipped 608s [inst/Regression/RegressionGAM.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/Regression/RegressionGAM.m 608s ***** demo 608s ## Train a RegressionGAM Model for synthetic values 608s f1 = @(x) cos (3 * x); 608s f2 = @(x) x .^ 3; 608s x1 = 2 * rand (50, 1) - 1; 608s x2 = 2 * rand (50, 1) - 1; 608s y = f1(x1) + f2(x2); 608s y = y + y .* 0.2 .* rand (50,1); 608s X = [x1, x2]; 608s a = fitrgam (X, y, "tol", 1e-3) 608s ***** demo 608s ## Declare two different functions 608s f1 = @(x) cos (3 * x); 608s f2 = @(x) x .^ 3; 608s 608s ## Generate 80 samples for f1 and f2 608s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 608s X1 = f1 (x); 608s X2 = f2 (x); 608s 608s ## Create a synthetic response by adding noise 608s rand ("seed", 3); 608s Ytrue = X1 + X2; 608s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 608s 608s ## Assemble predictor data 608s X = [X1, X2]; 608s 608s ## Train the GAM and test on the same data 608s a = fitrgam (X, Y, "order", [5, 5]); 608s [ypred, ySDsd, yInt] = predict (a, X); 608s 608s ## Plot the results 608s figure 608s [sortedY, indY] = sort (Ytrue); 608s plot (sortedY, "r-"); 608s xlim ([0, 80]); 608s hold on 608s plot (ypred(indY), "g+") 608s plot (yInt(indY,1), "k:") 608s plot (yInt(indY,2), "k:") 608s xlabel ("Predictor samples"); 608s ylabel ("Response"); 608s title ("actual vs predicted values for function f1(x) = cos (3x) "); 608s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 608s 608s ## Use 30% Holdout partitioning for training and testing data 608s C = cvpartition (80, "HoldOut", 0.3); 608s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 608s 608s ## Plot the results 608s figure 608s [sortedY, indY] = sort (Ytrue(test(C))); 608s plot (sortedY, 'r-'); 608s xlim ([0, sum(test(C))]); 608s hold on 608s plot (ypred(indY), "g+") 608s plot (yInt(indY,1),'k:') 608s plot (yInt(indY,2),'k:') 608s xlabel ("Predictor samples"); 608s ylabel ("Response"); 608s title ("actual vs predicted values for function f1(x) = cos (3x) "); 608s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 608s ***** test 608s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 608s y = [1; 2; 3; 4]; 608s a = RegressionGAM (x, y); 608s assert ({a.X, a.Y}, {x, y}) 608s assert ({a.BaseModel.Intercept}, {2.5000}) 608s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 608s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 608s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 608s assert ({a.Formula}, {[]}) 608s ***** test 608s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 608s y = [1; 2; 3; 4]; 608s pnames = {"A", "B", "C", "D"}; 608s formula = "Y ~ A + B + C + D + A:C"; 608s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 608s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 608s assert ({a.IntMatrix}, {intMat}) 608s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 608s assert ({a.Formula}, {formula}) 608s ***** error RegressionGAM () 608s ***** error RegressionGAM (ones(10,2)) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (5,1)) 608s ***** error ... 608s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 608s ***** error 608s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 608s ***** error 608s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 608s ***** error ... 608s predict (RegressionGAM (ones(10,1), ones(10,1))) 608s ***** error ... 608s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 608s 39 tests, 39 passed, 0 known failure, 0 skipped 608s [inst/fillmissing.m] 608s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fillmissing.m 608s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 608s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 608s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 608s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 608s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 608s ***** test 608s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 608s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 608s assert (fillmissing (x, "constant", 99), y); 608s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 608s assert (fillmissing (x, "constant", [94:99]), y); 608s assert (fillmissing (x, "constant", [94:99]'), y); 608s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 608s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 608s assert (fillmissing (x, "constant", [94:99], 1), y); 608s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 608s assert (fillmissing (x, "constant", [96:99], 2), y); 608s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 608s assert (fillmissing (x, "constant", [94:99], 3), y); 608s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 608s assert (fillmissing (x, "constant", [88:99], 99), y); 608s ***** test 608s x = reshape ([1:24], 4, 3, 2); 608s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s y = x; 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 608s assert (fillmissing (x, "constant", [94:99], 1), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 608s assert (fillmissing (x, "constant", [92:99], 2), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 608s assert (fillmissing (x, "constant", [88:99], 3), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 608s assert (fillmissing (x, "constant", [76:99], 99), y); 608s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 608s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 608s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 608s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 608s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 608s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 608s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 608s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 608s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 608s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 608s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 608s ***** test 608s x = reshape ([1:24], 3, 4, 2); 608s y = x; 608s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 608s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 608s y([8]) = 99; 608s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 608s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 608s y = x; 608s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 608s y([6, 18, 20, 21]) = 99; 608s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 608s y(y == 99) = 88; 608s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 608s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 608s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 608s y([8]) = 94; 608s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 608s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 608s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 608s y = x; 608s y(isnan (y)) = 88; 608s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 608s y = x; 608s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 608s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 608s y = x; 608s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 608s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 608s y = x; 608s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 608s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 608s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 608s ***** test 608s x = reshape ([1:24],4,3,2); 608s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s y = x; 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 608s assert (fillmissing (x, "constant", [94:99], 1), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 608s assert (fillmissing (x, "constant", [92:99], 2), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 608s assert (fillmissing (x, "constant", [88:99], 3), y); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 608s assert (fillmissing (x, "constant", [76:99], 99), y); 608s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 608s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 608s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 608s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 608s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 608s ***** test 608s x = reshape ([1:24], 4, 3, 2); 608s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s y = x; 608s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 608s assert (fillmissing (x, "next", 1), y); 608s y = x; 608s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 608s assert (fillmissing (x, "next", 2), y); 608s y = x; 608s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 608s assert (fillmissing (x, "next", 3), y); 608s assert (fillmissing (x, "next", 99), x); 608s y = x; 608s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 608s assert (fillmissing (x, "previous", 1), y); 608s y = x; 608s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 608s assert (fillmissing (x, "previous", 2), y); 608s y = x; 608s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 608s assert (fillmissing (x, "previous", 3), y); 608s assert (fillmissing (x, "previous", 99), x); 608s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 608s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 608s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 608s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 608s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 608s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 608s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 608s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 608s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 608s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 608s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 608s ***** test 608s x = reshape ([1:24], 3, 4, 2); 608s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 608s y = x; 608s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 608s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 608s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 608s y = x; 608s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 608s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 608s y = x; 608s y([16, 19, 21]) = [4, 7, 9]; 608s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 608s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 608s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 608s y = x; 608s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 608s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 608s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 608s y = x; 608s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 608s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 608s y = x; 608s y([2, 5]) = [14, 17]; 608s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 608s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 608s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 608s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 608s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 608s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 608s ***** test 608s x = reshape ([1:24], 4, 3, 2); 608s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s y = x; 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 608s assert (fillmissing (x, "nearest", 1), y); 608s y = x; 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 608s assert (fillmissing (x, "nearest", 2), y); 608s y = x; 608s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 608s assert (fillmissing (x, "nearest", 3), y); 608s assert (fillmissing (x, "nearest", 99), x); 608s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 608s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 608s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 608s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 608s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 608s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 608s ***** test 608s x = reshape ([1:24], 3, 4, 2); 608s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 608s y = x; 608s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 608s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 608s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 608s y = x; 608s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 608s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 608s y = x; 608s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 608s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 608s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 608s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 608s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 608s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 608s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 608s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 608s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 608s ***** test 608s x = reshape ([1:24], 4, 3, 2); 608s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 608s y = reshape ([1:24], 4, 3, 2); 608s y([1, 9, 14, 19, 22, 23]) = NaN; 608s assert (fillmissing (x, "linear", 2), y); 608s y = reshape ([1:24], 4, 3, 2); 608s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 608s assert (fillmissing (x, "linear", 3), y); 608s assert (fillmissing (x, "linear", 99), x); 608s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 608s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 608s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 608s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 608s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 608s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 608s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 608s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 608s ***** test 608s x = reshape ([1:24], 3, 4, 2); 608s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 608s y = x; 608s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 608s y(8) = 8; 608s assert (fillmissing (x, "linear", "endvalues", 0), y); 608s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 608s y = x; 608s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 608s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 608s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 608s y = x; 608s y(isnan(y)) = 0; 608s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 608s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 609s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 609s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 609s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 609s ***** test 609s x = reshape ([1:24], 3, 4, 2); 609s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 609s y = x; 609s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 609s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 609s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 609s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 609s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 609s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 609s ***** test <60965> 609s x = reshape ([1:24], 3, 4, 2); 609s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 609s y = x; 609s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 609s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 609s !!!!! known bug: https://octave.org/testfailure/?60965 609s interp1: invalid METHOD 'makima' 609s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 609s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 609s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 609s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 609s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 609s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 609s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 609s ***** 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]) 609s ***** test 609s x = reshape ([1:24], 3, 4, 2); 609s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 609s y = x; 609s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 609s assert (fillmissing (x, "movmean", 3), y); 609s assert (fillmissing (x, "movmean", [1, 1]), y); 609s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 609s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 609s y = x; 609s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 609s assert (fillmissing (x, "movmean", 3, 2), y); 609s assert (fillmissing (x, "movmean", [1, 1], 2), y); 609s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 609s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 609s y([1, 18]) = NaN; 609s y(6) = 9; 609s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 609s y = x; 609s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 609s y(8) = 8; 609s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 609s y = x; 609s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 609s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 609s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 609s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 609s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 609s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 609s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 609s ***** 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]) 609s ***** test 609s x = reshape ([1:24], 3, 4, 2); 609s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 609s y = x; 609s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 609s assert (fillmissing (x, "movmedian", 3), y); 609s assert (fillmissing (x, "movmedian", [1, 1]), y); 609s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 609s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 609s y = x; 609s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 609s assert (fillmissing (x, "movmedian", 3, 2), y); 609s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 609s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 609s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 609s y([1,18]) = NaN; 609s y(6) = 9; 609s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 609s y = x; 609s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 609s y(8) = 8; 609s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 609s y = x; 609s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 609s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 609s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 609s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 609s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 609s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 609s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 609s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 609s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 609s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 609s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 609s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 609s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 609s ***** function A = testfcn (x, y, z) 609s if (isempty (y)) 609s A = z; 609s elseif (numel (y) == 1) 609s A = repelem (x(1), numel(z)); 609s else 609s A = interp1 (y, x, z, "linear", "extrap"); 609s endif 609s ***** endfunction 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 609s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 609s ***** 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] 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 609s ***** 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]' 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 609s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 609s ***** 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) 609s ***** 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] 609s ***** test 609s ***** function A = testfcn (x, y, z) 609s if (isempty (y)) 609s A = z; 609s elseif (numel (y) == 1) 609s A = repelem (x(1), numel(z)); 609s else 609s A = interp1 (y, x, z, "linear", "extrap"); 609s endif 609s ***** endfunction 609s x = reshape ([1:24], 3, 4, 2); 609s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 609s y = x; 609s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 609s assert (fillmissing (x, @testfcn, 3), y); 609s assert (fillmissing (x, @testfcn, [1, 1]), y); 609s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 609s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 609s y= x; 609s y(isnan (x)) = 99; 609s y(8) = 8; 609s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 609s y = x; 609s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 609s assert (fillmissing (x, @testfcn, 3, 2), y); 609s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 609s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 609s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 609s y(1) = NaN; 609s y([6, 18, 21]) = [9, 24, 24]; 609s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 609s y = x; 609s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 609s y(8) = 8; 609s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 609s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 609s y(8) = 99; 609s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 609s y([6, 18, 20, 21]) = 99; 609s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 609s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 609s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 609s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 609s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 609s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 609s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 609s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 609s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 609s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 609s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 609s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 609s ***** 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]) 609s ***** test 609s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 609s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 609s y = x; 609s y([4, 7, 12]) = 0; 609s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 609s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 609s y = x; 609s y([5, 7, 12]) = 0; 609s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 609s y = x; 609s y([4, 5, 7]) = 0; 609s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 609s ***** test 609s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 609s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 609s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 609s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 609s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 609s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 609s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 609s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 609s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 609s ***** test 609s x = [NaN, 2, 3]; 609s [~, idx] = fillmissing (x, "previous"); 609s assert (idx, logical ([0, 0, 0])); 609s [~, idx] = fillmissing (x, "movmean", 1); 609s assert (idx, logical ([0, 0, 0])); 609s x = [1:3; 4:6; 7:9]; 609s x([2, 4, 7, 9]) = NaN; 609s [~, idx] = fillmissing (x, "linear"); 609s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 609s [~, idx] = fillmissing (x, "movmean", 2); 609s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 609s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 609s assert (A, [1, 2, 3, 3, NaN]); 609s assert (idx, logical ([0, 0, 0, 1, 0])); 609s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 609s assert (A, [1, 2, 3, 3, NaN]); 609s assert (idx, logical ([0, 0, 0, 1, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 609s assert (A, [1, 2, 3, 3, NaN]); 609s assert (idx, logical ([0, 0, 0, 1, 0])); 609s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 609s assert (A, [1, 2, 1, 4, 1]); 609s assert (idx, logical ([0, 1, 0, 1, 0])); 609s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 609s assert (A, [1, NaN, 1, NaN, 1]); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 609s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 609s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 609s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 609s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 609s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 609s ***** test 609s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 609s assert (idx, logical ([0, 1, 1, 1, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 609s assert (A, [1, 2, 2, NaN, NaN]); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 609s assert (A, [1, 1, 1, 1, 1]); 609s assert (idx, logical ([0, 1, 0, 1, 1])); 609s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 609s assert (A, [1, NaN, 1, NaN, NaN]); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s ***** test 609s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 609s assert (A, [1, 3, 5]); 609s assert (idx, logical ([0, 1, 0])); 609s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 609s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 609s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 609s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 609s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 609s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 609s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 609s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 609s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 609s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 609s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 609s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 609s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 609s ***** test 609s [A, idx] = fillmissing (" a b c", "constant", " "); 609s assert (A, " a b c"); 609s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 609s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 609s assert (A, {"foo", "", "bar", ""}); 609s assert (idx, logical ([0, 0, 0, 0])); 609s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 609s assert (A, {"foo", "", "bar", ""}); 609s assert (idx, logical ([0, 0, 0, 0])); 609s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 609s assert (A, "afaoaoa"); 609s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 609s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 609s assert (A, " f o o "); 609s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 609s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 609s assert (A, {"a", "foo", "a"}); 609s assert (idx, logical ([1, 0, 1])); 609s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 609s assert (A, {"", "foo", ""}); 609s assert (idx, logical ([0, 0, 0])); 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 609s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 609s ***** 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])) 609s ***** 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])) 609s ***** test 609s x = logical ([1, 0, 1, 0, 1]); 609s [~, idx] = fillmissing (x, "constant", true); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([0, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 0])); 609s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 609s assert (idx, logical ([0, 0, 0, 0, 0])) 609s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])) 609s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([0, 0, 1, 0, 1])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 609s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 609s ***** 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])) 609s ***** 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])) 609s ***** test 609s x = int32 ([1, 2, 3, 4, 5]); 609s [~, idx] = fillmissing (x, "constant", 0); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 609s assert (idx, logical ([0, 0, 1, 0, 0])); 609s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([0, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 0])); 609s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 609s assert (idx, logical ([0, 0, 0, 0, 0])); 609s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([1, 0, 1, 0, 1])); 609s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 609s assert (idx, logical ([0, 0, 1, 0, 1])); 609s ***** test 609s [A, idx] = fillmissing ([struct, struct], "constant", 1); 609s assert (A, [struct, struct]) 609s assert (idx, [false, false]) 609s ***** error fillmissing () 609s ***** error fillmissing (1) 609s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 610s ***** error fillmissing (1, 2) 610s ***** error fillmissing (1, "foo") 610s ***** error fillmissing (1, @(x) x, 1) 610s ***** error fillmissing (1, @(x,y) x+y, 1) 610s ***** error fillmissing ("a b c", "linear") 610s ***** error fillmissing ({"a", "b"}, "linear") 610s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 610s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 610s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 610s ***** error fillmissing (1, "constant", []) 610s ***** error fillmissing (1, "constant", "a") 610s ***** error fillmissing ("a", "constant", 1) 610s ***** error fillmissing ("a", "constant", {"foo"}) 610s ***** error fillmissing ({"foo"}, "constant", 1) 610s ***** error fillmissing (1, "movmean") 610s ***** error fillmissing (1, "movmedian") 610s ***** error fillmissing (1, "constant", 1, 0) 610s ***** error fillmissing (1, "constant", 1, -1) 610s ***** error fillmissing (1, "constant", 1, [1, 2]) 610s ***** error fillmissing (1, "constant", 1, "samplepoints") 610s ***** error fillmissing (1, "constant", 1, "foo") 610s ***** error fillmissing (1, "constant", 1, 1, "foo") 610s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 610s ***** error fillmissing ("foo", "next", "endvalues", 1) 610s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 610s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 610s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 610s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 610s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 610s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 610s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 610s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 610s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 610s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 610s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 610s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 610s ***** error fillmissing (true, "linear", "missinglocations", true) 610s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 610s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 610s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 610s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 610s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 610s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 610s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 610s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 610s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 610s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 610s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 610s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 610s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 610s ***** error fillmissing (1, @(x,y,z) x+y+z) 610s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 610s 380 tests, 379 passed, 0 known failure, 1 skipped 610s [inst/boxplot.m] 610s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/boxplot.m 610s ***** demo 610s axis ([0, 3]); 610s randn ("seed", 1); # for reproducibility 610s girls = randn (10, 1) * 5 + 140; 610s randn ("seed", 2); # for reproducibility 610s boys = randn (13, 1) * 8 + 135; 610s boxplot ({girls, boys}); 610s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 610s title ("Grade 3 heights"); 610s ***** demo 610s randn ("seed", 7); # for reproducibility 610s A = randn (10, 1) * 5 + 140; 610s randn ("seed", 8); # for reproducibility 610s B = randn (25, 1) * 8 + 135; 610s randn ("seed", 9); # for reproducibility 610s C = randn (20, 1) * 6 + 165; 610s data = [A; B; C]; 610s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 610s labels = {"Team A", "Team B", "Team C"}; 610s pos = [2, 1, 3]; 610s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 610s "OutlierTags", "on", "BoxStyle", "filled"); 610s title ("Example of Group splitting with paired vectors"); 610s ***** demo 610s randn ("seed", 1); # for reproducibility 610s data = randn (100, 9); 610s boxplot (data, "notch", "on", "boxstyle", "filled", ... 610s "colors", "ygcwkmb", "whisker", 1.2); 610s title ("Example of different colors specified with characters"); 610s ***** demo 610s randn ("seed", 5); # for reproducibility 610s data = randn (100, 13); 610s colors = [0.7 0.7 0.7; ... 610s 0.0 0.4 0.9; ... 610s 0.7 0.4 0.3; ... 610s 0.7 0.1 0.7; ... 610s 0.8 0.7 0.4; ... 610s 0.1 0.8 0.5; ... 610s 0.9 0.9 0.2]; 610s boxplot (data, "notch", "on", "boxstyle", "filled", ... 610s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 610s title ("Example of different colors specified as RGB values"); 610s ***** error boxplot ("a") 610s ***** error boxplot ({[1 2 3], "a"}) 610s ***** error boxplot ([1 2 3], 1, {2, 3}) 610s ***** error boxplot ([1 2 3], {"a", "b"}) 610s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 610s ***** error boxplot ([1:10], "notch", i) 610s ***** error boxplot ([1:10], "notch", {}) 610s ***** error boxplot (1, "symbol", 1) 610s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 610s ***** error boxplot (1, "orientation", {}) 610s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 610s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 610s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 610s ***** error boxplot (3, "OutlierTags", {}) 610s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 610s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 610s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 610s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 610s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 610s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 610s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 610s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 610s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 610s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 610s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 610s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 610s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 610s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 610s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 610s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 610s ***** error boxplot (rand (3, 3), [1 2]) 610s ***** test 610s hf = figure ("visible", "off"); 610s unwind_protect 610s [a, b] = boxplot (rand (10, 3)); 610s assert (size (a), [7, 3]); 610s assert (numel (b.box), 3); 610s assert (numel (b.whisker), 12); 610s assert (numel (b.median), 3); 610s unwind_protect_cleanup 610s close (hf); 610s end_unwind_protect 610s ***** test 610s hf = figure ("visible", "off"); 610s unwind_protect 610s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 610s assert (numel (b.box_fill), 3); 610s unwind_protect_cleanup 610s close (hf); 610s end_unwind_protect 610s ***** test 610s hf = figure ("visible", "off"); 610s unwind_protect 610s hold on 610s [a, b] = boxplot (rand (10, 3)); 610s assert (ishold, true); 610s unwind_protect_cleanup 610s close (hf); 610s end_unwind_protect 610s 34 tests, 34 passed, 0 known failure, 0 skipped 610s [inst/randsample.m] 610s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/randsample.m 610s ***** test 610s n = 20; 610s k = 5; 610s x = randsample(n, k); 610s assert (size(x), [1 k]); 610s x = randsample(n, k, true); 610s assert (size(x), [1 k]); 610s x = randsample(n, k, false); 610s assert (size(x), [1 k]); 610s x = randsample(n, k, true, ones(n, 1)); 610s assert (size(x), [1 k]); 610s x = randsample(1:n, k); 610s assert (size(x), [1 k]); 610s x = randsample(1:n, k, true); 610s assert (size(x), [1 k]); 610s x = randsample(1:n, k, false); 610s assert (size(x), [1 k]); 610s x = randsample(1:n, k, true, ones(n, 1)); 610s assert (size(x), [1 k]); 610s x = randsample((1:n)', k); 610s assert (size(x), [k 1]); 610s x = randsample((1:n)', k, true); 610s assert (size(x), [k 1]); 610s x = randsample((1:n)', k, false); 610s assert (size(x), [k 1]); 610s x = randsample((1:n)', k, true, ones(n, 1)); 610s assert (size(x), [k 1]); 610s n = 10; 610s k = 100; 610s x = randsample(n, k, true, 1:n); 610s assert (size(x), [1 k]); 610s x = randsample((1:n)', k, true); 610s assert (size(x), [k 1]); 610s x = randsample(k, k, false, 1:k); 610s assert (size(x), [1 k]); 610s 1 test, 1 passed, 0 known failure, 0 skipped 610s [inst/signtest.m] 610s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/signtest.m 610s ***** test 610s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 610s assert (pval, 1.091701889420221e-218, 1e-14); 610s assert (h, 1); 610s assert (stats.zval, -31.5437631079266, 1e-14); 610s ***** test 610s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 610s assert (pval, 0.6875000000000006, 1e-14); 610s assert (h, 0); 610s assert (stats.zval, NaN); 610s assert (stats.sign, 4); 610s ***** test 610s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 610s assert (pval, 0.6830913983096086, 1e-14); 610s assert (h, 0); 610s assert (stats.zval, 0.4082482904638631, 1e-14); 610s assert (stats.sign, 4); 610s ***** error signtest (ones (2)) 610s ***** error ... 610s signtest ([1, 2, 3, 4], ones (2)) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [1, 2, 3]) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'tail') 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'alpha', 0) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'alpha', "a") 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'tail', "some") 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'method', 0.01) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'method', "some") 610s ***** error ... 610s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 610s 20 tests, 20 passed, 0 known failure, 0 skipped 610s [inst/fitcnet.m] 610s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/fitcnet.m 610s ***** demo 610s ## Train a Neural Network on the Fisher's Iris data set and display 610s ## a confusion chart with the classification results. 610s 610s load fisheriris 610s Mdl = fitcnet (meas, species); 610s pred_species = resubPredict (Mdl); 610s confusionchart (species, pred_species); 610s ***** test 610s load fisheriris 610s x = meas; 610s y = grp2idx (species); 610s Mdl = fitcnet (x, y, "IterationLimit", 50); 610s assert (class (Mdl), "ClassificationNeuralNetwork"); 610s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 610s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 610s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 610s ***** error fitcnet () 610s ***** error fitcnet (ones (4,1)) 610s ***** error 610s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 610s ***** error 610s fitcnet (ones (4,2), ones (3, 1)) 610s ***** error 610s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 610s 6 tests, 6 passed, 0 known failure, 0 skipped 610s [inst/isoutlier.m] 610s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/isoutlier.m 610s ***** demo 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s TF = isoutlier (A, "mean") 610s ***** demo 610s ## Use a moving detection method to detect local outliers in a sine wave 610s 610s x = -2*pi:0.1:2*pi; 610s A = sin(x); 610s A(47) = 0; 610s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 610s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 610s plot (time, A) 610s hold on 610s plot (time(TF), A(TF), "x") 610s datetick ('x', 20, 'keepticks') 610s legend ("Original Data", "Outlier Data") 610s ***** demo 610s ## Locate an outlier in a vector of data and visualize the outlier 610s 610s x = 1:10; 610s A = [60 59 49 49 58 100 61 57 48 58]; 610s [TF, L, U, C] = isoutlier (A); 610s plot (x, A); 610s hold on 610s plot (x(TF), A(TF), "x"); 610s xlim ([1,10]); 610s line ([1,10], [L, L], "Linestyle", ":"); 610s text (1.1, L-2, "Lower Threshold"); 610s line ([1,10], [U, U], "Linestyle", ":"); 610s text (1.1, U-2, "Upper Threshold"); 610s line ([1,10], [C, C], "Linestyle", ":"); 610s text (1.1, C-3, "Center Value"); 610s legend ("Original Data", "Outlier Data"); 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 610s assert (isoutlier (A, "median"), ... 610s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "mean"); 610s assert (L, -109.2459044922864, 1e-12) 610s assert (U, 264.9792378256198, 1e-12) 610s assert (C, 77.8666666666666, 1e-12) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "median"); 610s assert (L, 50.104386688966386, 1e-12) 610s assert (U, 67.895613311033610, 1e-12) 610s assert (C, 59) 610s ***** test 610s A = magic(5) + diag(200*ones(1,5)); 610s T = logical (eye (5)); 610s assert (isoutlier (A, 2), T) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 610s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 610s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 610s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 610s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 610s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 610s assert (L, l, 1e-4) 610s assert (U, u, 1e-4) 610s assert (C, c) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 610s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 610s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 610s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 610s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 610s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 610s assert (L, l, 1e-4) 610s assert (U, u, 1e-4) 610s assert (C, c) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "movmean", 5); 610s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 610s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 610s 52.5979, 51.0627]; 610s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 610s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 610s 66.9373]; 610s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 610s 60.6, 59.8, 59.25, 59]; 610s assert (L, l, 1e-4) 610s assert (U, u, 1e-4) 610s assert (C, c, 1e-4) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 610s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 610s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 610s 52.5979, 51.0627]; 610s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 610s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 610s 66.9373]; 610s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 610s 60.6, 59.8, 59.25, 59]; 610s assert (L, l, 1e-4) 610s assert (U, u, 1e-4) 610s assert (C, c, 1e-4) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "gesd"); 610s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 610s assert (L, 34.235977035439944, 1e-12) 610s assert (U, 89.764022964560060, 1e-12) 610s assert (C, 62) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 610s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 610s assert (L, 31.489256770616173, 1e-12) 610s assert (U, 92.510743229383820, 1e-12) 610s assert (C, 62) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 610s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 610s assert (L, 23.976664158788935, 1e-12) 610s assert (U, 100.02333584121110, 1e-12) 610s assert (C, 62) 610s ***** test 610s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 610s [TF, L, U, C] = isoutlier (A, "grubbs"); 610s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 610s assert (L, 54.642809574646606, 1e-12) 610s assert (U, 63.511036579199555, 1e-12) 610s assert (C, 59.076923076923080, 1e-12) 611s ***** test 611s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 611s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 611s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 611s assert (L, 54.216083184201850, 1e-12) 611s assert (U, 63.937762969644310, 1e-12) 611s assert (C, 59.076923076923080, 1e-12) 611s ***** test 611s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 611s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 611s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 611s assert (L, 57) 611s assert (U, 100) 611s assert (C, 78.5) 611s ***** test 611s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 611s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 611s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 611s assert (L, 57.5) 611s assert (U, 62) 611s assert (C, 59.75) 611s ***** shared A 611s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 611s ***** error ... 611s isoutlier (A, "movmedian", 0); 611s ***** error ... 611s isoutlier (A, "movmedian", []); 611s ***** error ... 611s isoutlier (A, "movmedian", [2 3 4]); 611s ***** error ... 611s isoutlier (A, "movmedian", 1.4); 611s ***** error ... 611s isoutlier (A, "movmedian", [0 1]); 611s ***** error ... 611s isoutlier (A, "movmedian", [2 -1]); 611s ***** error ... 611s isoutlier (A, "movmedian", {2 3}); 611s ***** error ... 611s isoutlier (A, "movmedian", "char"); 611s 611s ***** error ... 611s isoutlier (A, "movmean", 0); 611s ***** error ... 611s isoutlier (A, "movmean", []); 611s ***** error ... 611s isoutlier (A, "movmean", [2 3 4]); 611s ***** error ... 611s isoutlier (A, "movmean", 1.4); 611s ***** error ... 611s isoutlier (A, "movmean", [0 1]); 611s ***** error ... 611s isoutlier (A, "movmean", [2 -1]); 611s ***** error ... 611s isoutlier (A, "movmean", {2 3}); 611s ***** error ... 611s isoutlier (A, "movmean", "char"); 611s 611s ***** error ... 611s isoutlier (A, "percentiles", [-1 90]); 611s ***** error ... 611s isoutlier (A, "percentiles", [10 -90]); 611s ***** error ... 611s isoutlier (A, "percentiles", [90]); 611s ***** error ... 611s isoutlier (A, "percentiles", [90 20]); 611s ***** error ... 611s isoutlier (A, "percentiles", [90 20]); 611s ***** error ... 611s isoutlier (A, "percentiles", [10 20 90]); 611s ***** error ... 611s isoutlier (A, "percentiles", {10 90}); 611s ***** error ... 611s isoutlier (A, "percentiles", "char"); 611s 611s ***** error ... 611s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "SamplePoints", 15); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 611s 611s ***** error ... 611s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 611s ***** error ... 611s isoutlier (A, "gesd", "ThresholdFactor", 3); 611s ***** error ... 611s isoutlier (A, "grubbs", "ThresholdFactor", 3); 611s 611s ***** error ... 611s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 611s ***** error ... 611s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 611s 611s ***** error ... 611s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 611s ***** error isoutlier (A, {1}); 611s ***** error isoutlier (A, true); 611s ***** error isoutlier (A, false); 611s ***** error isoutlier (A, 0); 611s ***** error isoutlier (A, [1 2]); 611s ***** error isoutlier (A, -2); 611s 59 tests, 59 passed, 0 known failure, 0 skipped 611s [inst/cdfplot.m] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/cdfplot.m 611s ***** demo 611s x = randn(100,1); 611s cdfplot (x); 611s ***** test 611s hf = figure ("visible", "off"); 611s unwind_protect 611s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 611s [hCDF, stats] = cdfplot (x); 611s assert (stats.min, 2); 611s assert (stats.max, 6); 611s assert (stats.median, 3.5); 611s assert (stats.std, 1.35400640077266, 1e-14); 611s unwind_protect_cleanup 611s close (hf); 611s end_unwind_protect 611s ***** test 611s hf = figure ("visible", "off"); 611s unwind_protect 611s x = randn(100,1); 611s cdfplot (x); 611s unwind_protect_cleanup 611s close (hf); 611s end_unwind_protect 611s ***** error cdfplot (); 611s ***** error cdfplot ([x',x']); 611s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 611s 5 tests, 5 passed, 0 known failure, 0 skipped 611s [inst/harmmean.m] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/harmmean.m 611s ***** test 611s x = [0:10]; 611s y = [x;x+5;x+10]; 611s assert (harmmean (x), 0); 611s m = [0 8.907635160795225 14.30854471766802]; 611s assert (harmmean (y, 2), m', 4e-14); 611s assert (harmmean (y, "all"), 0); 611s y(2,4) = NaN; 611s m(2) = 9.009855936313949; 611s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 611s assert (harmmean (y', "omitnan"), m, 4e-14); 611s z = y + 20; 611s assert (harmmean (z, "all"), NaN); 611s assert (harmmean (z, "all", "includenan"), NaN); 611s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 611s m = [24.59488458841874 NaN 34.71244385944397]; 611s assert (harmmean (z'), m, 4e-14); 611s assert (harmmean (z', "includenan"), m, 4e-14); 611s m(2) = 29.84104075528277; 611s assert (harmmean (z', "omitnan"), m, 4e-14); 611s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 611s ***** test 611s x = repmat ([1:20;6:25], [5 2 6 3]); 611s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 611s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 611s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 611s assert (size (harmmean (x, [1 4 3])), [1 40]); 611s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 611s ***** test 611s x = repmat ([1:20;6:25], [5 2 6 3]); 611s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 611s assert (harmmean (x, [3 2]), m, 4e-14); 611s x(2,5,6,3) = NaN; 611s m(2,3) = NaN; 611s assert (harmmean (x, [3 2]), m, 4e-14); 611s m(2,3) = 13.06617961315406; 611s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 611s ***** error harmmean ("char") 611s ***** error harmmean ([1 -1 3]) 611s ***** error ... 611s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 611s ***** error ... 611s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 611s ***** error ... 611s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 611s 8 tests, 8 passed, 0 known failure, 0 skipped 611s [inst/monotone_smooth.m] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/monotone_smooth.m 611s ***** error ... 611s monotone_smooth (1) 611s ***** error ... 611s monotone_smooth ("char", 1) 611s ***** error ... 611s monotone_smooth ({1,2,3}, 1) 611s ***** error ... 611s monotone_smooth (ones(20,3), 1) 611s ***** error ... 611s monotone_smooth (1, "char") 611s ***** error ... 611s monotone_smooth (1, {1,2,3}) 611s ***** error ... 611s monotone_smooth (1, ones(20,3)) 611s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 611s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 611s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 611s 10 tests, 10 passed, 0 known failure, 0 skipped 611s [inst/ff2n.m] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/ff2n.m 611s ***** error ff2n (); 611s ***** error ff2n (2, 5); 611s ***** error ff2n (2.5); 611s ***** error ff2n (0); 611s ***** error ff2n (-3); 611s ***** error ff2n (3+2i); 611s ***** error ff2n (Inf); 611s ***** error ff2n (NaN); 611s ***** test 611s A = ff2n (3); 611s assert (A, fullfact (3)); 611s ***** test 611s A = ff2n (8); 611s assert (A, fullfact (8)); 611s 10 tests, 10 passed, 0 known failure, 0 skipped 611s [inst/grpstats.m] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/inst/grpstats.m 611s ***** demo 611s load carsmall; 611s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 611s n = length(m); 611s errorbar((1:n)',m,p(:,2)-m); 611s set (gca, "xtick", 1:n, "xticklabel", g); 611s title ("95% prediction intervals for mean weight by year"); 611s ***** demo 611s load carsmall; 611s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 611s {"mean", "meanci", "gname"}, 0.05) 611s [c,r] = size (m); 611s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 611s set (gca, "xtick", 1:c, "xticklabel", g); 611s title ("95% prediction intervals for mean weight by year"); 611s ***** test 611s load carsmall 611s means = grpstats (Acceleration, Origin); 611s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 611s ***** test 611s load carsmall 611s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 611s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 611s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 611s ***** test 611s load carsmall 611s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 611s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 611s ***** test 611s load carsmall 611s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 611s {"mean", "meanci", "gname"}, 0.05); 611s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 611s [1e-14, 2e-14, 1e-14]'); 611s 4 tests, 4 passed, 0 known failure, 0 skipped 611s Checking C++ files ... 611s [src/fcnntrain.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/fcnntrain.cc 611s ***** shared X, Y, MODEL 611s load fisheriris 611s X = meas; 611s Y = grp2idx (species); 611s ***** error ... 611s model = fcnntrain (X, Y); 611s ***** error ... 611s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 611s ***** error ... 611s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 611s 33 tests, 33 passed, 0 known failure, 0 skipped 611s [src/svmpredict.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/svmpredict.cc 611s ***** test 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s model = svmtrain (L, D, '-c 1 -g 0.07'); 611s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 611s assert (size (predict_label), size (dec_values)); 611s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 611s assert (dec_values(1), 1.225836001973273, 1e-14); 611s assert (dec_values(2), -0.3212992933043805, 1e-14); 611s assert (predict_label(1), 1); 611s ***** shared L, D, model 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s model = svmtrain (L, D, '-c 1 -g 0.07'); 611s ***** error ... 611s [p, a] = svmpredict (L, D, model); 611s ***** error p = svmpredict (L, D); 611s ***** error ... 611s p = svmpredict (single (L), D, model); 611s ***** error p = svmpredict (L, D, 123); 611s 5 tests, 5 passed, 0 known failure, 0 skipped 611s [src/editDistance.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/editDistance.cc 611s ***** error d = editDistance (1, 2, 3, 4); 611s ***** error ... 611s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 611s ***** error ... 611s [C, IA] = editDistance ({"AS","SD","AD"}); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, [1, 2]); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, -2); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, 1.25); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 611s ***** error ... 611s d = editDistance ("string1", "string2", [1, 2]); 611s ***** error ... 611s d = editDistance ("string1", "string2", -2); 611s ***** error ... 611s d = editDistance ("string1", "string2", 1.25); 611s ***** error ... 611s d = editDistance ({{"string1", "string2"}, 2}); 611s ***** error ... 611s d = editDistance ({{"string1", "string2"}, 2}, 2); 611s ***** error ... 611s d = editDistance ([1, 2, 3]); 611s ***** error ... 611s d = editDistance (["AS","SD","AD","AS"]); 611s ***** error ... 611s d = editDistance (["AS","SD","AD"], 2); 611s ***** error ... 611s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 611s ***** error ... 611s d = editDistance ([1,2,3], {"AS","AS","AD"}); 611s ***** error ... 611s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 611s ***** error ... 611s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 611s ***** test 611s d = editDistance ({"AS","SD","AD"}); 611s assert (d, [2; 1; 1]); 611s assert (class (d), "double"); 611s ***** test 611s C = editDistance ({"AS","SD","AD"}, 1); 611s assert (iscellstr (C), true); 611s assert (C, {"AS";"SD"}); 611s ***** test 611s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 611s assert (class (IA), "double"); 611s assert (IA, [1;2]); 611s ***** test 611s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 611s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 611s assert (class (IA), "double"); 611s assert (A(IA), C); 611s ***** test 611s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 611s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 611s assert (class (IA), "cell"); 611s assert (C, {"ASS"; "FDE"; "OPA"}); 611s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 611s assert (A(IA{2}), {"FDE"; "EDS"}); 611s assert (A(IA{3}), {"OPA"}); 611s ***** test 611s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 611s [C, IA, IC] = editDistance (A, 2); 611s assert (class (IA), "double"); 611s assert (A(IA), C); 611s assert (IC, [1; 1; 3; 1; 5]); 611s ***** test 611s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 611s assert (d, [0; 1; 2]); 611s assert (class (d), "double"); 611s ***** test 611s d = editDistance ({"AS","SD","AD"}, {"AS"}); 611s assert (d, [0; 2; 1]); 611s assert (class (d), "double"); 611s ***** test 611s d = editDistance ({"AS"}, {"AS","SD","AD"}); 611s assert (d, [0; 2; 1]); 611s assert (class (d), "double"); 611s ***** test 611s b = editDistance ("Octave", "octave"); 611s assert (b, 1); 611s assert (class (b), "double"); 611s 33 tests, 33 passed, 0 known failure, 0 skipped 611s [src/fcnnpredict.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/fcnnpredict.cc 611s ***** shared X, Y, MODEL 611s load fisheriris 611s X = meas; 611s Y = grp2idx (species); 611s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 611s ***** test 611s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 611s assert (numel (Y_pred), numel (Y)); 611s assert (isequal (size (Y_pred), size (Y)), true); 611s assert (columns (Y_scores), numel (unique (Y))); 611s assert (rows (Y_scores), numel (Y)); 611s ***** error ... 611s fcnnpredict (MODEL); 611s ***** error ... 611s [Q, W, E] = fcnnpredict (MODEL, X); 611s ***** error ... 611s fcnnpredict (1, X); 611s ***** error ... 611s fcnnpredict (struct ("L", {1, 2, 3}), X); 611s ***** error ... 611s fcnnpredict (struct ("L", 1), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", 1), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {1}), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 611s "Activations", [2]), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 611s "Activations", [2; 2]), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 611s "Activations", {{2, 2}}), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 611s "Activations", {{"sigmoid", "softmax"}}), X); 611s ***** error ... 611s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 611s "Activations", "sigmoid"), X); 611s ***** error ... 611s fcnnpredict (MODEL, complex (X)); 611s ***** error ... 611s fcnnpredict (MODEL, {1, 2, 3, 4}); 611s ***** error ... 611s fcnnpredict (MODEL, "asd"); 611s ***** error ... 611s fcnnpredict (MODEL, []); 611s ***** error ... 611s fcnnpredict (MODEL, X(:,[1:3])); 611s 20 tests, 20 passed, 0 known failure, 0 skipped 611s [src/libsvmread.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/libsvmread.cc 611s ***** error [L, D] = libsvmread (24); 611s ***** error ... 611s D = libsvmread ("filename"); 611s ***** test 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s assert (size (L), [270, 1]); 611s assert (size (D), [270, 13]); 611s ***** test 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s assert (issparse (L), false); 611s assert (issparse (D), true); 611s 4 tests, 4 passed, 0 known failure, 0 skipped 611s [src/svmtrain.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/svmtrain.cc 611s ***** test 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s model = svmtrain(L, D, '-c 1 -g 0.07'); 611s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 611s assert (isstruct (model), true); 611s assert (isfield (model, "Parameters"), true); 611s assert (model.totalSV, 130); 611s assert (model.nr_class, 2); 611s assert (size (model.Label), [2, 1]); 611s ***** shared L, D 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s ***** error [L, D] = svmtrain (L, D); 611s ***** error ... 611s model = svmtrain (single (L), D); 611s ***** error ... 611s model = svmtrain (L, D, "", ""); 611s 4 tests, 4 passed, 0 known failure, 0 skipped 611s [src/libsvmwrite.cc] 611s >>>>> /tmp/autopkgtest.F79LzR/build.w74/src/src/libsvmwrite.cc 611s ***** shared L, D 611s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 611s ***** error libsvmwrite ("", L, D); 611s ***** error ... 611s libsvmwrite (tempname (), [L;L], D); 611s ***** error ... 611s OUT = libsvmwrite (tempname (), L, D); 611s ***** error ... 611s libsvmwrite (tempname (), single (L), D); 611s ***** error libsvmwrite (13412, L, D); 611s ***** error ... 611s libsvmwrite (tempname (), L, full (D)); 611s ***** error ... 611s libsvmwrite (tempname (), L, D, D); 611s 7 tests, 7 passed, 0 known failure, 0 skipped 611s Done running the unit tests. 611s Summary: 11162 tests, 11159 passed, 1 known failures, 2 skipped 612s autopkgtest [16:19:42]: test command1: -----------------------] 612s autopkgtest [16:19:42]: test command1: - - - - - - - - - - results - - - - - - - - - - 612s command1 PASS 613s autopkgtest [16:19:43]: @@@@@@@@@@@@@@@@@@@@ summary 613s command1 PASS 631s nova [W] Using flock in prodstack6-s390x 631s Creating nova instance adt-plucky-s390x-octave-statistics-20250315-160930-juju-7f2275-prod-proposed-migration-environment-2-9fbcce74-df86-472d-852f-ff989e456486 from image adt/ubuntu-plucky-s390x-server-20250315.img (UUID 3d3557fa-fd0f-4bba-9b89-8d5964e09f61)... 631s nova [W] Timed out waiting for 6482cf86-abc8-4742-ae29-ea11c0fcfd0b to get deleted.