0s autopkgtest [04:42:28]: starting date and time: 2026-02-05 04:42:28+0000 0s autopkgtest [04:42:28]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [04:42:28]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work._hy97meq/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc,src:chiark-tcl --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=glibc/2.42-2ubuntu5 chiark-tcl/1.3.7build1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-arm64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@sto01-arm64-29.secgroup --name adt-resolute-arm64-octave-statistics-20260205-044228-juju-7f2275-prod-proposed-migration-environment-15-48ab01e4-4d4f-477a-86da-6fe1c8ee65d5 --image adt/ubuntu-resolute-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-autopkgtest-workers-arm64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-arm64-octave-statistics-20260205-044228-juju-7f2275-prod-proposed-migration-environment-15-48ab01e4-4d4f-477a-86da-6fe1c8ee65d5 from image adt/ubuntu-resolute-arm64-server-20260204.img (UUID f58d981d-b271-4157-b9b1-fd704695563c)... 65s autopkgtest [04:43:33]: testbed dpkg architecture: arm64 65s autopkgtest [04:43:33]: testbed apt version: 3.1.14 65s autopkgtest [04:43:33]: @@@@@@@@@@@@@@@@@@@@ test bed setup 66s autopkgtest [04:43:33]: testbed release detected to be: None 66s autopkgtest [04:43:34]: updating testbed package index (apt update) 67s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 67s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 67s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 67s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 67s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [227 kB] 67s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1719 kB] 67s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5260 B] 67s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [35.4 kB] 67s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 Packages [265 kB] 67s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 c-n-f Metadata [7328 B] 68s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 Packages [52.9 kB] 68s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 c-n-f Metadata [328 B] 68s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 Packages [1481 kB] 68s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 c-n-f Metadata [40.2 kB] 68s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 Packages [26.0 kB] 68s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 c-n-f Metadata [776 B] 71s Fetched 3984 kB in 1s (3448 kB/s) 72s Reading package lists... 73s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 73s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 73s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 73s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 74s Reading package lists... 74s Reading package lists... 74s Building dependency tree... 74s Reading state information... 75s Calculating upgrade... 75s The following packages will be upgraded: 75s libc-bin libc-gconv-modules-extra libc6 locales pollinate python3-linkify-it 75s python3-referencing sed 75s 8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 75s Need to get 8110 kB of archives. 75s After this operation, 0 B of additional disk space will be used. 75s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 sed arm64 4.9-2build3 [193 kB] 75s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libc-gconv-modules-extra arm64 2.42-2ubuntu5 [1413 kB] 76s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libc6 arm64 2.42-2ubuntu5 [1594 kB] 78s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libc-bin arm64 2.42-2ubuntu5 [599 kB] 78s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 locales all 2.42-2ubuntu5 [4255 kB] 81s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-linkify-it all 2.0.3-1ubuntu3 [19.4 kB] 81s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 pollinate all 4.33-4ubuntu5 [14.0 kB] 81s Get:8 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-referencing all 0.36.2-1ubuntu2 [22.2 kB] 82s dpkg-preconfigure: unable to re-open stdin: No such file or directory 82s Fetched 8110 kB in 6s (1278 kB/s) 82s (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 ... 89360 files and directories currently installed.) 82s Preparing to unpack .../sed_4.9-2build3_arm64.deb ... 82s Unpacking sed (4.9-2build3) over (4.9-2build2) ... 82s Setting up sed (4.9-2build3) ... 82s (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 ... 89360 files and directories currently installed.) 82s Preparing to unpack .../libc-gconv-modules-extra_2.42-2ubuntu5_arm64.deb ... 82s Unpacking libc-gconv-modules-extra:arm64 (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 82s Setting up libc-gconv-modules-extra:arm64 (2.42-2ubuntu5) ... 82s (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 ... 89360 files and directories currently installed.) 82s Preparing to unpack .../libc6_2.42-2ubuntu5_arm64.deb ... 82s Unpacking libc6:arm64 (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 83s Setting up libc6:arm64 (2.42-2ubuntu5) ... 83s (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 ... 89360 files and directories currently installed.) 83s Preparing to unpack .../libc-bin_2.42-2ubuntu5_arm64.deb ... 83s Unpacking libc-bin (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 83s Setting up libc-bin (2.42-2ubuntu5) ... 83s (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 ... 89360 files and directories currently installed.) 83s Preparing to unpack .../locales_2.42-2ubuntu5_all.deb ... 83s Unpacking locales (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 83s Preparing to unpack .../python3-linkify-it_2.0.3-1ubuntu3_all.deb ... 83s Unpacking python3-linkify-it (2.0.3-1ubuntu3) over (2.0.3-1ubuntu2) ... 83s Preparing to unpack .../pollinate_4.33-4ubuntu5_all.deb ... 84s Unpacking pollinate (4.33-4ubuntu5) over (4.33-4ubuntu4) ... 84s Preparing to unpack .../python3-referencing_0.36.2-1ubuntu2_all.deb ... 84s Unpacking python3-referencing (0.36.2-1ubuntu2) over (0.36.2-1ubuntu1) ... 84s Setting up locales (2.42-2ubuntu5) ... 84s Generating locales (this might take a while)... 86s en_US.UTF-8... done 86s Generation complete. 86s Setting up pollinate (4.33-4ubuntu5) ... 97s Setting up python3-linkify-it (2.0.3-1ubuntu3) ... 97s Setting up python3-referencing (0.36.2-1ubuntu2) ... 97s Processing triggers for man-db (2.13.1-1) ... 98s Processing triggers for install-info (7.2-5) ... 99s Processing triggers for systemd (259-1ubuntu3) ... 100s autopkgtest [04:44:08]: upgrading testbed (apt dist-upgrade and autopurge) 104s Reading package lists... 104s Building dependency tree... 104s Reading state information... 104s Calculating upgrade... 105s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 111s Reading package lists... 111s Building dependency tree... 111s Reading state information... 111s Solving dependencies... 112s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 113s autopkgtest [04:44:21]: rebooting testbed after setup commands that affected boot 173s autopkgtest [04:45:21]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:41:39 UTC 2026 176s autopkgtest [04:45:24]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 178s Get:1 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (dsc) [2289 B] 178s Get:2 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (tar) [1424 kB] 178s Get:3 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (diff) [10.3 kB] 178s gpgv: Signature made Mon Oct 27 09:10:08 2025 UTC 178s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 178s gpgv: Can't check signature: No public key 178s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.6-2.dsc: no acceptable signature found 178s autopkgtest [04:45:26]: testing package octave-statistics version 1.7.6-2 179s autopkgtest [04:45:27]: build not needed 180s autopkgtest [04:45:28]: test command1: preparing testbed 180s Reading package lists... 180s Building dependency tree... 180s Reading state information... 180s Solving dependencies... 181s The following NEW packages will be installed: 181s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 181s cpp-15 cpp-15-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper debugedit 181s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 181s diffstat dwz fontconfig fontconfig-config fonts-freefont-otf g++ g++-15 181s g++-15-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-15 181s gcc-15-aarch64-linux-gnu gcc-aarch64-linux-gnu gettext gfortran gfortran-15 181s gfortran-15-aarch64-linux-gnu gfortran-aarch64-linux-gnu gnuplot-data 181s gnuplot-nox hdf5-helpers intltool-debian krb5-multidev libaec-dev libaec0 181s libalgorithm-c3-perl libaliased-perl libamd3 libaom3 libapp-cmd-perl 181s libappstream5 libapt-pkg-perl libarchive-zip-perl libarpack2t64 181s libarray-intspan-perl libasan8 libasound2-data libasound2t64 libasyncns0 181s libavahi-client3 libavahi-common-data libavahi-common3 181s libb-hooks-endofscope-perl libb-hooks-op-check-perl libb-keywords-perl 181s libb2-1 libberkeleydb-perl libblas-dev libblas3 libboolean-perl 181s libbrotli-dev libc-dev-bin libc6-dev libcairo2 libcamd3 libcapture-tiny-perl 181s libcarp-assert-more-perl libcc1-0 libccolamd3 libcgi-pm-perl libcholmod5 181s libclass-c3-perl libclass-data-inheritable-perl libclass-inspector-perl 181s libclass-load-perl libclass-method-modifiers-perl libclass-tiny-perl 181s libclass-xsaccessor-perl libclone-choose-perl libclone-perl libcolamd3 181s libconfig-inifiles-perl libconfig-model-backend-yaml-perl 181s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 181s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl 181s libcrypt-dev libcups2t64 libcurl4-openssl-dev libcxsparse4 181s libdata-dpath-perl libdata-messagepack-perl libdata-optlist-perl 181s libdata-section-perl libdata-validate-domain-perl libdata-validate-ip-perl 181s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 181s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 181s libdevel-stacktrace-perl libdouble-conversion3 libduktape207 181s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 181s libencode-locale-perl liberror-perl libevent-2.1-7t64 181s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 181s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 181s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 181s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 181s libfile-which-perl libflac14 libfltk-gl1.3t64 libfltk1.3t64 libfont-ttf-perl 181s libfontconfig1 libfontenc1 libfyaml0 libgbm1 libgcc-15-dev libgd3 181s libgetopt-long-descriptive-perl libgfortran-15-dev libgfortran5 libgl-dev 181s libgl1 libgl1-mesa-dri libgl2ps1.4 libglpk40 libglu1-mesa libglvnd0 181s libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl libgnutls-dane0t64 181s libgnutls-openssl27t64 libgnutls28-dev libgomp1 181s libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 libgraphite2-3 181s libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 libhdf5-cpp-310 181s libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 181s libhdf5-hl-fortran-310 libheif-plugin-aomdec libheif-plugin-libde265 181s libheif1 libhtml-form-perl libhtml-html5-entities-perl libhtml-parser-perl 181s libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl 181s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 181s libhttp-negotiate-perl libhwasan0 libhwy1t64 libice6 libidn2-dev 181s libimagequant0 libimport-into-perl libindirect-perl libinput-bin libinput10 181s libintl-perl libio-html-perl libio-interactive-perl libio-socket-ssl-perl 181s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 181s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 181s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 181s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 181s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 181s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 181s liblingua-en-inflect-perl liblist-compare-perl liblist-moreutils-perl 181s liblist-moreutils-xs-perl liblist-someutils-perl liblist-utilsby-perl 181s liblog-any-adapter-screen-perl liblog-any-perl liblog-log4perl-perl liblsan0 181s libltdl7 liblua5.4-0 liblwp-mediatypes-perl liblwp-protocol-https-perl 181s libmailtools-perl libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 181s libmodule-implementation-perl libmodule-pluggable-perl 181s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 181s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 181s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 181s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 181s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 181s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 181s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 181s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 181s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 181s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 181s libpath-iterator-rule-perl libpath-tiny-perl libpcre2-16-0 181s libperl-critic-perl libperlio-gzip-perl libperlio-utf8-strict-perl 181s libpixman-1-0 libpkgconf3 libpod-constants-perl libpod-parser-perl 181s libpod-pom-perl libpod-spell-perl libportaudio2 libppi-perl 181s libppix-quotelike-perl libppix-regexp-perl libppix-utils-perl 181s libproc-processtable-perl libproxy1v5 libpsl-dev libpulse0 libqhull-r8.0 181s libqrupdate1 libqscintilla2-qt6-15 libqscintilla2-qt6-l10n 181s libqt6core5compat6 libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 181s libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 181s libqt6sql6 libqt6widgets6 libqt6xml6 libreadline-dev libreadonly-perl 181s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 181s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsafe-isa-perl 181s libsamplerate0 libsereal-decoder-perl libsereal-encoder-perl 181s libset-intspan-perl libsharpyuv0 libsm6 libsndfile1 181s libsoftware-copyright-perl libsoftware-license-perl 181s libsoftware-licensemoreutils-perl libsort-versions-perl libspqr4 181s libssh2-1-dev libssl-dev libstdc++-15-dev libstemmer0d libstrictures-perl 181s libstring-copyright-perl libstring-escape-perl libstring-format-perl 181s libstring-license-perl libstring-rewriteprefix-perl libsub-exporter-perl 181s libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl 181s libsub-name-perl libsub-quote-perl libsub-uplevel-perl libsuitesparseconfig7 181s libsyntax-keyword-try-perl libsz2 libtask-weaken-perl libtasn1-6-dev 181s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 181s libtext-glob-perl libtext-levenshtein-damerau-perl 181s libtext-levenshteinxs-perl libtext-markdown-discount-perl 181s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 181s libtext-wrapper-perl libtext-xslate-perl libthai-data libthai0 libtiff6 181s libtime-duration-perl libtime-moment-perl libtimedate-perl libtoml-tiny-perl 181s libtool libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 181s libunbound8 libunicode-utf8-perl libunwind8 liburi-perl 181s libvariable-magic-perl libvorbis0a libvorbisenc2 libvulkan1 libwacom-common 181s libwacom9 libwayland-client0 libwebp7 libwebpmux3 libwmflite-0.2-7 181s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 181s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 181s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 181s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 181s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 181s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 181s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 181s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 181s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 181s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 181s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 181s licensecheck lintian linux-libc-dev lzip lzop m4 mesa-libgallium nettle-dev 181s octave octave-common octave-dev octave-io octave-statistics 181s octave-statistics-common patchutils perl-openssl-defaults perltidy pkgconf 181s pkgconf-bin po-debconf rpcsvc-proto t1utils tex-common texinfo texinfo-lib 181s unzip x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools 181s xserver-common xtrans-dev xvfb zlib1g-dev 181s 0 upgraded, 495 newly installed, 0 to remove and 0 not upgraded. 181s Need to get 199 MB of archives. 181s After this operation, 734 MB of additional disk space will be used. 181s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 libfyaml0 arm64 0.9.3-1 [246 kB] 181s Get:2 http://ftpmaster.internal/ubuntu resolute/main arm64 libstemmer0d arm64 3.0.1-1 [171 kB] 181s Get:3 http://ftpmaster.internal/ubuntu resolute/main arm64 libappstream5 arm64 1.1.1-1 [237 kB] 181s Get:4 http://ftpmaster.internal/ubuntu resolute/main arm64 appstream arm64 1.1.1-1 [71.1 kB] 181s Get:5 http://ftpmaster.internal/ubuntu resolute/main arm64 m4 arm64 1.4.20-2 [213 kB] 181s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 autoconf all 2.72-3.1ubuntu1 [384 kB] 181s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 autotools-dev all 20240727.1 [43.4 kB] 181s Get:8 http://ftpmaster.internal/ubuntu resolute/main arm64 automake all 1:1.18.1-3build1 [582 kB] 182s Get:9 http://ftpmaster.internal/ubuntu resolute/main arm64 autopoint all 0.23.2-1 [620 kB] 182s Get:10 http://ftpmaster.internal/ubuntu resolute/main arm64 libcapture-tiny-perl all 0.50-1 [20.7 kB] 182s Get:11 http://ftpmaster.internal/ubuntu resolute/main arm64 libparams-util-perl arm64 1.102-3build1 [20.6 kB] 182s Get:12 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-install-perl all 0.929-1 [9764 B] 182s Get:13 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-optlist-perl all 0.114-1 [9708 B] 182s Get:14 http://ftpmaster.internal/ubuntu resolute/main arm64 libb-hooks-op-check-perl arm64 0.22-3build2 [9348 B] 182s Get:15 http://ftpmaster.internal/ubuntu resolute/main arm64 libdynaloader-functions-perl all 0.004-2 [11.5 kB] 182s Get:16 http://ftpmaster.internal/ubuntu resolute/main arm64 libdevel-callchecker-perl arm64 0.009-2 [14.0 kB] 182s Get:17 http://ftpmaster.internal/ubuntu resolute/main arm64 libparams-classify-perl arm64 0.015-2build6 [19.8 kB] 182s Get:18 http://ftpmaster.internal/ubuntu resolute/main arm64 libmodule-runtime-perl all 0.018-1 [15.2 kB] 182s Get:19 http://ftpmaster.internal/ubuntu resolute/main arm64 libtry-tiny-perl all 0.32-1 [21.2 kB] 182s Get:20 http://ftpmaster.internal/ubuntu resolute/main arm64 libmodule-implementation-perl all 0.09-2 [12.0 kB] 182s Get:21 http://ftpmaster.internal/ubuntu resolute/main arm64 libpackage-stash-perl all 0.40-1 [19.5 kB] 182s Get:22 http://ftpmaster.internal/ubuntu resolute/universe arm64 libclass-load-perl all 0.25-2 [12.7 kB] 182s Get:23 http://ftpmaster.internal/ubuntu resolute/main arm64 libio-stringy-perl all 2.113-2 [45.3 kB] 182s Get:24 http://ftpmaster.internal/ubuntu resolute/universe arm64 libparams-validate-perl arm64 1.31-2build4 [52.1 kB] 182s Get:25 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-exporter-perl all 0.990-1 [49.0 kB] 182s Get:26 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 182s Get:27 http://ftpmaster.internal/ubuntu resolute/universe arm64 libio-tiecombine-perl all 1.005-3 [9464 B] 182s Get:28 http://ftpmaster.internal/ubuntu resolute/universe arm64 libmodule-pluggable-perl all 5.2-5 [19.5 kB] 182s Get:29 http://ftpmaster.internal/ubuntu resolute/universe arm64 libstring-rewriteprefix-perl all 0.009-1 [6310 B] 182s Get:30 http://ftpmaster.internal/ubuntu resolute/universe arm64 libapp-cmd-perl all 0.338-1 [58.5 kB] 182s Get:31 http://ftpmaster.internal/ubuntu resolute/universe arm64 libboolean-perl all 0.46-3 [8430 B] 182s Get:32 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsub-uplevel-perl all 0.2800-3 [11.6 kB] 182s Get:33 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtest-exception-perl all 0.43-3 [13.4 kB] 182s Get:34 http://ftpmaster.internal/ubuntu resolute/universe arm64 libcarp-assert-more-perl all 2.9.0-1 [19.4 kB] 182s Get:35 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-which-perl all 1.27-2 [12.5 kB] 182s Get:36 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-homedir-perl all 1.006-2 [37.0 kB] 182s Get:37 http://ftpmaster.internal/ubuntu resolute/universe arm64 libclone-choose-perl all 0.010-2 [7738 B] 182s Get:38 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhash-merge-perl all 0.302-1 [13.0 kB] 182s Get:39 http://ftpmaster.internal/ubuntu resolute/main arm64 libjson-perl all 4.10000-1 [81.9 kB] 182s Get:40 http://ftpmaster.internal/ubuntu resolute/main arm64 libexporter-tiny-perl all 1.006003-1 [35.5 kB] 182s Get:41 http://ftpmaster.internal/ubuntu resolute/universe arm64 liblist-moreutils-xs-perl arm64 0.430-4build1 [39.9 kB] 182s Get:42 http://ftpmaster.internal/ubuntu resolute/universe arm64 liblist-moreutils-perl all 0.430-2 [38.2 kB] 182s Get:43 http://ftpmaster.internal/ubuntu resolute/universe arm64 liblog-log4perl-perl all 1.57-1 [345 kB] 182s Get:44 http://ftpmaster.internal/ubuntu resolute/main arm64 libmouse-perl arm64 2.6.1-1 [132 kB] 182s Get:45 http://ftpmaster.internal/ubuntu resolute/universe arm64 libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 182s Get:46 http://ftpmaster.internal/ubuntu resolute/universe arm64 libmousex-strictconstructor-perl all 0.02-3 [4582 B] 182s Get:47 http://ftpmaster.internal/ubuntu resolute/universe arm64 libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 182s Get:48 http://ftpmaster.internal/ubuntu resolute/main arm64 libpath-tiny-perl all 0.148-1 [47.9 kB] 182s Get:49 http://ftpmaster.internal/ubuntu resolute/universe arm64 libpod-pom-perl all 2.01-4 [61.3 kB] 182s Get:50 http://ftpmaster.internal/ubuntu resolute/main arm64 libregexp-common-perl all 2024080801-1 [162 kB] 182s Get:51 http://ftpmaster.internal/ubuntu resolute/main arm64 libyaml-tiny-perl all 1.76-1 [24.2 kB] 182s Get:52 http://ftpmaster.internal/ubuntu resolute/universe arm64 libconfig-model-perl all 2.155-1 [356 kB] 182s Get:53 http://ftpmaster.internal/ubuntu resolute/universe arm64 libyaml-pp-perl all 0.39.0-1 [107 kB] 182s Get:54 http://ftpmaster.internal/ubuntu resolute/universe arm64 cme all 1.043-2 [67.6 kB] 182s Get:55 http://ftpmaster.internal/ubuntu resolute/main arm64 libisl23 arm64 0.27-1build1 [676 kB] 182s Get:56 http://ftpmaster.internal/ubuntu resolute/main arm64 libmpc3 arm64 1.3.1-2 [55.6 kB] 182s Get:57 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-15-aarch64-linux-gnu arm64 15.2.0-12ubuntu1 [11.7 MB] 185s Get:58 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-15 arm64 15.2.0-12ubuntu1 [1030 B] 185s Get:59 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [5736 B] 185s Get:60 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp arm64 4:15.2.0-4ubuntu1 [22.4 kB] 185s Get:61 http://ftpmaster.internal/ubuntu resolute/main arm64 libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 185s Get:62 http://ftpmaster.internal/ubuntu resolute/main arm64 libcc1-0 arm64 15.2.0-12ubuntu1 [49.0 kB] 185s Get:63 http://ftpmaster.internal/ubuntu resolute/main arm64 libgomp1 arm64 15.2.0-12ubuntu1 [147 kB] 185s Get:64 http://ftpmaster.internal/ubuntu resolute/main arm64 libitm1 arm64 15.2.0-12ubuntu1 [27.8 kB] 185s Get:65 http://ftpmaster.internal/ubuntu resolute/main arm64 libasan8 arm64 15.2.0-12ubuntu1 [2920 kB] 186s Get:66 http://ftpmaster.internal/ubuntu resolute/main arm64 liblsan0 arm64 15.2.0-12ubuntu1 [1316 kB] 186s Get:67 http://ftpmaster.internal/ubuntu resolute/main arm64 libtsan2 arm64 15.2.0-12ubuntu1 [2688 kB] 187s Get:68 http://ftpmaster.internal/ubuntu resolute/main arm64 libubsan1 arm64 15.2.0-12ubuntu1 [1175 kB] 188s Get:69 http://ftpmaster.internal/ubuntu resolute/main arm64 libhwasan0 arm64 15.2.0-12ubuntu1 [1638 kB] 188s Get:70 http://ftpmaster.internal/ubuntu resolute/main arm64 libgcc-15-dev arm64 15.2.0-12ubuntu1 [2600 kB] 189s Get:71 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-15-aarch64-linux-gnu arm64 15.2.0-12ubuntu1 [23.1 MB] 192s Get:72 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-15 arm64 15.2.0-12ubuntu1 [519 kB] 192s Get:73 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [1206 B] 192s Get:74 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc arm64 4:15.2.0-4ubuntu1 [5016 B] 192s Get:75 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libc-dev-bin arm64 2.42-2ubuntu5 [22.5 kB] 192s Get:76 http://ftpmaster.internal/ubuntu resolute/main arm64 linux-libc-dev arm64 6.18.0-9.9 [1834 kB] 192s Get:77 http://ftpmaster.internal/ubuntu resolute/main arm64 libcrypt-dev arm64 1:4.5.1-1 [123 kB] 192s Get:78 http://ftpmaster.internal/ubuntu resolute/main arm64 rpcsvc-proto arm64 1.4.3-1build1 [65.6 kB] 192s Get:79 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libc6-dev arm64 2.42-2ubuntu5 [1765 kB] 192s Get:80 http://ftpmaster.internal/ubuntu resolute/main arm64 libtool all 2.5.4-9 [169 kB] 192s Get:81 http://ftpmaster.internal/ubuntu resolute/main arm64 dh-autoreconf all 21 [12.5 kB] 192s Get:82 http://ftpmaster.internal/ubuntu resolute/main arm64 libarchive-zip-perl all 1.68-1 [90.2 kB] 192s Get:83 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 192s Get:84 http://ftpmaster.internal/ubuntu resolute/main arm64 dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 192s Get:85 http://ftpmaster.internal/ubuntu resolute/main arm64 debugedit arm64 1:5.2-3build1 [47.9 kB] 192s Get:86 http://ftpmaster.internal/ubuntu resolute/main arm64 dwz arm64 0.16-2 [113 kB] 192s Get:87 http://ftpmaster.internal/ubuntu resolute/main arm64 gettext arm64 0.23.2-1 [998 kB] 192s Get:88 http://ftpmaster.internal/ubuntu resolute/main arm64 intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 192s Get:89 http://ftpmaster.internal/ubuntu resolute/main arm64 po-debconf all 1.0.22 [215 kB] 192s Get:90 http://ftpmaster.internal/ubuntu resolute/main arm64 debhelper all 13.28ubuntu1 [916 kB] 192s Get:91 http://ftpmaster.internal/ubuntu resolute/universe arm64 aglfn all 1.7+git20191031.4036a9c-2build1 [33.2 kB] 192s Get:92 http://ftpmaster.internal/ubuntu resolute/universe arm64 gnuplot-data all 6.0.2+dfsg1-2ubuntu1 [76.0 kB] 192s Get:93 http://ftpmaster.internal/ubuntu resolute/universe arm64 fonts-freefont-otf all 20211204+svn4273-4build1 [4594 kB] 193s Get:94 http://ftpmaster.internal/ubuntu resolute/main arm64 fontconfig-config arm64 2.17.1-3ubuntu1 [38.5 kB] 193s Get:95 http://ftpmaster.internal/ubuntu resolute/main arm64 libfontconfig1 arm64 2.17.1-3ubuntu1 [144 kB] 193s Get:96 http://ftpmaster.internal/ubuntu resolute/main arm64 libpixman-1-0 arm64 0.46.4-1 [204 kB] 193s Get:97 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-render0 arm64 1.17.0-2ubuntu1 [16.4 kB] 193s Get:98 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-shm0 arm64 1.17.0-2ubuntu1 [5938 B] 193s Get:99 http://ftpmaster.internal/ubuntu resolute/main arm64 libxrender1 arm64 1:0.9.12-1 [19.5 kB] 193s Get:100 http://ftpmaster.internal/ubuntu resolute/main arm64 libcairo2 arm64 1.18.4-3 [556 kB] 193s Get:101 http://ftpmaster.internal/ubuntu resolute/main arm64 libsharpyuv0 arm64 1.5.0-0.1build1 [16.7 kB] 193s Get:102 http://ftpmaster.internal/ubuntu resolute/main arm64 libaom3 arm64 3.13.1-2 [1773 kB] 193s Get:103 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif-plugin-aomdec arm64 1.21.2-1 [13.9 kB] 193s Get:104 http://ftpmaster.internal/ubuntu resolute/main arm64 libde265-0 arm64 1.0.16-1build1 [148 kB] 193s Get:105 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif-plugin-libde265 arm64 1.21.2-1 [9696 B] 193s Get:106 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif1 arm64 1.21.2-1 [502 kB] 193s Get:107 http://ftpmaster.internal/ubuntu resolute/main arm64 libimagequant0 arm64 2.18.0-1build1 [37.1 kB] 193s Get:108 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg-turbo8 arm64 2.1.5-4ubuntu2 [165 kB] 193s Get:109 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 193s Get:110 http://ftpmaster.internal/ubuntu resolute/main arm64 libdeflate0 arm64 1.23-2 [46.4 kB] 193s Get:111 http://ftpmaster.internal/ubuntu resolute/main arm64 libjbig0 arm64 2.1-6.1ubuntu3 [29.2 kB] 193s Get:112 http://ftpmaster.internal/ubuntu resolute/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu2 [174 kB] 193s Get:113 http://ftpmaster.internal/ubuntu resolute/main arm64 libwebp7 arm64 1.5.0-0.1build1 [205 kB] 193s Get:114 http://ftpmaster.internal/ubuntu resolute/main arm64 libtiff6 arm64 4.7.0-3ubuntu3 [196 kB] 193s Get:115 http://ftpmaster.internal/ubuntu resolute/main arm64 libxpm4 arm64 1:3.5.17-1build3 [35.5 kB] 193s Get:116 http://ftpmaster.internal/ubuntu resolute/main arm64 libgd3 arm64 2.3.3-13ubuntu1 [124 kB] 193s Get:117 http://ftpmaster.internal/ubuntu resolute/main arm64 liblua5.4-0 arm64 5.4.8-1 [171 kB] 193s Get:118 http://ftpmaster.internal/ubuntu resolute/main arm64 fontconfig arm64 2.17.1-3ubuntu1 [181 kB] 193s Get:119 http://ftpmaster.internal/ubuntu resolute/main arm64 libgraphite2-3 arm64 1.3.14-11ubuntu1 [72.1 kB] 193s Get:120 http://ftpmaster.internal/ubuntu resolute/main arm64 libharfbuzz0b arm64 12.3.2-1 [510 kB] 193s Get:121 http://ftpmaster.internal/ubuntu resolute/main arm64 libthai-data all 0.1.30-1 [155 kB] 193s Get:122 http://ftpmaster.internal/ubuntu resolute/main arm64 libdatrie1 arm64 0.2.14-1 [19.6 kB] 193s Get:123 http://ftpmaster.internal/ubuntu resolute/main arm64 libthai0 arm64 0.1.30-1 [18.3 kB] 193s Get:124 http://ftpmaster.internal/ubuntu resolute/main arm64 libpango-1.0-0 arm64 1.57.0-1 [238 kB] 193s Get:125 http://ftpmaster.internal/ubuntu resolute/main arm64 libpangoft2-1.0-0 arm64 1.57.0-1 [51.5 kB] 193s Get:126 http://ftpmaster.internal/ubuntu resolute/main arm64 libpangocairo-1.0-0 arm64 1.57.0-1 [27.9 kB] 193s Get:127 http://ftpmaster.internal/ubuntu resolute/main arm64 libwebpmux3 arm64 1.5.0-0.1build1 [25.2 kB] 193s Get:128 http://ftpmaster.internal/ubuntu resolute/universe arm64 gnuplot-nox arm64 6.0.2+dfsg1-2ubuntu1 [971 kB] 193s Get:129 http://ftpmaster.internal/ubuntu resolute/universe arm64 dh-octave-autopkgtest all 1.14.0 [11.9 kB] 193s Get:130 http://ftpmaster.internal/ubuntu resolute/main arm64 libapt-pkg-perl arm64 0.1.43 [68.1 kB] 193s Get:131 http://ftpmaster.internal/ubuntu resolute/main arm64 libarray-intspan-perl all 2.004-2 [25.0 kB] 193s Get:132 http://ftpmaster.internal/ubuntu resolute/main arm64 libconfig-inifiles-perl all 3.000003-4 [38.5 kB] 193s Get:133 http://ftpmaster.internal/ubuntu resolute/main arm64 libyaml-libyaml-perl arm64 0.904.0+ds-1 [41.1 kB] 193s Get:134 http://ftpmaster.internal/ubuntu resolute/universe arm64 libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 193s Get:135 http://ftpmaster.internal/ubuntu resolute/universe arm64 libexporter-lite-perl all 0.09-2 [9748 B] 193s Get:136 http://ftpmaster.internal/ubuntu resolute/main arm64 libencode-locale-perl all 1.05-3 [11.6 kB] 193s Get:137 http://ftpmaster.internal/ubuntu resolute/main arm64 libtimedate-perl all 2.3300-2 [34.0 kB] 193s Get:138 http://ftpmaster.internal/ubuntu resolute/main arm64 libhttp-date-perl all 6.06-1 [10.2 kB] 193s Get:139 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-listing-perl all 6.16-1 [11.3 kB] 193s Get:140 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 193s Get:141 http://ftpmaster.internal/ubuntu resolute/main arm64 liburi-perl all 5.34-2build1 [100 kB] 193s Get:142 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-parser-perl arm64 3.83-1build1 [85.3 kB] 193s Get:143 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-tree-perl all 5.07-3 [200 kB] 193s Get:144 http://ftpmaster.internal/ubuntu resolute/main arm64 libclone-perl arm64 0.47-1 [10.4 kB] 193s Get:145 http://ftpmaster.internal/ubuntu resolute/main arm64 libio-html-perl all 1.004-3 [15.9 kB] 193s Get:146 http://ftpmaster.internal/ubuntu resolute/main arm64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 193s Get:147 http://ftpmaster.internal/ubuntu resolute/main arm64 libhttp-message-perl all 7.01-1ubuntu1 [76.1 kB] 193s Get:148 http://ftpmaster.internal/ubuntu resolute/main arm64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 193s Get:149 http://ftpmaster.internal/ubuntu resolute/main arm64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 193s Get:150 http://ftpmaster.internal/ubuntu resolute/main arm64 perl-openssl-defaults arm64 7build4 [6710 B] 193s Get:151 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-ssleay-perl arm64 1.94-3 [307 kB] 193s Get:152 http://ftpmaster.internal/ubuntu resolute/main arm64 libio-socket-ssl-perl all 2.098-1 [205 kB] 193s Get:153 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-http-perl all 6.24-1build1 [21.7 kB] 193s Get:154 http://ftpmaster.internal/ubuntu resolute/main arm64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 193s Get:155 http://ftpmaster.internal/ubuntu resolute/main arm64 libwww-robotrules-perl all 6.02-1build1 [12.4 kB] 193s Get:156 http://ftpmaster.internal/ubuntu resolute/main arm64 libwww-perl all 6.81-1build1 [141 kB] 193s Get:157 http://ftpmaster.internal/ubuntu resolute/main arm64 liberror-perl all 0.17030-1 [23.5 kB] 193s Get:158 http://ftpmaster.internal/ubuntu resolute/universe arm64 libparse-debcontrol-perl all 2.005-6 [20.4 kB] 193s Get:159 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsoftware-copyright-perl all 0.015-1 [14.4 kB] 193s Get:160 http://ftpmaster.internal/ubuntu resolute/universe arm64 libalgorithm-c3-perl all 0.11-2 [10.2 kB] 193s Get:161 http://ftpmaster.internal/ubuntu resolute/universe arm64 libclass-c3-perl all 0.35-2 [18.4 kB] 193s Get:162 http://ftpmaster.internal/ubuntu resolute/universe arm64 libmro-compat-perl all 0.15-2 [10.1 kB] 193s Get:163 http://ftpmaster.internal/ubuntu resolute/universe arm64 libdata-section-perl all 0.200008-1 [11.6 kB] 193s Get:164 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-template-perl all 1.61-1 [48.5 kB] 193s Get:165 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsoftware-license-perl all 0.104007-1 [123 kB] 193s Get:166 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 193s Get:167 http://ftpmaster.internal/ubuntu resolute/main arm64 libsort-versions-perl all 1.62-3 [7378 B] 193s Get:168 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-reform-perl all 1.20-5 [35.4 kB] 193s Get:169 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-autoformat-perl all 1.750000-2 [29.8 kB] 193s Get:170 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 193s Get:171 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtoml-tiny-perl all 0.20-1 [21.8 kB] 193s Get:172 http://ftpmaster.internal/ubuntu resolute/main arm64 libclass-inspector-perl all 1.36-3 [15.4 kB] 193s Get:173 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-sharedir-perl all 1.118-3 [14.0 kB] 193s Get:174 http://ftpmaster.internal/ubuntu resolute/main arm64 libindirect-perl arm64 0.39-2build5 [21.7 kB] 193s Get:175 http://ftpmaster.internal/ubuntu resolute/main arm64 libxs-parse-keyword-perl arm64 0.49-1 [61.1 kB] 193s Get:176 http://ftpmaster.internal/ubuntu resolute/main arm64 libxs-parse-sublike-perl arm64 0.41-1 [44.8 kB] 193s Get:177 http://ftpmaster.internal/ubuntu resolute/main arm64 libobject-pad-perl arm64 0.823-2 [129 kB] 193s Get:178 http://ftpmaster.internal/ubuntu resolute/main arm64 libsyntax-keyword-try-perl arm64 0.31-1 [24.4 kB] 193s Get:179 http://ftpmaster.internal/ubuntu resolute/main arm64 libio-interactive-perl all 1.027-1 [10.8 kB] 193s Get:180 http://ftpmaster.internal/ubuntu resolute/main arm64 liblog-any-perl all 1.718-1build1 [69.6 kB] 193s Get:181 http://ftpmaster.internal/ubuntu resolute/main arm64 liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 193s Get:182 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 193s Get:183 http://ftpmaster.internal/ubuntu resolute/main arm64 libvariable-magic-perl arm64 0.64-1build1 [35.3 kB] 193s Get:184 http://ftpmaster.internal/ubuntu resolute/main arm64 libb-hooks-endofscope-perl all 0.28-2 [15.8 kB] 193s Get:185 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-identify-perl arm64 0.14-4 [9940 B] 193s Get:186 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-name-perl arm64 0.28-1 [10.5 kB] 193s Get:187 http://ftpmaster.internal/ubuntu resolute/main arm64 libnamespace-clean-perl all 0.27-2 [14.0 kB] 193s Get:188 http://ftpmaster.internal/ubuntu resolute/main arm64 libnumber-compare-perl all 0.03-3 [5974 B] 193s Get:189 http://ftpmaster.internal/ubuntu resolute/main arm64 libtext-glob-perl all 0.11-3 [6780 B] 193s Get:190 http://ftpmaster.internal/ubuntu resolute/main arm64 libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 193s Get:191 http://ftpmaster.internal/ubuntu resolute/main arm64 libpod-parser-perl all 1.67-1 [80.6 kB] 193s Get:192 http://ftpmaster.internal/ubuntu resolute/main arm64 libpod-constants-perl all 0.19-2 [16.3 kB] 193s Get:193 http://ftpmaster.internal/ubuntu resolute/main arm64 libset-intspan-perl all 1.19-3 [24.8 kB] 193s Get:194 http://ftpmaster.internal/ubuntu resolute/main arm64 libstring-copyright-perl all 0.003014-1 [20.5 kB] 193s Get:195 http://ftpmaster.internal/ubuntu resolute/main arm64 libstring-escape-perl all 2010.002-3 [16.1 kB] 193s Get:196 http://ftpmaster.internal/ubuntu resolute/main arm64 libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 193s Get:197 http://ftpmaster.internal/ubuntu resolute/main arm64 libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 193s Get:198 http://ftpmaster.internal/ubuntu resolute/main arm64 libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 193s Get:199 http://ftpmaster.internal/ubuntu resolute/main arm64 licensecheck all 3.3.9-1ubuntu2 [37.2 kB] 193s Get:200 http://ftpmaster.internal/ubuntu resolute/main arm64 diffstat arm64 1.68-1 [29.1 kB] 193s Get:201 http://ftpmaster.internal/ubuntu resolute/main arm64 libberkeleydb-perl arm64 0.66-2 [118 kB] 193s Get:202 http://ftpmaster.internal/ubuntu resolute/main arm64 libclass-xsaccessor-perl arm64 1.19-4build6 [32.8 kB] 193s Get:203 http://ftpmaster.internal/ubuntu resolute/main arm64 libconfig-tiny-perl all 2.30-1 [14.7 kB] 193s Get:204 http://ftpmaster.internal/ubuntu resolute/main arm64 libconst-fast-perl all 0.014-2 [8034 B] 193s Get:205 http://ftpmaster.internal/ubuntu resolute/main arm64 libcpanel-json-xs-perl arm64 4.40-1 [115 kB] 193s Get:206 http://ftpmaster.internal/ubuntu resolute/main arm64 libaliased-perl all 0.34-3 [12.8 kB] 193s Get:207 http://ftpmaster.internal/ubuntu resolute/main arm64 libclass-data-inheritable-perl all 0.10-1 [8038 B] 193s Get:208 http://ftpmaster.internal/ubuntu resolute/main arm64 libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 193s Get:209 http://ftpmaster.internal/ubuntu resolute/main arm64 libexception-class-perl all 1.45-1 [28.6 kB] 193s Get:210 http://ftpmaster.internal/ubuntu resolute/main arm64 libiterator-perl all 0.03+ds1-2 [18.8 kB] 193s Get:211 http://ftpmaster.internal/ubuntu resolute/main arm64 libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 193s Get:212 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-dpath-perl all 0.60-1 [37.3 kB] 193s Get:213 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-domain-tld-perl all 1.75-4 [29.0 kB] 193s Get:214 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-validate-domain-perl all 0.15-1 [10.4 kB] 193s Get:215 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 193s Get:216 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-netmask-perl all 2.0003-1build1 [24.8 kB] 193s Get:217 http://ftpmaster.internal/ubuntu resolute/main arm64 libnetaddr-ip-perl arm64 4.079+dfsg-2build5 [79.9 kB] 193s Get:218 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-validate-ip-perl all 0.31-1 [17.2 kB] 193s Get:219 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-validate-uri-perl all 0.07-3 [10.8 kB] 193s Get:220 http://ftpmaster.internal/ubuntu resolute/main arm64 libdevel-size-perl arm64 0.85-1 [19.1 kB] 193s Get:221 http://ftpmaster.internal/ubuntu resolute/main arm64 libemail-address-xs-perl arm64 1.05-1build5 [29.0 kB] 193s Get:222 http://ftpmaster.internal/ubuntu resolute/main arm64 libipc-system-simple-perl all 1.30-2 [22.3 kB] 193s Get:223 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-basedir-perl all 0.09-2 [14.4 kB] 193s Get:224 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-find-rule-perl all 0.35-1build1 [24.0 kB] 193s Get:225 http://ftpmaster.internal/ubuntu resolute/main arm64 libio-string-perl all 1.08-4 [11.1 kB] 193s Get:226 http://ftpmaster.internal/ubuntu resolute/main arm64 libfont-ttf-perl all 1.06-2 [323 kB] 193s Get:227 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 193s Get:228 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 193s Get:229 http://ftpmaster.internal/ubuntu resolute/main arm64 libipc-run3-perl all 0.049-1 [28.8 kB] 193s Get:230 http://ftpmaster.internal/ubuntu resolute/main arm64 libjson-maybexs-perl all 1.004008-1 [11.1 kB] 193s Get:231 http://ftpmaster.internal/ubuntu resolute/main arm64 liblist-compare-perl all 0.55-2 [62.9 kB] 193s Get:232 http://ftpmaster.internal/ubuntu resolute/main arm64 liblist-someutils-perl all 0.59-1 [30.4 kB] 193s Get:233 http://ftpmaster.internal/ubuntu resolute/main arm64 liblist-utilsby-perl all 0.12-2 [14.9 kB] 193s Get:234 http://ftpmaster.internal/ubuntu resolute/main arm64 libmldbm-perl all 2.05-4 [16.0 kB] 193s Get:235 http://ftpmaster.internal/ubuntu resolute/main arm64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 193s Get:236 http://ftpmaster.internal/ubuntu resolute/main arm64 libimport-into-perl all 1.002005-2 [10.7 kB] 193s Get:237 http://ftpmaster.internal/ubuntu resolute/main arm64 librole-tiny-perl all 2.002004-1 [16.3 kB] 193s Get:238 http://ftpmaster.internal/ubuntu resolute/main arm64 libsub-quote-perl all 2.006009-1ubuntu1 [20.3 kB] 193s Get:239 http://ftpmaster.internal/ubuntu resolute/main arm64 libmoo-perl all 2.005005-1 [47.4 kB] 193s Get:240 http://ftpmaster.internal/ubuntu resolute/main arm64 libstrictures-perl all 2.000006-1build1 [15.2 kB] 193s Get:241 http://ftpmaster.internal/ubuntu resolute/main arm64 libmoox-aliases-perl all 0.001006-2 [6796 B] 193s Get:242 http://ftpmaster.internal/ubuntu resolute/main arm64 libperlio-gzip-perl arm64 0.20-1build5 [14.6 kB] 193s Get:243 http://ftpmaster.internal/ubuntu resolute/main arm64 libperlio-utf8-strict-perl arm64 0.010-1build4 [11.1 kB] 193s Get:244 http://ftpmaster.internal/ubuntu resolute/main arm64 libproc-processtable-perl arm64 0.637-1 [35.1 kB] 193s Get:245 http://ftpmaster.internal/ubuntu resolute/main arm64 libregexp-wildcards-perl all 1.05-3 [12.9 kB] 193s Get:246 http://ftpmaster.internal/ubuntu resolute/main arm64 libsereal-decoder-perl arm64 5.004+ds-1build5 [102 kB] 193s Get:247 http://ftpmaster.internal/ubuntu resolute/main arm64 libsereal-encoder-perl arm64 5.004+ds-1build4 [104 kB] 193s Get:248 http://ftpmaster.internal/ubuntu resolute/main arm64 libterm-readkey-perl arm64 2.38-2build5 [23.2 kB] 193s Get:249 http://ftpmaster.internal/ubuntu resolute/main arm64 libtext-levenshteinxs-perl arm64 0.03-5build5 [8052 B] 193s Get:250 http://ftpmaster.internal/ubuntu resolute/main arm64 libmarkdown2 arm64 2.2.7-2.1build1 [37.6 kB] 193s Get:251 http://ftpmaster.internal/ubuntu resolute/main arm64 libtext-markdown-discount-perl arm64 0.18-1 [12.4 kB] 193s Get:252 http://ftpmaster.internal/ubuntu resolute/main arm64 libdata-messagepack-perl arm64 1.02-3 [31.0 kB] 193s Get:253 http://ftpmaster.internal/ubuntu resolute/main arm64 libtext-xslate-perl arm64 3.5.9-2build1 [161 kB] 193s Get:254 http://ftpmaster.internal/ubuntu resolute/main arm64 libtime-duration-perl all 1.21-2 [12.3 kB] 193s Get:255 http://ftpmaster.internal/ubuntu resolute/main arm64 libtime-moment-perl arm64 0.46-1 [76.7 kB] 193s Get:256 http://ftpmaster.internal/ubuntu resolute/main arm64 libunicode-utf8-perl arm64 0.63-1 [18.6 kB] 193s Get:257 http://ftpmaster.internal/ubuntu resolute/main arm64 libcgi-pm-perl all 4.71-1build1 [185 kB] 193s Get:258 http://ftpmaster.internal/ubuntu resolute/main arm64 libhtml-form-perl all 6.13-1build1 [31.3 kB] 193s Get:259 http://ftpmaster.internal/ubuntu resolute/main arm64 libwww-mechanize-perl all 2.20-1ubuntu1 [95.5 kB] 193s Get:260 http://ftpmaster.internal/ubuntu resolute/main arm64 libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 193s Get:261 http://ftpmaster.internal/ubuntu resolute/main arm64 libxml-sax-base-perl all 1.09-3 [18.9 kB] 193s Get:262 http://ftpmaster.internal/ubuntu resolute/main arm64 libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 193s Get:263 http://ftpmaster.internal/ubuntu resolute/main arm64 libxml-libxml-perl arm64 2.0207+dfsg+really+2.0207-0ubuntu7 [305 kB] 193s Get:264 http://ftpmaster.internal/ubuntu resolute/main arm64 lzip arm64 1.25-4 [84.2 kB] 193s Get:265 http://ftpmaster.internal/ubuntu resolute/main arm64 lzop arm64 1.04-2build4 [82.6 kB] 193s Get:266 http://ftpmaster.internal/ubuntu resolute/main arm64 patchutils arm64 0.4.3-1 [79.7 kB] 193s Get:267 http://ftpmaster.internal/ubuntu resolute/main arm64 t1utils arm64 1.41-4build4 [59.8 kB] 193s Get:268 http://ftpmaster.internal/ubuntu resolute/main arm64 unzip arm64 6.0-29ubuntu1 [176 kB] 193s Get:269 http://ftpmaster.internal/ubuntu resolute/main arm64 lintian all 2.127.0ubuntu1 [1079 kB] 193s Get:270 http://ftpmaster.internal/ubuntu resolute/universe arm64 libconfig-model-dpkg-perl all 3.016 [194 kB] 193s Get:271 http://ftpmaster.internal/ubuntu resolute/main arm64 libconvert-binhex-perl all 1.125-3 [27.1 kB] 193s Get:272 http://ftpmaster.internal/ubuntu resolute/main arm64 libnet-smtp-ssl-perl all 1.04-2 [6218 B] 193s Get:273 http://ftpmaster.internal/ubuntu resolute/main arm64 libmailtools-perl all 2.22-1 [77.1 kB] 193s Get:274 http://ftpmaster.internal/ubuntu resolute/main arm64 libmime-tools-perl all 5.515-1 [187 kB] 193s Get:275 http://ftpmaster.internal/ubuntu resolute/universe arm64 libb-keywords-perl all 1.29-1 [10.4 kB] 193s Get:276 http://ftpmaster.internal/ubuntu resolute/universe arm64 libclass-tiny-perl all 1.008-2 [16.4 kB] 193s Get:277 http://ftpmaster.internal/ubuntu resolute/universe arm64 liblingua-en-inflect-perl all 1.905-2 [50.8 kB] 193s Get:278 http://ftpmaster.internal/ubuntu resolute/universe arm64 libpod-spell-perl all 1.27-1 [30.4 kB] 193s Get:279 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsafe-isa-perl all 1.000010-1build1 [7334 B] 193s Get:280 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtask-weaken-perl all 1.06-2 [7924 B] 193s Get:281 http://ftpmaster.internal/ubuntu resolute/universe arm64 libppi-perl all 1.284-1 [281 kB] 193s Get:282 http://ftpmaster.internal/ubuntu resolute/universe arm64 libreadonly-perl all 2.050-3 [19.9 kB] 193s Get:283 http://ftpmaster.internal/ubuntu resolute/universe arm64 libppix-quotelike-perl all 0.023-1 [71.6 kB] 193s Get:284 http://ftpmaster.internal/ubuntu resolute/universe arm64 libppix-regexp-perl all 0.091-1 [234 kB] 193s Get:285 http://ftpmaster.internal/ubuntu resolute/universe arm64 libppix-utils-perl all 0.003-2 [28.4 kB] 193s Get:286 http://ftpmaster.internal/ubuntu resolute/universe arm64 libstring-format-perl all 1.18-1build1 [8824 B] 193s Get:287 http://ftpmaster.internal/ubuntu resolute/universe arm64 perltidy all 20250105-1build1 [645 kB] 193s Get:288 http://ftpmaster.internal/ubuntu resolute/universe arm64 libperl-critic-perl all 1.156-1 [654 kB] 193s Get:289 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-wrapper-perl all 1.05-4 [9820 B] 193s Get:290 http://ftpmaster.internal/ubuntu resolute/main arm64 libsuitesparseconfig7 arm64 1:7.12.1+dfsg-1 [22.0 kB] 193s Get:291 http://ftpmaster.internal/ubuntu resolute/universe arm64 libamd3 arm64 1:7.12.1+dfsg-1 [34.6 kB] 193s Get:292 http://ftpmaster.internal/ubuntu resolute/main arm64 libblas3 arm64 3.12.1-7ubuntu1 [181 kB] 193s Get:293 http://ftpmaster.internal/ubuntu resolute/main arm64 libgfortran5 arm64 15.2.0-12ubuntu1 [451 kB] 193s Get:294 http://ftpmaster.internal/ubuntu resolute/main arm64 liblapack3 arm64 3.12.1-7ubuntu1 [2299 kB] 194s Get:295 http://ftpmaster.internal/ubuntu resolute/universe arm64 libarpack2t64 arm64 3.9.1-6 [94.9 kB] 194s Get:296 http://ftpmaster.internal/ubuntu resolute/universe arm64 libccolamd3 arm64 1:7.12.1+dfsg-1 [33.5 kB] 194s Get:297 http://ftpmaster.internal/ubuntu resolute/universe arm64 libcamd3 arm64 1:7.12.1+dfsg-1 [30.8 kB] 194s Get:298 http://ftpmaster.internal/ubuntu resolute/main arm64 libcolamd3 arm64 1:7.12.1+dfsg-1 [27.1 kB] 194s Get:299 http://ftpmaster.internal/ubuntu resolute/universe arm64 libcholmod5 arm64 1:7.12.1+dfsg-1 [626 kB] 194s Get:300 http://ftpmaster.internal/ubuntu resolute/universe arm64 libcxsparse4 arm64 1:7.12.1+dfsg-1 [78.1 kB] 194s Get:301 http://ftpmaster.internal/ubuntu resolute/main arm64 libfftw3-double3 arm64 3.3.10-2fakesync1build2 [399 kB] 194s Get:302 http://ftpmaster.internal/ubuntu resolute/main arm64 libfftw3-single3 arm64 3.3.10-2fakesync1build2 [611 kB] 194s Get:303 http://ftpmaster.internal/ubuntu resolute/main arm64 libxfixes3 arm64 1:6.0.0-2build2 [11.4 kB] 194s Get:304 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcursor1 arm64 1:1.2.3-1build1 [22.0 kB] 194s Get:305 http://ftpmaster.internal/ubuntu resolute/main arm64 libxft2 arm64 2.3.6-1build2 [43.2 kB] 194s Get:306 http://ftpmaster.internal/ubuntu resolute/main arm64 libxinerama1 arm64 2:1.1.4-3build2 [6486 B] 194s Get:307 http://ftpmaster.internal/ubuntu resolute/universe arm64 libfltk1.3t64 arm64 1.3.11-3 [599 kB] 194s Get:308 http://ftpmaster.internal/ubuntu resolute/main arm64 libglvnd0 arm64 1.7.0-3 [57.9 kB] 194s Get:309 http://ftpmaster.internal/ubuntu resolute/main arm64 libx11-xcb1 arm64 2:1.8.12-1build1 [8216 B] 194s Get:310 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-dri3-0 arm64 1.17.0-2ubuntu1 [7624 B] 194s Get:311 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-present0 arm64 1.17.0-2ubuntu1 [6198 B] 194s Get:312 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-randr0 arm64 1.17.0-2ubuntu1 [18.1 kB] 194s Get:313 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-sync1 arm64 1.17.0-2ubuntu1 [9620 B] 194s Get:314 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-xfixes0 arm64 1.17.0-2ubuntu1 [10.4 kB] 194s Get:315 http://ftpmaster.internal/ubuntu resolute/main arm64 libxshmfence1 arm64 1.3.3-1build1 [5482 B] 194s Get:316 http://ftpmaster.internal/ubuntu resolute/main arm64 mesa-libgallium arm64 25.3.3-1ubuntu1 [12.1 MB] 194s Get:317 http://ftpmaster.internal/ubuntu resolute/main arm64 libgbm1 arm64 25.3.3-1ubuntu1 [34.4 kB] 194s Get:318 http://ftpmaster.internal/ubuntu resolute/main arm64 libvulkan1 arm64 1.4.335.0-1 [171 kB] 194s Get:319 http://ftpmaster.internal/ubuntu resolute/main arm64 libgl1-mesa-dri arm64 25.3.3-1ubuntu1 [36.4 kB] 194s Get:320 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-glx0 arm64 1.17.0-2ubuntu1 [25.1 kB] 194s Get:321 http://ftpmaster.internal/ubuntu resolute/main arm64 libxxf86vm1 arm64 1:1.1.4-2 [10.2 kB] 194s Get:322 http://ftpmaster.internal/ubuntu resolute/main arm64 libglx-mesa0 arm64 25.3.3-1ubuntu1 [110 kB] 194s Get:323 http://ftpmaster.internal/ubuntu resolute/main arm64 libglx0 arm64 1.7.0-3 [33.0 kB] 194s Get:324 http://ftpmaster.internal/ubuntu resolute/main arm64 libgl1 arm64 1.7.0-3 [102 kB] 194s Get:325 http://ftpmaster.internal/ubuntu resolute/universe arm64 libfltk-gl1.3t64 arm64 1.3.11-3 [40.6 kB] 194s Get:326 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgl2ps1.4 arm64 1.4.2+dfsg1-4 [44.7 kB] 194s Get:327 http://ftpmaster.internal/ubuntu resolute/main arm64 libltdl7 arm64 2.5.4-9 [43.3 kB] 194s Get:328 http://ftpmaster.internal/ubuntu resolute/universe arm64 libglpk40 arm64 5.0-2 [347 kB] 194s Get:329 http://ftpmaster.internal/ubuntu resolute/main arm64 libopengl0 arm64 1.7.0-3 [34.4 kB] 194s Get:330 http://ftpmaster.internal/ubuntu resolute/universe arm64 libglu1-mesa arm64 9.0.2-1.1build2 [145 kB] 194s Get:331 http://ftpmaster.internal/ubuntu resolute/main arm64 libhwy1t64 arm64 1.3.0-2 [513 kB] 194s Get:332 http://ftpmaster.internal/ubuntu resolute/main arm64 liblcms2-2 arm64 2.17-1 [170 kB] 194s Get:333 http://ftpmaster.internal/ubuntu resolute/main arm64 libjxl0.11 arm64 0.11.1-6ubuntu1 [909 kB] 194s Get:334 http://ftpmaster.internal/ubuntu resolute/main arm64 libwmflite-0.2-7 arm64 0.2.13-2 [67.2 kB] 194s Get:335 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgraphicsmagick-q16-3t64 arm64 1.4+really1.3.45+hg17696-1build1 [1228 kB] 195s Get:336 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgraphicsmagick++-q16-12t64 arm64 1.4+really1.3.45+hg17696-1build1 [120 kB] 195s Get:337 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsz2 arm64 1.1.5-1 [17.0 kB] 195s Get:338 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-310 arm64 1.14.6+repack-2 [1287 kB] 195s Get:339 http://ftpmaster.internal/ubuntu resolute/main arm64 libasound2-data all 1.2.15.3-1ubuntu1 [21.4 kB] 195s Get:340 http://ftpmaster.internal/ubuntu resolute/main arm64 libasound2t64 arm64 1.2.15.3-1ubuntu1 [402 kB] 195s Get:341 http://ftpmaster.internal/ubuntu resolute/main arm64 libopus0 arm64 1.6.1-1 [3538 kB] 195s Get:342 http://ftpmaster.internal/ubuntu resolute/main arm64 libsamplerate0 arm64 0.2.2-4build2 [1341 kB] 195s Get:343 http://ftpmaster.internal/ubuntu resolute/main arm64 libjack-jackd2-0 arm64 1.9.22~dfsg-5 [309 kB] 195s Get:344 http://ftpmaster.internal/ubuntu resolute/main arm64 libasyncns0 arm64 0.8-7 [11.7 kB] 195s Get:345 http://ftpmaster.internal/ubuntu resolute/main arm64 libogg0 arm64 1.3.6-2 [23.0 kB] 195s Get:346 http://ftpmaster.internal/ubuntu resolute/main arm64 libflac14 arm64 1.5.0+ds-5 [141 kB] 195s Get:347 http://ftpmaster.internal/ubuntu resolute/main arm64 libmp3lame0 arm64 3.100-6build2 [144 kB] 195s Get:348 http://ftpmaster.internal/ubuntu resolute/main arm64 libmpg123-0t64 arm64 1.33.3-2 [177 kB] 195s Get:349 http://ftpmaster.internal/ubuntu resolute/main arm64 libvorbis0a arm64 1.3.7-3build1 [99.3 kB] 195s Get:350 http://ftpmaster.internal/ubuntu resolute/main arm64 libvorbisenc2 arm64 1.3.7-3build1 [79.8 kB] 195s Get:351 http://ftpmaster.internal/ubuntu resolute/main arm64 libsndfile1 arm64 1.2.2-4 [213 kB] 195s Get:352 http://ftpmaster.internal/ubuntu resolute/main arm64 libpulse0 arm64 1:17.0+dfsg1-2ubuntu4 [271 kB] 195s Get:353 http://ftpmaster.internal/ubuntu resolute/universe arm64 libportaudio2 arm64 19.7.0+git20251227.3270c9ae-0ubuntu1 [74.6 kB] 195s Get:354 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqhull-r8.0 arm64 2020.2-8 [191 kB] 195s Get:355 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqrupdate1 arm64 1.1.5-3 [36.9 kB] 195s Get:356 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqscintilla2-qt6-l10n all 2.14.1+dfsg-2 [55.5 kB] 195s Get:357 http://ftpmaster.internal/ubuntu resolute/universe arm64 libb2-1 arm64 0.98.1-1.1build2 [18.9 kB] 195s Get:358 http://ftpmaster.internal/ubuntu resolute/universe arm64 libdouble-conversion3 arm64 3.4.0-1 [39.1 kB] 195s Get:359 http://ftpmaster.internal/ubuntu resolute/main arm64 libpcre2-16-0 arm64 10.46-1 [225 kB] 195s Get:360 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6core6t64 arm64 6.9.2+dfsg-3ubuntu2 [1944 kB] 195s Get:361 http://ftpmaster.internal/ubuntu resolute/main arm64 libwayland-client0 arm64 1.24.0-2 [27.6 kB] 195s Get:362 http://ftpmaster.internal/ubuntu resolute/main arm64 libegl-mesa0 arm64 25.3.3-1ubuntu1 [115 kB] 195s Get:363 http://ftpmaster.internal/ubuntu resolute/main arm64 libegl1 arm64 1.7.0-3 [29.7 kB] 195s Get:364 http://ftpmaster.internal/ubuntu resolute/main arm64 x11-common all 1:7.7+24ubuntu1 [22.4 kB] 195s Get:365 http://ftpmaster.internal/ubuntu resolute/main arm64 libice6 arm64 2:1.1.1-1build1 [43.0 kB] 195s Get:366 http://ftpmaster.internal/ubuntu resolute/main arm64 libmtdev1t64 arm64 1.1.7-1build1 [14.9 kB] 195s Get:367 http://ftpmaster.internal/ubuntu resolute/main arm64 libwacom-common all 2.16.1-1 [113 kB] 195s Get:368 http://ftpmaster.internal/ubuntu resolute/main arm64 libwacom9 arm64 2.16.1-1 [28.2 kB] 195s Get:369 http://ftpmaster.internal/ubuntu resolute/main arm64 libinput-bin arm64 1.30.1-1 [24.9 kB] 195s Get:370 http://ftpmaster.internal/ubuntu resolute/main arm64 libinput10 arm64 1.30.1-1 [153 kB] 195s Get:371 http://ftpmaster.internal/ubuntu resolute/universe arm64 libmd4c0 arm64 0.5.2-2build1 [42.4 kB] 195s Get:372 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6dbus6 arm64 6.9.2+dfsg-3ubuntu2 [270 kB] 195s Get:373 http://ftpmaster.internal/ubuntu resolute/main arm64 libsm6 arm64 2:1.2.6-1 [16.6 kB] 195s Get:374 http://ftpmaster.internal/ubuntu resolute/universe arm64 libts0t64 arm64 1.22-1.1build2 [64.9 kB] 195s Get:375 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-util1 arm64 0.4.1-1build1 [10.7 kB] 195s Get:376 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxcb-image0 arm64 0.4.0-2build2 [10.8 kB] 195s Get:377 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxcb-render-util0 arm64 0.3.10-1build1 [10.4 kB] 195s Get:378 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxcb-cursor0 arm64 0.1.5-1build1 [10.6 kB] 195s Get:379 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxcb-icccm4 arm64 0.4.2-1build1 [10.9 kB] 195s Get:380 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxcb-keysyms1 arm64 0.4.1-1build1 [8790 B] 195s Get:381 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-shape0 arm64 1.17.0-2ubuntu1 [6360 B] 195s Get:382 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-xinput0 arm64 1.17.0-2ubuntu1 [33.3 kB] 195s Get:383 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb-xkb1 arm64 1.17.0-2ubuntu1 [32.2 kB] 195s Get:384 http://ftpmaster.internal/ubuntu resolute/main arm64 libxkbcommon-x11-0 arm64 1.12.3-1 [13.8 kB] 195s Get:385 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6gui6 arm64 6.9.2+dfsg-3ubuntu2 [3314 kB] 195s Get:386 http://ftpmaster.internal/ubuntu resolute/main arm64 libavahi-common-data arm64 0.8-17ubuntu2 [31.5 kB] 195s Get:387 http://ftpmaster.internal/ubuntu resolute/main arm64 libavahi-common3 arm64 0.8-17ubuntu2 [22.6 kB] 195s Get:388 http://ftpmaster.internal/ubuntu resolute/main arm64 libavahi-client3 arm64 0.8-17ubuntu2 [26.7 kB] 195s Get:389 http://ftpmaster.internal/ubuntu resolute/main arm64 libcups2t64 arm64 2.4.16-1ubuntu1 [271 kB] 195s Get:390 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6widgets6 arm64 6.9.2+dfsg-3ubuntu2 [2783 kB] 196s Get:391 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6printsupport6 arm64 6.9.2+dfsg-3ubuntu2 [222 kB] 196s Get:392 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqscintilla2-qt6-15 arm64 2.14.1+dfsg-2 [1160 kB] 196s Get:393 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6core5compat6 arm64 6.9.2-3build1 [144 kB] 196s Get:394 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6sql6 arm64 6.9.2+dfsg-3ubuntu2 [142 kB] 196s Get:395 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6help6 arm64 6.9.2-5 [192 kB] 196s Get:396 http://ftpmaster.internal/ubuntu resolute/main arm64 libduktape207 arm64 2.7.0+tests-0ubuntu4 [144 kB] 196s Get:397 http://ftpmaster.internal/ubuntu resolute/main arm64 libproxy1v5 arm64 0.5.12-1 [27.7 kB] 196s Get:398 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6network6 arm64 6.9.2+dfsg-3ubuntu2 [834 kB] 196s Get:399 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6opengl6 arm64 6.9.2+dfsg-3ubuntu2 [425 kB] 196s Get:400 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6openglwidgets6 arm64 6.9.2+dfsg-3ubuntu2 [43.8 kB] 196s Get:401 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqt6xml6 arm64 6.9.2+dfsg-3ubuntu2 [81.6 kB] 196s Get:402 http://ftpmaster.internal/ubuntu resolute/universe arm64 libspqr4 arm64 1:7.12.1+dfsg-1 [137 kB] 196s Get:403 http://ftpmaster.internal/ubuntu resolute/universe arm64 libumfpack6 arm64 1:7.12.1+dfsg-1 [254 kB] 196s Get:404 http://ftpmaster.internal/ubuntu resolute/universe arm64 libtext-unidecode-perl all 1.30-3 [105 kB] 196s Get:405 http://ftpmaster.internal/ubuntu resolute/main arm64 libintl-perl all 1.35-1 [701 kB] 196s Get:406 http://ftpmaster.internal/ubuntu resolute/universe arm64 texinfo-lib arm64 7.2-5 [454 kB] 196s Get:407 http://ftpmaster.internal/ubuntu resolute/universe arm64 tex-common all 6.20 [30.0 kB] 196s Get:408 http://ftpmaster.internal/ubuntu resolute/universe arm64 texinfo all 7.2-5 [1217 kB] 196s Get:409 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave-common all 10.3.0-3 [6088 kB] 197s Get:410 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave arm64 10.3.0-3 [9068 kB] 197s Get:411 http://ftpmaster.internal/ubuntu resolute/main arm64 libncurses-dev arm64 6.6+20251231-1 [391 kB] 197s Get:412 http://ftpmaster.internal/ubuntu resolute/main arm64 libreadline-dev arm64 8.3-3 [199 kB] 197s Get:413 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-fortran-310 arm64 1.14.6+repack-2 [104 kB] 197s Get:414 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-hl-310 arm64 1.14.6+repack-2 [59.1 kB] 197s Get:415 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-hl-fortran-310 arm64 1.14.6+repack-2 [31.1 kB] 197s Get:416 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-cpp-310 arm64 1.14.6+repack-2 [117 kB] 197s Get:417 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-hl-cpp-310 arm64 1.14.6+repack-2 [11.7 kB] 197s Get:418 http://ftpmaster.internal/ubuntu resolute/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1ubuntu2 [899 kB] 197s Get:419 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg-turbo8-dev arm64 2.1.5-4ubuntu2 [306 kB] 197s Get:420 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 197s Get:421 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 197s Get:422 http://ftpmaster.internal/ubuntu resolute/universe arm64 libaec0 arm64 1.1.5-1 [21.8 kB] 197s Get:423 http://ftpmaster.internal/ubuntu resolute/universe arm64 libaec-dev arm64 1.1.5-1 [22.7 kB] 197s Get:424 http://ftpmaster.internal/ubuntu resolute/main arm64 libbrotli-dev arm64 1.1.0-2build6 [355 kB] 197s Get:425 http://ftpmaster.internal/ubuntu resolute/main arm64 libidn2-dev arm64 2.3.8-4 [123 kB] 197s Get:426 http://ftpmaster.internal/ubuntu resolute/main arm64 comerr-dev arm64 2.1-1.47.2-3ubuntu2 [45.6 kB] 197s Get:427 http://ftpmaster.internal/ubuntu resolute/main arm64 libgssrpc4t64 arm64 1.22.1-2 [57.9 kB] 197s Get:428 http://ftpmaster.internal/ubuntu resolute/main arm64 libkadm5clnt-mit12 arm64 1.22.1-2 [39.9 kB] 197s Get:429 http://ftpmaster.internal/ubuntu resolute/main arm64 libkdb5-10t64 arm64 1.22.1-2 [41.4 kB] 197s Get:430 http://ftpmaster.internal/ubuntu resolute/main arm64 libkadm5srv-mit12 arm64 1.22.1-2 [54.8 kB] 197s Get:431 http://ftpmaster.internal/ubuntu resolute/main arm64 krb5-multidev arm64 1.22.1-2 [126 kB] 197s Get:432 http://ftpmaster.internal/ubuntu resolute/main arm64 libkrb5-dev arm64 1.22.1-2 [11.9 kB] 197s Get:433 http://ftpmaster.internal/ubuntu resolute/main arm64 libldap-dev arm64 2.6.10+dfsg-1ubuntu5 [317 kB] 197s Get:434 http://ftpmaster.internal/ubuntu resolute/main arm64 libpkgconf3 arm64 1.8.1-4build1 [33.7 kB] 197s Get:435 http://ftpmaster.internal/ubuntu resolute/main arm64 pkgconf-bin arm64 1.8.1-4build1 [21.7 kB] 197s Get:436 http://ftpmaster.internal/ubuntu resolute/main arm64 pkgconf arm64 1.8.1-4build1 [16.8 kB] 197s Get:437 http://ftpmaster.internal/ubuntu resolute/main arm64 libnghttp2-dev arm64 1.64.0-1.1ubuntu1 [119 kB] 197s Get:438 http://ftpmaster.internal/ubuntu resolute/main arm64 libpsl-dev arm64 0.21.2-1.1build2 [79.1 kB] 197s Get:439 http://ftpmaster.internal/ubuntu resolute/main arm64 libgmpxx4ldbl arm64 2:6.3.0+dfsg-5ubuntu1 [9944 B] 197s Get:440 http://ftpmaster.internal/ubuntu resolute/main arm64 libgmp-dev arm64 2:6.3.0+dfsg-5ubuntu1 [348 kB] 197s Get:441 http://ftpmaster.internal/ubuntu resolute/main arm64 libevent-2.1-7t64 arm64 2.1.12-stable-10build1 [152 kB] 197s Get:442 http://ftpmaster.internal/ubuntu resolute/main arm64 libunbound8 arm64 1.24.2-1ubuntu1 [436 kB] 197s Get:443 http://ftpmaster.internal/ubuntu resolute/main arm64 libgnutls-dane0t64 arm64 3.8.10-3ubuntu1 [24.5 kB] 197s Get:444 http://ftpmaster.internal/ubuntu resolute/main arm64 libgnutls-openssl27t64 arm64 3.8.10-3ubuntu1 [24.4 kB] 197s Get:445 http://ftpmaster.internal/ubuntu resolute/main arm64 libp11-kit-dev arm64 0.25.10-1 [29.3 kB] 197s Get:446 http://ftpmaster.internal/ubuntu resolute/main arm64 libtasn1-6-dev arm64 4.21.0-2 [91.3 kB] 197s Get:447 http://ftpmaster.internal/ubuntu resolute/main arm64 nettle-dev arm64 3.10.2-1 [1183 kB] 197s Get:448 http://ftpmaster.internal/ubuntu resolute/main arm64 libgnutls28-dev arm64 3.8.10-3ubuntu1 [1126 kB] 197s Get:449 http://ftpmaster.internal/ubuntu resolute/main arm64 librtmp-dev arm64 2.4+20151223.gitfa8646d.1-3 [70.6 kB] 197s Get:450 http://ftpmaster.internal/ubuntu resolute/main arm64 libssl-dev arm64 3.5.3-1ubuntu2 [3448 kB] 198s Get:451 http://ftpmaster.internal/ubuntu resolute/main arm64 libssh2-1-dev arm64 1.11.1-1build1 [292 kB] 198s Get:452 http://ftpmaster.internal/ubuntu resolute/main arm64 libzstd-dev arm64 1.5.7+dfsg-3 [349 kB] 198s Get:453 http://ftpmaster.internal/ubuntu resolute/main arm64 libcurl4-openssl-dev arm64 8.18.0-1ubuntu1 [548 kB] 198s Get:454 http://ftpmaster.internal/ubuntu resolute/universe arm64 hdf5-helpers arm64 1.14.6+repack-2 [17.3 kB] 198s Get:455 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-dev arm64 1.14.6+repack-2 [3483 kB] 198s Get:456 http://ftpmaster.internal/ubuntu resolute/main arm64 xorg-sgml-doctools all 1:1.11-1.1build1 [10.3 kB] 198s Get:457 http://ftpmaster.internal/ubuntu resolute/main arm64 x11proto-dev all 2025.1-1 [608 kB] 198s Get:458 http://ftpmaster.internal/ubuntu resolute/main arm64 libxau-dev arm64 1:1.0.11-1build1 [10.6 kB] 198s Get:459 http://ftpmaster.internal/ubuntu resolute/main arm64 libxdmcp-dev arm64 1:1.1.5-2 [25.9 kB] 198s Get:460 http://ftpmaster.internal/ubuntu resolute/main arm64 xtrans-dev all 1.6.0-1build1 [66.2 kB] 198s Get:461 http://ftpmaster.internal/ubuntu resolute/main arm64 libxcb1-dev arm64 1.17.0-2ubuntu1 [90.0 kB] 198s Get:462 http://ftpmaster.internal/ubuntu resolute/main arm64 libx11-dev arm64 2:1.8.12-1build1 [776 kB] 198s Get:463 http://ftpmaster.internal/ubuntu resolute/main arm64 libglx-dev arm64 1.7.0-3 [14.1 kB] 198s Get:464 http://ftpmaster.internal/ubuntu resolute/main arm64 libgl-dev arm64 1.7.0-3 [103 kB] 198s Get:465 http://ftpmaster.internal/ubuntu resolute/main arm64 libblas-dev arm64 3.12.1-7ubuntu1 [160 kB] 198s Get:466 http://ftpmaster.internal/ubuntu resolute/main arm64 liblapack-dev arm64 3.12.1-7ubuntu1 [4456 kB] 198s Get:467 http://ftpmaster.internal/ubuntu resolute/main arm64 libfftw3-long3 arm64 3.3.10-2fakesync1build2 [636 kB] 198s Get:468 http://ftpmaster.internal/ubuntu resolute/main arm64 libfftw3-bin arm64 3.3.10-2fakesync1build2 [34.5 kB] 198s Get:469 http://ftpmaster.internal/ubuntu resolute/main arm64 libfftw3-dev arm64 3.3.10-2fakesync1build2 [1500 kB] 198s Get:470 http://ftpmaster.internal/ubuntu resolute/main arm64 libgfortran-15-dev arm64 15.2.0-12ubuntu1 [490 kB] 198s Get:471 http://ftpmaster.internal/ubuntu resolute/main arm64 gfortran-15-aarch64-linux-gnu arm64 15.2.0-12ubuntu1 [12.5 MB] 199s Get:472 http://ftpmaster.internal/ubuntu resolute/main arm64 gfortran-15 arm64 15.2.0-12ubuntu1 [18.1 kB] 199s Get:473 http://ftpmaster.internal/ubuntu resolute/main arm64 gfortran-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [1022 B] 199s Get:474 http://ftpmaster.internal/ubuntu resolute/main arm64 gfortran arm64 4:15.2.0-4ubuntu1 [1160 B] 199s Get:475 http://ftpmaster.internal/ubuntu resolute/main arm64 libstdc++-15-dev arm64 15.2.0-12ubuntu1 [2549 kB] 199s Get:476 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-15-aarch64-linux-gnu arm64 15.2.0-12ubuntu1 [13.2 MB] 199s Get:477 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-15 arm64 15.2.0-12ubuntu1 [25.3 kB] 199s Get:478 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [956 B] 199s Get:479 http://ftpmaster.internal/ubuntu resolute/main arm64 g++ arm64 4:15.2.0-4ubuntu1 [1080 B] 199s Get:480 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave-dev arm64 10.3.0-3 [464 kB] 199s Get:481 http://ftpmaster.internal/ubuntu resolute/universe arm64 dh-octave all 1.14.0 [21.1 kB] 199s Get:482 http://ftpmaster.internal/ubuntu resolute/main arm64 libfontenc1 arm64 1:1.1.8-1build2 [13.9 kB] 199s Get:483 http://ftpmaster.internal/ubuntu resolute/main arm64 libunwind8 arm64 1.8.3-0ubuntu1 [60.8 kB] 199s Get:484 http://ftpmaster.internal/ubuntu resolute/main arm64 libxt6t64 arm64 1:1.2.1-1.3 [168 kB] 199s Get:485 http://ftpmaster.internal/ubuntu resolute/main arm64 libxmu6 arm64 2:1.1.3-4 [47.6 kB] 199s Get:486 http://ftpmaster.internal/ubuntu resolute/main arm64 libxaw7 arm64 2:1.0.16-1build1 [183 kB] 199s Get:487 http://ftpmaster.internal/ubuntu resolute/main arm64 libxfont2 arm64 1:2.0.6-2 [90.8 kB] 199s Get:488 http://ftpmaster.internal/ubuntu resolute/main arm64 libxkbfile1 arm64 1:1.1.0-1build5 [69.0 kB] 199s Get:489 http://ftpmaster.internal/ubuntu resolute/main arm64 libxrandr2 arm64 2:1.5.4-1build1 [19.1 kB] 199s Get:490 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave-io arm64 2.7.0-3 [254 kB] 199s Get:491 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave-statistics-common all 1.7.6-2 [1008 kB] 199s Get:492 http://ftpmaster.internal/ubuntu resolute/universe arm64 octave-statistics arm64 1.7.6-2 [157 kB] 199s Get:493 http://ftpmaster.internal/ubuntu resolute/main arm64 x11-xkb-utils arm64 7.7+9build1 [165 kB] 199s Get:494 http://ftpmaster.internal/ubuntu resolute/main arm64 xserver-common all 2:21.1.21-1ubuntu1 [34.8 kB] 199s Get:495 http://ftpmaster.internal/ubuntu resolute/universe arm64 xvfb arm64 2:21.1.21-1ubuntu1 [872 kB] 200s Fetched 199 MB in 18s (11.0 MB/s) 200s Selecting previously unselected package libfyaml0:arm64. 200s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 89360 files and directories currently installed.) 200s Preparing to unpack .../000-libfyaml0_0.9.3-1_arm64.deb ... 200s Unpacking libfyaml0:arm64 (0.9.3-1) ... 200s Selecting previously unselected package libstemmer0d:arm64. 200s Preparing to unpack .../001-libstemmer0d_3.0.1-1_arm64.deb ... 200s Unpacking libstemmer0d:arm64 (3.0.1-1) ... 200s Selecting previously unselected package libappstream5:arm64. 200s Preparing to unpack .../002-libappstream5_1.1.1-1_arm64.deb ... 200s Unpacking libappstream5:arm64 (1.1.1-1) ... 200s Selecting previously unselected package appstream. 200s Preparing to unpack .../003-appstream_1.1.1-1_arm64.deb ... 200s Unpacking appstream (1.1.1-1) ... 200s Selecting previously unselected package m4. 200s Preparing to unpack .../004-m4_1.4.20-2_arm64.deb ... 200s Unpacking m4 (1.4.20-2) ... 200s Selecting previously unselected package autoconf. 200s Preparing to unpack .../005-autoconf_2.72-3.1ubuntu1_all.deb ... 200s Unpacking autoconf (2.72-3.1ubuntu1) ... 200s Selecting previously unselected package autotools-dev. 200s Preparing to unpack .../006-autotools-dev_20240727.1_all.deb ... 200s Unpacking autotools-dev (20240727.1) ... 200s Selecting previously unselected package automake. 200s Preparing to unpack .../007-automake_1%3a1.18.1-3build1_all.deb ... 200s Unpacking automake (1:1.18.1-3build1) ... 200s Selecting previously unselected package autopoint. 200s Preparing to unpack .../008-autopoint_0.23.2-1_all.deb ... 200s Unpacking autopoint (0.23.2-1) ... 200s Selecting previously unselected package libcapture-tiny-perl. 200s Preparing to unpack .../009-libcapture-tiny-perl_0.50-1_all.deb ... 200s Unpacking libcapture-tiny-perl (0.50-1) ... 200s Selecting previously unselected package libparams-util-perl. 201s Preparing to unpack .../010-libparams-util-perl_1.102-3build1_arm64.deb ... 201s Unpacking libparams-util-perl (1.102-3build1) ... 201s Selecting previously unselected package libsub-install-perl. 201s Preparing to unpack .../011-libsub-install-perl_0.929-1_all.deb ... 201s Unpacking libsub-install-perl (0.929-1) ... 201s Selecting previously unselected package libdata-optlist-perl. 201s Preparing to unpack .../012-libdata-optlist-perl_0.114-1_all.deb ... 201s Unpacking libdata-optlist-perl (0.114-1) ... 201s Selecting previously unselected package libb-hooks-op-check-perl:arm64. 201s Preparing to unpack .../013-libb-hooks-op-check-perl_0.22-3build2_arm64.deb ... 201s Unpacking libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 201s Selecting previously unselected package libdynaloader-functions-perl. 201s Preparing to unpack .../014-libdynaloader-functions-perl_0.004-2_all.deb ... 201s Unpacking libdynaloader-functions-perl (0.004-2) ... 201s Selecting previously unselected package libdevel-callchecker-perl:arm64. 201s Preparing to unpack .../015-libdevel-callchecker-perl_0.009-2_arm64.deb ... 201s Unpacking libdevel-callchecker-perl:arm64 (0.009-2) ... 201s Selecting previously unselected package libparams-classify-perl:arm64. 201s Preparing to unpack .../016-libparams-classify-perl_0.015-2build6_arm64.deb ... 201s Unpacking libparams-classify-perl:arm64 (0.015-2build6) ... 201s Selecting previously unselected package libmodule-runtime-perl. 201s Preparing to unpack .../017-libmodule-runtime-perl_0.018-1_all.deb ... 201s Unpacking libmodule-runtime-perl (0.018-1) ... 201s Selecting previously unselected package libtry-tiny-perl. 201s Preparing to unpack .../018-libtry-tiny-perl_0.32-1_all.deb ... 201s Unpacking libtry-tiny-perl (0.32-1) ... 201s Selecting previously unselected package libmodule-implementation-perl. 201s Preparing to unpack .../019-libmodule-implementation-perl_0.09-2_all.deb ... 201s Unpacking libmodule-implementation-perl (0.09-2) ... 201s Selecting previously unselected package libpackage-stash-perl. 201s Preparing to unpack .../020-libpackage-stash-perl_0.40-1_all.deb ... 201s Unpacking libpackage-stash-perl (0.40-1) ... 201s Selecting previously unselected package libclass-load-perl. 201s Preparing to unpack .../021-libclass-load-perl_0.25-2_all.deb ... 201s Unpacking libclass-load-perl (0.25-2) ... 201s Selecting previously unselected package libio-stringy-perl. 201s Preparing to unpack .../022-libio-stringy-perl_2.113-2_all.deb ... 201s Unpacking libio-stringy-perl (2.113-2) ... 201s Selecting previously unselected package libparams-validate-perl:arm64. 201s Preparing to unpack .../023-libparams-validate-perl_1.31-2build4_arm64.deb ... 201s Unpacking libparams-validate-perl:arm64 (1.31-2build4) ... 201s Selecting previously unselected package libsub-exporter-perl. 201s Preparing to unpack .../024-libsub-exporter-perl_0.990-1_all.deb ... 201s Unpacking libsub-exporter-perl (0.990-1) ... 201s Selecting previously unselected package libgetopt-long-descriptive-perl. 201s Preparing to unpack .../025-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 201s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 201s Selecting previously unselected package libio-tiecombine-perl. 201s Preparing to unpack .../026-libio-tiecombine-perl_1.005-3_all.deb ... 201s Unpacking libio-tiecombine-perl (1.005-3) ... 201s Selecting previously unselected package libmodule-pluggable-perl. 201s Preparing to unpack .../027-libmodule-pluggable-perl_5.2-5_all.deb ... 201s Unpacking libmodule-pluggable-perl (5.2-5) ... 201s Selecting previously unselected package libstring-rewriteprefix-perl. 201s Preparing to unpack .../028-libstring-rewriteprefix-perl_0.009-1_all.deb ... 201s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 201s Selecting previously unselected package libapp-cmd-perl. 201s Preparing to unpack .../029-libapp-cmd-perl_0.338-1_all.deb ... 201s Unpacking libapp-cmd-perl (0.338-1) ... 201s Selecting previously unselected package libboolean-perl. 201s Preparing to unpack .../030-libboolean-perl_0.46-3_all.deb ... 201s Unpacking libboolean-perl (0.46-3) ... 201s Selecting previously unselected package libsub-uplevel-perl. 201s Preparing to unpack .../031-libsub-uplevel-perl_0.2800-3_all.deb ... 201s Unpacking libsub-uplevel-perl (0.2800-3) ... 201s Selecting previously unselected package libtest-exception-perl. 201s Preparing to unpack .../032-libtest-exception-perl_0.43-3_all.deb ... 201s Unpacking libtest-exception-perl (0.43-3) ... 201s Selecting previously unselected package libcarp-assert-more-perl. 201s Preparing to unpack .../033-libcarp-assert-more-perl_2.9.0-1_all.deb ... 201s Unpacking libcarp-assert-more-perl (2.9.0-1) ... 201s Selecting previously unselected package libfile-which-perl. 201s Preparing to unpack .../034-libfile-which-perl_1.27-2_all.deb ... 201s Unpacking libfile-which-perl (1.27-2) ... 201s Selecting previously unselected package libfile-homedir-perl. 201s Preparing to unpack .../035-libfile-homedir-perl_1.006-2_all.deb ... 201s Unpacking libfile-homedir-perl (1.006-2) ... 201s Selecting previously unselected package libclone-choose-perl. 201s Preparing to unpack .../036-libclone-choose-perl_0.010-2_all.deb ... 201s Unpacking libclone-choose-perl (0.010-2) ... 201s Selecting previously unselected package libhash-merge-perl. 201s Preparing to unpack .../037-libhash-merge-perl_0.302-1_all.deb ... 201s Unpacking libhash-merge-perl (0.302-1) ... 201s Selecting previously unselected package libjson-perl. 202s Preparing to unpack .../038-libjson-perl_4.10000-1_all.deb ... 202s Unpacking libjson-perl (4.10000-1) ... 202s Selecting previously unselected package libexporter-tiny-perl. 202s Preparing to unpack .../039-libexporter-tiny-perl_1.006003-1_all.deb ... 202s Unpacking libexporter-tiny-perl (1.006003-1) ... 202s Selecting previously unselected package liblist-moreutils-xs-perl. 202s Preparing to unpack .../040-liblist-moreutils-xs-perl_0.430-4build1_arm64.deb ... 202s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 202s Selecting previously unselected package liblist-moreutils-perl. 202s Preparing to unpack .../041-liblist-moreutils-perl_0.430-2_all.deb ... 202s Unpacking liblist-moreutils-perl (0.430-2) ... 202s Selecting previously unselected package liblog-log4perl-perl. 202s Preparing to unpack .../042-liblog-log4perl-perl_1.57-1_all.deb ... 202s Unpacking liblog-log4perl-perl (1.57-1) ... 202s Selecting previously unselected package libmouse-perl:arm64. 202s Preparing to unpack .../043-libmouse-perl_2.6.1-1_arm64.deb ... 202s Unpacking libmouse-perl:arm64 (2.6.1-1) ... 202s Selecting previously unselected package libmousex-nativetraits-perl. 202s Preparing to unpack .../044-libmousex-nativetraits-perl_1.09-3_all.deb ... 202s Unpacking libmousex-nativetraits-perl (1.09-3) ... 202s Selecting previously unselected package libmousex-strictconstructor-perl. 202s Preparing to unpack .../045-libmousex-strictconstructor-perl_0.02-3_all.deb ... 202s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 202s Selecting previously unselected package libparse-recdescent-perl. 202s Preparing to unpack .../046-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 202s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 202s Selecting previously unselected package libpath-tiny-perl. 202s Preparing to unpack .../047-libpath-tiny-perl_0.148-1_all.deb ... 202s Unpacking libpath-tiny-perl (0.148-1) ... 202s Selecting previously unselected package libpod-pom-perl. 202s Preparing to unpack .../048-libpod-pom-perl_2.01-4_all.deb ... 202s Unpacking libpod-pom-perl (2.01-4) ... 202s Selecting previously unselected package libregexp-common-perl. 202s Preparing to unpack .../049-libregexp-common-perl_2024080801-1_all.deb ... 202s Unpacking libregexp-common-perl (2024080801-1) ... 202s Selecting previously unselected package libyaml-tiny-perl. 202s Preparing to unpack .../050-libyaml-tiny-perl_1.76-1_all.deb ... 202s Unpacking libyaml-tiny-perl (1.76-1) ... 202s Selecting previously unselected package libconfig-model-perl. 202s Preparing to unpack .../051-libconfig-model-perl_2.155-1_all.deb ... 202s Unpacking libconfig-model-perl (2.155-1) ... 202s Selecting previously unselected package libyaml-pp-perl. 202s Preparing to unpack .../052-libyaml-pp-perl_0.39.0-1_all.deb ... 202s Unpacking libyaml-pp-perl (0.39.0-1) ... 202s Selecting previously unselected package cme. 202s Preparing to unpack .../053-cme_1.043-2_all.deb ... 202s Unpacking cme (1.043-2) ... 202s Selecting previously unselected package libisl23:arm64. 202s Preparing to unpack .../054-libisl23_0.27-1build1_arm64.deb ... 202s Unpacking libisl23:arm64 (0.27-1build1) ... 202s Selecting previously unselected package libmpc3:arm64. 202s Preparing to unpack .../055-libmpc3_1.3.1-2_arm64.deb ... 202s Unpacking libmpc3:arm64 (1.3.1-2) ... 202s Selecting previously unselected package cpp-15-aarch64-linux-gnu. 202s Preparing to unpack .../056-cpp-15-aarch64-linux-gnu_15.2.0-12ubuntu1_arm64.deb ... 202s Unpacking cpp-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 202s Selecting previously unselected package cpp-15. 203s Preparing to unpack .../057-cpp-15_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking cpp-15 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package cpp-aarch64-linux-gnu. 203s Preparing to unpack .../058-cpp-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 203s Unpacking cpp-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 203s Selecting previously unselected package cpp. 203s Preparing to unpack .../059-cpp_4%3a15.2.0-4ubuntu1_arm64.deb ... 203s Unpacking cpp (4:15.2.0-4ubuntu1) ... 203s Selecting previously unselected package libdebhelper-perl. 203s Preparing to unpack .../060-libdebhelper-perl_13.28ubuntu1_all.deb ... 203s Unpacking libdebhelper-perl (13.28ubuntu1) ... 203s Selecting previously unselected package libcc1-0:arm64. 203s Preparing to unpack .../061-libcc1-0_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libcc1-0:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libgomp1:arm64. 203s Preparing to unpack .../062-libgomp1_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libgomp1:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libitm1:arm64. 203s Preparing to unpack .../063-libitm1_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libitm1:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libasan8:arm64. 203s Preparing to unpack .../064-libasan8_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libasan8:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package liblsan0:arm64. 203s Preparing to unpack .../065-liblsan0_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking liblsan0:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libtsan2:arm64. 203s Preparing to unpack .../066-libtsan2_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libtsan2:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libubsan1:arm64. 203s Preparing to unpack .../067-libubsan1_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libubsan1:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libhwasan0:arm64. 203s Preparing to unpack .../068-libhwasan0_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libhwasan0:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package libgcc-15-dev:arm64. 203s Preparing to unpack .../069-libgcc-15-dev_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking libgcc-15-dev:arm64 (15.2.0-12ubuntu1) ... 203s Selecting previously unselected package gcc-15-aarch64-linux-gnu. 203s Preparing to unpack .../070-gcc-15-aarch64-linux-gnu_15.2.0-12ubuntu1_arm64.deb ... 203s Unpacking gcc-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package gcc-15. 204s Preparing to unpack .../071-gcc-15_15.2.0-12ubuntu1_arm64.deb ... 204s Unpacking gcc-15 (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package gcc-aarch64-linux-gnu. 204s Preparing to unpack .../072-gcc-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 204s Unpacking gcc-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 204s Selecting previously unselected package gcc. 204s Preparing to unpack .../073-gcc_4%3a15.2.0-4ubuntu1_arm64.deb ... 204s Unpacking gcc (4:15.2.0-4ubuntu1) ... 204s Selecting previously unselected package libc-dev-bin. 204s Preparing to unpack .../074-libc-dev-bin_2.42-2ubuntu5_arm64.deb ... 204s Unpacking libc-dev-bin (2.42-2ubuntu5) ... 204s Selecting previously unselected package linux-libc-dev:arm64. 204s Preparing to unpack .../075-linux-libc-dev_6.18.0-9.9_arm64.deb ... 204s Unpacking linux-libc-dev:arm64 (6.18.0-9.9) ... 204s Selecting previously unselected package libcrypt-dev:arm64. 204s Preparing to unpack .../076-libcrypt-dev_1%3a4.5.1-1_arm64.deb ... 204s Unpacking libcrypt-dev:arm64 (1:4.5.1-1) ... 204s Selecting previously unselected package rpcsvc-proto. 204s Preparing to unpack .../077-rpcsvc-proto_1.4.3-1build1_arm64.deb ... 204s Unpacking rpcsvc-proto (1.4.3-1build1) ... 204s Selecting previously unselected package libc6-dev:arm64. 204s Preparing to unpack .../078-libc6-dev_2.42-2ubuntu5_arm64.deb ... 204s Unpacking libc6-dev:arm64 (2.42-2ubuntu5) ... 204s Selecting previously unselected package libtool. 204s Preparing to unpack .../079-libtool_2.5.4-9_all.deb ... 204s Unpacking libtool (2.5.4-9) ... 204s Selecting previously unselected package dh-autoreconf. 204s Preparing to unpack .../080-dh-autoreconf_21_all.deb ... 204s Unpacking dh-autoreconf (21) ... 204s Selecting previously unselected package libarchive-zip-perl. 204s Preparing to unpack .../081-libarchive-zip-perl_1.68-1_all.deb ... 204s Unpacking libarchive-zip-perl (1.68-1) ... 204s Selecting previously unselected package libfile-stripnondeterminism-perl. 204s Preparing to unpack .../082-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 204s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 204s Selecting previously unselected package dh-strip-nondeterminism. 204s Preparing to unpack .../083-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 204s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 204s Selecting previously unselected package debugedit. 204s Preparing to unpack .../084-debugedit_1%3a5.2-3build1_arm64.deb ... 204s Unpacking debugedit (1:5.2-3build1) ... 204s Selecting previously unselected package dwz. 204s Preparing to unpack .../085-dwz_0.16-2_arm64.deb ... 204s Unpacking dwz (0.16-2) ... 204s Selecting previously unselected package gettext. 204s Preparing to unpack .../086-gettext_0.23.2-1_arm64.deb ... 204s Unpacking gettext (0.23.2-1) ... 204s Selecting previously unselected package intltool-debian. 204s Preparing to unpack .../087-intltool-debian_0.35.0+20060710.6build1_all.deb ... 204s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 204s Selecting previously unselected package po-debconf. 205s Preparing to unpack .../088-po-debconf_1.0.22_all.deb ... 205s Unpacking po-debconf (1.0.22) ... 205s Selecting previously unselected package debhelper. 205s Preparing to unpack .../089-debhelper_13.28ubuntu1_all.deb ... 205s Unpacking debhelper (13.28ubuntu1) ... 205s Selecting previously unselected package aglfn. 205s Preparing to unpack .../090-aglfn_1.7+git20191031.4036a9c-2build1_all.deb ... 205s Unpacking aglfn (1.7+git20191031.4036a9c-2build1) ... 205s Selecting previously unselected package gnuplot-data. 205s Preparing to unpack .../091-gnuplot-data_6.0.2+dfsg1-2ubuntu1_all.deb ... 205s Unpacking gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 205s Selecting previously unselected package fonts-freefont-otf. 205s Preparing to unpack .../092-fonts-freefont-otf_20211204+svn4273-4build1_all.deb ... 205s Unpacking fonts-freefont-otf (20211204+svn4273-4build1) ... 205s Selecting previously unselected package fontconfig-config. 205s Preparing to unpack .../093-fontconfig-config_2.17.1-3ubuntu1_arm64.deb ... 205s Unpacking fontconfig-config (2.17.1-3ubuntu1) ... 205s Selecting previously unselected package libfontconfig1:arm64. 205s Preparing to unpack .../094-libfontconfig1_2.17.1-3ubuntu1_arm64.deb ... 205s Unpacking libfontconfig1:arm64 (2.17.1-3ubuntu1) ... 205s Selecting previously unselected package libpixman-1-0:arm64. 205s Preparing to unpack .../095-libpixman-1-0_0.46.4-1_arm64.deb ... 205s Unpacking libpixman-1-0:arm64 (0.46.4-1) ... 205s Selecting previously unselected package libxcb-render0:arm64. 205s Preparing to unpack .../096-libxcb-render0_1.17.0-2ubuntu1_arm64.deb ... 205s Unpacking libxcb-render0:arm64 (1.17.0-2ubuntu1) ... 205s Selecting previously unselected package libxcb-shm0:arm64. 205s Preparing to unpack .../097-libxcb-shm0_1.17.0-2ubuntu1_arm64.deb ... 205s Unpacking libxcb-shm0:arm64 (1.17.0-2ubuntu1) ... 205s Selecting previously unselected package libxrender1:arm64. 205s Preparing to unpack .../098-libxrender1_1%3a0.9.12-1_arm64.deb ... 205s Unpacking libxrender1:arm64 (1:0.9.12-1) ... 205s Selecting previously unselected package libcairo2:arm64. 205s Preparing to unpack .../099-libcairo2_1.18.4-3_arm64.deb ... 205s Unpacking libcairo2:arm64 (1.18.4-3) ... 205s Selecting previously unselected package libsharpyuv0:arm64. 205s Preparing to unpack .../100-libsharpyuv0_1.5.0-0.1build1_arm64.deb ... 205s Unpacking libsharpyuv0:arm64 (1.5.0-0.1build1) ... 205s Selecting previously unselected package libaom3:arm64. 205s Preparing to unpack .../101-libaom3_3.13.1-2_arm64.deb ... 205s Unpacking libaom3:arm64 (3.13.1-2) ... 205s Selecting previously unselected package libheif-plugin-aomdec:arm64. 205s Preparing to unpack .../102-libheif-plugin-aomdec_1.21.2-1_arm64.deb ... 205s Unpacking libheif-plugin-aomdec:arm64 (1.21.2-1) ... 205s Selecting previously unselected package libde265-0:arm64. 205s Preparing to unpack .../103-libde265-0_1.0.16-1build1_arm64.deb ... 205s Unpacking libde265-0:arm64 (1.0.16-1build1) ... 205s Selecting previously unselected package libheif-plugin-libde265:arm64. 205s Preparing to unpack .../104-libheif-plugin-libde265_1.21.2-1_arm64.deb ... 205s Unpacking libheif-plugin-libde265:arm64 (1.21.2-1) ... 206s Selecting previously unselected package libheif1:arm64. 206s Preparing to unpack .../105-libheif1_1.21.2-1_arm64.deb ... 206s Unpacking libheif1:arm64 (1.21.2-1) ... 206s Selecting previously unselected package libimagequant0:arm64. 206s Preparing to unpack .../106-libimagequant0_2.18.0-1build1_arm64.deb ... 206s Unpacking libimagequant0:arm64 (2.18.0-1build1) ... 206s Selecting previously unselected package libjpeg-turbo8:arm64. 206s Preparing to unpack .../107-libjpeg-turbo8_2.1.5-4ubuntu2_arm64.deb ... 206s Unpacking libjpeg-turbo8:arm64 (2.1.5-4ubuntu2) ... 206s Selecting previously unselected package libjpeg8:arm64. 206s Preparing to unpack .../108-libjpeg8_8c-2ubuntu11_arm64.deb ... 206s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 206s Selecting previously unselected package libdeflate0:arm64. 206s Preparing to unpack .../109-libdeflate0_1.23-2_arm64.deb ... 206s Unpacking libdeflate0:arm64 (1.23-2) ... 206s Selecting previously unselected package libjbig0:arm64. 206s Preparing to unpack .../110-libjbig0_2.1-6.1ubuntu3_arm64.deb ... 206s Unpacking libjbig0:arm64 (2.1-6.1ubuntu3) ... 206s Selecting previously unselected package liblerc4:arm64. 206s Preparing to unpack .../111-liblerc4_4.0.0+ds-5ubuntu2_arm64.deb ... 206s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu2) ... 206s Selecting previously unselected package libwebp7:arm64. 206s Preparing to unpack .../112-libwebp7_1.5.0-0.1build1_arm64.deb ... 206s Unpacking libwebp7:arm64 (1.5.0-0.1build1) ... 206s Selecting previously unselected package libtiff6:arm64. 206s Preparing to unpack .../113-libtiff6_4.7.0-3ubuntu3_arm64.deb ... 206s Unpacking libtiff6:arm64 (4.7.0-3ubuntu3) ... 206s Selecting previously unselected package libxpm4:arm64. 206s Preparing to unpack .../114-libxpm4_1%3a3.5.17-1build3_arm64.deb ... 206s Unpacking libxpm4:arm64 (1:3.5.17-1build3) ... 206s Selecting previously unselected package libgd3:arm64. 206s Preparing to unpack .../115-libgd3_2.3.3-13ubuntu1_arm64.deb ... 206s Unpacking libgd3:arm64 (2.3.3-13ubuntu1) ... 206s Selecting previously unselected package liblua5.4-0:arm64. 206s Preparing to unpack .../116-liblua5.4-0_5.4.8-1_arm64.deb ... 206s Unpacking liblua5.4-0:arm64 (5.4.8-1) ... 206s Selecting previously unselected package fontconfig. 206s Preparing to unpack .../117-fontconfig_2.17.1-3ubuntu1_arm64.deb ... 206s Unpacking fontconfig (2.17.1-3ubuntu1) ... 206s Selecting previously unselected package libgraphite2-3:arm64. 206s Preparing to unpack .../118-libgraphite2-3_1.3.14-11ubuntu1_arm64.deb ... 206s Unpacking libgraphite2-3:arm64 (1.3.14-11ubuntu1) ... 206s Selecting previously unselected package libharfbuzz0b:arm64. 206s Preparing to unpack .../119-libharfbuzz0b_12.3.2-1_arm64.deb ... 206s Unpacking libharfbuzz0b:arm64 (12.3.2-1) ... 206s Selecting previously unselected package libthai-data. 206s Preparing to unpack .../120-libthai-data_0.1.30-1_all.deb ... 206s Unpacking libthai-data (0.1.30-1) ... 206s Selecting previously unselected package libdatrie1:arm64. 206s Preparing to unpack .../121-libdatrie1_0.2.14-1_arm64.deb ... 206s Unpacking libdatrie1:arm64 (0.2.14-1) ... 206s Selecting previously unselected package libthai0:arm64. 206s Preparing to unpack .../122-libthai0_0.1.30-1_arm64.deb ... 206s Unpacking libthai0:arm64 (0.1.30-1) ... 206s Selecting previously unselected package libpango-1.0-0:arm64. 206s Preparing to unpack .../123-libpango-1.0-0_1.57.0-1_arm64.deb ... 206s Unpacking libpango-1.0-0:arm64 (1.57.0-1) ... 206s Selecting previously unselected package libpangoft2-1.0-0:arm64. 206s Preparing to unpack .../124-libpangoft2-1.0-0_1.57.0-1_arm64.deb ... 206s Unpacking libpangoft2-1.0-0:arm64 (1.57.0-1) ... 206s Selecting previously unselected package libpangocairo-1.0-0:arm64. 206s Preparing to unpack .../125-libpangocairo-1.0-0_1.57.0-1_arm64.deb ... 206s Unpacking libpangocairo-1.0-0:arm64 (1.57.0-1) ... 206s Selecting previously unselected package libwebpmux3:arm64. 206s Preparing to unpack .../126-libwebpmux3_1.5.0-0.1build1_arm64.deb ... 206s Unpacking libwebpmux3:arm64 (1.5.0-0.1build1) ... 206s Selecting previously unselected package gnuplot-nox. 206s Preparing to unpack .../127-gnuplot-nox_6.0.2+dfsg1-2ubuntu1_arm64.deb ... 206s Unpacking gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 206s Selecting previously unselected package dh-octave-autopkgtest. 206s Preparing to unpack .../128-dh-octave-autopkgtest_1.14.0_all.deb ... 206s Unpacking dh-octave-autopkgtest (1.14.0) ... 206s Selecting previously unselected package libapt-pkg-perl. 206s Preparing to unpack .../129-libapt-pkg-perl_0.1.43_arm64.deb ... 206s Unpacking libapt-pkg-perl (0.1.43) ... 206s Selecting previously unselected package libarray-intspan-perl. 206s Preparing to unpack .../130-libarray-intspan-perl_2.004-2_all.deb ... 206s Unpacking libarray-intspan-perl (2.004-2) ... 206s Selecting previously unselected package libconfig-inifiles-perl. 206s Preparing to unpack .../131-libconfig-inifiles-perl_3.000003-4_all.deb ... 206s Unpacking libconfig-inifiles-perl (3.000003-4) ... 207s Selecting previously unselected package libyaml-libyaml-perl. 207s Preparing to unpack .../132-libyaml-libyaml-perl_0.904.0+ds-1_arm64.deb ... 207s Unpacking libyaml-libyaml-perl (0.904.0+ds-1) ... 207s Selecting previously unselected package libconfig-model-backend-yaml-perl. 207s Preparing to unpack .../133-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 207s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 207s Selecting previously unselected package libexporter-lite-perl. 207s Preparing to unpack .../134-libexporter-lite-perl_0.09-2_all.deb ... 207s Unpacking libexporter-lite-perl (0.09-2) ... 207s Selecting previously unselected package libencode-locale-perl. 207s Preparing to unpack .../135-libencode-locale-perl_1.05-3_all.deb ... 207s Unpacking libencode-locale-perl (1.05-3) ... 207s Selecting previously unselected package libtimedate-perl. 207s Preparing to unpack .../136-libtimedate-perl_2.3300-2_all.deb ... 207s Unpacking libtimedate-perl (2.3300-2) ... 207s Selecting previously unselected package libhttp-date-perl. 207s Preparing to unpack .../137-libhttp-date-perl_6.06-1_all.deb ... 207s Unpacking libhttp-date-perl (6.06-1) ... 207s Selecting previously unselected package libfile-listing-perl. 207s Preparing to unpack .../138-libfile-listing-perl_6.16-1_all.deb ... 207s Unpacking libfile-listing-perl (6.16-1) ... 207s Selecting previously unselected package libhtml-tagset-perl. 207s Preparing to unpack .../139-libhtml-tagset-perl_3.24-1_all.deb ... 207s Unpacking libhtml-tagset-perl (3.24-1) ... 207s Selecting previously unselected package liburi-perl. 207s Preparing to unpack .../140-liburi-perl_5.34-2build1_all.deb ... 207s Unpacking liburi-perl (5.34-2build1) ... 207s Selecting previously unselected package libhtml-parser-perl:arm64. 207s Preparing to unpack .../141-libhtml-parser-perl_3.83-1build1_arm64.deb ... 207s Unpacking libhtml-parser-perl:arm64 (3.83-1build1) ... 207s Selecting previously unselected package libhtml-tree-perl. 207s Preparing to unpack .../142-libhtml-tree-perl_5.07-3_all.deb ... 207s Unpacking libhtml-tree-perl (5.07-3) ... 207s Selecting previously unselected package libclone-perl:arm64. 207s Preparing to unpack .../143-libclone-perl_0.47-1_arm64.deb ... 207s Unpacking libclone-perl:arm64 (0.47-1) ... 207s Selecting previously unselected package libio-html-perl. 207s Preparing to unpack .../144-libio-html-perl_1.004-3_all.deb ... 207s Unpacking libio-html-perl (1.004-3) ... 207s Selecting previously unselected package liblwp-mediatypes-perl. 207s Preparing to unpack .../145-liblwp-mediatypes-perl_6.04-2_all.deb ... 207s Unpacking liblwp-mediatypes-perl (6.04-2) ... 207s Selecting previously unselected package libhttp-message-perl. 207s Preparing to unpack .../146-libhttp-message-perl_7.01-1ubuntu1_all.deb ... 207s Unpacking libhttp-message-perl (7.01-1ubuntu1) ... 207s Selecting previously unselected package libhttp-cookies-perl. 207s Preparing to unpack .../147-libhttp-cookies-perl_6.11-1_all.deb ... 207s Unpacking libhttp-cookies-perl (6.11-1) ... 207s Selecting previously unselected package libhttp-negotiate-perl. 207s Preparing to unpack .../148-libhttp-negotiate-perl_6.01-2_all.deb ... 207s Unpacking libhttp-negotiate-perl (6.01-2) ... 207s Selecting previously unselected package perl-openssl-defaults:arm64. 207s Preparing to unpack .../149-perl-openssl-defaults_7build4_arm64.deb ... 207s Unpacking perl-openssl-defaults:arm64 (7build4) ... 207s Selecting previously unselected package libnet-ssleay-perl:arm64. 207s Preparing to unpack .../150-libnet-ssleay-perl_1.94-3_arm64.deb ... 207s Unpacking libnet-ssleay-perl:arm64 (1.94-3) ... 207s Selecting previously unselected package libio-socket-ssl-perl. 207s Preparing to unpack .../151-libio-socket-ssl-perl_2.098-1_all.deb ... 207s Unpacking libio-socket-ssl-perl (2.098-1) ... 207s Selecting previously unselected package libnet-http-perl. 207s Preparing to unpack .../152-libnet-http-perl_6.24-1build1_all.deb ... 207s Unpacking libnet-http-perl (6.24-1build1) ... 207s Selecting previously unselected package liblwp-protocol-https-perl. 207s Preparing to unpack .../153-liblwp-protocol-https-perl_6.14-1_all.deb ... 207s Unpacking liblwp-protocol-https-perl (6.14-1) ... 207s Selecting previously unselected package libwww-robotrules-perl. 207s Preparing to unpack .../154-libwww-robotrules-perl_6.02-1build1_all.deb ... 207s Unpacking libwww-robotrules-perl (6.02-1build1) ... 207s Selecting previously unselected package libwww-perl. 207s Preparing to unpack .../155-libwww-perl_6.81-1build1_all.deb ... 207s Unpacking libwww-perl (6.81-1build1) ... 207s Selecting previously unselected package liberror-perl. 207s Preparing to unpack .../156-liberror-perl_0.17030-1_all.deb ... 207s Unpacking liberror-perl (0.17030-1) ... 207s Selecting previously unselected package libparse-debcontrol-perl. 207s Preparing to unpack .../157-libparse-debcontrol-perl_2.005-6_all.deb ... 207s Unpacking libparse-debcontrol-perl (2.005-6) ... 207s Selecting previously unselected package libsoftware-copyright-perl. 207s Preparing to unpack .../158-libsoftware-copyright-perl_0.015-1_all.deb ... 207s Unpacking libsoftware-copyright-perl (0.015-1) ... 207s Selecting previously unselected package libalgorithm-c3-perl. 208s Preparing to unpack .../159-libalgorithm-c3-perl_0.11-2_all.deb ... 208s Unpacking libalgorithm-c3-perl (0.11-2) ... 208s Selecting previously unselected package libclass-c3-perl. 208s Preparing to unpack .../160-libclass-c3-perl_0.35-2_all.deb ... 208s Unpacking libclass-c3-perl (0.35-2) ... 208s Selecting previously unselected package libmro-compat-perl. 208s Preparing to unpack .../161-libmro-compat-perl_0.15-2_all.deb ... 208s Unpacking libmro-compat-perl (0.15-2) ... 208s Selecting previously unselected package libdata-section-perl. 208s Preparing to unpack .../162-libdata-section-perl_0.200008-1_all.deb ... 208s Unpacking libdata-section-perl (0.200008-1) ... 208s Selecting previously unselected package libtext-template-perl. 208s Preparing to unpack .../163-libtext-template-perl_1.61-1_all.deb ... 208s Unpacking libtext-template-perl (1.61-1) ... 208s Selecting previously unselected package libsoftware-license-perl. 208s Preparing to unpack .../164-libsoftware-license-perl_0.104007-1_all.deb ... 208s Unpacking libsoftware-license-perl (0.104007-1) ... 208s Selecting previously unselected package libsoftware-licensemoreutils-perl. 208s Preparing to unpack .../165-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 208s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 208s Selecting previously unselected package libsort-versions-perl. 208s Preparing to unpack .../166-libsort-versions-perl_1.62-3_all.deb ... 208s Unpacking libsort-versions-perl (1.62-3) ... 208s Selecting previously unselected package libtext-reform-perl. 208s Preparing to unpack .../167-libtext-reform-perl_1.20-5_all.deb ... 208s Unpacking libtext-reform-perl (1.20-5) ... 208s Selecting previously unselected package libtext-autoformat-perl. 208s Preparing to unpack .../168-libtext-autoformat-perl_1.750000-2_all.deb ... 208s Unpacking libtext-autoformat-perl (1.750000-2) ... 208s Selecting previously unselected package libtext-levenshtein-damerau-perl. 208s Preparing to unpack .../169-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 208s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 208s Selecting previously unselected package libtoml-tiny-perl. 208s Preparing to unpack .../170-libtoml-tiny-perl_0.20-1_all.deb ... 208s Unpacking libtoml-tiny-perl (0.20-1) ... 208s Selecting previously unselected package libclass-inspector-perl. 208s Preparing to unpack .../171-libclass-inspector-perl_1.36-3_all.deb ... 208s Unpacking libclass-inspector-perl (1.36-3) ... 208s Selecting previously unselected package libfile-sharedir-perl. 208s Preparing to unpack .../172-libfile-sharedir-perl_1.118-3_all.deb ... 208s Unpacking libfile-sharedir-perl (1.118-3) ... 208s Selecting previously unselected package libindirect-perl. 208s Preparing to unpack .../173-libindirect-perl_0.39-2build5_arm64.deb ... 208s Unpacking libindirect-perl (0.39-2build5) ... 208s Selecting previously unselected package libxs-parse-keyword-perl. 208s Preparing to unpack .../174-libxs-parse-keyword-perl_0.49-1_arm64.deb ... 208s Unpacking libxs-parse-keyword-perl (0.49-1) ... 208s Selecting previously unselected package libxs-parse-sublike-perl:arm64. 208s Preparing to unpack .../175-libxs-parse-sublike-perl_0.41-1_arm64.deb ... 208s Unpacking libxs-parse-sublike-perl:arm64 (0.41-1) ... 208s Selecting previously unselected package libobject-pad-perl. 208s Preparing to unpack .../176-libobject-pad-perl_0.823-2_arm64.deb ... 208s Unpacking libobject-pad-perl (0.823-2) ... 208s Selecting previously unselected package libsyntax-keyword-try-perl. 208s Preparing to unpack .../177-libsyntax-keyword-try-perl_0.31-1_arm64.deb ... 208s Unpacking libsyntax-keyword-try-perl (0.31-1) ... 208s Selecting previously unselected package libio-interactive-perl. 208s Preparing to unpack .../178-libio-interactive-perl_1.027-1_all.deb ... 208s Unpacking libio-interactive-perl (1.027-1) ... 208s Selecting previously unselected package liblog-any-perl. 208s Preparing to unpack .../179-liblog-any-perl_1.718-1build1_all.deb ... 208s Unpacking liblog-any-perl (1.718-1build1) ... 208s Selecting previously unselected package liblog-any-adapter-screen-perl. 208s Preparing to unpack .../180-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 208s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 208s Selecting previously unselected package libsub-exporter-progressive-perl. 208s Preparing to unpack .../181-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 208s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 208s Selecting previously unselected package libvariable-magic-perl. 208s Preparing to unpack .../182-libvariable-magic-perl_0.64-1build1_arm64.deb ... 208s Unpacking libvariable-magic-perl (0.64-1build1) ... 208s Selecting previously unselected package libb-hooks-endofscope-perl. 208s Preparing to unpack .../183-libb-hooks-endofscope-perl_0.28-2_all.deb ... 208s Unpacking libb-hooks-endofscope-perl (0.28-2) ... 208s Selecting previously unselected package libsub-identify-perl. 209s Preparing to unpack .../184-libsub-identify-perl_0.14-4_arm64.deb ... 209s Unpacking libsub-identify-perl (0.14-4) ... 209s Selecting previously unselected package libsub-name-perl:arm64. 209s Preparing to unpack .../185-libsub-name-perl_0.28-1_arm64.deb ... 209s Unpacking libsub-name-perl:arm64 (0.28-1) ... 209s Selecting previously unselected package libnamespace-clean-perl. 209s Preparing to unpack .../186-libnamespace-clean-perl_0.27-2_all.deb ... 209s Unpacking libnamespace-clean-perl (0.27-2) ... 209s Selecting previously unselected package libnumber-compare-perl. 209s Preparing to unpack .../187-libnumber-compare-perl_0.03-3_all.deb ... 209s Unpacking libnumber-compare-perl (0.03-3) ... 209s Selecting previously unselected package libtext-glob-perl. 209s Preparing to unpack .../188-libtext-glob-perl_0.11-3_all.deb ... 209s Unpacking libtext-glob-perl (0.11-3) ... 209s Selecting previously unselected package libpath-iterator-rule-perl. 209s Preparing to unpack .../189-libpath-iterator-rule-perl_1.015-2_all.deb ... 209s Unpacking libpath-iterator-rule-perl (1.015-2) ... 209s Selecting previously unselected package libpod-parser-perl. 209s Preparing to unpack .../190-libpod-parser-perl_1.67-1_all.deb ... 209s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 209s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 209s Unpacking libpod-parser-perl (1.67-1) ... 209s Selecting previously unselected package libpod-constants-perl. 209s Preparing to unpack .../191-libpod-constants-perl_0.19-2_all.deb ... 209s Unpacking libpod-constants-perl (0.19-2) ... 209s Selecting previously unselected package libset-intspan-perl. 209s Preparing to unpack .../192-libset-intspan-perl_1.19-3_all.deb ... 209s Unpacking libset-intspan-perl (1.19-3) ... 209s Selecting previously unselected package libstring-copyright-perl. 209s Preparing to unpack .../193-libstring-copyright-perl_0.003014-1_all.deb ... 209s Unpacking libstring-copyright-perl (0.003014-1) ... 209s Selecting previously unselected package libstring-escape-perl. 209s Preparing to unpack .../194-libstring-escape-perl_2010.002-3_all.deb ... 209s Unpacking libstring-escape-perl (2010.002-3) ... 209s Selecting previously unselected package libregexp-pattern-license-perl. 209s Preparing to unpack .../195-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 209s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 209s Selecting previously unselected package libregexp-pattern-perl. 209s Preparing to unpack .../196-libregexp-pattern-perl_0.2.14-2_all.deb ... 209s Unpacking libregexp-pattern-perl (0.2.14-2) ... 209s Selecting previously unselected package libstring-license-perl. 209s Preparing to unpack .../197-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 209s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 209s Selecting previously unselected package licensecheck. 209s Preparing to unpack .../198-licensecheck_3.3.9-1ubuntu2_all.deb ... 209s Unpacking licensecheck (3.3.9-1ubuntu2) ... 209s Selecting previously unselected package diffstat. 209s Preparing to unpack .../199-diffstat_1.68-1_arm64.deb ... 209s Unpacking diffstat (1.68-1) ... 209s Selecting previously unselected package libberkeleydb-perl:arm64. 209s Preparing to unpack .../200-libberkeleydb-perl_0.66-2_arm64.deb ... 209s Unpacking libberkeleydb-perl:arm64 (0.66-2) ... 209s Selecting previously unselected package libclass-xsaccessor-perl. 209s Preparing to unpack .../201-libclass-xsaccessor-perl_1.19-4build6_arm64.deb ... 209s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 209s Selecting previously unselected package libconfig-tiny-perl. 209s Preparing to unpack .../202-libconfig-tiny-perl_2.30-1_all.deb ... 209s Unpacking libconfig-tiny-perl (2.30-1) ... 209s Selecting previously unselected package libconst-fast-perl. 209s Preparing to unpack .../203-libconst-fast-perl_0.014-2_all.deb ... 209s Unpacking libconst-fast-perl (0.014-2) ... 209s Selecting previously unselected package libcpanel-json-xs-perl:arm64. 209s Preparing to unpack .../204-libcpanel-json-xs-perl_4.40-1_arm64.deb ... 209s Unpacking libcpanel-json-xs-perl:arm64 (4.40-1) ... 209s Selecting previously unselected package libaliased-perl. 209s Preparing to unpack .../205-libaliased-perl_0.34-3_all.deb ... 209s Unpacking libaliased-perl (0.34-3) ... 209s Selecting previously unselected package libclass-data-inheritable-perl. 209s Preparing to unpack .../206-libclass-data-inheritable-perl_0.10-1_all.deb ... 209s Unpacking libclass-data-inheritable-perl (0.10-1) ... 209s Selecting previously unselected package libdevel-stacktrace-perl. 209s Preparing to unpack .../207-libdevel-stacktrace-perl_2.0500-1_all.deb ... 209s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 209s Selecting previously unselected package libexception-class-perl. 209s Preparing to unpack .../208-libexception-class-perl_1.45-1_all.deb ... 209s Unpacking libexception-class-perl (1.45-1) ... 209s Selecting previously unselected package libiterator-perl. 209s Preparing to unpack .../209-libiterator-perl_0.03+ds1-2_all.deb ... 209s Unpacking libiterator-perl (0.03+ds1-2) ... 210s Selecting previously unselected package libiterator-util-perl. 210s Preparing to unpack .../210-libiterator-util-perl_0.02+ds1-2_all.deb ... 210s Unpacking libiterator-util-perl (0.02+ds1-2) ... 210s Selecting previously unselected package libdata-dpath-perl. 210s Preparing to unpack .../211-libdata-dpath-perl_0.60-1_all.deb ... 210s Unpacking libdata-dpath-perl (0.60-1) ... 210s Selecting previously unselected package libnet-domain-tld-perl. 210s Preparing to unpack .../212-libnet-domain-tld-perl_1.75-4_all.deb ... 210s Unpacking libnet-domain-tld-perl (1.75-4) ... 210s Selecting previously unselected package libdata-validate-domain-perl. 210s Preparing to unpack .../213-libdata-validate-domain-perl_0.15-1_all.deb ... 210s Unpacking libdata-validate-domain-perl (0.15-1) ... 210s Selecting previously unselected package libnet-ipv6addr-perl. 210s Preparing to unpack .../214-libnet-ipv6addr-perl_1.02-1_all.deb ... 210s Unpacking libnet-ipv6addr-perl (1.02-1) ... 210s Selecting previously unselected package libnet-netmask-perl. 210s Preparing to unpack .../215-libnet-netmask-perl_2.0003-1build1_all.deb ... 210s Unpacking libnet-netmask-perl (2.0003-1build1) ... 210s Selecting previously unselected package libnetaddr-ip-perl. 210s Preparing to unpack .../216-libnetaddr-ip-perl_4.079+dfsg-2build5_arm64.deb ... 210s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 210s Selecting previously unselected package libdata-validate-ip-perl. 210s Preparing to unpack .../217-libdata-validate-ip-perl_0.31-1_all.deb ... 210s Unpacking libdata-validate-ip-perl (0.31-1) ... 210s Selecting previously unselected package libdata-validate-uri-perl. 210s Preparing to unpack .../218-libdata-validate-uri-perl_0.07-3_all.deb ... 210s Unpacking libdata-validate-uri-perl (0.07-3) ... 210s Selecting previously unselected package libdevel-size-perl. 210s Preparing to unpack .../219-libdevel-size-perl_0.85-1_arm64.deb ... 210s Unpacking libdevel-size-perl (0.85-1) ... 210s Selecting previously unselected package libemail-address-xs-perl. 210s Preparing to unpack .../220-libemail-address-xs-perl_1.05-1build5_arm64.deb ... 210s Unpacking libemail-address-xs-perl (1.05-1build5) ... 210s Selecting previously unselected package libipc-system-simple-perl. 210s Preparing to unpack .../221-libipc-system-simple-perl_1.30-2_all.deb ... 210s Unpacking libipc-system-simple-perl (1.30-2) ... 210s Selecting previously unselected package libfile-basedir-perl. 210s Preparing to unpack .../222-libfile-basedir-perl_0.09-2_all.deb ... 210s Unpacking libfile-basedir-perl (0.09-2) ... 210s Selecting previously unselected package libfile-find-rule-perl. 210s Preparing to unpack .../223-libfile-find-rule-perl_0.35-1build1_all.deb ... 210s Unpacking libfile-find-rule-perl (0.35-1build1) ... 210s Selecting previously unselected package libio-string-perl. 210s Preparing to unpack .../224-libio-string-perl_1.08-4_all.deb ... 210s Unpacking libio-string-perl (1.08-4) ... 210s Selecting previously unselected package libfont-ttf-perl. 210s Preparing to unpack .../225-libfont-ttf-perl_1.06-2_all.deb ... 210s Unpacking libfont-ttf-perl (1.06-2) ... 210s Selecting previously unselected package libhtml-html5-entities-perl. 210s Preparing to unpack .../226-libhtml-html5-entities-perl_0.004-3_all.deb ... 210s Unpacking libhtml-html5-entities-perl (0.004-3) ... 210s Selecting previously unselected package libhtml-tokeparser-simple-perl. 210s Preparing to unpack .../227-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 210s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 210s Selecting previously unselected package libipc-run3-perl. 210s Preparing to unpack .../228-libipc-run3-perl_0.049-1_all.deb ... 210s Unpacking libipc-run3-perl (0.049-1) ... 210s Selecting previously unselected package libjson-maybexs-perl. 210s Preparing to unpack .../229-libjson-maybexs-perl_1.004008-1_all.deb ... 210s Unpacking libjson-maybexs-perl (1.004008-1) ... 210s Selecting previously unselected package liblist-compare-perl. 210s Preparing to unpack .../230-liblist-compare-perl_0.55-2_all.deb ... 210s Unpacking liblist-compare-perl (0.55-2) ... 210s Selecting previously unselected package liblist-someutils-perl. 210s Preparing to unpack .../231-liblist-someutils-perl_0.59-1_all.deb ... 210s Unpacking liblist-someutils-perl (0.59-1) ... 210s Selecting previously unselected package liblist-utilsby-perl. 210s Preparing to unpack .../232-liblist-utilsby-perl_0.12-2_all.deb ... 210s Unpacking liblist-utilsby-perl (0.12-2) ... 210s Selecting previously unselected package libmldbm-perl. 210s Preparing to unpack .../233-libmldbm-perl_2.05-4_all.deb ... 210s Unpacking libmldbm-perl (2.05-4) ... 210s Selecting previously unselected package libclass-method-modifiers-perl. 210s Preparing to unpack .../234-libclass-method-modifiers-perl_2.15-1_all.deb ... 210s Unpacking libclass-method-modifiers-perl (2.15-1) ... 210s Selecting previously unselected package libimport-into-perl. 210s Preparing to unpack .../235-libimport-into-perl_1.002005-2_all.deb ... 210s Unpacking libimport-into-perl (1.002005-2) ... 211s Selecting previously unselected package librole-tiny-perl. 211s Preparing to unpack .../236-librole-tiny-perl_2.002004-1_all.deb ... 211s Unpacking librole-tiny-perl (2.002004-1) ... 211s Selecting previously unselected package libsub-quote-perl. 211s Preparing to unpack .../237-libsub-quote-perl_2.006009-1ubuntu1_all.deb ... 211s Unpacking libsub-quote-perl (2.006009-1ubuntu1) ... 211s Selecting previously unselected package libmoo-perl. 211s Preparing to unpack .../238-libmoo-perl_2.005005-1_all.deb ... 211s Unpacking libmoo-perl (2.005005-1) ... 211s Selecting previously unselected package libstrictures-perl. 211s Preparing to unpack .../239-libstrictures-perl_2.000006-1build1_all.deb ... 211s Unpacking libstrictures-perl (2.000006-1build1) ... 211s Selecting previously unselected package libmoox-aliases-perl. 211s Preparing to unpack .../240-libmoox-aliases-perl_0.001006-2_all.deb ... 211s Unpacking libmoox-aliases-perl (0.001006-2) ... 211s Selecting previously unselected package libperlio-gzip-perl. 211s Preparing to unpack .../241-libperlio-gzip-perl_0.20-1build5_arm64.deb ... 211s Unpacking libperlio-gzip-perl (0.20-1build5) ... 211s Selecting previously unselected package libperlio-utf8-strict-perl. 211s Preparing to unpack .../242-libperlio-utf8-strict-perl_0.010-1build4_arm64.deb ... 211s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 211s Selecting previously unselected package libproc-processtable-perl:arm64. 211s Preparing to unpack .../243-libproc-processtable-perl_0.637-1_arm64.deb ... 211s Unpacking libproc-processtable-perl:arm64 (0.637-1) ... 211s Selecting previously unselected package libregexp-wildcards-perl. 211s Preparing to unpack .../244-libregexp-wildcards-perl_1.05-3_all.deb ... 211s Unpacking libregexp-wildcards-perl (1.05-3) ... 211s Selecting previously unselected package libsereal-decoder-perl. 211s Preparing to unpack .../245-libsereal-decoder-perl_5.004+ds-1build5_arm64.deb ... 211s Unpacking libsereal-decoder-perl (5.004+ds-1build5) ... 211s Selecting previously unselected package libsereal-encoder-perl. 211s Preparing to unpack .../246-libsereal-encoder-perl_5.004+ds-1build4_arm64.deb ... 211s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 211s Selecting previously unselected package libterm-readkey-perl. 211s Preparing to unpack .../247-libterm-readkey-perl_2.38-2build5_arm64.deb ... 211s Unpacking libterm-readkey-perl (2.38-2build5) ... 211s Selecting previously unselected package libtext-levenshteinxs-perl. 211s Preparing to unpack .../248-libtext-levenshteinxs-perl_0.03-5build5_arm64.deb ... 211s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 211s Selecting previously unselected package libmarkdown2:arm64. 211s Preparing to unpack .../249-libmarkdown2_2.2.7-2.1build1_arm64.deb ... 211s Unpacking libmarkdown2:arm64 (2.2.7-2.1build1) ... 211s Selecting previously unselected package libtext-markdown-discount-perl. 211s Preparing to unpack .../250-libtext-markdown-discount-perl_0.18-1_arm64.deb ... 211s Unpacking libtext-markdown-discount-perl (0.18-1) ... 211s Selecting previously unselected package libdata-messagepack-perl. 211s Preparing to unpack .../251-libdata-messagepack-perl_1.02-3_arm64.deb ... 211s Unpacking libdata-messagepack-perl (1.02-3) ... 211s Selecting previously unselected package libtext-xslate-perl:arm64. 211s Preparing to unpack .../252-libtext-xslate-perl_3.5.9-2build1_arm64.deb ... 211s Unpacking libtext-xslate-perl:arm64 (3.5.9-2build1) ... 211s Selecting previously unselected package libtime-duration-perl. 211s Preparing to unpack .../253-libtime-duration-perl_1.21-2_all.deb ... 211s Unpacking libtime-duration-perl (1.21-2) ... 211s Selecting previously unselected package libtime-moment-perl. 211s Preparing to unpack .../254-libtime-moment-perl_0.46-1_arm64.deb ... 211s Unpacking libtime-moment-perl (0.46-1) ... 211s Selecting previously unselected package libunicode-utf8-perl. 211s Preparing to unpack .../255-libunicode-utf8-perl_0.63-1_arm64.deb ... 211s Unpacking libunicode-utf8-perl (0.63-1) ... 211s Selecting previously unselected package libcgi-pm-perl. 211s Preparing to unpack .../256-libcgi-pm-perl_4.71-1build1_all.deb ... 211s Unpacking libcgi-pm-perl (4.71-1build1) ... 211s Selecting previously unselected package libhtml-form-perl. 211s Preparing to unpack .../257-libhtml-form-perl_6.13-1build1_all.deb ... 211s Unpacking libhtml-form-perl (6.13-1build1) ... 211s Selecting previously unselected package libwww-mechanize-perl. 211s Preparing to unpack .../258-libwww-mechanize-perl_2.20-1ubuntu1_all.deb ... 211s Unpacking libwww-mechanize-perl (2.20-1ubuntu1) ... 211s Selecting previously unselected package libxml-namespacesupport-perl. 211s Preparing to unpack .../259-libxml-namespacesupport-perl_1.12-2_all.deb ... 211s Unpacking libxml-namespacesupport-perl (1.12-2) ... 211s Selecting previously unselected package libxml-sax-base-perl. 212s Preparing to unpack .../260-libxml-sax-base-perl_1.09-3_all.deb ... 212s Unpacking libxml-sax-base-perl (1.09-3) ... 212s Selecting previously unselected package libxml-sax-perl. 212s Preparing to unpack .../261-libxml-sax-perl_1.02+dfsg-4_all.deb ... 212s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 212s Selecting previously unselected package libxml-libxml-perl. 212s Preparing to unpack .../262-libxml-libxml-perl_2.0207+dfsg+really+2.0207-0ubuntu7_arm64.deb ... 212s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 212s Selecting previously unselected package lzip. 212s Preparing to unpack .../263-lzip_1.25-4_arm64.deb ... 212s Unpacking lzip (1.25-4) ... 212s Selecting previously unselected package lzop. 212s Preparing to unpack .../264-lzop_1.04-2build4_arm64.deb ... 212s Unpacking lzop (1.04-2build4) ... 212s Selecting previously unselected package patchutils. 212s Preparing to unpack .../265-patchutils_0.4.3-1_arm64.deb ... 212s Unpacking patchutils (0.4.3-1) ... 212s Selecting previously unselected package t1utils. 212s Preparing to unpack .../266-t1utils_1.41-4build4_arm64.deb ... 212s Unpacking t1utils (1.41-4build4) ... 212s Selecting previously unselected package unzip. 212s Preparing to unpack .../267-unzip_6.0-29ubuntu1_arm64.deb ... 212s Unpacking unzip (6.0-29ubuntu1) ... 212s Selecting previously unselected package lintian. 212s Preparing to unpack .../268-lintian_2.127.0ubuntu1_all.deb ... 212s Unpacking lintian (2.127.0ubuntu1) ... 212s Selecting previously unselected package libconfig-model-dpkg-perl. 212s Preparing to unpack .../269-libconfig-model-dpkg-perl_3.016_all.deb ... 212s Unpacking libconfig-model-dpkg-perl (3.016) ... 212s Selecting previously unselected package libconvert-binhex-perl. 212s Preparing to unpack .../270-libconvert-binhex-perl_1.125-3_all.deb ... 212s Unpacking libconvert-binhex-perl (1.125-3) ... 212s Selecting previously unselected package libnet-smtp-ssl-perl. 212s Preparing to unpack .../271-libnet-smtp-ssl-perl_1.04-2_all.deb ... 212s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 212s Selecting previously unselected package libmailtools-perl. 212s Preparing to unpack .../272-libmailtools-perl_2.22-1_all.deb ... 212s Unpacking libmailtools-perl (2.22-1) ... 212s Selecting previously unselected package libmime-tools-perl. 212s Preparing to unpack .../273-libmime-tools-perl_5.515-1_all.deb ... 212s Unpacking libmime-tools-perl (5.515-1) ... 212s Selecting previously unselected package libb-keywords-perl. 212s Preparing to unpack .../274-libb-keywords-perl_1.29-1_all.deb ... 212s Unpacking libb-keywords-perl (1.29-1) ... 212s Selecting previously unselected package libclass-tiny-perl. 212s Preparing to unpack .../275-libclass-tiny-perl_1.008-2_all.deb ... 212s Unpacking libclass-tiny-perl (1.008-2) ... 212s Selecting previously unselected package liblingua-en-inflect-perl. 212s Preparing to unpack .../276-liblingua-en-inflect-perl_1.905-2_all.deb ... 212s Unpacking liblingua-en-inflect-perl (1.905-2) ... 212s Selecting previously unselected package libpod-spell-perl. 212s Preparing to unpack .../277-libpod-spell-perl_1.27-1_all.deb ... 212s Unpacking libpod-spell-perl (1.27-1) ... 212s Selecting previously unselected package libsafe-isa-perl. 212s Preparing to unpack .../278-libsafe-isa-perl_1.000010-1build1_all.deb ... 212s Unpacking libsafe-isa-perl (1.000010-1build1) ... 212s Selecting previously unselected package libtask-weaken-perl. 212s Preparing to unpack .../279-libtask-weaken-perl_1.06-2_all.deb ... 212s Unpacking libtask-weaken-perl (1.06-2) ... 212s Selecting previously unselected package libppi-perl. 213s Preparing to unpack .../280-libppi-perl_1.284-1_all.deb ... 213s Unpacking libppi-perl (1.284-1) ... 213s Selecting previously unselected package libreadonly-perl. 213s Preparing to unpack .../281-libreadonly-perl_2.050-3_all.deb ... 213s Unpacking libreadonly-perl (2.050-3) ... 213s Selecting previously unselected package libppix-quotelike-perl. 213s Preparing to unpack .../282-libppix-quotelike-perl_0.023-1_all.deb ... 213s Unpacking libppix-quotelike-perl (0.023-1) ... 213s Selecting previously unselected package libppix-regexp-perl. 213s Preparing to unpack .../283-libppix-regexp-perl_0.091-1_all.deb ... 213s Unpacking libppix-regexp-perl (0.091-1) ... 213s Selecting previously unselected package libppix-utils-perl. 213s Preparing to unpack .../284-libppix-utils-perl_0.003-2_all.deb ... 213s Unpacking libppix-utils-perl (0.003-2) ... 213s Selecting previously unselected package libstring-format-perl. 213s Preparing to unpack .../285-libstring-format-perl_1.18-1build1_all.deb ... 213s Unpacking libstring-format-perl (1.18-1build1) ... 213s Selecting previously unselected package perltidy. 213s Preparing to unpack .../286-perltidy_20250105-1build1_all.deb ... 213s Unpacking perltidy (20250105-1build1) ... 213s Selecting previously unselected package libperl-critic-perl. 213s Preparing to unpack .../287-libperl-critic-perl_1.156-1_all.deb ... 213s Unpacking libperl-critic-perl (1.156-1) ... 213s Selecting previously unselected package libtext-wrapper-perl. 213s Preparing to unpack .../288-libtext-wrapper-perl_1.05-4_all.deb ... 213s Unpacking libtext-wrapper-perl (1.05-4) ... 213s Selecting previously unselected package libsuitesparseconfig7:arm64. 213s Preparing to unpack .../289-libsuitesparseconfig7_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libsuitesparseconfig7:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libamd3:arm64. 213s Preparing to unpack .../290-libamd3_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libamd3:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libblas3:arm64. 213s Preparing to unpack .../291-libblas3_3.12.1-7ubuntu1_arm64.deb ... 213s Unpacking libblas3:arm64 (3.12.1-7ubuntu1) ... 213s Selecting previously unselected package libgfortran5:arm64. 213s Preparing to unpack .../292-libgfortran5_15.2.0-12ubuntu1_arm64.deb ... 213s Unpacking libgfortran5:arm64 (15.2.0-12ubuntu1) ... 213s Selecting previously unselected package liblapack3:arm64. 213s Preparing to unpack .../293-liblapack3_3.12.1-7ubuntu1_arm64.deb ... 213s Unpacking liblapack3:arm64 (3.12.1-7ubuntu1) ... 213s Selecting previously unselected package libarpack2t64:arm64. 213s Preparing to unpack .../294-libarpack2t64_3.9.1-6_arm64.deb ... 213s Unpacking libarpack2t64:arm64 (3.9.1-6) ... 213s Selecting previously unselected package libccolamd3:arm64. 213s Preparing to unpack .../295-libccolamd3_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libccolamd3:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libcamd3:arm64. 213s Preparing to unpack .../296-libcamd3_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libcamd3:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libcolamd3:arm64. 213s Preparing to unpack .../297-libcolamd3_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libcolamd3:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libcholmod5:arm64. 213s Preparing to unpack .../298-libcholmod5_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libcholmod5:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libcxsparse4:arm64. 213s Preparing to unpack .../299-libcxsparse4_1%3a7.12.1+dfsg-1_arm64.deb ... 213s Unpacking libcxsparse4:arm64 (1:7.12.1+dfsg-1) ... 213s Selecting previously unselected package libfftw3-double3:arm64. 213s Preparing to unpack .../300-libfftw3-double3_3.3.10-2fakesync1build2_arm64.deb ... 213s Unpacking libfftw3-double3:arm64 (3.3.10-2fakesync1build2) ... 213s Selecting previously unselected package libfftw3-single3:arm64. 214s Preparing to unpack .../301-libfftw3-single3_3.3.10-2fakesync1build2_arm64.deb ... 214s Unpacking libfftw3-single3:arm64 (3.3.10-2fakesync1build2) ... 214s Selecting previously unselected package libxfixes3:arm64. 214s Preparing to unpack .../302-libxfixes3_1%3a6.0.0-2build2_arm64.deb ... 214s Unpacking libxfixes3:arm64 (1:6.0.0-2build2) ... 214s Selecting previously unselected package libxcursor1:arm64. 214s Preparing to unpack .../303-libxcursor1_1%3a1.2.3-1build1_arm64.deb ... 214s Unpacking libxcursor1:arm64 (1:1.2.3-1build1) ... 214s Selecting previously unselected package libxft2:arm64. 214s Preparing to unpack .../304-libxft2_2.3.6-1build2_arm64.deb ... 214s Unpacking libxft2:arm64 (2.3.6-1build2) ... 214s Selecting previously unselected package libxinerama1:arm64. 214s Preparing to unpack .../305-libxinerama1_2%3a1.1.4-3build2_arm64.deb ... 214s Unpacking libxinerama1:arm64 (2:1.1.4-3build2) ... 214s Selecting previously unselected package libfltk1.3t64:arm64. 214s Preparing to unpack .../306-libfltk1.3t64_1.3.11-3_arm64.deb ... 214s Unpacking libfltk1.3t64:arm64 (1.3.11-3) ... 214s Selecting previously unselected package libglvnd0:arm64. 214s Preparing to unpack .../307-libglvnd0_1.7.0-3_arm64.deb ... 214s Unpacking libglvnd0:arm64 (1.7.0-3) ... 214s Selecting previously unselected package libx11-xcb1:arm64. 214s Preparing to unpack .../308-libx11-xcb1_2%3a1.8.12-1build1_arm64.deb ... 214s Unpacking libx11-xcb1:arm64 (2:1.8.12-1build1) ... 214s Selecting previously unselected package libxcb-dri3-0:arm64. 214s Preparing to unpack .../309-libxcb-dri3-0_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-dri3-0:arm64 (1.17.0-2ubuntu1) ... 214s Selecting previously unselected package libxcb-present0:arm64. 214s Preparing to unpack .../310-libxcb-present0_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-present0:arm64 (1.17.0-2ubuntu1) ... 214s Selecting previously unselected package libxcb-randr0:arm64. 214s Preparing to unpack .../311-libxcb-randr0_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-randr0:arm64 (1.17.0-2ubuntu1) ... 214s Selecting previously unselected package libxcb-sync1:arm64. 214s Preparing to unpack .../312-libxcb-sync1_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-sync1:arm64 (1.17.0-2ubuntu1) ... 214s Selecting previously unselected package libxcb-xfixes0:arm64. 214s Preparing to unpack .../313-libxcb-xfixes0_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-xfixes0:arm64 (1.17.0-2ubuntu1) ... 214s Selecting previously unselected package libxshmfence1:arm64. 214s Preparing to unpack .../314-libxshmfence1_1.3.3-1build1_arm64.deb ... 214s Unpacking libxshmfence1:arm64 (1.3.3-1build1) ... 214s Selecting previously unselected package mesa-libgallium:arm64. 214s Preparing to unpack .../315-mesa-libgallium_25.3.3-1ubuntu1_arm64.deb ... 214s Unpacking mesa-libgallium:arm64 (25.3.3-1ubuntu1) ... 214s Selecting previously unselected package libgbm1:arm64. 214s Preparing to unpack .../316-libgbm1_25.3.3-1ubuntu1_arm64.deb ... 214s Unpacking libgbm1:arm64 (25.3.3-1ubuntu1) ... 214s Selecting previously unselected package libvulkan1:arm64. 214s Preparing to unpack .../317-libvulkan1_1.4.335.0-1_arm64.deb ... 214s Unpacking libvulkan1:arm64 (1.4.335.0-1) ... 214s Selecting previously unselected package libgl1-mesa-dri:arm64. 214s Preparing to unpack .../318-libgl1-mesa-dri_25.3.3-1ubuntu1_arm64.deb ... 214s Unpacking libgl1-mesa-dri:arm64 (25.3.3-1ubuntu1) ... 214s Selecting previously unselected package libxcb-glx0:arm64. 214s Preparing to unpack .../319-libxcb-glx0_1.17.0-2ubuntu1_arm64.deb ... 214s Unpacking libxcb-glx0:arm64 (1.17.0-2ubuntu1) ... 215s Selecting previously unselected package libxxf86vm1:arm64. 215s Preparing to unpack .../320-libxxf86vm1_1%3a1.1.4-2_arm64.deb ... 215s Unpacking libxxf86vm1:arm64 (1:1.1.4-2) ... 215s Selecting previously unselected package libglx-mesa0:arm64. 215s Preparing to unpack .../321-libglx-mesa0_25.3.3-1ubuntu1_arm64.deb ... 215s Unpacking libglx-mesa0:arm64 (25.3.3-1ubuntu1) ... 215s Selecting previously unselected package libglx0:arm64. 215s Preparing to unpack .../322-libglx0_1.7.0-3_arm64.deb ... 215s Unpacking libglx0:arm64 (1.7.0-3) ... 215s Selecting previously unselected package libgl1:arm64. 215s Preparing to unpack .../323-libgl1_1.7.0-3_arm64.deb ... 215s Unpacking libgl1:arm64 (1.7.0-3) ... 215s Selecting previously unselected package libfltk-gl1.3t64:arm64. 215s Preparing to unpack .../324-libfltk-gl1.3t64_1.3.11-3_arm64.deb ... 215s Unpacking libfltk-gl1.3t64:arm64 (1.3.11-3) ... 215s Selecting previously unselected package libgl2ps1.4:arm64. 215s Preparing to unpack .../325-libgl2ps1.4_1.4.2+dfsg1-4_arm64.deb ... 215s Unpacking libgl2ps1.4:arm64 (1.4.2+dfsg1-4) ... 215s Selecting previously unselected package libltdl7:arm64. 215s Preparing to unpack .../326-libltdl7_2.5.4-9_arm64.deb ... 215s Unpacking libltdl7:arm64 (2.5.4-9) ... 215s Selecting previously unselected package libglpk40:arm64. 215s Preparing to unpack .../327-libglpk40_5.0-2_arm64.deb ... 215s Unpacking libglpk40:arm64 (5.0-2) ... 215s Selecting previously unselected package libopengl0:arm64. 215s Preparing to unpack .../328-libopengl0_1.7.0-3_arm64.deb ... 215s Unpacking libopengl0:arm64 (1.7.0-3) ... 215s Selecting previously unselected package libglu1-mesa:arm64. 215s Preparing to unpack .../329-libglu1-mesa_9.0.2-1.1build2_arm64.deb ... 215s Unpacking libglu1-mesa:arm64 (9.0.2-1.1build2) ... 215s Selecting previously unselected package libhwy1t64:arm64. 215s Preparing to unpack .../330-libhwy1t64_1.3.0-2_arm64.deb ... 215s Unpacking libhwy1t64:arm64 (1.3.0-2) ... 215s Selecting previously unselected package liblcms2-2:arm64. 215s Preparing to unpack .../331-liblcms2-2_2.17-1_arm64.deb ... 215s Unpacking liblcms2-2:arm64 (2.17-1) ... 215s Selecting previously unselected package libjxl0.11:arm64. 215s Preparing to unpack .../332-libjxl0.11_0.11.1-6ubuntu1_arm64.deb ... 215s Unpacking libjxl0.11:arm64 (0.11.1-6ubuntu1) ... 215s Selecting previously unselected package libwmflite-0.2-7:arm64. 215s Preparing to unpack .../333-libwmflite-0.2-7_0.2.13-2_arm64.deb ... 215s Unpacking libwmflite-0.2-7:arm64 (0.2.13-2) ... 215s Selecting previously unselected package libgraphicsmagick-q16-3t64. 215s Preparing to unpack .../334-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17696-1build1_arm64.deb ... 215s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 215s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 215s Preparing to unpack .../335-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17696-1build1_arm64.deb ... 215s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 215s Selecting previously unselected package libsz2:arm64. 215s Preparing to unpack .../336-libsz2_1.1.5-1_arm64.deb ... 215s Unpacking libsz2:arm64 (1.1.5-1) ... 215s Selecting previously unselected package libhdf5-310:arm64. 215s Preparing to unpack .../337-libhdf5-310_1.14.6+repack-2_arm64.deb ... 215s Unpacking libhdf5-310:arm64 (1.14.6+repack-2) ... 215s Selecting previously unselected package libasound2-data. 215s Preparing to unpack .../338-libasound2-data_1.2.15.3-1ubuntu1_all.deb ... 215s Unpacking libasound2-data (1.2.15.3-1ubuntu1) ... 215s Selecting previously unselected package libasound2t64:arm64. 215s Preparing to unpack .../339-libasound2t64_1.2.15.3-1ubuntu1_arm64.deb ... 215s Unpacking libasound2t64:arm64 (1.2.15.3-1ubuntu1) ... 215s Selecting previously unselected package libopus0:arm64. 215s Preparing to unpack .../340-libopus0_1.6.1-1_arm64.deb ... 215s Unpacking libopus0:arm64 (1.6.1-1) ... 215s Selecting previously unselected package libsamplerate0:arm64. 215s Preparing to unpack .../341-libsamplerate0_0.2.2-4build2_arm64.deb ... 215s Unpacking libsamplerate0:arm64 (0.2.2-4build2) ... 216s Selecting previously unselected package libjack-jackd2-0:arm64. 216s Preparing to unpack .../342-libjack-jackd2-0_1.9.22~dfsg-5_arm64.deb ... 216s Unpacking libjack-jackd2-0:arm64 (1.9.22~dfsg-5) ... 216s Selecting previously unselected package libasyncns0:arm64. 216s Preparing to unpack .../343-libasyncns0_0.8-7_arm64.deb ... 216s Unpacking libasyncns0:arm64 (0.8-7) ... 216s Selecting previously unselected package libogg0:arm64. 216s Preparing to unpack .../344-libogg0_1.3.6-2_arm64.deb ... 216s Unpacking libogg0:arm64 (1.3.6-2) ... 216s Selecting previously unselected package libflac14:arm64. 216s Preparing to unpack .../345-libflac14_1.5.0+ds-5_arm64.deb ... 216s Unpacking libflac14:arm64 (1.5.0+ds-5) ... 216s Selecting previously unselected package libmp3lame0:arm64. 216s Preparing to unpack .../346-libmp3lame0_3.100-6build2_arm64.deb ... 216s Unpacking libmp3lame0:arm64 (3.100-6build2) ... 216s Selecting previously unselected package libmpg123-0t64:arm64. 216s Preparing to unpack .../347-libmpg123-0t64_1.33.3-2_arm64.deb ... 216s Unpacking libmpg123-0t64:arm64 (1.33.3-2) ... 216s Selecting previously unselected package libvorbis0a:arm64. 216s Preparing to unpack .../348-libvorbis0a_1.3.7-3build1_arm64.deb ... 216s Unpacking libvorbis0a:arm64 (1.3.7-3build1) ... 216s Selecting previously unselected package libvorbisenc2:arm64. 216s Preparing to unpack .../349-libvorbisenc2_1.3.7-3build1_arm64.deb ... 216s Unpacking libvorbisenc2:arm64 (1.3.7-3build1) ... 216s Selecting previously unselected package libsndfile1:arm64. 216s Preparing to unpack .../350-libsndfile1_1.2.2-4_arm64.deb ... 216s Unpacking libsndfile1:arm64 (1.2.2-4) ... 216s Selecting previously unselected package libpulse0:arm64. 216s Preparing to unpack .../351-libpulse0_1%3a17.0+dfsg1-2ubuntu4_arm64.deb ... 216s Unpacking libpulse0:arm64 (1:17.0+dfsg1-2ubuntu4) ... 216s Selecting previously unselected package libportaudio2:arm64. 216s Preparing to unpack .../352-libportaudio2_19.7.0+git20251227.3270c9ae-0ubuntu1_arm64.deb ... 216s Unpacking libportaudio2:arm64 (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 216s Selecting previously unselected package libqhull-r8.0:arm64. 216s Preparing to unpack .../353-libqhull-r8.0_2020.2-8_arm64.deb ... 216s Unpacking libqhull-r8.0:arm64 (2020.2-8) ... 216s Selecting previously unselected package libqrupdate1:arm64. 216s Preparing to unpack .../354-libqrupdate1_1.1.5-3_arm64.deb ... 216s Unpacking libqrupdate1:arm64 (1.1.5-3) ... 216s Selecting previously unselected package libqscintilla2-qt6-l10n. 216s Preparing to unpack .../355-libqscintilla2-qt6-l10n_2.14.1+dfsg-2_all.deb ... 216s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 216s Selecting previously unselected package libb2-1:arm64. 216s Preparing to unpack .../356-libb2-1_0.98.1-1.1build2_arm64.deb ... 216s Unpacking libb2-1:arm64 (0.98.1-1.1build2) ... 216s Selecting previously unselected package libdouble-conversion3:arm64. 216s Preparing to unpack .../357-libdouble-conversion3_3.4.0-1_arm64.deb ... 216s Unpacking libdouble-conversion3:arm64 (3.4.0-1) ... 216s Selecting previously unselected package libpcre2-16-0:arm64. 216s Preparing to unpack .../358-libpcre2-16-0_10.46-1_arm64.deb ... 216s Unpacking libpcre2-16-0:arm64 (10.46-1) ... 216s Selecting previously unselected package libqt6core6t64:arm64. 216s Preparing to unpack .../359-libqt6core6t64_6.9.2+dfsg-3ubuntu2_arm64.deb ... 216s Unpacking libqt6core6t64:arm64 (6.9.2+dfsg-3ubuntu2) ... 216s Selecting previously unselected package libwayland-client0:arm64. 216s Preparing to unpack .../360-libwayland-client0_1.24.0-2_arm64.deb ... 216s Unpacking libwayland-client0:arm64 (1.24.0-2) ... 216s Selecting previously unselected package libegl-mesa0:arm64. 216s Preparing to unpack .../361-libegl-mesa0_25.3.3-1ubuntu1_arm64.deb ... 216s Unpacking libegl-mesa0:arm64 (25.3.3-1ubuntu1) ... 216s Selecting previously unselected package libegl1:arm64. 216s Preparing to unpack .../362-libegl1_1.7.0-3_arm64.deb ... 216s Unpacking libegl1:arm64 (1.7.0-3) ... 216s Selecting previously unselected package x11-common. 216s Preparing to unpack .../363-x11-common_1%3a7.7+24ubuntu1_all.deb ... 216s Unpacking x11-common (1:7.7+24ubuntu1) ... 216s Selecting previously unselected package libice6:arm64. 216s Preparing to unpack .../364-libice6_2%3a1.1.1-1build1_arm64.deb ... 216s Unpacking libice6:arm64 (2:1.1.1-1build1) ... 216s Selecting previously unselected package libmtdev1t64:arm64. 217s Preparing to unpack .../365-libmtdev1t64_1.1.7-1build1_arm64.deb ... 217s Unpacking libmtdev1t64:arm64 (1.1.7-1build1) ... 217s Selecting previously unselected package libwacom-common. 217s Preparing to unpack .../366-libwacom-common_2.16.1-1_all.deb ... 217s Unpacking libwacom-common (2.16.1-1) ... 217s Selecting previously unselected package libwacom9:arm64. 217s Preparing to unpack .../367-libwacom9_2.16.1-1_arm64.deb ... 217s Unpacking libwacom9:arm64 (2.16.1-1) ... 217s Selecting previously unselected package libinput-bin. 217s Preparing to unpack .../368-libinput-bin_1.30.1-1_arm64.deb ... 217s Unpacking libinput-bin (1.30.1-1) ... 217s Selecting previously unselected package libinput10:arm64. 217s Preparing to unpack .../369-libinput10_1.30.1-1_arm64.deb ... 217s Unpacking libinput10:arm64 (1.30.1-1) ... 217s Selecting previously unselected package libmd4c0:arm64. 217s Preparing to unpack .../370-libmd4c0_0.5.2-2build1_arm64.deb ... 217s Unpacking libmd4c0:arm64 (0.5.2-2build1) ... 217s Selecting previously unselected package libqt6dbus6:arm64. 217s Preparing to unpack .../371-libqt6dbus6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 217s Unpacking libqt6dbus6:arm64 (6.9.2+dfsg-3ubuntu2) ... 217s Selecting previously unselected package libsm6:arm64. 217s Preparing to unpack .../372-libsm6_2%3a1.2.6-1_arm64.deb ... 217s Unpacking libsm6:arm64 (2:1.2.6-1) ... 217s Selecting previously unselected package libts0t64:arm64. 217s Preparing to unpack .../373-libts0t64_1.22-1.1build2_arm64.deb ... 217s Unpacking libts0t64:arm64 (1.22-1.1build2) ... 217s Selecting previously unselected package libxcb-util1:arm64. 217s Preparing to unpack .../374-libxcb-util1_0.4.1-1build1_arm64.deb ... 217s Unpacking libxcb-util1:arm64 (0.4.1-1build1) ... 217s Selecting previously unselected package libxcb-image0:arm64. 217s Preparing to unpack .../375-libxcb-image0_0.4.0-2build2_arm64.deb ... 217s Unpacking libxcb-image0:arm64 (0.4.0-2build2) ... 217s Selecting previously unselected package libxcb-render-util0:arm64. 217s Preparing to unpack .../376-libxcb-render-util0_0.3.10-1build1_arm64.deb ... 217s Unpacking libxcb-render-util0:arm64 (0.3.10-1build1) ... 217s Selecting previously unselected package libxcb-cursor0:arm64. 217s Preparing to unpack .../377-libxcb-cursor0_0.1.5-1build1_arm64.deb ... 217s Unpacking libxcb-cursor0:arm64 (0.1.5-1build1) ... 217s Selecting previously unselected package libxcb-icccm4:arm64. 217s Preparing to unpack .../378-libxcb-icccm4_0.4.2-1build1_arm64.deb ... 217s Unpacking libxcb-icccm4:arm64 (0.4.2-1build1) ... 217s Selecting previously unselected package libxcb-keysyms1:arm64. 217s Preparing to unpack .../379-libxcb-keysyms1_0.4.1-1build1_arm64.deb ... 217s Unpacking libxcb-keysyms1:arm64 (0.4.1-1build1) ... 217s Selecting previously unselected package libxcb-shape0:arm64. 217s Preparing to unpack .../380-libxcb-shape0_1.17.0-2ubuntu1_arm64.deb ... 217s Unpacking libxcb-shape0:arm64 (1.17.0-2ubuntu1) ... 217s Selecting previously unselected package libxcb-xinput0:arm64. 217s Preparing to unpack .../381-libxcb-xinput0_1.17.0-2ubuntu1_arm64.deb ... 217s Unpacking libxcb-xinput0:arm64 (1.17.0-2ubuntu1) ... 217s Selecting previously unselected package libxcb-xkb1:arm64. 217s Preparing to unpack .../382-libxcb-xkb1_1.17.0-2ubuntu1_arm64.deb ... 217s Unpacking libxcb-xkb1:arm64 (1.17.0-2ubuntu1) ... 217s Selecting previously unselected package libxkbcommon-x11-0:arm64. 217s Preparing to unpack .../383-libxkbcommon-x11-0_1.12.3-1_arm64.deb ... 217s Unpacking libxkbcommon-x11-0:arm64 (1.12.3-1) ... 218s Selecting previously unselected package libqt6gui6:arm64. 218s Preparing to unpack .../384-libqt6gui6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6gui6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libavahi-common-data:arm64. 218s Preparing to unpack .../385-libavahi-common-data_0.8-17ubuntu2_arm64.deb ... 218s Unpacking libavahi-common-data:arm64 (0.8-17ubuntu2) ... 218s Selecting previously unselected package libavahi-common3:arm64. 218s Preparing to unpack .../386-libavahi-common3_0.8-17ubuntu2_arm64.deb ... 218s Unpacking libavahi-common3:arm64 (0.8-17ubuntu2) ... 218s Selecting previously unselected package libavahi-client3:arm64. 218s Preparing to unpack .../387-libavahi-client3_0.8-17ubuntu2_arm64.deb ... 218s Unpacking libavahi-client3:arm64 (0.8-17ubuntu2) ... 218s Selecting previously unselected package libcups2t64:arm64. 218s Preparing to unpack .../388-libcups2t64_2.4.16-1ubuntu1_arm64.deb ... 218s Unpacking libcups2t64:arm64 (2.4.16-1ubuntu1) ... 218s Selecting previously unselected package libqt6widgets6:arm64. 218s Preparing to unpack .../389-libqt6widgets6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6widgets6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqt6printsupport6:arm64. 218s Preparing to unpack .../390-libqt6printsupport6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6printsupport6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqscintilla2-qt6-15:arm64. 218s Preparing to unpack .../391-libqscintilla2-qt6-15_2.14.1+dfsg-2_arm64.deb ... 218s Unpacking libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-2) ... 218s Selecting previously unselected package libqt6core5compat6:arm64. 218s Preparing to unpack .../392-libqt6core5compat6_6.9.2-3build1_arm64.deb ... 218s Unpacking libqt6core5compat6:arm64 (6.9.2-3build1) ... 218s Selecting previously unselected package libqt6sql6:arm64. 218s Preparing to unpack .../393-libqt6sql6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6sql6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqt6help6:arm64. 218s Preparing to unpack .../394-libqt6help6_6.9.2-5_arm64.deb ... 218s Unpacking libqt6help6:arm64 (6.9.2-5) ... 218s Selecting previously unselected package libduktape207:arm64. 218s Preparing to unpack .../395-libduktape207_2.7.0+tests-0ubuntu4_arm64.deb ... 218s Unpacking libduktape207:arm64 (2.7.0+tests-0ubuntu4) ... 218s Selecting previously unselected package libproxy1v5:arm64. 218s Preparing to unpack .../396-libproxy1v5_0.5.12-1_arm64.deb ... 218s Unpacking libproxy1v5:arm64 (0.5.12-1) ... 218s Selecting previously unselected package libqt6network6:arm64. 218s Preparing to unpack .../397-libqt6network6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6network6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqt6opengl6:arm64. 218s Preparing to unpack .../398-libqt6opengl6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6opengl6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqt6openglwidgets6:arm64. 218s Preparing to unpack .../399-libqt6openglwidgets6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6openglwidgets6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libqt6xml6:arm64. 218s Preparing to unpack .../400-libqt6xml6_6.9.2+dfsg-3ubuntu2_arm64.deb ... 218s Unpacking libqt6xml6:arm64 (6.9.2+dfsg-3ubuntu2) ... 218s Selecting previously unselected package libspqr4:arm64. 218s Preparing to unpack .../401-libspqr4_1%3a7.12.1+dfsg-1_arm64.deb ... 218s Unpacking libspqr4:arm64 (1:7.12.1+dfsg-1) ... 218s Selecting previously unselected package libumfpack6:arm64. 218s Preparing to unpack .../402-libumfpack6_1%3a7.12.1+dfsg-1_arm64.deb ... 218s Unpacking libumfpack6:arm64 (1:7.12.1+dfsg-1) ... 218s Selecting previously unselected package libtext-unidecode-perl. 218s Preparing to unpack .../403-libtext-unidecode-perl_1.30-3_all.deb ... 218s Unpacking libtext-unidecode-perl (1.30-3) ... 218s Selecting previously unselected package libintl-perl. 218s Preparing to unpack .../404-libintl-perl_1.35-1_all.deb ... 218s Unpacking libintl-perl (1.35-1) ... 218s Selecting previously unselected package texinfo-lib. 218s Preparing to unpack .../405-texinfo-lib_7.2-5_arm64.deb ... 218s Unpacking texinfo-lib (7.2-5) ... 218s Selecting previously unselected package tex-common. 218s Preparing to unpack .../406-tex-common_6.20_all.deb ... 218s Unpacking tex-common (6.20) ... 218s Selecting previously unselected package texinfo. 218s Preparing to unpack .../407-texinfo_7.2-5_all.deb ... 218s Unpacking texinfo (7.2-5) ... 219s Selecting previously unselected package octave-common. 219s Preparing to unpack .../408-octave-common_10.3.0-3_all.deb ... 219s Unpacking octave-common (10.3.0-3) ... 219s Selecting previously unselected package octave. 219s Preparing to unpack .../409-octave_10.3.0-3_arm64.deb ... 219s Unpacking octave (10.3.0-3) ... 219s Selecting previously unselected package libncurses-dev:arm64. 219s Preparing to unpack .../410-libncurses-dev_6.6+20251231-1_arm64.deb ... 219s Unpacking libncurses-dev:arm64 (6.6+20251231-1) ... 219s Selecting previously unselected package libreadline-dev:arm64. 219s Preparing to unpack .../411-libreadline-dev_8.3-3_arm64.deb ... 219s Unpacking libreadline-dev:arm64 (8.3-3) ... 219s Selecting previously unselected package libhdf5-fortran-310:arm64. 219s Preparing to unpack .../412-libhdf5-fortran-310_1.14.6+repack-2_arm64.deb ... 219s Unpacking libhdf5-fortran-310:arm64 (1.14.6+repack-2) ... 219s Selecting previously unselected package libhdf5-hl-310:arm64. 219s Preparing to unpack .../413-libhdf5-hl-310_1.14.6+repack-2_arm64.deb ... 219s Unpacking libhdf5-hl-310:arm64 (1.14.6+repack-2) ... 219s Selecting previously unselected package libhdf5-hl-fortran-310:arm64. 219s Preparing to unpack .../414-libhdf5-hl-fortran-310_1.14.6+repack-2_arm64.deb ... 219s Unpacking libhdf5-hl-fortran-310:arm64 (1.14.6+repack-2) ... 219s Selecting previously unselected package libhdf5-cpp-310:arm64. 219s Preparing to unpack .../415-libhdf5-cpp-310_1.14.6+repack-2_arm64.deb ... 219s Unpacking libhdf5-cpp-310:arm64 (1.14.6+repack-2) ... 219s Selecting previously unselected package libhdf5-hl-cpp-310:arm64. 219s Preparing to unpack .../416-libhdf5-hl-cpp-310_1.14.6+repack-2_arm64.deb ... 219s Unpacking libhdf5-hl-cpp-310:arm64 (1.14.6+repack-2) ... 219s Selecting previously unselected package zlib1g-dev:arm64. 219s Preparing to unpack .../417-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu2_arm64.deb ... 219s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 219s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 219s Preparing to unpack .../418-libjpeg-turbo8-dev_2.1.5-4ubuntu2_arm64.deb ... 219s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-4ubuntu2) ... 219s Selecting previously unselected package libjpeg8-dev:arm64. 219s Preparing to unpack .../419-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 219s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 220s Selecting previously unselected package libjpeg-dev:arm64. 220s Preparing to unpack .../420-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 220s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 220s Selecting previously unselected package libaec0:arm64. 220s Preparing to unpack .../421-libaec0_1.1.5-1_arm64.deb ... 220s Unpacking libaec0:arm64 (1.1.5-1) ... 220s Selecting previously unselected package libaec-dev:arm64. 220s Preparing to unpack .../422-libaec-dev_1.1.5-1_arm64.deb ... 220s Unpacking libaec-dev:arm64 (1.1.5-1) ... 220s Selecting previously unselected package libbrotli-dev:arm64. 220s Preparing to unpack .../423-libbrotli-dev_1.1.0-2build6_arm64.deb ... 220s Unpacking libbrotli-dev:arm64 (1.1.0-2build6) ... 220s Selecting previously unselected package libidn2-dev:arm64. 220s Preparing to unpack .../424-libidn2-dev_2.3.8-4_arm64.deb ... 220s Unpacking libidn2-dev:arm64 (2.3.8-4) ... 220s Selecting previously unselected package comerr-dev:arm64. 220s Preparing to unpack .../425-comerr-dev_2.1-1.47.2-3ubuntu2_arm64.deb ... 220s Unpacking comerr-dev:arm64 (2.1-1.47.2-3ubuntu2) ... 220s Selecting previously unselected package libgssrpc4t64:arm64. 220s Preparing to unpack .../426-libgssrpc4t64_1.22.1-2_arm64.deb ... 220s Unpacking libgssrpc4t64:arm64 (1.22.1-2) ... 220s Selecting previously unselected package libkadm5clnt-mit12:arm64. 220s Preparing to unpack .../427-libkadm5clnt-mit12_1.22.1-2_arm64.deb ... 220s Unpacking libkadm5clnt-mit12:arm64 (1.22.1-2) ... 220s Selecting previously unselected package libkdb5-10t64:arm64. 220s Preparing to unpack .../428-libkdb5-10t64_1.22.1-2_arm64.deb ... 220s Unpacking libkdb5-10t64:arm64 (1.22.1-2) ... 220s Selecting previously unselected package libkadm5srv-mit12:arm64. 220s Preparing to unpack .../429-libkadm5srv-mit12_1.22.1-2_arm64.deb ... 220s Unpacking libkadm5srv-mit12:arm64 (1.22.1-2) ... 220s Selecting previously unselected package krb5-multidev:arm64. 220s Preparing to unpack .../430-krb5-multidev_1.22.1-2_arm64.deb ... 220s Unpacking krb5-multidev:arm64 (1.22.1-2) ... 220s Selecting previously unselected package libkrb5-dev:arm64. 220s Preparing to unpack .../431-libkrb5-dev_1.22.1-2_arm64.deb ... 220s Unpacking libkrb5-dev:arm64 (1.22.1-2) ... 220s Selecting previously unselected package libldap-dev:arm64. 220s Preparing to unpack .../432-libldap-dev_2.6.10+dfsg-1ubuntu5_arm64.deb ... 220s Unpacking libldap-dev:arm64 (2.6.10+dfsg-1ubuntu5) ... 220s Selecting previously unselected package libpkgconf3:arm64. 220s Preparing to unpack .../433-libpkgconf3_1.8.1-4build1_arm64.deb ... 220s Unpacking libpkgconf3:arm64 (1.8.1-4build1) ... 220s Selecting previously unselected package pkgconf-bin. 220s Preparing to unpack .../434-pkgconf-bin_1.8.1-4build1_arm64.deb ... 220s Unpacking pkgconf-bin (1.8.1-4build1) ... 220s Selecting previously unselected package pkgconf:arm64. 220s Preparing to unpack .../435-pkgconf_1.8.1-4build1_arm64.deb ... 220s Unpacking pkgconf:arm64 (1.8.1-4build1) ... 220s Selecting previously unselected package libnghttp2-dev:arm64. 220s Preparing to unpack .../436-libnghttp2-dev_1.64.0-1.1ubuntu1_arm64.deb ... 220s Unpacking libnghttp2-dev:arm64 (1.64.0-1.1ubuntu1) ... 220s Selecting previously unselected package libpsl-dev:arm64. 220s Preparing to unpack .../437-libpsl-dev_0.21.2-1.1build2_arm64.deb ... 220s Unpacking libpsl-dev:arm64 (0.21.2-1.1build2) ... 220s Selecting previously unselected package libgmpxx4ldbl:arm64. 220s Preparing to unpack .../438-libgmpxx4ldbl_2%3a6.3.0+dfsg-5ubuntu1_arm64.deb ... 220s Unpacking libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-5ubuntu1) ... 220s Selecting previously unselected package libgmp-dev:arm64. 220s Preparing to unpack .../439-libgmp-dev_2%3a6.3.0+dfsg-5ubuntu1_arm64.deb ... 220s Unpacking libgmp-dev:arm64 (2:6.3.0+dfsg-5ubuntu1) ... 220s Selecting previously unselected package libevent-2.1-7t64:arm64. 220s Preparing to unpack .../440-libevent-2.1-7t64_2.1.12-stable-10build1_arm64.deb ... 220s Unpacking libevent-2.1-7t64:arm64 (2.1.12-stable-10build1) ... 220s Selecting previously unselected package libunbound8:arm64. 220s Preparing to unpack .../441-libunbound8_1.24.2-1ubuntu1_arm64.deb ... 220s Unpacking libunbound8:arm64 (1.24.2-1ubuntu1) ... 220s Selecting previously unselected package libgnutls-dane0t64:arm64. 220s Preparing to unpack .../442-libgnutls-dane0t64_3.8.10-3ubuntu1_arm64.deb ... 220s Unpacking libgnutls-dane0t64:arm64 (3.8.10-3ubuntu1) ... 221s Selecting previously unselected package libgnutls-openssl27t64:arm64. 221s Preparing to unpack .../443-libgnutls-openssl27t64_3.8.10-3ubuntu1_arm64.deb ... 221s Unpacking libgnutls-openssl27t64:arm64 (3.8.10-3ubuntu1) ... 221s Selecting previously unselected package libp11-kit-dev:arm64. 221s Preparing to unpack .../444-libp11-kit-dev_0.25.10-1_arm64.deb ... 221s Unpacking libp11-kit-dev:arm64 (0.25.10-1) ... 221s Selecting previously unselected package libtasn1-6-dev:arm64. 221s Preparing to unpack .../445-libtasn1-6-dev_4.21.0-2_arm64.deb ... 221s Unpacking libtasn1-6-dev:arm64 (4.21.0-2) ... 221s Selecting previously unselected package nettle-dev:arm64. 221s Preparing to unpack .../446-nettle-dev_3.10.2-1_arm64.deb ... 221s Unpacking nettle-dev:arm64 (3.10.2-1) ... 221s Selecting previously unselected package libgnutls28-dev:arm64. 221s Preparing to unpack .../447-libgnutls28-dev_3.8.10-3ubuntu1_arm64.deb ... 221s Unpacking libgnutls28-dev:arm64 (3.8.10-3ubuntu1) ... 221s Selecting previously unselected package librtmp-dev:arm64. 221s Preparing to unpack .../448-librtmp-dev_2.4+20151223.gitfa8646d.1-3_arm64.deb ... 221s Unpacking librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-3) ... 221s Selecting previously unselected package libssl-dev:arm64. 221s Preparing to unpack .../449-libssl-dev_3.5.3-1ubuntu2_arm64.deb ... 221s Unpacking libssl-dev:arm64 (3.5.3-1ubuntu2) ... 221s Selecting previously unselected package libssh2-1-dev:arm64. 221s Preparing to unpack .../450-libssh2-1-dev_1.11.1-1build1_arm64.deb ... 221s Unpacking libssh2-1-dev:arm64 (1.11.1-1build1) ... 221s Selecting previously unselected package libzstd-dev:arm64. 221s Preparing to unpack .../451-libzstd-dev_1.5.7+dfsg-3_arm64.deb ... 221s Unpacking libzstd-dev:arm64 (1.5.7+dfsg-3) ... 221s Selecting previously unselected package libcurl4-openssl-dev:arm64. 221s Preparing to unpack .../452-libcurl4-openssl-dev_8.18.0-1ubuntu1_arm64.deb ... 221s Unpacking libcurl4-openssl-dev:arm64 (8.18.0-1ubuntu1) ... 221s Selecting previously unselected package hdf5-helpers. 221s Preparing to unpack .../453-hdf5-helpers_1.14.6+repack-2_arm64.deb ... 221s Unpacking hdf5-helpers (1.14.6+repack-2) ... 221s Selecting previously unselected package libhdf5-dev. 221s Preparing to unpack .../454-libhdf5-dev_1.14.6+repack-2_arm64.deb ... 221s Unpacking libhdf5-dev (1.14.6+repack-2) ... 221s Selecting previously unselected package xorg-sgml-doctools. 221s Preparing to unpack .../455-xorg-sgml-doctools_1%3a1.11-1.1build1_all.deb ... 221s Unpacking xorg-sgml-doctools (1:1.11-1.1build1) ... 221s Selecting previously unselected package x11proto-dev. 221s Preparing to unpack .../456-x11proto-dev_2025.1-1_all.deb ... 221s Unpacking x11proto-dev (2025.1-1) ... 221s Selecting previously unselected package libxau-dev:arm64. 221s Preparing to unpack .../457-libxau-dev_1%3a1.0.11-1build1_arm64.deb ... 221s Unpacking libxau-dev:arm64 (1:1.0.11-1build1) ... 221s Selecting previously unselected package libxdmcp-dev:arm64. 221s Preparing to unpack .../458-libxdmcp-dev_1%3a1.1.5-2_arm64.deb ... 221s Unpacking libxdmcp-dev:arm64 (1:1.1.5-2) ... 221s Selecting previously unselected package xtrans-dev. 222s Preparing to unpack .../459-xtrans-dev_1.6.0-1build1_all.deb ... 222s Unpacking xtrans-dev (1.6.0-1build1) ... 222s Selecting previously unselected package libxcb1-dev:arm64. 222s Preparing to unpack .../460-libxcb1-dev_1.17.0-2ubuntu1_arm64.deb ... 222s Unpacking libxcb1-dev:arm64 (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libx11-dev:arm64. 222s Preparing to unpack .../461-libx11-dev_2%3a1.8.12-1build1_arm64.deb ... 222s Unpacking libx11-dev:arm64 (2:1.8.12-1build1) ... 222s Selecting previously unselected package libglx-dev:arm64. 222s Preparing to unpack .../462-libglx-dev_1.7.0-3_arm64.deb ... 222s Unpacking libglx-dev:arm64 (1.7.0-3) ... 222s Selecting previously unselected package libgl-dev:arm64. 222s Preparing to unpack .../463-libgl-dev_1.7.0-3_arm64.deb ... 222s Unpacking libgl-dev:arm64 (1.7.0-3) ... 222s Selecting previously unselected package libblas-dev:arm64. 222s Preparing to unpack .../464-libblas-dev_3.12.1-7ubuntu1_arm64.deb ... 222s Unpacking libblas-dev:arm64 (3.12.1-7ubuntu1) ... 222s Selecting previously unselected package liblapack-dev:arm64. 222s Preparing to unpack .../465-liblapack-dev_3.12.1-7ubuntu1_arm64.deb ... 222s Unpacking liblapack-dev:arm64 (3.12.1-7ubuntu1) ... 222s Selecting previously unselected package libfftw3-long3:arm64. 222s Preparing to unpack .../466-libfftw3-long3_3.3.10-2fakesync1build2_arm64.deb ... 222s Unpacking libfftw3-long3:arm64 (3.3.10-2fakesync1build2) ... 222s Selecting previously unselected package libfftw3-bin. 222s Preparing to unpack .../467-libfftw3-bin_3.3.10-2fakesync1build2_arm64.deb ... 222s Unpacking libfftw3-bin (3.3.10-2fakesync1build2) ... 222s Selecting previously unselected package libfftw3-dev:arm64. 222s Preparing to unpack .../468-libfftw3-dev_3.3.10-2fakesync1build2_arm64.deb ... 222s Unpacking libfftw3-dev:arm64 (3.3.10-2fakesync1build2) ... 222s Selecting previously unselected package libgfortran-15-dev:arm64. 222s Preparing to unpack .../469-libgfortran-15-dev_15.2.0-12ubuntu1_arm64.deb ... 222s Unpacking libgfortran-15-dev:arm64 (15.2.0-12ubuntu1) ... 222s Selecting previously unselected package gfortran-15-aarch64-linux-gnu. 222s Preparing to unpack .../470-gfortran-15-aarch64-linux-gnu_15.2.0-12ubuntu1_arm64.deb ... 222s Unpacking gfortran-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 222s Selecting previously unselected package gfortran-15. 222s Preparing to unpack .../471-gfortran-15_15.2.0-12ubuntu1_arm64.deb ... 222s Unpacking gfortran-15 (15.2.0-12ubuntu1) ... 222s Selecting previously unselected package gfortran-aarch64-linux-gnu. 223s Preparing to unpack .../472-gfortran-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 223s Unpacking gfortran-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 223s Selecting previously unselected package gfortran. 223s Preparing to unpack .../473-gfortran_4%3a15.2.0-4ubuntu1_arm64.deb ... 223s Unpacking gfortran (4:15.2.0-4ubuntu1) ... 223s Selecting previously unselected package libstdc++-15-dev:arm64. 223s Preparing to unpack .../474-libstdc++-15-dev_15.2.0-12ubuntu1_arm64.deb ... 223s Unpacking libstdc++-15-dev:arm64 (15.2.0-12ubuntu1) ... 223s Selecting previously unselected package g++-15-aarch64-linux-gnu. 223s Preparing to unpack .../475-g++-15-aarch64-linux-gnu_15.2.0-12ubuntu1_arm64.deb ... 223s Unpacking g++-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 223s Selecting previously unselected package g++-15. 223s Preparing to unpack .../476-g++-15_15.2.0-12ubuntu1_arm64.deb ... 223s Unpacking g++-15 (15.2.0-12ubuntu1) ... 223s Selecting previously unselected package g++-aarch64-linux-gnu. 223s Preparing to unpack .../477-g++-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 223s Unpacking g++-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 223s Selecting previously unselected package g++. 223s Preparing to unpack .../478-g++_4%3a15.2.0-4ubuntu1_arm64.deb ... 223s Unpacking g++ (4:15.2.0-4ubuntu1) ... 223s Selecting previously unselected package octave-dev. 223s Preparing to unpack .../479-octave-dev_10.3.0-3_arm64.deb ... 223s Unpacking octave-dev (10.3.0-3) ... 223s Selecting previously unselected package dh-octave. 223s Preparing to unpack .../480-dh-octave_1.14.0_all.deb ... 223s Unpacking dh-octave (1.14.0) ... 223s Selecting previously unselected package libfontenc1:arm64. 223s Preparing to unpack .../481-libfontenc1_1%3a1.1.8-1build2_arm64.deb ... 223s Unpacking libfontenc1:arm64 (1:1.1.8-1build2) ... 223s Selecting previously unselected package libunwind8:arm64. 223s Preparing to unpack .../482-libunwind8_1.8.3-0ubuntu1_arm64.deb ... 223s Unpacking libunwind8:arm64 (1.8.3-0ubuntu1) ... 223s Selecting previously unselected package libxt6t64:arm64. 223s Preparing to unpack .../483-libxt6t64_1%3a1.2.1-1.3_arm64.deb ... 223s Unpacking libxt6t64:arm64 (1:1.2.1-1.3) ... 223s Selecting previously unselected package libxmu6:arm64. 223s Preparing to unpack .../484-libxmu6_2%3a1.1.3-4_arm64.deb ... 223s Unpacking libxmu6:arm64 (2:1.1.3-4) ... 223s Selecting previously unselected package libxaw7:arm64. 224s Preparing to unpack .../485-libxaw7_2%3a1.0.16-1build1_arm64.deb ... 224s Unpacking libxaw7:arm64 (2:1.0.16-1build1) ... 224s Selecting previously unselected package libxfont2:arm64. 224s Preparing to unpack .../486-libxfont2_1%3a2.0.6-2_arm64.deb ... 224s Unpacking libxfont2:arm64 (1:2.0.6-2) ... 224s Selecting previously unselected package libxkbfile1:arm64. 224s Preparing to unpack .../487-libxkbfile1_1%3a1.1.0-1build5_arm64.deb ... 224s Unpacking libxkbfile1:arm64 (1:1.1.0-1build5) ... 224s Selecting previously unselected package libxrandr2:arm64. 224s Preparing to unpack .../488-libxrandr2_2%3a1.5.4-1build1_arm64.deb ... 224s Unpacking libxrandr2:arm64 (2:1.5.4-1build1) ... 224s Selecting previously unselected package octave-io:arm64. 224s Preparing to unpack .../489-octave-io_2.7.0-3_arm64.deb ... 224s Unpacking octave-io:arm64 (2.7.0-3) ... 224s Selecting previously unselected package octave-statistics-common. 224s Preparing to unpack .../490-octave-statistics-common_1.7.6-2_all.deb ... 224s Unpacking octave-statistics-common (1.7.6-2) ... 224s Selecting previously unselected package octave-statistics. 224s Preparing to unpack .../491-octave-statistics_1.7.6-2_arm64.deb ... 224s Unpacking octave-statistics (1.7.6-2) ... 224s Selecting previously unselected package x11-xkb-utils. 224s Preparing to unpack .../492-x11-xkb-utils_7.7+9build1_arm64.deb ... 224s Unpacking x11-xkb-utils (7.7+9build1) ... 224s Selecting previously unselected package xserver-common. 224s Preparing to unpack .../493-xserver-common_2%3a21.1.21-1ubuntu1_all.deb ... 224s Unpacking xserver-common (2:21.1.21-1ubuntu1) ... 224s Selecting previously unselected package xvfb. 224s Preparing to unpack .../494-xvfb_2%3a21.1.21-1ubuntu1_arm64.deb ... 224s Unpacking xvfb (2:21.1.21-1ubuntu1) ... 224s Setting up libconfig-inifiles-perl (3.000003-4) ... 224s Setting up libapt-pkg-perl (0.1.43) ... 224s Setting up libhwy1t64:arm64 (1.3.0-2) ... 224s Setting up libmodule-pluggable-perl (5.2-5) ... 224s Setting up libgraphite2-3:arm64 (1.3.14-11ubuntu1) ... 224s Setting up libstring-escape-perl (2010.002-3) ... 224s Setting up libgnutls-openssl27t64:arm64 (3.8.10-3ubuntu1) ... 224s Setting up libxcb-dri3-0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up liblcms2-2:arm64 (2.17-1) ... 224s Setting up libberkeleydb-perl:arm64 (0.66-2) ... 224s Setting up libpixman-1-0:arm64 (0.46.4-1) ... 224s Setting up libsharpyuv0:arm64 (1.5.0-0.1build1) ... 224s Setting up libaom3:arm64 (3.13.1-2) ... 224s Setting up liblingua-en-inflect-perl (1.905-2) ... 224s Setting up libx11-xcb1:arm64 (2:1.8.12-1build1) ... 224s Setting up libfile-which-perl (1.27-2) ... 224s Setting up libdouble-conversion3:arm64 (3.4.0-1) ... 224s Setting up libsafe-isa-perl (1.000010-1build1) ... 224s Setting up libtask-weaken-perl (1.06-2) ... 224s Setting up libunicode-utf8-perl (0.63-1) ... 224s Setting up libset-intspan-perl (1.19-3) ... 224s Setting up libxcb-xfixes0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libogg0:arm64 (1.3.6-2) ... 224s Setting up libmouse-perl:arm64 (2.6.1-1) ... 224s Setting up libzstd-dev:arm64 (1.5.7+dfsg-3) ... 224s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu2) ... 224s Setting up libpod-pom-perl (2.01-4) ... 224s Setting up libxpm4:arm64 (1:3.5.17-1build3) ... 224s Setting up hdf5-helpers (1.14.6+repack-2) ... 224s Setting up libwmflite-0.2-7:arm64 (0.2.13-2) ... 224s Setting up libregexp-pattern-perl (0.2.14-2) ... 224s Setting up libdata-messagepack-perl (1.02-3) ... 224s Setting up libclass-inspector-perl (1.36-3) ... 224s Setting up libxcb-xinput0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libxrender1:arm64 (1:0.9.12-1) ... 224s Setting up libdynaloader-functions-perl (0.004-2) ... 224s Setting up libdatrie1:arm64 (0.2.14-1) ... 224s Setting up libtext-glob-perl (0.11-3) ... 224s Setting up libclass-method-modifiers-perl (2.15-1) ... 224s Setting up liblist-compare-perl (0.55-2) ... 224s Setting up libxcb-render0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libclone-perl:arm64 (0.47-1) ... 224s Setting up libarchive-zip-perl (1.68-1) ... 224s Setting up libsub-identify-perl (0.14-4) ... 224s Setting up libcpanel-json-xs-perl:arm64 (4.40-1) ... 224s Setting up libglvnd0:arm64 (1.7.0-3) ... 224s Setting up libio-stringy-perl (2.113-2) ... 224s Setting up libhtml-tagset-perl (3.24-1) ... 224s Setting up libts0t64:arm64 (1.22-1.1build2) ... 224s Setting up liblog-any-perl (1.718-1build1) ... 224s Setting up libyaml-pp-perl (0.39.0-1) ... 224s Setting up libxcb-glx0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libdevel-size-perl (0.85-1) ... 224s Setting up unzip (6.0-29ubuntu1) ... 224s Setting up libdebhelper-perl (13.28ubuntu1) ... 224s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 224s Setting up libconvert-binhex-perl (1.125-3) ... 224s Setting up liblwp-mediatypes-perl (6.04-2) ... 224s Setting up libyaml-libyaml-perl (0.904.0+ds-1) ... 224s Setting up fonts-freefont-otf (20211204+svn4273-4build1) ... 224s Setting up libio-interactive-perl (1.027-1) ... 224s Setting up libxcb-keysyms1:arm64 (0.4.1-1build1) ... 224s Setting up libxcb-shape0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up x11-common (1:7.7+24ubuntu1) ... 224s Setting up libtry-tiny-perl (0.32-1) ... 224s Setting up libdeflate0:arm64 (1.23-2) ... 224s Setting up perl-openssl-defaults:arm64 (7build4) ... 224s Setting up libmldbm-perl (2.05-4) ... 224s Setting up linux-libc-dev:arm64 (6.18.0-9.9) ... 224s Setting up libxml-namespacesupport-perl (1.12-2) ... 224s Setting up m4 (1.4.20-2) ... 224s Setting up libevent-2.1-7t64:arm64 (2.1.12-stable-10build1) ... 224s Setting up libclone-choose-perl (0.010-2) ... 224s Setting up libqhull-r8.0:arm64 (2020.2-8) ... 224s Setting up libxcb-render-util0:arm64 (0.3.10-1build1) ... 224s Setting up libtime-moment-perl (0.46-1) ... 224s Setting up libencode-locale-perl (1.05-3) ... 224s Setting up libxcb-shm0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libxcb-icccm4:arm64 (0.4.2-1build1) ... 224s Setting up texinfo-lib (7.2-5) ... 224s Setting up libtext-wrapper-perl (1.05-4) ... 224s Setting up libmpg123-0t64:arm64 (1.33.3-2) ... 224s Setting up libgomp1:arm64 (15.2.0-12ubuntu1) ... 224s Setting up libconfig-tiny-perl (2.30-1) ... 224s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 224s Setting up libunwind8:arm64 (1.8.3-0ubuntu1) ... 224s Setting up liblist-utilsby-perl (0.12-2) ... 224s Setting up libyaml-tiny-perl (1.76-1) ... 224s Setting up libjbig0:arm64 (2.1-6.1ubuntu3) ... 224s Setting up octave-common (10.3.0-3) ... 224s Setting up libregexp-common-perl (2024080801-1) ... 224s Setting up libpcre2-16-0:arm64 (10.46-1) ... 224s Setting up libaec0:arm64 (1.1.5-1) ... 224s Setting up libnet-netmask-perl (2.0003-1build1) ... 224s Setting up libopengl0:arm64 (1.7.0-3) ... 224s Setting up libsub-install-perl (0.929-1) ... 224s Setting up libxcb-util1:arm64 (0.4.1-1build1) ... 224s Setting up libpsl-dev:arm64 (0.21.2-1.1build2) ... 224s Setting up libxxf86vm1:arm64 (1:1.1.4-2) ... 224s Setting up libindirect-perl (0.39-2build5) ... 224s Setting up libfyaml0:arm64 (0.9.3-1) ... 224s Setting up libxcb-xkb1:arm64 (1.17.0-2ubuntu1) ... 224s Setting up libxcb-image0:arm64 (0.4.0-2build2) ... 224s Setting up libnumber-compare-perl (0.03-3) ... 224s Setting up libxcb-present0:arm64 (1.17.0-2ubuntu1) ... 224s Setting up liberror-perl (0.17030-1) ... 224s Setting up libasound2-data (1.2.15.3-1ubuntu1) ... 224s Setting up patchutils (0.4.3-1) ... 224s Setting up tex-common (6.20) ... 225s update-language: texlive-base not installed and configured, doing nothing! 225s Setting up libjson-maybexs-perl (1.004008-1) ... 225s Setting up libxml-sax-base-perl (1.09-3) ... 225s Setting up libio-string-perl (1.08-4) ... 225s Setting up libreadonly-perl (2.050-3) ... 225s Setting up libboolean-perl (0.46-3) ... 225s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 225s Setting up xtrans-dev (1.6.0-1build1) ... 225s Setting up libfontenc1:arm64 (1:1.1.8-1build2) ... 225s Setting up autotools-dev (20240727.1) ... 225s Setting up libblas3:arm64 (3.12.1-7ubuntu1) ... 225s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 225s Setting up libclass-data-inheritable-perl (0.10-1) ... 225s Setting up libunbound8:arm64 (1.24.2-1ubuntu1) ... 225s Setting up libpkgconf3:arm64 (1.8.1-4build1) ... 225s Setting up libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-5ubuntu1) ... 225s Setting up libalgorithm-c3-perl (0.11-2) ... 225s Setting up rpcsvc-proto (1.4.3-1build1) ... 225s Setting up libasound2t64:arm64 (1.2.15.3-1ubuntu1) ... 225s Setting up liblog-log4perl-perl (1.57-1) ... 225s Setting up libtext-reform-perl (1.20-5) ... 225s Setting up libclass-tiny-perl (1.008-2) ... 225s Setting up libgnutls-dane0t64:arm64 (3.8.10-3ubuntu1) ... 225s Setting up libfile-find-rule-perl (0.35-1build1) ... 225s Setting up libxfixes3:arm64 (1:6.0.0-2build2) ... 225s Setting up libxcb-sync1:arm64 (1.17.0-2ubuntu1) ... 225s Setting up libipc-system-simple-perl (1.30-2) ... 225s Setting up libio-tiecombine-perl (1.005-3) ... 225s Setting up libnet-domain-tld-perl (1.75-4) ... 225s Setting up libgssrpc4t64:arm64 (1.22.1-2) ... 225s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 225s Setting up libldap-dev:arm64 (2.6.10+dfsg-1ubuntu5) ... 225s Setting up aglfn (1.7+git20191031.4036a9c-2build1) ... 225s Setting up libstring-format-perl (1.18-1build1) ... 225s Setting up libxcb-cursor0:arm64 (0.1.5-1build1) ... 225s Setting up lzip (1.25-4) ... 225s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 225s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 225s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 225s Setting up libavahi-common-data:arm64 (0.8-17ubuntu2) ... 225s Setting up libopus0:arm64 (1.6.1-1) ... 225s Setting up t1utils (1.41-4build4) ... 225s Setting up libxinerama1:arm64 (2:1.1.4-3build2) ... 225s Setting up diffstat (1.68-1) ... 225s Setting up libimagequant0:arm64 (2.18.0-1build1) ... 225s Setting up libxkbcommon-x11-0:arm64 (1.12.3-1) ... 225s Setting up libssl-dev:arm64 (3.5.3-1ubuntu2) ... 225s Setting up libmpc3:arm64 (1.3.1-2) ... 225s Setting up libvorbis0a:arm64 (1.3.7-3build1) ... 225s Setting up libvariable-magic-perl (0.64-1build1) ... 225s Setting up libio-html-perl (1.004-3) ... 225s Setting up libxrandr2:arm64 (2:1.5.4-1build1) ... 225s Setting up libtext-template-perl (1.61-1) ... 225s Setting up libpod-parser-perl (1.67-1) ... 225s Setting up autopoint (0.23.2-1) ... 225s Setting up libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 225s Setting up libflac14:arm64 (1.5.0+ds-5) ... 225s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 225s Setting up pkgconf-bin (1.8.1-4build1) ... 225s Setting up libjpeg-turbo8:arm64 (2.1.5-4ubuntu2) ... 225s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 225s Setting up libltdl7:arm64 (2.5.4-9) ... 225s Setting up libidn2-dev:arm64 (2.3.8-4) ... 225s Setting up libfftw3-double3:arm64 (3.3.10-2fakesync1build2) ... 225s Setting up libb-keywords-perl (1.29-1) ... 225s Setting up libparams-util-perl (1.102-3build1) ... 225s Setting up libgfortran5:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libvulkan1:arm64 (1.4.335.0-1) ... 225s Setting up libtime-duration-perl (1.21-2) ... 225s Setting up autoconf (2.72-3.1ubuntu1) ... 225s Setting up libtext-xslate-perl:arm64 (3.5.9-2build1) ... 225s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 225s Setting up libwebp7:arm64 (1.5.0-0.1build1) ... 225s Setting up libarray-intspan-perl (2.004-2) ... 225s Setting up libcapture-tiny-perl (0.50-1) ... 225s Setting up libtimedate-perl (2.3300-2) ... 225s Setting up libexporter-lite-perl (0.09-2) ... 225s Setting up libubsan1:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libsub-name-perl:arm64 (0.28-1) ... 225s Setting up dwz (0.16-2) ... 225s Setting up libdata-validate-domain-perl (0.15-1) ... 225s Setting up libproc-processtable-perl:arm64 (0.637-1) ... 225s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 225s Setting up libmtdev1t64:arm64 (1.1.7-1build1) ... 225s Setting up libduktape207:arm64 (2.7.0+tests-0ubuntu4) ... 225s Setting up libasyncns0:arm64 (0.8-7) ... 225s Setting up libxshmfence1:arm64 (1.3.3-1build1) ... 225s Setting up libhwasan0:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libcrypt-dev:arm64 (1:4.5.1-1) ... 225s Setting up libxcb-randr0:arm64 (1.17.0-2ubuntu1) ... 225s Setting up libpath-tiny-perl (0.148-1) ... 225s Setting up libasan8:arm64 (15.2.0-12ubuntu1) ... 225s Setting up lzop (1.04-2build4) ... 225s Setting up libjson-perl (4.10000-1) ... 225s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 225s Setting up librole-tiny-perl (2.002004-1) ... 225s Setting up libintl-perl (1.35-1) ... 225s Setting up debugedit (1:5.2-3build1) ... 225s Setting up libipc-run3-perl (0.049-1) ... 225s Setting up libmd4c0:arm64 (0.5.2-2build1) ... 225s Setting up libregexp-wildcards-perl (1.05-3) ... 225s Setting up libmousex-strictconstructor-perl (0.02-3) ... 225s Setting up libfile-sharedir-perl (1.118-3) ... 225s Setting up libsub-uplevel-perl (0.2800-3) ... 225s Setting up libsuitesparseconfig7:arm64 (1:7.12.1+dfsg-1) ... 225s Setting up liblua5.4-0:arm64 (5.4.8-1) ... 225s Setting up libaliased-perl (0.34-3) ... 225s Setting up libharfbuzz0b:arm64 (12.3.2-1) ... 225s Setting up libthai-data (0.1.30-1) ... 225s Setting up xorg-sgml-doctools (1:1.11-1.1build1) ... 225s Setting up libstrictures-perl (2.000006-1build1) ... 225s Setting up libsub-quote-perl (2.006009-1ubuntu1) ... 225s Setting up libdevel-stacktrace-perl (2.0500-1) ... 225s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 225s Setting up libpod-spell-perl (1.27-1) ... 225s Setting up libtext-autoformat-perl (1.750000-2) ... 225s Setting up libglu1-mesa:arm64 (9.0.2-1.1build2) ... 225s Setting up libtoml-tiny-perl (0.20-1) ... 225s Setting up libstemmer0d:arm64 (3.0.1-1) ... 225s Setting up libxkbfile1:arm64 (1:1.1.0-1build5) ... 225s Setting up libsort-versions-perl (1.62-3) ... 225s Setting up libtsan2:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libexporter-tiny-perl (1.006003-1) ... 225s Setting up libterm-readkey-perl (2.38-2build5) ... 225s Setting up libisl23:arm64 (0.27-1build1) ... 225s Setting up libtext-unidecode-perl (1.30-3) ... 225s Setting up libde265-0:arm64 (1.0.16-1build1) ... 225s Setting up libc-dev-bin (2.42-2ubuntu5) ... 225s Setting up libfont-ttf-perl (1.06-2) ... 225s Setting up libfile-homedir-perl (1.006-2) ... 225s Setting up libsamplerate0:arm64 (0.2.2-4build2) ... 225s Setting up libtasn1-6-dev:arm64 (4.21.0-2) ... 225s Setting up libwebpmux3:arm64 (1.5.0-0.1build1) ... 225s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 225s Setting up libperlio-gzip-perl (0.20-1build5) ... 225s Setting up libjxl0.11:arm64 (0.11.1-6ubuntu1) ... 225s Setting up libxfont2:arm64 (1:2.0.6-2) ... 225s Setting up libhtml-html5-entities-perl (0.004-3) ... 225s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 225s Setting up libsereal-decoder-perl (5.004+ds-1build5) ... 225s Setting up libmarkdown2:arm64 (2.2.7-2.1build1) ... 225s Setting up libcc1-0:arm64 (15.2.0-12ubuntu1) ... 225s Setting up liburi-perl (5.34-2build1) ... 225s Setting up libnet-ipv6addr-perl (1.02-1) ... 225s Setting up libbrotli-dev:arm64 (1.1.0-2build6) ... 225s Setting up liblsan0:arm64 (15.2.0-12ubuntu1) ... 225s Setting up perltidy (20250105-1build1) ... 225s Setting up libp11-kit-dev:arm64 (0.25.10-1) ... 225s Setting up libmp3lame0:arm64 (3.100-6build2) ... 225s Setting up libblas-dev:arm64 (3.12.1-7ubuntu1) ... 225s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 225s Setting up libsz2:arm64 (1.1.5-1) ... 225s Setting up libitm1:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libvorbisenc2:arm64 (1.3.7-3build1) ... 225s Setting up libkadm5clnt-mit12:arm64 (1.22.1-2) ... 225s Setting up libdata-validate-ip-perl (0.31-1) ... 225s Setting up libwacom-common (2.16.1-1) ... 225s Setting up libmousex-nativetraits-perl (1.09-3) ... 225s Setting up libemail-address-xs-perl (1.05-1build5) ... 225s Setting up libwayland-client0:arm64 (1.24.0-2) ... 225s Setting up libnet-ssleay-perl:arm64 (1.94-3) ... 225s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 225s Setting up automake (1:1.18.1-3build1) ... 225s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 225s Setting up libb2-1:arm64 (0.98.1-1.1build2) ... 225s Setting up x11proto-dev (2025.1-1) ... 225s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 225s Setting up gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 225s Setting up cpp-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 225s Setting up libice6:arm64 (2:1.1.1-1build1) ... 225s Setting up libqt6core6t64:arm64 (6.9.2+dfsg-3ubuntu2) ... 225s Setting up libhttp-date-perl (6.06-1) ... 225s Setting up mesa-libgallium:arm64 (25.3.3-1ubuntu1) ... 225s Setting up liblapack3:arm64 (3.12.1-7ubuntu1) ... 225s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 225s Setting up libproxy1v5:arm64 (0.5.12-1) ... 225s Setting up libfile-basedir-perl (0.09-2) ... 225s Setting up gettext (0.23.2-1) ... 225s Setting up libarpack2t64:arm64 (3.9.1-6) ... 225s Setting up libfftw3-single3:arm64 (3.3.10-2fakesync1build2) ... 225s Setting up libgcc-15-dev:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libgmp-dev:arm64 (2:6.3.0+dfsg-5ubuntu1) ... 225s Setting up libamd3:arm64 (1:7.12.1+dfsg-1) ... 225s Setting up libfile-listing-perl (6.16-1) ... 225s Setting up libxau-dev:arm64 (1:1.0.11-1build1) ... 225s Setting up nettle-dev:arm64 (3.10.2-1) ... 225s Setting up libkdb5-10t64:arm64 (1.22.1-2) ... 225s Setting up libgbm1:arm64 (25.3.3-1ubuntu1) ... 225s Setting up libcolamd3:arm64 (1:7.12.1+dfsg-1) ... 225s Setting up libwacom9:arm64 (2.16.1-1) ... 225s Setting up fontconfig-config (2.17.1-3ubuntu1) ... 225s Setting up liblist-moreutils-perl (0.430-2) ... 225s Setting up libxcursor1:arm64 (1:1.2.3-1build1) ... 225s Setting up libpod-constants-perl (0.19-2) ... 225s Setting up libgl1-mesa-dri:arm64 (25.3.3-1ubuntu1) ... 225s Setting up libhash-merge-perl (0.302-1) ... 225s Setting up libsoftware-copyright-perl (0.015-1) ... 225s Setting up libaec-dev:arm64 (1.1.5-1) ... 225s Setting up libavahi-common3:arm64 (0.8-17ubuntu2) ... 225s Setting up libcxsparse4:arm64 (1:7.12.1+dfsg-1) ... 225s Setting up libfftw3-long3:arm64 (3.3.10-2fakesync1build2) ... 225s Setting up libnet-http-perl (6.24-1build1) ... 225s Setting up libpath-iterator-rule-perl (1.015-2) ... 225s Setting up libtext-markdown-discount-perl (0.18-1) ... 225s Setting up libappstream5:arm64 (1.1.1-1) ... 225s Setting up libexception-class-perl (1.45-1) ... 225s Setting up libclass-c3-perl (0.35-2) ... 225s Setting up libqrupdate1:arm64 (1.1.5-3) ... 225s Setting up libdevel-callchecker-perl:arm64 (0.009-2) ... 225s Setting up libgfortran-15-dev:arm64 (15.2.0-12ubuntu1) ... 225s Setting up libxml-sax-perl (1.02+dfsg-4) ... 225s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 225s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 225s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 226s Setting up libcamd3:arm64 (1:7.12.1+dfsg-1) ... 226s Setting up pkgconf:arm64 (1.8.1-4build1) ... 226s Setting up libinput-bin (1.30.1-1) ... 226s Setting up libxs-parse-sublike-perl:arm64 (0.41-1) ... 226s Setting up intltool-debian (0.35.0+20060710.6build1) ... 226s Setting up libthai0:arm64 (0.1.30-1) ... 226s Setting up libxdmcp-dev:arm64 (1:1.1.5-2) ... 226s Setting up cpp-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 226s Setting up libegl-mesa0:arm64 (25.3.3-1ubuntu1) ... 226s Setting up libdata-validate-uri-perl (0.07-3) ... 226s Setting up libxs-parse-keyword-perl (0.49-1) ... 226s Setting up libtest-exception-perl (0.43-3) ... 226s Setting up appstream (1.1.1-1) ... 226s ✔ Metadata cache was updated successfully. 226s Setting up libqt6xml6:arm64 (6.9.2+dfsg-3ubuntu2) ... 226s Setting up libglpk40:arm64 (5.0-2) ... 226s Setting up libqt6sql6:arm64 (6.9.2+dfsg-3ubuntu2) ... 226s Setting up libstring-copyright-perl (0.003014-1) ... 226s Setting up libppi-perl (1.284-1) ... 226s Setting up liblapack-dev:arm64 (3.12.1-7ubuntu1) ... 226s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 226s Setting up libdata-optlist-perl (0.114-1) ... 226s Setting up libccolamd3:arm64 (1:7.12.1+dfsg-1) ... 226s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 226s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 226s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 226s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 226s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 226s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 226s Setting up libwww-robotrules-perl (6.02-1build1) ... 226s Setting up libsyntax-keyword-try-perl (0.31-1) ... 226s Setting up libjack-jackd2-0:arm64 (1.9.22~dfsg-5) ... 226s Setting up libhdf5-310:arm64 (1.14.6+repack-2) ... 226s Setting up cpp-15 (15.2.0-12ubuntu1) ... 226s Setting up libtiff6:arm64 (4.7.0-3ubuntu3) ... 226s Setting up cpp (4:15.2.0-4ubuntu1) ... 226s Setting up libhtml-parser-perl:arm64 (3.83-1build1) ... 226s Setting up libppix-regexp-perl (0.091-1) ... 226s Setting up libkadm5srv-mit12:arm64 (1.22.1-2) ... 226s Setting up libegl1:arm64 (1.7.0-3) ... 226s Setting up libc6-dev:arm64 (2.42-2ubuntu5) ... 226s Setting up libqt6core5compat6:arm64 (6.9.2-3build1) ... 226s Setting up libfontconfig1:arm64 (2.17.1-3ubuntu1) ... 226s Setting up libsndfile1:arm64 (1.2.2-4) ... 226s Setting up libmro-compat-perl (0.15-2) ... 226s Setting up libhdf5-fortran-310:arm64 (1.14.6+repack-2) ... 226s Setting up libsm6:arm64 (2:1.2.6-1) ... 226s Setting up libavahi-client3:arm64 (0.8-17ubuntu2) ... 226s Setting up libio-socket-ssl-perl (2.098-1) ... 226s Setting up libsub-exporter-perl (0.990-1) ... 226s Setting up libqt6dbus6:arm64 (6.9.2+dfsg-3ubuntu2) ... 226s Setting up libppix-quotelike-perl (0.023-1) ... 226s Setting up libhttp-message-perl (7.01-1ubuntu1) ... 226s Setting up libhtml-form-perl (6.13-1build1) ... 226s Setting up libhdf5-cpp-310:arm64 (1.14.6+repack-2) ... 226s Setting up libiterator-perl (0.03+ds1-2) ... 226s Setting up libgnutls28-dev:arm64 (3.8.10-3ubuntu1) ... 226s Setting up libinput10:arm64 (1.30.1-1) ... 226s Setting up libnghttp2-dev:arm64 (1.64.0-1.1ubuntu1) ... 226s Setting up libhdf5-hl-310:arm64 (1.14.6+repack-2) ... 226s Setting up libhttp-negotiate-perl (6.01-2) ... 226s Setting up fontconfig (2.17.1-3ubuntu1) ... 228s Regenerating fonts cache... done. 228s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-4ubuntu2) ... 228s Setting up libcarp-assert-more-perl (2.9.0-1) ... 228s Setting up libcholmod5:arm64 (1:7.12.1+dfsg-1) ... 228s Setting up libxft2:arm64 (2.3.6-1build2) ... 228s Setting up libncurses-dev:arm64 (6.6+20251231-1) ... 228s Setting up libppix-utils-perl (0.003-2) ... 228s Setting up libglx-mesa0:arm64 (25.3.3-1ubuntu1) ... 228s Setting up gcc-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 228s Setting up libxcb1-dev:arm64 (1.17.0-2ubuntu1) ... 228s Setting up libiterator-util-perl (0.02+ds1-2) ... 228s Setting up libglx0:arm64 (1.7.0-3) ... 228s Setting up libhttp-cookies-perl (6.11-1) ... 228s Setting up libspqr4:arm64 (1:7.12.1+dfsg-1) ... 228s Setting up libpulse0:arm64 (1:17.0+dfsg1-2ubuntu4) ... 228s Setting up libfftw3-bin (3.3.10-2fakesync1build2) ... 229s Setting up po-debconf (1.0.22) ... 229s Setting up libhtml-tree-perl (5.07-3) ... 229s Setting up libparams-classify-perl:arm64 (0.015-2build6) ... 229s Setting up libpango-1.0-0:arm64 (1.57.0-1) ... 229s Setting up libcgi-pm-perl (4.71-1build1) ... 229s Setting up libx11-dev:arm64 (2:1.8.12-1build1) ... 229s Setting up libreadline-dev:arm64 (8.3-3) ... 229s Setting up libcairo2:arm64 (1.18.4-3) ... 229s Setting up libobject-pad-perl (0.823-2) ... 229s Setting up gcc-15 (15.2.0-12ubuntu1) ... 229s Setting up libgl1:arm64 (1.7.0-3) ... 229s Setting up libstdc++-15-dev:arm64 (15.2.0-12ubuntu1) ... 229s Setting up libqt6gui6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up libnet-smtp-ssl-perl (1.04-2) ... 229s Setting up gfortran-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 229s Setting up libmodule-runtime-perl (0.018-1) ... 229s Setting up libmailtools-perl (2.22-1) ... 229s Setting up g++-15-aarch64-linux-gnu (15.2.0-12ubuntu1) ... 229s Setting up libconfig-model-perl (2.155-1) ... 229s Setting up libxt6t64:arm64 (1:1.2.1-1.3) ... 229s Setting up comerr-dev:arm64 (2.1-1.47.2-3ubuntu2) ... 229s Setting up texinfo (7.2-5) ... 229s Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 229s Setting up libumfpack6:arm64 (1:7.12.1+dfsg-1) ... 229s Setting up libconst-fast-perl (0.014-2) ... 229s Setting up libqt6network6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up libdata-section-perl (0.200008-1) ... 229s Setting up libglx-dev:arm64 (1.7.0-3) ... 229s Setting up libpangoft2-1.0-0:arm64 (1.57.0-1) ... 229s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 229s Setting up libdata-dpath-perl (0.60-1) ... 229s Setting up g++-15 (15.2.0-12ubuntu1) ... 229s Setting up libfltk1.3t64:arm64 (1.3.11-3) ... 229s Setting up libfftw3-dev:arm64 (3.3.10-2fakesync1build2) ... 229s Setting up libcups2t64:arm64 (2.4.16-1ubuntu1) ... 229s Setting up libgl-dev:arm64 (1.7.0-3) ... 229s Setting up libstring-rewriteprefix-perl (0.009-1) ... 229s Setting up gfortran-15 (15.2.0-12ubuntu1) ... 229s Setting up libpangocairo-1.0-0:arm64 (1.57.0-1) ... 229s Setting up krb5-multidev:arm64 (1.22.1-2) ... 229s Setting up libhdf5-hl-cpp-310:arm64 (1.14.6+repack-2) ... 229s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 229s Setting up gcc-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 229s Setting up libhdf5-hl-fortran-310:arm64 (1.14.6+repack-2) ... 229s Setting up libportaudio2:arm64 (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 229s Setting up libxmu6:arm64 (2:1.1.3-4) ... 229s Setting up libtool (2.5.4-9) ... 229s Setting up libmodule-implementation-perl (0.09-2) ... 229s Setting up libpackage-stash-perl (0.40-1) ... 229s Setting up libimport-into-perl (1.002005-2) ... 229s Setting up libmoo-perl (2.005005-1) ... 229s Setting up libqt6opengl6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 229s Setting up liblist-someutils-perl (0.59-1) ... 229s Setting up libxaw7:arm64 (2:1.0.16-1build1) ... 229s Setting up libmime-tools-perl (5.515-1) ... 229s Setting up libsoftware-license-perl (0.104007-1) ... 229s Setting up libclass-load-perl (0.25-2) ... 229s Setting up gcc (4:15.2.0-4ubuntu1) ... 229s Setting up libgl2ps1.4:arm64 (1.4.2+dfsg1-4) ... 229s Setting up libqt6widgets6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up dh-autoreconf (21) ... 229s Setting up libfltk-gl1.3t64:arm64 (1.3.11-3) ... 229s Setting up libkrb5-dev:arm64 (1.22.1-2) ... 229s Setting up librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-3) ... 229s Setting up libssh2-1-dev:arm64 (1.11.1-1build1) ... 229s Setting up g++-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 229s Setting up gfortran-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 229s Setting up libmoox-aliases-perl (0.001006-2) ... 229s Setting up libparams-validate-perl:arm64 (1.31-2build4) ... 229s Setting up libqt6openglwidgets6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up libb-hooks-endofscope-perl (0.28-2) ... 229s Setting up libperl-critic-perl (1.156-1) ... 229s Setting up libqt6printsupport6:arm64 (6.9.2+dfsg-3ubuntu2) ... 229s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 229s Setting up x11-xkb-utils (7.7+9build1) ... 229s Setting up libqt6help6:arm64 (6.9.2-5) ... 229s Setting up libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-2) ... 229s Setting up debhelper (13.28ubuntu1) ... 229s Setting up gfortran (4:15.2.0-4ubuntu1) ... 229s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 229s 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 229s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 229s 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 229s Setting up libcurl4-openssl-dev:arm64 (8.18.0-1ubuntu1) ... 229s Setting up libhdf5-dev (1.14.6+repack-2) ... 229s update-alternatives: using /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 229s Setting up libnamespace-clean-perl (0.27-2) ... 229s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 229s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 229s Setting up g++ (4:15.2.0-4ubuntu1) ... 229s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 229s Setting up xserver-common (2:21.1.21-1ubuntu1) ... 229s Setting up licensecheck (3.3.9-1ubuntu2) ... 229s Setting up libapp-cmd-perl (0.338-1) ... 229s Setting up xvfb (2:21.1.21-1ubuntu1) ... 229s Setting up cme (1.043-2) ... 229s Setting up libheif-plugin-aomdec:arm64 (1.21.2-1) ... 229s Setting up libwww-perl (6.81-1build1) ... 229s Setting up libheif1:arm64 (1.21.2-1) ... 229s Setting up libparse-debcontrol-perl (2.005-6) ... 229s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 229s Setting up libwww-mechanize-perl (2.20-1ubuntu1) ... 229s Setting up libgd3:arm64 (2.3.3-13ubuntu1) ... 229s Setting up gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 229s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 229s Setting up liblwp-protocol-https-perl (6.14-1) ... 229s Setting up libheif-plugin-libde265:arm64 (1.21.2-1) ... 229s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 229s Setting up lintian (2.127.0ubuntu1) ... 229s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 229s Setting up libconfig-model-dpkg-perl (3.016) ... 229s Setting up dh-octave-autopkgtest (1.14.0) ... 229s Setting up octave (10.3.0-3) ... 229s Setting up octave-dev (10.3.0-3) ... 229s Setting up octave-io:arm64 (2.7.0-3) ... 229s Setting up octave-statistics-common (1.7.6-2) ... 229s Setting up octave-statistics (1.7.6-2) ... 229s Setting up dh-octave (1.14.0) ... 229s Processing triggers for libc-bin (2.42-2ubuntu5) ... 229s Processing triggers for man-db (2.13.1-1) ... 231s Processing triggers for udev (259-1ubuntu3) ... 231s Processing triggers for install-info (7.2-5) ... 233s autopkgtest [04:46:21]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 233s autopkgtest [04:46:21]: test command1: [----------------------- 233s Checking package... 234s Run the unit tests... 235s Checking m files ... 235s [inst/clusterdata.m] 235s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/clusterdata.m 235s ***** demo 235s randn ("seed", 1) # for reproducibility 235s r1 = randn (10, 2) * 0.25 + 1; 235s randn ("seed", 5) # for reproducibility 235s r2 = randn (20, 2) * 0.5 - 1; 235s X = [r1; r2]; 235s 235s wnl = warning ("off", "Octave:linkage_savemem", "local"); 235s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 235s scatter (X(:,1), X(:,2), 36, T, "filled"); 236s ***** error ... 236s clusterdata () 236s ***** error ... 236s clusterdata (1) 236s ***** error clusterdata ([1 1], "Bogus", 1) 236s ***** error clusterdata ([1 1], "Depth", 1) 236s 4 tests, 4 passed, 0 known failure, 0 skipped 236s [inst/Clustering/KDTreeSearcher.m] 236s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/KDTreeSearcher.m 236s ***** demo 236s ## Demo to verify implementation using fisheriris dataset 236s load fisheriris 236s numSamples = size (meas, 1); 236s queryIndices = [1, 23, 46, 63, 109]; 236s dataIndices = ~ismember (1:numSamples, queryIndices); 236s queryPoints = meas(queryIndices, :); 236s dataPoints = meas(dataIndices, :); 236s searchRadius = 0.3; 236s kdTree = KDTreeSearcher (dataPoints, 'Distance', 'minkowski') 236s nearestNeighbors = knnsearch (kdTree, queryPoints, "K", 2) 236s neighborsInRange = rangesearch (kdTree, queryPoints, searchRadius) 236s ***** demo 236s ## Create a KDTreeSearcher with Euclidean distance 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = KDTreeSearcher (X); 236s ## Find the nearest neighbor to [2, 3] 236s Y = [2, 3]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s disp ("Nearest neighbor index:"); 236s disp (idx); 236s disp ("Distance:"); 236s disp (D); 236s ## Find all points within radius 2 236s [idx, D] = rangesearch (obj, Y, 2); 236s disp ("Indices within radius:"); 236s disp (idx); 236s disp ("Distances:"); 236s disp (D); 236s ***** demo 236s ## Create a KDTreeSearcher with Minkowski distance (P=3) 236s X = [0, 0; 1, 0; 2, 0]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s ## Find the nearest neighbor to [1, 0] 236s Y = [1, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s disp ("Nearest neighbor index:"); 236s disp (idx); 236s disp ("Distance:"); 236s disp (D); 236s ***** demo 236s rng(42); 236s disp('Demonstrating KDTreeSearcher'); 236s 236s n = 100; 236s mu1 = [0.3, 0.3]; 236s mu2 = [0.7, 0.7]; 236s sigma = 0.1; 236s X1 = mu1 + sigma * randn (n / 2, 2); 236s X2 = mu2 + sigma * randn (n / 2, 2); 236s X = [X1; X2]; 236s 236s obj = KDTreeSearcher(X); 236s 236s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 236s 236s K = 5; 236s [idx, D] = knnsearch (obj, Y, "K", K); 236s 236s disp ('For the first query point:'); 236s disp (['Query point: ', num2str(Y(1,:))]); 236s disp ('Indices of nearest neighbors:'); 236s disp (idx(1,:)); 236s disp ('Distances:'); 236s disp (D(1,:)); 236s 236s figure; 236s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); # Training points 236s hold on; 236s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); # Query points 236s for i = 1:size (Y, 1) 236s query = Y(i,:); 236s neighbors = X(idx(i,:), :); 236s for j = 1:K 236s plot ([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 236s endfor 236s endfor 236s hold off; 236s title ('K Nearest Neighbors with KDTreeSearcher'); 236s xlabel ('X1'); 236s ylabel ('X2'); 236s 236s r = 0.15; 236s [idx, D] = rangesearch (obj, Y, r); 236s 236s disp ('For the first query point in rangesearch:'); 236s disp (['Query point: ', num2str(Y(1,:))]); 236s disp ('Indices of points within radius:'); 236s disp (idx{1}); 236s disp ('Distances:'); 236s disp (D{1}); 236s 236s figure; 236s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); 236s hold on; 236s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); 236s theta = linspace (0, 2 * pi, 100); 236s for i = 1:size (Y, 1) 236s center = Y(i,:); 236s x_circle = center(1) + r * cos (theta); 236s y_circle = center(2) + r * sin (theta); 236s plot (x_circle, y_circle, 'g-'); 236s ## Highlight points within radius 236s if (! isempty (idx{i})) 236s in_radius = X(idx{i}, :); 236s scatter (in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 236s endif 236s endfor 236s hold off 236s title ('Points within Radius with KDTreeSearcher'); 236s xlabel ('X1'); 236s ylabel ('X2'); 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X); 236s Y = X(1:5,:); 236s [idx, D] = knnsearch (obj, Y, "K", 3); 236s assert (idx, [[1, 18, 5]; [2, 35, 46]; [3, 48, 4]; [4, 48, 30]; [5, 38, 1]]) 236s assert (D, [[0, 0.1000, 0.1414]; [0, 0.1414, 0.1414]; [0, 0.1414, 0.2449]; 236s [0, 0.1414, 0.1732]; [0, 0.1414, 0.1414]], 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = X(10:15,:); 236s [idx, D] = knnsearch (obj, Y, "K", 2); 236s assert (idx, [[10, 35]; [11, 49]; [12, 30]; [13, 2]; [14, 39]; [15, 34]]) 236s assert (D, [[0, 0.1000]; [0, 0.1000]; [0, 0.2080]; [0, 0.1260]; [0, 0.2154]; 236s [0, 0.3503]], 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = X(20:25,:); 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, [20; 21; 22; 23; 24; 25]) 236s assert (D, [0; 0; 0; 0; 0; 0]) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = X(30:35,:); 236s [idx, D] = knnsearch (obj, Y, "K", 4); 236s assert (idx, [[30, 31, 4, 12]; [31, 30, 10, 35]; [32, 21, 37, 28]; 236s [33, 20, 34, 47]; [34, 16, 15, 33]; [35, 10, 2, 26]]) 236s assert (D, [[0, 0.1000, 0.1000, 0.2000]; [0, 0.1000, 0.1000, 0.1000]; 236s [0, 0.2000, 0.2000, 0.2000]; [0, 0.3000, 0.3000, 0.3000]; 236s [0, 0.2000, 0.3000, 0.3000]; [0, 0.1000, 0.1000, 0.1000]], 5e-15) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "BucketSize", 20); 236s Y = X(40:45,:); 236s [idx, D] = knnsearch (obj, Y, "K", 2); 236s assert (idx, [[40, 8]; [41, 18]; [42, 9]; [43, 39]; [44, 27]; [45, 47]]) 236s assert (D, [[0, 0.1000]; [0, 0.1414]; [0, 0.6245]; [0, 0.2000]; [0, 0.2236]; 236s [0, 0.3606]], 4.7e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X); 236s Y = X(50:55,:); 236s [idx, D] = knnsearch (obj, Y, "K", 3, "IncludeTies", true); 236s assert (idx, {[50; 8; 40]; [51; 53; 87]; [52; 57; 76]; [53; 51; 87]; [54; ... 236s 90; 81]; [55; 59; 76]}) 236s assert (D, {[0; 0.1414; 0.1732]; [0; 0.2646; 0.3317]; [0; 0.2646; 0.3162]; 236s [0; 0.2646; 0.2828]; [0; 0.2000; 0.3000]; [0; 0.2449; 0.3162]}, 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X); 236s Y = X(60:65,:); 236s [idx, D] = rangesearch (obj, Y, 0.4); 236s assert (idx, {[60; 90]; [61; 94]; [62; 97; 79; 96; 100; 89; 98; 72]; [63]; 236s [64; 92; 74; 79]; [65]}) 236s assert (D, {[0; 0.3873]; [0; 0.3606]; 236s [0; 0.3000; 0.3317; 0.3606; 0.3606; 0.3742; 0.3873; 0.4000]; [0]; 236s [0; 0.1414; 0.2236; 0.2449]; [0]}, 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = X(70:72,:); 236s [idx, D] = rangesearch (obj, Y, 1.0); 236s assert (idx, {[70; 81; 90; 82; 83; 93; 54; 68; 95; 80; 91; 100; 60; 65; ... 236s 89; 63]; [71; 139; 128; 150; 127; 57; 86; 64; 79; 92; 124]; 236s [72; 100; 98; 83; 93; 97; 75; 68; 62; 89; 95; 74; 56; 90; ... 236s 79; 92; 96; 64; 63; 65]}) 236s assert (D, {[0; 0.3000; 0.4000; 0.5000; 0.5000; 0.5000; 0.6000; 0.7000; ... 236s 0.7000; 0.7000; 0.8000; 0.8000; 0.9000; 0.9000; 0.9000; 0.9000]; 236s [0; 0.3000; 0.5000; 0.5000; 0.7000; 0.8000; 0.8000; 1.0000; ... 236s 1.0000; 1.0000; 1]; [0; 0.5000; 0.5000; 0.6000; 0.6000; ... 236s 0.7000; 0.7000; 0.8000; 0.8000; 0.8000; 0.8000; 0.8000; ... 236s 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 1.0000; 1]}, 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = X(80:85,:); 236s [idx, D] = rangesearch (obj, Y, 0.8); 236s assert (idx, {[80; 82; 81; 65; 70; 83; 93; 90; 54; 63; 68; 72; 100; 60; ... 236s 89; 99; 95; 94; 97; 96]; [81; 82; 70; 54; 90; 93; 80; 83; ... 236s 60; 68; 95; 100; 65; 63; 97; 61; 91; 94; 89; 96; 72; 58; ... 236s 62; 56]; [82; 81; 70; 80; 54; 90; 93; 83; 68; 60; 65; 63; ... 236s 100; 95; 94; 61; 58; 97; 89; 72; 96; 91; 99]; [83; 93; ... 236s 100; 68; 70; 72; 95; 90; 97; 65; 89; 96; 81; 82; 80; 62; ... 236s 54; 98; 63; 91; 56; 60; 79; 67; 75; 88; 85; 92; 69]; [84; ... 236s 134; 102; 143; 150; 124; 128; 73; 127; 139; 147; 64; 112; ... 236s 114; 120; 74; 135; 122; 71; 92; 104; 138; 148; 117; 79; ... 236s 55; 56; 57; 67; 111; 129; 69; 78; 59; 52; 133; 85; 88; ... 236s 87]; [85; 67; 56; 97; 95; 89; 96; 91; 100; 62; 71; 122; ... 236s 79; 60; 107; 90; 139; 93; 68; 86; 83; 92; 64; 150; 102; ... 236s 143; 74; 114; 70; 128; 84; 54; 72]}) 236s assert (D, {[0; 0.2884; 0.3530; 0.3826; 0.4062; 0.4198; 0.5117; 0.5440; 0.5718; 236s 0.6000; 0.6018; 0.6073; 0.6308; 0.6333; 0.6753; 0.7000; 0.7192; 236s 0.7230; 0.7350; 0.7459]; 236s [0; 0.1260; 0.1442; 0.2571; 0.2571; 0.3530; 0.3530; 0.3826; 0.4344; 236s 0.4344; 0.4642; 0.4747; 0.5217; 0.5217; 0.5896; 0.6009; 0.6082; 236s 0.6316; 0.6316; 0.6611; 0.6664; 0.6993; 0.7417; 0.7507]; 236s [0; 0.1260; 0.2224; 0.2884; 0.3803; 0.3803; 0.4121; 0.4121; 0.4905; 236s 0.5013; 0.5360; 0.5429; 0.5463; 0.5646; 0.5749; 0.5819; 0.6542; 236s 0.6581; 0.6753; 0.6938; 0.7094; 0.7107; 0.7423]; 236s [0; 0.1260; 0.2224; 0.2520; 0.2571; 0.3107; 0.3302; 0.3332; 0.3332; 236s 0.3530; 0.3530; 0.3803; 0.3826; 0.4121; 0.4198; 0.4344; 0.4531; 236s 0.5155; 0.5217; 0.5348; 0.6028; 0.6073; 0.6374; 0.6527; 0.6611; 236s 0.6804; 0.6938; 0.7399; 0.7560]; 236s [0; 0.3072; 0.3271; 0.3271; 0.3302; 0.3503; 0.3530; 0.3530; 0.3530; 236s 0.3958; 0.3979; 0.4327; 0.4626; 0.4642; 0.5027; 0.5066; 0.5130; 236s 0.5155; 0.5440; 0.5440; 0.5518; 0.5848; 0.6009; 0.6073; 0.6082; 236s 0.6316; 0.6471; 0.6746; 0.6753; 0.6797; 0.6804; 0.7047; 0.7192; 236s 0.7218; 0.7405; 0.7405; 0.7719; 0.7725; 0.7786]; 236s [0; 0.2000; 0.3503; 0.3979; 0.4121; 0.4309; 0.4327; 0.4531; 0.4747; 236s 0.5337; 0.5718; 0.5896; 0.6009; 0.6316; 0.6366; 0.6374; 0.6463; 236s 0.6542; 0.6542; 0.6550; 0.6938; 0.7014; 0.7067; 0.7166; 0.7186; 236s 0.7186; 0.7281; 0.7380; 0.7447; 0.7571; 0.7719; 0.7813; 0.7851]}, 5e-5) 236s ***** test 236s load fisheriris 236s X = meas; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = X(90,:); 236s [idx, D] = rangesearch (obj, Y, 0.7); 236s assert (idx, {[90; 70; 54; 81; 95; 60; 83; 93; 100; 68; 82; 65; 97; 91; ... 236s 56; 61; 62; 63; 67; 79; 80; 85; 89; 96; 72; 92; 107]}) 236s assert (D, {[0; 0.2000; 0.2000; 0.2000; 0.2000; 0.3000; 0.3000; 0.3000; ... 236s 0.3000; 0.3000; 0.3000; 0.4000; 0.4000; 0.4000; 0.5000; ... 236s 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; ... 236s 0.5000; 0.5000; 0.6000; 0.6000; 0.6000]}, 5e-16) 236s ***** test 236s ## Constructor with single-point dataset 236s X = [0, 0]; 236s obj = KDTreeSearcher (X); 236s assert (obj.X, X); 236s assert (obj.Distance, "euclidean"); 236s assert (isempty (obj.DistParameter)); 236s assert (obj.BucketSize, 50); 236s ***** test 236s ## Constructor with duplicate points 236s X = [0, 0; 0, 0; 1, 0]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s assert (obj.X, X); 236s assert (obj.Distance, "cityblock"); 236s ***** test 236s ## Constructor with 3D data 236s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s assert (obj.X, X); 236s assert (obj.DistParameter, 3); 236s ***** test 236s ## knnsearch with grid, K = 1 236s X = [0, 0; 0, 1; 1, 0; 1, 1]; 236s obj = KDTreeSearcher (X, "Distance", "euclidean"); 236s Y = [0.5, 0.5]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s D_true = pdist2 (X, Y, "euclidean"); 236s assert (D, min (D_true), 1e-10); 236s assert (any (idx == find (D_true == min (D_true)))); 236s ***** test 236s ## knnsearch with IncludeTies, all points equidistant 236s X = [0, 0; 0, 1; 1, 0; 1, 1]; 236s obj = KDTreeSearcher (X); 236s Y = [0.5, 0.5]; 236s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 236s D_true = pdist2 (X, Y, "euclidean"); 236s expected_idx = find (D_true == min (D_true)); 236s assert (sort (idx{1}(:)), sort (expected_idx)); 236s assert (D{1}(:)', repmat (min (D_true), 1, 4), 1e-10); 236s ***** test 236s ## rangesearch with line dataset 236s X = [0, 0; 1, 0; 2, 0; 3, 0]; 236s obj = KDTreeSearcher (X); 236s Y = [1.5, 0]; 236s r = 1; 236s [idx, D] = rangesearch (obj, Y, r); 236s D_true = pdist2 (X, Y, "euclidean"); 236s expected_idx = find (D_true <= r); 236s assert (sort (idx{1}(:)), sort (expected_idx)); 236s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 236s ***** test 236s ## knnsearch with duplicates 236s X = [0, 0; 0, 0; 1, 0]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = [0, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 236s assert (sort (idx{1}(:))', [1, 2]); 236s assert (D{1}', [0, 0], 1e-10); 236s ***** test 236s ## rangesearch with 3D data 236s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = [0, 0, 0]; 236s r = 1; 236s [idx, D] = rangesearch (obj, Y, r); 236s assert (sort (idx{1}(:))', [1, 2, 3]); 236s assert (D{1}', [0, 1, 1], 1e-10); 236s ***** test 236s ## knnsearch with P = 2 (Euclidean equivalent) 236s X = [0, 0; 1, 1]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 2); 236s Y = [0, 1]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 1); 236s assert (D, 1, 1e-10); 236s ***** test 236s ## rangesearch with P = 3 236s X = [0, 0; 1, 0; 0, 1]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = [0.5, 0.5]; 236s r = 0.8; 236s [idx, D] = rangesearch (obj, Y, r); 236s D_true = pdist2 (X, Y, "minkowski", 3); 236s expected_idx = find (D_true <= r); 236s assert (sort (idx{1}(:)), sort (expected_idx)); 236s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 236s ***** test 236s ## knnsearch with P = 4, random data 236s X = rand (5, 2); 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 4); 236s Y = rand (1, 2); 236s [idx, D] = knnsearch (obj, Y, "K", 3); 236s D_true = pdist2 (X, Y, "minkowski", 4); 236s [sorted_D, sort_idx] = sort (D_true); 236s assert (idx', sort_idx(1:3)); 236s assert (D', sorted_D(1:3), 1e-10); 236s ***** test 236s ## knnsearch with all same points 236s X = [1, 1; 1, 1; 1, 1]; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = [1, 1]; 236s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 236s assert (sort (idx{1}(:))', [1, 2, 3]); 236s assert (D{1}', [0, 0, 0], 1e-10); 236s ***** test 236s ## rangesearch with grid 236s X = [0, 0; 0, 1; 1, 0; 1, 1]; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = [0.5, 0.5]; 236s r = 0.5; 236s [idx, D] = rangesearch (obj, Y, r); 236s D_true = pdist2 (X, Y, "chebychev"); 236s expected_idx = find (D_true <= r); 236s assert (sort (idx{1}(:)), sort (expected_idx)); 236s assert (D{1}, D_true(expected_idx), 1e-10); 236s ***** test 236s ## Changing Distance and verifying search 236s X = [0,0; 1,0]; 236s obj = KDTreeSearcher(X, "Distance", "euclidean"); 236s Y = [0,1]; 236s [idx, D] = knnsearch(obj, Y, "K", 1); 236s assert(D, 1, 1e-10); 236s obj.Distance = "chebychev"; 236s [idx, D] = knnsearch(obj, Y, "K", 1); 236s assert(D, 1, 1e-10); 236s ***** test 236s ## Changing DistParameter for minkowski 236s X = [0,0; 1,0]; 236s obj = KDTreeSearcher(X, "Distance", "minkowski", "P", 1); 236s Y = [0,1]; 236s [idx, D] = knnsearch(obj, Y, "K", 1); 236s assert(D, 1, 1e-10); 236s obj.DistParameter = 3; 236s [idx, D] = knnsearch(obj, Y, "K", 1); 236s assert(D, 1, 1e-10); 236s ***** test 236s ## Different BucketSize values 236s X = rand(20,2); 236s obj1 = KDTreeSearcher(X, "BucketSize", 5); 236s obj2 = KDTreeSearcher(X, "BucketSize", 15); 236s Y = rand(1,2); 236s [idx1, D1] = knnsearch(obj1, Y, "K", 3); 236s [idx2, D2] = knnsearch(obj2, Y, "K", 3); 236s assert(idx1, idx2); 236s assert(D1, D2, 1e-10); 236s ***** test 236s ## Basic constructor with default Euclidean 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = KDTreeSearcher (X); 236s assert (obj.X, X); 236s assert (obj.Distance, "euclidean"); 236s assert (isempty (obj.DistParameter)); 236s assert (obj.BucketSize, 50); 236s ***** test 236s ## Minkowski distance with custom P 236s X = [0, 0; 1, 1; 2, 2]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s assert (obj.Distance, "minkowski"); 236s assert (obj.DistParameter, 3); 236s ***** test 236s ## Cityblock distance 236s X = [0, 0; 1, 0; 0, 1]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s assert (obj.Distance, "cityblock"); 236s assert (isempty (obj.DistParameter)); 236s ***** test 236s ## Chebychev distance 236s X = [1, 1; 2, 3; 4, 2]; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s assert (obj.Distance, "chebychev"); 236s assert (isempty (obj.DistParameter)); 236s ***** test 236s ## knnsearch with Euclidean distance 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = KDTreeSearcher (X); 236s Y = [2, 3]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 1); 236s assert (D, sqrt(2), 1e-10); 236s ***** test 236s ## knnsearch with Cityblock distance 236s X = [0, 0; 1, 1; 2, 2]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = [1, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (ismember (idx, [1, 2])); 236s assert (D, 1, 1e-10); 236s ***** test 236s ## knnsearch with Chebychev distance 236s X = [1, 1; 2, 3; 4, 2]; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = [2, 2]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (ismember (idx, [1, 2])); 236s assert (D, 1, 1e-10); 236s ***** test 236s ## knnsearch with Minkowski P=3 236s X = [0, 0; 1, 0; 2, 0]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = [1, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 2); 236s assert (D, 0, 1e-10); 236s ***** test 236s ## knnsearch with IncludeTies 236s X = [0, 0; 1, 0; 0, 1]; 236s obj = KDTreeSearcher (X); 236s Y = [0.5, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 236s assert (iscell (idx)); 236s assert (sort (idx{1}(:))', [1, 2]); 236s assert (sort (D{1}(:)), [0.5; 0.5], 1e-10); 236s ***** test 236s ## rangesearch with Euclidean 236s X = [1, 1; 2, 2; 3, 3]; 236s obj = KDTreeSearcher (X); 236s Y = [0, 0]; 236s [idx, D] = rangesearch (obj, Y, 2); 236s assert (idx{1}, [1]); 236s assert (D{1}, [sqrt(2)], 1e-10); 236s ***** test 236s ## rangesearch with Cityblock 236s X = [0, 0; 1, 1; 2, 2]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = [0, 0]; 236s [idx, D] = rangesearch (obj, Y, 1); 236s assert (idx{1}, [1]); 236s assert (D{1}, [0], 1e-10); 236s ***** test 236s ## rangesearch with Chebychev 236s X = [1, 1; 2, 3; 4, 2]; 236s obj = KDTreeSearcher (X, "Distance", "chebychev"); 236s Y = [2, 2]; 236s [idx, D] = rangesearch (obj, Y, 1); 236s assert (sort (idx{1}(:))', [1, 2]); 236s assert (sort (D{1}(:))', [1, 1], 1e-10); 236s ***** test 236s ## rangesearch with Minkowski P=3 236s X = [0, 0; 1, 0; 2, 0]; 236s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = [1, 0]; 236s [idx, D] = rangesearch (obj, Y, 1); 236s assert (sort (idx{1}(:))', [1, 2, 3]); 236s assert (sort (D{1}(:))', [0, 1, 1], 1e-10); 236s ***** test 236s ## Diverse dataset with Euclidean 236s X = [0, 10; 5, 5; 10, 0]; 236s obj = KDTreeSearcher (X); 236s Y = [5, 5]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 2); 236s assert (D, 0, 1e-10); 236s ***** test 236s ## High-dimensional data with Cityblock 236s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 236s obj = KDTreeSearcher (X, "Distance", "cityblock"); 236s Y = [4, 5, 6]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 2); 236s assert (D, 0, 1e-10); 236s ***** error ... 236s KDTreeSearcher () 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "Distance") 236s ***** error ... 236s KDTreeSearcher ("abc") 236s ***** error ... 236s KDTreeSearcher ([1; Inf; 3]) 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "foo", "bar") 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "Distance", "invalid") 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "Distance", 1) 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 236s ***** error ... 236s KDTreeSearcher (ones(3,2), "BucketSize", 0) 236s ***** error ... 236s KDTreeSearcher(ones(3,2), "BucketSize", -1) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2))) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies") 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), "abc", "K", 1) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,3), "K", 1) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 0) 236s ***** error ... 236s obj = KDTreeSearcher(ones(3,2)); knnsearch(obj, ones(1,2), "K", Inf) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "foo", "bar") 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies", 1) 236s ***** error ... 236s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "SortIndices", 1) 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2))) 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), "abc", 1) 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,3), 1) 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), -1) 236s ***** error ... 236s obj = KDTreeSearcher(ones(3,2)); rangesearch(obj, ones(1,2), Inf) 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 236s ***** error ... 236s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj(1) 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj{1} 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.invalid 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj(1) = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj{1} = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.X.Y = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.X = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.KDTree = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.Distance = "invalid" 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.Distance = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.DistParameter = 1 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.BucketSize = 0 236s ***** error ... 236s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = -1 236s ***** error ... 236s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = 1.5 236s ***** error ... 236s obj = KDTreeSearcher (ones(3,2)); obj.invalid = 1 236s 84 tests, 84 passed, 0 known failure, 0 skipped 236s [inst/Clustering/ClusterCriterion.m] 236s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/ClusterCriterion.m 236s ***** error ... 236s ClusterCriterion ("1", "kmeans", [1:6]) 236s ***** error ... 236s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 236s ***** error ... 236s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 236s ***** error ... 236s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 236s 4 tests, 4 passed, 0 known failure, 0 skipped 236s [inst/Clustering/CalinskiHarabaszEvaluation.m] 236s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/CalinskiHarabaszEvaluation.m 236s ***** test 236s load fisheriris 236s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 236s assert (class (eva), "CalinskiHarabaszEvaluation"); 236s 1 test, 1 passed, 0 known failure, 0 skipped 236s [inst/Clustering/ExhaustiveSearcher.m] 236s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/ExhaustiveSearcher.m 236s ***** demo 236s ## Demo to verify implementation using fisheriris dataset 236s load fisheriris 236s rng('default'); 236s numSamples = size (meas, 1); 236s queryIndices = [20, 95, 123, 136, 138]; 236s dataPoints = meas(~ismember (1:numSamples, queryIndices), :); 236s queryPoints = meas(queryIndices, :); 236s searchModel = ExhaustiveSearcher (dataPoints, 'Distance', 'mahalanobis') 236s mahalanobisParam = searchModel.DistParameter 236s searchRadius = 3; 236s nearestNeighbors = knnsearch (searchModel, queryPoints, "K", 2) 236s neighborsInRange = rangesearch (searchModel, queryPoints, searchRadius) 236s ***** demo 236s ## Create an ExhaustiveSearcher with Euclidean distance 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = ExhaustiveSearcher (X); 236s ## Find the nearest neighbor to [2, 3] 236s Y = [2, 3]; 236s [idx, D] = knnsearch (obj, Y); 236s disp ("Nearest neighbor index:"); disp (idx); 236s disp ("Distance:"); disp (D); 236s ## Find all points within radius 2 236s [idx, D] = rangesearch (obj, Y, 2); 236s disp ("Indices within radius:"); disp (idx); 236s disp ("Distances:"); disp (D); 236s ***** demo 236s ## Create an ExhaustiveSearcher with Minkowski distance (P=1) 236s X = [0, 0; 1, 0; 0, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 236s ## Find the 2 nearest neighbors to [0.5, 0.5] 236s Y = [0.5, 0.5]; 236s [idx, D] = knnsearch (obj, Y, "K", 2); 236s disp ("Nearest neighbor indices:"); disp (idx); 236s disp ("Distances:"); disp (D); 236s ***** demo 236s rng(42); 236s disp('Demonstrating ExhaustiveSearcher'); 236s 236s n = 100; 236s mu1 = [0.3, 0.3]; 236s mu2 = [0.7, 0.7]; 236s sigma = 0.1; 236s X1 = mu1 + sigma * randn(n/2, 2); 236s X2 = mu2 + sigma * randn(n/2, 2); 236s X = [X1; X2]; 236s 236s obj = ExhaustiveSearcher(X); 236s 236s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 236s 236s K = 5; 236s [idx, D] = knnsearch(obj, Y, "K", K); 236s 236s disp('For the first query point:'); 236s disp(['Query point: ', num2str(Y(1,:))]); 236s disp('Indices of nearest neighbors:'); 236s disp(idx(1,:)); 236s disp('Distances:'); 236s disp(D(1,:)); 236s 236s figure; 236s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); % Training points 236s hold on; 236s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); % Query points 236s for i = 1:size(Y,1) 236s query = Y(i,:); 236s neighbors = X(idx(i,:), :); 236s for j = 1:K 236s plot([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 236s end 236s end 236s hold off; 236s title('K Nearest Neighbors with ExhaustiveSearcher'); 236s xlabel('X1'); 236s ylabel('X2'); 236s 236s r = 0.15; 236s [idx, D] = rangesearch(obj, Y, r); 236s 236s disp('For the first query point in rangesearch:'); 236s disp(['Query point: ', num2str(Y(1,:))]); 236s disp('Indices of points within radius:'); 236s disp(idx{1}); 236s disp('Distances:'); 236s disp(D{1}); 236s 236s figure; 236s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); 236s hold on; 236s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); 236s theta = linspace(0, 2*pi, 100); 236s for i = 1:size(Y,1) 236s center = Y(i,:); 236s x_circle = center(1) + r * cos(theta); 236s y_circle = center(2) + r * sin(theta); 236s plot(x_circle, y_circle, 'g-'); 236s % Highlight points within radius 236s if ~isempty(idx{i}) 236s in_radius = X(idx{i}, :); 236s scatter(in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 236s end 236s end 236s hold off; 236s title('Points within Radius with ExhaustiveSearcher'); 236s xlabel('X1'); 236s ylabel('X2'); 236s ***** test 236s ## Basic constructor with default Euclidean 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = ExhaustiveSearcher (X); 236s assert (obj.X, X) 236s assert (obj.Distance, "euclidean") 236s assert (isempty (obj.DistParameter)) 236s ***** test 236s ## Minkowski distance with custom P 236s X = [1, 2; 3, 4]; 236s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 236s assert (obj.Distance, "minkowski") 236s assert (obj.DistParameter, 3) 236s ***** test 236s ## Seuclidean distance with custom Scale 236s X = [1, 2; 3, 4; 5, 6]; 236s S = [1, 2]; 236s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 236s assert (obj.Distance, "seuclidean") 236s assert (obj.DistParameter, S) 236s ***** test 236s ## Mahalanobis distance with custom Cov 236s X = [1, 2; 3, 4; 5, 6]; 236s C = [1, 0; 0, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 236s assert (obj.Distance, "mahalanobis") 236s assert (obj.DistParameter, C) 236s ***** test 236s ## knnsearch with Euclidean distance 236s X = [1, 2; 3, 4; 5, 6]; 236s obj = ExhaustiveSearcher (X); 236s Y = [2, 3]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 1) 236s assert (D, sqrt(2), 1e-10) 236s ***** test 236s ## knnsearch with Cityblock distance 236s X = [0, 0; 1, 1; 2, 2]; 236s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 236s Y = [1, 0]; 236s [idx, D] = knnsearch (obj, Y, "K", 1); 236s assert (idx, 1) 236s assert (D, 1, 1e-10) 236s ***** test 236s ## knnsearch with Chebychev distance 236s X = [1, 1; 2, 3; 4, 2]; 236s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 236s Y = [2, 2]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D, 1, 1e-10) 236s ***** test 236s ## knnsearch with Cosine distance 236s X = [1, 0; 0, 1; 1, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 236s Y = [1, 0.5]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 3) 236s assert (D < 0.1, true) 236s ***** test 236s ## knnsearch with Minkowski P=1 (Manhattan) 236s X = [0, 0; 1, 0; 0, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 236s Y = [0.5, 0.5]; 236s [idx, D] = knnsearch (obj, Y, "K", 2, "IncludeTies", true); 236s assert (iscell (idx)) 236s assert (idx{1}, [1, 2, 3]) 236s assert (D{1}, [1, 1, 1], 1e-10) 236s ***** test 236s ## rangesearch with Seuclidean 236s X = [1, 1; 2, 2; 3, 3]; 236s S = [1, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 236s Y = [0, 0]; 236s [idx, D] = rangesearch (obj, Y, 2); 236s assert (idx{1}, [1]) 236s assert (D{1}, [sqrt(2)], 1e-10) 236s ***** test 236s ## rangesearch with Mahalanobis 236s X = [1, 1; 2, 2; 3, 3]; 236s C = [1, 0; 0, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 236s Y = [0, 0]; 236s [idx, D] = rangesearch (obj, Y, 3, "SortIndices", false); 236s assert (idx{1}, [1, 2]) 236s assert (D{1}, [sqrt(2), sqrt(8)], 1e-10) 236s ***** test 236s ## rangesearch with Hamming distance 236s X = [0, 1; 1, 0; 1, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "hamming"); 236s Y = [0, 0]; 236s [idx, D] = rangesearch (obj, Y, 0.5); 236s assert (idx{1}, [1, 2]) 236s assert (D{1}, [0.5, 0.5], 1e-10) 236s ***** test 236s ## Custom distance function 236s X = [1, 2; 3, 4]; 236s custom_dist = @(x, y) sum(abs(x - y)); 236s obj = ExhaustiveSearcher (X, "Distance", custom_dist); 236s Y = [2, 3]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D, 2, 1e-10) 236s ***** test 236s ## Euclidean with high-dimensional data 236s X = [1, 2, 3; 4, 5, 6; 7, 8, 9; 10, 11, 12]; 236s obj = ExhaustiveSearcher (X); 236s Y = [5, 6, 7]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 2) 236s assert (D, sqrt(3), 1e-10) 236s ***** test 236s ## Minkowski P=3 with scaled data 236s X = [0, 1; 2, 3; 4, 5] * 10; 236s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 236s Y = [20, 30]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 2) 236s assert (D, 0, 1e-10) 236s ***** test 236s ## Seuclidean with custom scales on diverse data 236s X = [1, 10; 2, 20; 3, 30]; 236s S = [1, 5]; 236s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 236s Y = [1.5, 15]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D, sqrt((0.5/1)^2 + (5/5)^2), 1e-10) 236s ***** test 236s ## Mahalanobis with correlated data 236s X = [1, 1; 2, 1.5; 3, 2]; 236s C = [1, 0.5; 0.5, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 236s Y = [2, 1.5]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 2) 236s assert (D, 0, 1e-10) 236s ***** test 236s ## Cityblock with sparse data 236s X = [0, 0, 1; 1, 0, 0; 0, 1, 0]; 236s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 236s Y = [0, 0, 0]; 236s [idx, D] = rangesearch (obj, Y, 1); 236s assert (idx{1}, [1, 2, 3]) 236s assert (D{1}, [1, 1, 1], 1e-10) 236s ***** test 236s ## Chebychev with extreme values 236s X = [0, 100; 50, 50; 100, 0]; 236s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 236s Y = [60, 60]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 2) 236s assert (D, 10, 1e-10) 236s ***** test 236s ## Cosine with normalized data 236s X = [1, 0; 0, 1; 1/sqrt(2), 1/sqrt(2)]; 236s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 236s Y = [1, 1]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 3) 236s assert (D < 0.1, true) 236s ***** test 236s ## Correlation with time-series-like data 236s X = [1, 2, 3; 2, 4, 6; 1, 1, 1]; 236s obj = ExhaustiveSearcher (X, "Distance", "correlation"); 236s Y = [1.5, 3, 4.5]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D < 0.1, true) 236s ***** test 236s ## Spearman with ranked data 236s X = [1, 2, 3; 3, 2, 1; 2, 1, 3]; 236s obj = ExhaustiveSearcher (X, "Distance", "spearman"); 236s Y = [1, 2, 3]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D, 0, 1e-10) 236s ***** test 236s ## Jaccard with binary sparse data 236s X = [1, 0, 0; 0, 1, 0; 1, 1, 0]; 236s obj = ExhaustiveSearcher (X, "Distance", "jaccard"); 236s Y = [1, 0, 0]; 236s [idx, D] = knnsearch (obj, Y); 236s assert (idx, 1) 236s assert (D, 0, 1e-10) 236s ***** test 236s obj = ExhaustiveSearcher (ones(3,2)); 236s assert (obj.X, ones(3,2)) 236s assert (obj.Distance, "euclidean") 236s assert (isempty (obj.DistParameter)) 236s ***** test 236s obj = ExhaustiveSearcher (ones(3,2)); 236s obj.Distance = "minkowski"; 236s assert (obj.Distance, "minkowski") 236s ***** test 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); 236s obj.DistParameter = 3; 236s assert (obj.DistParameter, 3) 236s ***** test 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); 236s obj.DistParameter = [1, 2]; 236s assert (obj.DistParameter, [1, 2]) 236s ***** test 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); 236s obj.DistParameter = eye(2); 236s assert (obj.DistParameter, eye(2)) 236s ***** error ... 236s ExhaustiveSearcher () 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance") 236s ***** error ... 236s ExhaustiveSearcher ("abc") 236s ***** error ... 236s ExhaustiveSearcher ([1; Inf; 3]) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "foo", "bar") 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", "invalid") 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", @(x) x) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", 1) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 236s ***** error ... 236s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2))) 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies") 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), "abc") 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,3)) 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "K", 0) 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "foo", "bar") 236s ***** error ... 236s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies", 1) 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2))) 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), "abc", 1) 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,3), 1) 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), -1) 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 236s ***** error ... 236s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj(1) 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj{1} 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj(1) = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj{1} = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.X.Y = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.X = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = "invalid" 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x) x 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x, y) [1; 1] 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2), "Distance", "euclidean"); obj.DistParameter = 1 236s ***** error ... 236s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid = 1 236s 73 tests, 73 passed, 0 known failure, 0 skipped 236s [inst/Clustering/cvpartition.m] 236s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/cvpartition.m 236s ***** test 236s custom = [1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 1, 3]'; 236s cv = cvpartition ('CustomPartition', custom); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 15); 236s assert (cv.NumTestSets, 3); 236s assert (cv.TrainSize, [10, 9, 11]); 236s assert (cv.TestSize, [5, 6, 4]); 236s assert (cv.IsCustom, true); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s idx = training (cv, 1); 236s assert (idx, custom != 1); 236s idx = test (cv, 1); 236s assert (idx, custom == 1); 236s idx = training (cv, 2); 236s assert (idx, custom != 2); 236s idx = test (cv, 2); 236s assert (idx, custom == 2); 236s idx = training (cv, 3); 236s assert (idx, custom != 3); 236s idx = test (cv, 3); 236s assert (idx, custom == 3); 236s idx1 = training (cv, 'all'); 236s idx2 = test (cv, 'all'); 236s assert (idx1, ! idx2); 236s ***** test 236s custom = logical ([1, 1, 1, 0, 0, 0, 1, 0, 1, 1])'; 236s cv = cvpartition ('CustomPartition', custom); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 4); 236s assert (cv.TestSize, 6); 236s assert (cv.IsCustom, true); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s idx = training (cv, 1); 236s assert (idx, custom != 1); 236s assert (idx, training (cv, 'all')); 236s idx = test (cv, 1); 236s assert (idx, custom == 1); 236s assert (idx, test (cv, 'all')); 236s ***** test 236s custom = logical ([1, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 1]); 236s cv = cvpartition ('CustomPartition', custom); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 4); 236s assert (cv.NumTestSets, 3); 236s assert (cv.TrainSize, [2, 3, 3]); 236s assert (cv.TestSize, [2, 1, 1]); 236s assert (cv.IsCustom, true); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s idx = training (cv, 1); 236s assert (idx, custom(:,1) == false); 236s idx = test (cv, 1); 236s assert (idx, custom(:,1) == true); 236s idx = training (cv, 2); 236s assert (idx, custom(:,2) == false); 236s idx = test (cv, 2); 236s assert (idx, custom(:,2) == true); 236s assert (! custom, training (cv, 'all')); 236s assert (custom, test (cv, 'all')); 236s ***** test 236s cv = cvpartition ('CustomPartition', [1:8]); 236s assert (cv.Type, 'leaveout'); 236s assert (cv.NumObservations, 8); 236s assert (cv.NumTestSets, 8); 236s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 236s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 236s assert (cv.IsCustom, true); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 7); 236s assert (sum (training (cv, 'all')), cv.TrainSize); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 1); 236s assert (sum (test (cv, 'all')), cv.TestSize); 236s assert (! training (cv, 'all'), test (cv, 'all')); 236s ***** test 236s cv = cvpartition ('CustomPartition', logical (eye (8))); 236s assert (cv.Type, 'leaveout'); 236s assert (cv.NumObservations, 8); 236s assert (cv.NumTestSets, 8); 236s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 236s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 236s assert (cv.IsCustom, true); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 7); 236s assert (sum (training (cv, 'all')), cv.TrainSize); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 1); 236s assert (sum (test (cv, 'all')), cv.TestSize); 236s assert (! training (cv, 'all'), test (cv, 'all')); 236s ***** test 236s cv = cvpartition (10, 'resubstitution'); 236s assert (cv.Type, 'resubstitution'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 10); 236s assert (cv.TestSize, 10); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 10); 236s assert (training (cv, 'all'), logical (ones (10, 1))); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 10); 236s assert (test (cv, 'all'), logical (ones (10, 1))); 236s assert (test (cv), training (cv)); 236s ***** test 236s cv = cvpartition (10, 'leaveout'); 236s assert (cv.Type, 'leaveout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 10); 236s assert (cv.TrainSize, ones (1, 10) * 9); 236s assert (cv.TestSize, ones (1, 10)); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 9); 236s assert (training (cv, 'all'), ! logical (eye (10))); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 1); 236s assert (test (cv, 'all'), logical (eye (10))); 236s assert (test (cv), ! training (cv)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s ***** test 236s rand ('seed', 5); # for reproducibility 236s cv = cvpartition (10, 'holdout', 0.3); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 7); 236s assert (cv.TestSize, 3); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 7); 236s assert (training (cv, 'all'), logical ([1, 0, 1, 1, 0, 1, 1, 1, 0, 1])'); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 3); 236s assert (test (cv, 'all'), logical ([0, 1, 0, 0, 1, 0, 0, 0, 1, 0])'); 236s assert (test (cv), ! training (cv)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s ***** test 236s cv = cvpartition (10, 'holdout', 4); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 6); 236s assert (cv.TestSize, 4); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (class (training (cv, 1)), 'logical'); 236s assert (sum (training (cv, 1)), 6); 236s assert (class (test (cv, 1)), 'logical'); 236s assert (sum (test (cv, 1)), 4); 236s assert (test (cv), ! training (cv)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s ***** test 236s cv = cvpartition (5, 'kfold'); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 5); 236s assert (cv.NumTestSets, 5); 236s ***** test 236s cv = cvpartition (20, 'kfold'); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 20); 236s assert (cv.NumTestSets, 10); 236s ***** test 236s cv = cvpartition (10, 'kfold', 5); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 5); 236s assert (cv.TrainSize, [8, 8, 8, 8, 8]); 236s assert (cv.TestSize, [2, 2, 2, 2, 2]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [10, 5]); 236s ***** test 236s grpvar = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 5, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 5); 236s assert (cv.TrainSize, [10, 10, 10, 8, 10]); 236s assert (cv.TestSize, [2, 2, 2, 4, 2]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 5]); 236s assert (sum (test (cv, 'all')), [2, 2, 2, 4, 2]); 236s assert (sum (training (cv, 'all')), [10, 10, 10, 8, 10]); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 3, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 3); 236s assert (cv.TrainSize, [9, 10, 5]); 236s assert (cv.TestSize, [3, 2, 7]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 3]); 236s assert (sum (test (cv, 'all')), [3, 2, 7]); 236s assert (sum (training (cv, 'all')), [9, 10, 5]); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [6, 6]); 236s assert (cv.TestSize, [6, 6]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 2]); 236s assert (sum (test (cv, 'all')), [6, 6]); 236s assert (sum (training (cv, 'all')), [6, 6]); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, NaN, 2, 3, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 11); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [6, 5]); 236s assert (cv.TestSize, [5, 6]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [11, 2]); 236s assert (sum (test (cv, 'all')), [5, 6]); 236s assert (sum (training (cv, 'all')), [6, 5]); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [5, 7]); 236s assert (cv.TestSize, [7, 5]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 2]); 236s assert (sum (test (cv, 'all')), [7, 5]); 236s assert (sum (training (cv, 'all')), [5, 7]); 236s assert (test (cv, 1)', grpvar == 2); 236s assert (test (cv, 2)', grpvar != 2); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [7, 5]); 236s assert (cv.TestSize, [5, 7]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 2]); 236s assert (sum (test (cv, 'all')), [5, 7]); 236s assert (sum (training (cv, 'all')), [7, 5]); 236s assert (test (cv, 1)', grpvar == 2); 236s assert (test (cv, 2)', grpvar != 2); 236s ***** test 236s grpvar = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3]; 236s rand ('seed', 5); 236s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 12); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [7, 5]); 236s assert (cv.TestSize, [5, 7]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, true); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (size (test (cv, 'all')), [12, 2]); 236s assert (sum (test (cv, 'all')), [5, 7]); 236s assert (sum (training (cv, 'all')), [7, 5]); 236s assert (test (cv, 1)', grpvar == 3); 236s assert (test (cv, 2)', grpvar != 3); 236s ***** test 236s rand ('seed', 5); 236s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 3); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 7); 236s assert (cv.TestSize, 3); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, true); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv), logical ([0, 0, 0, 0, 1, 0, 1, 0, 0, 1])'); 236s ***** test 236s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 4); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 6); 236s assert (cv.TestSize, 4); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, true); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (sum (test (cv)(1:5)), 2); 236s assert (sum (test (cv)(6:10)), 2); 236s ***** test 236s grpvar = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2]; 236s rand ('seed', 5); 236s cv = cvpartition (grpvar, 'holdout', 4, 'Stratify', false); 236s assert (cv.Type, 'holdout'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 1); 236s assert (cv.TrainSize, 6); 236s assert (cv.TestSize, 4); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (sum (test (cv)(1:5)), 3); 236s assert (sum (test (cv)(6:10)), 1); 236s ***** test 236s cv = cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [5, 5]); 236s assert (cv.TestSize, [5, 5]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, true); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (sum (test (cv, 1)(1:5)), 3); 236s assert (sum (test (cv, 2)(1:5)), 2); 236s assert (sum (test (cv, 1)(6:10)), 2); 236s assert (sum (test (cv, 2)(6:10)), 3); 236s ***** test 236s grpvar = [1 1 1 1 1 2 2 2 2 1]; 236s rand ('seed', 5); 236s cv = cvpartition (grpvar, 'kfold', 2, 'Stratify', false); 236s assert (cv.Type, 'kfold'); 236s assert (cv.NumObservations, 10); 236s assert (cv.NumTestSets, 2); 236s assert (cv.TrainSize, [5, 5]); 236s assert (cv.TestSize, [5, 5]); 236s assert (cv.IsCustom, false); 236s assert (cv.IsGrouped, false); 236s assert (cv.IsStratified, false); 236s assert (test (cv, 1), ! training (cv, 1)); 236s assert (test (cv, 'all'), ! training (cv, 'all')); 236s assert (sum (test (cv, 1)(1:5)), 4); 236s assert (sum (test (cv, 2)(1:5)), 1); 236s assert (sum (test (cv, 1)(6:10)), 1); 236s assert (sum (test (cv, 2)(6:10)), 4); 236s ***** error cvpartition (2) 236s ***** error cvpartition (1, 2, 3, 4, 5, 6) 236s ***** error ... 236s cvpartition ("CustomPartition", 'a') 236s ***** error ... 236s cvpartition ("CustomPartition", [2, 3; 2, 3]) 236s ***** error ... 236s cvpartition ("CustomPartition", false (3, 3, 3)) 236s ***** error ... 236s cvpartition ("CustomPartition", [false, true; true, true; true, false]) 236s ***** error ... 236s cvpartition ("CustomPartition", false (3, 5)) 236s ***** error ... 236s cvpartition (-20, "LeaveOut") 236s ***** error ... 236s cvpartition (20.5, "LeaveOut") 236s ***** error ... 236s cvpartition (20, "HoldOut", [0.2, 0.3]) 236s ***** error ... 236s cvpartition (20, "HoldOut", 'a') 236s ***** error ... 236s cvpartition (20, "HoldOut", 0) 236s ***** error ... 236s cvpartition (20, "HoldOut", -0.1) 236s ***** error ... 236s cvpartition (20, "HoldOut", 21) 236s ***** error ... 236s cvpartition (20, "kfold", [2, 3]) 236s ***** error ... 236s cvpartition (20, "kfold", 'a') 236s ***** error ... 236s cvpartition (20, "kfold", 2.5) 236s ***** error ... 236s cvpartition (20, "kfold", 21) 236s ***** error ... 236s cvpartition (10, "kfold", 3, "Group") 236s ***** error ... 236s cvpartition (10, "kfold", 3, "GroupingVariables") 236s ***** error ... 236s cvpartition (10, "kfold", 3, "GroupingVariables", ones (3, 3, 3)) 236s ***** error ... 236s cvpartition (10, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}) 236s ***** warning ... 236s cvpartition (5, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}); 236s ***** error ... 236s cvpartition (20, "some") 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "strat") 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify") 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", [true, true]) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", 'no') 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a') 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a', "stratify", true) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3]) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3], "stratify", true) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 0) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 0, "stratify", true) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1, "stratify", true) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2, "stratify", false) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 6) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "holdout", 6, "stratify", false) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a') 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a', "stratify", true) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3]) 236s ***** error ... 236s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3], "stratify", false) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 0) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 0, "stratify", true) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5, "stratify", true) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 5) 237s ***** error ...\ 237s cvpartition ([1, 1, 1, 2, 2], "kfold", 5, "stratify", true) 237s ***** error ... 237s cvpartition ([1, 1, 1, 2, 2], "leaveout") 237s ***** error ... 237s cvpartition ([1, 1, 1, 2, 2], "resubstitution") 237s ***** error ... 237s cvpartition ([1, 1, 1, 2, 2], "some") 237s ***** error ... 237s cvpartition ({1, 1; 2, 2}, "kfold") 237s ***** error ... 237s repartition (cvpartition ('CustomPartition', [1,1,2,2,3,3])) 237s ***** error ... 237s repartition (cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2, 'Stratify', true), 'legacy') 237s ***** error ... 237s repartition (cvpartition (20, 'Leaveout', 0.2), 'legacy') 237s ***** error ... 237s repartition (cvpartition (20, 'Leaveout', 0.2), 'asd') 237s ***** error ... 237s repartition (cvpartition (20, 'Leaveout', 0.2), 2+i) 237s ***** error ... 237s repartition (cvpartition (20, 'KFold', 5), [34, 56; 2, 3]) 237s ***** error ... 237s test (cvpartition (20, "kfold"), 2, 3) 237s ***** error ... 237s test (cvpartition (20, "kfold"), 0) 237s ***** error ... 237s test (cvpartition (20, "kfold"), 1.5) 237s ***** error ... 237s test (cvpartition (20, "kfold"), [1, 1.5]) 237s ***** error ... 237s test (cvpartition (20, "kfold"), [2, 3; 2, 3]) 237s ***** error ... 237s test (cvpartition (20, "kfold"), 21) 237s ***** error ... 237s test (cvpartition (20, "kfold"), [18, 21]) 237s ***** error ... 237s training (cvpartition (20, "kfold"), 2, 3) 237s ***** error ... 237s training (cvpartition (20, "kfold"), 0) 237s ***** error ... 237s training (cvpartition (20, "kfold"), 1.5) 237s ***** error ... 237s training (cvpartition (20, "kfold"), [1, 1.5]) 237s ***** error ... 237s training (cvpartition (20, "kfold"), [2, 3; 2, 3]) 237s ***** error ... 237s training (cvpartition (20, "kfold"), 21) 237s ***** error ... 237s training (cvpartition (20, "kfold"), [18, 21]) 237s 98 tests, 98 passed, 0 known failure, 0 skipped 237s [inst/Clustering/SilhouetteEvaluation.m] 237s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/SilhouetteEvaluation.m 237s ***** test 237s load fisheriris 237s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 237s assert (class (eva), "SilhouetteEvaluation"); 237s 1 test, 1 passed, 0 known failure, 0 skipped 237s [inst/Clustering/GapEvaluation.m] 237s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/GapEvaluation.m 237s ***** test 237s load fisheriris 237s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 237s "referencedistribution", "uniform"); 237s assert (class (eva), "GapEvaluation"); 241s 1 test, 1 passed, 0 known failure, 0 skipped 241s [inst/Clustering/DaviesBouldinEvaluation.m] 241s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/DaviesBouldinEvaluation.m 241s ***** test 241s load fisheriris 241s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 241s assert (class (eva), "DaviesBouldinEvaluation"); 242s 1 test, 1 passed, 0 known failure, 0 skipped 242s [inst/Clustering/hnswSearcher.m] 242s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Clustering/hnswSearcher.m 242s ***** demo 242s ## Create an hnswSearcher with Euclidean distance 242s X = [1, 2; 3, 4; 5, 6]; 242s obj = hnswSearcher (X); 242s ## Find the nearest neighbor to [2, 3] 242s Y = [2, 3]; 242s [idx, D] = knnsearch (obj, Y, "K", 1); 242s disp ("Nearest neighbor index:"); 242s disp (idx); 242s disp ("Distance:"); 242s disp (D); 242s ***** demo 242s ## Create an hnswSearcher with Minkowski distance (P=3) 242s X = [0, 0; 1, 0; 2, 0]; 242s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 242s ## Find the nearest neighbor to [1, 0] 242s Y = [1, 0]; 242s [idx, D] = knnsearch (obj, Y, "K", 1); 242s disp ("Nearest neighbor index:"); 242s disp (idx); 242s disp ("Distance:"); 242s disp (D); 242s ***** test 242s load fisheriris 242s X = meas; 242s obj = hnswSearcher (X, "Distance", "chebychev"); 242s Y = X(30:35,:); 242s [idx, D] = knnsearch (obj, Y, "K", 4); 242s assert (idx, [[30 31 4 12]; [31 30 10 35]; [32 21 37 28]; [33 47 20 34]; ... 242s [34 16 33 15]; [35 10 26 2]]) 242s assert (D, [[0 0.1000 0.1000 0.2000]; [0 0.1000 0.1000 0.1000]; [0 0.2000 ... 242s 0.2000 0.2000]; [0 0.3000 0.3000 0.3000]; [0 0.2000 0.3000 ... 242s 0.3000]; [0 0.1000 0.1000 0.1000]], 5e-15) 248s ***** test 248s load fisheriris 248s X = meas; 248s C = cov (X); 248s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 248s Y = X(120:125,:); 248s [idx, D] = knnsearch (obj, Y, "K", 2); 248s assert (idx(1, :), [120 82]) 248s assert (idx(4, :), [123 106]) 248s assert (idx(5, :), [124 127]) 248s assert (idx(6, :), [125 57]) 248s assert (D(1, :), [0 0.7734], 1e-4) 248s assert (D(4, :), [0 0.8452], 1e-4) 248s assert (D(5, :), [0 0.4152], 1e-4) 248s assert (D(6, :), [0 0.7322], 1e-4) 253s ***** test 253s ## Basic constructor with default Euclidean 253s X = [1, 2; 3, 4; 5, 6]; 253s obj = hnswSearcher (X); 253s assert (obj.X, X); 253s assert (obj.Distance, "euclidean"); 253s assert (isempty (obj.DistParameter)); 253s ***** test 253s ## Minkowski distance with custom P 253s X = [0, 0; 1, 1; 2, 2]; 253s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 253s assert (obj.Distance, "minkowski"); 253s assert (obj.DistParameter, 3); 253s ***** test 253s ## Seuclidean distance with custom Scale 253s X = [1, 2; 3, 4; 5, 6]; 253s S = [1, 2]; 253s obj = hnswSearcher (X, "Distance", "seuclidean", "Scale", S); 253s assert (obj.Distance, "seuclidean"); 253s assert (obj.DistParameter, S); 254s ***** test 254s ## Mahalanobis distance with custom Cov 254s X = [1, 2; 3, 4; 5, 6]; 254s C = [1, 0; 0, 1]; 254s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 254s assert (obj.Distance, "mahalanobis"); 254s assert (obj.DistParameter, C); 254s ***** test 254s ## knnsearch with Euclidean distance 254s X = [1, 2; 3, 4; 5, 6]; 254s obj = hnswSearcher (X); 254s Y = [2, 3]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [2])); 254s assert (abs (D - sqrt(2)) < 1e-2); 254s ***** test 254s ## knnsearch with Cityblock distance 254s X = [0, 0; 1, 1; 2, 2]; 254s obj = hnswSearcher (X, "Distance", "cityblock"); 254s Y = [1, 0]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [1, 2])); 254s assert (abs (D - 1) < 1e-2); 254s ***** test 254s ## knnsearch with Chebychev distance 254s X = [1, 1; 2, 3; 4, 2]; 254s obj = hnswSearcher (X, "Distance", "chebychev"); 254s Y = [2, 2]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [1, 2])); 254s assert (abs (D - 1) < 1e-2); 254s ***** test 254s ## knnsearch with Minkowski P=3 254s X = [0, 0; 1, 0; 2, 0]; 254s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 254s Y = [1, 0]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [2])); 254s assert (abs (D - 0) < 1e-2); 254s ***** test 254s ## Diverse dataset with Euclidean 254s X = [0, 10; 5, 5; 10, 0]; 254s obj = hnswSearcher (X); 254s Y = [5, 5]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [2])); 254s assert (abs (D - 0) < 1e-2); 254s ***** test 254s ## High-dimensional data with Cityblock 254s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 254s obj = hnswSearcher (X, "Distance", "cityblock"); 254s Y = [4, 5, 6]; 254s [idx, D] = knnsearch (obj, Y, "K", 1); 254s assert (ismember (idx, [2])); 254s assert (abs (D - 0) < 1e-2); 254s ***** error ... 254s hnswSearcher () 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance") 254s ***** error ... 254s hnswSearcher ([]) 254s ***** error ... 254s hnswSearcher ("abc") 254s ***** error ... 254s hnswSearcher ([1; Inf; 3]) 254s ***** error ... 254s hnswSearcher (ones(3,2), "foo", "bar") 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "invalid") 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", 1) 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", [1, 2; 3, 4]) 254s ***** error ... 254s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 254s ***** error ... 254s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 0) 254s ***** error ... 254s hnswSearcher (ones(3,2), "TrainSetSize", -1) 254s ***** error ... 254s hnswSearcher (ones(3,2), "TrainSetSize", 4) 254s ***** error ... 254s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 200, "TrainSetSize", 100) 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2))) 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K") 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), []) 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), "abc") 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), ones(3,3)) 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K", 0) 254s ***** error ... 254s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "foo", "bar") 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj(1) 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj{1} 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.invalid 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj(1) = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj{1} = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.X = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.HNSWGraph = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.Distance = "invalid" 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.Distance = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 254s ***** error ... 254s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 254s ***** error ... 254s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.DistParameter = 1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.MaxNumLinksPerNode = 0 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.TrainSetSize = -1 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.efSearch = 1.5 254s ***** error ... 254s obj = hnswSearcher (ones(3,2)); obj.invalid = 1 254s 54 tests, 54 passed, 0 known failure, 0 skipped 254s [inst/pca.m] 254s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/pca.m 254s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 254s ***** test 254s x=[7 4 3 254s 4 1 8 254s 6 3 5 254s 8 6 1 254s 8 5 7 254s 7 2 9 254s 5 3 3 254s 9 5 8 254s 7 4 5 254s 8 2 2]; 254s R = corrcoef (x); 254s [V, lambda] = eig (R); 254s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 254s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 254s ***** 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 254s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 254s F = zscore(x)*B; 254s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 254s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 254s ***** test 254s x=[1,2,3;2,1,3]'; 254s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 254s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 254s m(:,1) = m(:,1)*sign(COEFF(1,1)); 254s m(:,2) = m(:,2)*sign(COEFF(1,2)); 254s ***** assert(COEFF,m(1:2,:),10*eps); 254s ***** assert(SCORE,-m,10*eps); 254s ***** assert(latent,[1.5;.5],10*eps); 254s ***** assert(tsquare,[4;4;4]/3,10*eps); 254s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 254s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 254s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 254s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 254s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 254s !!!!! known failure 254s ASSERT errors for: assert (tsquare,([1.5; 0.5; 1.5]),10 * eps) 254s 254s Location | Observed | Expected | Reason 254s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 254s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 254s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 254s ***** test 254s x=x'; 254s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 254s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 254s m(:,1) = m(:,1)*sign(COEFF(1,1)); 254s m(:,2) = m(:,2)*sign(COEFF(1,2)); 254s m(:,3) = m(:,3)*sign(COEFF(3,3)); 254s ***** assert(COEFF,m,10*eps); 254s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 254s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 254s ***** assert(latent,[1;0;0],10*eps); 254s ***** assert(tsquare,[0.5;0.5],10*eps) 254s ***** test 254s [COEFF,SCORE,latent,tsquare] = pca(x); 254s ***** assert(COEFF,m(:, 1),10*eps); 254s ***** assert(SCORE,-m(1:2,1),10*eps); 254s ***** assert(latent,[1],10*eps); 254s ***** assert(tsquare,[0.5;0.5],10*eps) 254s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 254s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 254s ***** error pca([1 2; 3 4], "NumComponents", -4) 254s ***** error pca([1 2; 3 4], "Rows", 1) 254s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 254s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 254s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 254s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 254s ***** error pca([1 2; 3 4], "XXX", 1) 254s 32 tests, 31 passed, 1 known failure, 0 skipped 254s [inst/dendrogram.m] 254s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dendrogram.m 254s ***** demo 254s ## simple dendrogram 254s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 254s y(:,3) = 1:5; 254s dendrogram (y); 254s title ("simple dendrogram"); 254s ***** demo 254s ## another simple dendrogram 254s v = 2 * rand (30, 1) - 1; 254s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 254s y = linkage (squareform (d, "tovector")); 254s dendrogram (y); 254s title ("another simple dendrogram"); 254s ***** demo 254s ## collapsed tree, find all the leaves of node 5 254s X = randn (60, 2); 254s D = pdist (X); 254s y = linkage (D, "average"); 254s subplot (2, 1, 1); 254s title ("original tree"); 254s dendrogram (y, 0); 254s subplot (2, 1, 2); 254s title ("collapsed tree"); 254s [~, t] = dendrogram (y, 20); 254s find(t == 5) 254s ***** demo 254s ## optimal leaf order 254s X = randn (30, 2); 254s D = pdist (X); 254s y = linkage (D, "average"); 254s order = optimalleaforder (y, D); 254s subplot (2, 1, 1); 254s title ("original leaf order"); 254s dendrogram (y); 254s subplot (2, 1, 2); 254s title ("optimal leaf order"); 254s dendrogram (y, "Reorder", order); 254s ***** demo 254s ## horizontal orientation and labels 254s X = randn (8, 2); 254s D = pdist (X); 254s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 254s "Sneezy"; "Dopey"]; 254s y = linkage (D, "average"); 254s dendrogram (y, "Orientation", "left", "Labels", L); 254s title ("horizontal orientation and labels"); 254s ***** shared visibility_setting 254s visibility_setting = get (0, "DefaultFigureVisible"); 254s ***** test 254s hf = figure ("visible", "off"); 254s unwind_protect 254s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 254s y(:,3) = 1:5; 254s dendrogram (y); 254s unwind_protect_cleanup 254s close (hf); 254s end_unwind_protect 254s ***** test 254s hf = figure ("visible", "off"); 254s unwind_protect 254s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 254s y(:,3) = 1:5; 254s dendrogram (y); 254s unwind_protect_cleanup 254s close (hf); 254s end_unwind_protect 254s ***** test 254s hf = figure ("visible", "off"); 254s unwind_protect 254s v = 2 * rand (30, 1) - 1; 254s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 254s y = linkage (squareform (d, "tovector")); 254s dendrogram (y); 254s unwind_protect_cleanup 254s close (hf); 254s end_unwind_protect 254s warning: using the gnuplot graphics toolkit is discouraged 254s 254s The gnuplot graphics toolkit is not actively maintained and has a number 254s of limitations that are unlikely to be fixed. Communication with gnuplot 254s uses a one-directional pipe and limited information is passed back to the 254s Octave interpreter so most changes made interactively in the plot window 254s will not be reflected in the graphics properties managed by Octave. For 254s example, if the plot window is closed with a mouse click, Octave will not 254s be notified and will not update its internal list of open figure windows. 254s The qt toolkit is recommended instead. 254s ***** test 254s hf = figure ("visible", "off"); 254s unwind_protect 254s X = randn (30, 2); 254s D = pdist (X); 254s y = linkage (D, "average"); 254s order = optimalleaforder (y, D); 254s subplot (2, 1, 1); 254s title ("original leaf order"); 254s dendrogram (y); 254s subplot (2, 1, 2); 254s title ("optimal leaf order"); 254s dendrogram (y, "Reorder", order); 254s unwind_protect_cleanup 254s close (hf); 254s end_unwind_protect 256s ***** error dendrogram (); 256s ***** error dendrogram (ones (2, 2), 1); 256s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 256s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 256s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 256s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 256s 9 tests, 9 passed, 0 known failure, 0 skipped 256s [inst/ranksum.m] 256s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ranksum.m 256s ***** test 256s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 256s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 256s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 256s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 256s assert (p, 0.004329004329004329, 1e-14); 256s assert (h, true); 256s assert (stats.ranksum, 21.5); 256s ***** test 256s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 256s 49 47 50 60 59 60 62 61 71]'; 256s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 256s 54 50 53 62 62 62 72 60 67]'; 256s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 256s assert (p, 0.1270832752950605, 1e-14); 256s assert (h, false); 256s assert (stats.ranksum, 837.5); 256s assert (stats.zval, -1.140287483634606, 1e-14); 256s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 256s "method", "exact"); 256s assert (p, 0.127343916432862, 1e-14); 256s assert (h, false); 256s assert (stats.ranksum, 837.5); 265s 2 tests, 2 passed, 0 known failure, 0 skipped 265s [inst/factoran.m] 265s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/factoran.m 265s ***** demo 265s x = [ 7 26 6 60; 265s 1 29 15 52; 265s 11 56 8 20; 265s 11 31 8 47; 265s 7 52 6 33; 265s 11 55 9 22; 265s 3 71 17 6; 265s 1 31 22 44; 265s 2 54 18 22; 265s 21 47 4 26; 265s 1 40 23 34; 265s 11 66 9 12; 265s 10 68 8 12 265s ]; 265s [loadings, specvar, fscores] = factoran (x, 2); 265s ***** test 265s x = [1, 2; 2, 1; 3, 3]; 265s [loadings, specvar, fscores] = factoran (x, 1); 265s l_out = [0.7071; 0.7071]; 265s s_out = [0.5000; 0.5000]; 265s f_out = [-0.7071; -0.7071; 1.4142]; 265s assert (loadings, l_out, 1.3e-4); 265s assert (specvar, s_out, 1.3e-4); 265s assert (fscores, f_out, 1.3e-4); 265s ***** error factoran () 265s ***** error factoran (ones (5,3), 0) 265s ***** error factoran (ones (5,3), 3) 265s ***** error factoran ({1,2}, 1) 265s ***** error factoran (ones (2,2,2), 1) 265s ***** error x=ones (3,2); x(:,2)=0; factoran (x,1) 265s 7 tests, 7 passed, 0 known failure, 0 skipped 265s [inst/qqplot.m] 265s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/qqplot.m 265s ***** test 265s hf = figure ("visible", "off"); 265s unwind_protect 265s 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]); 265s unwind_protect_cleanup 265s close (hf); 265s end_unwind_protect 265s ***** error qqplot () 265s ***** error qqplot ({1}) 265s ***** error qqplot (ones (2,2)) 265s ***** error qqplot (1, "foobar") 265s ***** error qqplot ([1 2 3], "foobar") 265s 6 tests, 6 passed, 0 known failure, 0 skipped 265s [inst/tabulate.m] 265s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/tabulate.m 265s ***** demo 265s ## Generate a frequency table for a vector of data in a cell array 265s load patients 265s 265s ## Display the first seven entries of the Gender variable 265s gender = Gender(1:7) 265s 265s ## Compute the frequency table that shows the number and 265s ## percentage of Male and Female patients 265s tabulate (Gender) 265s ***** demo 265s ## Create a frequency table for a vector of positive integers 265s load patients 265s 265s ## Display the first seven entries of the Gender variable 265s height = Height(1:7) 265s 265s ## Create a frequency table that shows, in its second and third columns, 265s ## the number and percentage of patients with a particular height. 265s table = tabulate (Height); 265s 265s ## Display the first and last seven entries of the frequency table 265s first = table(1:7,:) 265s 265s last = table(end-6:end,:) 265s ***** demo 265s ## Create a frequency table from a character array 265s load carsmall 265s 265s ## Tabulate the data in the Origin variable, which shows the 265s ## country of origin of each car in the data set 265s tabulate (Origin) 265s ***** demo 265s ## Create a frequency table from a numeric vector with NaN values 265s load carsmall 265s 265s ## The carsmall dataset contains measurements of 100 cars 265s total_cars = length (MPG) 265s ## For six cars, the MPG value is missing 265s missingMPG = length (MPG(isnan (MPG))) 265s 265s ## Create a frequency table using MPG 265s tabulate (MPG) 265s table = tabulate (MPG); 265s 265s ## Only 94 cars were used 265s valid_cars = sum (table(:,2)) 265s ***** test 265s load patients 265s table = tabulate (Gender); 265s assert (table{1,1}, "Male"); 265s assert (table{2,1}, "Female"); 265s assert (table{1,2}, 47); 265s assert (table{2,2}, 53); 265s ***** test 265s load patients 265s table = tabulate (Height); 265s assert (table(end-4,:), [68, 15, 15]); 265s assert (table(end-3,:), [69, 8, 8]); 265s assert (table(end-2,:), [70, 11, 11]); 265s assert (table(end-1,:), [71, 10, 10]); 265s assert (table(end,:), [72, 4, 4]); 265s ***** error tabulate (ones (3)) 265s ***** error tabulate ({1, 2, 3, 4}) 265s ***** error ... 265s tabulate ({"a", "b"; "a", "c"}) 265s 5 tests, 5 passed, 0 known failure, 0 skipped 265s [inst/evalclusters.m] 265s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/evalclusters.m 265s ***** demo 265s load fisheriris; 265s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 265s plot (eva) 265s ***** error evalclusters () 265s ***** error evalclusters ([1 1;0 1]) 265s ***** error evalclusters ([1 1;0 1], "kmeans") 265s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 265s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 265s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 265s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 265s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 265s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 265s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 265s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 265s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 265s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 265s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 265s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 265s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 265s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 265s "distance", "a") 265s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 265s "distance", "a") 265s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 265s "clusterpriors", "equal") 265s ***** error evalclusters ([1 1;0 1], [1; 2], ... 265s "silhouette", "clusterpriors", "xxx") 265s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 265s ***** test 265s load fisheriris; 265s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 265s assert (isa (eva, "CalinskiHarabaszEvaluation")); 265s assert (eva.NumObservations, 150); 265s assert (eva.OptimalK, 3); 265s assert (eva.InspectedK, [1 2 3 4 5 6]); 265s 22 tests, 22 passed, 0 known failure, 0 skipped 265s [inst/histfit.m] 265s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/histfit.m 265s ***** demo 265s histfit (randn (100, 1)) 265s ***** demo 265s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 265s ***** demo 265s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 265s ***** test 265s hf = figure ("visible", "off"); 265s unwind_protect 265s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 265s histfit (x); 265s unwind_protect_cleanup 265s close (hf); 265s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 266s histfit (x); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 266s histfit (x, 3); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s histfit (randn (100, 1)); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s ax = gca (); 266s histfit (ax, randn (100, 1)); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s ax = gca (); 266s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s ax = gca (); 266s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** test 266s hf = figure ("visible", "off"); 266s unwind_protect 266s ax = axes ("parent", hf); 266s fail ("histfit (ax)", "histfit: too few input arguments."); 266s unwind_protect_cleanup 266s close (hf); 266s end_unwind_protect 266s ***** error ... 266s histfit ('wer') 266s ***** error histfit ([NaN, NaN, NaN]); 266s ***** error ... 266s histfit (randn (100, 1), 5.6) 266s ***** error ... 266s histfit (randn (100, 1), 8, 5) 266s ***** error ... 266s histfit (randn (100, 1), 8, {'normal'}) 266s ***** error ... 266s histfit (randn (100, 1), 8, 'Kernel') 266s ***** error ... 266s histfit (randn (100, 1), 8, 'ASDASDASD') 266s 17 tests, 17 passed, 0 known failure, 0 skipped 266s [inst/regression_ftest.m] 266s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/regression_ftest.m 266s ***** error regression_ftest (); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 266s ***** error ... 266s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 266s ***** error ... 266s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 266s 18 tests, 18 passed, 0 known failure, 0 skipped 266s [inst/x2fx.m] 266s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/x2fx.m 266s ***** test 266s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 266s D = x2fx(X,'quadratic'); 266s assert (D(1,:), [1, 1, 10, 10, 1, 100]); 266s assert (D(2,:), [1, 2, 20, 40, 4, 400]); 266s ***** test 266s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 266s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 266s D = x2fx(X,model); 266s assert (D(1,:), [1, 1, 10, 10, 1]); 266s assert (D(2,:), [1, 2, 20, 40, 4]); 266s assert (D(4,:), [1, 4, 20, 80, 16]); 266s ***** test 266s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 266s D = x2fx (x, 'linear'); 266s assert (D, [1, 1, 2, 3; 1, 2, 3, 4;, 1, 3, 4, 5]); 266s D = x2fx (x, 'interaction'); 266s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6]); 266s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12]); 266s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20]); 266s D = x2fx (x, 'quadratic'); 266s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6, 1, 4, 9]); 266s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12, 4, 9, 16]); 266s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20, 9, 16, 25]); 266s D = x2fx (x, 'purequadratic'); 266s assert (D(1,:), [1, 1, 2, 3, 1, 4, 9]); 266s assert (D(2,:), [1, 2, 3, 4, 4, 9, 16]); 266s assert (D(3,:), [1, 3, 4, 5, 9, 16, 25]); 266s ***** test 266s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 266s D = x2fx (x, [0, 0, 1; 1, 0, 2]); 266s assert (D, [3, 9; 4, 32; 5, 75]); 266s ***** test 266s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 266s D = x2fx (x, 'linear', [1, 3]); 266s assert (D, [1, 1, 0, 2, 1, 0; 1, 0, 1, 3, 0, 1; 1, 0, 0, 4, 0, 0]); 266s ***** test 266s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 266s D = x2fx (x, 'quadratic', [1, 3]); 266s assert (D(1,:), [1, 1, 0, 2, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 4]); 266s assert (D(2,:), [1, 0, 1, 3, 0, 1, 0, 3, 0, 0, 0, 1, 0, 3, 9]); 266s assert (D(3,:), [1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]); 266s ***** test 266s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 266s D = x2fx (x, 'cos'); 266s assert (D(1,:), [0.5403, -0.4161, -0.9900], 1e-4); 266s assert (D(2,:), [-0.4161, -0.9900, -0.6536], 1e-4); 266s assert (D(3,:), [-0.9900, -0.6536, 0.2837], 1e-4); 266s ***** error ... 266s x2fx ([1, 2, 3; 2, 3, 4], 'quadratic', [1, 4]) 266s ***** error ... 266s D = x2fx ([1, 2, 3; 2, 3, 4; 3, 4, 5], 'cosine') 266s ***** error ... 266s x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 266s ***** error ... 266s x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 267s 11 tests, 11 passed, 0 known failure, 0 skipped 267s [inst/tiedrank.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/tiedrank.m 267s ***** test 267s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 267s assert (r, [1, 2.5, 4, 5, 2.5]); 267s assert (tieadj, 3); 267s ***** test 267s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 267s assert (r, [1; 2.5; 4; 5; 2.5]); 267s assert (tieadj, 3); 267s ***** test 267s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 267s assert (r, [1, 2.5, 4, 5, 2.5]); 267s assert (tieadj, [1; 0; 18]); 267s ***** test 267s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 267s assert (r, [1, 2.5, 2, 1, 2.5]); 267s assert (tieadj, 3); 267s ***** test 267s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 267s assert (r, [1, 2.5, 2, 1, 2.5]); 267s assert (tieadj, [1; 0; 18]); 267s ***** error tiedrank (ones (2)) 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], "A") 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], [true, true]) 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], 0, "A") 267s ***** error ... 267s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 267s 12 tests, 12 passed, 0 known failure, 0 skipped 267s [inst/silhouette.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/silhouette.m 267s ***** demo 267s load fisheriris; 267s X = meas(:,3:4); 267s cidcs = kmeans (X, 3, "Replicates", 5); 267s silhouette (X, cidcs); 267s y_labels(cidcs([1 51 101])) = unique (species); 267s set (gca, "yticklabel", y_labels); 267s title ("Fisher's iris data"); 267s ***** error silhouette (); 267s ***** error silhouette ([1 2; 1 1]); 267s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 267s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 267s 4 tests, 4 passed, 0 known failure, 0 skipped 267s [inst/signtest.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/signtest.m 267s ***** test 267s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 267s assert (pval, 1.091701889420221e-218, 1e-14); 267s assert (h, 1); 267s assert (stats.zval, -31.5437631079266, 1e-14); 267s ***** test 267s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 267s assert (pval, 0.6875000000000006, 1e-14); 267s assert (h, 0); 267s assert (stats.zval, NaN); 267s assert (stats.sign, 4); 267s ***** test 267s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 267s assert (pval, 0.6830913983096086, 1e-14); 267s assert (h, 0); 267s assert (stats.zval, 0.4082482904638631, 1e-14); 267s assert (stats.sign, 4); 267s ***** error signtest (ones (2)) 267s ***** error ... 267s signtest ([1, 2, 3, 4], ones (2)) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [1, 2, 3]) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'tail') 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'alpha', 0) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'alpha', "a") 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'tail', "some") 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'method', 0.01) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'method', "some") 267s ***** error ... 267s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 267s 20 tests, 20 passed, 0 known failure, 0 skipped 267s [inst/fitcdiscr.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitcdiscr.m 267s ***** demo 267s ## Train a linear discriminant classifier for Gamma = 0.5 267s ## and plot the decision boundaries. 267s 267s load fisheriris 267s idx = ! strcmp (species, "setosa"); 267s X = meas(idx,3:4); 267s Y = cast (strcmpi (species(idx), "virginica"), "double"); 267s obj = fitcdiscr (X, Y, "Gamma", 0.5) 267s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 267s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 267s [x1G, x2G] = meshgrid (x1, x2); 267s XGrid = [x1G(:), x2G(:)]; 267s pred = predict (obj, XGrid); 267s gidx = logical (pred); 267s 267s figure 267s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 267s hold on 267s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 267s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 267s xlabel ("Petal length (cm)"); 267s ylabel ("Petal width (cm)"); 267s title ("Linear Discriminant Analysis Decision Boundary"); 267s legend ({"Versicolor Region", "Virginica Region", ... 267s "Sampled Versicolor", "Sampled Virginica"}, ... 267s "location", "northwest") 267s axis tight 267s hold off 267s ***** test 267s load fisheriris 267s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 267s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 267s assert (label, {'versicolor'}) 267s assert (score, [0, 0.9999, 0.0001], 1e-4) 267s assert (cost, [1, 0.0001, 0.9999], 1e-4) 267s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 267s assert (label, {'versicolor'}) 267s assert (score, [0, 0.6368, 0.3632], 1e-4) 267s assert (cost, [1, 0.3632, 0.6368], 1e-4) 267s assert (class (Mdl), "ClassificationDiscriminant"); 267s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 267s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 267s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 267s assert (Mdl.ClassNames, unique (species)) 267s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 267s 0.046361, 0.115388, 0.027622, 0.016355; ... 267s 0.083757, 0.027622, 0.185188, 0.021333; ... 267s 0.019201, 0.016355, 0.021333, 0.041882]; 267s assert (Mdl.Sigma, sigma, 1e-6) 267s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 267s 5.9360, 2.7700, 4.2600, 1.3260; ... 267s 6.5880, 2.9740, 5.5520, 2.0260]; 267s assert (Mdl.Mu, mu, 1e-14) 267s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 267s ***** error fitcdiscr () 267s ***** error fitcdiscr (ones (4,1)) 267s ***** error 267s fitcdiscr (ones (4,2), ones (4, 1), "K") 267s ***** error 267s fitcdiscr (ones (4,2), ones (3, 1)) 267s ***** error 267s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 267s 6 tests, 6 passed, 0 known failure, 0 skipped 267s [inst/einstein.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/einstein.m 267s ***** demo 267s einstein (0.4, 0.6) 267s ***** demo 267s einstein (0.2, 0.5) 267s ***** demo 267s einstein (0.6, 0.1) 267s ***** test 267s hf = figure ("visible", "off"); 267s unwind_protect 267s tiles = einstein (0.4, 0.6); 267s assert (isstruct (tiles), true); 267s unwind_protect_cleanup 267s close (hf); 267s end_unwind_protect 267s ***** error einstein 267s ***** error einstein (0.5) 267s ***** error einstein (0, 0.9) 267s ***** error einstein (0.4, 1) 267s ***** error einstein (-0.4, 1) 267s 6 tests, 6 passed, 0 known failure, 0 skipped 267s [inst/glmval.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/glmval.m 267s ***** demo 267s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 267s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 267s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 267s b = glmfit (x, [y n], "binomial", "Link", "probit"); 267s yfit = glmval (b, x, "probit", "Size", n); 267s plot (x, y./n, 'o', x, yfit ./ n, '-') 267s ***** error glmval () 267s ***** error glmval (1) 267s ***** error glmval (1, 2) 267s ***** error ... 267s glmval ("asd", [1; 1; 1], 'probit') 267s ***** error ... 267s glmval ([], [1; 1; 1], 'probit') 267s ***** error ... 267s glmval ([0.1; 0.3; 0.4], [], 'probit') 267s ***** error ... 267s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {'log'}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), NaN) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), [1, 2]) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), [1i]) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), true) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 267s ***** error ... 267s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 267s ***** error ... 267s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 267s ***** error ... 267s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 267s 57 tests, 57 passed, 0 known failure, 0 skipped 267s [inst/ecdf.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ecdf.m 267s ***** demo 267s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 267s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 267s t = min (y, d); ## we observe the minimum of these times 267s censored = (y > d); ## we also observe whether the subject failed 267s 267s ## Calculate and plot the empirical cdf and confidence bounds 267s [f, x, flo, fup] = ecdf (t, "censoring", censored); 267s stairs (x, f); 267s hold on; 267s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 267s 267s ## Superimpose a plot of the known true cdf 267s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 267s hold off; 267s ***** demo 267s R = wblrnd (100, 2, 100, 1); 267s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 267s hold on 267s x = 1:1:250; 267s wblsurv = 1 - cdf ("weibull", x, 100, 2); 267s plot (x, wblsurv, "g-", "LineWidth", 2) 267s legend ("Empirical survivor function", "Lower confidence bound", ... 267s "Upper confidence bound", "Weibull survivor function", ... 267s "Location", "northeast"); 267s hold off 267s ***** error ecdf (); 267s ***** error ecdf (randi (15,2)); 267s ***** error ecdf ([3,2,4,3+2i,5]); 267s ***** error kstest ([2,3,4,5,6],"tail"); 267s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 267s ***** error kstest ([2,3,4,5,6],"function", ""); 267s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 267s ***** error kstest ([2,3,4,5,6],"tail", 0); 267s ***** error kstest ([2,3,4,5,6],"alpha", 0); 267s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 267s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 267s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 267s ***** test 267s hf = figure ("visible", "off"); 267s unwind_protect 267s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 267s [F, x, Flo, Fup] = ecdf (x); 267s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 267s assert (F, F_out, ones (10,1) * 1e-4); 267s x_out = [0 0 2 3 4 5 6 7 8 9]'; 267s assert (x, x_out); 267s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 267s assert (Flo, Flo_out, ones (10,1) * 1e-4); 267s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 267s assert (Fup, Fup_out, ones (10,1) * 1e-4); 267s unwind_protect_cleanup 267s close (hf); 267s end_unwind_protect 267s ***** test 267s hf = figure ("visible", "off"); 267s unwind_protect 267s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 267s ecdf (x); 267s unwind_protect_cleanup 267s close (hf); 267s end_unwind_protect 267s 14 tests, 14 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/betastat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/betastat.m 267s ***** error betastat () 267s ***** error betastat (1) 267s ***** error betastat ({}, 2) 267s ***** error betastat (1, "") 267s ***** error betastat (i, 2) 267s ***** error betastat (1, i) 267s ***** error ... 267s betastat (ones (3), ones (2)) 267s ***** error ... 267s betastat (ones (2), ones (3)) 267s ***** test 267s a = -2:6; 267s b = 0.4:0.2:2; 267s [m, v] = betastat (a, b); 267s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 267s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 267s assert (m, expected_m, eps*100); 267s assert (v, expected_v, 0.001); 267s ***** test 267s a = -2:1:6; 267s [m, v] = betastat (a, 1.5); 267s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 267s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 267s assert (m, expected_m); 267s assert (v, expected_v, 0.001); 267s ***** test 267s a = [14 Inf 10 NaN 10]; 267s b = [12 9 NaN Inf 12]; 267s [m, v] = betastat (a, b); 267s expected_m = [14/26 NaN NaN NaN 10/22]; 267s expected_v = [168/18252 NaN NaN NaN 120/11132]; 267s assert (m, expected_m); 267s assert (v, expected_v); 267s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 267s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 267s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 267s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 267s 15 tests, 15 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/wblstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/wblstat.m 267s ***** error wblstat () 267s ***** error wblstat (1) 267s ***** error wblstat ({}, 2) 267s ***** error wblstat (1, "") 267s ***** error wblstat (i, 2) 267s ***** error wblstat (1, i) 267s ***** error ... 267s wblstat (ones (3), ones (2)) 267s ***** error ... 267s wblstat (ones (2), ones (3)) 267s ***** test 267s lambda = 3:8; 267s k = 1:6; 267s [m, v] = wblstat (lambda, k); 267s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 267s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 267s assert (m, expected_m, 0.001); 267s assert (v, expected_v, 0.001); 267s ***** test 267s k = 1:6; 267s [m, v] = wblstat (6, k); 267s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 267s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 267s assert (m, expected_m, 0.001); 267s assert (v, expected_v, 0.001); 267s 10 tests, 10 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/fstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/fstat.m 267s ***** error fstat () 267s ***** error fstat (1) 267s ***** error fstat ({}, 2) 267s ***** error fstat (1, "") 267s ***** error fstat (i, 2) 267s ***** error fstat (1, i) 267s ***** error ... 267s fstat (ones (3), ones (2)) 267s ***** error ... 267s fstat (ones (2), ones (3)) 267s ***** test 267s df1 = 1:6; 267s df2 = 5:10; 267s [m, v] = fstat (df1, df2); 267s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 267s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 267s assert (m, expected_mn, 0.001); 267s assert (v, expected_v, 0.001); 267s ***** test 267s df1 = 1:6; 267s [m, v] = fstat (df1, 5); 267s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 267s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 267s assert (m, expected_mn, 0.001); 267s assert (v, expected_v, 0.001); 267s 10 tests, 10 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/lognstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/lognstat.m 267s ***** error lognstat () 267s ***** error lognstat (1) 267s ***** error lognstat ({}, 2) 267s ***** error lognstat (1, "") 267s ***** error lognstat (i, 2) 267s ***** error lognstat (1, i) 267s ***** error ... 267s lognstat (ones (3), ones (2)) 267s ***** error ... 267s lognstat (ones (2), ones (3)) 267s ***** test 267s mu = 0:0.2:1; 267s sigma = 0.2:0.2:1.2; 267s [m, v] = lognstat (mu, sigma); 267s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 267s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 267s assert (m, expected_m, 0.001); 267s assert (v, expected_v, 0.001); 267s ***** test 267s sigma = 0.2:0.2:1.2; 267s [m, v] = lognstat (0, sigma); 267s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 267s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 267s assert (m, expected_m, 0.001); 267s assert (v, expected_v, 0.001); 267s 10 tests, 10 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/geostat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/geostat.m 267s ***** error geostat () 267s ***** error geostat ({}) 267s ***** error geostat ("") 267s ***** error geostat (i) 267s ***** test 267s ps = 1 ./ (1:6); 267s [m, v] = geostat (ps); 267s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 267s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 267s 5 tests, 5 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/hygestat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/hygestat.m 267s ***** error hygestat () 267s ***** error hygestat (1) 267s ***** error hygestat (1, 2) 267s ***** error hygestat ({}, 2, 3) 267s ***** error hygestat (1, "", 3) 267s ***** error hygestat (1, 2, "") 267s ***** error hygestat (i, 2, 3) 267s ***** error hygestat (1, i, 3) 267s ***** error hygestat (1, 2, i) 267s ***** error ... 267s hygestat (ones (3), ones (2), 3) 267s ***** error ... 267s hygestat (ones (2), 2, ones (3)) 267s ***** error ... 267s hygestat (1, ones (2), ones (3)) 267s ***** test 267s m = 4:9; 267s k = 0:5; 267s n = 1:6; 267s [mn, v] = hygestat (m, k, n); 267s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 267s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 267s assert (mn, expected_mn, 0.001); 267s assert (v, expected_v, 0.001); 267s ***** test 267s m = 4:9; 267s k = 0:5; 267s [mn, v] = hygestat (m, k, 2); 267s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 267s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 267s assert (mn, expected_mn, 0.001); 267s assert (v, expected_v, 0.001); 267s 14 tests, 14 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/evstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/evstat.m 267s ***** error evstat () 267s ***** error evstat (1) 267s ***** error evstat ({}, 2) 267s ***** error evstat (1, "") 267s ***** error evstat (i, 2) 267s ***** error evstat (1, i) 267s ***** error ... 267s evstat (ones (3), ones (2)) 267s ***** error ... 267s evstat (ones (2), ones (3)) 267s ***** shared x, y0, y1 267s x = [-5, 0, 1, 2, 3]; 267s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 267s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 267s ***** assert (evstat (x, x), y0, 1e-4) 267s ***** assert (evstat (x, x+6), y1, 1e-4) 267s ***** assert (evstat (x, x-6), NaN (1,5)) 267s 11 tests, 11 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/gevstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/gevstat.m 267s ***** error gevstat () 267s ***** error gevstat (1) 267s ***** error gevstat (1, 2) 267s ***** error gevstat ({}, 2, 3) 267s ***** error gevstat (1, "", 3) 267s ***** error gevstat (1, 2, "") 267s ***** error gevstat (i, 2, 3) 267s ***** error gevstat (1, i, 3) 267s ***** error gevstat (1, 2, i) 267s ***** error ... 267s gevstat (ones (3), ones (2), 3) 267s ***** error ... 267s gevstat (ones (2), 2, ones (3)) 267s ***** error ... 267s gevstat (1, ones (2), ones (3)) 267s ***** test 267s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 267s sigma = 2; 267s mu = 1; 267s [m, v] = gevstat (k, sigma, mu); 267s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 267s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 267s assert (m, expected_m, -0.001); 267s assert (v, expected_v, -0.001); 267s 13 tests, 13 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/tstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/tstat.m 267s ***** error tstat () 267s ***** error tstat ({}) 267s ***** error tstat ("") 267s ***** error tstat (i) 267s ***** test 267s df = 3:8; 267s [m, v] = tstat (df); 267s expected_m = [0, 0, 0, 0, 0, 0]; 267s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 267s assert (m, expected_m); 267s assert (v, expected_v, 0.001); 267s 5 tests, 5 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/ncfstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/ncfstat.m 267s ***** error ncfstat () 267s ***** error ncfstat (1) 267s ***** error ncfstat (1, 2) 267s ***** error ncfstat ({}, 2, 3) 267s ***** error ncfstat (1, "", 3) 267s ***** error ncfstat (1, 2, "") 267s ***** error ncfstat (i, 2, 3) 267s ***** error ncfstat (1, i, 3) 267s ***** error ncfstat (1, 2, i) 267s ***** error ... 267s ncfstat (ones (3), ones (2), 3) 267s ***** error ... 267s ncfstat (ones (2), 2, ones (3)) 267s ***** error ... 267s ncfstat (1, ones (2), ones (3)) 267s ***** shared df1, df2, lambda 267s df1 = [2, 0, -1, 1, 4, 5]; 267s df2 = [2, 4, -1, 5, 6, 7]; 267s lambda = [1, NaN, 3, 0, 2, -1]; 267s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 267s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 267s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 267s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 267s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 267s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 267s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 267s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 267s 20 tests, 20 passed, 0 known failure, 0 skipped 267s [inst/dist_stat/invgstat.m] 267s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/invgstat.m 267s ***** error invgstat () 267s ***** error invgstat (1) 267s ***** error invgstat ({}, 2) 267s ***** error invgstat (1, "") 267s ***** error invgstat (i, 2) 267s ***** error invgstat (1, i) 267s ***** error ... 267s invgstat (ones (3), ones (2)) 267s ***** error ... 267s invgstat (ones (2), ones (3)) 267s ***** test 267s [m, v] = invgstat (1, 1); 267s assert (m, 1); 267s assert (v, 1); 267s ***** test 267s [m, v] = invgstat (2, 1); 267s assert (m, 2); 267s assert (v, 8); 268s ***** test 268s [m, v] = invgstat (2, 2); 268s assert (m, 2); 268s assert (v, 4); 268s ***** test 268s [m, v] = invgstat (2, 2.5); 268s assert (m, 2); 268s assert (v, 3.2); 268s ***** test 268s [m, v] = invgstat (1.5, 0.5); 268s assert (m, 1.5); 268s assert (v, 6.75); 268s 13 tests, 13 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/poisstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/poisstat.m 268s ***** error poisstat () 268s ***** error poisstat ({}) 268s ***** error poisstat ("") 268s ***** error poisstat (i) 268s ***** test 268s lambda = 1 ./ (1:6); 268s [m, v] = poisstat (lambda); 268s assert (m, lambda); 268s assert (v, lambda); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/hnstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/hnstat.m 268s ***** error hnstat () 268s ***** error hnstat (1) 268s ***** error hnstat ({}, 2) 268s ***** error hnstat (1, "") 268s ***** error hnstat (i, 2) 268s ***** error hnstat (1, i) 268s ***** error ... 268s hnstat (ones (3), ones (2)) 268s ***** error ... 268s hnstat (ones (2), ones (3)) 268s ***** test 268s [m, v] = hnstat (0, 1); 268s assert (m, 0.7979, 1e-4); 268s assert (v, 0.3634, 1e-4); 268s ***** test 268s [m, v] = hnstat (2, 1); 268s assert (m, 2.7979, 1e-4); 268s assert (v, 0.3634, 1e-4); 268s ***** test 268s [m, v] = hnstat (2, 2); 268s assert (m, 3.5958, 1e-4); 268s assert (v, 1.4535, 1e-4); 268s ***** test 268s [m, v] = hnstat (2, 2.5); 268s assert (m, 3.9947, 1e-4); 268s assert (v, 2.2711, 1e-4); 268s ***** test 268s [m, v] = hnstat (1.5, 0.5); 268s assert (m, 1.8989, 1e-4); 268s assert (v, 0.0908, 1e-4); 268s ***** test 268s [m, v] = hnstat (-1.5, 0.5); 268s assert (m, -1.1011, 1e-4); 268s assert (v, 0.0908, 1e-4); 268s 14 tests, 14 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/nctstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/nctstat.m 268s ***** error nctstat () 268s ***** error nctstat (1) 268s ***** error nctstat ({}, 2) 268s ***** error nctstat (1, "") 268s ***** error nctstat (i, 2) 268s ***** error nctstat (1, i) 268s ***** error ... 268s nctstat (ones (3), ones (2)) 268s ***** error ... 268s nctstat (ones (2), ones (3)) 268s ***** shared df, mu 268s df = [2, 0, -1, 1, 4]; 268s mu = [1, NaN, 3, -1, 2]; 268s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 268s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 268s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 268s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 268s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 268s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 268s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 268s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 268s 16 tests, 16 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/unidstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/unidstat.m 268s ***** error unidstat () 268s ***** error unidstat ({}) 268s ***** error unidstat ("") 268s ***** error unidstat (i) 268s ***** test 268s N = 1:6; 268s [m, v] = unidstat (N); 268s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 268s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/raylstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/raylstat.m 268s ***** error raylstat () 268s ***** error raylstat ({}) 268s ***** error raylstat ("") 268s ***** error raylstat (i) 268s ***** test 268s sigma = 1:6; 268s [m, v] = raylstat (sigma); 268s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 268s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/nbinstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/nbinstat.m 268s ***** error nbinstat () 268s ***** error nbinstat (1) 268s ***** error nbinstat ({}, 2) 268s ***** error nbinstat (1, "") 268s ***** error nbinstat (i, 2) 268s ***** error nbinstat (1, i) 268s ***** error ... 268s nbinstat (ones (3), ones (2)) 268s ***** error ... 268s nbinstat (ones (2), ones (3)) 268s ***** test 268s r = 1:4; 268s ps = 0.2:0.2:0.8; 268s [m, v] = nbinstat (r, ps); 268s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 268s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s ***** test 268s r = 1:4; 268s [m, v] = nbinstat (r, 0.5); 268s expected_m = [1, 2, 3, 4]; 268s expected_v = [2, 4, 6, 8]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/gpstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/gpstat.m 268s ***** error gpstat () 268s ***** error gpstat (1) 268s ***** error gpstat (1, 2) 268s ***** error gpstat ({}, 2, 3) 268s ***** error gpstat (1, "", 3) 268s ***** error gpstat (1, 2, "") 268s ***** error gpstat (i, 2, 3) 268s ***** error gpstat (1, i, 3) 268s ***** error gpstat (1, 2, i) 268s ***** error ... 268s gpstat (ones (3), ones (2), 3) 268s ***** error ... 268s gpstat (ones (2), 2, ones (3)) 268s ***** error ... 268s gpstat (1, ones (2), ones (3)) 268s ***** shared x, y 268s x = [-Inf, -1, 0, 1/2, 1, Inf]; 268s y = [0, 0.5, 1, 2, Inf, Inf]; 268s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 268s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 268s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 268s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 268s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 268s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 268s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 268s 19 tests, 19 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/expstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/expstat.m 268s ***** error expstat () 268s ***** error expstat ({}) 268s ***** error expstat ("") 268s ***** error expstat (i) 268s ***** test 268s mu = 1:6; 268s [m, v] = expstat (mu); 268s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 268s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/logistat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/logistat.m 268s ***** error logistat () 268s ***** error logistat (1) 268s ***** error logistat ({}, 2) 268s ***** error logistat (1, "") 268s ***** error logistat (i, 2) 268s ***** error logistat (1, i) 268s ***** error ... 268s logistat (ones (3), ones (2)) 268s ***** error ... 268s logistat (ones (2), ones (3)) 268s ***** test 268s [m, v] = logistat (0, 1); 268s assert (m, 0); 268s assert (v, 3.2899, 0.001); 268s ***** test 268s [m, v] = logistat (0, 0.8); 268s assert (m, 0); 268s assert (v, 2.1055, 0.001); 268s ***** test 268s [m, v] = logistat (1, 0.6); 268s assert (m, 1); 268s assert (v, 1.1844, 0.001); 268s ***** test 268s [m, v] = logistat (0, 0.4); 268s assert (m, 0); 268s assert (v, 0.5264, 0.001); 268s ***** test 268s [m, v] = logistat (-1, 0.2); 268s assert (m, -1); 268s assert (v, 0.1316, 0.001); 268s 13 tests, 13 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/loglstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/loglstat.m 268s ***** error loglstat () 268s ***** error loglstat (1) 268s ***** error loglstat ({}, 2) 268s ***** error loglstat (1, "") 268s ***** error loglstat (i, 2) 268s ***** error loglstat (1, i) 268s ***** error ... 268s loglstat (ones (3), ones (2)) 268s ***** error ... 268s loglstat (ones (2), ones (3)) 268s ***** test 268s [m, v] = loglstat (0, 1); 268s assert (m, Inf, 0.001); 268s assert (v, Inf, 0.001); 268s ***** test 268s [m, v] = loglstat (0, 0.8); 268s assert (m, 4.2758, 0.001); 268s assert (v, Inf, 0.001); 268s ***** test 268s [m, v] = loglstat (0, 0.6); 268s assert (m, 1.9820, 0.001); 268s assert (v, Inf, 0.001); 268s ***** test 268s [m, v] = loglstat (0, 0.4); 268s assert (m, 1.3213, 0.001); 268s assert (v, 2.5300, 0.001); 268s ***** test 268s [m, v] = loglstat (0, 0.2); 268s assert (m, 1.0690, 0.001); 268s assert (v, 0.1786, 0.001); 268s 13 tests, 13 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/normstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/normstat.m 268s ***** error normstat () 268s ***** error normstat (1) 268s ***** error normstat ({}, 2) 268s ***** error normstat (1, "") 268s ***** error normstat (i, 2) 268s ***** error normstat (1, i) 268s ***** error ... 268s normstat (ones (3), ones (2)) 268s ***** error ... 268s normstat (ones (2), ones (3)) 268s ***** test 268s mu = 1:6; 268s sigma = 0.2:0.2:1.2; 268s [m, v] = normstat (mu, sigma); 268s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 268s assert (m, mu); 268s assert (v, expected_v, 0.001); 268s ***** test 268s sigma = 0.2:0.2:1.2; 268s [m, v] = normstat (0, sigma); 268s expected_mn = [0, 0, 0, 0, 0, 0]; 268s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 268s assert (m, expected_mn, 0.001); 268s assert (v, expected_v, 0.001); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/nakastat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/nakastat.m 268s ***** error nakastat () 268s ***** error nakastat (1) 268s ***** error nakastat ({}, 2) 268s ***** error nakastat (1, "") 268s ***** error nakastat (i, 2) 268s ***** error nakastat (1, i) 268s ***** error ... 268s nakastat (ones (3), ones (2)) 268s ***** error ... 268s nakastat (ones (2), ones (3)) 268s ***** test 268s [m, v] = nakastat (1, 1); 268s assert (m, 0.8862269254, 1e-10); 268s assert (v, 0.2146018366, 1e-10); 268s ***** test 268s [m, v] = nakastat (1, 2); 268s assert (m, 1.25331413731, 1e-10); 268s assert (v, 0.42920367321, 1e-10); 268s ***** test 268s [m, v] = nakastat (2, 1); 268s assert (m, 0.93998560299, 1e-10); 268s assert (v, 0.11642706618, 1e-10); 268s 11 tests, 11 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/gamstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/gamstat.m 268s ***** error gamstat () 268s ***** error gamstat (1) 268s ***** error gamstat ({}, 2) 268s ***** error gamstat (1, "") 268s ***** error gamstat (i, 2) 268s ***** error gamstat (1, i) 268s ***** error ... 268s gamstat (ones (3), ones (2)) 268s ***** error ... 268s gamstat (ones (2), ones (3)) 268s ***** test 268s a = 1:6; 268s b = 1:0.2:2; 268s [m, v] = gamstat (a, b); 268s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 268s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s ***** test 268s a = 1:6; 268s [m, v] = gamstat (a, 1.5); 268s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 268s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/ncx2stat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/ncx2stat.m 268s ***** error ncx2stat () 268s ***** error ncx2stat (1) 268s ***** error ncx2stat ({}, 2) 268s ***** error ncx2stat (1, "") 268s ***** error ncx2stat (i, 2) 268s ***** error ncx2stat (1, i) 268s ***** error ... 268s ncx2stat (ones (3), ones (2)) 268s ***** error ... 268s ncx2stat (ones (2), ones (3)) 268s ***** shared df, d1 268s df = [2, 0, -1, 1, 4]; 268s d1 = [1, NaN, 3, -1, 2]; 268s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 268s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 268s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 268s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 268s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 268s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 268s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 268s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 268s 16 tests, 16 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/ricestat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/ricestat.m 268s ***** error ricestat () 268s ***** error ricestat (1) 268s ***** error ricestat ({}, 2) 268s ***** error ricestat (1, "") 268s ***** error ricestat (i, 2) 268s ***** error ricestat (1, i) 268s ***** error ... 268s ricestat (ones (3), ones (2)) 268s ***** error ... 268s ricestat (ones (2), ones (3)) 268s ***** shared s, sigma 268s s = [2, 0, -1, 1, 4]; 268s sigma = [1, NaN, 3, -1, 2]; 268s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 268s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 268s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 268s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 268s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 268s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 268s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 268s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 268s 16 tests, 16 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/unifstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/unifstat.m 268s ***** error unifstat () 268s ***** error unifstat (1) 268s ***** error unifstat ({}, 2) 268s ***** error unifstat (1, "") 268s ***** error unifstat (i, 2) 268s ***** error unifstat (1, i) 268s ***** error ... 268s unifstat (ones (3), ones (2)) 268s ***** error ... 268s unifstat (ones (2), ones (3)) 268s ***** test 268s a = 1:6; 268s b = 2:2:12; 268s [m, v] = unifstat (a, b); 268s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 268s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s ***** test 268s a = 1:6; 268s [m, v] = unifstat (a, 10); 268s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 268s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/burrstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/burrstat.m 268s ***** error burrstat () 268s ***** error burrstat (1) 268s ***** error burrstat (1, 2) 268s ***** error burrstat ({}, 2, 3) 268s ***** error burrstat (1, "", 3) 268s ***** error burrstat (1, 2, "") 268s ***** error burrstat (i, 2, 3) 268s ***** error burrstat (1, i, 3) 268s ***** error burrstat (1, 2, i) 268s ***** error ... 268s burrstat (ones (3), ones (2), 3) 268s ***** error ... 268s burrstat (ones (2), 2, ones (3)) 268s ***** error ... 268s burrstat (1, ones (2), ones (3)) 268s ***** test 268s [m, v] = burrstat (1, 2, 5); 268s assert (m, 0.4295, 1e-4); 268s assert (v, 0.0655, 1e-4); 268s ***** test 268s [m, v] = burrstat (1, 1, 1); 268s assert (m, Inf); 268s assert (v, Inf); 268s ***** test 268s [m, v] = burrstat (2, 4, 1); 268s assert (m, 2.2214, 1e-4); 268s assert (v, 1.3484, 1e-4); 268s 15 tests, 15 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/chi2stat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/chi2stat.m 268s ***** error chi2stat () 268s ***** error chi2stat ({}) 268s ***** error chi2stat ("") 268s ***** error chi2stat (i) 268s ***** test 268s df = 1:6; 268s [m, v] = chi2stat (df); 268s assert (m, df); 268s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 268s 5 tests, 5 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/tristat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/tristat.m 268s ***** error tristat () 268s ***** error tristat (1) 268s ***** error tristat (1, 2) 268s ***** error tristat ("i", 2, 1) 268s ***** error tristat (0, "d", 1) 268s ***** error tristat (0, 3, {}) 268s ***** error tristat (i, 2, 1) 268s ***** error tristat (0, i, 1) 268s ***** error tristat (0, 3, i) 268s ***** test 268s a = 1:5; 268s b = 3:7; 268s c = 5:9; 268s [m, v] = tristat (a, b, c); 268s expected_m = [3, 4, 5, 6, 7]; 268s assert (m, expected_m); 268s assert (v, ones (1, 5) * (2/3)); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/plstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/plstat.m 268s ***** shared x, Fx 268s x = [0, 1, 3, 4, 7, 10]; 268s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 268s ***** assert (plstat (x, Fx), 4.15) 268s ***** test 268s [m, v] = plstat (x, Fx); 268s assert (v, 10.3775, 1e-14) 268s ***** error plstat () 268s ***** error plstat (1) 268s ***** error ... 268s plstat ([0, 1, 2], [0, 1]) 268s ***** error ... 268s plstat ([0], [1]) 268s ***** error ... 268s plstat ([0, 1, 2], [0, 1, 1.5]) 268s ***** error ... 268s plstat ([0, 1, 2], [0, i, 1]) 268s ***** error ... 268s plstat ([0, i, 2], [0, 0.5, 1]) 268s ***** error ... 268s plstat ([0, i, 2], [0, 0.5i, 1]) 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/bisastat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/bisastat.m 268s ***** error bisastat () 268s ***** error bisastat (1) 268s ***** error bisastat ({}, 2) 268s ***** error bisastat (1, "") 268s ***** error bisastat (i, 2) 268s ***** error bisastat (1, i) 268s ***** error ... 268s bisastat (ones (3), ones (2)) 268s ***** error ... 268s bisastat (ones (2), ones (3)) 268s ***** test 268s beta = 1:6; 268s gamma = 1:0.2:2; 268s [m, v] = bisastat (beta, gamma); 268s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 268s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 268s assert (m, expected_m, 1e-2); 268s assert (v, expected_v, 1e-3); 268s ***** test 268s beta = 1:6; 268s [m, v] = bisastat (beta, 1.5); 268s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 268s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 268s assert (m, expected_m, 1e-3); 268s assert (v, expected_v, 1e-4); 268s 10 tests, 10 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/binostat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/binostat.m 268s ***** error binostat () 268s ***** error binostat (1) 268s ***** error binostat ({}, 2) 268s ***** error binostat (1, "") 268s ***** error binostat (i, 2) 268s ***** error binostat (1, i) 268s ***** error ... 268s binostat (ones (3), ones (2)) 268s ***** error ... 268s binostat (ones (2), ones (3)) 268s ***** test 268s n = 1:6; 268s ps = 0:0.2:1; 268s [m, v] = binostat (n, ps); 268s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 268s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s ***** test 268s n = 1:6; 268s [m, v] = binostat (n, 0.5); 268s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 268s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 268s assert (m, expected_m, 0.001); 268s assert (v, expected_v, 0.001); 268s ***** test 268s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 268s [m, v] = binostat (n, 0.5); 268s assert (isnan (m), [true true false true false true false false]) 268s assert (isnan (v), [true true false true false true false false]) 268s assert (m(end), Inf); 268s assert (v(end), Inf); 268s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 268s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 268s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 268s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 268s 15 tests, 15 passed, 0 known failure, 0 skipped 268s [inst/dist_stat/tlsstat.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_stat/tlsstat.m 268s ***** error tlsstat () 268s ***** error tlsstat (1) 268s ***** error tlsstat (1, 2) 268s ***** error tlsstat ({}, 2, 3) 268s ***** error tlsstat (1, "", 3) 268s ***** error tlsstat (1, 2, ["d"]) 268s ***** error tlsstat (i, 2, 3) 268s ***** error tlsstat (1, i, 3) 268s ***** error tlsstat (1, 2, i) 268s ***** error ... 268s tlsstat (ones (3), ones (2), 1) 268s ***** error ... 268s tlsstat (ones (2), 1, ones (3)) 268s ***** error ... 268s tlsstat (1, ones (2), ones (3)) 268s ***** test 268s [m, v] = tlsstat (0, 1, 0); 268s assert (m, NaN); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (0, 1, 1); 268s assert (m, NaN); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (2, 1, 1); 268s assert (m, NaN); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (-2, 1, 1); 268s assert (m, NaN); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (0, 1, 2); 268s assert (m, 0); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (2, 1, 2); 268s assert (m, 2); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (-2, 1, 2); 268s assert (m, -2); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (0, 2, 2); 268s assert (m, 0); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (2, 2, 2); 268s assert (m, 2); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (-2, 2, 2); 268s assert (m, -2); 268s assert (v, NaN); 268s ***** test 268s [m, v] = tlsstat (0, 1, 3); 268s assert (m, 0); 268s assert (v, 3); 268s ***** test 268s [m, v] = tlsstat (0, 2, 3); 268s assert (m, 0); 268s assert (v, 6); 268s ***** test 268s [m, v] = tlsstat (2, 1, 3); 268s assert (m, 2); 268s assert (v, 3); 268s ***** test 268s [m, v] = tlsstat (2, 2, 3); 268s assert (m, 2); 268s assert (v, 6); 268s ***** test 268s [m, v] = tlsstat (-2, 1, 3); 268s assert (m, -2); 268s assert (v, 3); 268s ***** test 268s [m, v] = tlsstat (-2, 2, 3); 268s assert (m, -2); 268s assert (v, 6); 268s 28 tests, 28 passed, 0 known failure, 0 skipped 268s [inst/logit.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/logit.m 268s ***** test 268s p = [0.01:0.01:0.99]; 268s assert (logit (p), log (p ./ (1-p)), 25*eps); 268s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 268s ***** error logit () 268s ***** error logit (1, 2) 268s 4 tests, 4 passed, 0 known failure, 0 skipped 268s [inst/rangesearch.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/rangesearch.m 268s ***** demo 268s ## Generate 1000 random 2D points from each of five distinct multivariate 268s ## normal distributions that form five separate classes 268s N = 1000; 268s d = 10; 268s randn ("seed", 5); 268s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 268s randn ("seed", 6); 268s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 268s randn ("seed", 7); 268s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 268s randn ("seed", 8); 268s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 268s randn ("seed", 8); 268s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 268s X = [X1; X2; X3; X4; X5]; 268s 268s ## For each point in X, find the points in X that are within a radius d 268s ## away from the points in X. 268s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 268s 268s ## Select the first point in X (corresponding to the first class) and find 268s ## its nearest neighbors within the radius d. Display these points in 268s ## one color and the remaining points in a different color. 268s x = X(1,:); 268s nearestPoints = X (Idx{1},:); 268s nonNearestIdx = true (size (X, 1), 1); 268s nonNearestIdx(Idx{1}) = false; 268s 268s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 268s hold on 268s scatter (nearestPoints(:,1),nearestPoints(:,2)) 268s scatter (x(1), x(2), "black", "filled") 268s hold off 268s 268s ## Select the last point in X (corresponding to the fifth class) and find 268s ## its nearest neighbors within the radius d. Display these points in 268s ## one color and the remaining points in a different color. 268s x = X(end,:); 268s nearestPoints = X (Idx{1},:); 268s nonNearestIdx = true (size (X, 1), 1); 268s nonNearestIdx(Idx{1}) = false; 268s 268s figure 268s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 268s hold on 268s scatter (nearestPoints(:,1),nearestPoints(:,2)) 268s scatter (x(1), x(2), "black", "filled") 268s hold off 268s ***** shared x, y, X, Y 268s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 268s y = [2, 3, 4; 1, 4, 3]; 268s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 268s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 268s ***** test 268s [idx, D] = rangesearch (x, y, 4); 268s assert (idx, {[1; 4; 2]; [1; 4]}); 268s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 268s assert (idx, {[1, 4, 2]; [1, 4]}); 268s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 268s assert (idx, {[1; 4; 2]; [1; 4]}); 268s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 268s assert (idx, {[1; 4; 2]; [1; 4]}); 268s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 268s assert (idx, {[1; 2; 4]; [1; 4]}); 268s assert (D, {[1.7321; 3.4641; 3.3166]; [2; 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 268s "SortIndices", false); 268s assert (idx, {[1, 2, 4]; [1, 4]}); 268s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 268s ***** test 268s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 268s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 268s assert (idx, {[1, 4, 2]; [1, 4]}); 268s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 268s ***** test 268s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 268s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 268s "NSMethod", "exhaustive"); 268s assert (idx, {[1, 4, 2]; [1, 4]}); 268s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 268s "NSMethod", "exhaustive"); 268s assert (idx, {[1, 4, 2]; [1, 4]}); 268s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 268s "NSMethod", "exhaustive", "SortIndices", false); 268s assert (idx, {[1, 2, 4]; [1, 4]}); 268s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (X, Y, 4); 268s assert (idx, {[1; 2]; [1; 2; 3]}); 268s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (X, Y, 2); 268s assert (idx, {[1]; [1; 2]}); 268s assert (D, {[1.4142]; [1.4142; 1.4142]}, 1e-4); 268s ***** test 268s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 268s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 268s assert (idx, {[1, 2]; [1, 2, 3]}); 268s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 268s assert (idx, {[1; 2]; [1; 2; 3]}); 268s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 268s ***** test 268s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 268s "NSMethod", "exhaustive"); 268s assert (idx, {[1, 2]; [1, 2, 3]}); 268s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 268s ***** error rangesearch (1) 268s ***** error rangesearch (ones (4, 5)) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (4)) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (4), 1) 268s ***** error ... 268s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "P", -2) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 268s ***** error ... 268s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 268s 33 tests, 33 passed, 0 known failure, 0 skipped 268s [inst/boxplot.m] 268s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/boxplot.m 268s ***** demo 268s axis ([0, 3]); 268s randn ("seed", 1); # for reproducibility 268s girls = randn (10, 1) * 5 + 140; 268s randn ("seed", 2); # for reproducibility 268s boys = randn (13, 1) * 8 + 135; 268s boxplot ({girls, boys}); 268s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 268s title ("Grade 3 heights"); 268s ***** demo 268s randn ("seed", 7); # for reproducibility 268s A = randn (10, 1) * 5 + 140; 268s randn ("seed", 8); # for reproducibility 268s B = randn (25, 1) * 8 + 135; 268s randn ("seed", 9); # for reproducibility 268s C = randn (20, 1) * 6 + 165; 268s data = [A; B; C]; 268s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 268s labels = {"Team A", "Team B", "Team C"}; 268s pos = [2, 1, 3]; 268s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 268s "OutlierTags", "on", "BoxStyle", "filled"); 268s title ("Example of Group splitting with paired vectors"); 268s ***** demo 268s randn ("seed", 1); # for reproducibility 268s data = randn (100, 9); 268s boxplot (data, "notch", "on", "boxstyle", "filled", ... 268s "colors", "ygcwkmb", "whisker", 1.2); 268s title ("Example of different colors specified with characters"); 268s ***** demo 268s randn ("seed", 5); # for reproducibility 268s data = randn (100, 13); 268s colors = [0.7 0.7 0.7; ... 268s 0.0 0.4 0.9; ... 268s 0.7 0.4 0.3; ... 268s 0.7 0.1 0.7; ... 268s 0.8 0.7 0.4; ... 268s 0.1 0.8 0.5; ... 268s 0.9 0.9 0.2]; 268s boxplot (data, "notch", "on", "boxstyle", "filled", ... 268s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 268s title ("Example of different colors specified as RGB values"); 268s ***** error boxplot ("a") 268s ***** error boxplot ({[1 2 3], "a"}) 268s ***** error boxplot ([1 2 3], 1, {2, 3}) 268s ***** error boxplot ([1 2 3], {"a", "b"}) 268s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 268s ***** error boxplot ([1:10], "notch", i) 268s ***** error boxplot ([1:10], "notch", {}) 268s ***** error boxplot (1, "symbol", 1) 269s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 269s ***** error boxplot (1, "orientation", {}) 269s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 269s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 269s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 269s ***** error boxplot (3, "OutlierTags", {}) 269s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 269s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 269s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 269s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 269s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 269s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 269s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 269s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 269s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 269s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 269s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 269s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 269s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 269s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 269s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 269s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 269s ***** error boxplot (rand (3, 3), [1 2]) 269s ***** test 269s hf = figure ("visible", "off"); 269s unwind_protect 269s [a, b] = boxplot (rand (10, 3)); 269s assert (size (a), [7, 3]); 269s assert (numel (b.box), 3); 269s assert (numel (b.whisker), 12); 269s assert (numel (b.median), 3); 269s unwind_protect_cleanup 269s close (hf); 269s end_unwind_protect 269s ***** test 269s hf = figure ("visible", "off"); 269s unwind_protect 269s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 269s assert (numel (b.box_fill), 3); 269s unwind_protect_cleanup 269s close (hf); 269s end_unwind_protect 269s ***** test 269s hf = figure ("visible", "off"); 269s unwind_protect 269s hold on 269s [a, b] = boxplot (rand (10, 3)); 269s assert (ishold, true); 269s unwind_protect_cleanup 269s close (hf); 269s end_unwind_protect 269s 34 tests, 34 passed, 0 known failure, 0 skipped 269s [inst/multcompare.m] 269s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/multcompare.m 269s ***** demo 269s 269s ## Demonstration using balanced one-way ANOVA from anova1 269s 269s x = ones (50, 4) .* [-2, 0, 1, 5]; 269s randn ("seed", 1); # for reproducibility 269s x = x + normrnd (0, 2, 50, 4); 269s groups = {"A", "B", "C", "D"}; 269s [p, tbl, stats] = anova1 (x, groups, "off"); 269s multcompare (stats); 269s ***** demo 269s 269s ## Demonstration using unbalanced one-way ANOVA example from anovan 269s 269s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 269s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 269s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 269s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 269s 25.694 ]'; 269s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 269s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 269s 269s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 269s "ControlGroup", 1, "display", "on") 269s 269s ***** demo 269s 269s ## Demonstration using factorial ANCOVA example from anovan 269s 269s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 269s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 269s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 269s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 269s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 269s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 269s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 269s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 269s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 269s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 269s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 269s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 269s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 269s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 269s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 269s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 269s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 269s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 269s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 269s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 269s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 269s 269s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 269s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 269s "sstype", "h", "display", "off", "contrasts", ... 269s {"simple","poly",""}); 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 269s "display", "on") 269s 269s ***** demo 269s 269s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 269s ## squares to account for heteroskedasticity. 269s 269s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 269s 2, 2, 2, 2, 2, 2, 2, 2, ... 269s 3, 3, 3, 3, 3, 3, 3, 3]'; 269s 269s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 269s 10, 25, 66, 43, 47, 56, 6, 39, ... 269s 11, 39, 26, 35, 25, 14, 24, 17]'; 269s 269s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 269s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 269s b = polyfit (fitted, abs (STATS.resid), 1); 269s v = polyval (b, fitted); # Variance as a function of the fitted values 269s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 269s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 269s ***** demo 269s 269s ## Demonstration of p-value adjustments to control the false discovery rate 269s ## Data from Westfall (1997) JASA. 92(437):299-306 269s 269s p = [.005708; .023544; .024193; .044895; ... 269s .048805; .221227; .395867; .693051; .775755]; 269s 269s padj = multcompare(p,'ctype','fdr') 269s ***** test 269s 269s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 269s 269s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 269s 269s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 269s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 269s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 269s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 269s 25.694 ]'; 269s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 269s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 269s 269s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 269s "display", "off"); 269s assert (C(1,6), 2.85812420217898e-05, 1e-09); 269s assert (C(2,6), 5.22936741204085e-07, 1e-09); 269s assert (C(3,6), 2.12794763209146e-08, 1e-09); 269s assert (C(4,6), 7.82091664406946e-15, 1e-09); 269s assert (C(5,6), 0.546591417210693, 1e-09); 269s assert (C(6,6), 0.0845897945254446, 1e-09); 269s assert (C(7,6), 9.47436557975328e-08, 1e-09); 269s assert (C(8,6), 0.188873478781067, 1e-09); 269s assert (C(9,6), 4.08974010364197e-08, 1e-09); 269s assert (C(10,6), 4.44427348175241e-06, 1e-09); 269s assert (M(1,1), 10, 1e-09); 269s assert (M(2,1), 18, 1e-09); 269s assert (M(3,1), 19, 1e-09); 269s assert (M(4,1), 21.0001428571429, 1e-09); 269s assert (M(5,1), 29.0001111111111, 1e-09); 269s assert (M(1,2), 1.0177537954095, 1e-09); 269s assert (M(2,2), 1.28736803631001, 1e-09); 269s assert (M(3,2), 1.0177537954095, 1e-09); 269s assert (M(4,2), 1.0880245732889, 1e-09); 269s assert (M(5,2), 0.959547480416536, 1e-09); 269s 269s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 269s "display", "off"); 269s assert (C(1,6), 4.08303457454140e-05, 1e-09); 269s assert (C(2,6), 1.04587348240817e-06, 1e-09); 269s assert (C(3,6), 1.06397381604573e-07, 1e-09); 269s assert (C(4,6), 7.82091664406946e-14, 1e-09); 269s assert (C(5,6), 5.46591417210693e-01, 1e-09); 269s assert (C(6,6), 1.05737243156806e-01, 1e-09); 269s assert (C(7,6), 2.36859139493832e-07, 1e-09); 269s assert (C(8,6), 2.09859420867852e-01, 1e-09); 269s assert (C(9,6), 1.36324670121399e-07, 1e-09); 269s assert (C(10,6), 7.40712246958735e-06, 1e-09); 269s 269s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 269s "display", "off"); 269s assert (C(1,6), 1.14324968087159e-04, 1e-09); 269s assert (C(2,6), 3.13762044722451e-06, 1e-09); 269s assert (C(3,6), 1.91515286888231e-07, 1e-09); 269s assert (C(4,6), 7.82091664406946e-14, 1e-09); 269s assert (C(5,6), 5.46591417210693e-01, 1e-09); 269s assert (C(6,6), 2.53769383576334e-01, 1e-09); 269s assert (C(7,6), 6.63205590582730e-07, 1e-09); 269s assert (C(8,6), 3.77746957562134e-01, 1e-09); 269s assert (C(9,6), 3.27179208291358e-07, 1e-09); 269s assert (C(10,6), 2.22213674087620e-05, 1e-09); 269s 269s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 269s "display", "off"); 269s assert (C(1,6), 1.14324968087159e-04, 1e-09); 269s assert (C(2,6), 3.13762044722451e-06, 1e-09); 269s assert (C(3,6), 1.91515286888231e-07, 1e-09); 269s assert (C(4,6), 7.82091664406946e-14, 1e-09); 269s assert (C(5,6), 5.46591417210693e-01, 1e-09); 269s assert (C(6,6), 2.53769383576334e-01, 1e-09); 269s assert (C(7,6), 6.63205590582730e-07, 1e-09); 269s assert (C(8,6), 3.77746957562134e-01, 1e-09); 269s assert (C(9,6), 3.27179208291358e-07, 1e-09); 269s assert (C(10,6), 2.22213674087620e-05, 1e-09); 269s 269s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 269s "display", "off"); 269s assert (C(1,6), 0.00108105386141085, 1e-09); 269s assert (C(2,6), 2.7779386789517e-05, 1e-09); 269s assert (C(3,6), 1.3599854038198e-06, 1e-09); 269s assert (C(4,6), 7.58830197867751e-13, 1e-09); 269s assert (C(5,6), 0.984039948220281, 1e-09); 269s assert (C(6,6), 0.539077018557706, 1e-09); 269s assert (C(7,6), 5.59475764460574e-06, 1e-09); 269s assert (C(8,6), 0.771173490574105, 1e-09); 269s assert (C(9,6), 2.52838425729905e-06, 1e-09); 269s assert (C(10,6), 0.000200719143889168, 1e-09); 269s 269s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 269s 269s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 269s "display", "off"); 269s assert (C(1,6), 2.85812420217898e-04, 1e-09); 269s assert (C(2,6), 5.22936741204085e-06, 1e-09); 269s assert (C(3,6), 2.12794763209146e-07, 1e-09); 269s assert (C(4,6), 7.82091664406946e-14, 1e-09); 269s assert (C(5,6), 1.00000000000000e+00, 1e-09); 269s assert (C(6,6), 8.45897945254446e-01, 1e-09); 269s assert (C(7,6), 9.47436557975328e-07, 1e-09); 269s assert (C(8,6), 1.00000000000000e+00, 1e-09); 269s assert (C(9,6), 4.08974010364197e-07, 1e-09); 269s assert (C(10,6), 4.44427348175241e-05, 1e-09); 269s 269s ## Test for anova1 ("equal")- comparison of results from Matlab 269s 269s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 269s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 2.85812420217898e-05, 1e-09); 269s assert (C(2,6), 5.22936741204085e-07, 1e-09); 269s assert (C(3,6), 2.12794763209146e-08, 1e-09); 269s assert (C(4,6), 7.82091664406946e-15, 1e-09); 269s assert (C(5,6), 0.546591417210693, 1e-09); 269s assert (C(6,6), 0.0845897945254446, 1e-09); 269s assert (C(7,6), 9.47436557975328e-08, 1e-09); 269s assert (C(8,6), 0.188873478781067, 1e-09); 269s assert (C(9,6), 4.08974010364197e-08, 1e-09); 269s assert (C(10,6), 4.44427348175241e-06, 1e-09); 269s assert (M(1,1), 10, 1e-09); 269s assert (M(2,1), 18, 1e-09); 269s assert (M(3,1), 19, 1e-09); 269s assert (M(4,1), 21.0001428571429, 1e-09); 269s assert (M(5,1), 29.0001111111111, 1e-09); 269s assert (M(1,2), 1.0177537954095, 1e-09); 269s assert (M(2,2), 1.28736803631001, 1e-09); 269s assert (M(3,2), 1.0177537954095, 1e-09); 269s assert (M(4,2), 1.0880245732889, 1e-09); 269s assert (M(5,2), 0.959547480416536, 1e-09); 269s 269s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 269s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 269s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 0.001247025266382, 1e-09); 269s assert (C(2,6), 0.000018037115146, 1e-09); 269s assert (C(3,6), 0.000002974595187, 1e-09); 269s assert (C(4,6), 0.000000000786046, 1e-09); 269s assert (C(5,6), 0.5693192886650109, 1e-09); 269s assert (C(6,6), 0.110501699029776, 1e-09); 269s assert (C(7,6), 0.000131226488700, 1e-09); 269s assert (C(8,6), 0.1912101409715992, 1e-09); 269s assert (C(9,6), 0.000005385256394, 1e-09); 269s assert (C(10,6), 0.000074089106171, 1e-09); 269s ***** test 269s 269s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 269s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 269s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 269s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 269s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 269s "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 1.49311100811177e-05, 1e-09); 269s assert (C(2,6), 2.20506904243535e-07, 1e-09); 269s assert (C(3,6), 0.00449897860490058, 1e-09); 269s assert (M(1,1), 6.25, 1e-09); 269s assert (M(2,1), 4.75, 1e-09); 269s assert (M(3,1), 4, 1e-09); 269s assert (M(1,2), 0.152145154862547, 1e-09); 269s assert (M(2,2), 0.152145154862547, 1e-09); 269s assert (M(3,2), 0.152145154862547, 1e-09); 269s ***** test 269s 269s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 269s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 269s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 269s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 269s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 269s "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 0.000020799832702, 1e-09); 269s assert (C(2,6), 0.000000035812410, 1e-09); 269s assert (C(3,6), 0.003038942449215, 1e-09); 269s ***** test 269s 269s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 269s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 269s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 269s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 269s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 269s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 269s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 269s "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 0.261031111511073, 1e-09); 269s assert (C(2,6), 0.065879755907745, 1e-09); 269s assert (C(3,6), 0.241874613529270, 1e-09); 269s ***** shared visibility_setting 269s visibility_setting = get (0, "DefaultFigureVisible"); 269s ***** test 269s set (0, "DefaultFigureVisible", "off"); 269s 269s ## Test for kruskalwallis - comparison with results from MATLAB 269s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 269s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 269s group = [1:3] .* ones (10,3); 269s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 269s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 0.000163089828959986, 1e-09); 269s assert (C(2,6), 0.630298044801257, 1e-09); 269s assert (C(3,6), 0.00100567660695682, 1e-09); 269s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 269s assert (C(1,6), 0.000489269486879958, 1e-09); 269s assert (C(2,6), 1, 1e-09); 269s assert (C(3,6), 0.00301702982087047, 1e-09); 269s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 269s assert (C(1,6), 0.000819054880289573, 1e-09); 269s assert (C(2,6), 0.890628039849261, 1e-09); 269s assert (C(3,6), 0.00447816059021654, 1e-09); 269s set (0, "DefaultFigureVisible", visibility_setting); 269s ***** test 269s set (0, "DefaultFigureVisible", "off"); 269s ## Test for friedman - comparison with results from MATLAB 269s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 269s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 269s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 269s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 0.227424558028569, 1e-09); 269s assert (C(2,6), 0.0327204848315735, 1e-09); 269s assert (C(3,6), 0.353160353315988, 1e-09); 269s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 269s assert (C(1,6), 0.682273674085708, 1e-09); 269s assert (C(2,6), 0.0981614544947206, 1e-09); 269s assert (C(3,6), 1, 1e-09); 269s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 269s assert (C(1,6), 0.482657360384373, 1e-09); 269s assert (C(2,6), 0.102266573027672, 1e-09); 269s assert (C(3,6), 0.649836502233148, 1e-09); 269s set (0, "DefaultFigureVisible", visibility_setting); 269s ***** test 269s set (0, "DefaultFigureVisible", "off"); 269s ## Test for fitlm - same comparisons as for first anovan example 269s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 269s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 269s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 269s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 269s 25.694 ]'; 269s 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]'; 269s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 269s "contrasts","simple"); 269s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 269s assert (C(1,6), 2.85812420217898e-05, 1e-09); 269s assert (C(2,6), 5.22936741204085e-07, 1e-09); 269s assert (C(3,6), 2.12794763209146e-08, 1e-09); 269s assert (C(4,6), 7.82091664406946e-15, 1e-09); 269s assert (C(5,6), 0.546591417210693, 1e-09); 269s assert (C(6,6), 0.0845897945254446, 1e-09); 269s assert (C(7,6), 9.47436557975328e-08, 1e-09); 269s assert (C(8,6), 0.188873478781067, 1e-09); 269s assert (C(9,6), 4.08974010364197e-08, 1e-09); 269s assert (C(10,6), 4.44427348175241e-06, 1e-09); 269s assert (M(1,1), 10, 1e-09); 269s assert (M(2,1), 18, 1e-09); 269s assert (M(3,1), 19, 1e-09); 269s assert (M(4,1), 21.0001428571429, 1e-09); 269s assert (M(5,1), 29.0001111111111, 1e-09); 269s assert (M(1,2), 1.0177537954095, 1e-09); 269s assert (M(2,2), 1.28736803631001, 1e-09); 269s assert (M(3,2), 1.0177537954095, 1e-09); 269s assert (M(4,2), 1.0880245732889, 1e-09); 269s assert (M(5,2), 0.959547480416536, 1e-09); 269s set (0, "DefaultFigureVisible", visibility_setting); 270s ***** test 270s ## Test p-value adjustments compared to R stats package function p.adjust 270s ## Data from Westfall (1997) JASA. 92(437):299-306 270s p = [.005708; .023544; .024193; .044895; ... 270s .048805; .221227; .395867; .693051; .775755]; 270s padj = multcompare (p); 270s assert (padj(1), 0.051372, 1e-06); 270s assert (padj(2), 0.188352, 1e-06); 270s assert (padj(3), 0.188352, 1e-06); 270s assert (padj(4), 0.269370, 1e-06); 270s assert (padj(5), 0.269370, 1e-06); 270s assert (padj(6), 0.884908, 1e-06); 270s assert (padj(7), 1.000000, 1e-06); 270s assert (padj(8), 1.000000, 1e-06); 270s assert (padj(9), 1.000000, 1e-06); 270s padj = multcompare(p,'ctype','holm'); 270s assert (padj(1), 0.051372, 1e-06); 270s assert (padj(2), 0.188352, 1e-06); 270s assert (padj(3), 0.188352, 1e-06); 270s assert (padj(4), 0.269370, 1e-06); 270s assert (padj(5), 0.269370, 1e-06); 270s assert (padj(6), 0.884908, 1e-06); 270s assert (padj(7), 1.000000, 1e-06); 270s assert (padj(8), 1.000000, 1e-06); 270s assert (padj(9), 1.000000, 1e-06); 270s padj = multcompare(p,'ctype','hochberg'); 270s assert (padj(1), 0.051372, 1e-06); 270s assert (padj(2), 0.169351, 1e-06); 270s assert (padj(3), 0.169351, 1e-06); 270s assert (padj(4), 0.244025, 1e-06); 270s assert (padj(5), 0.244025, 1e-06); 270s assert (padj(6), 0.775755, 1e-06); 270s assert (padj(7), 0.775755, 1e-06); 270s assert (padj(8), 0.775755, 1e-06); 270s assert (padj(9), 0.775755, 1e-06); 270s padj = multcompare(p,'ctype','fdr'); 270s assert (padj(1), 0.0513720, 1e-07); 270s assert (padj(2), 0.0725790, 1e-07); 270s assert (padj(3), 0.0725790, 1e-07); 270s assert (padj(4), 0.0878490, 1e-07); 270s assert (padj(5), 0.0878490, 1e-07); 270s assert (padj(6), 0.3318405, 1e-07); 270s assert (padj(7), 0.5089719, 1e-07); 270s assert (padj(8), 0.7757550, 1e-07); 270s assert (padj(9), 0.7757550, 1e-07); 270s 8 tests, 8 passed, 0 known failure, 0 skipped 270s [inst/vartestn.m] 270s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/vartestn.m 270s ***** demo 270s ## Test the null hypothesis that the variances are equal across the five 270s ## columns of data in the students’ exam grades matrix, grades. 270s 270s load examgrades 270s vartestn (grades) 270s ***** demo 270s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 270s ## equal across different model years. 270s 270s load carsmall 270s vartestn (MPG, Model_Year) 270s ***** demo 270s ## Use Levene’s test to test the null hypothesis that the variances in miles 270s ## per gallon (MPG) are equal across different model years. 270s 270s load carsmall 270s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 270s ***** demo 270s ## Test the null hypothesis that the variances are equal across the five 270s ## columns of data in the students’ exam grades matrix, grades, using the 270s ## Brown-Forsythe test. Suppress the display of the summary table of 270s ## statistics and the box plot. 270s 270s load examgrades 270s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 270s ***** error vartestn (); 270s ***** error vartestn (1); 270s ***** error ... 270s vartestn ([1, 2, 3, 4, 5, 6, 7]); 270s ***** error ... 270s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 270s ***** error ... 270s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 270s ***** error ... 270s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 270s ***** error ... 270s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 270s ***** error ... 270s vartestn (ones (50,3), "Display", "some"); 270s ***** error ... 270s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 270s ***** error ... 270s vartestn (ones (50,3), [], "som"); 270s ***** error ... 270s vartestn (ones (50,3), [], "some", "some"); 270s ***** error ... 270s vartestn (ones (50,3), [1, 2], "Display", "off"); 270s ***** test 270s load examgrades 270s [p, stat] = vartestn (grades, "Display", "off"); 270s assert (p, 7.908647337018238e-08, 1e-14); 270s assert (stat.chisqstat, 38.7332, 1e-4); 270s assert (stat.df, 4); 270s ***** test 270s load examgrades 270s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 270s assert (p, 9.523239714592791e-07, 1e-14); 270s assert (stat.fstat, 8.5953, 1e-4); 270s assert (stat.df, [4, 595]); 270s ***** test 270s load examgrades 270s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 270s assert (p, 7.219514351897161e-07, 1e-14); 270s assert (stat.fstat, 8.7503, 1e-4); 270s assert (stat.df, [4, 595]); 270s ***** test 270s load examgrades 270s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 270s assert (p, 1.312093241723211e-06, 1e-14); 270s assert (stat.fstat, 8.4160, 1e-4); 270s assert (stat.df, [4, 595]); 270s ***** test 270s load examgrades 270s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 270s assert (p, 8.235660885480556e-07, 1e-14); 270s assert (stat.fstat, 8.6766, 1e-4); 270s assert (stat.df, [4, 595]); 270s 17 tests, 17 passed, 0 known failure, 0 skipped 270s [inst/sampsizepwr.m] 270s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/sampsizepwr.m 270s ***** demo 270s ## Compute the mean closest to 100 that can be determined to be 270s ## significantly different from 100 using a t-test with a sample size 270s ## of 60 and a power of 0.8. 270s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 270s disp (mu1); 270s ***** demo 270s ## Compute the sample sizes required to distinguish mu0 = 100 from 270s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 270s ## smaller sample sizes of 1.5 and a power of 0.6. 270s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 270s ***** demo 270s ## Compute the sample size N required to distinguish p=.26 from p=.2 270s ## with a binomial test. The result is approximate, so make a plot to 270s ## see if any smaller N values also have the required power of 0.6. 270s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 270s nn = 1:250; 270s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 270s Nexact = min (nn(pwr >= 0.6)); 270s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 270s grid on 270s ***** demo 270s ## The company must test 52 bottles to detect the difference between a mean 270s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 270s ## to visualize how the sample size affects the power of the test. 270s 270s nout = sampsizepwr('t',[100 5],102,0.80); 270s nn = 1:100; 270s pwrout = sampsizepwr('t',[100 5],102,[],nn); 270s 270s figure; 270s plot (nn, pwrout, "b-", nout, 0.8, "ro") 270s title ("Power versus Sample Size") 270s xlabel ("Sample Size") 270s ylabel ("Power") 270s ***** error ... 270s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("z", 100, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("t", 100, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("t2", 60, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 270s ***** error ... 270s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("var", 0, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("var", -5, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("p", 0, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", -1, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", 0, [], 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 270s ***** error ... 270s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], [], [], 60); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], 110, [], []); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 270s ***** error ... 270s out = sampsizepwr ("var", 5, -1, [], 60); 270s ***** error ... 270s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 270s ***** error ... 270s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 270s ***** error ... 270s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], 110, 1.2); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], 110, 0); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 270s ***** error ... 270s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 270s ***** error ... 270s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 270s ***** error ... 270s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 270s ***** error ... 270s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 270s ***** warning ... 270s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 270s ***** warning ... 270s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 270s ***** test 270s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 270s assert (mu1, 103.67704316, 1e-8); 271s ***** test 271s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 271s assert (N1, 9); 271s assert (N2, 14); 271s ***** test 271s nn = 1:250; 271s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 271s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 271s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 271s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 271s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 271s ***** test 271s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 271s assert (nout, 52); 271s ***** test 271s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 271s assert (power, 0.5797373588621888, 1e-14); 271s ***** test 271s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 271s assert (nout, 18); 271s ***** test 271s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 271s assert (p1out, 25.65317979360237, 2e-14); 272s ***** test 272s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 272s assert (pwr, 0.716504004686586, 1e-14); 272s ***** test 272s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 272s assert (n, 11); 272s ***** test 272s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 272s assert ([n1, n2], [8, 16]); 273s 68 tests, 68 passed, 0 known failure, 0 skipped 273s [inst/crosstab.m] 273s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/crosstab.m 273s ***** error crosstab () 273s ***** error crosstab (1) 273s ***** error crosstab (ones (2), [1 1]) 273s ***** error crosstab ([1 1], ones (2)) 273s ***** error crosstab ([1], [1 2]) 273s ***** error crosstab ([1 2], [1]) 273s ***** test 273s load carbig 273s [table, chisq, p, labels] = crosstab (cyl4, when, org); 273s assert (table(2,3,1), 38); 273s assert (labels{3,3}, "Japan"); 273s ***** test 273s load carbig 273s [table, chisq, p, labels] = crosstab (cyl4, when, org); 273s assert (table(2,3,2), 17); 273s assert (labels{1,3}, "USA"); 273s ***** test 273s x = [1, 1, 2, 3, 1]; 273s y = [1, 2, 5, 3, 1]; 273s t = crosstab (x, y); 273s assert (t, [2, 1, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0]); 273s ***** test 273s x = [1, 1, 2, 3, 1]; 273s y = [1, 2, 3, 5, 1]; 273s t = crosstab (x, y); 273s assert (t, [2, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1]); 273s ***** test 273s x1 = [1, 3, 7, 7, 8]; 273s x2 = [4, 2, 1, 1, 1]; 273s x3 = [6, 2, 6, 2, NaN]; 273s T1 = [0, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 0]; 273s T2 = [0, 0, 1; 0, 0, 0; 1, 0, 0; 0, 0, 0]; 273s T = zeros (4, 3, 2); 273s T(:,:,1) = T1; 273s T(:,:,2) = T2; 273s t = crosstab (x1, x2, x3); 273s assert (t, T); 273s ***** test 273s x = [1, 2, NaN, 1]; 273s y = [1, 2, 3, NaN]; 273s t = crosstab (x, y); 273s assert (t, [1, 0, 0; 0, 1, 0]); 273s 12 tests, 12 passed, 0 known failure, 0 skipped 273s [inst/fitcsvm.m] 273s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitcsvm.m 273s ***** demo 273s ## Use a subset of Fisher's iris data set 273s 273s load fisheriris 273s inds = ! strcmp (species, 'setosa'); 273s X = meas(inds, [3,4]); 273s Y = species(inds); 273s 273s ## Train a linear SVM classifier 273s SVMModel = fitcsvm (X, Y) 273s 273s ## Plot a scatter diagram of the data and circle the support vectors. 273s sv = SVMModel.SupportVectors; 273s figure 273s gscatter (X(:,1), X(:,2), Y) 273s hold on 273s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 273s legend ('versicolor', 'virginica', 'Support Vector') 273s hold off 273s ***** test 273s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 273s y = {"a"; "a"; "b"; "b"}; 273s a = fitcsvm (x, y); 273s assert (class (a), "ClassificationSVM"); 273s assert ({a.X, a.Y}, {x, y}) 273s assert (a.NumObservations, 4) 273s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 273s assert (a.ModelParameters.SVMtype, "c_svc") 273s assert (a.ClassNames, {"a"; "b"}) 273s ***** test 273s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 273s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 273s a = fitcsvm (x, y); 273s assert (class (a), "ClassificationSVM"); 273s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 273s assert (a.ModelParameters.BoxConstraint, 1) 273s assert (a.ModelParameters.KernelOffset, 0) 273s assert (a.ClassNames, [1; -1]) 273s ***** test 273s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 273s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 273s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 273s "KernelOffset", 2); 273s assert (class (a), "ClassificationSVM"); 273s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 273s assert (a.ModelParameters.BoxConstraint, 2) 273s assert (a.ModelParameters.KernelOffset, 2) 273s assert (isempty (a.Alpha), true) 273s assert (isempty (a.Beta), false) 273s ***** test 273s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 273s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 273s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 273s assert (class (a), "ClassificationSVM"); 273s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 273s assert (a.ModelParameters.PolynomialOrder, 3) 273s assert (isempty (a.Alpha), true) 273s assert (isempty (a.Beta), false) 273s ***** test 273s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 273s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 273s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 273s assert (class (a), "ClassificationSVM"); 273s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 273s assert (a.ModelParameters.PolynomialOrder, 3) 273s assert (isempty (a.Alpha), false) 273s assert (isempty (a.Beta), true) 273s ***** test 273s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 273s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 273s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 273s assert (class (a), "ClassificationPartitionedModel"); 273s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 273s assert (a.ModelParameters.PolynomialOrder, 3) 273s assert (isempty (a.Trained{1}.Alpha), false) 273s assert (isempty (a.Trained{1}.Beta), true) 273s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 273s warning: called from 273s cvpartition at line 764 column 19 273s crossval at line 1300 column 9 273s fitcsvm at line 284 column 7 273s __test__ at line 5 column 2 273s test at line 685 column 11 273s /tmp/tmp.YdhB1UcfDH at line 558 column 2 273s 273s ***** error fitcsvm () 273s ***** error fitcsvm (ones (4,1)) 273s ***** error 273s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 273s ***** error 273s fitcsvm (ones (4,2), ones (3, 1)) 273s ***** error 273s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 273s ***** error 273s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 273s ***** error 273s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 273s ***** error ... 273s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 273s 14 tests, 14 passed, 0 known failure, 0 skipped 273s [inst/multiway.m] 273s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/multiway.m 273s ***** test 273s numbers = [4, 5, 6, 7, 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 273s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 273s ***** test 273s numbers = [1, 2, 3, 4, 5, 6]; 273s num_parts = 3; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 273s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 273s ***** test 273s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 273s num_parts = 3; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 273s assert (sort (cellfun (@sum, partition)), sort ([38, 38, 37])); 273s ***** test 273s numbers = [10, 10, 10]; 273s num_parts = 3; 273s [~, partition] = multiway (numbers, num_parts, "completeKK"); 273s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 273s ***** test 273s numbers = 1:10; 273s num_parts = 2; 273s [~, partition] = multiway (numbers, num_parts, "completeKK"); 273s assert (sort (cellfun (@sum, partition)), [27, 28]); 273s ***** test 273s numbers = [4, 5, 6, 7, 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 273s ***** test 273s numbers = [1, 2, 3, 4, 5, 6]; 273s num_parts = 3; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 273s ***** test 273s numbers = [10, 7, 5, 5, 6, 4, 10, 11, 12, 9, 10, 4, 3, 4, 5]; 273s num_parts = 4; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), sort ([27, 27, 27, 24])); 273s ***** test 273s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 273s num_parts = 3; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), sort ([35, 37, 41])); 273s ***** test 273s numbers = [10, 10, 10]; 273s num_parts = 3; 273s [~, partition] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 273s ***** test 273s numbers = 1:10; 273s num_parts = 2; 273s [~, partition] = multiway (numbers, num_parts, "greedy"); 273s assert (sort (cellfun (@sum, partition)), [27, 28]); 273s ***** test 273s grpidx_ckk = multiway ([3 2 4 3 9 3 64], 3); 273s grpidx_greedy = multiway ([3 2 4 3 9 3 64], 3, 'greedy'); 273s assert (isequal (grpidx_ckk, grpidx_greedy), false); 273s ***** test 273s numbers = [4; 5; 6; 7; 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 273s assert (iscolumn (groupindex), true) 273s assert (iscolumn (groupsizes), true); 273s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 273s numbers = [4; 5; 6; 7; 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (iscolumn (groupindex), true) 273s assert (iscolumn (groupsizes), true); 273s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 273s ***** test 273s numbers = [4, 5, 6, 7, 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 273s assert (isrow (groupindex), true) 273s assert (isrow (groupsizes), true); 273s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 273s ***** test 273s numbers = [4, 5, 6, 7, 8]; 273s num_parts = 2; 273s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 273s assert (isrow (groupindex), true) 273s assert (isrow (groupsizes), true); 273s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 273s ***** error multiway () 273s ***** error multiway ([1, 2]) 273s ***** error ... 273s multiway ([1, 2, 3], 2, 1) 273s ***** error multiway ([], 2) 273s ***** error multiway (ones (2, 2), 2) 273s ***** error ... 273s multiway ({1, 2, 3}, 2) 273s ***** error multiway ([1, -2, 3], 2) 273s ***** error ... 273s multiway ([1, 2, NaN], 2) 273s ***** error multiway ([1,2,3], [1,2]) 273s ***** error ... 273s multiway ([1, 2, 3], "2") 273s ***** error multiway ([1, 2, 3], 0) 273s ***** error multiway ([1, 2, 3], 1.5) 273s ***** error multiway ([1, 2, 3], -1) 273s ***** error ... 273s multiway ([1, 2], 3) 273s ***** error ... 273s multiway ([1,2,3], 2, "greedyalgo") 274s 30 tests, 30 passed, 0 known failure, 0 skipped 274s [inst/wblplot.m] 274s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/wblplot.m 274s ***** demo 274s x = [16 34 53 75 93 120]; 274s wblplot (x); 274s ***** demo 274s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 274s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 274s [h, p] = wblplot (x, c); 274s p 274s ***** demo 274s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 274s [h, p] = wblplot (x, [], [], 0.05); 274s p 274s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 274s ***** demo 274s x = [46 64 83 105 123 150 150]; 274s c = [0 0 0 0 0 0 1]; 274s f = [1 1 1 1 1 1 4]; 274s wblplot (x, c, f, 0.05); 274s ***** demo 274s x = [46 64 83 105 123 150 150]; 274s c = [0 0 0 0 0 0 1]; 274s f = [1 1 1 1 1 1 4]; 274s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 274s wblplot (x - 30.92, c, f, 0.05); 274s ***** test 274s hf = figure ("visible", "off"); 274s unwind_protect 274s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 274s [h, p] = wblplot (x, [], [], 0.05); 274s assert (numel (h), 4) 274s assert (p(1), 146.2545, 1E-4) 274s assert (p(2), 1.1973, 1E-4) 274s assert (p(3), 0.9999, 5E-5) 274s unwind_protect_cleanup 274s close (hf); 274s end_unwind_protect 274s 1 test, 1 passed, 0 known failure, 0 skipped 274s [inst/cholcov.m] 274s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cholcov.m 274s ***** demo 274s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 274s T = cholcov (C1) 274s C2 = T'*T 274s ***** test 274s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 274s T = cholcov (C1); 274s assert (C1, T'*T, 1e-15 * ones (size (C1))); 274s 1 test, 1 passed, 0 known failure, 0 skipped 274s [inst/standardizeMissing.m] 274s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/standardizeMissing.m 274s ***** assert (standardizeMissing (1, 1), NaN) 274s ***** assert (standardizeMissing (1, 0), 1) 274s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 274s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 274s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 274s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 274s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 274s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 274s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 274s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 274s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 274s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 274s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 274s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 274s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 274s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 274s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 274s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 274s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 274s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 274s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 274s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 274s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 274s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 274s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 274s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 274s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 274s ***** assert (standardizeMissing (single (1), true), single (NaN)) 274s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 274s ***** assert (standardizeMissing (true, true), true) 274s ***** assert (standardizeMissing (true, 1), true) 274s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 274s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 274s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 274s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 274s ***** error standardizeMissing (); 274s ***** error standardizeMissing (1); 274s ***** error standardizeMissing (1,2,3); 274s ***** error standardizeMissing ({'abc', 1}, 1); 274s ***** error standardizeMissing (struct ('a','b'), 1); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 274s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 274s 49 tests, 49 passed, 0 known failure, 0 skipped 274s [inst/fitcgam.m] 274s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitcgam.m 274s ***** demo 274s ## Train a GAM classifier for binary classification 274s ## using specific data and plot the decision boundaries. 274s 274s ## Define specific data 274s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 274s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 274s Y = [0; 0; 0; 0; 0; ... 274s 1; 1; 1; 1; 1]; 274s 274s ## Train the GAM model 274s obj = fitcgam (X, Y, "Interactions", "all"); 274s 274s ## Create a grid of values for prediction 274s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 274s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 274s [x1G, x2G] = meshgrid (x1, x2); 274s XGrid = [x1G(:), x2G(:)]; 274s pred = predict (obj, XGrid); 274s 274s ## Plot decision boundaries and data points 274s predNumeric = str2double (pred); 274s gidx = predNumeric > 0.5; 274s 274s figure 274s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 274s hold on 274s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 274s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 274s xlabel("Feature 1"); 274s ylabel("Feature 2"); 274s title("Generalized Additive Model (GAM) Decision Boundary"); 274s legend({"Class 1 Region", "Class 0 Region", ... 274s "Class 1 Samples", "Class 0 Samples"}, ... 274s "location", "northwest") 274s axis tight 274s hold off 274s ***** test 274s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 274s y = [0; 0; 1; 1]; 274s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 274s a = fitcgam (x, y, "PredictorNames", PredictorNames); 274s assert (class (a), "ClassificationGAM"); 274s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 274s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 274s assert (a.ClassNames, {'0'; '1'}) 274s assert (a.PredictorNames, PredictorNames) 274s assert (a.BaseModel.Intercept, 0) 276s ***** test 276s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 276s y = [1; 0; 1; 0; 1]; 276s a = fitcgam (x, y, "interactions", "all"); 276s assert (class (a), "ClassificationGAM"); 276s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 276s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 276s assert (a.ClassNames, {'1'; '0'}) 276s assert (a.PredictorNames, {'x1', 'x2'}) 276s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 278s ***** test 278s load fisheriris 278s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 278s X = meas(inds, :); 278s Y = species(inds, :)'; 278s Y = strcmp (Y, 'virginica')'; 278s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 278s assert (class (a), "ClassificationGAM"); 278s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 278s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 278s assert (a.ClassNames, {'0'; '1'}) 278s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 278s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 278s assert (a.ModelwInt.Intercept, 0) 283s ***** error fitcgam () 283s ***** error fitcgam (ones (4,1)) 283s ***** error 283s fitcgam (ones (4,2), ones (4, 1), "K") 283s ***** error 283s fitcgam (ones (4,2), ones (3, 1)) 283s ***** error 283s fitcgam (ones (4,2), ones (3, 1), "K", 2) 283s 8 tests, 8 passed, 0 known failure, 0 skipped 283s [inst/manovacluster.m] 283s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/manovacluster.m 283s ***** demo 283s load carbig 283s X = [MPG Acceleration Weight Displacement]; 283s [d, p, stats] = manova1 (X, Origin); 283s manovacluster (stats) 283s ***** test 283s hf = figure ("visible", "off"); 283s unwind_protect 283s load carbig 283s X = [MPG Acceleration Weight Displacement]; 283s [d, p, stats] = manova1 (X, Origin); 283s manovacluster (stats); 283s unwind_protect_cleanup 283s close (hf); 283s end_unwind_protect 283s ***** error manovacluster (stats, "some"); 283s 2 tests, 2 passed, 0 known failure, 0 skipped 283s [inst/kstest2.m] 283s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/kstest2.m 283s ***** error kstest2 ([1,2,3,4,5,5]) 283s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 283s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 283s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 283s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 283s ***** test 283s load examgrades 283s [h, p] = kstest2 (grades(:,1), grades(:,2)); 283s assert (h, false); 283s assert (p, 0.1222791870137312, 1e-14); 283s ***** test 283s load examgrades 283s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 283s assert (h, false); 283s assert (p, 0.1844421391011258, 1e-14); 283s ***** test 283s load examgrades 283s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 283s assert (h, false); 283s assert (p, 0.06115357930171663, 1e-14); 283s ***** test 283s load examgrades 283s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 283s assert (h, true); 283s assert (p, 0.06115357930171663, 1e-14); 283s 14 tests, 14 passed, 0 known failure, 0 skipped 283s [inst/sigma_pts.m] 283s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/sigma_pts.m 283s ***** demo 283s K = [1 0.5; 0.5 1]; # covariance matrix 283s # calculate and build associated ellipse 283s [R,S,~] = svd (K); 283s theta = atan2 (R(2,1), R(1,1)); 283s v = sqrt (diag (S)); 283s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 283s t = linspace (0, 2*pi, 100).'; 283s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 283s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 283s 283s figure(1); clf; hold on 283s # Plot ellipse and axes 283s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 283s plot (xe,ye,'-r'); 283s 283s col = 'rgb'; 283s l = [-1.8 -1 1.5]; 283s for li = 1:3 283s p = sigma_pts (2, [], K, l(li)); 283s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 283s p(1,1), p(1,2), ['o' col(li)]); 283s h(li) = tmp(1); 283s endfor 283s hold off 283s axis image 283s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 283s ***** test 283s p = sigma_pts (5); 283s assert (mean (p), zeros(1,5), sqrt(eps)); 283s assert (cov (p), eye(5), sqrt(eps)); 283s ***** test 283s m = randn(1, 5); 283s p = sigma_pts (5, m); 283s assert (mean (p), m, sqrt(eps)); 283s assert (cov (p), eye(5), sqrt(eps)); 283s ***** test 283s x = linspace (0,1,5); 283s K = exp (- (x.' - x).^2/ 0.5); 283s p = sigma_pts (5, [], K); 283s assert (mean (p), zeros(1,5), sqrt(eps)); 283s assert (cov (p), K, sqrt(eps)); 283s ***** error sigma_pts(2,1); 283s ***** error sigma_pts(2,[],1); 283s ***** error sigma_pts(2,1,1); 283s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 283s 7 tests, 7 passed, 0 known failure, 0 skipped 283s [inst/grpstats.m] 283s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/grpstats.m 283s ***** demo 283s load carsmall; 283s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 283s n = length(m); 283s errorbar((1:n)',m,p(:,2)-m); 283s set (gca, "xtick", 1:n, "xticklabel", g); 283s title ("95% prediction intervals for mean weight by year"); 283s ***** demo 283s load carsmall; 283s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 283s {"mean", "meanci", "gname"}, 0.05) 283s [c,r] = size (m); 283s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 283s set (gca, "xtick", 1:c, "xticklabel", g); 283s title ("95% prediction intervals for mean weight by year"); 283s ***** test 283s load carsmall 283s means = grpstats (Acceleration, Origin); 283s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 283s ***** test 283s load carsmall 283s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 283s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 283s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 283s ***** test 283s load carsmall 283s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 283s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 283s ***** test 283s load carsmall 283s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 283s {"mean", "meanci", "gname"}, 0.05); 283s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 283s [1e-14, 2e-14, 1e-14]'); 283s ***** test 283s [mC, g] = grpstats ([], []); 283s assert (isempty (mC), true); 283s assert (isempty (g), true); 283s ***** error ... 283s grpstats (ones (3, 3, 3)); 283s ***** error ... 283s grpstats ([], {'A'; 'B'; 'A'; 'B'}) 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha"); 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "somename", -0.1); 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", {2, 3}, -0.1); 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha", -0.1); 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, {'mean', 'sum'}); 283s ***** error ... 283s [q, w] = grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}); 283s ***** error ... 283s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "whatever"); 283s 14 tests, 14 passed, 0 known failure, 0 skipped 283s [inst/fillmissing.m] 283s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fillmissing.m 283s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 283s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 283s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 283s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 283s ***** test 283s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 283s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 283s assert (fillmissing (x, "constant", 99), y); 283s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 283s assert (fillmissing (x, "constant", [94:99]), y); 283s assert (fillmissing (x, "constant", [94:99]'), y); 283s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 283s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 283s assert (fillmissing (x, "constant", [94:99], 1), y); 283s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 283s assert (fillmissing (x, "constant", [96:99], 2), y); 283s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 283s assert (fillmissing (x, "constant", [94:99], 3), y); 283s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 283s assert (fillmissing (x, "constant", [88:99], 99), y); 283s ***** test 283s x = reshape ([1:24], 4, 3, 2); 283s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s y = x; 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 283s assert (fillmissing (x, "constant", [94:99], 1), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 283s assert (fillmissing (x, "constant", [92:99], 2), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 283s assert (fillmissing (x, "constant", [88:99], 3), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 283s assert (fillmissing (x, "constant", [76:99], 99), y); 283s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 283s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 283s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 283s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 283s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 283s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 283s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 283s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s y = x; 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 283s y([8]) = 99; 283s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 283s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 283s y = x; 283s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 283s y([6, 18, 20, 21]) = 99; 283s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 283s y(y == 99) = 88; 283s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 283s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 283s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 283s y([8]) = 94; 283s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 283s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 283s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 283s y = x; 283s y(isnan (y)) = 88; 283s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 283s y = x; 283s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 283s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 283s y = x; 283s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 283s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 283s y = x; 283s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 283s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 283s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 283s ***** test 283s x = reshape ([1:24],4,3,2); 283s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s y = x; 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 283s assert (fillmissing (x, "constant", [94:99], 1), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 283s assert (fillmissing (x, "constant", [92:99], 2), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 283s assert (fillmissing (x, "constant", [88:99], 3), y); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 283s assert (fillmissing (x, "constant", [76:99], 99), y); 283s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 283s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** test 283s x = reshape ([1:24], 4, 3, 2); 283s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s y = x; 283s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 283s assert (fillmissing (x, "next", 1), y); 283s y = x; 283s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 283s assert (fillmissing (x, "next", 2), y); 283s y = x; 283s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 283s assert (fillmissing (x, "next", 3), y); 283s assert (fillmissing (x, "next", 99), x); 283s y = x; 283s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 283s assert (fillmissing (x, "previous", 1), y); 283s y = x; 283s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 283s assert (fillmissing (x, "previous", 2), y); 283s y = x; 283s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 283s assert (fillmissing (x, "previous", 3), y); 283s assert (fillmissing (x, "previous", 99), x); 283s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 283s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 283s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 283s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 283s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 283s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 283s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 283s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 283s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 283s y = x; 283s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 283s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 283s y = x; 283s y([16, 19, 21]) = [4, 7, 9]; 283s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 283s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 283s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 283s y = x; 283s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 283s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 283s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 283s y = x; 283s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 283s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 283s y = x; 283s y([2, 5]) = [14, 17]; 283s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 283s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 283s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 283s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 283s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 283s ***** test 283s x = reshape ([1:24], 4, 3, 2); 283s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s y = x; 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 283s assert (fillmissing (x, "nearest", 1), y); 283s y = x; 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 283s assert (fillmissing (x, "nearest", 2), y); 283s y = x; 283s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 283s assert (fillmissing (x, "nearest", 3), y); 283s assert (fillmissing (x, "nearest", 99), x); 283s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 283s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 283s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 283s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 283s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 283s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 283s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 283s y = x; 283s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 283s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 283s y = x; 283s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 283s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 283s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 283s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 283s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 283s ***** test 283s x = reshape ([1:24], 4, 3, 2); 283s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 283s y = reshape ([1:24], 4, 3, 2); 283s y([1, 9, 14, 19, 22, 23]) = NaN; 283s assert (fillmissing (x, "linear", 2), y); 283s y = reshape ([1:24], 4, 3, 2); 283s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 283s assert (fillmissing (x, "linear", 3), y); 283s assert (fillmissing (x, "linear", 99), x); 283s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 283s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 283s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 283s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 283s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 283s y(8) = 8; 283s assert (fillmissing (x, "linear", "endvalues", 0), y); 283s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 283s y = x; 283s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 283s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 283s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 283s y = x; 283s y(isnan(y)) = 0; 283s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 283s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 283s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 283s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 283s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 283s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 283s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 283s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 283s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 283s ***** test <60965> 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 283s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 283s !!!!! known bug: https://octave.org/testfailure/?60965 283s interp1: invalid METHOD 'makima' 283s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 283s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 283s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 283s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 283s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 283s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 283s ***** 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]) 283s ***** test 283s x = reshape ([1:24], 3, 4, 2); 283s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 283s y = x; 283s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 283s assert (fillmissing (x, "movmean", 3), y); 283s assert (fillmissing (x, "movmean", [1, 1]), y); 283s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 283s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 283s y = x; 283s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 283s assert (fillmissing (x, "movmean", 3, 2), y); 283s assert (fillmissing (x, "movmean", [1, 1], 2), y); 283s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 283s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 283s y([1, 18]) = NaN; 283s y(6) = 9; 283s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 283s y = x; 283s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 283s y(8) = 8; 283s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 283s y = x; 283s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 283s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 283s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 283s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 283s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 283s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 283s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 283s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 283s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 283s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 283s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 283s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 284s ***** 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]) 284s ***** test 284s x = reshape ([1:24], 3, 4, 2); 284s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 284s y = x; 284s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 284s assert (fillmissing (x, "movmedian", 3), y); 284s assert (fillmissing (x, "movmedian", [1, 1]), y); 284s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 284s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 284s y = x; 284s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 284s assert (fillmissing (x, "movmedian", 3, 2), y); 284s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 284s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 284s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 284s y([1,18]) = NaN; 284s y(6) = 9; 284s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 284s y = x; 284s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 284s y(8) = 8; 284s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 284s y = x; 284s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 284s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 284s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 284s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 284s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 284s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 284s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 284s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 284s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 284s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 284s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 284s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 284s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 284s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 284s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 284s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 284s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 284s ***** function A = testfcn (x, y, z) 284s if (isempty (y)) 284s A = z; 284s elseif (numel (y) == 1) 284s A = repelem (x(1), numel(z)); 284s else 284s A = interp1 (y, x, z, "linear", "extrap"); 284s endif 284s ***** endfunction 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 284s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 284s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 284s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 284s ***** 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] 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 284s ***** 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]' 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 284s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 284s ***** 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) 284s ***** 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] 284s ***** test 284s ***** function A = testfcn (x, y, z) 284s if (isempty (y)) 284s A = z; 284s elseif (numel (y) == 1) 284s A = repelem (x(1), numel(z)); 284s else 284s A = interp1 (y, x, z, "linear", "extrap"); 284s endif 284s ***** endfunction 284s x = reshape ([1:24], 3, 4, 2); 284s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 284s y = x; 284s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 284s assert (fillmissing (x, @testfcn, 3), y); 284s assert (fillmissing (x, @testfcn, [1, 1]), y); 284s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 284s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 284s y= x; 284s y(isnan (x)) = 99; 284s y(8) = 8; 284s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 284s y = x; 284s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 284s assert (fillmissing (x, @testfcn, 3, 2), y); 284s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 284s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 284s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 284s y(1) = NaN; 284s y([6, 18, 21]) = [9, 24, 24]; 284s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 284s y = x; 284s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 284s y(8) = 8; 284s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 284s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 284s y(8) = 99; 284s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 284s y([6, 18, 20, 21]) = 99; 284s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 284s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 284s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 284s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 284s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 284s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 284s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 284s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 284s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 284s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 284s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 284s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 284s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 284s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 284s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 284s ***** 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]) 284s ***** test 284s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 284s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 284s y = x; 284s y([4, 7, 12]) = 0; 284s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 284s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 284s y = x; 284s y([5, 7, 12]) = 0; 284s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 284s y = x; 284s y([4, 5, 7]) = 0; 284s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 284s ***** test 284s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 284s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 284s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 284s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 284s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 284s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 284s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 284s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 284s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 284s ***** test 284s x = [NaN, 2, 3]; 284s [~, idx] = fillmissing (x, "previous"); 284s assert (idx, logical ([0, 0, 0])); 284s [~, idx] = fillmissing (x, "movmean", 1); 284s assert (idx, logical ([0, 0, 0])); 284s x = [1:3; 4:6; 7:9]; 284s x([2, 4, 7, 9]) = NaN; 284s [~, idx] = fillmissing (x, "linear"); 284s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 284s [~, idx] = fillmissing (x, "movmean", 2); 284s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 284s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 284s assert (A, [1, 2, 3, 3, NaN]); 284s assert (idx, logical ([0, 0, 0, 1, 0])); 284s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 284s assert (A, [1, 2, 3, 3, NaN]); 284s assert (idx, logical ([0, 0, 0, 1, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 284s assert (A, [1, 2, 3, 3, NaN]); 284s assert (idx, logical ([0, 0, 0, 1, 0])); 284s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 284s assert (A, [1, 2, 1, 4, 1]); 284s assert (idx, logical ([0, 1, 0, 1, 0])); 284s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 284s assert (A, [1, NaN, 1, NaN, 1]); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 284s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 284s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 284s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 284s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 284s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 284s ***** test 284s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 284s assert (idx, logical ([0, 1, 1, 1, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 284s assert (A, [1, 2, 2, NaN, NaN]); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 284s assert (A, [1, 1, 1, 1, 1]); 284s assert (idx, logical ([0, 1, 0, 1, 1])); 284s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 284s assert (A, [1, NaN, 1, NaN, NaN]); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s ***** test 284s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 284s assert (A, [1, 3, 5]); 284s assert (idx, logical ([0, 1, 0])); 284s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 284s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 284s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 284s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 284s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 284s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 284s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 284s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 284s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 284s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 284s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 284s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 284s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 284s ***** test 284s [A, idx] = fillmissing (" a b c", "constant", " "); 284s assert (A, " a b c"); 284s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 284s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 284s assert (A, {"foo", "", "bar", ""}); 284s assert (idx, logical ([0, 0, 0, 0])); 284s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 284s assert (A, {"foo", "", "bar", ""}); 284s assert (idx, logical ([0, 0, 0, 0])); 284s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 284s assert (A, "afaoaoa"); 284s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 284s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 284s assert (A, " f o o "); 284s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 284s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 284s assert (A, {"a", "foo", "a"}); 284s assert (idx, logical ([1, 0, 1])); 284s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 284s assert (A, {"", "foo", ""}); 284s assert (idx, logical ([0, 0, 0])); 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 284s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 284s ***** 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])) 284s ***** 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])) 284s ***** test 284s x = logical ([1, 0, 1, 0, 1]); 284s [~, idx] = fillmissing (x, "constant", true); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([0, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 0])); 284s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 284s assert (idx, logical ([0, 0, 0, 0, 0])) 284s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])) 284s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([0, 0, 1, 0, 1])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 284s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 284s ***** 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])) 284s ***** 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])) 284s ***** test 284s x = int32 ([1, 2, 3, 4, 5]); 284s [~, idx] = fillmissing (x, "constant", 0); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 284s assert (idx, logical ([0, 0, 1, 0, 0])); 284s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([0, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 0])); 284s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 284s assert (idx, logical ([0, 0, 0, 0, 0])); 284s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([1, 0, 1, 0, 1])); 284s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 284s assert (idx, logical ([0, 0, 1, 0, 1])); 284s ***** test 284s [A, idx] = fillmissing ([struct, struct], "constant", 1); 284s assert (A, [struct, struct]) 284s assert (idx, [false, false]) 284s ***** error fillmissing () 284s ***** error fillmissing (1) 284s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 284s ***** error fillmissing (1, 2) 284s ***** error fillmissing (1, "foo") 284s ***** error fillmissing (1, @(x) x, 1) 284s ***** error fillmissing (1, @(x,y) x+y, 1) 284s ***** error fillmissing ("a b c", "linear") 284s ***** error fillmissing ({"a", "b"}, "linear") 284s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 284s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 284s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 284s ***** error fillmissing (1, "constant", []) 284s ***** error fillmissing (1, "constant", "a") 284s ***** error fillmissing ("a", "constant", 1) 284s ***** error fillmissing ("a", "constant", {"foo"}) 284s ***** error fillmissing ({"foo"}, "constant", 1) 284s ***** error fillmissing (1, "movmean") 284s ***** error fillmissing (1, "movmedian") 284s ***** error fillmissing (1, "constant", 1, 0) 284s ***** error fillmissing (1, "constant", 1, -1) 284s ***** error fillmissing (1, "constant", 1, [1, 2]) 284s ***** error fillmissing (1, "constant", 1, "samplepoints") 284s ***** error fillmissing (1, "constant", 1, "foo") 284s ***** error fillmissing (1, "constant", 1, 1, "foo") 284s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 284s ***** error fillmissing ("foo", "next", "endvalues", 1) 284s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 284s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 284s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 284s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 284s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 284s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 284s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 284s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 284s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 284s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 284s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 284s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 284s ***** error fillmissing (true, "linear", "missinglocations", true) 284s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 284s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 284s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 284s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 284s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 284s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 284s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 284s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 284s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 284s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 284s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 284s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 284s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 284s ***** error fillmissing (1, @(x,y,z) x+y+z) 284s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 284s 380 tests, 379 passed, 0 known failure, 1 skipped 284s [inst/correlation_test.m] 284s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/correlation_test.m 284s ***** error correlation_test (); 284s ***** error correlation_test (1); 284s ***** error ... 284s correlation_test ([1 2 NaN]', [2 3 4]'); 284s ***** error ... 284s correlation_test ([1 2 Inf]', [2 3 4]'); 284s ***** error ... 284s correlation_test ([1 2 3+i]', [2 3 4]'); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 NaN]'); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 Inf]'); 284s ***** error ... 284s correlation_test ([1 2 3]', [3 4 3+i]'); 284s ***** error ... 284s correlation_test ([1 2 3]', [3 4 4 5]'); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 284s ***** error ... 284s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 284s ***** test 284s x = [6 7 7 9 10 12 13 14 15 17]; 284s y = [19 22 27 25 30 28 30 29 25 32]; 284s [h, pval, stats] = correlation_test (x, y); 284s assert (stats.corrcoef, corr (x', y'), 1e-14); 284s assert (pval, 0.0223, 1e-4); 284s ***** test 284s x = [6 7 7 9 10 12 13 14 15 17]'; 284s y = [19 22 27 25 30 28 30 29 25 32]'; 284s [h, pval, stats] = correlation_test (x, y); 284s assert (stats.corrcoef, corr (x, y), 1e-14); 284s assert (pval, 0.0223, 1e-4); 284s 20 tests, 20 passed, 0 known failure, 0 skipped 284s [inst/geomean.m] 284s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/geomean.m 284s ***** test 284s x = [0:10]; 284s y = [x;x+5;x+10]; 284s assert (geomean (x), 0); 284s m = [0 9.462942809849169 14.65658770861967]; 284s assert (geomean (y, 2), m', 4e-14); 284s assert (geomean (y, "all"), 0); 284s y(2,4) = NaN; 284s m(2) = 9.623207231679554; 284s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 284s assert (geomean (y', "omitnan"), m, 4e-14); 284s z = y + 20; 284s assert (geomean (z, "all"), NaN); 284s assert (geomean (z, "all", "includenan"), NaN); 284s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 284s m = [24.79790781765634 NaN 34.85638839503932]; 284s assert (geomean (z'), m, 4e-14); 284s assert (geomean (z', "includenan"), m, 4e-14); 284s m(2) = 30.02181156156319; 284s assert (geomean (z', "omitnan"), m, 4e-14); 284s assert (geomean (z, 2, "omitnan"), m', 4e-14); 284s ***** test 284s x = repmat ([1:20;6:25], [5 2 6 3]); 284s assert (size (geomean (x, [3 2])), [10 1 1 3]); 284s assert (size (geomean (x, [1 2])), [1 1 6 3]); 284s assert (size (geomean (x, [1 2 4])), [1 1 6]); 284s assert (size (geomean (x, [1 4 3])), [1 40]); 284s assert (size (geomean (x, [1 2 3 4])), [1 1]); 284s ***** test 284s x = repmat ([1:20;6:25], [5 2 6 3]); 284s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 284s assert (geomean (x, [3 2]), m, 4e-13); 284s x(2,5,6,3) = NaN; 284s m(2,3) = NaN; 284s assert (geomean (x, [3 2]), m, 4e-13); 284s m(2,3) = 14.3292729579901; 284s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 284s ***** error geomean ("char") 284s ***** error geomean ([1 -1 3]) 284s ***** error ... 284s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 284s ***** error ... 284s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 284s ***** error ... 284s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 284s 8 tests, 8 passed, 0 known failure, 0 skipped 284s [inst/fitcknn.m] 284s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitcknn.m 284s ***** demo 284s ## Train a k-nearest neighbor classifier for k = 10 284s ## and plot the decision boundaries. 284s 284s load fisheriris 284s idx = ! strcmp (species, "setosa"); 284s X = meas(idx,3:4); 284s Y = cast (strcmpi (species(idx), "virginica"), "double"); 284s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 284s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 284s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 284s [x1G, x2G] = meshgrid (x1, x2); 284s XGrid = [x1G(:), x2G(:)]; 284s pred = predict (obj, XGrid); 284s gidx = logical (pred); 284s 284s figure 284s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 284s hold on 284s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 284s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 284s xlabel ("Petal length (cm)"); 284s ylabel ("Petal width (cm)"); 284s title ("5-Nearest Neighbor Classifier Decision Boundary"); 284s legend ({"Versicolor Region", "Virginica Region", ... 284s "Sampled Versicolor", "Sampled Virginica"}, ... 284s "location", "northwest") 284s axis tight 284s hold off 284s ***** test 284s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 284s y = ["a"; "a"; "b"; "b"]; 284s a = fitcknn (x, y); 284s assert (class (a), "ClassificationKNN"); 284s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 284s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 284s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y, "NSMethod", "exhaustive"); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s k = 10; 285s a = fitcknn (x, y, "NumNeighbors" ,k); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = ones (4, 11); 285s y = ["a"; "a"; "b"; "b"]; 285s k = 10; 285s a = fitcknn (x, y, "NumNeighbors" ,k); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s k = 10; 285s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s k = 10; 285s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s weights = ones (4,1); 285s a = fitcknn (x, y, "Standardize", 1); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.Standardize}, {true}) 285s assert ({a.Sigma}, {std(x, [], 1)}) 285s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s weights = ones (4,1); 285s a = fitcknn (x, y, "Standardize", false); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.Standardize}, {false}) 285s assert ({a.Sigma}, {[]}) 285s assert ({a.Mu}, {[]}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s s = ones (1, 3); 285s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.DistParameter}, {s}) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 285s assert (class (a), "ClassificationKNN"); 285s assert (a.DistParameter, 5) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 285s "NSMethod", "exhaustive"); 285s assert (class (a), "ClassificationKNN"); 285s assert (a.DistParameter, 5) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 285s assert (class (a), "ClassificationKNN"); 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 285s assert ({a.BucketSize}, {20}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y, "IncludeTies", true); 285s assert (class (a), "ClassificationKNN"); 285s assert (a.IncludeTies, true); 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y); 285s assert (class (a), "ClassificationKNN"); 285s assert (a.IncludeTies, false); 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s a = fitcknn (x, y); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Prior, [0.5; 0.5]) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s prior = [0.5; 0.5]; 285s a = fitcknn (x, y, "Prior", "empirical"); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Prior, prior) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "a"; "b"]; 285s prior = [0.75; 0.25]; 285s a = fitcknn (x, y, "Prior", "empirical"); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Prior, prior) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "a"; "b"]; 285s prior = [0.5; 0.5]; 285s a = fitcknn (x, y, "Prior", "uniform"); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Prior, prior) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s cost = eye (2); 285s a = fitcknn (x, y, "Cost", cost); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Cost, [1, 0; 0, 1]) 285s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s cost = eye (2); 285s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 285s assert (class (a), "ClassificationKNN") 285s assert (a.Cost, [1, 0; 0, 1]) 285s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 285s assert ({a.BucketSize}, {50}) 285s ***** test 285s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 285s y = ["a"; "a"; "b"; "b"]; 285s rand ("seed", 23); 285s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 285s assert (class (a), "ClassificationPartitionedModel"); 285s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 285s assert (a.ModelParameters.NSMethod, "exhaustive") 285s assert (a.ModelParameters.Distance, "euclidean") 285s assert ({a.Trained{1}.BucketSize}, {50}) 285s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 285s warning: called from 285s cvpartition at line 764 column 19 285s crossval at line 1701 column 9 285s fitcknn at line 354 column 7 285s __test__ at line 6 column 2 285s test at line 685 column 11 285s /tmp/tmp.YdhB1UcfDH at line 662 column 2 285s 285s ***** error fitcknn () 285s ***** error fitcknn (ones (4,1)) 285s ***** error 285s fitcknn (ones (4,2), ones (4, 1), "K") 285s ***** error 285s fitcknn (ones (4,2), ones (3, 1)) 285s ***** error 285s fitcknn (ones (4,2), ones (3, 1), "K", 2) 285s ***** error 285s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 285s ***** error 285s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 285s ***** error ... 285s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 285s 29 tests, 29 passed, 0 known failure, 0 skipped 285s [inst/hist3.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hist3.m 285s ***** demo 285s X = [ 285s 1 1 285s 1 1 285s 1 10 285s 1 10 285s 5 5 285s 5 5 285s 5 5 285s 5 5 285s 5 5 285s 7 3 285s 7 3 285s 7 3 285s 10 10 285s 10 10]; 285s hist3 (X) 285s ***** test 285s N_exp = [ 0 0 0 5 20 285s 0 0 10 15 0 285s 0 15 10 0 0 285s 20 5 0 0 0]; 285s 285s n = 100; 285s x = [1:n]'; 285s y = [n:-1:1]'; 285s D = [x y]; 285s N = hist3 (D, [4 5]); 285s assert (N, N_exp); 285s ***** test 285s N_exp = [0 0 0 0 1 285s 0 0 0 0 1 285s 0 0 0 0 1 285s 1 1 1 1 93]; 285s 285s n = 100; 285s x = [1:n]'; 285s y = [n:-1:1]'; 285s D = [x y]; 285s C{1} = [1 1.7 3 4]; 285s C{2} = [1:5]; 285s N = hist3 (D, C); 285s assert (N, N_exp); 285s ***** test 285s D = [1 1; 3 1; 3 3; 3 1]; 285s [c, nn] = hist3 (D, {0:4, 0:4}); 285s exp_c = zeros (5); 285s exp_c([7 9 19]) = [1 2 1]; 285s assert (c, exp_c); 285s assert (nn, {0:4, 0:4}); 285s ***** test 285s for i = 10 285s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 285s endfor 285s ***** test 285s edge_1 = linspace (0, 10, 10); 285s edge_2 = linspace (0, 50, 10); 285s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 285s exp_c = zeros (10, 10); 285s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 285s assert (c, exp_c); 285s 285s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 285s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 285s ***** shared X 285s X = [ 285s 5 2 285s 5 3 285s 1 4 285s 5 3 285s 4 4 285s 1 2 285s 2 3 285s 3 3 285s 5 4 285s 5 3]; 285s ***** test 285s N = zeros (10); 285s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 285s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 285s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 285s ***** test 285s N = zeros (5, 7); 285s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 285s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 285s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 285s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 285s ***** test 285s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 285s C = {(2:5), (2.5:1:4.5)}; 285s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 285s ***** test 285s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 285s C = {(1.2:3.2), (0:5)}; 285s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 285s assert (nthargout ([1 2], @hist3, X, C), {N C}) 285s ***** test 285s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 285s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 285s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 285s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 285s assert (C, C_exp, eps*10^2) 285s ***** test 285s Xv = repmat ([1:10]', [1 2]); 285s 285s ## Test Centers 285s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 285s 285s N_exp = eye (6); 285s N_exp([1 end]) = 3; 285s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 285s 285s N_exp = zeros (8, 6); 285s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 285s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 285s 285s ## Test Edges 285s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 285s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 285s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 285s 285s N_exp = zeros (14); 285s N_exp(3:12, 3:12) = eye (10); 285s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 285s 285s ## Test for Nbins 285s assert (hist3 (Xv), eye (10)) 285s assert (hist3 (Xv, [10 10]), eye (10)) 285s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 285s assert (hist3 (Xv, [5 5]), eye (5) * 2) 285s 285s N_exp = zeros (7, 5); 285s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 285s assert (hist3 (Xv, [7 5]), N_exp) 285s ***** test # bug #51059 285s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 285s [c, nn] = hist3 (D, {0:4, 0:4}); 285s exp_c = zeros (5); 285s exp_c([7 9 19]) = [1 2 1]; 285s assert (c, exp_c) 285s assert (nn, {0:4, 0:4}) 285s ***** test 285s [c, nn] = hist3 ([1 8]); 285s exp_c = zeros (10, 10); 285s exp_c(6, 6) = 1; 285s exp_nn = {-4:5, 3:12}; 285s assert (c, exp_c) 285s assert (nn, exp_nn, eps) 285s 285s [c, nn] = hist3 ([1 8], [10 11]); 285s exp_c = zeros (10, 11); 285s exp_c(6, 6) = 1; 285s exp_nn = {-4:5, 3:13}; 285s assert (c, exp_c) 285s assert (nn, exp_nn, eps) 285s ***** test 285s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 285s exp_c = zeros (10, 10); 285s exp_c(2, 1) = 1; 285s exp_c(8, 10) = 1; 285s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 285s assert (c, exp_c) 285s assert (nn, exp_nn, eps*100) 285s ***** test 285s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 285s exp_c = zeros (10, 10); 285s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 285s assert (c, exp_c) 285s assert (nn, exp_nn, eps*100) 285s ***** test 285s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 285s exp_c = zeros (10, 10); 285s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 285s assert (c, exp_c) 285s assert (nn, exp_nn, eps*100) 285s 16 tests, 16 passed, 0 known failure, 0 skipped 285s [inst/logistic_regression.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/logistic_regression.m 285s ***** test 285s # Output compared to following MATLAB commands 285s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 285s # P = mnrval(B,X) 285s X = [1.489381332449196, 1.1534152241851305; ... 285s 1.8110085304863965, 0.9449666896938425; ... 285s -0.04453299665130296, 0.34278203449678646; ... 285s -0.36616019468850347, 1.130254275908322; ... 285s 0.15339143291005095, -0.7921044310668951; ... 285s -1.6031878794469698, -1.8343471035233376; ... 285s -0.14349521143198166, -0.6762996896828459; ... 285s -0.4403818557740143, -0.7921044310668951; ... 285s -0.7372685001160434, -0.027793137932169563; ... 285s -0.11875465773681024, 0.5512305689880763]; 285s Y = [1,1,1,1,1,0,0,0,0,0]'; 285s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 285s ***** test 285s # Output compared to following MATLAB commands 285s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 285s load carbig 285s X = [Acceleration Displacement Horsepower Weight]; 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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, ... 285s 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]'; 285s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 285s assert (DEV, 433.197174495549, 1e-05); 285s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 285s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 285s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 285s assert (SLOPE(1), 0.104762463756714, 1e-05); 285s assert (SLOPE(2), 0.0103357623191891, 1e-05); 285s assert (SLOPE(3), 0.0645199313242276, 1e-05); 285s assert (SLOPE(4), 0.00166377028388103, 1e-05); 285s 2 tests, 2 passed, 0 known failure, 0 skipped 285s [inst/optimalleaforder.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/optimalleaforder.m 285s ***** demo 285s randn ("seed", 5) # for reproducibility 285s X = randn (10, 2); 285s D = pdist (X); 285s tree = linkage(D, 'average'); 285s optimalleaforder (tree, D, 'Transformation', 'linear') 285s ***** error optimalleaforder () 285s ***** error optimalleaforder (1) 285s ***** error optimalleaforder (ones (2, 2), 1) 285s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 285s ***** error optimalleaforder ([1 2 1], [1 2 3]) 285s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 285s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 285s 7 tests, 7 passed, 0 known failure, 0 skipped 285s [inst/regression_ttest.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/regression_ttest.m 285s ***** error regression_ttest (); 285s ***** error regression_ttest (1); 285s ***** error ... 285s regression_ttest ([1 2 NaN]', [2 3 4]'); 285s ***** error ... 285s regression_ttest ([1 2 Inf]', [2 3 4]'); 285s ***** error ... 285s regression_ttest ([1 2 3+i]', [2 3 4]'); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 NaN]'); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 Inf]'); 285s ***** error ... 285s regression_ttest ([1 2 3]', [3 4 3+i]'); 285s ***** error ... 285s regression_ttest ([1 2 3]', [3 4 4 5]'); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 285s ***** error ... 285s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 285s 16 tests, 16 passed, 0 known failure, 0 skipped 285s [inst/dist_obj/WeibullDistribution.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/WeibullDistribution.m 285s ***** demo 285s ## Generate a data set of 5000 random samples from a Weibull distribution with 285s ## parameters lambda = 1 and k = 2. Fit a Weibull distribution to this data and plot 285s ## a PDF of the fitted distribution superimposed on a histogram of a data. 285s 285s pd_fixed = makedist ("Weibull", "lambda", 1, "k", 2) 285s rand ("seed", 2); 285s data = random (pd_fixed, 5000, 1); 285s pd_fitted = fitdist (data, "Weibull") 285s plot (pd_fitted) 285s msg = "Fitted Weibull distribution with lambda = %0.2f and k = %0.2f"; 285s title (sprintf (msg, pd_fitted.lambda, pd_fitted.k)) 285s ***** shared pd, t 285s pd = WeibullDistribution; 285s t = truncate (pd, 2, 4); 285s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 285s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 285s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 285s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 285s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 285s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 285s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 285s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 285s ***** assert (iqr (pd), 1.0986, 1e-4); 285s ***** assert (iqr (t), 0.8020, 1e-4); 285s ***** assert (mean (pd), 1, 1e-14); 285s ***** assert (mean (t), 2.6870, 1e-4); 285s ***** assert (median (pd), 0.6931, 1e-4); 285s ***** assert (median (t), 2.5662, 1e-4); 285s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 285s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 285s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 285s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 285s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 285s ***** assert (any (random (t, 1000, 1) < 2), false); 285s ***** assert (any (random (t, 1000, 1) > 4), false); 285s ***** assert (std (pd), 1, 1e-14); 285s ***** assert (std (t), 0.5253, 1e-4); 285s ***** assert (var (pd), 1, 1e-14); 285s ***** assert (var (t), 0.2759, 1e-4); 285s ***** error ... 285s WeibullDistribution(0, 1) 285s ***** error ... 285s WeibullDistribution(-1, 1) 285s ***** error ... 285s WeibullDistribution(Inf, 1) 285s ***** error ... 285s WeibullDistribution(i, 1) 285s ***** error ... 285s WeibullDistribution("a", 1) 285s ***** error ... 285s WeibullDistribution([1, 2], 1) 285s ***** error ... 285s WeibullDistribution(NaN, 1) 285s ***** error ... 285s WeibullDistribution(1, 0) 285s ***** error ... 285s WeibullDistribution(1, -1) 285s ***** error ... 285s WeibullDistribution(1, Inf) 285s ***** error ... 285s WeibullDistribution(1, i) 285s ***** error ... 285s WeibullDistribution(1, "a") 285s ***** error ... 285s WeibullDistribution(1, [1, 2]) 285s ***** error ... 285s WeibullDistribution(1, NaN) 285s ***** error ... 285s cdf (WeibullDistribution, 2, "uper") 285s ***** error ... 285s cdf (WeibullDistribution, 2, 3) 285s ***** shared x 285s x = wblrnd (1, 1, [1, 100]); 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 0) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 1) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", "") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 285s "parameter", {"lambda", "k", "param"}) 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "parameter", "param") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "NAME", "value") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 285s ***** error ... 285s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 285s "NAME", "value") 285s ***** error ... 285s plot (WeibullDistribution, "Parent") 285s ***** error ... 285s plot (WeibullDistribution, "PlotType", 12) 285s ***** error ... 285s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 285s ***** error ... 285s plot (WeibullDistribution, "PlotType", "pdfcdf") 285s ***** error ... 285s plot (WeibullDistribution, "Discrete", "pdfcdf") 285s ***** error ... 285s plot (WeibullDistribution, "Discrete", [1, 0]) 285s ***** error ... 285s plot (WeibullDistribution, "Discrete", {true}) 285s ***** error ... 285s plot (WeibullDistribution, "Parent", 12) 285s ***** error ... 285s plot (WeibullDistribution, "Parent", "hax") 285s ***** error ... 285s plot (WeibullDistribution, "invalidNAME", "pdf") 285s ***** error ... 285s plot (WeibullDistribution, "PlotType", "probability") 285s ***** error ... 285s proflik (WeibullDistribution, 2) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 3) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), [1, 2]) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), {1}) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, ones (2)) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display") 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 285s ***** error ... 285s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 285s ***** error ... 285s truncate (WeibullDistribution) 285s ***** error ... 285s truncate (WeibullDistribution, 2) 285s ***** error ... 285s truncate (WeibullDistribution, 4, 2) 285s ***** shared pd 285s pd = WeibullDistribution(1, 1); 285s pd(2) = WeibullDistribution(1, 3); 285s ***** error cdf (pd, 1) 285s ***** error icdf (pd, 0.5) 285s ***** error iqr (pd) 285s ***** error mean (pd) 285s ***** error median (pd) 285s ***** error negloglik (pd) 285s ***** error paramci (pd) 285s ***** error pdf (pd, 1) 285s ***** error plot (pd) 285s ***** error proflik (pd, 2) 285s ***** error random (pd) 285s ***** error std (pd) 285s ***** error ... 285s truncate (pd, 2, 4) 285s ***** error var (pd) 285s 97 tests, 97 passed, 0 known failure, 0 skipped 285s [inst/dist_obj/ExponentialDistribution.m] 285s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/ExponentialDistribution.m 285s ***** shared pd, t 285s pd = ExponentialDistribution (1); 285s t = truncate (pd, 2, 4); 285s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 285s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 285s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 285s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 285s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 285s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 285s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 285s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 285s ***** assert (iqr (pd), 1.0986, 1e-4); 285s ***** assert (iqr (t), 0.8020, 1e-4); 285s ***** assert (mean (pd), 1); 285s ***** assert (mean (t), 2.6870, 1e-4); 285s ***** assert (median (pd), 0.6931, 1e-4); 285s ***** assert (median (t), 2.5662, 1e-4); 285s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 285s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 285s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 285s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 285s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 285s ***** assert (any (random (t, 1000, 1) < 2), false); 285s ***** assert (any (random (t, 1000, 1) > 4), false); 286s ***** assert (std (pd), 1); 286s ***** assert (std (t), 0.5253, 1e-4); 286s ***** assert (var (pd), 1); 286s ***** assert (var (t), 0.2759, 1e-4); 286s ***** error ... 286s ExponentialDistribution(0) 286s ***** error ... 286s ExponentialDistribution(-1) 286s ***** error ... 286s ExponentialDistribution(Inf) 286s ***** error ... 286s ExponentialDistribution(i) 286s ***** error ... 286s ExponentialDistribution("a") 286s ***** error ... 286s ExponentialDistribution([1, 2]) 286s ***** error ... 286s ExponentialDistribution(NaN) 286s ***** error ... 286s cdf (ExponentialDistribution, 2, "uper") 286s ***** error ... 286s cdf (ExponentialDistribution, 2, 3) 286s ***** shared x 286s x = exprnd (1, [100, 1]); 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 0) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 1) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", "") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 286s "alpha", {0.05}) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 286s "parameter", {"mu", "param"}) 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "parameter", "param") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "NAME", "value") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 286s ***** error ... 286s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 286s "parameter", "mu", "NAME", "value") 286s ***** error ... 286s plot (ExponentialDistribution, "Parent") 286s ***** error ... 286s plot (ExponentialDistribution, "PlotType", 12) 286s ***** error ... 286s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 286s ***** error ... 286s plot (ExponentialDistribution, "PlotType", "pdfcdf") 286s ***** error ... 286s plot (ExponentialDistribution, "Discrete", "pdfcdf") 286s ***** error ... 286s plot (ExponentialDistribution, "Discrete", [1, 0]) 286s ***** error ... 286s plot (ExponentialDistribution, "Discrete", {true}) 286s ***** error ... 286s plot (ExponentialDistribution, "Parent", 12) 286s ***** error ... 286s plot (ExponentialDistribution, "Parent", "hax") 286s ***** error ... 286s plot (ExponentialDistribution, "invalidNAME", "pdf") 286s ***** error ... 286s plot (ExponentialDistribution, "PlotType", "probability") 286s ***** error ... 286s proflik (ExponentialDistribution, 2) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 3) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), [1, 2]) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), {1}) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display") 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 286s ***** error ... 286s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 286s ***** error ... 286s truncate (ExponentialDistribution) 286s ***** error ... 286s truncate (ExponentialDistribution, 2) 286s ***** error ... 286s truncate (ExponentialDistribution, 4, 2) 286s ***** shared pd 286s pd = ExponentialDistribution(1); 286s pd(2) = ExponentialDistribution(3); 286s ***** error cdf (pd, 1) 286s ***** error icdf (pd, 0.5) 286s ***** error iqr (pd) 286s ***** error mean (pd) 286s ***** error median (pd) 286s ***** error negloglik (pd) 286s ***** error paramci (pd) 286s ***** error pdf (pd, 1) 286s ***** error plot (pd) 286s ***** error proflik (pd, 2) 286s ***** error random (pd) 286s ***** error std (pd) 286s ***** error ... 286s truncate (pd, 2, 4) 286s ***** error var (pd) 286s 90 tests, 90 passed, 0 known failure, 0 skipped 286s [inst/dist_obj/LoguniformDistribution.m] 286s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/LoguniformDistribution.m 286s ***** demo 286s ## Generate a data set of 5000 random samples from a Log-uniform distribution with 286s ## parameters Lower = 1 and Upper = 10. Plot a PDF of the distribution superimposed 286s ## on a histogram of the data. 286s 286s pd_fixed = makedist ("Loguniform", "Lower", 1, "Upper", 10); 286s rand ("seed", 2); 286s data = random (pd_fixed, 5000, 1); 286s plot (pd_fixed) 286s hold on 286s hist (data, 50) 286s hold off 286s msg = "Log-uniform distribution with Lower = %0.2f and Upper = %0.2f"; 286s title (sprintf (msg, pd_fixed.Lower, pd_fixed.Upper)) 286s ***** shared pd, t 286s pd = LoguniformDistribution (1, 4); 286s t = truncate (pd, 2, 4); 286s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 286s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 286s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 286s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 286s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 286s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 286s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 286s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 286s ***** assert (iqr (pd), 1.4142, 1e-4); 286s ***** assert (iqr (t), 0.9852, 1e-4); 286s ***** assert (mean (pd), 2.1640, 1e-4); 286s ***** assert (mean (t), 2.8854, 1e-4); 286s ***** assert (median (pd), 2); 286s ***** assert (median (t), 2.8284, 1e-4); 286s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 286s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 286s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 286s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 286s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 286s ***** assert (any (random (pd, 1000, 1) < 1), false); 286s ***** assert (any (random (pd, 1000, 1) > 4), false); 286s ***** assert (any (random (t, 1000, 1) < 2), false); 286s ***** assert (any (random (t, 1000, 1) > 4), false); 286s ***** assert (std (pd), 0.8527, 1e-4); 286s ***** assert (std (t), 0.5751, 1e-4); 286s ***** assert (var (pd), 0.7270, 1e-4); 286s ***** assert (var (t), 0.3307, 1e-4); 286s ***** error ... 286s LoguniformDistribution (i, 1) 286s ***** error ... 286s LoguniformDistribution (Inf, 1) 286s ***** error ... 286s LoguniformDistribution ([1, 2], 1) 286s ***** error ... 286s LoguniformDistribution ("a", 1) 286s ***** error ... 286s LoguniformDistribution (NaN, 1) 286s ***** error ... 286s LoguniformDistribution (1, i) 286s ***** error ... 286s LoguniformDistribution (1, Inf) 286s ***** error ... 286s LoguniformDistribution (1, [1, 2]) 286s ***** error ... 286s LoguniformDistribution (1, "a") 286s ***** error ... 286s LoguniformDistribution (1, NaN) 286s ***** error ... 286s LoguniformDistribution (2, 1) 286s ***** error ... 286s cdf (LoguniformDistribution, 2, "uper") 286s ***** error ... 286s cdf (LoguniformDistribution, 2, 3) 286s ***** error ... 286s plot (LoguniformDistribution, "Parent") 286s ***** error ... 286s plot (LoguniformDistribution, "PlotType", 12) 286s ***** error ... 286s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 286s ***** error ... 286s plot (LoguniformDistribution, "PlotType", "pdfcdf") 286s ***** error ... 286s plot (LoguniformDistribution, "Discrete", "pdfcdf") 286s ***** error ... 286s plot (LoguniformDistribution, "Discrete", [1, 0]) 286s ***** error ... 286s plot (LoguniformDistribution, "Discrete", {true}) 286s ***** error ... 286s plot (LoguniformDistribution, "Parent", 12) 286s ***** error ... 286s plot (LoguniformDistribution, "Parent", "hax") 286s ***** error ... 286s plot (LoguniformDistribution, "invalidNAME", "pdf") 286s ***** error ... 286s plot (LoguniformDistribution, "PlotType", "probability") 286s ***** error ... 286s truncate (LoguniformDistribution) 286s ***** error ... 286s truncate (LoguniformDistribution, 2) 286s ***** error ... 286s truncate (LoguniformDistribution, 4, 2) 286s ***** shared pd 286s pd = LoguniformDistribution(1, 4); 286s pd(2) = LoguniformDistribution(2, 5); 286s ***** error cdf (pd, 1) 286s ***** error icdf (pd, 0.5) 286s ***** error iqr (pd) 286s ***** error mean (pd) 286s ***** error median (pd) 286s ***** error pdf (pd, 1) 286s ***** error plot (pd) 286s ***** error random (pd) 286s ***** error std (pd) 286s ***** error ... 286s truncate (pd, 2, 4) 286s ***** error var (pd) 286s 65 tests, 65 passed, 0 known failure, 0 skipped 286s [inst/dist_obj/NormalDistribution.m] 286s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/NormalDistribution.m 286s ***** demo 286s ## Generate a data set of 5000 random samples from a Normal distribution with 286s ## parameters mu = 0 and sigma = 1. Fit a Normal distribution to this data and plot 286s ## a PDF of the fitted distribution superimposed on a histogram of the data. 286s 286s pd_fixed = makedist ("Normal", "mu", 0, "sigma", 1) 286s randn ("seed", 2); 286s data = random (pd_fixed, 5000, 1); 286s pd_fitted = fitdist (data, "Normal") 286s plot (pd_fitted) 286s msg = "Fitted Normal distribution with mu = %0.2f and sigma = %0.2f"; 286s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 286s ***** shared pd, t 286s pd = NormalDistribution; 286s t = truncate (pd, -2, 2); 286s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 286s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 286s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 286s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 286s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 286s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 286s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 286s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 286s ***** assert (iqr (pd), 1.3490, 1e-4); 286s ***** assert (iqr (t), 1.2782, 1e-4); 286s ***** assert (mean (pd), 0); 286s ***** assert (mean (t), 0, 3e-16); 286s ***** assert (median (pd), 0); 286s ***** assert (median (t), 0, 3e-16); 286s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 286s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 286s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 286s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 286s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 286s ***** assert (any (random (t, 1000, 1) < -2), false); 286s ***** assert (any (random (t, 1000, 1) > 2), false); 286s ***** assert (std (pd), 1); 286s ***** assert (std (t), 0.8796, 1e-4); 286s ***** assert (var (pd), 1); 286s ***** assert (var (t), 0.7737, 1e-4); 286s ***** error ... 286s NormalDistribution(Inf, 1) 286s ***** error ... 286s NormalDistribution(i, 1) 286s ***** error ... 286s NormalDistribution("a", 1) 286s ***** error ... 286s NormalDistribution([1, 2], 1) 286s ***** error ... 286s NormalDistribution(NaN, 1) 286s ***** error ... 286s NormalDistribution(1, 0) 286s ***** error ... 286s NormalDistribution(1, -1) 286s ***** error ... 286s NormalDistribution(1, Inf) 286s ***** error ... 286s NormalDistribution(1, i) 286s ***** error ... 286s NormalDistribution(1, "a") 286s ***** error ... 286s NormalDistribution(1, [1, 2]) 286s ***** error ... 286s NormalDistribution(1, NaN) 286s ***** error ... 286s cdf (NormalDistribution, 2, "uper") 286s ***** error ... 286s cdf (NormalDistribution, 2, 3) 286s ***** shared x 286s x = normrnd (1, 1, [1, 100]); 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 0) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 1) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", "") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 287s "parameter", {"mu", "sigma", "param"}) 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "parameter", "param") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "NAME", "value") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 287s ***** error ... 287s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 287s "NAME", "value") 288s ***** error ... 288s plot (NormalDistribution, "Parent") 288s ***** error ... 288s plot (NormalDistribution, "PlotType", 12) 288s ***** error ... 288s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 288s ***** error ... 288s plot (NormalDistribution, "PlotType", "pdfcdf") 288s ***** error ... 288s plot (NormalDistribution, "Discrete", "pdfcdf") 288s ***** error ... 288s plot (NormalDistribution, "Discrete", [1, 0]) 288s ***** error ... 288s plot (NormalDistribution, "Discrete", {true}) 288s ***** error ... 288s plot (NormalDistribution, "Parent", 12) 288s ***** error ... 288s plot (NormalDistribution, "Parent", "hax") 288s ***** error ... 288s plot (NormalDistribution, "invalidNAME", "pdf") 288s ***** error ... 288s plot (NormalDistribution, "PlotType", "probability") 288s ***** error ... 288s proflik (NormalDistribution, 2) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 3) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), [1, 2]) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), {1}) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, ones (2)) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display") 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display", 1) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 288s ***** error ... 288s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 289s ***** error ... 289s truncate (NormalDistribution) 289s ***** error ... 289s truncate (NormalDistribution, 2) 289s ***** error ... 289s truncate (NormalDistribution, 4, 2) 289s ***** shared pd 289s pd = NormalDistribution(1, 1); 289s pd(2) = NormalDistribution(1, 3); 289s ***** error cdf (pd, 1) 289s ***** error icdf (pd, 0.5) 289s ***** error iqr (pd) 289s ***** error mean (pd) 289s ***** error median (pd) 289s ***** error negloglik (pd) 289s ***** error paramci (pd) 289s ***** error pdf (pd, 1) 289s ***** error plot (pd) 289s ***** error proflik (pd, 2) 289s ***** error random (pd) 289s ***** error std (pd) 289s ***** error ... 289s truncate (pd, 2, 4) 289s ***** error var (pd) 289s 95 tests, 95 passed, 0 known failure, 0 skipped 289s [inst/dist_obj/PiecewiseLinearDistribution.m] 289s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/PiecewiseLinearDistribution.m 289s ***** demo 289s ## Generate a data set of 5000 random samples from a Beta distribution with 289s ## parameters a = 2 and b = 5 scaled to [0,10]. 289s ## Compute empirical CDF, subsample, create PiecewiseLinearDistribution, 289s ## and plot the PDF superimposed on a histogram of the data. 289s 289s randg ("seed", 2); 289s data = betarnd (2, 5, 5000, 1) * 10; 289s [f, x] = ecdf (data); 289s f = f(1:5:end); 289s x = x(1:5:end); 289s pd = PiecewiseLinearDistribution (x, f); 289s [counts, centers] = hist (data, 50); 289s bin_width = centers(2) - centers(1); 289s bar (centers, counts / (sum (counts) * bin_width), 1); 289s hold on 289s vals = min (data):0.1:max (data); 289s y = pdf (pd, vals); 289s plot (vals, y, "-r", "LineWidth", 2) 289s hold off 289s title ("Piecewise Linear approximation to scaled Beta(2,5) data") 289s legend ("Histogram", "Piecewise PDF") 289s ***** shared pd, t 289s load patients 289s [f, x] = ecdf (Weight); 289s f = f(1:5:end); 289s x = x(1:5:end); 289s pd = PiecewiseLinearDistribution (x, f); 289s t = truncate (pd, 130, 180); 289s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 289s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 289s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 289s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 289s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 289s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 289s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 289s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 289s ***** assert (iqr (pd), 50.0833, 1e-4); 289s ***** assert (iqr (t), 36.8077, 1e-4); 289s ***** assert (mean (pd), 153.61, 1e-10); 289s ***** assert (mean (t), 152.311, 1e-3); 293s ***** assert (median (pd), 142, 1e-10); 293s ***** assert (median (t), 141.9462, 1e-4); 293s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0004], 6e-3); 293s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 293s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 293s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 293s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 293s ***** assert (any (random (t, 1000, 1) < 130), false); 293s ***** assert (any (random (t, 1000, 1) > 180), false); 293s ***** assert (std (pd), 26.5196, 1e-4); 293s ***** assert (std (t), 18.2941, 1e-4); 301s ***** assert (var (pd), 703.2879, 1e-4); 301s ***** assert (var (t), 334.6757, 1e-4); 310s ***** error ... 310s PiecewiseLinearDistribution ([0, i], [0, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 1], [0, i]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0], [1]) 310s ***** error ... 310s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 310s ***** error ... 310s cdf (PiecewiseLinearDistribution, 2, "uper") 310s ***** error ... 310s cdf (PiecewiseLinearDistribution, 2, 3) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Parent") 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "PlotType", 12) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Discrete", {true}) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Parent", 12) 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "Parent", "hax") 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 310s ***** error ... 310s plot (PiecewiseLinearDistribution, "PlotType", "probability") 310s ***** error ... 310s truncate (PiecewiseLinearDistribution) 310s ***** error ... 310s truncate (PiecewiseLinearDistribution, 2) 310s ***** error ... 310s truncate (PiecewiseLinearDistribution, 4, 2) 310s ***** shared pd 310s pd = PiecewiseLinearDistribution (); 310s pd(2) = PiecewiseLinearDistribution (); 310s ***** error cdf (pd, 1) 310s ***** error icdf (pd, 0.5) 310s ***** error iqr (pd) 310s ***** error mean (pd) 310s ***** error median (pd) 310s ***** error pdf (pd, 1) 310s ***** error plot (pd) 310s ***** error random (pd) 310s ***** error std (pd) 310s ***** error ... 310s truncate (pd, 2, 4) 310s ***** error var (pd) 310s 63 tests, 63 passed, 0 known failure, 0 skipped 310s [inst/dist_obj/RicianDistribution.m] 310s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/RicianDistribution.m 310s ***** demo 310s ## Generate a data set of 5000 random samples from a Rician distribution with 310s ## parameters s = 2 and sigma = 1. Fit a Rician distribution to this data and 310s ## plot a PDF of the fitted distribution superimposed on a histogram of the data. 310s 310s pd_fixed = makedist ("Rician", "s", 2, "sigma", 1) 310s rand ("seed", 2); 310s data = random (pd_fixed, 5000, 1); 310s pd_fitted = fitdist (data, "Rician") 310s plot (pd_fitted) 310s msg = "Fitted Rician distribution with s = %0.2f and sigma = %0.2f"; 310s title (sprintf (msg, pd_fitted.s, pd_fitted.sigma)) 310s ***** shared pd, t 310s pd = RicianDistribution; 310s t = truncate (pd, 2, 4); 310s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 310s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 310s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 310s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 310s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 310s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 310s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 310s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 310s ***** assert (iqr (pd), 1.0890, 1e-4); 310s ***** assert (iqr (t), 0.5928, 1e-4); 310s ***** assert (mean (pd), 1.5486, 1e-4); 310s ***** assert (mean (t), 2.5380, 1e-4); 310s ***** assert (median (pd), 1.4755, 1e-4); 310s ***** assert (median (t), 2.4341, 1e-4); 310s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 310s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 310s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 310s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 310s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 310s ***** assert (any (random (t, 1000, 1) < 2), false); 310s ***** assert (any (random (t, 1000, 1) > 4), false); 310s ***** assert (std (pd), 0.7758, 1e-4); 310s ***** assert (std (t), 0.4294, 1e-4); 310s ***** assert (var (pd), 0.6019, 1e-4); 310s ***** assert (var (t), 0.1844, 1e-4); 310s ***** error ... 310s RicianDistribution(-eps, 1) 310s ***** error ... 310s RicianDistribution(-1, 1) 310s ***** error ... 310s RicianDistribution(Inf, 1) 310s ***** error ... 310s RicianDistribution(i, 1) 310s ***** error ... 310s RicianDistribution("a", 1) 310s ***** error ... 310s RicianDistribution([1, 2], 1) 310s ***** error ... 310s RicianDistribution(NaN, 1) 310s ***** error ... 310s RicianDistribution(1, 0) 310s ***** error ... 310s RicianDistribution(1, -1) 310s ***** error ... 310s RicianDistribution(1, Inf) 310s ***** error ... 310s RicianDistribution(1, i) 310s ***** error ... 310s RicianDistribution(1, "a") 310s ***** error ... 310s RicianDistribution(1, [1, 2]) 310s ***** error ... 310s RicianDistribution(1, NaN) 310s ***** error ... 310s cdf (RicianDistribution, 2, "uper") 310s ***** error ... 310s cdf (RicianDistribution, 2, 3) 310s ***** shared x 310s x = gevrnd (1, 1, 1, [1, 100]); 310s ***** error ... 310s paramci (RicianDistribution.fit (x), "alpha") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 0) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 1) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", "") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 311s "parameter", {"s", "sigma", "param"}) 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "parameter", "param") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "NAME", "value") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 311s ***** error ... 311s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 311s "NAME", "value") 311s ***** error ... 311s plot (RicianDistribution, "Parent") 311s ***** error ... 311s plot (RicianDistribution, "PlotType", 12) 311s ***** error ... 311s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 311s ***** error ... 311s plot (RicianDistribution, "PlotType", "pdfcdf") 311s ***** error ... 311s plot (RicianDistribution, "Discrete", "pdfcdf") 311s ***** error ... 311s plot (RicianDistribution, "Discrete", [1, 0]) 311s ***** error ... 311s plot (RicianDistribution, "Discrete", {true}) 311s ***** error ... 311s plot (RicianDistribution, "Parent", 12) 311s ***** error ... 311s plot (RicianDistribution, "Parent", "hax") 311s ***** error ... 311s plot (RicianDistribution, "invalidNAME", "pdf") 311s ***** error ... 311s plot (RicianDistribution, "PlotType", "probability") 311s ***** error ... 311s proflik (RicianDistribution, 2) 311s ***** error ... 311s proflik (RicianDistribution.fit (x), 3) 311s ***** error ... 311s proflik (RicianDistribution.fit (x), [1, 2]) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), {1}) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, ones (2)) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display") 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display", 1) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 312s ***** error ... 312s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 312s ***** error ... 312s truncate (RicianDistribution) 312s ***** error ... 312s truncate (RicianDistribution, 2) 312s ***** error ... 312s truncate (RicianDistribution, 4, 2) 312s ***** shared pd 312s pd = RicianDistribution(1, 1); 312s pd(2) = RicianDistribution(1, 3); 312s ***** error cdf (pd, 1) 312s ***** error icdf (pd, 0.5) 312s ***** error iqr (pd) 312s ***** error mean (pd) 312s ***** error median (pd) 312s ***** error negloglik (pd) 312s ***** error paramci (pd) 312s ***** error pdf (pd, 1) 312s ***** error plot (pd) 312s ***** error proflik (pd, 2) 312s ***** error random (pd) 312s ***** error std (pd) 312s ***** error ... 312s truncate (pd, 2, 4) 312s ***** error var (pd) 312s 97 tests, 97 passed, 0 known failure, 0 skipped 312s [inst/dist_obj/BirnbaumSaundersDistribution.m] 312s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/BirnbaumSaundersDistribution.m 312s ***** demo 312s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 312s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 312s ## distribution to this data and plot a PDF of the fitted distribution 312s ## superimposed on a histogram of the data. 312s 312s pd_fixed = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 312s randg ("seed", 21); 312s data = random (pd_fixed, 5000, 1); 312s pd_fitted = fitdist (data, "BirnbaumSaunders") 312s plot (pd_fitted) 312s msg = "Fitted Birnbaum-Saunders distribution with beta = %0.2f and gamma = %0.2f"; 312s title (sprintf (msg, pd_fitted.beta, pd_fitted.gamma)) 312s ***** shared pd, t 312s pd = BirnbaumSaundersDistribution; 312s t = truncate (pd, 2, 4); 312s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 312s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 312s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 312s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 312s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 312s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 312s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 312s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 312s ***** assert (iqr (pd), 1.4236, 1e-4); 312s ***** assert (iqr (t), 0.8968, 1e-4); 312s ***** assert (mean (pd), 1.5, eps); 312s ***** assert (mean (t), 2.7723, 1e-4); 312s ***** assert (median (pd), 1, 1e-4); 312s ***** assert (median (t), 2.6711, 1e-4); 312s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 312s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 312s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 312s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 312s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 312s ***** assert (any (random (t, 1000, 1) < 2), false); 312s ***** assert (any (random (t, 1000, 1) > 4), false); 312s ***** assert (std (pd), 1.5, eps); 312s ***** assert (std (t), 0.5528, 1e-4); 312s ***** assert (var (pd), 2.25, eps); 312s ***** assert (var (t), 0.3056, 1e-4); 312s ***** error ... 312s BirnbaumSaundersDistribution(0, 1) 312s ***** error ... 312s BirnbaumSaundersDistribution(Inf, 1) 312s ***** error ... 312s BirnbaumSaundersDistribution(i, 1) 312s ***** error ... 312s BirnbaumSaundersDistribution("beta", 1) 312s ***** error ... 312s BirnbaumSaundersDistribution([1, 2], 1) 312s ***** error ... 312s BirnbaumSaundersDistribution(NaN, 1) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, 0) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, -1) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, Inf) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, i) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, "beta") 312s ***** error ... 312s BirnbaumSaundersDistribution(1, [1, 2]) 312s ***** error ... 312s BirnbaumSaundersDistribution(1, NaN) 312s ***** error ... 312s cdf (BirnbaumSaundersDistribution, 2, "uper") 312s ***** error ... 312s cdf (BirnbaumSaundersDistribution, 2, 3) 312s ***** shared x 312s rand ("seed", 5); 312s x = bisarnd (1, 1, [100, 1]); 312s ***** error ... 312s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 313s "beta", "alpha", {0.05}) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), ... 313s "parameter", {"beta", "gamma", "param"}) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 313s "parameter", {"beta", "gamma", "param"}) 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 313s "parameter", "param") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 313s "NAME", "value") 313s ***** error ... 313s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 313s "parameter", "beta", "NAME", "value") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Parent") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "PlotType", 12) 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Parent", 12) 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "Parent", "hax") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 313s ***** error ... 313s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution, 2) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 3) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 313s ***** error ... 313s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 314s ***** error ... 314s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 314s ***** error ... 314s truncate (BirnbaumSaundersDistribution) 314s ***** error ... 314s truncate (BirnbaumSaundersDistribution, 2) 314s ***** error ... 314s truncate (BirnbaumSaundersDistribution, 4, 2) 314s ***** shared pd 314s pd = BirnbaumSaundersDistribution(1, 1); 314s pd(2) = BirnbaumSaundersDistribution(1, 3); 314s ***** error cdf (pd, 1) 314s ***** error icdf (pd, 0.5) 314s ***** error iqr (pd) 314s ***** error mean (pd) 314s ***** error median (pd) 314s ***** error negloglik (pd) 314s ***** error paramci (pd) 314s ***** error pdf (pd, 1) 314s ***** error plot (pd) 314s ***** error proflik (pd, 2) 314s ***** error random (pd) 314s ***** error std (pd) 314s ***** error ... 314s truncate (pd, 2, 4) 314s ***** error var (pd) 314s 96 tests, 96 passed, 0 known failure, 0 skipped 314s [inst/dist_obj/GammaDistribution.m] 314s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/GammaDistribution.m 314s ***** shared pd, t 314s pd = GammaDistribution (1, 1); 314s t = truncate (pd, 2, 4); 314s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 314s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 314s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 314s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 314s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 314s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 314s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 314s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 314s ***** assert (iqr (pd), 1.0986, 1e-4); 314s ***** assert (iqr (t), 0.8020, 1e-4); 314s ***** assert (mean (pd), 1); 314s ***** assert (mean (t), 2.6870, 1e-4); 314s ***** assert (median (pd), 0.6931, 1e-4); 314s ***** assert (median (t), 2.5662, 1e-4); 314s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 314s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 314s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 314s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 314s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 314s ***** assert (any (random (t, 1000, 1) < 2), false); 314s ***** assert (any (random (t, 1000, 1) > 4), false); 314s ***** assert (std (pd), 1); 314s ***** assert (std (t), 0.5253, 1e-4); 314s ***** assert (var (pd), 1); 314s ***** assert (var (t), 0.2759, 1e-4); 314s ***** error ... 314s GammaDistribution(0, 1) 314s ***** error ... 314s GammaDistribution(Inf, 1) 314s ***** error ... 314s GammaDistribution(i, 1) 314s ***** error ... 314s GammaDistribution("a", 1) 314s ***** error ... 314s GammaDistribution([1, 2], 1) 314s ***** error ... 314s GammaDistribution(NaN, 1) 314s ***** error ... 314s GammaDistribution(1, 0) 314s ***** error ... 314s GammaDistribution(1, -1) 314s ***** error ... 314s GammaDistribution(1, Inf) 314s ***** error ... 314s GammaDistribution(1, i) 314s ***** error ... 314s GammaDistribution(1, "a") 314s ***** error ... 314s GammaDistribution(1, [1, 2]) 314s ***** error ... 314s GammaDistribution(1, NaN) 314s ***** error ... 314s cdf (GammaDistribution, 2, "uper") 314s ***** error ... 314s cdf (GammaDistribution, 2, 3) 314s ***** shared x 314s x = gamrnd (1, 1, [100, 1]); 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 0) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 1) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", "") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 314s "parameter", {"a", "b", "param"}) 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "parameter", "param") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "NAME", "value") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 314s ***** error ... 314s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 314s "NAME", "value") 314s ***** error ... 314s plot (GammaDistribution, "Parent") 314s ***** error ... 314s plot (GammaDistribution, "PlotType", 12) 314s ***** error ... 314s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 314s ***** error ... 314s plot (GammaDistribution, "PlotType", "pdfcdf") 314s ***** error ... 314s plot (GammaDistribution, "Discrete", "pdfcdf") 314s ***** error ... 314s plot (GammaDistribution, "Discrete", [1, 0]) 314s ***** error ... 314s plot (GammaDistribution, "Discrete", {true}) 314s ***** error ... 314s plot (GammaDistribution, "Parent", 12) 314s ***** error ... 314s plot (GammaDistribution, "Parent", "hax") 314s ***** error ... 314s plot (GammaDistribution, "invalidNAME", "pdf") 314s ***** error ... 314s plot (GammaDistribution, "PlotType", "probability") 314s ***** error ... 314s proflik (GammaDistribution, 2) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 3) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), [1, 2]) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), {1}) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, ones (2)) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display") 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display", 1) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 314s ***** error ... 314s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 314s ***** error ... 314s truncate (GammaDistribution) 314s ***** error ... 314s truncate (GammaDistribution, 2) 314s ***** error ... 314s truncate (GammaDistribution, 4, 2) 314s ***** shared pd 314s pd = GammaDistribution(1, 1); 314s pd(2) = GammaDistribution(1, 3); 314s ***** error cdf (pd, 1) 314s ***** error icdf (pd, 0.5) 314s ***** error iqr (pd) 314s ***** error mean (pd) 314s ***** error median (pd) 314s ***** error negloglik (pd) 314s ***** error paramci (pd) 314s ***** error pdf (pd, 1) 314s ***** error plot (pd) 314s ***** error proflik (pd, 2) 314s ***** error random (pd) 314s ***** error std (pd) 314s ***** error ... 314s truncate (pd, 2, 4) 314s ***** error var (pd) 314s 96 tests, 96 passed, 0 known failure, 0 skipped 314s [inst/dist_obj/MultinomialDistribution.m] 314s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/MultinomialDistribution.m 314s ***** demo 314s ## Generate a data set of 5000 random samples from a Multinomial distribution 314s ## with parameters Probabilities = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]. Create 314s ## the distribution and plot the PDF superimposed on a histogram of the data. 314s 314s probs = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]; 314s pd = makedist ("Multinomial", "Probabilities", probs); 314s rand ("seed", 2); 314s data = random (pd, 5000, 1); 314s hist (data, length (probs)); 314s hold on 314s x = 1:length (probs); 314s y = pdf (pd, x) * 5000; 314s stem (x, y, "r", "LineWidth", 2); 314s hold off 314s msg = "Multinomial distribution with Probabilities = [%s]"; 314s probs_str = num2str (probs, "%0.1f "); 314s title (sprintf (msg, probs_str)) 314s ***** shared pd, t 314s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 314s t = truncate (pd, 2, 4); 314s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 314s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 314s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 314s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 314s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 314s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 314s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 314s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 314s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 314s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 314s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 314s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 314s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 314s ***** assert (iqr (pd), 2); 314s ***** assert (iqr (t), 2); 314s ***** assert (mean (pd), 3.3, 1e-14); 314s ***** assert (mean (t), 3, eps); 314s ***** assert (median (pd), 3); 314s ***** assert (median (t), 3); 314s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 314s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 314s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 314s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 314s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 314s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 314s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 314s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 314s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 314s ***** assert (std (pd), 1.4177, 1e-4); 314s ***** assert (std (t), 0.7559, 1e-4); 314s ***** assert (var (pd), 2.0100, 1e-4); 314s ***** assert (var (t), 0.5714, 1e-4); 314s ***** error ... 314s MultinomialDistribution(0) 314s ***** error ... 314s MultinomialDistribution(-1) 314s ***** error ... 314s MultinomialDistribution(Inf) 314s ***** error ... 314s MultinomialDistribution(i) 314s ***** error ... 314s MultinomialDistribution("a") 314s ***** error ... 314s MultinomialDistribution([1, 2]) 314s ***** error ... 314s MultinomialDistribution(NaN) 314s ***** error ... 314s cdf (MultinomialDistribution, 2, "uper") 314s ***** error ... 314s cdf (MultinomialDistribution, 2, 3) 314s ***** error ... 314s cdf (MultinomialDistribution, i) 314s ***** error ... 314s plot (MultinomialDistribution, "Parent") 314s ***** error ... 314s plot (MultinomialDistribution, "PlotType", 12) 314s ***** error ... 314s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 315s ***** error ... 315s plot (MultinomialDistribution, "PlotType", "pdfcdf") 315s ***** error ... 315s plot (MultinomialDistribution, "Discrete", "pdfcdf") 315s ***** error ... 315s plot (MultinomialDistribution, "Discrete", [1, 0]) 315s ***** error ... 315s plot (MultinomialDistribution, "Discrete", {true}) 315s ***** error ... 315s plot (MultinomialDistribution, "Parent", 12) 315s ***** error ... 315s plot (MultinomialDistribution, "Parent", "hax") 315s ***** error ... 315s plot (MultinomialDistribution, "invalidNAME", "pdf") 315s ***** error ... 315s plot (MultinomialDistribution, "PlotType", "probability") 315s ***** error ... 315s truncate (MultinomialDistribution) 315s ***** error ... 315s truncate (MultinomialDistribution, 2) 315s ***** error ... 315s truncate (MultinomialDistribution, 4, 2) 315s ***** shared pd 315s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 315s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 315s ***** error cdf (pd, 1) 315s ***** error icdf (pd, 0.5) 315s ***** error iqr (pd) 315s ***** error mean (pd) 315s ***** error median (pd) 315s ***** error pdf (pd, 1) 315s ***** error plot (pd) 315s ***** error random (pd) 315s ***** error std (pd) 315s ***** error ... 315s truncate (pd, 2, 4) 315s ***** error var (pd) 315s 64 tests, 64 passed, 0 known failure, 0 skipped 315s [inst/dist_obj/BinomialDistribution.m] 315s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/BinomialDistribution.m 315s ***** shared pd, t, t_inf 315s pd = BinomialDistribution (5, 0.5); 315s t = truncate (pd, 2, 4); 315s t_inf = truncate (pd, 2, Inf); 315s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 315s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 315s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 315s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 315s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 315s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 315s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 315s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 315s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 315s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 315s ***** assert (iqr (pd), 1); 315s ***** assert (iqr (t), 1); 315s ***** assert (mean (pd), 2.5, 1e-10); 315s ***** assert (mean (t), 2.8, 1e-10); 315s ***** assert (mean (t_inf), 2.8846, 1e-4); 315s ***** assert (median (pd), 2.5); 315s ***** assert (median (t), 3); 315s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 315s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 315s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 315s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 315s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 315s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 315s ***** assert (any (random (t, 1000, 1) < 2), false); 315s ***** assert (any (random (t, 1000, 1) > 4), false); 315s ***** assert (std (pd), 1.1180, 1e-4); 315s ***** assert (std (t), 0.7483, 1e-4); 315s ***** assert (std (t_inf), 0.8470, 1e-4); 315s ***** assert (var (pd), 1.2500, 1e-4); 315s ***** assert (var (t), 0.5600, 1e-4); 315s ***** assert (var (t_inf), 0.7175, 1e-4); 315s ***** error ... 315s BinomialDistribution(Inf, 0.5) 315s ***** error ... 315s BinomialDistribution(i, 0.5) 315s ***** error ... 315s BinomialDistribution("a", 0.5) 315s ***** error ... 315s BinomialDistribution([1, 2], 0.5) 315s ***** error ... 315s BinomialDistribution(NaN, 0.5) 315s ***** error ... 315s BinomialDistribution(1, 1.01) 315s ***** error ... 315s BinomialDistribution(1, -0.01) 315s ***** error ... 315s BinomialDistribution(1, Inf) 315s ***** error ... 315s BinomialDistribution(1, i) 315s ***** error ... 315s BinomialDistribution(1, "a") 315s ***** error ... 315s BinomialDistribution(1, [1, 2]) 315s ***** error ... 315s BinomialDistribution(1, NaN) 315s ***** error ... 315s cdf (BinomialDistribution, 2, "uper") 315s ***** error ... 315s cdf (BinomialDistribution, 2, 3) 315s ***** shared x 315s rand ("seed", 2); 315s x = binornd (5, 0.5, [1, 100]); 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 315s "alpha", {0.05}) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), ... 315s "parameter", {"N", "p", "param"}) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 315s "parameter", {"N", "p", "param"}) 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 315s "parameter", "param") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 315s "NAME", "value") 315s ***** error ... 315s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 315s "parameter", "p", "NAME", "value") 315s ***** error ... 315s plot (BinomialDistribution, "Parent") 315s ***** error ... 315s plot (BinomialDistribution, "PlotType", 12) 315s ***** error ... 315s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 315s ***** error ... 315s plot (BinomialDistribution, "PlotType", "pdfcdf") 315s ***** error ... 315s plot (BinomialDistribution, "Discrete", "pdfcdf") 315s ***** error ... 315s plot (BinomialDistribution, "Discrete", [1, 0]) 315s ***** error ... 315s plot (BinomialDistribution, "Discrete", {true}) 315s ***** error ... 315s plot (BinomialDistribution, "Parent", 12) 315s ***** error ... 315s plot (BinomialDistribution, "Parent", "hax") 315s ***** error ... 315s plot (BinomialDistribution, "invalidNAME", "pdf") 315s ***** error ... 315s plot (BinomialDistribution, "PlotType", "probability") 315s ***** error ... 315s proflik (BinomialDistribution, 2) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 3) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), {1}) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 315s ***** error ... 315s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 315s ***** error ... 315s truncate (BinomialDistribution) 315s ***** error ... 315s truncate (BinomialDistribution, 2) 315s ***** error ... 315s truncate (BinomialDistribution, 4, 2) 315s ***** shared pd 315s pd = BinomialDistribution(1, 0.5); 315s pd(2) = BinomialDistribution(1, 0.6); 315s ***** error cdf (pd, 1) 315s ***** error icdf (pd, 0.5) 315s ***** error iqr (pd) 315s ***** error mean (pd) 315s ***** error median (pd) 315s ***** error negloglik (pd) 315s ***** error paramci (pd) 315s ***** error pdf (pd, 1) 315s ***** error plot (pd) 315s ***** error proflik (pd, 2) 315s ***** error random (pd) 315s ***** error std (pd) 315s ***** error ... 315s truncate (pd, 2, 4) 315s ***** error var (pd) 315s 102 tests, 102 passed, 0 known failure, 0 skipped 315s [inst/dist_obj/RayleighDistribution.m] 315s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/RayleighDistribution.m 315s ***** demo 315s ## Generate a data set of 5000 random samples from a Rayleigh distribution with 315s ## parameter sigma = 2. Fit a Rayleigh distribution to this data and plot 315s ## a PDF of the fitted distribution superimposed on a histogram of the data. 315s 315s pd_fixed = makedist ("Rayleigh", "sigma", 2) 315s rand ("seed", 2); 315s data = random (pd_fixed, 5000, 1); 315s pd_fitted = fitdist (data, "Rayleigh") 315s plot (pd_fitted) 315s msg = "Fitted Rayleigh distribution with sigma = %0.2f"; 315s title (sprintf (msg, pd_fitted.sigma)) 315s ***** shared pd, t 315s pd = RayleighDistribution; 315s t = truncate (pd, 2, 4); 315s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 315s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 315s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 315s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 315s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 315s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 315s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 315s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 315s ***** assert (iqr (pd), 0.9066, 1e-4); 315s ***** assert (iqr (t), 0.4609, 1e-4); 315s ***** assert (mean (pd), 1.2533, 1e-4); 315s ***** assert (mean (t), 2.4169, 1e-4); 315s ***** assert (median (pd), 1.1774, 1e-4); 315s ***** assert (median (t), 2.3198, 1e-4); 315s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 315s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 315s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 315s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 315s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 315s ***** assert (any (random (t, 1000, 1) < 2), false); 315s ***** assert (any (random (t, 1000, 1) > 4), false); 315s ***** assert (std (pd), 0.6551, 1e-4); 315s ***** assert (std (t), 0.3591, 1e-4); 315s ***** assert (var (pd), 0.4292, 1e-4); 315s ***** assert (var (t), 0.1290, 1e-4); 315s ***** error ... 315s RayleighDistribution(0) 315s ***** error ... 315s RayleighDistribution(-1) 315s ***** error ... 315s RayleighDistribution(Inf) 315s ***** error ... 315s RayleighDistribution(i) 315s ***** error ... 315s RayleighDistribution("a") 315s ***** error ... 315s RayleighDistribution([1, 2]) 315s ***** error ... 315s RayleighDistribution(NaN) 315s ***** error ... 315s cdf (RayleighDistribution, 2, "uper") 315s ***** error ... 315s cdf (RayleighDistribution, 2, 3) 315s ***** shared x 315s x = raylrnd (1, [1, 100]); 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha") 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha", 0) 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha", 1) 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha", "") 315s ***** error ... 315s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 316s "parameter", {"sigma", "param"}) 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "parameter", "param") 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "NAME", "value") 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 316s ***** error ... 316s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 316s "parameter", "sigma", "NAME", "value") 316s ***** error ... 316s plot (RayleighDistribution, "Parent") 316s ***** error ... 316s plot (RayleighDistribution, "PlotType", 12) 316s ***** error ... 316s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 316s ***** error ... 316s plot (RayleighDistribution, "PlotType", "pdfcdf") 316s ***** error ... 316s plot (RayleighDistribution, "Discrete", "pdfcdf") 316s ***** error ... 316s plot (RayleighDistribution, "Discrete", [1, 0]) 316s ***** error ... 316s plot (RayleighDistribution, "Discrete", {true}) 316s ***** error ... 316s plot (RayleighDistribution, "Parent", 12) 316s ***** error ... 316s plot (RayleighDistribution, "Parent", "hax") 316s ***** error ... 316s plot (RayleighDistribution, "invalidNAME", "pdf") 316s ***** error ... 316s plot (RayleighDistribution, "PlotType", "probability") 316s ***** error ... 316s proflik (RayleighDistribution, 2) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 3) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), [1, 2]) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), {1}) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, ones (2)) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display") 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 316s ***** error ... 316s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 316s ***** error ... 316s truncate (RayleighDistribution) 316s ***** error ... 316s truncate (RayleighDistribution, 2) 316s ***** error ... 316s truncate (RayleighDistribution, 4, 2) 316s ***** shared pd 316s pd = RayleighDistribution(1); 316s pd(2) = RayleighDistribution(3); 316s ***** error cdf (pd, 1) 316s ***** error icdf (pd, 0.5) 316s ***** error iqr (pd) 316s ***** error mean (pd) 316s ***** error median (pd) 316s ***** error negloglik (pd) 316s ***** error paramci (pd) 316s ***** error pdf (pd, 1) 316s ***** error plot (pd) 316s ***** error proflik (pd, 2) 316s ***** error random (pd) 316s ***** error std (pd) 316s ***** error ... 316s truncate (pd, 2, 4) 316s ***** error var (pd) 316s 90 tests, 90 passed, 0 known failure, 0 skipped 316s [inst/dist_obj/GeneralizedParetoDistribution.m] 316s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/GeneralizedParetoDistribution.m 316s ***** shared pd, t 316s pd = GeneralizedParetoDistribution (1, 1, 1); 316s t = truncate (pd, 2, 4); 316s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 316s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 316s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 316s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 316s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 316s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 316s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 316s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 316s ***** assert (iqr (pd), 2.6667, 1e-4); 316s ***** assert (iqr (t), 0.9143, 1e-4); 316s ***** assert (mean (pd), Inf); 316s ***** assert (mean (t), 2.7726, 1e-4); 316s ***** assert (median (pd), 2); 316s ***** assert (median (t), 2.6667, 1e-4); 316s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 316s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 316s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 316s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 316s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 316s ***** assert (any (random (t, 1000, 1) < 2), false); 316s ***** assert (any (random (t, 1000, 1) > 4), false); 316s ***** assert (std (pd), Inf); 316s ***** assert (std (t), 0.5592, 1e-4); 316s ***** assert (var (pd), Inf); 316s ***** assert (var (t), 0.3128, 1e-4); 316s ***** error ... 316s GeneralizedParetoDistribution(Inf, 1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(i, 1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution("a", 1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution([1, 2], 1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(NaN, 1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, 0, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, -1, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, Inf, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, i, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, "a", 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, [1, 2], 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, NaN, 1) 316s ***** error ... 316s GeneralizedParetoDistribution(1, 1, Inf) 316s ***** error ... 316s GeneralizedParetoDistribution(1, 1, i) 316s ***** error ... 316s GeneralizedParetoDistribution(1, 1, "a") 316s ***** error ... 316s GeneralizedParetoDistribution(1, 1, [1, 2]) 316s ***** error ... 316s GeneralizedParetoDistribution(1, 1, NaN) 316s ***** error ... 316s cdf (GeneralizedParetoDistribution, 2, "uper") 316s ***** error ... 316s cdf (GeneralizedParetoDistribution, 2, 3) 316s ***** shared x 316s x = gprnd (1, 1, 1, [1, 100]); 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 316s "parameter", "sigma", "alpha", {0.05}) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 316s "parameter", {"k", "sigma", "param"}) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 316s "parameter", {"k", "sigma", "param"}) 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 316s "parameter", "param") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 316s "NAME", "value") 316s ***** error ... 316s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 316s "parameter", "sigma", "NAME", "value") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Parent") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "PlotType", 12) 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Discrete", {true}) 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Parent", 12) 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "Parent", "hax") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 316s ***** error ... 316s plot (GeneralizedParetoDistribution, "PlotType", "probability") 316s ***** error ... 316s proflik (GeneralizedParetoDistribution, 2) 316s ***** error ... 316s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 316s ***** error ... 316s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 317s "Display", ["on"; "on"]) 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 317s ***** error ... 317s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 317s "Display", "on") 317s ***** error ... 317s truncate (GeneralizedParetoDistribution) 317s ***** error ... 317s truncate (GeneralizedParetoDistribution, 2) 317s ***** error ... 317s truncate (GeneralizedParetoDistribution, 4, 2) 317s ***** shared pd 317s pd = GeneralizedParetoDistribution(1, 1, 1); 317s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 317s ***** error cdf (pd, 1) 317s ***** error icdf (pd, 0.5) 317s ***** error iqr (pd) 317s ***** error mean (pd) 317s ***** error median (pd) 317s ***** error negloglik (pd) 317s ***** error paramci (pd) 317s ***** error pdf (pd, 1) 317s ***** error plot (pd) 317s ***** error proflik (pd, 2) 317s ***** error random (pd) 317s ***** error std (pd) 317s ***** error ... 317s truncate (pd, 2, 4) 317s ***** error var (pd) 317s 100 tests, 100 passed, 0 known failure, 0 skipped 317s [inst/dist_obj/InverseGaussianDistribution.m] 317s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/InverseGaussianDistribution.m 317s ***** shared pd, t 317s pd = InverseGaussianDistribution (1, 1); 317s t = truncate (pd, 2, 4); 317s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 317s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 317s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 317s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 317s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 317s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 317s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 317s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 317s ***** assert (iqr (pd), 0.8643, 1e-4); 317s ***** assert (iqr (t), 0.8222, 1e-4); 317s ***** assert (mean (pd), 1); 317s ***** assert (mean (t), 2.6953, 1e-4); 317s ***** assert (median (pd), 0.6758, 1e-4); 317s ***** assert (median (t), 2.5716, 1e-4); 317s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 317s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 317s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 317s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 317s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 317s ***** assert (any (random (t, 1000, 1) < 2), false); 317s ***** assert (any (random (t, 1000, 1) > 4), false); 317s ***** assert (std (pd), 1); 317s ***** assert (std (t), 0.5332, 1e-4); 317s ***** assert (var (pd), 1); 317s ***** assert (var (t), 0.2843, 1e-4); 317s ***** error ... 317s InverseGaussianDistribution(0, 1) 317s ***** error ... 317s InverseGaussianDistribution(Inf, 1) 317s ***** error ... 317s InverseGaussianDistribution(i, 1) 317s ***** error ... 317s InverseGaussianDistribution("a", 1) 317s ***** error ... 317s InverseGaussianDistribution([1, 2], 1) 317s ***** error ... 317s InverseGaussianDistribution(NaN, 1) 317s ***** error ... 317s InverseGaussianDistribution(1, 0) 317s ***** error ... 317s InverseGaussianDistribution(1, -1) 317s ***** error ... 317s InverseGaussianDistribution(1, Inf) 317s ***** error ... 317s InverseGaussianDistribution(1, i) 317s ***** error ... 317s InverseGaussianDistribution(1, "a") 317s ***** error ... 317s InverseGaussianDistribution(1, [1, 2]) 317s ***** error ... 317s InverseGaussianDistribution(1, NaN) 317s ***** error ... 317s cdf (InverseGaussianDistribution, 2, "uper") 317s ***** error ... 317s cdf (InverseGaussianDistribution, 2, 3) 317s ***** shared x 317s x = invgrnd (1, 1, [1, 100]); 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 317s "alpha", {0.05}) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), ... 317s "parameter", {"mu", "lambda", "param"}) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 317s "parameter", {"mu", "lambda", "param"}) 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 317s "parameter", "param") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 317s ***** error ... 317s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 317s "parameter", "mu", "NAME", "value") 317s ***** error ... 317s plot (InverseGaussianDistribution, "Parent") 317s ***** error ... 317s plot (InverseGaussianDistribution, "PlotType", 12) 317s ***** error ... 317s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 317s ***** error ... 317s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 317s ***** error ... 317s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 317s ***** error ... 317s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 317s ***** error ... 317s plot (InverseGaussianDistribution, "Discrete", {true}) 317s ***** error ... 317s plot (InverseGaussianDistribution, "Parent", 12) 317s ***** error ... 317s plot (InverseGaussianDistribution, "Parent", "hax") 317s ***** error ... 317s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 317s ***** error ... 317s plot (InverseGaussianDistribution, "PlotType", "probability") 317s ***** error ... 317s proflik (InverseGaussianDistribution, 2) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 3) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), {1}) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 317s ***** error ... 317s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 317s ***** error ... 317s truncate (InverseGaussianDistribution) 317s ***** error ... 317s truncate (InverseGaussianDistribution, 2) 317s ***** error ... 317s truncate (InverseGaussianDistribution, 4, 2) 317s ***** shared pd 317s pd = InverseGaussianDistribution(1, 1); 317s pd(2) = InverseGaussianDistribution(1, 3); 317s ***** error cdf (pd, 1) 317s ***** error icdf (pd, 0.5) 317s ***** error iqr (pd) 317s ***** error mean (pd) 317s ***** error median (pd) 317s ***** error negloglik (pd) 317s ***** error paramci (pd) 317s ***** error pdf (pd, 1) 317s ***** error plot (pd) 317s ***** error proflik (pd, 2) 317s ***** error random (pd) 317s ***** error std (pd) 317s ***** error ... 317s truncate (pd, 2, 4) 317s ***** error var (pd) 317s 96 tests, 96 passed, 0 known failure, 0 skipped 317s [inst/dist_obj/tLocationScaleDistribution.m] 317s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/tLocationScaleDistribution.m 317s ***** demo 317s ## Generate a data set of 5000 random samples from a t Location-Scale distribution 317s ## with parameters mu = 0, sigma = 1, and nu = 5. Fit a t Location-Scale 317s ## distribution to this data and plot a PDF of the fitted distribution 317s ## superimposed on a histogram of the data. 317s 317s pd_fixed = makedist ("tLocationScale", "mu", 0, "sigma", 1, "nu", 5); 317s rand ("seed", 2); 317s data = random (pd_fixed, 5000, 1); 317s pd_fitted = fitdist (data, "tLocationScale"); 317s plot (pd_fitted); 317s msg = "Fitted t Location-Scale distribution with mu = %0.2f, sigma = %0.2f, nu = %0.2f"; 317s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma, pd_fitted.nu)); 317s ***** shared pd, t 317s pd = tLocationScaleDistribution; 317s t = truncate (pd, 2, 4); 317s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 317s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 317s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 317s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 317s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 317s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 318s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 318s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 318s ***** assert (iqr (pd), 1.4534, 1e-4); 318s ***** assert (iqr (t), 0.7139, 1e-4); 318s ***** assert (mean (pd), 0, eps); 318s ***** assert (mean (t), 2.6099, 1e-4); 318s ***** assert (median (pd), 0, eps); 318s ***** assert (median (t), 2.4758, 1e-4); 318s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 318s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 318s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 318s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 318s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 318s ***** assert (any (random (t, 1000, 1) < 2), false); 318s ***** assert (any (random (t, 1000, 1) > 4), false); 318s ***** assert (std (pd), 1.2910, 1e-4); 318s ***** assert (std (t), 0.4989, 1e-4); 318s ***** assert (var (pd), 1.6667, 1e-4); 318s ***** assert (var (t), 0.2489, 1e-4); 318s ***** error ... 318s tLocationScaleDistribution(i, 1, 1) 318s ***** error ... 318s tLocationScaleDistribution(Inf, 1, 1) 318s ***** error ... 318s tLocationScaleDistribution([1, 2], 1, 1) 318s ***** error ... 318s tLocationScaleDistribution("a", 1, 1) 318s ***** error ... 318s tLocationScaleDistribution(NaN, 1, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, 0, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, -1, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, Inf, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, i, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, "a", 1) 318s ***** error ... 318s tLocationScaleDistribution(0, [1, 2], 1) 318s ***** error ... 318s tLocationScaleDistribution(0, NaN, 1) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, 0) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, -1) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, Inf) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, i) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, "a") 318s ***** error ... 318s tLocationScaleDistribution(0, 1, [1, 2]) 318s ***** error ... 318s tLocationScaleDistribution(0, 1, NaN) 318s ***** error ... 318s cdf (tLocationScaleDistribution, 2, "uper") 318s ***** error ... 318s cdf (tLocationScaleDistribution, 2, 3) 318s ***** shared x 318s x = tlsrnd (0, 1, 1, [1, 100]); 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha") 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 318s "alpha", {0.05}) 318s ***** error ... 318s paramci (tLocationScaleDistribution.fit (x), ... 318s "parameter", {"mu", "sigma", "nu", "param"}) 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 319s "parameter", {"mu", "sigma", "nu", "param"}) 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 319s "parameter", "param") 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 319s ***** error ... 319s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 319s "parameter", "mu", "NAME", "value") 319s ***** error ... 319s plot (tLocationScaleDistribution, "Parent") 319s ***** error ... 319s plot (tLocationScaleDistribution, "PlotType", 12) 319s ***** error ... 319s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 319s ***** error ... 319s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 319s ***** error ... 319s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 319s ***** error ... 319s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 319s ***** error ... 319s plot (tLocationScaleDistribution, "Discrete", {true}) 319s ***** error ... 319s plot (tLocationScaleDistribution, "Parent", 12) 319s ***** error ... 319s plot (tLocationScaleDistribution, "Parent", "hax") 319s ***** error ... 319s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 319s ***** error ... 319s plot (tLocationScaleDistribution, "PlotType", "probability") 319s ***** error ... 319s proflik (tLocationScaleDistribution, 2) 319s ***** error ... 319s proflik (tLocationScaleDistribution.fit (x), 4) 319s ***** error ... 319s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 319s ***** error ... 319s proflik (tLocationScaleDistribution.fit (x), {1}) 319s ***** error ... 319s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 319s ***** error ... 319s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 320s ***** error ... 320s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 320s ***** error ... 320s truncate (tLocationScaleDistribution) 320s ***** error ... 320s truncate (tLocationScaleDistribution, 2) 320s ***** error ... 320s truncate (tLocationScaleDistribution, 4, 2) 320s ***** shared pd 320s pd = tLocationScaleDistribution (0, 1, 1); 320s pd(2) = tLocationScaleDistribution (0, 1, 3); 320s ***** error cdf (pd, 1) 320s ***** error icdf (pd, 0.5) 320s ***** error iqr (pd) 320s ***** error mean (pd) 320s ***** error median (pd) 320s ***** error negloglik (pd) 320s ***** error paramci (pd) 320s ***** error pdf (pd, 1) 320s ***** error plot (pd) 320s ***** error proflik (pd, 2) 320s ***** error random (pd) 320s ***** error std (pd) 320s ***** error ... 320s truncate (pd, 2, 4) 320s ***** error var (pd) 320s 102 tests, 102 passed, 0 known failure, 0 skipped 320s [inst/dist_obj/BurrDistribution.m] 320s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/BurrDistribution.m 320s ***** demo 320s ## Generate a data set of 5000 random samples from a Burr type XII 320s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 320s ## XII distribution to this data and plot a PDF of the fitted distribution 320s ## superimposed on a histogram of the data 320s 320s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 320s rand ("seed", 21); 320s data = random (pd, 5000, 1); 320s pd = fitdist (data, "Burr") 320s plot (pd) 320s msg = strcat (["Fitted Burr type XII distribution with"], ... 320s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 320s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 320s ***** shared pd, t 320s pd = BurrDistribution; 320s t = truncate (pd, 2, 4); 320s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 320s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 320s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 320s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 320s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 320s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 320s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 320s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 320s ***** assert (iqr (pd), 2.6667, 1e-4); 320s ***** assert (iqr (t), 0.9524, 1e-4); 320s ***** assert (mean (pd), Inf); 320s ***** assert (mean (t), 2.8312, 1e-4); 320s ***** assert (median (pd), 1, 1e-4); 320s ***** assert (median (t), 2.75, 1e-4); 321s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 321s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 321s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 321s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 321s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 321s ***** assert (any (random (t, 1000, 1) < 2), false); 321s ***** assert (any (random (t, 1000, 1) > 4), false); 321s ***** assert (std (pd), Inf); 321s ***** assert (std (t), 0.5674, 1e-4); 321s ***** assert (var (pd), Inf); 321s ***** assert (var (t), 0.3220, 1e-4); 321s ***** error ... 321s BurrDistribution(0, 1, 1) 321s ***** error ... 321s BurrDistribution(-1, 1, 1) 321s ***** error ... 321s BurrDistribution(Inf, 1, 1) 321s ***** error ... 321s BurrDistribution(i, 1, 1) 321s ***** error ... 321s BurrDistribution("a", 1, 1) 321s ***** error ... 321s BurrDistribution([1, 2], 1, 1) 321s ***** error ... 321s BurrDistribution(NaN, 1, 1) 321s ***** error ... 321s BurrDistribution(1, 0, 1) 321s ***** error ... 321s BurrDistribution(1, -1, 1) 321s ***** error ... 321s BurrDistribution(1, Inf, 1) 321s ***** error ... 321s BurrDistribution(1, i, 1) 321s ***** error ... 321s BurrDistribution(1, "a", 1) 321s ***** error ... 321s BurrDistribution(1, [1, 2], 1) 321s ***** error ... 321s BurrDistribution(1, NaN, 1) 321s ***** error ... 321s BurrDistribution(1, 1, 0) 321s ***** error ... 321s BurrDistribution(1, 1, -1) 321s ***** error ... 321s BurrDistribution(1, 1, Inf) 321s ***** error ... 321s BurrDistribution(1, 1, i) 321s ***** error ... 321s BurrDistribution(1, 1, "a") 321s ***** error ... 321s BurrDistribution(1, 1, [1, 2]) 321s ***** error ... 321s BurrDistribution(1, 1, NaN) 321s ***** error ... 321s cdf (BurrDistribution, 2, "uper") 321s ***** error ... 321s cdf (BurrDistribution, 2, 3) 321s ***** shared x 321s rand ("seed", 4); 321s x = burrrnd (1, 1, 1, [1, 100]); 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha") 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", 0) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", 1) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", "") 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 321s "parameter", {"alpha", "c", "k", "param"}) 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "parameter", "param") 321s ***** error ... 321s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 322s ***** error ... 322s paramci (BurrDistribution.fit (x), "NAME", "value") 322s ***** error ... 322s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 322s ***** error ... 322s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 322s "NAME", "value") 322s ***** error ... 322s plot (BurrDistribution, "Parent") 322s ***** error ... 322s plot (BurrDistribution, "PlotType", 12) 322s ***** error ... 322s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 322s ***** error ... 322s plot (BurrDistribution, "PlotType", "pdfcdf") 322s ***** error ... 322s plot (BurrDistribution, "Discrete", "pdfcdf") 322s ***** error ... 322s plot (BurrDistribution, "Discrete", [1, 0]) 322s ***** error ... 322s plot (BurrDistribution, "Discrete", {true}) 322s ***** error ... 322s plot (BurrDistribution, "Parent", 12) 322s ***** error ... 322s plot (BurrDistribution, "Parent", "hax") 322s ***** error ... 322s plot (BurrDistribution, "invalidNAME", "pdf") 322s ***** error ... 322s plot (BurrDistribution, "PlotType", "probability") 322s ***** error ... 322s proflik (BurrDistribution, 2) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 4) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), [1, 2]) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), {1}) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, ones (2)) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display") 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display", 1) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 322s ***** error ... 322s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 323s ***** error ... 323s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 323s ***** error ... 323s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 323s ***** error ... 323s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 323s ***** error ... 323s truncate (BurrDistribution) 323s ***** error ... 323s truncate (BurrDistribution, 2) 323s ***** error ... 323s truncate (BurrDistribution, 4, 2) 323s ***** shared pd 323s pd = BurrDistribution(1, 1, 1); 323s pd(2) = BurrDistribution(1, 3, 1); 323s ***** error cdf (pd, 1) 323s ***** error icdf (pd, 0.5) 323s ***** error iqr (pd) 323s ***** error mean (pd) 323s ***** error median (pd) 323s ***** error negloglik (pd) 323s ***** error paramci (pd) 323s ***** error pdf (pd, 1) 323s ***** error plot (pd) 323s ***** error proflik (pd, 2) 323s ***** error random (pd) 323s ***** error std (pd) 323s ***** error ... 323s truncate (pd, 2, 4) 323s ***** error var (pd) 323s 104 tests, 104 passed, 0 known failure, 0 skipped 323s [inst/dist_obj/HalfNormalDistribution.m] 323s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/HalfNormalDistribution.m 323s ***** shared pd, t 323s pd = HalfNormalDistribution (0, 1); 323s t = truncate (pd, 2, 4); 323s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 323s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 323s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 323s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 323s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 323s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 323s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 323s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 323s ***** assert (iqr (pd), 0.8317, 1e-4); 323s ***** assert (iqr (t), 0.4111, 1e-4); 323s ***** assert (mean (pd), 0.7979, 1e-4); 323s ***** assert (mean (t), 2.3706, 1e-4); 323s ***** assert (median (pd), 0.6745, 1e-4); 323s ***** assert (median (t), 2.2771, 1e-4); 323s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 323s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 323s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 323s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 323s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 323s ***** assert (any (random (t, 1000, 1) < 2), false); 323s ***** assert (any (random (t, 1000, 1) > 4), false); 323s ***** assert (std (pd), 0.6028, 1e-4); 323s ***** assert (std (t), 0.3310, 1e-4); 323s ***** assert (var (pd), 0.3634, 1e-4); 323s ***** assert (var (t), 0.1096, 1e-4); 323s ***** error ... 323s HalfNormalDistribution(Inf, 1) 323s ***** error ... 323s HalfNormalDistribution(i, 1) 323s ***** error ... 323s HalfNormalDistribution("a", 1) 323s ***** error ... 323s HalfNormalDistribution([1, 2], 1) 323s ***** error ... 323s HalfNormalDistribution(NaN, 1) 323s ***** error ... 323s HalfNormalDistribution(1, 0) 323s ***** error ... 323s HalfNormalDistribution(1, -1) 323s ***** error ... 323s HalfNormalDistribution(1, Inf) 323s ***** error ... 323s HalfNormalDistribution(1, i) 323s ***** error ... 323s HalfNormalDistribution(1, "a") 323s ***** error ... 323s HalfNormalDistribution(1, [1, 2]) 323s ***** error ... 323s HalfNormalDistribution(1, NaN) 323s ***** error ... 323s cdf (HalfNormalDistribution, 2, "uper") 323s ***** error ... 323s cdf (HalfNormalDistribution, 2, 3) 323s ***** shared x 323s x = hnrnd (1, 1, [1, 100]); 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 323s "alpha", {0.05}) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), ... 323s "parameter", {"mu", "sigma", "param"}) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 323s "parameter", {"mu", "sigma", "param"}) 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 323s "parameter", "param") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 323s "NAME", "value") 323s ***** error ... 323s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 323s "parameter", "sigma", "NAME", "value") 324s ***** error ... 324s plot (HalfNormalDistribution, "Parent") 324s ***** error ... 324s plot (HalfNormalDistribution, "PlotType", 12) 324s ***** error ... 324s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 324s ***** error ... 324s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 324s ***** error ... 324s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 324s ***** error ... 324s plot (HalfNormalDistribution, "Discrete", [1, 0]) 324s ***** error ... 324s plot (HalfNormalDistribution, "Discrete", {true}) 324s ***** error ... 324s plot (HalfNormalDistribution, "Parent", 12) 324s ***** error ... 324s plot (HalfNormalDistribution, "Parent", "hax") 324s ***** error ... 324s plot (HalfNormalDistribution, "invalidNAME", "pdf") 324s ***** error ... 324s plot (HalfNormalDistribution, "PlotType", "probability") 324s ***** error ... 324s proflik (HalfNormalDistribution, 2) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 3) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), {1}) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 1) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 324s ***** error ... 324s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 324s "Display", "on") 324s ***** error ... 324s truncate (HalfNormalDistribution) 324s ***** error ... 324s truncate (HalfNormalDistribution, 2) 324s ***** error ... 324s truncate (HalfNormalDistribution, 4, 2) 324s ***** shared pd 324s pd = HalfNormalDistribution(1, 1); 324s pd(2) = HalfNormalDistribution(1, 3); 324s ***** error cdf (pd, 1) 324s ***** error icdf (pd, 0.5) 324s ***** error iqr (pd) 324s ***** error mean (pd) 324s ***** error median (pd) 324s ***** error negloglik (pd) 324s ***** error paramci (pd) 324s ***** error pdf (pd, 1) 324s ***** error plot (pd) 324s ***** error proflik (pd, 2) 324s ***** error random (pd) 324s ***** error std (pd) 324s ***** error ... 324s truncate (pd, 2, 4) 324s ***** error var (pd) 324s 96 tests, 96 passed, 0 known failure, 0 skipped 324s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 324s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 324s ***** shared pd, t 324s pd = GeneralizedExtremeValueDistribution; 324s t = truncate (pd, 2, 4); 324s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 324s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 324s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 324s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 324s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 324s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 324s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 324s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 324s ***** assert (iqr (pd), 1.5725, 1e-4); 324s ***** assert (iqr (t), 0.8164, 1e-4); 324s ***** assert (mean (pd), 0.5772, 1e-4); 324s ***** assert (mean (t), 2.7043, 1e-4); 324s ***** assert (median (pd), 0.3665, 1e-4); 324s ***** assert (median (t), 2.5887, 1e-4); 324s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 324s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 324s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 324s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 324s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 324s ***** assert (any (random (t, 1000, 1) < 2), false); 324s ***** assert (any (random (t, 1000, 1) > 4), false); 324s ***** assert (std (pd), 1.2825, 1e-4); 324s ***** assert (std (t), 0.5289, 1e-4); 324s ***** assert (var (pd), 1.6449, 1e-4); 324s ***** assert (var (t), 0.2798, 1e-4); 324s ***** error ... 324s GeneralizedExtremeValueDistribution(Inf, 1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(i, 1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution("a", 1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(NaN, 1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 0, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, -1, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, Inf, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, i, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, "a", 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, NaN, 1) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 1, Inf) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 1, i) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 1, "a") 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 324s ***** error ... 324s GeneralizedExtremeValueDistribution(1, 1, NaN) 324s ***** error ... 324s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 324s ***** error ... 324s cdf (GeneralizedExtremeValueDistribution, 2, 3) 324s ***** shared x 324s x = gevrnd (1, 1, 1, [1, 100]); 324s ***** error ... 324s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 324s ***** error ... 324s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 325s "parameter", "sigma", "alpha", {0.05}) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 325s "parameter", {"k", "sigma", "mu", "param"}) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 325s "parameter", {"k", "sigma", "mu", "param"}) 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 325s "parameter", "param") 325s ***** error ... 325s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 326s ***** error ... 326s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 326s "NAME", "value") 326s ***** error ... 326s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 326s "parameter", "sigma", "NAME", "value") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Parent") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 326s ***** error ... 326s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution, 2) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 326s ***** error ... 326s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 327s ***** error ... 327s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 327s "Display", ["on"; "on"]) 327s ***** error ... 327s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 327s ***** error ... 327s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 327s ***** error ... 327s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 327s ***** error ... 327s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 327s "Display", "on") 327s ***** error ... 327s truncate (GeneralizedExtremeValueDistribution) 327s ***** error ... 327s truncate (GeneralizedExtremeValueDistribution, 2) 327s ***** error ... 327s truncate (GeneralizedExtremeValueDistribution, 4, 2) 327s ***** shared pd 327s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 327s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 327s ***** error cdf (pd, 1) 327s ***** error icdf (pd, 0.5) 327s ***** error iqr (pd) 327s ***** error mean (pd) 327s ***** error median (pd) 327s ***** error negloglik (pd) 327s ***** error paramci (pd) 327s ***** error pdf (pd, 1) 327s ***** error plot (pd) 327s ***** error proflik (pd, 2) 327s ***** error random (pd) 327s ***** error std (pd) 327s ***** error ... 327s truncate (pd, 2, 4) 327s ***** error var (pd) 327s 100 tests, 100 passed, 0 known failure, 0 skipped 327s [inst/dist_obj/LognormalDistribution.m] 327s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/LognormalDistribution.m 327s ***** demo 327s ## Generate a data set of 5000 random samples from a Lognormal distribution with 327s ## parameters mu = 0 and sigma = 1. Fit a Lognormal distribution to this data and plot 327s ## a PDF of the fitted distribution superimposed on a histogram of the data. 327s 327s pd_fixed = makedist ("Lognormal", "mu", 0, "sigma", 1) 327s randn ("seed", 2); 327s data = random (pd_fixed, 5000, 1); 327s pd_fitted = fitdist (data, "Lognormal") 327s plot (pd_fitted) 327s msg = "Fitted Lognormal distribution with mu = %0.2f and sigma = %0.2f"; 327s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 327s ***** shared pd, t 327s pd = LognormalDistribution; 327s t = truncate (pd, 2, 4); 327s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 327s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 327s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 327s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 327s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 327s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 327s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 327s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 327s ***** assert (iqr (pd), 1.4536, 1e-4); 327s ***** assert (iqr (t), 0.8989, 1e-4); 327s ***** assert (mean (pd), 1.6487, 1e-4); 327s ***** assert (mean (t), 2.7692, 1e-4); 327s ***** assert (median (pd), 1, 1e-4); 327s ***** assert (median (t), 2.6653, 1e-4); 327s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 327s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 327s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 327s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 327s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 327s ***** assert (any (random (t, 1000, 1) < 2), false); 327s ***** assert (any (random (t, 1000, 1) > 4), false); 327s ***** assert (std (pd), 2.1612, 1e-4); 327s ***** assert (std (t), 0.5540, 1e-4); 327s ***** assert (var (pd), 4.6708, 1e-4); 327s ***** assert (var (t), 0.3069, 1e-4); 327s ***** error ... 327s LognormalDistribution(Inf, 1) 327s ***** error ... 327s LognormalDistribution(i, 1) 327s ***** error ... 327s LognormalDistribution("a", 1) 327s ***** error ... 327s LognormalDistribution([1, 2], 1) 327s ***** error ... 327s LognormalDistribution(NaN, 1) 327s ***** error ... 327s LognormalDistribution(1, 0) 327s ***** error ... 327s LognormalDistribution(1, -1) 327s ***** error ... 327s LognormalDistribution(1, Inf) 327s ***** error ... 327s LognormalDistribution(1, i) 327s ***** error ... 327s LognormalDistribution(1, "a") 327s ***** error ... 327s LognormalDistribution(1, [1, 2]) 327s ***** error ... 327s LognormalDistribution(1, NaN) 327s ***** error ... 327s cdf (LognormalDistribution, 2, "uper") 327s ***** error ... 327s cdf (LognormalDistribution, 2, 3) 327s ***** shared x 327s randn ("seed", 1); 327s x = lognrnd (1, 1, [1, 100]); 327s ***** error ... 327s paramci (LognormalDistribution.fit (x), "alpha") 327s ***** error ... 327s paramci (LognormalDistribution.fit (x), "alpha", 0) 327s ***** error ... 327s paramci (LognormalDistribution.fit (x), "alpha", 1) 327s ***** error ... 327s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", "") 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 328s "parameter", {"mu", "sigma", "param"}) 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "parameter", "param") 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "NAME", "value") 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 328s ***** error ... 328s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 328s "NAME", "value") 328s ***** error ... 328s plot (LognormalDistribution, "Parent") 328s ***** error ... 328s plot (LognormalDistribution, "PlotType", 12) 328s ***** error ... 328s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 328s ***** error ... 328s plot (LognormalDistribution, "PlotType", "pdfcdf") 328s ***** error ... 328s plot (LognormalDistribution, "Discrete", "pdfcdf") 328s ***** error ... 328s plot (LognormalDistribution, "Discrete", [1, 0]) 328s ***** error ... 328s plot (LognormalDistribution, "Discrete", {true}) 328s ***** error ... 328s plot (LognormalDistribution, "Parent", 12) 328s ***** error ... 328s plot (LognormalDistribution, "Parent", "hax") 328s ***** error ... 328s plot (LognormalDistribution, "invalidNAME", "pdf") 328s ***** error ... 328s plot (LognormalDistribution, "PlotType", "probability") 328s ***** error ... 328s proflik (LognormalDistribution, 2) 328s ***** error ... 328s proflik (LognormalDistribution.fit (x), 3) 328s ***** error ... 328s proflik (LognormalDistribution.fit (x), [1, 2]) 328s ***** error ... 328s proflik (LognormalDistribution.fit (x), {1}) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, ones (2)) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display") 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 329s ***** error ... 329s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 329s ***** error ... 329s truncate (LognormalDistribution) 329s ***** error ... 329s truncate (LognormalDistribution, 2) 329s ***** error ... 329s truncate (LognormalDistribution, 4, 2) 329s ***** shared pd 329s pd = LognormalDistribution(1, 1); 329s pd(2) = LognormalDistribution(1, 3); 329s ***** error cdf (pd, 1) 329s ***** error icdf (pd, 0.5) 329s ***** error iqr (pd) 329s ***** error mean (pd) 329s ***** error median (pd) 329s ***** error negloglik (pd) 329s ***** error paramci (pd) 329s ***** error pdf (pd, 1) 329s ***** error plot (pd) 329s ***** error proflik (pd, 2) 329s ***** error random (pd) 329s ***** error std (pd) 329s ***** error ... 329s truncate (pd, 2, 4) 329s ***** error var (pd) 329s 95 tests, 95 passed, 0 known failure, 0 skipped 329s [inst/dist_obj/BetaDistribution.m] 329s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/BetaDistribution.m 329s ***** demo 329s ## Generate a data set of 5000 random samples from a Beta distribution with 329s ## parameters a = 2 and b = 5. Fit a Beta distribution to this data and plot 329s ## a PDF of the fitted distribution superimposed on a histogram of the data. 329s 329s pd_fixed = makedist ("Beta", "a", 2, "b", 5) 329s randg ("seed", 2); 329s data = random (pd_fixed, 5000, 1); 329s pd_fitted = fitdist (data, "Beta") 329s plot (pd_fitted) 329s msg = "Fitted Beta distribution with a = %0.2f and b = %0.2f"; 329s title (sprintf (msg, pd_fitted.a, pd_fitted.b)) 329s ***** shared pd, t 329s pd = BetaDistribution; 329s t = truncate (pd, 0.2, 0.8); 329s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 329s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 329s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 329s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 329s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 329s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 329s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 329s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 329s ***** assert (iqr (pd), 0.5, 1e-4); 329s ***** assert (iqr (t), 0.3, 1e-4); 329s ***** assert (mean (pd), 0.5); 329s ***** assert (mean (t), 0.5, 1e-6); 329s ***** assert (median (pd), 0.5); 329s ***** assert (median (t), 0.5, 1e-6); 329s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 329s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 329s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 329s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 329s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 329s ***** assert (any (random (t, 1000, 1) < 0.2), false); 329s ***** assert (any (random (t, 1000, 1) > 0.8), false); 329s ***** assert (std (pd), 0.2887, 1e-4); 329s ***** assert (std (t), 0.1732, 1e-4); 330s ***** assert (var (pd), 0.0833, 1e-4); 330s ***** assert (var (t), 0.0300, 1e-4); 330s ***** error ... 330s BetaDistribution(0, 1) 330s ***** error ... 330s BetaDistribution(Inf, 1) 330s ***** error ... 330s BetaDistribution(i, 1) 330s ***** error ... 330s BetaDistribution("a", 1) 330s ***** error ... 330s BetaDistribution([1, 2], 1) 330s ***** error ... 330s BetaDistribution(NaN, 1) 330s ***** error ... 330s BetaDistribution(1, 0) 330s ***** error ... 330s BetaDistribution(1, -1) 330s ***** error ... 330s BetaDistribution(1, Inf) 330s ***** error ... 330s BetaDistribution(1, i) 330s ***** error ... 330s BetaDistribution(1, "a") 330s ***** error ... 330s BetaDistribution(1, [1, 2]) 330s ***** error ... 330s BetaDistribution(1, NaN) 330s ***** error ... 330s cdf (BetaDistribution, 2, "uper") 330s ***** error ... 330s cdf (BetaDistribution, 2, 3) 330s ***** shared x 330s randg ("seed", 1); 330s x = betarnd (1, 1, [100, 1]); 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 0) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 1) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", "") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 330s "parameter", {"a", "b", "param"}) 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "parameter", "param") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "NAME", "value") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 330s ***** error ... 330s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 330s "NAME", "value") 330s ***** error ... 330s plot (BetaDistribution, "Parent") 330s ***** error ... 330s plot (BetaDistribution, "PlotType", 12) 330s ***** error ... 330s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 330s ***** error ... 330s plot (BetaDistribution, "PlotType", "pdfcdf") 330s ***** error ... 330s plot (BetaDistribution, "Discrete", "pdfcdf") 330s ***** error ... 330s plot (BetaDistribution, "Discrete", [1, 0]) 330s ***** error ... 330s plot (BetaDistribution, "Discrete", {true}) 330s ***** error ... 330s plot (BetaDistribution, "Parent", 12) 330s ***** error ... 330s plot (BetaDistribution, "Parent", "hax") 330s ***** error ... 330s plot (BetaDistribution, "invalidNAME", "pdf") 330s ***** error ... 330s plot (BetaDistribution, "PlotType", "probability") 330s ***** error ... 330s proflik (BetaDistribution, 2) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 3) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), [1, 2]) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), {1}) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, ones (2)) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display") 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display", 1) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 330s ***** error ... 330s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 330s ***** error ... 330s truncate (BetaDistribution) 330s ***** error ... 330s truncate (BetaDistribution, 2) 330s ***** error ... 330s truncate (BetaDistribution, 4, 2) 330s ***** shared pd 330s pd = BetaDistribution(1, 1); 330s pd(2) = BetaDistribution(1, 3); 330s ***** error cdf (pd, 1) 330s ***** error icdf (pd, 0.5) 330s ***** error iqr (pd) 330s ***** error mean (pd) 330s ***** error median (pd) 330s ***** error negloglik (pd) 330s ***** error paramci (pd) 330s ***** error pdf (pd, 1) 330s ***** error plot (pd) 330s ***** error proflik (pd, 2) 330s ***** error random (pd) 330s ***** error std (pd) 330s ***** error ... 330s truncate (pd, 2, 4) 330s ***** error var (pd) 330s 96 tests, 96 passed, 0 known failure, 0 skipped 330s [inst/dist_obj/NakagamiDistribution.m] 330s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/NakagamiDistribution.m 330s ***** demo 330s ## Generate a data set of 5000 random samples from a Nakagami distribution with 330s ## parameters mu = 1 and omega = 1. Fit a Nakagami distribution to this data and plot 330s ## a PDF of the fitted distribution superimposed on a histogram of the data. 330s 330s pd_fixed = makedist ("Nakagami", "mu", 1, "omega", 1) 330s rand ("seed", 2); 330s data = random (pd_fixed, 5000, 1); 330s pd_fitted = fitdist (data, "Nakagami") 330s plot (pd_fitted) 330s msg = "Fitted Nakagami distribution with mu = %0.2f and omega = %0.2f"; 330s title (sprintf (msg, pd_fitted.mu, pd_fitted.omega)) 330s ***** shared pd, t 330s pd = NakagamiDistribution; 330s t = truncate (pd, 2, 4); 330s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 330s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 330s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 330s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 330s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 331s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 331s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 331s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 331s ***** assert (iqr (pd), 0.6411, 1e-4); 331s ***** assert (iqr (t), 0.2502, 1e-4); 331s ***** assert (mean (pd), 0.8862, 1e-4); 331s ***** assert (mean (t), 2.2263, 1e-4); 331s ***** assert (median (pd), 0.8326, 1e-4); 331s ***** assert (median (t), 2.1664, 1e-4); 331s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 331s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 331s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 331s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 331s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 331s ***** assert (any (random (t, 1000, 1) < 2), false); 331s ***** assert (any (random (t, 1000, 1) > 4), false); 331s ***** assert (std (pd), 0.4633, 1e-4); 331s ***** assert (std (t), 0.2083, 1e-4); 331s ***** assert (var (pd), 0.2146, 1e-4); 331s ***** assert (var (t), 0.0434, 1e-4); 331s ***** error ... 331s NakagamiDistribution(Inf, 1) 331s ***** error ... 331s NakagamiDistribution(i, 1) 331s ***** error ... 331s NakagamiDistribution("a", 1) 331s ***** error ... 331s NakagamiDistribution([1, 2], 1) 331s ***** error ... 331s NakagamiDistribution(NaN, 1) 331s ***** error ... 331s NakagamiDistribution(1, 0) 331s ***** error ... 331s NakagamiDistribution(1, -1) 331s ***** error ... 331s NakagamiDistribution(1, Inf) 331s ***** error ... 331s NakagamiDistribution(1, i) 331s ***** error ... 331s NakagamiDistribution(1, "a") 331s ***** error ... 331s NakagamiDistribution(1, [1, 2]) 331s ***** error ... 331s NakagamiDistribution(1, NaN) 331s ***** error ... 331s cdf (NakagamiDistribution, 2, "uper") 331s ***** error ... 331s cdf (NakagamiDistribution, 2, 3) 331s ***** shared x 331s x = nakarnd (1, 0.5, [1, 100]); 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 0) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 1) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", "") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 331s "parameter", {"mu", "omega", "param"}) 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "parameter", "param") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "NAME", "value") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 331s ***** error ... 331s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 331s "NAME", "value") 331s ***** error ... 331s plot (NakagamiDistribution, "Parent") 331s ***** error ... 331s plot (NakagamiDistribution, "PlotType", 12) 331s ***** error ... 331s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 331s ***** error ... 331s plot (NakagamiDistribution, "PlotType", "pdfcdf") 331s ***** error ... 331s plot (NakagamiDistribution, "Discrete", "pdfcdf") 331s ***** error ... 331s plot (NakagamiDistribution, "Discrete", [1, 0]) 331s ***** error ... 331s plot (NakagamiDistribution, "Discrete", {true}) 331s ***** error ... 331s plot (NakagamiDistribution, "Parent", 12) 331s ***** error ... 331s plot (NakagamiDistribution, "Parent", "hax") 331s ***** error ... 331s plot (NakagamiDistribution, "invalidNAME", "pdf") 331s ***** error ... 331s plot (NakagamiDistribution, "PlotType", "probability") 331s ***** error ... 331s proflik (NakagamiDistribution, 2) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 3) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), [1, 2]) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), {1}) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display") 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 331s ***** error ... 331s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 331s ***** error ... 331s truncate (NakagamiDistribution) 331s ***** error ... 331s truncate (NakagamiDistribution, 2) 331s ***** error ... 331s truncate (NakagamiDistribution, 4, 2) 331s ***** shared pd 331s pd = NakagamiDistribution(1, 0.5); 331s pd(2) = NakagamiDistribution(1, 0.6); 331s ***** error cdf (pd, 1) 331s ***** error icdf (pd, 0.5) 331s ***** error iqr (pd) 331s ***** error mean (pd) 331s ***** error median (pd) 331s ***** error negloglik (pd) 331s ***** error paramci (pd) 331s ***** error pdf (pd, 1) 331s ***** error plot (pd) 331s ***** error proflik (pd, 2) 331s ***** error random (pd) 331s ***** error std (pd) 331s ***** error ... 331s truncate (pd, 2, 4) 331s ***** error var (pd) 331s 95 tests, 95 passed, 0 known failure, 0 skipped 331s [inst/dist_obj/LoglogisticDistribution.m] 331s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/LoglogisticDistribution.m 331s ***** demo 331s ## Generate a data set of 5000 random samples from a Log-logistic 331s ## distribution with parameters mu = 0 and sigma = 1. Fit a Log-logistic 331s ## distribution to this data and plot a PDF of the fitted distribution 331s ## superimposed on a histogram of the data. 331s 331s pd_fixed = makedist ("Loglogistic", "mu", 0, "sigma", 1) 331s rand ("seed", 2); 331s data = random (pd_fixed, 5000, 1); 331s pd_fitted = fitdist (data, "Loglogistic") 331s plot (pd_fitted) 331s msg = "Fitted Log-logistic distribution with mu = %0.2f and sigma = %0.2f"; 331s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 331s ***** shared pd, t 331s pd = LoglogisticDistribution; 331s t = truncate (pd, 2, 4); 331s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 331s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 331s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 331s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 331s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 331s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 331s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 331s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 331s ***** assert (iqr (pd), 2.6667, 1e-4); 331s ***** assert (iqr (t), 0.9524, 1e-4); 331s ***** assert (mean (pd), Inf); 331s ***** assert (mean (t), 2.8312, 1e-4); 331s ***** assert (median (pd), 1, 1e-4); 331s ***** assert (median (t), 2.75, 1e-4); 331s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 331s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 331s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 331s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 331s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 331s ***** assert (any (random (t, 1000, 1) < 2), false); 331s ***** assert (any (random (t, 1000, 1) > 4), false); 331s ***** assert (std (pd), Inf); 331s ***** assert (std (t), 0.5674, 1e-4); 331s ***** assert (var (pd), Inf); 331s ***** assert (var (t), 0.3220, 1e-4); 331s ***** error ... 331s LoglogisticDistribution(Inf, 1) 331s ***** error ... 331s LoglogisticDistribution(i, 1) 331s ***** error ... 331s LoglogisticDistribution("a", 1) 331s ***** error ... 331s LoglogisticDistribution([1, 2], 1) 331s ***** error ... 331s LoglogisticDistribution(NaN, 1) 331s ***** error ... 331s LoglogisticDistribution(1, 0) 331s ***** error ... 331s LoglogisticDistribution(1, -1) 331s ***** error ... 331s LoglogisticDistribution(1, Inf) 331s ***** error ... 331s LoglogisticDistribution(1, i) 331s ***** error ... 331s LoglogisticDistribution(1, "a") 331s ***** error ... 331s LoglogisticDistribution(1, [1, 2]) 331s ***** error ... 331s LoglogisticDistribution(1, NaN) 331s ***** error ... 331s cdf (LoglogisticDistribution, 2, "uper") 331s ***** error ... 331s cdf (LoglogisticDistribution, 2, 3) 331s ***** shared x 331s x = loglrnd (1, 1, [1, 100]); 331s ***** error ... 331s paramci (LoglogisticDistribution.fit (x), "alpha") 331s ***** error ... 331s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 331s ***** error ... 331s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", "") 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 332s "parameter", {"mu", "sigma", "param"}) 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 332s ***** error ... 332s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 332s "parameter", "mu", "NAME", "value") 332s ***** error ... 332s plot (LoglogisticDistribution, "Parent") 332s ***** error ... 332s plot (LoglogisticDistribution, "PlotType", 12) 332s ***** error ... 332s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 332s ***** error ... 332s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 332s ***** error ... 332s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 332s ***** error ... 332s plot (LoglogisticDistribution, "Discrete", [1, 0]) 332s ***** error ... 332s plot (LoglogisticDistribution, "Discrete", {true}) 332s ***** error ... 332s plot (LoglogisticDistribution, "Parent", 12) 332s ***** error ... 332s plot (LoglogisticDistribution, "Parent", "hax") 332s ***** error ... 332s plot (LoglogisticDistribution, "invalidNAME", "pdf") 332s ***** error ... 332s plot (LoglogisticDistribution, "PlotType", "probability") 332s ***** error ... 332s proflik (LoglogisticDistribution, 2) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 3) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), [1, 2]) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), {1}) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display") 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 332s ***** error ... 332s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 332s ***** error ... 332s truncate (LoglogisticDistribution) 332s ***** error ... 332s truncate (LoglogisticDistribution, 2) 332s ***** error ... 332s truncate (LoglogisticDistribution, 4, 2) 332s ***** shared pd 332s pd = LoglogisticDistribution(1, 1); 332s pd(2) = LoglogisticDistribution(1, 3); 332s ***** error cdf (pd, 1) 332s ***** error icdf (pd, 0.5) 333s ***** error iqr (pd) 333s ***** error mean (pd) 333s ***** error median (pd) 333s ***** error negloglik (pd) 333s ***** error paramci (pd) 333s ***** error pdf (pd, 1) 333s ***** error plot (pd) 333s ***** error proflik (pd, 2) 333s ***** error random (pd) 333s ***** error std (pd) 333s ***** error ... 333s truncate (pd, 2, 4) 333s ***** error var (pd) 333s 95 tests, 95 passed, 0 known failure, 0 skipped 333s [inst/dist_obj/PoissonDistribution.m] 333s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/PoissonDistribution.m 333s ***** demo 333s ## Generate a data set of 5000 random samples from a Poisson distribution with 333s ## parameter lambda = 5. Fit a Poisson distribution to this data and plot 333s ## a PDF of the fitted distribution superimposed on a histogram of the data. 333s 333s pd_fixed = makedist ("Poisson", "lambda", 5) 333s rand ("seed", 2); 333s data = random (pd_fixed, 5000, 1); 333s pd_fitted = fitdist (data, "Poisson") 333s plot (pd_fitted) 333s msg = "Fitted Poisson distribution with lambda = %0.2f"; 333s title (sprintf (msg, pd_fitted.lambda)) 333s ***** shared pd, t, t_inf 333s pd = PoissonDistribution; 333s t = truncate (pd, 2, 4); 333s t_inf = truncate (pd, 2, Inf); 333s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 333s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 333s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 333s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 333s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 333s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 333s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 333s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 333s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 333s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 333s ***** assert (iqr (pd), 2); 333s ***** assert (iqr (t), 1); 333s ***** assert (mean (pd), 1); 333s ***** assert (mean (t), 2.3529, 1e-4); 333s ***** assert (mean (t_inf), 2.3922, 1e-4); 333s ***** assert (median (pd), 1); 333s ***** assert (median (t), 2); 333s ***** assert (median (t_inf), 2); 333s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 333s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 333s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 333s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 333s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 333s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 333s ***** assert (any (random (t, 1000, 1) < 2), false); 333s ***** assert (any (random (t, 1000, 1) > 4), false); 333s ***** assert (std (pd), 1); 333s ***** assert (std (t), 0.5882, 1e-4); 333s ***** assert (std (t_inf), 0.6738, 1e-4); 333s ***** assert (var (pd), 1); 333s ***** assert (var (t), 0.3460, 1e-4); 333s ***** assert (var (t_inf), 0.4540, 1e-4); 333s ***** error ... 333s PoissonDistribution(0) 333s ***** error ... 333s PoissonDistribution(-1) 333s ***** error ... 333s PoissonDistribution(Inf) 333s ***** error ... 333s PoissonDistribution(i) 333s ***** error ... 333s PoissonDistribution("a") 333s ***** error ... 333s PoissonDistribution([1, 2]) 333s ***** error ... 333s PoissonDistribution(NaN) 333s ***** error ... 333s cdf (PoissonDistribution, 2, "uper") 333s ***** error ... 333s cdf (PoissonDistribution, 2, 3) 333s ***** shared x 333s x = poissrnd (1, [1, 100]); 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 0) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 1) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", "") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 333s "parameter", {"lambda", "param"}) 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "parameter", "param") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "NAME", "value") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 333s ***** error ... 333s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 333s "parameter", "lambda", "NAME", "value") 333s ***** error ... 333s plot (PoissonDistribution, "Parent") 333s ***** error ... 333s plot (PoissonDistribution, "PlotType", 12) 333s ***** error ... 333s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 333s ***** error ... 333s plot (PoissonDistribution, "PlotType", "pdfcdf") 333s ***** error ... 333s plot (PoissonDistribution, "Discrete", "pdfcdf") 333s ***** error ... 333s plot (PoissonDistribution, "Discrete", [1, 0]) 333s ***** error ... 333s plot (PoissonDistribution, "Discrete", {true}) 333s ***** error ... 333s plot (PoissonDistribution, "Parent", 12) 333s ***** error ... 333s plot (PoissonDistribution, "Parent", "hax") 333s ***** error ... 333s plot (PoissonDistribution, "invalidNAME", "pdf") 333s ***** error ... 333s plot (PoissonDistribution, "PlotType", "probability") 333s ***** error ... 333s proflik (PoissonDistribution, 2) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 3) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), [1, 2]) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), {1}) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, ones (2)) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display") 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 333s ***** error ... 333s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 333s ***** error ... 333s truncate (PoissonDistribution) 333s ***** error ... 333s truncate (PoissonDistribution, 2) 333s ***** error ... 333s truncate (PoissonDistribution, 4, 2) 333s ***** shared pd 333s pd = PoissonDistribution(1); 333s pd(2) = PoissonDistribution(3); 333s ***** error cdf (pd, 1) 333s ***** error icdf (pd, 0.5) 333s ***** error iqr (pd) 333s ***** error mean (pd) 333s ***** error median (pd) 333s ***** error negloglik (pd) 333s ***** error paramci (pd) 333s ***** error pdf (pd, 1) 333s ***** error plot (pd) 333s ***** error proflik (pd, 2) 333s ***** error random (pd) 333s ***** error std (pd) 333s ***** error ... 333s truncate (pd, 2, 4) 333s ***** error var (pd) 333s 97 tests, 97 passed, 0 known failure, 0 skipped 333s [inst/dist_obj/LogisticDistribution.m] 333s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/LogisticDistribution.m 333s ***** shared pd, t 333s pd = LogisticDistribution (0, 1); 333s t = truncate (pd, 2, 4); 333s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 333s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 333s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 333s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 333s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 333s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 333s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 333s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 333s ***** assert (iqr (pd), 2.1972, 1e-4); 333s ***** assert (iqr (t), 0.8286, 1e-4); 333s ***** assert (mean (pd), 0, 1e-4); 333s ***** assert (mean (t), 2.7193, 1e-4); 333s ***** assert (median (pd), 0); 333s ***** assert (median (t), 2.6085, 1e-4); 333s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 333s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 333s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 333s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 333s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 333s ***** assert (any (random (t, 1000, 1) < 2), false); 333s ***** assert (any (random (t, 1000, 1) > 4), false); 333s ***** assert (std (pd), 1.8138, 1e-4); 333s ***** assert (std (t), 0.5320, 1e-4); 333s ***** assert (var (pd), 3.2899, 1e-4); 333s ***** assert (var (t), 0.2830, 1e-4); 333s ***** error ... 333s LogisticDistribution(Inf, 1) 333s ***** error ... 333s LogisticDistribution(i, 1) 333s ***** error ... 333s LogisticDistribution("a", 1) 333s ***** error ... 333s LogisticDistribution([1, 2], 1) 333s ***** error ... 333s LogisticDistribution(NaN, 1) 333s ***** error ... 333s LogisticDistribution(1, 0) 333s ***** error ... 333s LogisticDistribution(1, -1) 333s ***** error ... 333s LogisticDistribution(1, Inf) 333s ***** error ... 333s LogisticDistribution(1, i) 333s ***** error ... 333s LogisticDistribution(1, "a") 333s ***** error ... 333s LogisticDistribution(1, [1, 2]) 333s ***** error ... 333s LogisticDistribution(1, NaN) 333s ***** error ... 333s cdf (LogisticDistribution, 2, "uper") 333s ***** error ... 333s cdf (LogisticDistribution, 2, 3) 333s ***** shared x 333s x = logirnd (1, 1, [1, 100]); 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha") 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", 0) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", 1) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", "") 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 333s "parameter", {"mu", "sigma", "param"}) 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "parameter", "param") 333s ***** error ... 333s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 334s ***** error ... 334s paramci (LogisticDistribution.fit (x), "NAME", "value") 334s ***** error ... 334s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 334s ***** error ... 334s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 334s "NAME", "value") 334s ***** error ... 334s plot (LogisticDistribution, "Parent") 334s ***** error ... 334s plot (LogisticDistribution, "PlotType", 12) 334s ***** error ... 334s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 334s ***** error ... 334s plot (LogisticDistribution, "PlotType", "pdfcdf") 334s ***** error ... 334s plot (LogisticDistribution, "Discrete", "pdfcdf") 334s ***** error ... 334s plot (LogisticDistribution, "Discrete", [1, 0]) 334s ***** error ... 334s plot (LogisticDistribution, "Discrete", {true}) 334s ***** error ... 334s plot (LogisticDistribution, "Parent", 12) 334s ***** error ... 334s plot (LogisticDistribution, "Parent", "hax") 334s ***** error ... 334s plot (LogisticDistribution, "invalidNAME", "pdf") 334s ***** error ... 334s plot (LogisticDistribution, "PlotType", "probability") 334s ***** error ... 334s proflik (LogisticDistribution, 2) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 3) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), [1, 2]) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), {1}) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, ones (2)) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display") 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 334s ***** error ... 334s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 334s ***** error ... 334s truncate (LogisticDistribution) 334s ***** error ... 334s truncate (LogisticDistribution, 2) 334s ***** error ... 334s truncate (LogisticDistribution, 4, 2) 334s ***** shared pd 334s pd = LogisticDistribution(1, 1); 334s pd(2) = LogisticDistribution(1, 3); 334s ***** error cdf (pd, 1) 334s ***** error icdf (pd, 0.5) 334s ***** error iqr (pd) 334s ***** error mean (pd) 334s ***** error median (pd) 334s ***** error negloglik (pd) 334s ***** error paramci (pd) 334s ***** error pdf (pd, 1) 334s ***** error plot (pd) 334s ***** error proflik (pd, 2) 334s ***** error random (pd) 334s ***** error std (pd) 334s ***** error ... 334s truncate (pd, 2, 4) 334s ***** error var (pd) 334s 95 tests, 95 passed, 0 known failure, 0 skipped 334s [inst/dist_obj/TriangularDistribution.m] 334s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/TriangularDistribution.m 334s ***** demo 334s ## Generate a data set of 5000 random samples from a Triangular distribution 334s ## with parameters A = 0, B = 1, C = 2. Fit a Triangular distribution to 334s ## this data and plot a PDF of the fitted distribution superimposed on a 334s ## histogram of the data. 334s 334s pd_fixed = makedist ("Triangular", "A", 0, "B", 1, "C", 2); 334s rand ("seed", 2); 334s data = random (pd_fixed, 5000, 1); 334s A = min (data); 334s C = mean (data); 334s B = max (data); 334s 334s [counts, centers] = hist (data, 50); 334s bin_width = centers(2) - centers(1); 334s normalized_counts = counts / (sum (counts) * bin_width); 334s bar (centers, normalized_counts, 1); 334s hold on; 334s 334s x = linspace (A, B, 100); 334s y = (2 * (x - A) / (C - A) .* (x <= C)) + (2 * (B - x) / (B - C) .* (x > C)); 334s 334s plot (x, y, 'r-', 'LineWidth', 2); 334s 334s msg = sprintf ("Fitted Triangular distribution with A = %0.2f, C = %0.2f, B = %0.2f", A, C, B); 334s title (msg); 334s 334s hold off; 334s ***** shared pd, t 334s pd = TriangularDistribution (0, 3, 5); 334s t = truncate (pd, 2, 4); 334s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 334s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 334s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 334s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 334s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 334s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 334s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 334s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 334s ***** assert (iqr (pd), 1.4824, 1e-4); 334s ***** assert (iqr (t), 0.8678, 1e-4); 334s ***** assert (mean (pd), 2.6667, 1e-4); 334s ***** assert (mean (t), 2.9649, 1e-4); 334s ***** assert (median (pd), 2.7386, 1e-4); 334s ***** assert (median (t), 2.9580, 1e-4); 334s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 334s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 334s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 334s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 334s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 334s ***** assert (any (random (t, 1000, 1) < 2), false); 334s ***** assert (any (random (t, 1000, 1) > 4), false); 334s ***** assert (std (pd), 1.0274, 1e-4); 334s ***** assert (std (t), 0.5369, 1e-4); 334s ***** assert (var (pd), 1.0556, 1e-4); 334s ***** assert (var (t), 0.2882, 1e-4); 334s ***** error ... 334s TriangularDistribution (i, 1, 2) 334s ***** error ... 334s TriangularDistribution (Inf, 1, 2) 334s ***** error ... 334s TriangularDistribution ([1, 2], 1, 2) 334s ***** error ... 334s TriangularDistribution ("a", 1, 2) 334s ***** error ... 334s TriangularDistribution (NaN, 1, 2) 334s ***** error ... 334s TriangularDistribution (1, i, 2) 334s ***** error ... 334s TriangularDistribution (1, Inf, 2) 334s ***** error ... 334s TriangularDistribution (1, [1, 2], 2) 334s ***** error ... 334s TriangularDistribution (1, "a", 2) 334s ***** error ... 334s TriangularDistribution (1, NaN, 2) 334s ***** error ... 334s TriangularDistribution (1, 2, i) 334s ***** error ... 334s TriangularDistribution (1, 2, Inf) 334s ***** error ... 334s TriangularDistribution (1, 2, [1, 2]) 334s ***** error ... 334s TriangularDistribution (1, 2, "a") 334s ***** error ... 334s TriangularDistribution (1, 2, NaN) 334s ***** error ... 334s TriangularDistribution (1, 1, 1) 334s ***** error ... 334s TriangularDistribution (1, 0.5, 2) 334s ***** error ... 334s cdf (TriangularDistribution, 2, "uper") 334s ***** error ... 334s cdf (TriangularDistribution, 2, 3) 334s ***** error ... 334s plot (TriangularDistribution, "Parent") 334s ***** error ... 334s plot (TriangularDistribution, "PlotType", 12) 334s ***** error ... 334s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 334s ***** error ... 334s plot (TriangularDistribution, "PlotType", "pdfcdf") 334s ***** error ... 334s plot (TriangularDistribution, "Discrete", "pdfcdf") 334s ***** error ... 334s plot (TriangularDistribution, "Discrete", [1, 0]) 334s ***** error ... 334s plot (TriangularDistribution, "Discrete", {true}) 334s ***** error ... 334s plot (TriangularDistribution, "Parent", 12) 334s ***** error ... 334s plot (TriangularDistribution, "Parent", "hax") 334s ***** error ... 334s plot (TriangularDistribution, "invalidNAME", "pdf") 334s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 334s plot (TriangularDistribution, "PlotType", "probability") 334s ***** error ... 334s truncate (TriangularDistribution) 334s ***** error ... 334s truncate (TriangularDistribution, 2) 334s ***** error ... 334s truncate (TriangularDistribution, 4, 2) 334s ***** shared pd 334s pd = TriangularDistribution (0, 1, 2); 334s pd(2) = TriangularDistribution (0, 1, 2); 334s ***** error cdf (pd, 1) 334s ***** error icdf (pd, 0.5) 334s ***** error iqr (pd) 334s ***** error mean (pd) 334s ***** error median (pd) 334s ***** error pdf (pd, 1) 334s ***** error plot (pd) 334s ***** error random (pd) 334s ***** error std (pd) 334s ***** error ... 334s truncate (pd, 2, 4) 334s ***** error var (pd) 334s 69 tests, 69 passed, 0 known failure, 0 skipped 334s [inst/dist_obj/ExtremeValueDistribution.m] 334s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/ExtremeValueDistribution.m 334s ***** shared pd, t 334s pd = ExtremeValueDistribution (0, 1); 334s t = truncate (pd, 2, 4); 334s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 334s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 334s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 334s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 334s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 335s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 335s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 335s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 335s ***** assert (iqr (pd), 1.5725, 1e-4); 335s ***** assert (iqr (t), 0.1338, 1e-4); 335s ***** assert (mean (pd), -0.5772, 1e-4); 335s ***** assert (mean (t), 2.1206, 1e-4); 335s ***** assert (median (pd), -0.3665, 1e-4); 335s ***** assert (median (t), 2.0897, 1e-4); 335s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 335s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 335s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 335s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 335s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 335s ***** assert (any (random (t, 1000, 1) < 2), false); 335s ***** assert (any (random (t, 1000, 1) > 4), false); 335s ***** assert (std (pd), 1.2825, 1e-4); 335s ***** assert (std (t), 0.1091, 1e-4); 335s ***** assert (var (pd), 1.6449, 1e-4); 335s ***** assert (var (t), 0.0119, 1e-4); 335s ***** error ... 335s ExtremeValueDistribution(Inf, 1) 335s ***** error ... 335s ExtremeValueDistribution(i, 1) 335s ***** error ... 335s ExtremeValueDistribution("a", 1) 335s ***** error ... 335s ExtremeValueDistribution([1, 2], 1) 335s ***** error ... 335s ExtremeValueDistribution(NaN, 1) 335s ***** error ... 335s ExtremeValueDistribution(1, 0) 335s ***** error ... 335s ExtremeValueDistribution(1, -1) 335s ***** error ... 335s ExtremeValueDistribution(1, Inf) 335s ***** error ... 335s ExtremeValueDistribution(1, i) 335s ***** error ... 335s ExtremeValueDistribution(1, "a") 335s ***** error ... 335s ExtremeValueDistribution(1, [1, 2]) 335s ***** error ... 335s ExtremeValueDistribution(1, NaN) 335s ***** error ... 335s cdf (ExtremeValueDistribution, 2, "uper") 335s ***** error ... 335s cdf (ExtremeValueDistribution, 2, 3) 335s ***** shared x 335s rand ("seed", 1); 335s x = evrnd (1, 1, [1000, 1]); 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), ... 335s "parameter", "mu", "alpha", {0.05}) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), ... 335s "parameter", {"mu", "sigma", "param"}) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 335s "parameter", {"mu", "sigma", "param"}) 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 335s "parameter", "param") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 335s ***** error ... 335s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 335s "parameter", "mu", "NAME", "value") 335s ***** error ... 335s plot (ExtremeValueDistribution, "Parent") 335s ***** error ... 335s plot (ExtremeValueDistribution, "PlotType", 12) 335s ***** error ... 335s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 335s ***** error ... 335s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 335s ***** error ... 335s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 335s ***** error ... 335s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 335s ***** error ... 335s plot (ExtremeValueDistribution, "Discrete", {true}) 335s ***** error ... 335s plot (ExtremeValueDistribution, "Parent", 12) 335s ***** error ... 335s plot (ExtremeValueDistribution, "Parent", "hax") 335s ***** error ... 335s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 335s ***** error ... 335s plot (ExtremeValueDistribution, "PlotType", "probability") 335s ***** error ... 335s proflik (ExtremeValueDistribution, 2) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 3) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), {1}) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 335s ***** error ... 335s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 335s ***** error ... 335s truncate (ExtremeValueDistribution) 335s ***** error ... 335s truncate (ExtremeValueDistribution, 2) 335s ***** error ... 335s truncate (ExtremeValueDistribution, 4, 2) 335s ***** shared pd 335s pd = ExtremeValueDistribution(1, 1); 335s pd(2) = ExtremeValueDistribution(1, 3); 335s ***** error cdf (pd, 1) 335s ***** error icdf (pd, 0.5) 335s ***** error iqr (pd) 335s ***** error mean (pd) 335s ***** error median (pd) 335s ***** error negloglik (pd) 335s ***** error paramci (pd) 335s ***** error pdf (pd, 1) 335s ***** error plot (pd) 335s ***** error proflik (pd, 2) 335s ***** error random (pd) 335s ***** error std (pd) 335s ***** error ... 335s truncate (pd, 2, 4) 335s ***** error var (pd) 335s 95 tests, 95 passed, 0 known failure, 0 skipped 335s [inst/dist_obj/UniformDistribution.m] 335s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/UniformDistribution.m 335s ***** demo 335s ## Generate a data set of 5000 random samples from a Uniform distribution with 335s ## parameters Lower = 0 and Upper = 10. Create a Uniform distribution with these 335s ## parameters and plot its PDF superimposed on a histogram of the data. 335s 335s pd = makedist ("Uniform", "Lower", 0, "Upper", 10); 335s rand ("seed", 21); 335s data = random (pd, 5000, 1); 335s 335s x = linspace (pd.Lower - 1, pd.Upper + 1, 500); 335s y = pdf (pd, x); 335s plot (x, y, 'r-', 'LineWidth', 2); 335s hold on; 335s 335s [counts, centers] = hist (data, 50); 335s bin_width = centers(2) - centers(1); 335s normalized_counts = counts / (sum (counts) * bin_width); 335s bar (centers, normalized_counts, 1); 335s 335s msg = "Uniform distribution with Lower = %0.2f and Upper = %0.2f"; 335s title (sprintf (msg, pd.Lower, pd.Upper)); 335s legend ("PDF", "Histogram", "location", "northeast"); 335s 335s hold off; 335s ***** shared pd, t 335s pd = UniformDistribution (0, 5); 335s t = truncate (pd, 2, 4); 335s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 335s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 335s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 335s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 335s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 335s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 335s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 335s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 335s ***** assert (iqr (pd), 2.5, 1e-14); 335s ***** assert (iqr (t), 1, 1e-14); 335s ***** assert (mean (pd), 2.5, 1e-14); 335s ***** assert (mean (t), 3, 1e-14); 335s ***** assert (median (pd), 2.5, 1e-14); 335s ***** assert (median (t), 3, 1e-14); 335s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 335s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 335s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 335s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 335s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 335s ***** assert (any (random (t, 1000, 1) < 2), false); 335s ***** assert (any (random (t, 1000, 1) > 4), false); 335s ***** assert (std (pd), 1.4434, 1e-4); 335s ***** assert (std (t), 0.5774, 1e-4); 335s ***** assert (var (pd), 2.0833, 1e-4); 335s ***** assert (var (t), 0.3333, 1e-4); 335s ***** error ... 335s UniformDistribution (i, 1) 335s ***** error ... 335s UniformDistribution (Inf, 1) 335s ***** error ... 335s UniformDistribution ([1, 2], 1) 335s ***** error ... 335s UniformDistribution ("a", 1) 335s ***** error ... 335s UniformDistribution (NaN, 1) 335s ***** error ... 335s UniformDistribution (1, i) 335s ***** error ... 335s UniformDistribution (1, Inf) 335s ***** error ... 335s UniformDistribution (1, [1, 2]) 335s ***** error ... 335s UniformDistribution (1, "a") 336s ***** error ... 336s UniformDistribution (1, NaN) 336s ***** error ... 336s UniformDistribution (2, 1) 336s ***** error ... 336s cdf (UniformDistribution, 2, "uper") 336s ***** error ... 336s cdf (UniformDistribution, 2, 3) 336s ***** error ... 336s plot (UniformDistribution, "Parent") 336s ***** error ... 336s plot (UniformDistribution, "PlotType", 12) 336s ***** error ... 336s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 336s ***** error ... 336s plot (UniformDistribution, "PlotType", "pdfcdf") 336s ***** error ... 336s plot (UniformDistribution, "Discrete", "pdfcdf") 336s ***** error ... 336s plot (UniformDistribution, "Discrete", [1, 0]) 336s ***** error ... 336s plot (UniformDistribution, "Discrete", {true}) 336s ***** error ... 336s plot (UniformDistribution, "Parent", 12) 336s ***** error ... 336s plot (UniformDistribution, "Parent", "hax") 336s ***** error ... 336s plot (UniformDistribution, "invalidNAME", "pdf") 336s ***** error ... 336s plot (UniformDistribution, "PlotType", "probability") 336s ***** error ... 336s truncate (UniformDistribution) 336s ***** error ... 336s truncate (UniformDistribution, 2) 336s ***** error ... 336s truncate (UniformDistribution, 4, 2) 336s ***** shared pd 336s pd = UniformDistribution (0, 1); 336s pd(2) = UniformDistribution (0, 2); 336s ***** error cdf (pd, 1) 336s ***** error icdf (pd, 0.5) 336s ***** error iqr (pd) 336s ***** error mean (pd) 336s ***** error median (pd) 336s ***** error pdf (pd, 1) 336s ***** error plot (pd) 336s ***** error random (pd) 336s ***** error std (pd) 336s ***** error ... 336s truncate (pd, 2, 4) 336s ***** error var (pd) 336s 63 tests, 63 passed, 0 known failure, 0 skipped 336s [inst/dist_obj/NegativeBinomialDistribution.m] 336s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_obj/NegativeBinomialDistribution.m 336s ***** demo 336s ## Generate a data set of 5000 random samples from a Negative Binomial 336s ## distribution with parameters R = 5 and P = 0.5. Fit a Negative Binomial 336s ## distribution to this data and plot a PDF of the fitted distribution 336s ## superimposed on a histogram of the data. 336s 336s pd_fixed = makedist ("NegativeBinomial", "R", 5, "P", 0.5) 336s rand ("seed", 2); 336s data = random (pd_fixed, 5000, 1); 336s pd_fitted = fitdist (data, "NegativeBinomial") 336s plot (pd_fitted) 336s msg = "Fitted Negative Binomial distribution with R = %0.2f and P = %0.2f"; 336s title (sprintf (msg, pd_fitted.R, pd_fitted.P)) 336s ***** shared pd, t, t_inf 336s pd = NegativeBinomialDistribution (5, 0.5); 336s t = truncate (pd, 2, 4); 336s t_inf = truncate (pd, 2, Inf); 336s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 336s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 336s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 336s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 336s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 336s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 336s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 336s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 336s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 336s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 336s ***** assert (iqr (pd), 4); 336s ***** assert (iqr (t), 2); 336s ***** assert (mean (pd), 5); 336s ***** assert (mean (t), 3.0500, 1e-4); 336s ***** assert (mean (t_inf), 5.5263, 1e-4); 336s ***** assert (median (pd), 4); 336s ***** assert (median (t), 3); 336s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 336s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 336s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 336s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 336s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 336s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 336s ***** assert (any (random (t, 1000, 1) < 2), false); 336s ***** assert (any (random (t, 1000, 1) > 4), false); 336s ***** assert (std (pd), 3.1623, 1e-4); 336s ***** assert (std (t), 0.8047, 1e-4); 336s ***** assert (std (t_inf), 2.9445, 1e-4); 336s ***** assert (var (pd), 10); 336s ***** assert (var (t), 0.6475, 1e-4); 336s ***** assert (var (t_inf), 8.6704, 1e-4); 336s ***** error ... 336s NegativeBinomialDistribution(Inf, 1) 336s ***** error ... 336s NegativeBinomialDistribution(i, 1) 336s ***** error ... 336s NegativeBinomialDistribution("a", 1) 336s ***** error ... 336s NegativeBinomialDistribution([1, 2], 1) 336s ***** error ... 336s NegativeBinomialDistribution(NaN, 1) 336s ***** error ... 336s NegativeBinomialDistribution(1, 0) 336s ***** error ... 336s NegativeBinomialDistribution(1, -1) 336s ***** error ... 336s NegativeBinomialDistribution(1, Inf) 336s ***** error ... 336s NegativeBinomialDistribution(1, i) 336s ***** error ... 336s NegativeBinomialDistribution(1, "a") 336s ***** error ... 336s NegativeBinomialDistribution(1, [1, 2]) 336s ***** error ... 336s NegativeBinomialDistribution(1, NaN) 336s ***** error ... 336s NegativeBinomialDistribution(1, 1.2) 336s ***** error ... 336s cdf (NegativeBinomialDistribution, 2, "uper") 336s ***** error ... 336s cdf (NegativeBinomialDistribution, 2, 3) 336s ***** shared x 336s x = nbinrnd (1, 0.5, [1, 100]); 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 336s "alpha", {0.05}) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), ... 336s "parameter", {"R", "P", "param"}) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 336s "parameter", {"R", "P", "param"}) 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 336s "parameter", "param") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 336s "NAME", "value") 336s ***** error ... 336s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 336s "parameter", "R", "NAME", "value") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Parent") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "PlotType", 12) 336s ***** error ... 336s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 336s ***** error ... 336s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Discrete", {true}) 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Parent", 12) 336s ***** error ... 336s plot (NegativeBinomialDistribution, "Parent", "hax") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 336s ***** error ... 336s plot (NegativeBinomialDistribution, "PlotType", "probability") 336s ***** error ... 336s proflik (NegativeBinomialDistribution, 2) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 3) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), {1}) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 336s ***** error ... 336s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 336s ***** error ... 336s truncate (NegativeBinomialDistribution) 336s ***** error ... 336s truncate (NegativeBinomialDistribution, 2) 336s ***** error ... 336s truncate (NegativeBinomialDistribution, 4, 2) 336s ***** shared pd 336s pd = NegativeBinomialDistribution(1, 0.5); 336s pd(2) = NegativeBinomialDistribution(1, 0.6); 336s ***** error cdf (pd, 1) 336s ***** error icdf (pd, 0.5) 336s ***** error iqr (pd) 336s ***** error mean (pd) 336s ***** error median (pd) 336s ***** error negloglik (pd) 336s ***** error paramci (pd) 336s ***** error pdf (pd, 1) 336s ***** error plot (pd) 336s ***** error proflik (pd, 2) 336s ***** error random (pd) 336s ***** error std (pd) 336s ***** error ... 336s truncate (pd, 2, 4) 336s ***** error var (pd) 336s 102 tests, 102 passed, 0 known failure, 0 skipped 336s [inst/vartest2.m] 336s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/vartest2.m 336s ***** error vartest2 (); 336s ***** error vartest2 (ones (20,1)); 336s ***** error ... 336s vartest2 (rand (20,1), 5); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 336s ***** error ... 336s vartest2 (rand (20,1), rand (25,1)*2, "some"); 336s ***** test 336s load carsmall 336s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 336s assert (h, 0); 336s assert (pval, 0.6288022362718455, 1e-13); 336s assert (ci, [0.4139; 1.7193], 1e-4); 336s assert (stat.fstat, 0.8384, 1e-4); 336s assert (stat.df1, 30); 336s assert (stat.df2, 33); 336s ***** test 336s load carsmall 336s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 336s "tail", "left"); 336s assert (h, 0); 336s assert (pval, 0.314401118135922, 1e-13); 336s assert (ci, [0; 1.5287], 1e-4); 336s assert (stat.fstat, 0.8384, 1e-4); 336s assert (stat.df1, 30); 336s assert (stat.df2, 33); 336s ***** test 336s load carsmall 336s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 336s "tail", "right"); 336s assert (h, 0); 336s assert (pval, 0.685598881864077, 1e-13); 336s assert (ci, [0.4643; Inf], 1e-4); 336s assert (stat.fstat, 0.8384, 1e-4); 336s assert (stat.df1, 30); 336s assert (stat.df2, 33); 336s 16 tests, 16 passed, 0 known failure, 0 skipped 336s [inst/pdist.m] 336s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/pdist.m 336s ***** shared xy, t, eucl, x 336s xy = [0 1; 0 2; 7 6; 5 6]; 336s t = 1e-3; 336s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 336s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 336s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 336s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 336s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 336s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 336s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 336s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 336s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 336s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 336s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 336s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 336s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 336s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 336s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 336s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 336s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 336s ***** assert (pdist (x, "euclidean"), ... 336s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 336s ***** assert (pdist (x, eucl), ... 336s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 336s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 336s ***** assert (pdist (x, "seuclidean"), ... 336s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 336s ***** warning ... 336s pdist (x, "mahalanobis"); 336s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 336s ***** assert (pdist (x, "minkowski"), ... 336s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 336s ***** assert (pdist (x, "minkowski", 3), ... 336s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 336s ***** assert (pdist (x, "cosine"), ... 336s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 336s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 336s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 336s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 336s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 336s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 336s 29 tests, 29 passed, 0 known failure, 0 skipped 336s [inst/anova1.m] 336s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/anova1.m 336s ***** demo 336s x = meshgrid (1:6); 336s randn ("seed", 15); # for reproducibility 336s x = x + normrnd (0, 1, 6, 6); 336s anova1 (x, [], 'off'); 336s ***** demo 336s x = meshgrid (1:6); 336s randn ("seed", 15); # for reproducibility 336s x = x + normrnd (0, 1, 6, 6); 336s [p, atab] = anova1(x); 336s ***** demo 336s x = ones (50, 4) .* [-2, 0, 1, 5]; 336s randn ("seed", 13); # for reproducibility 336s x = x + normrnd (0, 2, 50, 4); 336s groups = {"A", "B", "C", "D"}; 336s anova1 (x, groups); 336s ***** demo 336s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 336s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 336s anova1 (y(:), g(:), "on", "unequal"); 336s ***** test 336s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 336s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 336s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 336s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 336s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 336s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 336s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 336s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 336s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 336s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 336s group = [1:10] .* ones (10,10); 336s group = group(:); 336s [p, tbl] = anova1 (data, group, "off"); 336s assert (p, 0.022661, 1e-6); 336s assert (tbl{2,5}, 2.2969, 1e-4); 336s assert (tbl{2,3}, 9, 0); 336s assert (tbl{4,2}, 0.003903, 1e-6); 336s data = reshape (data, 10, 10); 336s [p, tbl, stats] = anova1 (data, [], "off"); 336s assert (p, 0.022661, 1e-6); 336s assert (tbl{2,5}, 2.2969, 1e-4); 336s assert (tbl{2,3}, 9, 0); 336s assert (tbl{4,2}, 0.003903, 1e-6); 336s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 336s N = 10 * ones (1, 10); 336s assert (stats.means, means, 1e-6); 336s assert (length (stats.gnames), 10, 0); 336s assert (stats.n, N, 0); 336s ***** test 336s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 336s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 336s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 336s assert (p, 0.00004163, 1e-6); 336s assert (tbl{2,5}, 22.573418, 1e-6); 336s assert (tbl{2,3}, 2, 0); 336s assert (tbl{3,3}, 14, 0); 336s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 336s assert (p, 0.00208877, 1e-8); 336s assert (tbl{2,5}, 15.523192, 1e-6); 336s assert (tbl{2,3}, 2, 0); 336s assert (tbl{2,4}, 7.5786897, 1e-6); 336s 2 tests, 2 passed, 0 known failure, 0 skipped 336s [inst/pcares.m] 336s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/pcares.m 336s ***** demo 336s x = [ 7 26 6 60; 336s 1 29 15 52; 336s 11 56 8 20; 336s 11 31 8 47; 336s 7 52 6 33; 336s 11 55 9 22; 336s 3 71 17 6; 336s 1 31 22 44; 336s 2 54 18 22; 336s 21 47 4 26; 336s 1 40 23 34; 336s 11 66 9 12; 336s 10 68 8 12]; 336s 336s ## As we increase the number of principal components, the norm 336s ## of the residuals matrix will decrease 336s r1 = pcares (x,1); 336s n1 = norm (r1) 336s r2 = pcares (x,2); 336s n2 = norm (r2) 336s r3 = pcares (x,3); 336s n3 = norm (r3) 336s r4 = pcares (x,4); 336s n4 = norm (r4) 336s ***** test 336s load hald 336s r1 = pcares (ingredients,1); 336s r2 = pcares (ingredients,2); 336s r3 = pcares (ingredients,3); 336s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 336s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 336s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 336s ***** error pcares (ones (20, 3)) 337s ***** error ... 337s pcares (ones (30, 2), 3) 337s 3 tests, 3 passed, 0 known failure, 0 skipped 337s [inst/nanmean.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/nanmean.m 337s ***** demo 337s ## Find the column means for a matrix with missing values., 337s 337s x = magic (3); 337s x([1, 4, 7:9]) = NaN 337s y = nanmean (x) 337s ***** demo 337s ## Find the row means for a matrix with missing values., 337s 337s x = magic (3); 337s x([1, 4, 7:9]) = NaN 337s y = nanmean (x, 2) 337s ***** demo 337s ## Find the mean of all the values in a multidimensional array 337s ## with missing values. 337s 337s x = reshape (1:30, [2, 5, 3]); 337s x([10:12, 25]) = NaN 337s y = nanmean (x, "all") 337s ***** demo 337s ## Find the mean of a multidimensional array with missing values over 337s ## multiple dimensions. 337s 337s x = reshape (1:30, [2, 5, 3]); 337s x([10:12, 25]) = NaN 337s y = nanmean (x, [2, 3]) 337s ***** assert (nanmean ([]), NaN) 337s ***** assert (nanmean (NaN), NaN) 337s ***** assert (nanmean (NaN(3)), [NaN, NaN, NaN]) 337s ***** assert (nanmean ([3 2 NaN 7]), 4) 337s ***** assert (nanmean ([2 4 NaN Inf]), Inf) 337s ***** assert (nanmean ([1 NaN 3; NaN 4 6; 7 8 NaN]), [4 6 4.5]) 337s ***** assert (nanmean ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [2; 5.5; 7.5]) 337s ***** assert (nanmean (uint8 ([2 4 1 7])), 3.5) 337s ***** test 337s x = magic(3); 337s x([1 6:9]) = NaN; 337s assert (nanmean (x), [3.5, 3, NaN]) 337s assert (nanmean (x, 2), [1; 4; 4]) 337s ***** test 337s x = reshape(1:24, [2, 4, 3]); 337s x([5:6, 20]) = NaN; 337s assert (nanmean (x, "all"), 269/21) 337s ***** test 337s x = reshape(1:24,[2, 4, 3]); 337s x([5:6, 20]) = NaN; 337s assert (squeeze (nanmean (x, [1, 2])), [25/6; 100/8; 144/7]) 337s assert (nanmean (x, [2, 3]), [139/11; 13]) 337s 11 tests, 11 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/tricdf.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tricdf.m 337s ***** demo 337s ## Plot various CDFs from the triangular distribution 337s x = 0.001:0.001:10; 337s p1 = tricdf (x, 3, 4, 6); 337s p2 = tricdf (x, 1, 2, 5); 337s p3 = tricdf (x, 2, 3, 9); 337s p4 = tricdf (x, 2, 5, 9); 337s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 337s grid on 337s xlim ([0, 10]) 337s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 337s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 337s "location", "southeast") 337s title ("Triangular CDF") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** shared x, y 337s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 337s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 337s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 337s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 337s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 337s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 337s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 337s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 337s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 337s [y(1:2), NaN, y(4:7)], eps) 337s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 337s [y(1:2), NaN, y(4:7)], eps) 337s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 337s [y(1:2), NaN, y(4:7)], eps) 337s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 337s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 337s single ([y, NaN]), eps("single")) 337s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 337s single ([y, NaN]), eps("single")) 337s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 337s single ([y, NaN]), eps("single")) 337s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 337s single ([y, NaN]), eps("single")) 337s ***** error tricdf () 337s ***** error tricdf (1) 337s ***** error tricdf (1, 2) 337s ***** error tricdf (1, 2, 3) 337s ***** error ... 337s tricdf (1, 2, 3, 4, 5, 6) 337s ***** error tricdf (1, 2, 3, 4, "tail") 337s ***** error tricdf (1, 2, 3, 4, 5) 337s ***** error ... 337s tricdf (ones (3), ones (2), ones(2), ones(2)) 337s ***** error ... 337s tricdf (ones (2), ones (3), ones(2), ones(2)) 337s ***** error ... 337s tricdf (ones (2), ones (2), ones(3), ones(2)) 337s ***** error ... 337s tricdf (ones (2), ones (2), ones(2), ones(3)) 337s ***** error tricdf (i, 2, 3, 4) 337s ***** error tricdf (1, i, 3, 4) 337s ***** error tricdf (1, 2, i, 4) 337s ***** error tricdf (1, 2, 3, i) 337s 29 tests, 29 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/nctpdf.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nctpdf.m 337s ***** demo 337s ## Plot various PDFs from the noncentral T distribution 337s x = -5:0.01:10; 337s y1 = nctpdf (x, 1, 0); 337s y2 = nctpdf (x, 4, 0); 337s y3 = nctpdf (x, 1, 2); 337s y4 = nctpdf (x, 4, 2); 337s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 337s grid on 337s xlim ([-5, 10]) 337s ylim ([0, 0.4]) 337s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 337s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 337s title ("Noncentral T PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** demo 337s ## Compare the noncentral T PDF with MU = 1 to the T PDF 337s ## with the same number of degrees of freedom (10). 337s 337s x = -5:0.1:5; 337s y1 = nctpdf (x, 10, 1); 337s y2 = tpdf (x, 10); 337s plot (x, y1, "-", x, y2, "-"); 337s grid on 337s xlim ([-5, 5]) 337s ylim ([0, 0.4]) 337s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 337s title ("Noncentral T vs T PDFs") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** shared x1, df, mu 337s x1 = [-Inf, 2, NaN, 4, Inf]; 337s df = [2, 0, -1, 1, 4]; 337s mu = [1, NaN, 3, -1, 2]; 337s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 337s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 337s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 337s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 337s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 337s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 337s 0.0146500727180389, 0.3082302682110299], 1e-14); 337s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 337s 0.00401787561306999, 0.0972086534042828], 1e-14); 337s ***** error nctpdf () 337s ***** error nctpdf (1) 337s ***** error nctpdf (1, 2) 337s ***** error ... 337s nctpdf (ones (3), ones (2), ones (2)) 337s ***** error ... 337s nctpdf (ones (2), ones (3), ones (2)) 337s ***** error ... 337s nctpdf (ones (2), ones (2), ones (3)) 337s ***** error nctpdf (i, 2, 2) 337s ***** error nctpdf (2, i, 2) 337s ***** error nctpdf (2, 2, i) 337s 16 tests, 16 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/exprnd.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/exprnd.m 337s ***** assert (size (exprnd (2)), [1, 1]) 337s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 337s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 337s ***** assert (size (exprnd (1, 3)), [3, 3]) 337s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 337s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 337s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 337s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 337s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 337s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (class (exprnd (2)), "double") 337s ***** assert (class (exprnd (single (2))), "single") 337s ***** assert (class (exprnd (single ([2 2]))), "single") 337s ***** error exprnd () 337s ***** error exprnd (i) 337s ***** error ... 337s exprnd (1, -1) 337s ***** error ... 337s exprnd (1, 1.2) 337s ***** error ... 337s exprnd (1, ones (2)) 337s ***** error ... 337s exprnd (1, [2 -1 2]) 337s ***** error ... 337s exprnd (1, [2 0 2.5]) 337s ***** error ... 337s exprnd (ones (2), ones (2)) 337s ***** error ... 337s exprnd (1, 2, -1, 5) 337s ***** error ... 337s exprnd (1, 2, 1.5, 5) 337s ***** error exprnd (ones (2,2), 3) 337s ***** error exprnd (ones (2,2), [3, 2]) 337s ***** error exprnd (ones (2,2), 2, 3) 337s 27 tests, 27 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/nctrnd.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nctrnd.m 337s ***** assert (size (nctrnd (1, 1)), [1 1]) 337s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 337s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 337s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 337s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 337s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 337s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 337s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 337s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 337s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 337s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (class (nctrnd (1, 1)), "double") 337s ***** assert (class (nctrnd (1, single (1))), "single") 337s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 337s ***** assert (class (nctrnd (single (1), 1)), "single") 337s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 337s ***** error nctrnd () 337s ***** error nctrnd (1) 337s ***** error ... 337s nctrnd (ones (3), ones (2)) 337s ***** error ... 337s nctrnd (ones (2), ones (3)) 337s ***** error nctrnd (i, 2) 337s ***** error nctrnd (1, i) 337s ***** error ... 337s nctrnd (1, 2, -1) 337s ***** error ... 337s nctrnd (1, 2, 1.2) 337s ***** error ... 337s nctrnd (1, 2, ones (2)) 337s ***** error ... 337s nctrnd (1, 2, [2 -1 2]) 337s ***** error ... 337s nctrnd (1, 2, [2 0 2.5]) 337s ***** error ... 337s nctrnd (1, 2, 2, -1, 5) 337s ***** error ... 337s nctrnd (1, 2, 2, 1.5, 5) 337s ***** error ... 337s nctrnd (2, ones (2), 3) 337s ***** error ... 337s nctrnd (2, ones (2), [3, 2]) 337s ***** error ... 337s nctrnd (2, ones (2), 3, 2) 337s 33 tests, 33 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/invginv.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/invginv.m 337s ***** demo 337s ## Plot various iCDFs from the inverse Gaussian distribution 337s p = 0.001:0.001:0.999; 337s x1 = invginv (p, 1, 0.2); 337s x2 = invginv (p, 1, 1); 337s x3 = invginv (p, 1, 3); 337s x4 = invginv (p, 3, 0.2); 337s x5 = invginv (p, 3, 1); 337s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 337s grid on 337s ylim ([0, 3]) 337s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 337s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 337s title ("Inverse Gaussian iCDF") 337s xlabel ("probability") 337s ylabel ("x") 337s ***** shared p, x 337s p = [0, 0.3829, 0.6827, 1]; 337s x = [0, 0.5207, 1.0376, Inf]; 337s ***** assert (invginv (p, 1, 1), x, 1e-4); 337s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 337s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 337s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 337s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 337s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 337s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 337s ***** error invginv (1) 337s ***** error invginv (1, 2) 337s ***** error ... 337s invginv (1, ones (2), ones (3)) 337s ***** error ... 337s invginv (ones (2), 1, ones (3)) 337s ***** error ... 337s invginv (ones (2), ones (3), 1) 337s ***** error invginv (i, 2, 3) 337s ***** error invginv (1, i, 3) 337s ***** error invginv (1, 2, i) 337s 15 tests, 15 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/unifinv.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unifinv.m 337s ***** demo 337s ## Plot various iCDFs from the continuous uniform distribution 337s p = 0.001:0.001:0.999; 337s x1 = unifinv (p, 2, 5); 337s x2 = unifinv (p, 3, 9); 337s plot (p, x1, "-b", p, x2, "-g") 337s grid on 337s xlim ([0, 1]) 337s ylim ([0, 10]) 337s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 337s title ("Continuous uniform iCDF") 337s xlabel ("probability") 337s ylabel ("values in x") 337s ***** shared p 337s p = [-1 0 0.5 1 2]; 337s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 337s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 337s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 337s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 337s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 337s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 337s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 337s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 337s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 337s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 337s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 337s ***** error unifinv () 337s ***** error unifinv (1, 2) 337s ***** error ... 337s unifinv (ones (3), ones (2), ones (2)) 337s ***** error ... 337s unifinv (ones (2), ones (3), ones (2)) 337s ***** error ... 337s unifinv (ones (2), ones (2), ones (3)) 337s ***** error unifinv (i, 2, 2) 337s ***** error unifinv (2, i, 2) 337s ***** error unifinv (2, 2, i) 337s 19 tests, 19 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/ricepdf.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ricepdf.m 337s ***** demo 337s ## Plot various PDFs from the Rician distribution 337s x = 0:0.01:8; 337s y1 = ricepdf (x, 0, 1); 337s y2 = ricepdf (x, 0.5, 1); 337s y3 = ricepdf (x, 1, 1); 337s y4 = ricepdf (x, 2, 1); 337s y5 = ricepdf (x, 4, 1); 337s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 337s grid on 337s ylim ([0, 0.65]) 337s xlim ([0, 8]) 337s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 337s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 337s title ("Rician PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** shared x, y 337s x = [-1 0 0.5 1 2]; 337s y = [0 0 0.1073 0.1978 0.2846]; 337s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 337s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 337s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 337s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 337s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 337s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 337s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 337s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 337s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 337s ***** error ricepdf () 337s ***** error ricepdf (1) 337s ***** error ricepdf (1,2) 337s ***** error ricepdf (1,2,3,4) 337s ***** error ... 337s ricepdf (ones (3), ones (2), ones (2)) 337s ***** error ... 337s ricepdf (ones (2), ones (3), ones (2)) 337s ***** error ... 337s ricepdf (ones (2), ones (2), ones (3)) 337s ***** error ricepdf (i, 2, 2) 337s ***** error ricepdf (2, i, 2) 337s ***** error ricepdf (2, 2, i) 337s 19 tests, 19 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/hncdf.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hncdf.m 337s ***** demo 337s ## Plot various CDFs from the half-normal distribution 337s x = 0:0.001:10; 337s p1 = hncdf (x, 0, 1); 337s p2 = hncdf (x, 0, 2); 337s p3 = hncdf (x, 0, 3); 337s p4 = hncdf (x, 0, 5); 337s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 337s grid on 337s xlim ([0, 10]) 337s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 337s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 337s title ("Half-normal CDF") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** demo 337s ## Plot half-normal against normal cumulative distribution function 337s x = -5:0.001:5; 337s p1 = hncdf (x, 0, 1); 337s p2 = normcdf (x); 337s plot (x, p1, "-b", x, p2, "-g") 337s grid on 337s xlim ([-5, 5]) 337s legend ({"half-normal with μ = 0, σ = 1", ... 337s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 337s title ("Half-normal against standard normal CDF") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** shared x, p1, p1u, y2, y2u, y3, y3u 337s x = [-Inf, -1, 0, 1/2, 1, Inf]; 337s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 337s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 337s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 337s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 337s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 337s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 337s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 337s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 337s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 337s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 337s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 337s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 337s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 337s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 337s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 337s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 337s ***** error hncdf () 337s ***** error hncdf (1) 337s ***** error hncdf (1, 2) 337s ***** error hncdf (1, 2, 3, "tail") 337s ***** error hncdf (1, 2, 3, 5) 337s ***** error ... 337s hncdf (ones (3), ones (2), ones(2)) 337s ***** error ... 337s hncdf (ones (2), ones (3), ones(2)) 337s ***** error ... 337s hncdf (ones (2), ones (2), ones(3)) 337s ***** error hncdf (i, 2, 3) 337s ***** error hncdf (1, i, 3) 337s ***** error hncdf (1, 2, i) 337s 25 tests, 25 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/tlscdf.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tlscdf.m 337s ***** demo 337s ## Plot various CDFs from the location-scale Student's T distribution 337s x = -8:0.01:8; 337s p1 = tlscdf (x, 0, 1, 1); 337s p2 = tlscdf (x, 0, 2, 2); 337s p3 = tlscdf (x, 3, 2, 5); 337s p4 = tlscdf (x, -1, 3, Inf); 337s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 337s grid on 337s xlim ([-8, 8]) 337s ylim ([0, 1]) 337s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 337s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 337s "location", "northwest") 337s title ("Location-scale Student's T CDF") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** shared x,y 337s x = [-Inf 0 1 Inf]; 337s y = [0 1/2 3/4 1]; 337s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 337s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 337s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 337s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 337s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 337s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 337s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 337s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 337s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 337s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 337s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 337s ***** error tlscdf () 337s ***** error tlscdf (1) 337s ***** error tlscdf (1, 2) 337s ***** error tlscdf (1, 2, 3) 337s ***** error tlscdf (1, 2, 3, 4, "uper") 337s ***** error tlscdf (1, 2, 3, 4, 5) 337s ***** error ... 337s tlscdf (ones (3), ones (2), 1, 1) 337s ***** error ... 337s tlscdf (ones (3), 1, ones (2), 1) 337s ***** error ... 337s tlscdf (ones (3), 1, 1, ones (2)) 337s ***** error ... 337s tlscdf (ones (3), ones (2), 1, 1, "upper") 337s ***** error ... 337s tlscdf (ones (3), 1, ones (2), 1, "upper") 337s ***** error ... 337s tlscdf (ones (3), 1, 1, ones (2), "upper") 337s ***** error tlscdf (i, 2, 1, 1) 337s ***** error tlscdf (2, i, 1, 1) 337s ***** error tlscdf (2, 1, i, 1) 337s ***** error tlscdf (2, 1, 1, i) 337s 27 tests, 27 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/frnd.m] 337s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/frnd.m 337s ***** assert (size (frnd (1, 1)), [1 1]) 337s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 337s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 337s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 337s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 337s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 337s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 337s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 337s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 337s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 338s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (frnd (1, 1)), "double") 338s ***** assert (class (frnd (1, single (1))), "single") 338s ***** assert (class (frnd (1, single ([1, 1]))), "single") 338s ***** assert (class (frnd (single (1), 1)), "single") 338s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 338s ***** error frnd () 338s ***** error frnd (1) 338s ***** error ... 338s frnd (ones (3), ones (2)) 338s ***** error ... 338s frnd (ones (2), ones (3)) 338s ***** error frnd (i, 2, 3) 338s ***** error frnd (1, i, 3) 338s ***** error ... 338s frnd (1, 2, -1) 338s ***** error ... 338s frnd (1, 2, 1.2) 338s ***** error ... 338s frnd (1, 2, ones (2)) 338s ***** error ... 338s frnd (1, 2, [2 -1 2]) 338s ***** error ... 338s frnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s frnd (1, 2, 2, -1, 5) 338s ***** error ... 338s frnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s frnd (2, ones (2), 3) 338s ***** error ... 338s frnd (2, ones (2), [3, 2]) 338s ***** error ... 338s frnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/wblrnd.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wblrnd.m 338s ***** assert (size (wblrnd (1, 1)), [1 1]) 338s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 338s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 338s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 338s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 338s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 338s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 338s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 338s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 338s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 338s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (wblrnd (1, 1)), "double") 338s ***** assert (class (wblrnd (1, single (1))), "single") 338s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 338s ***** assert (class (wblrnd (single (1), 1)), "single") 338s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 338s ***** error wblrnd () 338s ***** error wblrnd (1) 338s ***** error ... 338s wblrnd (ones (3), ones (2)) 338s ***** error ... 338s wblrnd (ones (2), ones (3)) 338s ***** error wblrnd (i, 2, 3) 338s ***** error wblrnd (1, i, 3) 338s ***** error ... 338s wblrnd (1, 2, -1) 338s ***** error ... 338s wblrnd (1, 2, 1.2) 338s ***** error ... 338s wblrnd (1, 2, ones (2)) 338s ***** error ... 338s wblrnd (1, 2, [2 -1 2]) 338s ***** error ... 338s wblrnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s wblrnd (1, 2, 2, -1, 5) 338s ***** error ... 338s wblrnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s wblrnd (2, ones (2), 3) 338s ***** error ... 338s wblrnd (2, ones (2), [3, 2]) 338s ***** error ... 338s wblrnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/tpdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tpdf.m 338s ***** demo 338s ## Plot various PDFs from the Student's T distribution 338s x = -5:0.01:5; 338s y1 = tpdf (x, 1); 338s y2 = tpdf (x, 2); 338s y3 = tpdf (x, 5); 338s y4 = tpdf (x, Inf); 338s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 338s grid on 338s xlim ([-5, 5]) 338s ylim ([0, 0.41]) 338s legend ({"df = 1", "df = 2", ... 338s "df = 5", 'df = \infty'}, "location", "northeast") 338s title ("Student's T PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** test 338s x = rand (10,1); 338s y = 1./(pi * (1 + x.^2)); 338s assert (tpdf (x, 1), y, 5*eps); 338s ***** shared x, y 338s x = [-Inf 0 0.5 1 Inf]; 338s y = 1./(pi * (1 + x.^2)); 338s ***** assert (tpdf (x, ones (1,5)), y, eps) 338s ***** assert (tpdf (x, 1), y, eps) 338s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 338s ***** assert (tpdf (x, Inf), normpdf (x)) 338s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 338s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 338s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 338s ***** error tpdf () 338s ***** error tpdf (1) 338s ***** error ... 338s tpdf (ones (3), ones (2)) 338s ***** error ... 338s tpdf (ones (2), ones (3)) 338s ***** error tpdf (i, 2) 338s ***** error tpdf (2, i) 338s 14 tests, 14 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/exppdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/exppdf.m 338s ***** demo 338s ## Plot various PDFs from the exponential distribution 338s x = 0:0.01:5; 338s y1 = exppdf (x, 2/3); 338s y2 = exppdf (x, 1.0); 338s y3 = exppdf (x, 2.0); 338s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 338s grid on 338s ylim ([0, 1.5]) 338s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 338s title ("Exponential PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** shared x,y 338s x = [-1 0 0.5 1 Inf]; 338s y = gampdf (x, 1, 2); 338s ***** assert (exppdf (x, 2*ones (1,5)), y) 338s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 338s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 338s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 338s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 338s ***** error exppdf () 338s ***** error exppdf (1,2,3) 338s ***** error ... 338s exppdf (ones (3), ones (2)) 338s ***** error ... 338s exppdf (ones (2), ones (3)) 338s ***** error exppdf (i, 2) 338s ***** error exppdf (2, i) 338s 11 tests, 11 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/burrpdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/burrpdf.m 338s ***** demo 338s ## Plot various PDFs from the Burr type XII distribution 338s x = 0.001:0.001:3; 338s y1 = burrpdf (x, 1, 1, 1); 338s y2 = burrpdf (x, 1, 1, 2); 338s y3 = burrpdf (x, 1, 1, 3); 338s y4 = burrpdf (x, 1, 2, 1); 338s y5 = burrpdf (x, 1, 3, 1); 338s y6 = burrpdf (x, 1, 0.5, 2); 338s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 338s x, y4, "-c", x, y5, "-m", x, y6, "-k") 338s grid on 338s ylim ([0, 2]) 338s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 338s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 338s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 338s "location", "northeast") 338s title ("Burr type XII PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** shared x, y 338s x = [-1, 0, 1, 2, Inf]; 338s y = [0, 1, 1/4, 1/9, 0]; 338s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 338s ***** assert (burrpdf (x, 1, 1, 1), y) 338s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 338s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 338s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 338s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 338s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 338s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 338s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 338s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 338s ***** error burrpdf () 338s ***** error burrpdf (1) 338s ***** error burrpdf (1, 2) 338s ***** error burrpdf (1, 2, 3) 338s ***** error ... 338s burrpdf (1, 2, 3, 4, 5) 338s ***** error ... 338s burrpdf (ones (3), ones (2), ones(2), ones(2)) 338s ***** error ... 338s burrpdf (ones (2), ones (3), ones(2), ones(2)) 338s ***** error ... 338s burrpdf (ones (2), ones (2), ones(3), ones(2)) 338s ***** error ... 338s burrpdf (ones (2), ones (2), ones(2), ones(3)) 338s ***** error burrpdf (i, 2, 3, 4) 338s ***** error burrpdf (1, i, 3, 4) 338s ***** error burrpdf (1, 2, i, 4) 338s ***** error burrpdf (1, 2, 3, i) 338s 23 tests, 23 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/loglpdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/loglpdf.m 338s ***** demo 338s ## Plot various PDFs from the log-logistic distribution 338s x = 0.001:0.001:2; 338s y1 = loglpdf (x, log (1), 1/0.5); 338s y2 = loglpdf (x, log (1), 1); 338s y3 = loglpdf (x, log (1), 1/2); 338s y4 = loglpdf (x, log (1), 1/4); 338s y5 = loglpdf (x, log (1), 1/8); 338s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 338s grid on 338s ylim ([0,3]) 338s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 338s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 338s title ("Log-logistic PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 338s ***** shared out1, out2 338s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 338s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 338s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 338s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 338s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 338s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 338s ***** assert (class (loglpdf (1, single (2), 3)), "single") 338s ***** assert (class (loglpdf (1, 2, single (3))), "single") 338s ***** error loglpdf (1) 338s ***** error loglpdf (1, 2) 338s ***** error ... 338s loglpdf (1, ones (2), ones (3)) 338s ***** error ... 338s loglpdf (ones (2), 1, ones (3)) 338s ***** error ... 338s loglpdf (ones (2), ones (3), 1) 338s ***** error loglpdf (i, 2, 3) 338s ***** error loglpdf (1, i, 3) 338s ***** error loglpdf (1, 2, i) 338s 14 tests, 14 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/poisscdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/poisscdf.m 338s ***** demo 338s ## Plot various CDFs from the Poisson distribution 338s x = 0:20; 338s p1 = poisscdf (x, 1); 338s p2 = poisscdf (x, 4); 338s p3 = poisscdf (x, 10); 338s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 338s grid on 338s ylim ([0, 1]) 338s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 338s title ("Poisson CDF") 338s xlabel ("values in x (number of occurences)") 338s ylabel ("probability") 338s ***** shared x, y 338s x = [-1 0 1 2 Inf]; 338s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 338s ***** assert (poisscdf (x, ones (1,5)), y) 338s ***** assert (poisscdf (x, 1), y) 338s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 338s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 338s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 338s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 338s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 338s ***** error poisscdf () 338s ***** error poisscdf (1) 338s ***** error poisscdf (1, 2, 3) 338s ***** error poisscdf (1, 2, "tail") 338s ***** error ... 338s poisscdf (ones (3), ones (2)) 338s ***** error ... 338s poisscdf (ones (2), ones (3)) 338s ***** error poisscdf (i, 2) 338s ***** error poisscdf (2, i) 338s 15 tests, 15 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/mnpdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mnpdf.m 338s ***** test 338s x = [1, 4, 2]; 338s pk = [0.2, 0.5, 0.3]; 338s y = mnpdf (x, pk); 338s assert (y, 0.11812, 0.001); 338s ***** test 338s x = [1, 4, 2; 1, 0, 9]; 338s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 338s y = mnpdf (x, pk); 338s assert (y, [0.11812; 0.13422], 0.001); 338s 2 tests, 2 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/cauchycdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/cauchycdf.m 338s ***** demo 338s ## Plot various CDFs from the Cauchy distribution 338s x = -5:0.01:5; 338s p1 = cauchycdf (x, 0, 0.5); 338s p2 = cauchycdf (x, 0, 1); 338s p3 = cauchycdf (x, 0, 2); 338s p4 = cauchycdf (x, -2, 1); 338s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 338s grid on 338s xlim ([-5, 5]) 338s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 338s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 338s title ("Cauchy CDF") 338s xlabel ("values in x") 338s ylabel ("probability") 338s ***** shared x, y 338s x = [-1 0 0.5 1 2]; 338s y = 1/pi * atan ((x-1) / 2) + 1/2; 338s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 338s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 338s ***** assert (cauchycdf (x, ones (1,5), 2), y) 338s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 338s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 338s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 338s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 338s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 338s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 338s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 338s ***** error cauchycdf () 338s ***** error cauchycdf (1) 338s ***** error ... 338s cauchycdf (1, 2) 338s ***** error ... 338s cauchycdf (1, 2, 3, 4, 5) 338s ***** error cauchycdf (1, 2, 3, "tail") 338s ***** error cauchycdf (1, 2, 3, 4) 338s ***** error ... 338s cauchycdf (ones (3), ones (2), ones (2)) 338s ***** error ... 338s cauchycdf (ones (2), ones (3), ones (2)) 338s ***** error ... 338s cauchycdf (ones (2), ones (2), ones (3)) 338s ***** error cauchycdf (i, 2, 2) 338s ***** error cauchycdf (2, i, 2) 338s ***** error cauchycdf (2, 2, i) 338s 22 tests, 22 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/unidpdf.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unidpdf.m 338s ***** demo 338s ## Plot various PDFs from the discrete uniform distribution 338s x = 0:10; 338s y1 = unidpdf (x, 5); 338s y2 = unidpdf (x, 9); 338s plot (x, y1, "*b", x, y2, "*g") 338s grid on 338s xlim ([0, 10]) 338s ylim ([0, 0.25]) 338s legend ({"N = 5", "N = 9"}, "location", "northeast") 338s title ("Discrete uniform PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** shared x, y 338s x = [-1 0 1 2 10 11]; 338s y = [0 0 0.1 0.1 0.1 0]; 338s ***** assert (unidpdf (x, 10*ones (1,6)), y) 338s ***** assert (unidpdf (x, 10), y) 338s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 338s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 338s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 338s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 338s ***** error unidpdf () 338s ***** error unidpdf (1) 338s ***** error ... 338s unidpdf (ones (3), ones (2)) 338s ***** error ... 338s unidpdf (ones (2), ones (3)) 338s ***** error unidpdf (i, 2) 338s ***** error unidpdf (2, i) 338s 12 tests, 12 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/nctinv.m] 338s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nctinv.m 338s ***** demo 338s ## Plot various iCDFs from the noncentral T distribution 338s p = 0.001:0.001:0.999; 338s x1 = nctinv (p, 1, 0); 338s x2 = nctinv (p, 4, 0); 338s x3 = nctinv (p, 1, 2); 338s x4 = nctinv (p, 4, 2); 338s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 338s grid on 338s ylim ([-5, 5]) 338s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 338s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 338s title ("Noncentral T iCDF") 338s xlabel ("probability") 338s ylabel ("values in x") 338s ***** demo 338s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 338s ## with the same number of degrees of freedom (10). 338s 338s p = 0.001:0.001:0.999; 338s x1 = nctinv (p, 10, 1); 338s x2 = tinv (p, 10); 338s plot (p, x1, "-", p, x2, "-"); 338s grid on 338s ylim ([-5, 5]) 338s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 338s title ("Noncentral T vs T quantile functions") 338s xlabel ("probability") 338s ylabel ("values in x") 338s ***** test 338s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 338s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 339s ***** test 339s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 339s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 339s ***** test 339s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 339s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 340s ***** test 340s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 340s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 340s ***** test 340s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 340s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 341s ***** test 341s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 341s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 342s ***** test 342s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 344s ***** error nctinv () 344s ***** error nctinv (1) 344s ***** error nctinv (1, 2) 344s ***** error ... 344s nctinv (ones (3), ones (2), ones (2)) 344s ***** error ... 344s nctinv (ones (2), ones (3), ones (2)) 344s ***** error ... 344s nctinv (ones (2), ones (2), ones (3)) 344s ***** error nctinv (i, 2, 2) 344s ***** error nctinv (2, i, 2) 344s ***** error nctinv (2, 2, i) 344s 16 tests, 16 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/gevinv.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gevinv.m 344s ***** demo 344s ## Plot various iCDFs from the generalized extreme value distribution 344s p = 0.001:0.001:0.999; 344s x1 = gevinv (p, 1, 1, 1); 344s x2 = gevinv (p, 0.5, 1, 1); 344s x3 = gevinv (p, 1, 1, 5); 344s x4 = gevinv (p, 1, 2, 5); 344s x5 = gevinv (p, 1, 5, 5); 344s x6 = gevinv (p, 1, 0.5, 5); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 344s p, x4, "-c", p, x5, "-m", p, x6, "-k") 344s grid on 344s ylim ([-1, 10]) 344s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 344s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 344s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 344s "location", "northwest") 344s title ("Generalized extreme value iCDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** test 344s p = 0.1:0.1:0.9; 344s k = 0; 344s sigma = 1; 344s mu = 0; 344s x = gevinv (p, k, sigma, mu); 344s c = gevcdf(x, k, sigma, mu); 344s assert (c, p, 0.001); 344s ***** test 344s p = 0.1:0.1:0.9; 344s k = 1; 344s sigma = 1; 344s mu = 0; 344s x = gevinv (p, k, sigma, mu); 344s c = gevcdf(x, k, sigma, mu); 344s assert (c, p, 0.001); 344s ***** test 344s p = 0.1:0.1:0.9; 344s k = 0.3; 344s sigma = 1; 344s mu = 0; 344s x = gevinv (p, k, sigma, mu); 344s c = gevcdf(x, k, sigma, mu); 344s assert (c, p, 0.001); 344s ***** error gevinv () 344s ***** error gevinv (1) 344s ***** error gevinv (1, 2) 344s ***** error gevinv (1, 2, 3) 344s ***** error ... 344s gevinv (ones (3), ones (2), ones(2), ones(2)) 344s ***** error ... 344s gevinv (ones (2), ones (3), ones(2), ones(2)) 344s ***** error ... 344s gevinv (ones (2), ones (2), ones(3), ones(2)) 344s ***** error ... 344s gevinv (ones (2), ones (2), ones(2), ones(3)) 344s ***** error gevinv (i, 2, 3, 4) 344s ***** error gevinv (1, i, 3, 4) 344s ***** error gevinv (1, 2, i, 4) 344s ***** error gevinv (1, 2, 3, i) 344s 15 tests, 15 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/gevpdf.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gevpdf.m 344s ***** demo 344s ## Plot various PDFs from the generalized extreme value distribution 344s x = -1:0.001:10; 344s y1 = gevpdf (x, 1, 1, 1); 344s y2 = gevpdf (x, 0.5, 1, 1); 344s y3 = gevpdf (x, 1, 1, 5); 344s y4 = gevpdf (x, 1, 2, 5); 344s y5 = gevpdf (x, 1, 5, 5); 344s y6 = gevpdf (x, 1, 0.5, 5); 344s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 344s x, y4, "-c", x, y5, "-m", x, y6, "-k") 344s grid on 344s xlim ([-1, 10]) 344s ylim ([0, 1.1]) 344s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 344s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 344s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 344s "location", "northeast") 344s title ("Generalized extreme value PDF") 344s xlabel ("values in x") 344s ylabel ("density") 344s ***** test 344s x = 0:0.5:2.5; 344s sigma = 1:6; 344s k = 1; 344s mu = 0; 344s y = gevpdf (x, k, sigma, mu); 344s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 344s assert (y, expected_y, 0.001); 344s ***** test 344s x = -0.5:0.5:2.5; 344s sigma = 0.5; 344s k = 1; 344s mu = 0; 344s y = gevpdf (x, k, sigma, mu); 344s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 344s assert (y, expected_y, 0.001); 344s ***** test # check for continuity for k near 0 344s x = 1; 344s sigma = 0.5; 344s k = -0.03:0.01:0.03; 344s mu = 0; 344s y = gevpdf (x, k, sigma, mu); 344s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 344s assert (y, expected_y, 0.001); 344s ***** error gevpdf () 344s ***** error gevpdf (1) 344s ***** error gevpdf (1, 2) 344s ***** error gevpdf (1, 2, 3) 344s ***** error ... 344s gevpdf (ones (3), ones (2), ones(2), ones(2)) 344s ***** error ... 344s gevpdf (ones (2), ones (3), ones(2), ones(2)) 344s ***** error ... 344s gevpdf (ones (2), ones (2), ones(3), ones(2)) 344s ***** error ... 344s gevpdf (ones (2), ones (2), ones(2), ones(3)) 344s ***** error gevpdf (i, 2, 3, 4) 344s ***** error gevpdf (1, i, 3, 4) 344s ***** error gevpdf (1, 2, i, 4) 344s ***** error gevpdf (1, 2, 3, i) 344s 15 tests, 15 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/laplacecdf.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/laplacecdf.m 344s ***** demo 344s ## Plot various CDFs from the Laplace distribution 344s x = -10:0.01:10; 344s p1 = laplacecdf (x, 0, 1); 344s p2 = laplacecdf (x, 0, 2); 344s p3 = laplacecdf (x, 0, 4); 344s p4 = laplacecdf (x, -5, 4); 344s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 344s grid on 344s xlim ([-10, 10]) 344s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 344s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 344s title ("Laplace CDF") 344s xlabel ("values in x") 344s ylabel ("probability") 344s ***** shared x, y 344s x = [-Inf, -log(2), 0, log(2), Inf]; 344s y = [0, 1/4, 1/2, 3/4, 1]; 344s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 344s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 344s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 344s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 344s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 344s ***** error laplacecdf () 344s ***** error laplacecdf (1) 344s ***** error ... 344s laplacecdf (1, 2) 344s ***** error ... 344s laplacecdf (1, 2, 3, 4, 5) 344s ***** error laplacecdf (1, 2, 3, "tail") 344s ***** error laplacecdf (1, 2, 3, 4) 344s ***** error ... 344s laplacecdf (ones (3), ones (2), ones (2)) 344s ***** error ... 344s laplacecdf (ones (2), ones (3), ones (2)) 344s ***** error ... 344s laplacecdf (ones (2), ones (2), ones (3)) 344s ***** error laplacecdf (i, 2, 2) 344s ***** error laplacecdf (2, i, 2) 344s ***** error laplacecdf (2, 2, i) 344s 17 tests, 17 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/gevcdf.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gevcdf.m 344s ***** demo 344s ## Plot various CDFs from the generalized extreme value distribution 344s x = -1:0.001:10; 344s p1 = gevcdf (x, 1, 1, 1); 344s p2 = gevcdf (x, 0.5, 1, 1); 344s p3 = gevcdf (x, 1, 1, 5); 344s p4 = gevcdf (x, 1, 2, 5); 344s p5 = gevcdf (x, 1, 5, 5); 344s p6 = gevcdf (x, 1, 0.5, 5); 344s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 344s x, p4, "-c", x, p5, "-m", x, p6, "-k") 344s grid on 344s xlim ([-1, 10]) 344s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 344s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 344s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 344s "location", "southeast") 344s title ("Generalized extreme value CDF") 344s xlabel ("values in x") 344s ylabel ("probability") 344s ***** test 344s x = 0:0.5:2.5; 344s sigma = 1:6; 344s k = 1; 344s mu = 0; 344s p = gevcdf (x, k, sigma, mu); 344s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 344s assert (p, expected_p, 0.001); 344s ***** test 344s x = -0.5:0.5:2.5; 344s sigma = 0.5; 344s k = 1; 344s mu = 0; 344s p = gevcdf (x, k, sigma, mu); 344s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 344s assert (p, expected_p, 0.001); 344s ***** test # check for continuity for k near 0 344s x = 1; 344s sigma = 0.5; 344s k = -0.03:0.01:0.03; 344s mu = 0; 344s p = gevcdf (x, k, sigma, mu); 344s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 344s assert (p, expected_p, 0.001); 344s ***** error gevcdf () 344s ***** error gevcdf (1) 344s ***** error gevcdf (1, 2) 344s ***** error gevcdf (1, 2, 3) 344s ***** error ... 344s gevcdf (1, 2, 3, 4, 5, 6) 344s ***** error gevcdf (1, 2, 3, 4, "tail") 344s ***** error gevcdf (1, 2, 3, 4, 5) 344s ***** error ... 344s gevcdf (ones (3), ones (2), ones(2), ones(2)) 344s ***** error ... 344s gevcdf (ones (2), ones (3), ones(2), ones(2)) 344s ***** error ... 344s gevcdf (ones (2), ones (2), ones(3), ones(2)) 344s ***** error ... 344s gevcdf (ones (2), ones (2), ones(2), ones(3)) 344s ***** error gevcdf (i, 2, 3, 4) 344s ***** error gevcdf (1, i, 3, 4) 344s ***** error gevcdf (1, 2, i, 4) 344s ***** error gevcdf (1, 2, 3, i) 344s 18 tests, 18 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/wienrnd.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wienrnd.m 344s ***** error wienrnd (0) 344s ***** error wienrnd (1, 3, -50) 344s ***** error wienrnd (5, 0) 344s ***** error wienrnd (0.4, 3, 5) 344s ***** error wienrnd ([1 4], 3, 5) 344s 5 tests, 5 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/lognrnd.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/lognrnd.m 344s ***** assert (size (lognrnd (1, 1)), [1 1]) 344s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 344s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 344s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 344s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 344s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 344s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 344s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 344s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 344s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 344s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 344s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 344s ***** assert (class (lognrnd (1, 1)), "double") 344s ***** assert (class (lognrnd (1, single (1))), "single") 344s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 344s ***** assert (class (lognrnd (single (1), 1)), "single") 344s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 344s ***** error lognrnd () 344s ***** error lognrnd (1) 344s ***** error ... 344s lognrnd (ones (3), ones (2)) 344s ***** error ... 344s lognrnd (ones (2), ones (3)) 344s ***** error lognrnd (i, 2, 3) 344s ***** error lognrnd (1, i, 3) 344s ***** error ... 344s lognrnd (1, 2, -1) 344s ***** error ... 344s lognrnd (1, 2, 1.2) 344s ***** error ... 344s lognrnd (1, 2, ones (2)) 344s ***** error ... 344s lognrnd (1, 2, [2 -1 2]) 344s ***** error ... 344s lognrnd (1, 2, [2 0 2.5]) 344s ***** error ... 344s lognrnd (1, 2, 2, -1, 5) 344s ***** error ... 344s lognrnd (1, 2, 2, 1.5, 5) 344s ***** error ... 344s lognrnd (2, ones (2), 3) 344s ***** error ... 344s lognrnd (2, ones (2), [3, 2]) 344s ***** error ... 344s lognrnd (2, ones (2), 3, 2) 344s 33 tests, 33 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/ncfrnd.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncfrnd.m 344s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 344s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 344s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 344s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 344s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 344s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 344s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 344s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 344s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 344s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 344s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 344s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 344s ***** assert (class (ncfrnd (1, 1, 1)), "double") 344s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 344s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 344s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 344s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 344s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 344s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 344s ***** error ncfrnd () 344s ***** error ncfrnd (1) 344s ***** error ncfrnd (1, 2) 344s ***** error ... 344s ncfrnd (ones (3), ones (2), ones (2)) 344s ***** error ... 344s ncfrnd (ones (2), ones (3), ones (2)) 344s ***** error ... 344s ncfrnd (ones (2), ones (2), ones (3)) 344s ***** error ncfrnd (i, 2, 3) 344s ***** error ncfrnd (1, i, 3) 344s ***** error ncfrnd (1, 2, i) 344s ***** error ... 344s ncfrnd (1, 2, 3, -1) 344s ***** error ... 344s ncfrnd (1, 2, 3, 1.2) 344s ***** error ... 344s ncfrnd (1, 2, 3, ones (2)) 344s ***** error ... 344s ncfrnd (1, 2, 3, [2 -1 2]) 344s ***** error ... 344s ncfrnd (1, 2, 3, [2 0 2.5]) 344s ***** error ... 344s ncfrnd (1, 2, 3, 2, -1, 5) 344s ***** error ... 344s ncfrnd (1, 2, 3, 2, 1.5, 5) 344s ***** error ... 344s ncfrnd (2, ones (2), 2, 3) 344s ***** error ... 344s ncfrnd (2, ones (2), 2, [3, 2]) 344s ***** error ... 344s ncfrnd (2, ones (2), 2, 3, 2) 344s 38 tests, 38 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/triinv.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/triinv.m 344s ***** demo 344s ## Plot various iCDFs from the triangular distribution 344s p = 0.001:0.001:0.999; 344s x1 = triinv (p, 3, 6, 4); 344s x2 = triinv (p, 1, 5, 2); 344s x3 = triinv (p, 2, 9, 3); 344s x4 = triinv (p, 2, 9, 5); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 344s grid on 344s ylim ([0, 10]) 344s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 344s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 344s "location", "northwest") 344s title ("Triangular CDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** shared p, y 344s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 344s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 344s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 344s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 344s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 344s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 344s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 344s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 344s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 344s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 344s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 344s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 344s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 344s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 344s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 344s ***** error triinv () 344s ***** error triinv (1) 344s ***** error triinv (1, 2) 344s ***** error triinv (1, 2, 3) 344s ***** error ... 344s triinv (1, 2, 3, 4, 5) 344s ***** error ... 344s triinv (ones (3), ones (2), ones(2), ones(2)) 344s ***** error ... 344s triinv (ones (2), ones (3), ones(2), ones(2)) 344s ***** error ... 344s triinv (ones (2), ones (2), ones(3), ones(2)) 344s ***** error ... 344s triinv (ones (2), ones (2), ones(2), ones(3)) 344s ***** error triinv (i, 2, 3, 4) 344s ***** error triinv (1, i, 3, 4) 344s ***** error triinv (1, 2, i, 4) 344s ***** error triinv (1, 2, 3, i) 344s 26 tests, 26 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/gaminv.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gaminv.m 344s ***** demo 344s ## Plot various iCDFs from the Gamma distribution 344s p = 0.001:0.001:0.999; 344s x1 = gaminv (p, 1, 2); 344s x2 = gaminv (p, 2, 2); 344s x3 = gaminv (p, 3, 2); 344s x4 = gaminv (p, 5, 1); 344s x5 = gaminv (p, 9, 0.5); 344s x6 = gaminv (p, 7.5, 1); 344s x7 = gaminv (p, 0.5, 1); 344s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 344s p, x5, "-k", p, x6, "-b", p, x7, "-c") 344s ylim ([0, 20]) 344s grid on 344s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 344s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 344s "α = 0.5, β = 1"}, "location", "northwest") 344s title ("Gamma iCDF") 344s xlabel ("probability") 344s ylabel ("x") 344s ***** shared p 344s p = [-1 0 0.63212055882855778 1 2]; 344s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 344s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 344s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 344s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 344s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 344s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 344s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 344s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 344s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 344s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 344s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 344s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 344s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 344s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 344s eps ("single")) 344s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 344s eps ("single")) 344s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 344s eps ("single")) 344s ***** error gaminv () 344s ***** error gaminv (1) 344s ***** error gaminv (1,2) 344s ***** error ... 344s gaminv (ones (3), ones (2), ones (2)) 344s ***** error ... 344s gaminv (ones (2), ones (3), ones (2)) 344s ***** error ... 344s gaminv (ones (2), ones (2), ones (3)) 344s ***** error gaminv (i, 2, 2) 344s ***** error gaminv (2, i, 2) 344s ***** error gaminv (2, 2, i) 344s 25 tests, 25 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/ncx2pdf.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncx2pdf.m 344s ***** demo 344s ## Plot various PDFs from the noncentral chi-squared distribution 344s x = 0:0.1:10; 344s y1 = ncx2pdf (x, 2, 1); 344s y2 = ncx2pdf (x, 2, 2); 344s y3 = ncx2pdf (x, 2, 3); 344s y4 = ncx2pdf (x, 4, 1); 344s y5 = ncx2pdf (x, 4, 2); 344s y6 = ncx2pdf (x, 4, 3); 344s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 344s x, y4, "-m", x, y5, "-c", x, y6, "-y") 344s grid on 344s xlim ([0, 10]) 344s ylim ([0, 0.32]) 344s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 344s "df = 2, λ = 3", "df = 4, λ = 1", ... 344s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 344s title ("Noncentral chi-squared PDF") 344s xlabel ("values in x") 344s ylabel ("density") 344s ***** demo 344s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 344s ## chi-squared PDF with the same number of degrees of freedom (4). 344s 344s x = 0:0.1:10; 344s y1 = ncx2pdf (x, 4, 2); 344s y2 = chi2pdf (x, 4); 344s plot (x, y1, "-", x, y2, "-"); 344s grid on 344s xlim ([0, 10]) 344s ylim ([0, 0.32]) 344s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 344s title ("Noncentral chi-squared vs chi-squared PDFs") 344s xlabel ("values in x") 344s ylabel ("density") 344s ***** shared x1, df, d1 344s x1 = [-Inf, 2, NaN, 4, Inf]; 344s df = [2, 0, -1, 1, 4]; 344s d1 = [1, NaN, 3, -1, 2]; 344s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 344s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 344s 0.06160064323277038, 0], 1e-14); 344s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 344s 0.09631299762429098, 0], 1e-14); 344s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 344s 0.08430464047296625, 0], 1e-14); 344s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 344s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 344s NaN, 0.1076346446244688], 1e-14); 344s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 344s NaN, 0.1192317192431485], 1e-14); 344s ***** error ncx2pdf () 344s ***** error ncx2pdf (1) 344s ***** error ncx2pdf (1, 2) 344s ***** error ... 344s ncx2pdf (ones (3), ones (2), ones (2)) 344s ***** error ... 344s ncx2pdf (ones (2), ones (3), ones (2)) 344s ***** error ... 344s ncx2pdf (ones (2), ones (2), ones (3)) 344s ***** error ncx2pdf (i, 2, 2) 344s ***** error ncx2pdf (2, i, 2) 344s ***** error ncx2pdf (2, 2, i) 344s 16 tests, 16 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/plinv.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/plinv.m 344s ***** demo 344s ## Plot various iCDFs from the Piecewise linear distribution 344s p = 0.001:0.001:0.999; 344s x1 = [0, 1, 3, 4, 7, 10]; 344s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 344s x2 = [0, 2, 5, 6, 7, 8]; 344s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 344s data1 = plinv (p, x1, Fx1); 344s data2 = plinv (p, x2, Fx2); 344s plot (p, data1, "-b", p, data2, "-g") 344s grid on 344s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 344s title ("Piecewise linear iCDF") 344s xlabel ("probability") 344s ylabel ("values in data") 344s ***** test 344s p = 0:0.2:1; 344s data = plinv (p, [0, 1], [0, 1]); 344s assert (data, p); 344s ***** test 344s p = 0:0.2:1; 344s data = plinv (p, [0, 2], [0, 1]); 344s assert (data, 2 * p); 344s ***** test 344s p = 0:0.2:1; 344s data_out = 1:6; 344s data = plinv (p, [0, 1], [0, 0.5]); 344s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 344s ***** test 344s p = 0:0.2:1; 344s data_out = 1:6; 344s data = plinv (p, [0, 0.5], [0, 1]); 344s assert (data, [0:0.1:0.5]); 344s ***** error plinv () 344s ***** error plinv (1) 344s ***** error plinv (1, 2) 344s ***** error ... 344s plinv (1, [0, 1, 2], [0, 1]) 344s ***** error ... 344s plinv (1, [0], [1]) 344s ***** error ... 344s plinv (1, [0, 1, 2], [0, 1, 1.5]) 344s ***** error ... 344s plinv (1, [0, 1, 2], [0, i, 1]) 344s ***** error ... 344s plinv (i, [0, 1, 2], [0, 0.5, 1]) 344s ***** error ... 344s plinv (1, [0, i, 2], [0, 0.5, 1]) 344s ***** error ... 344s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 344s 14 tests, 14 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/evinv.m] 344s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/evinv.m 344s ***** demo 344s ## Plot various iCDFs from the extreme value distribution 344s p = 0.001:0.001:0.999; 344s x1 = evinv (p, 0.5, 2); 344s x2 = evinv (p, 1.0, 2); 344s x3 = evinv (p, 1.5, 3); 344s x4 = evinv (p, 3.0, 4); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 344s grid on 344s ylim ([-10, 10]) 344s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 344s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 344s title ("Extreme value iCDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** shared p, x 344s p = [0, 0.05, 0.5 0.95]; 344s x = [-Inf, -2.9702, -0.3665, 1.0972]; 344s ***** assert (evinv (p), x, 1e-4) 344s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 344s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 344s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 344s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 344s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 345s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 345s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 345s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 345s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 345s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 345s ***** error evinv () 345s ***** error evinv (1,2,3,4,5,6) 345s ***** error ... 345s evinv (ones (3), ones (2), ones (2)) 345s ***** error ... 345s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 345s ***** error ... 345s [p, plo, pup] = evinv (1, 2, 3) 345s ***** error [p, plo, pup] = ... 345s evinv (1, 2, 3, [1, 0; 0, 1], 0) 345s ***** error [p, plo, pup] = ... 345s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 345s ***** error evinv (i, 2, 2) 345s ***** error evinv (2, i, 2) 345s ***** error evinv (2, 2, i) 345s ***** error ... 345s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 345s 22 tests, 22 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/unidcdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unidcdf.m 345s ***** demo 345s ## Plot various CDFs from the discrete uniform distribution 345s x = 0:10; 345s p1 = unidcdf (x, 5); 345s p2 = unidcdf (x, 9); 345s plot (x, p1, "*b", x, p2, "*g") 345s grid on 345s xlim ([0, 10]) 345s ylim ([0, 1]) 345s legend ({"N = 5", "N = 9"}, "location", "southeast") 345s title ("Discrete uniform CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x, y 345s x = [0 1 2.5 10 11]; 345s y = [0, 0.1 0.2 1.0 1.0]; 345s ***** assert (unidcdf (x, 10*ones (1,5)), y) 345s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 345s ***** assert (unidcdf (x, 10), y) 345s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 345s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 345s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 345s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 345s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 345s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 345s ***** error unidcdf () 345s ***** error unidcdf (1) 345s ***** error unidcdf (1, 2, 3) 345s ***** error unidcdf (1, 2, "tail") 345s ***** error ... 345s unidcdf (ones (3), ones (2)) 345s ***** error ... 345s unidcdf (ones (2), ones (3)) 345s ***** error unidcdf (i, 2) 345s ***** error unidcdf (2, i) 345s 17 tests, 17 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/vmrnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/vmrnd.m 345s ***** assert (size (vmrnd (1, 1)), [1 1]) 345s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 345s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 345s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 345s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 345s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 345s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 345s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 345s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 345s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 345s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (class (vmrnd (1, 1)), "double") 345s ***** assert (class (vmrnd (1, single (1))), "single") 345s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 345s ***** assert (class (vmrnd (single (1), 1)), "single") 345s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 345s ***** error vmrnd () 345s ***** error vmrnd (1) 345s ***** error ... 345s vmrnd (ones (3), ones (2)) 345s ***** error ... 345s vmrnd (ones (2), ones (3)) 345s ***** error vmrnd (i, 2, 3) 345s ***** error vmrnd (1, i, 3) 345s ***** error ... 345s vmrnd (1, 2, -1) 345s ***** error ... 345s vmrnd (1, 2, 1.2) 345s ***** error ... 345s vmrnd (1, 2, ones (2)) 345s ***** error ... 345s vmrnd (1, 2, [2 -1 2]) 345s ***** error ... 345s vmrnd (1, 2, [2 0 2.5]) 345s ***** error ... 345s vmrnd (1, 2, 2, -1, 5) 345s ***** error ... 345s vmrnd (1, 2, 2, 1.5, 5) 345s ***** error ... 345s vmrnd (2, ones (2), 3) 345s ***** error ... 345s vmrnd (2, ones (2), [3, 2]) 345s ***** error ... 345s vmrnd (2, ones (2), 3, 2) 345s 33 tests, 33 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/laplaceinv.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/laplaceinv.m 345s ***** demo 345s ## Plot various iCDFs from the Laplace distribution 345s p = 0.001:0.001:0.999; 345s x1 = cauchyinv (p, 0, 1); 345s x2 = cauchyinv (p, 0, 2); 345s x3 = cauchyinv (p, 0, 4); 345s x4 = cauchyinv (p, -5, 4); 345s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 345s grid on 345s ylim ([-10, 10]) 345s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 345s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 345s title ("Laplace iCDF") 345s xlabel ("probability") 345s ylabel ("values in x") 345s ***** shared p, x 345s p = [-1 0 0.5 1 2]; 345s x = [NaN, -Inf, 0, Inf, NaN]; 345s ***** assert (laplaceinv (p, 0, 1), x) 345s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 345s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 345s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 345s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 345s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 345s ***** error laplaceinv () 345s ***** error laplaceinv (1) 345s ***** error ... 345s laplaceinv (1, 2) 345s ***** error laplaceinv (1, 2, 3, 4) 345s ***** error ... 345s laplaceinv (1, ones (2), ones (3)) 345s ***** error ... 345s laplaceinv (ones (2), 1, ones (3)) 345s ***** error ... 345s laplaceinv (ones (2), ones (3), 1) 345s ***** error laplaceinv (i, 2, 3) 345s ***** error laplaceinv (1, i, 3) 345s ***** error laplaceinv (1, 2, i) 345s 16 tests, 16 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/plcdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/plcdf.m 345s ***** demo 345s ## Plot various CDFs from the Piecewise linear distribution 345s data = 0:0.01:10; 345s x1 = [0, 1, 3, 4, 7, 10]; 345s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 345s x2 = [0, 2, 5, 6, 7, 8]; 345s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 345s p1 = plcdf (data, x1, Fx1); 345s p2 = plcdf (data, x2, Fx2); 345s plot (data, p1, "-b", data, p2, "g") 345s grid on 345s ylim ([0, 1]) 345s xlim ([0, 10]) 345s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 345s title ("Piecewise linear CDF") 345s xlabel ("values in data") 345s ylabel ("probability") 345s ***** test 345s data = 0:0.2:1; 345s p = plcdf (data, [0, 1], [0, 1]); 345s assert (p, data); 345s ***** test 345s data = 0:0.2:1; 345s p = plcdf (data, [0, 2], [0, 1]); 345s assert (p, 0.5 * data); 345s ***** test 345s data = 0:0.2:1; 345s p = plcdf (data, [0, 1], [0, 0.5]); 345s assert (p, 0.5 * data); 345s ***** test 345s data = 0:0.2:1; 345s p = plcdf (data, [0, 0.5], [0, 1]); 345s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 345s ***** test 345s data = 0:0.2:1; 345s p = plcdf (data, [0, 1], [0, 1], "upper"); 345s assert (p, 1 - data); 345s ***** error plcdf () 345s ***** error plcdf (1) 345s ***** error plcdf (1, 2) 345s ***** error plcdf (1, 2, 3, "uper") 345s ***** error plcdf (1, 2, 3, 4) 345s ***** error ... 345s plcdf (1, [0, 1, 2], [0, 1]) 345s ***** error ... 345s plcdf (1, [0], [1]) 345s ***** error ... 345s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 345s ***** error ... 345s plcdf (1, [0, 1, 2], [0, i, 1]) 345s ***** error ... 345s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 345s ***** error ... 345s plcdf (1, [0, i, 2], [0, 0.5, 1]) 345s ***** error ... 345s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 345s 17 tests, 17 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/tlsinv.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tlsinv.m 345s ***** demo 345s ## Plot various iCDFs from the location-scale Student's T distribution 345s p = 0.001:0.001:0.999; 345s x1 = tlsinv (p, 0, 1, 1); 345s x2 = tlsinv (p, 0, 2, 2); 345s x3 = tlsinv (p, 3, 2, 5); 345s x4 = tlsinv (p, -1, 3, Inf); 345s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 345s grid on 345s xlim ([0, 1]) 345s ylim ([-8, 8]) 345s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 345s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 345s "location", "southeast") 345s title ("Location-scale Student's T iCDF") 345s xlabel ("probability") 345s ylabel ("values in x") 345s ***** shared p 345s p = [-1 0 0.5 1 2]; 345s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 345s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 345s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 345s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 345s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 345s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 345s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 345s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 345s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 345s ***** error tlsinv () 345s ***** error tlsinv (1) 345s ***** error tlsinv (1, 2) 345s ***** error tlsinv (1, 2, 3) 345s ***** error ... 345s tlsinv (ones (3), ones (2), 1, 1) 345s ***** error ... 345s tlsinv (ones (2), 1, ones (3), 1) 345s ***** error ... 345s tlsinv (ones (2), 1, 1, ones (3)) 345s ***** error tlsinv (i, 2, 3, 4) 345s ***** error tlsinv (2, i, 3, 4) 345s ***** error tlsinv (2, 2, i, 4) 345s ***** error tlsinv (2, 2, 3, i) 345s 20 tests, 20 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/fpdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/fpdf.m 345s ***** demo 345s ## Plot various PDFs from the F distribution 345s x = 0.01:0.01:4; 345s y1 = fpdf (x, 1, 1); 345s y2 = fpdf (x, 2, 1); 345s y3 = fpdf (x, 5, 2); 345s y4 = fpdf (x, 10, 1); 345s y5 = fpdf (x, 100, 100); 345s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 345s grid on 345s ylim ([0, 2.5]) 345s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 345s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 345s "df1 = 100, df2 = 100"}, "location", "northeast") 345s title ("F PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** shared x, y 345s x = [-1, 0, 0.5, 1, 2]; 345s y = [0, 0, 4/9, 1/4, 1/9]; 345s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 345s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 345s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 345s ***** assert (fpdf (x, [0, NaN, Inf, 2, 2], 2), [NaN, NaN, 0.5413, y(4:5)], 1e-4) 345s ***** assert (fpdf (x, 2, [0, NaN, Inf, 2, 2]), [NaN, NaN, 0.6065, y(4:5)], 1e-4) 345s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 345s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 345s rand ("seed", 1234); # for reproducibility 345s xr = rand (10,1); 345s xr = xr(x > 0.1 & x < 0.9); 345s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 345s assert (fpdf (xr, 1, 2), yr, 5*eps); 345s ***** test 345s yy = fpdf (2, 4, Inf); 345s assert (yy, 0.1465, 1e-4) 345s ***** test 345s yy = fpdf (2, 4, 1000000000000000); 345s assert (yy, 0.1465, 1e-4) 345s ***** test 345s yy = fpdf (2, Inf, 4); 345s assert (yy, 0.1839, 1e-4) 345s ***** test 345s yy = fpdf (2, 10000000000000000, 4); 345s assert (yy, 0.1839, 1e-4) 345s ***** test 345s yy = fpdf (2, Inf, Inf); 345s assert (yy, 0) 345s ***** test 345s yy = fpdf (NaN, Inf, Inf); 345s assert (yy, NaN) 345s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 345s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 345s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 345s ***** error fpdf () 345s ***** error fpdf (1) 345s ***** error fpdf (1,2) 345s ***** error ... 345s fpdf (ones (3), ones (2), ones (2)) 345s ***** error ... 345s fpdf (ones (2), ones (3), ones (2)) 345s ***** error ... 345s fpdf (ones (2), ones (2), ones (3)) 345s ***** error fpdf (i, 2, 2) 345s ***** error fpdf (2, i, 2) 345s ***** error fpdf (2, 2, i) 345s 25 tests, 25 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/trnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/trnd.m 345s ***** assert (size (trnd (2)), [1, 1]) 345s ***** assert (size (trnd (ones (2,1))), [2, 1]) 345s ***** assert (size (trnd (ones (2,2))), [2, 2]) 345s ***** assert (size (trnd (1, 3)), [3, 3]) 345s ***** assert (size (trnd (1, [4 1])), [4, 1]) 345s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 345s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 345s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 345s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 345s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (trnd (0, 1, 1), NaN) 345s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 345s ***** assert (class (trnd (2)), "double") 345s ***** assert (class (trnd (single (2))), "single") 345s ***** assert (class (trnd (single ([2 2]))), "single") 345s ***** error trnd () 345s ***** error trnd (i) 345s ***** error ... 345s trnd (1, -1) 345s ***** error ... 345s trnd (1, 1.2) 345s ***** error ... 345s trnd (1, ones (2)) 345s ***** error ... 345s trnd (1, [2 -1 2]) 345s ***** error ... 345s trnd (1, [2 0 2.5]) 345s ***** error ... 345s trnd (ones (2), ones (2)) 345s ***** error ... 345s trnd (1, 2, -1, 5) 345s ***** error ... 345s trnd (1, 2, 1.5, 5) 345s ***** error trnd (ones (2,2), 3) 345s ***** error trnd (ones (2,2), [3, 2]) 345s ***** error trnd (ones (2,2), 2, 3) 345s 29 tests, 29 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/tlspdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tlspdf.m 345s ***** demo 345s ## Plot various PDFs from the Student's T distribution 345s x = -8:0.01:8; 345s y1 = tlspdf (x, 0, 1, 1); 345s y2 = tlspdf (x, 0, 2, 2); 345s y3 = tlspdf (x, 3, 2, 5); 345s y4 = tlspdf (x, -1, 3, Inf); 345s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 345s grid on 345s xlim ([-8, 8]) 345s ylim ([0, 0.41]) 345s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 345s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 345s "location", "northwest") 345s title ("Location-scale Student's T PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** test 345s x = rand (10,1); 345s y = 1./(pi * (1 + x.^2)); 345s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 345s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 345s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 345s ***** shared x, y 345s x = [-Inf 0 0.5 1 Inf]; 345s y = 1./(pi * (1 + x.^2)); 345s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 345s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 345s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 345s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 345s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 345s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 345s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 345s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 345s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 345s ***** error tlspdf () 345s ***** error tlspdf (1) 345s ***** error tlspdf (1, 2) 345s ***** error tlspdf (1, 2, 3) 345s ***** error ... 345s tlspdf (ones (3), ones (2), 1, 1) 345s ***** error ... 345s tlspdf (ones (2), 1, ones (3), 1) 345s ***** error ... 345s tlspdf (ones (2), 1, 1, ones (3)) 345s ***** error tlspdf (i, 2, 1, 1) 345s ***** error tlspdf (2, i, 1, 1) 345s ***** error tlspdf (2, 1, i, 1) 345s ***** error tlspdf (2, 1, 1, i) 345s 21 tests, 21 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/gevrnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gevrnd.m 345s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 345s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 345s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 345s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 345s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 345s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 345s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 345s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 345s ***** assert (class (gevrnd (1,1,1)), "double") 345s ***** assert (class (gevrnd (single (1),1,1)), "single") 345s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 345s ***** assert (class (gevrnd (1,single (1),1)), "single") 345s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 345s ***** assert (class (gevrnd (1,1,single (1))), "single") 345s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 345s ***** error gevrnd () 345s ***** error gevrnd (1) 345s ***** error gevrnd (1, 2) 345s ***** error ... 345s gevrnd (ones (3), ones (2), ones (2)) 345s ***** error ... 345s gevrnd (ones (2), ones (3), ones (2)) 345s ***** error ... 345s gevrnd (ones (2), ones (2), ones (3)) 345s ***** error gevrnd (i, 2, 3) 345s ***** error gevrnd (1, i, 3) 345s ***** error gevrnd (1, 2, i) 345s ***** error ... 345s gevrnd (1, 2, 3, -1) 345s ***** error ... 345s gevrnd (1, 2, 3, 1.2) 345s ***** error ... 345s gevrnd (1, 2, 3, ones (2)) 345s ***** error ... 345s gevrnd (1, 2, 3, [2 -1 2]) 345s ***** error ... 345s gevrnd (1, 2, 3, [2 0 2.5]) 345s ***** error ... 345s gevrnd (1, 2, 3, 2, -1, 5) 345s ***** error ... 345s gevrnd (1, 2, 3, 2, 1.5, 5) 345s ***** error ... 345s gevrnd (2, ones (2), 2, 3) 345s ***** error ... 345s gevrnd (2, ones (2), 2, [3, 2]) 345s ***** error ... 345s gevrnd (2, ones (2), 2, 3, 2) 345s 34 tests, 34 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/burrrnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/burrrnd.m 345s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 345s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 345s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 345s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 345s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 345s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 345s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 345s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 345s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 345s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 345s ***** assert (class (burrrnd (1,1,1)), "double") 345s ***** assert (class (burrrnd (single (1),1,1)), "single") 345s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 345s ***** assert (class (burrrnd (1,single (1),1)), "single") 345s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 345s ***** assert (class (burrrnd (1,1,single (1))), "single") 345s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 345s ***** error burrrnd () 345s ***** error burrrnd (1) 345s ***** error burrrnd (1, 2) 345s ***** error ... 345s burrrnd (ones (3), ones (2), ones (2)) 345s ***** error ... 345s burrrnd (ones (2), ones (3), ones (2)) 345s ***** error ... 345s burrrnd (ones (2), ones (2), ones (3)) 345s ***** error burrrnd (i, 2, 3) 345s ***** error burrrnd (1, i, 3) 345s ***** error burrrnd (1, 2, i) 345s ***** error ... 345s burrrnd (1, 2, 3, -1) 345s ***** error ... 345s burrrnd (1, 2, 3, 1.2) 345s ***** error ... 345s burrrnd (1, 2, 3, ones (2)) 345s ***** error ... 345s burrrnd (1, 2, 3, [2 -1 2]) 345s ***** error ... 345s burrrnd (1, 2, 3, [2 0 2.5]) 345s ***** error ... 345s burrrnd (1, 2, 3, 2, -1, 5) 345s ***** error ... 345s burrrnd (1, 2, 3, 2, 1.5, 5) 345s ***** error ... 345s burrrnd (2, ones (2), 2, 3) 345s ***** error ... 345s burrrnd (2, ones (2), 2, [3, 2]) 345s ***** error ... 345s burrrnd (2, ones (2), 2, 3, 2) 345s 36 tests, 36 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/plrnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/plrnd.m 345s ***** shared x, Fx 345s x = [0, 1, 3, 4, 7, 10]; 345s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 345s ***** assert (size (plrnd (x, Fx)), [1, 1]) 345s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 345s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 345s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 345s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 345s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 345s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (class (plrnd (x, Fx)), "double") 345s ***** assert (class (plrnd (x, single (Fx))), "single") 345s ***** assert (class (plrnd (single (x), Fx)), "single") 345s ***** error plrnd () 345s ***** error plrnd (1) 345s ***** error ... 345s plrnd ([0, 1, 2], [0, 1]) 345s ***** error ... 345s plrnd ([0], [1]) 345s ***** error ... 345s plrnd ([0, 1, 2], [0, 1, 1.5]) 345s ***** error ... 345s plrnd ([0, 1, 2], [0, i, 1]) 345s ***** error ... 345s plrnd ([0, i, 2], [0, 0.5, 1]) 345s ***** error ... 345s plrnd ([0, i, 2], [0, 0.5i, 1]) 345s ***** error ... 345s plrnd (x, Fx, -1) 345s ***** error ... 345s plrnd (x, Fx, 1.2) 345s ***** error ... 345s plrnd (x, Fx, ones (2)) 345s ***** error ... 345s plrnd (x, Fx, [2 -1 2]) 345s ***** error ... 345s plrnd (x, Fx, [2 0 2.5]) 345s ***** error ... 345s plrnd (x, Fx, 2, -1, 5) 345s ***** error ... 345s plrnd (x, Fx, 2, 1.5, 5) 345s 26 tests, 26 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/mvncdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvncdf.m 345s ***** demo 345s mu = [1, -1]; 345s Sigma = [0.9, 0.4; 0.4, 0.3]; 345s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 345s X = [X1(:), X2(:)]; 345s p = mvncdf (X, mu, Sigma); 345s Z = reshape (p, 25, 25); 345s surf (X1, X2, Z); 345s title ("Bivariate Normal Distribution"); 345s ylabel "X1" 345s xlabel "X2" 345s ***** demo 345s mu = [0, 0]; 345s Sigma = [0.25, 0.3; 0.3, 1]; 345s p = mvncdf ([0 0], [1 1], mu, Sigma); 345s x1 = -3:.2:3; 345s x2 = -3:.2:3; 345s [X1, X2] = meshgrid (x1, x2); 345s X = [X1(:), X2(:)]; 345s p = mvnpdf (X, mu, Sigma); 345s p = reshape (p, length (x2), length (x1)); 345s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 345s xlabel ("x"); 345s ylabel ("p"); 345s title ("Probability over Rectangular Region"); 345s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 345s ***** test 345s fD = (-2:2)'; 345s X = repmat (fD, 1, 4); 345s p = mvncdf (X); 345s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 345s ***** test 345s mu = [1, -1]; 345s Sigma = [0.9, 0.4; 0.4, 0.3]; 345s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 345s X = [X1(:), X2(:)]; 345s p = mvncdf (X, mu, Sigma); 345s p_out = [0.00011878988774500, 0.00034404112322371, ... 345s 0.00087682502191813, 0.00195221905058185, ... 345s 0.00378235566873474, 0.00638175749734415, ... 345s 0.00943764224329656, 0.01239164888125426, ... 345s 0.01472750274376648, 0.01623228313374828]'; 345s assert (p([1:10]), p_out, 1e-16); 345s ***** test 345s mu = [1, -1]; 345s Sigma = [0.9, 0.4; 0.4, 0.3]; 345s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 345s X = [X1(:), X2(:)]; 345s p = mvncdf (X, mu, Sigma); 345s p_out = [0.8180695783608276, 0.8854485749482751, ... 345s 0.9308108777385832, 0.9579855743025508, ... 345s 0.9722897881414742, 0.9788150170059926, ... 345s 0.9813597788804785, 0.9821977956568989, ... 345s 0.9824283794464095, 0.9824809345614861]'; 345s assert (p([616:625]), p_out, 3e-16); 345s ***** test 345s mu = [0, 0]; 345s Sigma = [0.25, 0.3; 0.3, 1]; 345s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 345s assert (p, 0.2097424404755626, 1e-16); 345s assert (err, 1e-08); 345s ***** test 345s x = [1 2]; 345s mu = [0.5 1.5]; 345s sigma = [1.0, 0.5; 0.5, 1.0]; 345s p = mvncdf (x, mu, sigma); 345s assert (p, 0.546244443857090, 1e-15); 345s ***** test 345s x = [1 2]; 345s mu = [0.5 1.5]; 345s sigma = [1.0, 0.5; 0.5, 1.0]; 345s a = [-inf 0]; 345s p = mvncdf (a, x, mu, sigma); 345s assert (p, 0.482672935215631, 1e-15); 345s ***** error p = mvncdf (randn (25,26), [], eye (26)); 345s ***** error p = mvncdf (randn (25,8), [], eye (9)); 345s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 345s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 345s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 345s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 345s 12 tests, 12 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/iwishrnd.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/iwishrnd.m 345s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 345s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 345s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 345s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 345s ***** error iwishrnd () 345s ***** error iwishrnd (1) 345s ***** error iwishrnd ([-3 1; 1 3],1) 345s ***** error iwishrnd ([1; 1],1) 345s 8 tests, 8 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/logncdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logncdf.m 345s ***** demo 345s ## Plot various CDFs from the log-normal distribution 345s x = 0:0.01:3; 345s p1 = logncdf (x, 0, 1); 345s p2 = logncdf (x, 0, 0.5); 345s p3 = logncdf (x, 0, 0.25); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 345s grid on 345s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 345s "location", "southeast") 345s title ("Log-normal CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x, y 345s x = [-1, 0, 1, e, Inf]; 345s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 345s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 345s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 345s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 345s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 345s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 345s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 345s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 345s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 345s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 345s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 345s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 345s ***** error logncdf () 345s ***** error logncdf (1,2,3,4,5,6,7) 345s ***** error logncdf (1, 2, 3, 4, "uper") 345s ***** error ... 345s logncdf (ones (3), ones (2), ones (2)) 345s ***** error logncdf (2, 3, 4, [1, 2]) 345s ***** error ... 345s [p, plo, pup] = logncdf (1, 2, 3) 345s ***** error [p, plo, pup] = ... 345s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 345s ***** error [p, plo, pup] = ... 345s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 345s ***** error [p, plo, pup] = ... 345s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 345s ***** error logncdf (i, 2, 2) 345s ***** error logncdf (2, i, 2) 345s ***** error logncdf (2, 2, i) 345s ***** error ... 345s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 345s 24 tests, 24 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/invgcdf.m] 345s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/invgcdf.m 345s ***** demo 345s ## Plot various CDFs from the inverse Gaussian distribution 345s x = 0:0.001:3; 345s p1 = invgcdf (x, 1, 0.2); 345s p2 = invgcdf (x, 1, 1); 345s p3 = invgcdf (x, 1, 3); 345s p4 = invgcdf (x, 3, 0.2); 345s p5 = invgcdf (x, 3, 1); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 345s grid on 345s xlim ([0, 3]) 345s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 345s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 345s title ("Inverse Gaussian CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x, p1, p1u, y2, y2u, y3, y3u 345s x = [-Inf, -1, 0, 1/2, 1, Inf]; 345s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 345s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 345s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 345s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 345s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 345s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 345s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 345s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 345s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 345s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 345s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 345s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 345s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 346s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 346s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 346s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 346s ***** error invgcdf () 346s ***** error invgcdf (1) 346s ***** error invgcdf (1, 2) 346s ***** error invgcdf (1, 2, 3, "tail") 346s ***** error invgcdf (1, 2, 3, 5) 346s ***** error ... 346s invgcdf (ones (3), ones (2), ones(2)) 346s ***** error ... 346s invgcdf (ones (2), ones (3), ones(2)) 346s ***** error ... 346s invgcdf (ones (2), ones (2), ones(3)) 346s ***** error invgcdf (i, 2, 3) 346s ***** error invgcdf (1, i, 3) 346s ***** error invgcdf (1, 2, i) 346s 25 tests, 25 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/burrinv.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/burrinv.m 346s ***** demo 346s ## Plot various iCDFs from the Burr type XII distribution 346s p = 0.001:0.001:0.999; 346s x1 = burrinv (p, 1, 1, 1); 346s x2 = burrinv (p, 1, 1, 2); 346s x3 = burrinv (p, 1, 1, 3); 346s x4 = burrinv (p, 1, 2, 1); 346s x5 = burrinv (p, 1, 3, 1); 346s x6 = burrinv (p, 1, 0.5, 2); 346s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 346s p, x4, "-c", p, x5, "-m", p, x6, "-k") 346s grid on 346s ylim ([0, 5]) 346s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 346s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 346s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 346s "location", "northwest") 346s title ("Burr type XII iCDF") 346s xlabel ("probability") 346s ylabel ("values in x") 346s ***** shared p, y 346s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 346s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 346s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 346s ***** assert (burrinv (p, 1, 1, 1), y, eps) 346s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 346s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 346s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 346s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 346s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 346s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 346s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 346s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 346s ***** error burrinv () 346s ***** error burrinv (1) 346s ***** error burrinv (1, 2) 346s ***** error burrinv (1, 2, 3) 346s ***** error ... 346s burrinv (1, 2, 3, 4, 5) 346s ***** error ... 346s burrinv (ones (3), ones (2), ones(2), ones(2)) 346s ***** error ... 346s burrinv (ones (2), ones (3), ones(2), ones(2)) 346s ***** error ... 346s burrinv (ones (2), ones (2), ones(3), ones(2)) 346s ***** error ... 346s burrinv (ones (2), ones (2), ones(2), ones(3)) 346s ***** error burrinv (i, 2, 3, 4) 346s ***** error burrinv (1, i, 3, 4) 346s ***** error burrinv (1, 2, i, 4) 346s ***** error burrinv (1, 2, 3, i) 346s 23 tests, 23 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/hnrnd.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hnrnd.m 346s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 346s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 346s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 346s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 346s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 346s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 346s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 346s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 346s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 346s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 346s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 346s ***** test 346s r = hnrnd (1, [1, 0, -1]); 346s assert (r([2:3]), [NaN, NaN]) 346s ***** assert (class (hnrnd (1, 0)), "double") 346s ***** assert (class (hnrnd (1, single (0))), "single") 346s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 346s ***** assert (class (hnrnd (1, single (1))), "single") 346s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 346s ***** assert (class (hnrnd (single (1), 1)), "single") 346s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 346s ***** error hnrnd () 346s ***** error hnrnd (1) 346s ***** error ... 346s hnrnd (ones (3), ones (2)) 346s ***** error ... 346s hnrnd (ones (2), ones (3)) 346s ***** error hnrnd (i, 2, 3) 346s ***** error hnrnd (1, i, 3) 346s ***** error ... 346s hnrnd (1, 2, -1) 346s ***** error ... 346s hnrnd (1, 2, 1.2) 346s ***** error ... 346s hnrnd (1, 2, ones (2)) 346s ***** error ... 346s hnrnd (1, 2, [2 -1 2]) 346s ***** error ... 346s hnrnd (1, 2, [2 0 2.5]) 346s ***** error ... 346s hnrnd (1, 2, 2, -1, 5) 346s ***** error ... 346s hnrnd (1, 2, 2, 1.5, 5) 346s ***** error ... 346s hnrnd (2, ones (2), 3) 346s ***** error ... 346s hnrnd (2, ones (2), [3, 2]) 346s ***** error ... 346s hnrnd (2, ones (2), 3, 2) 346s 35 tests, 35 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/nbinrnd.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nbinrnd.m 346s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 346s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 346s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 346s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 346s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 346s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 346s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 346s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 346s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 346s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 346s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 346s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 346s ***** assert (class (nbinrnd (1, 0.5)), "double") 346s ***** assert (class (nbinrnd (1, single (0.5))), "single") 346s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 346s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 346s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 346s ***** error nbinrnd () 346s ***** error nbinrnd (1) 346s ***** error ... 346s nbinrnd (ones (3), ones (2)) 346s ***** error ... 346s nbinrnd (ones (2), ones (3)) 346s ***** error nbinrnd (i, 2, 3) 346s ***** error nbinrnd (1, i, 3) 346s ***** error ... 346s nbinrnd (1, 2, -1) 346s ***** error ... 346s nbinrnd (1, 2, 1.2) 346s ***** error ... 346s nbinrnd (1, 2, ones (2)) 346s ***** error ... 346s nbinrnd (1, 2, [2 -1 2]) 346s ***** error ... 346s nbinrnd (1, 2, [2 0 2.5]) 346s ***** error ... 346s nbinrnd (1, 2, 2, -1, 5) 346s ***** error ... 346s nbinrnd (1, 2, 2, 1.5, 5) 346s ***** error ... 346s nbinrnd (2, ones (2), 3) 346s ***** error ... 346s nbinrnd (2, ones (2), [3, 2]) 346s ***** error ... 346s nbinrnd (2, ones (2), 3, 2) 346s 33 tests, 33 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/tlsrnd.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tlsrnd.m 346s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 346s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 346s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 346s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 346s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 346s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 346s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 346s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 346s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 346s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 346s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 346s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 346s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 346s ***** assert (class (tlsrnd (1, 2, 3)), "double") 346s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 346s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 346s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 346s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 346s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 346s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 346s ***** error tlsrnd () 346s ***** error tlsrnd (1) 346s ***** error tlsrnd (1, 2) 346s ***** error ... 346s tlsrnd (ones (3), ones (2), 1) 346s ***** error ... 346s tlsrnd (ones (2), 1, ones (3)) 346s ***** error ... 346s tlsrnd (1, ones (2), ones (3)) 346s ***** error tlsrnd (i, 2, 3) 346s ***** error tlsrnd (1, i, 3) 346s ***** error tlsrnd (1, 2, i) 346s ***** error ... 346s tlsrnd (1, 2, 3, -1) 346s ***** error ... 346s tlsrnd (1, 2, 3, 1.2) 346s ***** error ... 346s tlsrnd (1, 2, 3, ones (2)) 346s ***** error ... 346s tlsrnd (1, 2, 3, [2 -1 2]) 346s ***** error ... 346s tlsrnd (1, 2, 3, [2 0 2.5]) 346s ***** error ... 346s tlsrnd (ones (2), 2, 3, ones (2)) 346s ***** error ... 346s tlsrnd (1, 2, 3, 2, -1, 5) 346s ***** error ... 346s tlsrnd (1, 2, 3, 2, 1.5, 5) 346s ***** error ... 346s tlsrnd (ones (2,2), 2, 3, 3) 346s ***** error ... 346s tlsrnd (1, ones (2,2), 3, 3) 346s ***** error ... 346s tlsrnd (1, 2, ones (2,2), 3) 346s ***** error ... 346s tlsrnd (1, 2, ones (2,2), [3, 3]) 346s ***** error ... 346s tlsrnd (1, 2, ones (2,2), 2, 3) 346s 42 tests, 42 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/logipdf.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logipdf.m 346s ***** demo 346s ## Plot various PDFs from the logistic distribution 346s x = -5:0.01:20; 346s y1 = logipdf (x, 5, 2); 346s y2 = logipdf (x, 9, 3); 346s y3 = logipdf (x, 9, 4); 346s y4 = logipdf (x, 6, 2); 346s y5 = logipdf (x, 2, 1); 346s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 346s grid on 346s ylim ([0, 0.3]) 346s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 346s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 346s title ("Logistic PDF") 346s xlabel ("values in x") 346s ylabel ("density") 346s ***** shared x, y 346s x = [-Inf -log(4) 0 log(4) Inf]; 346s y = [0, 0.16, 1/4, 0.16, 0]; 346s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 346s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 346s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 346s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 346s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 346s ***** error logipdf () 346s ***** error logipdf (1) 346s ***** error ... 346s logipdf (1, 2) 346s ***** error ... 346s logipdf (1, ones (2), ones (3)) 346s ***** error ... 346s logipdf (ones (2), 1, ones (3)) 346s ***** error ... 346s logipdf (ones (2), ones (3), 1) 346s ***** error logipdf (i, 2, 3) 346s ***** error logipdf (1, i, 3) 346s ***** error logipdf (1, 2, i) 346s 14 tests, 14 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/logiinv.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logiinv.m 346s ***** demo 346s ## Plot various iCDFs from the logistic distribution 346s p = 0.001:0.001:0.999; 346s x1 = logiinv (p, 5, 2); 346s x2 = logiinv (p, 9, 3); 346s x3 = logiinv (p, 9, 4); 346s x4 = logiinv (p, 6, 2); 346s x5 = logiinv (p, 2, 1); 346s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 346s grid on 346s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 346s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 346s title ("Logistic iCDF") 346s xlabel ("probability") 346s ylabel ("x") 346s ***** test 346s p = [0.01:0.01:0.99]; 346s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 346s ***** shared p 346s p = [-1 0 0.5 1 2]; 346s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 346s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 346s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 346s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 346s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 346s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 346s ***** error logiinv () 346s ***** error logiinv (1) 346s ***** error ... 346s logiinv (1, 2) 346s ***** error ... 346s logiinv (1, ones (2), ones (3)) 346s ***** error ... 346s logiinv (ones (2), 1, ones (3)) 346s ***** error ... 346s logiinv (ones (2), ones (3), 1) 346s ***** error logiinv (i, 2, 3) 346s ***** error logiinv (1, i, 3) 346s ***** error logiinv (1, 2, i) 346s 16 tests, 16 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/ricernd.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ricernd.m 346s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 346s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 346s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 346s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 346s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 346s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 346s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 346s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 346s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 346s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 346s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 346s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 346s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 346s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 346s ***** assert (class (ricernd (1, 1)), "double") 346s ***** assert (class (ricernd (1, single (0))), "single") 346s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 346s ***** assert (class (ricernd (1, single (1), 2)), "single") 346s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 346s ***** assert (class (ricernd (single (1), 1, 2)), "single") 346s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 346s ***** error ricernd () 346s ***** error ricernd (1) 346s ***** error ... 346s ricernd (ones (3), ones (2)) 346s ***** error ... 346s ricernd (ones (2), ones (3)) 346s ***** error ricernd (i, 2) 346s ***** error ricernd (1, i) 346s ***** error ... 346s ricernd (1, 1/2, -1) 346s ***** error ... 346s ricernd (1, 1/2, 1.2) 346s ***** error ... 346s ricernd (1, 1/2, ones (2)) 346s ***** error ... 346s ricernd (1, 1/2, [2 -1 2]) 346s ***** error ... 346s ricernd (1, 1/2, [2 0 2.5]) 346s ***** error ... 346s ricernd (1, 1/2, 2, -1, 5) 346s ***** error ... 346s ricernd (1, 1/2, 2, 1.5, 5) 346s ***** error ... 346s ricernd (2, 1/2 * ones (2), 3) 346s ***** error ... 346s ricernd (2, 1/2 * ones (2), [3, 2]) 346s ***** error ... 346s ricernd (2, 1/2 * ones (2), 3, 2) 346s ***** error ... 346s ricernd (2 * ones (2), 1/2, 3) 346s ***** error ... 346s ricernd (2 * ones (2), 1/2, [3, 2]) 346s ***** error ... 346s ricernd (2 * ones (2), 1/2, 3, 2) 346s 40 tests, 40 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/riceinv.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/riceinv.m 346s ***** demo 346s ## Plot various iCDFs from the Rician distribution 346s p = 0.001:0.001:0.999; 346s x1 = riceinv (p, 0, 1); 346s x2 = riceinv (p, 0.5, 1); 346s x3 = riceinv (p, 1, 1); 346s x4 = riceinv (p, 2, 1); 346s x5 = riceinv (p, 4, 1); 346s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 346s grid on 346s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 346s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 346s title ("Rician iCDF") 346s xlabel ("probability") 346s ylabel ("values in x") 346s ***** shared p 346s p = [-1 0 0.75 1 2]; 346s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 346s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 346s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 346s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 346s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 346s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 346s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 346s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 346s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 346s ***** assert (riceinv ([p, NaN], single (1), 2), ... 346s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 346s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 346s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 346s ***** error riceinv () 346s ***** error riceinv (1) 346s ***** error riceinv (1,2) 346s ***** error riceinv (1,2,3,4) 346s ***** error ... 346s riceinv (ones (3), ones (2), ones (2)) 346s ***** error ... 346s riceinv (ones (2), ones (3), ones (2)) 346s ***** error ... 346s riceinv (ones (2), ones (2), ones (3)) 346s ***** error riceinv (i, 2, 2) 346s ***** error riceinv (2, i, 2) 346s ***** error riceinv (2, 2, i) 346s 20 tests, 20 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/tinv.m] 346s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tinv.m 346s ***** demo 346s ## Plot various iCDFs from the Student's T distribution 346s p = 0.001:0.001:0.999; 346s x1 = tinv (p, 1); 346s x2 = tinv (p, 2); 346s x3 = tinv (p, 5); 346s x4 = tinv (p, Inf); 346s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 346s grid on 346s xlim ([0, 1]) 346s ylim ([-5, 5]) 346s legend ({"df = 1", "df = 2", ... 346s "df = 5", 'df = \infty'}, "location", "northwest") 346s title ("Student's T iCDF") 346s xlabel ("probability") 346s ylabel ("values in x") 346s ***** shared p 346s p = [-1 0 0.5 1 2]; 346s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 346s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 346s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 346s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 346s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 346s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 346s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 346s ***** error tinv () 346s ***** error tinv (1) 346s ***** error ... 346s tinv (ones (3), ones (2)) 346s ***** error ... 346s tinv (ones (2), ones (3)) 346s ***** error tinv (i, 2) 346s ***** error tinv (2, i) 347s 13 tests, 13 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/nbincdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nbincdf.m 347s ***** demo 347s ## Plot various CDFs from the negative binomial distribution 347s x = 0:50; 347s p1 = nbincdf (x, 2, 0.15); 347s p2 = nbincdf (x, 5, 0.2); 347s p3 = nbincdf (x, 4, 0.4); 347s p4 = nbincdf (x, 10, 0.3); 347s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 347s grid on 347s xlim ([0, 40]) 347s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 347s "r = 10, ps = 0.3"}, "location", "southeast") 347s title ("Negative binomial CDF") 347s xlabel ("values in x (number of failures)") 347s ylabel ("probability") 347s ***** shared x, y 347s x = [-1 0 1 2 Inf]; 347s y = [0 1/2 3/4 7/8 1]; 347s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 347s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 347s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 347s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 347s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 347s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 347s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 347s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 347s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 347s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 347s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 347s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 347s ***** error nbincdf () 347s ***** error nbincdf (1) 347s ***** error nbincdf (1, 2) 347s ***** error nbincdf (1, 2, 3, 4) 347s ***** error nbincdf (1, 2, 3, "some") 347s ***** error ... 347s nbincdf (ones (3), ones (2), ones (2)) 347s ***** error ... 347s nbincdf (ones (2), ones (3), ones (2)) 347s ***** error ... 347s nbincdf (ones (2), ones (2), ones (3)) 347s ***** error nbincdf (i, 2, 2) 347s ***** error nbincdf (2, i, 2) 347s ***** error nbincdf (2, 2, i) 347s 22 tests, 22 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/bisapdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bisapdf.m 347s ***** demo 347s ## Plot various PDFs from the Birnbaum-Saunders distribution 347s x = 0.01:0.01:4; 347s y1 = bisapdf (x, 1, 0.5); 347s y2 = bisapdf (x, 1, 1); 347s y3 = bisapdf (x, 1, 2); 347s y4 = bisapdf (x, 1, 5); 347s y5 = bisapdf (x, 1, 10); 347s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 347s grid on 347s ylim ([0, 1.5]) 347s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 347s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 347s title ("Birnbaum-Saunders PDF") 347s xlabel ("values in x") 347s ylabel ("density") 347s ***** demo 347s ## Plot various PDFs from the Birnbaum-Saunders distribution 347s x = 0.01:0.01:6; 347s y1 = bisapdf (x, 1, 0.3); 347s y2 = bisapdf (x, 2, 0.3); 347s y3 = bisapdf (x, 1, 0.5); 347s y4 = bisapdf (x, 3, 0.5); 347s y5 = bisapdf (x, 5, 0.5); 347s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 347s grid on 347s ylim ([0, 1.5]) 347s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 347s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 347s title ("Birnbaum-Saunders CDF") 347s xlabel ("values in x") 347s ylabel ("density") 347s ***** shared x, y 347s x = [-1, 0, 1, 2, Inf]; 347s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 347s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 347s ***** assert (bisapdf (x, 1, 1), y, eps) 347s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 347s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 347s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 347s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 347s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 347s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 347s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 347s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 347s ***** error bisapdf () 347s ***** error bisapdf (1) 347s ***** error bisapdf (1, 2) 347s ***** error bisapdf (1, 2, 3, 4) 347s ***** error ... 347s bisapdf (ones (3), ones (2), ones(2)) 347s ***** error ... 347s bisapdf (ones (2), ones (3), ones(2)) 347s ***** error ... 347s bisapdf (ones (2), ones (2), ones(3)) 347s ***** error bisapdf (i, 4, 3) 347s ***** error bisapdf (1, i, 3) 347s ***** error bisapdf (1, 4, i) 347s 20 tests, 20 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/burrcdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/burrcdf.m 347s ***** demo 347s ## Plot various CDFs from the Burr type XII distribution 347s x = 0.001:0.001:5; 347s p1 = burrcdf (x, 1, 1, 1); 347s p2 = burrcdf (x, 1, 1, 2); 347s p3 = burrcdf (x, 1, 1, 3); 347s p4 = burrcdf (x, 1, 2, 1); 347s p5 = burrcdf (x, 1, 3, 1); 347s p6 = burrcdf (x, 1, 0.5, 2); 347s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 347s x, p4, "-c", x, p5, "-m", x, p6, "-k") 347s grid on 347s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 347s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 347s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 347s "location", "southeast") 347s title ("Burr type XII CDF") 347s xlabel ("values in x") 347s ylabel ("probability") 347s ***** shared x, y 347s x = [-1, 0, 1, 2, Inf]; 347s y = [0, 0, 1/2, 2/3, 1]; 347s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 347s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 347s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 347s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 347s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 347s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 347s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 347s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 347s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 347s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 347s ***** error burrcdf () 347s ***** error burrcdf (1) 347s ***** error burrcdf (1, 2) 347s ***** error burrcdf (1, 2, 3) 347s ***** error ... 347s burrcdf (1, 2, 3, 4, 5, 6) 347s ***** error burrcdf (1, 2, 3, 4, "tail") 347s ***** error burrcdf (1, 2, 3, 4, 5) 347s ***** error ... 347s burrcdf (ones (3), ones (2), ones(2), ones(2)) 347s ***** error ... 347s burrcdf (ones (2), ones (3), ones(2), ones(2)) 347s ***** error ... 347s burrcdf (ones (2), ones (2), ones(3), ones(2)) 347s ***** error ... 347s burrcdf (ones (2), ones (2), ones(2), ones(3)) 347s ***** error burrcdf (i, 2, 3, 4) 347s ***** error burrcdf (1, i, 3, 4) 347s ***** error burrcdf (1, 2, i, 4) 347s ***** error burrcdf (1, 2, 3, i) 347s 25 tests, 25 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/nakacdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nakacdf.m 347s ***** demo 347s ## Plot various CDFs from the Nakagami distribution 347s x = 0:0.01:3; 347s p1 = nakacdf (x, 0.5, 1); 347s p2 = nakacdf (x, 1, 1); 347s p3 = nakacdf (x, 1, 2); 347s p4 = nakacdf (x, 1, 3); 347s p5 = nakacdf (x, 2, 1); 347s p6 = nakacdf (x, 2, 2); 347s p7 = nakacdf (x, 5, 1); 347s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 347s x, p5, "-k", x, p6, "-b", x, p7, "-c") 347s grid on 347s xlim ([0, 3]) 347s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 347s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 347s "μ = 5, ω = 1"}, "location", "southeast") 347s title ("Nakagami CDF") 347s xlabel ("values in x") 347s ylabel ("probability") 347s ***** shared x, y 347s x = [-1, 0, 1, 2, Inf]; 347s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 347s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 347s ***** assert (nakacdf (x, 1, 1), y, eps) 347s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 347s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 347s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 347s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 347s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 347s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 347s ***** error nakacdf () 347s ***** error nakacdf (1) 347s ***** error nakacdf (1, 2) 347s ***** error nakacdf (1, 2, 3, "tail") 347s ***** error nakacdf (1, 2, 3, 4) 347s ***** error ... 347s nakacdf (ones (3), ones (2), ones (2)) 347s ***** error ... 347s nakacdf (ones (2), ones (3), ones (2)) 347s ***** error ... 347s nakacdf (ones (2), ones (2), ones (3)) 347s ***** error nakacdf (i, 2, 2) 347s ***** error nakacdf (2, i, 2) 347s ***** error nakacdf (2, 2, i) 347s 19 tests, 19 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/normcdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/normcdf.m 347s ***** demo 347s ## Plot various CDFs from the normal distribution 347s x = -5:0.01:5; 347s p1 = normcdf (x, 0, 0.5); 347s p2 = normcdf (x, 0, 1); 347s p3 = normcdf (x, 0, 2); 347s p4 = normcdf (x, -2, 0.8); 347s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 347s grid on 347s xlim ([-5, 5]) 347s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 347s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 347s title ("Normal CDF") 347s xlabel ("values in x") 347s ylabel ("probability") 347s ***** shared x, y 347s x = [-Inf 1 2 Inf]; 347s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 347s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 347s ***** assert (normcdf (x, 1, ones (1,4)), y) 347s ***** assert (normcdf (x, ones (1,4), 1), y) 347s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 347s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 347s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 347s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 347s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 347s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 347s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 347s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 347s ***** error normcdf () 347s ***** error normcdf (1,2,3,4,5,6,7) 347s ***** error normcdf (1, 2, 3, 4, "uper") 347s ***** error ... 347s normcdf (ones (3), ones (2), ones (2)) 347s ***** error normcdf (2, 3, 4, [1, 2]) 347s ***** error ... 347s [p, plo, pup] = normcdf (1, 2, 3) 347s ***** error [p, plo, pup] = ... 347s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 347s ***** error [p, plo, pup] = ... 347s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 347s ***** error [p, plo, pup] = ... 347s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 347s ***** error normcdf (i, 2, 2) 347s ***** error normcdf (2, i, 2) 347s ***** error normcdf (2, 2, i) 347s ***** error ... 347s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 347s 24 tests, 24 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/wblinv.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wblinv.m 347s ***** demo 347s ## Plot various iCDFs from the Weibull distribution 347s p = 0.001:0.001:0.999; 347s x1 = wblinv (p, 1, 0.5); 347s x2 = wblinv (p, 1, 1); 347s x3 = wblinv (p, 1, 1.5); 347s x4 = wblinv (p, 1, 5); 347s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 347s ylim ([0, 2.5]) 347s grid on 347s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 347s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 347s title ("Weibull iCDF") 347s xlabel ("probability") 347s ylabel ("x") 347s ***** shared p 347s p = [-1 0 0.63212055882855778 1 2]; 347s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 347s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 347s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 347s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 347s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 347s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 347s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 347s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 347s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 347s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 347s ***** error wblinv () 347s ***** error wblinv (1,2,3,4) 347s ***** error ... 347s wblinv (ones (3), ones (2), ones (2)) 347s ***** error ... 347s wblinv (ones (2), ones (3), ones (2)) 347s ***** error ... 347s wblinv (ones (2), ones (2), ones (3)) 347s ***** error wblinv (i, 2, 2) 347s ***** error wblinv (2, i, 2) 347s ***** error wblinv (2, 2, i) 347s 18 tests, 18 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/bisarnd.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bisarnd.m 347s ***** assert (size (bisarnd (1, 1)), [1 1]) 347s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 347s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 347s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 347s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 347s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 347s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 347s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 347s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 347s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 347s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 347s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 347s ***** assert (class (bisarnd (1, 1)), "double") 347s ***** assert (class (bisarnd (1, single (1))), "single") 347s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 347s ***** assert (class (bisarnd (single (1), 1)), "single") 347s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 347s ***** error bisarnd () 347s ***** error bisarnd (1) 347s ***** error ... 347s bisarnd (ones (3), ones (2)) 347s ***** error ... 347s bisarnd (ones (2), ones (3)) 347s ***** error bisarnd (i, 2, 3) 347s ***** error bisarnd (1, i, 3) 347s ***** error ... 347s bisarnd (1, 2, -1) 347s ***** error ... 347s bisarnd (1, 2, 1.2) 347s ***** error ... 347s bisarnd (1, 2, ones (2)) 347s ***** error ... 347s bisarnd (1, 2, [2 -1 2]) 347s ***** error ... 347s bisarnd (1, 2, [2 0 2.5]) 347s ***** error ... 347s bisarnd (1, 2, 2, -1, 5) 347s ***** error ... 347s bisarnd (1, 2, 2, 1.5, 5) 347s ***** error ... 347s bisarnd (2, ones (2), 3) 347s ***** error ... 347s bisarnd (2, ones (2), [3, 2]) 347s ***** error ... 347s bisarnd (2, ones (2), 3, 2) 347s 33 tests, 33 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/betapdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/betapdf.m 347s ***** demo 347s ## Plot various PDFs from the Beta distribution 347s x = 0.001:0.001:0.999; 347s y1 = betapdf (x, 0.5, 0.5); 347s y2 = betapdf (x, 5, 1); 347s y3 = betapdf (x, 1, 3); 347s y4 = betapdf (x, 2, 2); 347s y5 = betapdf (x, 2, 5); 347s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 347s grid on 347s ylim ([0, 2.5]) 347s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 347s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 347s title ("Beta PDF") 347s xlabel ("values in x") 347s ylabel ("density") 347s ***** shared x, y 347s x = [-1 0 0.5 1 2]; 347s y = [0 2 1 0 0]; 347s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 347s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 347s ***** assert (betapdf (x, ones (1, 5), 2), y) 347s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 347s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 347s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 347s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 347s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 347s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 347s ***** test 347s x = rand (10,1); 347s y = 1 ./ (pi * sqrt (x .* (1 - x))); 347s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 347s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 347s ***** error betapdf () 347s ***** error betapdf (1) 347s ***** error betapdf (1,2) 347s ***** error betapdf (1,2,3,4) 347s ***** error ... 347s betapdf (ones (3), ones (2), ones (2)) 347s ***** error ... 347s betapdf (ones (2), ones (3), ones (2)) 347s ***** error ... 347s betapdf (ones (2), ones (2), ones (3)) 347s ***** error betapdf (i, 2, 2) 347s ***** error betapdf (2, i, 2) 347s ***** error betapdf (2, 2, i) 347s 21 tests, 21 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/vmpdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/vmpdf.m 347s ***** demo 347s ## Plot various PDFs from the von Mises distribution 347s x1 = [-pi:0.1:pi]; 347s y1 = vmpdf (x1, 0, 0.5); 347s y2 = vmpdf (x1, 0, 1); 347s y3 = vmpdf (x1, 0, 2); 347s y4 = vmpdf (x1, 0, 4); 347s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 347s grid on 347s xlim ([-pi, pi]) 347s ylim ([0, 0.8]) 347s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 347s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 347s title ("Von Mises PDF") 347s xlabel ("values in x") 347s ylabel ("density") 347s ***** shared x, y0, y1 347s x = [-pi:pi/2:pi]; 347s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 347s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 347s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 347s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 347s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 347s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 347s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 347s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 347s ***** error vmpdf () 347s ***** error vmpdf (1) 347s ***** error vmpdf (1, 2) 347s ***** error ... 347s vmpdf (ones (3), ones (2), ones (2)) 347s ***** error ... 347s vmpdf (ones (2), ones (3), ones (2)) 347s ***** error ... 347s vmpdf (ones (2), ones (2), ones (3)) 347s ***** error vmpdf (i, 2, 2) 347s ***** error vmpdf (2, i, 2) 347s ***** error vmpdf (2, 2, i) 347s 15 tests, 15 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/cauchypdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/cauchypdf.m 347s ***** demo 347s ## Plot various PDFs from the Cauchy distribution 347s x = -5:0.01:5; 347s y1 = cauchypdf (x, 0, 0.5); 347s y2 = cauchypdf (x, 0, 1); 347s y3 = cauchypdf (x, 0, 2); 347s y4 = cauchypdf (x, -2, 1); 347s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 347s grid on 347s xlim ([-5, 5]) 347s ylim ([0, 0.7]) 347s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 347s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 347s title ("Cauchy PDF") 347s xlabel ("values in x") 347s ylabel ("density") 347s ***** shared x, y 347s x = [-1 0 0.5 1 2]; 347s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 347s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 347s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 347s ***** assert (cauchypdf (x, ones (1,5), 2), y) 347s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 347s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 347s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 347s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 347s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 347s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 347s ***** test 347s x = rand (10, 1); 347s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 347s ***** error cauchypdf () 347s ***** error cauchypdf (1) 347s ***** error ... 347s cauchypdf (1, 2) 347s ***** error cauchypdf (1, 2, 3, 4) 347s ***** error ... 347s cauchypdf (ones (3), ones (2), ones(2)) 347s ***** error ... 347s cauchypdf (ones (2), ones (3), ones(2)) 347s ***** error ... 347s cauchypdf (ones (2), ones (2), ones(3)) 347s ***** error cauchypdf (i, 4, 3) 347s ***** error cauchypdf (1, i, 3) 347s ***** error cauchypdf (1, 4, i) 347s 20 tests, 20 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/nakarnd.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nakarnd.m 347s ***** assert (size (nakarnd (1, 1)), [1 1]) 347s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 347s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 347s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 347s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 347s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 347s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 347s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 347s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 347s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 347s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 347s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 347s ***** assert (class (nakarnd (1, 1)), "double") 347s ***** assert (class (nakarnd (1, single (1))), "single") 347s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 347s ***** assert (class (nakarnd (single (1), 1)), "single") 347s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 347s ***** error nakarnd () 347s ***** error nakarnd (1) 347s ***** error ... 347s nakarnd (ones (3), ones (2)) 347s ***** error ... 347s nakarnd (ones (2), ones (3)) 347s ***** error nakarnd (i, 2, 3) 347s ***** error nakarnd (1, i, 3) 347s ***** error ... 347s nakarnd (1, 2, -1) 347s ***** error ... 347s nakarnd (1, 2, 1.2) 347s ***** error ... 347s nakarnd (1, 2, ones (2)) 347s ***** error ... 347s nakarnd (1, 2, [2 -1 2]) 347s ***** error ... 347s nakarnd (1, 2, [2 0 2.5]) 347s ***** error ... 347s nakarnd (1, 2, 2, -1, 5) 347s ***** error ... 347s nakarnd (1, 2, 2, 1.5, 5) 347s ***** error ... 347s nakarnd (2, ones (2), 3) 347s ***** error ... 347s nakarnd (2, ones (2), [3, 2]) 347s ***** error ... 347s nakarnd (2, ones (2), 3, 2) 347s 33 tests, 33 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/hygernd.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hygernd.m 347s ***** assert (size (hygernd (4,2,2)), [1, 1]) 347s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 347s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 347s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 347s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 347s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 347s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 347s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 347s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 347s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 347s ***** assert (class (hygernd (4,2,2)), "double") 347s ***** assert (class (hygernd (single (4),2,2)), "single") 347s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 347s ***** assert (class (hygernd (4,single (2),2)), "single") 347s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 347s ***** assert (class (hygernd (4,2,single (2))), "single") 347s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 347s ***** error hygernd () 347s ***** error hygernd (1) 347s ***** error hygernd (1, 2) 347s ***** error ... 347s hygernd (ones (3), ones (2), ones (2)) 347s ***** error ... 347s hygernd (ones (2), ones (3), ones (2)) 347s ***** error ... 347s hygernd (ones (2), ones (2), ones (3)) 347s ***** error hygernd (i, 2, 3) 347s ***** error hygernd (1, i, 3) 347s ***** error hygernd (1, 2, i) 347s ***** error ... 347s hygernd (1, 2, 3, -1) 347s ***** error ... 347s hygernd (1, 2, 3, 1.2) 347s ***** error ... 347s hygernd (1, 2, 3, ones (2)) 347s ***** error ... 347s hygernd (1, 2, 3, [2 -1 2]) 347s ***** error ... 347s hygernd (1, 2, 3, [2 0 2.5]) 347s ***** error ... 347s hygernd (1, 2, 3, 2, -1, 5) 347s ***** error ... 347s hygernd (1, 2, 3, 2, 1.5, 5) 347s ***** error ... 347s hygernd (2, ones (2), 2, 3) 347s ***** error ... 347s hygernd (2, ones (2), 2, [3, 2]) 347s ***** error ... 347s hygernd (2, ones (2), 2, 3, 2) 347s 36 tests, 36 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/copulapdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/copulapdf.m 347s ***** test 347s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 347s theta = [1; 2]; 347s y = copulapdf ("Clayton", x, theta); 347s expected_p = [0.9872; 0.7295]; 347s assert (y, expected_p, 0.001); 347s ***** test 347s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 347s y = copulapdf ("Gumbel", x, 2); 347s expected_p = [0.9468; 0.9468]; 347s assert (y, expected_p, 0.001); 347s ***** test 347s x = [0.2, 0.6; 0.2, 0.6]; 347s theta = [1; 2]; 347s y = copulapdf ("Frank", x, theta); 347s expected_p = [0.9378; 0.8678]; 347s assert (y, expected_p, 0.001); 347s ***** test 347s x = [0.2, 0.6; 0.2, 0.6]; 347s theta = [0.3; 0.7]; 347s y = copulapdf ("AMH", x, theta); 347s expected_p = [0.9540; 0.8577]; 347s assert (y, expected_p, 0.001); 347s 4 tests, 4 passed, 0 known failure, 0 skipped 347s [inst/dist_fun/gpcdf.m] 347s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gpcdf.m 347s ***** demo 347s ## Plot various CDFs from the generalized Pareto distribution 347s x = 0:0.001:5; 347s p1 = gpcdf (x, 1, 1, 0); 347s p2 = gpcdf (x, 5, 1, 0); 347s p3 = gpcdf (x, 20, 1, 0); 347s p4 = gpcdf (x, 1, 2, 0); 347s p5 = gpcdf (x, 5, 2, 0); 347s p6 = gpcdf (x, 20, 2, 0); 347s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 347s x, p4, "-c", x, p5, "-m", x, p6, "-k") 347s grid on 347s xlim ([0, 5]) 347s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 347s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 347s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 347s "location", "northwest") 347s title ("Generalized Pareto CDF") 347s xlabel ("values in x") 347s ylabel ("probability") 347s ***** shared x, y1, y1u, y2, y2u, y3, y3u 347s x = [-Inf, -1, 0, 1/2, 1, Inf]; 347s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 347s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 347s y2 = [0, 0, 0, 1/3, 1/2, 1]; 347s y2u = [1, 1, 1, 2/3, 1/2, 0]; 347s y3 = [0, 0, 0, 1/2, 1, 1]; 347s y3u = [1, 1, 1, 1/2, 0, 0]; 347s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 347s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 347s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 347s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 347s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 347s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 347s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 347s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 347s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 347s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 347s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 347s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 347s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 347s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 347s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 347s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 347s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 347s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 347s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 347s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 347s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 347s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 347s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 347s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 347s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 348s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 348s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 348s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 348s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 348s [y2u(1:3), NaN, y2u(5:6)], eps) 348s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 348s [y2u(1:3), NaN, y2u(5:6)], eps) 348s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 348s [y2u(1:3), NaN, y2u(5:6)], eps) 348s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 348s [y2u(1:3), NaN, y2u(5:6)], eps) 348s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 348s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 348s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 348s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 348s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 348s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 348s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 348s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 348s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 348s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 348s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 348s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 348s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 348s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 348s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 348s [y3u(1:3), NaN, y3u(5:6)], eps) 348s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 348s [y3u(1:3), NaN, y3u(5:6)], eps) 348s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 348s [y3u(1:3), NaN, y3u(5:6)], eps) 348s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 348s [y3u(1:3), NaN, y3u(5:6)], eps) 348s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 348s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 348s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 348s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 348s ***** error gpcdf () 348s ***** error gpcdf (1) 348s ***** error gpcdf (1, 2) 348s ***** error gpcdf (1, 2, 3) 348s ***** error gpcdf (1, 2, 3, 4, "tail") 348s ***** error gpcdf (1, 2, 3, 4, 5) 348s ***** error ... 348s gpcdf (ones (3), ones (2), ones(2), ones(2)) 348s ***** error ... 348s gpcdf (ones (2), ones (3), ones(2), ones(2)) 348s ***** error ... 348s gpcdf (ones (2), ones (2), ones(3), ones(2)) 348s ***** error ... 348s gpcdf (ones (2), ones (2), ones(2), ones(3)) 348s ***** error gpcdf (i, 2, 3, 4) 348s ***** error gpcdf (1, i, 3, 4) 348s ***** error gpcdf (1, 2, i, 4) 348s ***** error gpcdf (1, 2, 3, i) 348s 76 tests, 76 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/hygeinv.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hygeinv.m 348s ***** demo 348s ## Plot various iCDFs from the hypergeometric distribution 348s p = 0.001:0.001:0.999; 348s x1 = hygeinv (p, 500, 50, 100); 348s x2 = hygeinv (p, 500, 60, 200); 348s x3 = hygeinv (p, 500, 70, 300); 348s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 348s grid on 348s ylim ([0, 60]) 348s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 348s "m = 500, k = 70, n = 300"}, "location", "northwest") 348s title ("Hypergeometric iCDF") 348s xlabel ("probability") 348s ylabel ("values in p (number of successes)") 348s ***** shared p 348s p = [-1 0 0.5 1 2]; 348s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 348s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 348s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 348s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 348s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 348s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 348s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 348s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 348s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 348s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 348s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 348s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 348s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 348s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 348s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 348s ***** error hygeinv () 348s ***** error hygeinv (1) 348s ***** error hygeinv (1,2) 348s ***** error hygeinv (1,2,3) 348s ***** error ... 348s hygeinv (ones (2), ones (3), 1, 1) 348s ***** error ... 348s hygeinv (1, ones (2), ones (3), 1) 348s ***** error ... 348s hygeinv (1, 1, ones (2), ones (3)) 348s ***** error hygeinv (i, 2, 2, 2) 348s ***** error hygeinv (2, i, 2, 2) 348s ***** error hygeinv (2, 2, i, 2) 348s ***** error hygeinv (2, 2, 2, i) 348s 26 tests, 26 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/normrnd.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/normrnd.m 348s ***** assert (size (normrnd (1, 1)), [1 1]) 348s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 348s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 348s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 348s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 348s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 348s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 348s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 348s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 348s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 348s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 348s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 348s ***** assert (class (normrnd (1, 1)), "double") 348s ***** assert (class (normrnd (1, single (1))), "single") 348s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 348s ***** assert (class (normrnd (single (1), 1)), "single") 348s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 348s ***** error normrnd () 348s ***** error normrnd (1) 348s ***** error ... 348s normrnd (ones (3), ones (2)) 348s ***** error ... 348s normrnd (ones (2), ones (3)) 348s ***** error normrnd (i, 2, 3) 348s ***** error normrnd (1, i, 3) 348s ***** error ... 348s normrnd (1, 2, -1) 348s ***** error ... 348s normrnd (1, 2, 1.2) 348s ***** error ... 348s normrnd (1, 2, ones (2)) 348s ***** error ... 348s normrnd (1, 2, [2 -1 2]) 348s ***** error ... 348s normrnd (1, 2, [2 0 2.5]) 348s ***** error ... 348s normrnd (1, 2, 2, -1, 5) 348s ***** error ... 348s normrnd (1, 2, 2, 1.5, 5) 348s ***** error ... 348s normrnd (2, ones (2), 3) 348s ***** error ... 348s normrnd (2, ones (2), [3, 2]) 348s ***** error ... 348s normrnd (2, ones (2), 3, 2) 348s 33 tests, 33 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/gumbelcdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gumbelcdf.m 348s ***** demo 348s ## Plot various CDFs from the Gumbel distribution 348s x = -5:0.01:20; 348s p1 = gumbelcdf (x, 0.5, 2); 348s p2 = gumbelcdf (x, 1.0, 2); 348s p3 = gumbelcdf (x, 1.5, 3); 348s p4 = gumbelcdf (x, 3.0, 4); 348s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 348s grid on 348s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 348s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 348s title ("Gumbel CDF") 348s xlabel ("values in x") 348s ylabel ("probability") 348s ***** shared x, y 348s x = [-Inf, 1, 2, Inf]; 348s y = [0, 0.3679, 0.6922, 1]; 348s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 348s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 348s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 348s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 348s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 348s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 348s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 348s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 348s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 348s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 348s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 348s ***** error gumbelcdf () 348s ***** error gumbelcdf (1,2,3,4,5,6,7) 348s ***** error gumbelcdf (1, 2, 3, 4, "uper") 348s ***** error ... 348s gumbelcdf (ones (3), ones (2), ones (2)) 348s ***** error gumbelcdf (2, 3, 4, [1, 2]) 348s ***** error ... 348s [p, plo, pup] = gumbelcdf (1, 2, 3) 348s ***** error [p, plo, pup] = ... 348s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 348s ***** error [p, plo, pup] = ... 348s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 348s ***** error [p, plo, pup] = ... 348s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 348s ***** error gumbelcdf (i, 2, 2) 348s ***** error gumbelcdf (2, i, 2) 348s ***** error gumbelcdf (2, 2, i) 348s ***** error ... 348s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 348s 24 tests, 24 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/poissrnd.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/poissrnd.m 348s ***** assert (size (poissrnd (2)), [1, 1]) 348s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 348s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 348s ***** assert (size (poissrnd (1, 3)), [3, 3]) 348s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 348s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 348s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 348s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 348s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 348s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 348s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 348s ***** assert (poissrnd (0, 1, 1), 0) 348s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 348s ***** assert (class (poissrnd (2)), "double") 348s ***** assert (class (poissrnd (single (2))), "single") 348s ***** assert (class (poissrnd (single ([2 2]))), "single") 348s ***** error poissrnd () 348s ***** error poissrnd (i) 348s ***** error ... 348s poissrnd (1, -1) 348s ***** error ... 348s poissrnd (1, 1.2) 348s ***** error ... 348s poissrnd (1, ones (2)) 348s ***** error ... 348s poissrnd (1, [2 -1 2]) 348s ***** error ... 348s poissrnd (1, [2 0 2.5]) 348s ***** error ... 348s poissrnd (ones (2), ones (2)) 348s ***** error ... 348s poissrnd (1, 2, -1, 5) 348s ***** error ... 348s poissrnd (1, 2, 1.5, 5) 348s ***** error poissrnd (ones (2,2), 3) 348s ***** error poissrnd (ones (2,2), [3, 2]) 348s ***** error poissrnd (ones (2,2), 2, 3) 348s 29 tests, 29 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/evcdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/evcdf.m 348s ***** demo 348s ## Plot various CDFs from the extreme value distribution 348s x = -10:0.01:10; 348s p1 = evcdf (x, 0.5, 2); 348s p2 = evcdf (x, 1.0, 2); 348s p3 = evcdf (x, 1.5, 3); 348s p4 = evcdf (x, 3.0, 4); 348s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 348s grid on 348s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 348s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 348s title ("Extreme value CDF") 348s xlabel ("values in x") 348s ylabel ("probability") 348s ***** shared x, y 348s x = [-Inf, 1, 2, Inf]; 348s y = [0, 0.6321, 0.9340, 1]; 348s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 348s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 348s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 348s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 348s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 348s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 348s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 348s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 348s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 348s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 348s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 348s ***** error evcdf () 348s ***** error evcdf (1,2,3,4,5,6,7) 348s ***** error evcdf (1, 2, 3, 4, "uper") 348s ***** error ... 348s evcdf (ones (3), ones (2), ones (2)) 348s ***** error evcdf (2, 3, 4, [1, 2]) 348s ***** error ... 348s [p, plo, pup] = evcdf (1, 2, 3) 348s ***** error [p, plo, pup] = ... 348s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 348s ***** error [p, plo, pup] = ... 348s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 348s ***** error [p, plo, pup] = ... 348s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 348s ***** error evcdf (i, 2, 2) 348s ***** error evcdf (2, i, 2) 348s ***** error evcdf (2, 2, i) 348s ***** error ... 348s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 348s 24 tests, 24 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/bisacdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bisacdf.m 348s ***** demo 348s ## Plot various CDFs from the Birnbaum-Saunders distribution 348s x = 0.01:0.01:4; 348s p1 = bisacdf (x, 1, 0.5); 348s p2 = bisacdf (x, 1, 1); 348s p3 = bisacdf (x, 1, 2); 348s p4 = bisacdf (x, 1, 5); 348s p5 = bisacdf (x, 1, 10); 348s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 348s grid on 348s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 348s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 348s title ("Birnbaum-Saunders CDF") 348s xlabel ("values in x") 348s ylabel ("probability") 348s ***** demo 348s ## Plot various CDFs from the Birnbaum-Saunders distribution 348s x = 0.01:0.01:6; 348s p1 = bisacdf (x, 1, 0.3); 348s p2 = bisacdf (x, 2, 0.3); 348s p3 = bisacdf (x, 1, 0.5); 348s p4 = bisacdf (x, 3, 0.5); 348s p5 = bisacdf (x, 5, 0.5); 348s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 348s grid on 348s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 348s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 348s title ("Birnbaum-Saunders CDF") 348s xlabel ("values in x") 348s ylabel ("probability") 348s ***** shared x, y 348s x = [-1, 0, 1, 2, Inf]; 348s y = [0, 0, 1/2, 0.76024993890652337, 1]; 348s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 348s ***** assert (bisacdf (x, 1, 1), y, eps) 348s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 348s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 348s ***** assert (bisacdf (x, 1, 1), y, eps) 348s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 348s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 348s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 348s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 348s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 348s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 348s ***** error bisacdf () 348s ***** error bisacdf (1) 348s ***** error bisacdf (1, 2) 348s ***** error ... 348s bisacdf (1, 2, 3, 4, 5) 348s ***** error bisacdf (1, 2, 3, "tail") 348s ***** error bisacdf (1, 2, 3, 4) 348s ***** error ... 348s bisacdf (ones (3), ones (2), ones(2)) 348s ***** error ... 348s bisacdf (ones (2), ones (3), ones(2)) 348s ***** error ... 348s bisacdf (ones (2), ones (2), ones(3)) 348s ***** error bisacdf (i, 4, 3) 348s ***** error bisacdf (1, i, 3) 348s ***** error bisacdf (1, 4, i) 348s 23 tests, 23 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/unidinv.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unidinv.m 348s ***** demo 348s ## Plot various iCDFs from the discrete uniform distribution 348s p = 0.001:0.001:0.999; 348s x1 = unidinv (p, 5); 348s x2 = unidinv (p, 9); 348s plot (p, x1, "-b", p, x2, "-g") 348s grid on 348s xlim ([0, 1]) 348s ylim ([0, 10]) 348s legend ({"N = 5", "N = 9"}, "location", "northwest") 348s title ("Discrete uniform iCDF") 348s xlabel ("probability") 348s ylabel ("values in x") 348s ***** shared p 348s p = [-1 0 0.5 1 2]; 348s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 348s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 348s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 348s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 348s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 348s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 348s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 348s ***** error unidinv () 348s ***** error unidinv (1) 348s ***** error ... 348s unidinv (ones (3), ones (2)) 348s ***** error ... 348s unidinv (ones (2), ones (3)) 348s ***** error unidinv (i, 2) 348s ***** error unidinv (2, i) 348s 13 tests, 13 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/hninv.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hninv.m 348s ***** demo 348s ## Plot various iCDFs from the half-normal distribution 348s p = 0.001:0.001:0.999; 348s x1 = hninv (p, 0, 1); 348s x2 = hninv (p, 0, 2); 348s x3 = hninv (p, 0, 3); 348s x4 = hninv (p, 0, 5); 348s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 348s grid on 348s ylim ([0, 10]) 348s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 348s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 348s title ("Half-normal iCDF") 348s xlabel ("probability") 348s ylabel ("x") 348s ***** shared p, x 348s p = [0, 0.3829, 0.6827, 1]; 348s x = [0, 1/2, 1, Inf]; 348s ***** assert (hninv (p, 0, 1), x, 1e-4); 348s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 348s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 348s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 348s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 348s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 348s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 348s ***** error hninv (1) 348s ***** error hninv (1, 2) 348s ***** error ... 348s hninv (1, ones (2), ones (3)) 348s ***** error ... 348s hninv (ones (2), 1, ones (3)) 348s ***** error ... 348s hninv (ones (2), ones (3), 1) 348s ***** error hninv (i, 2, 3) 348s ***** error hninv (1, i, 3) 348s ***** error hninv (1, 2, i) 348s 15 tests, 15 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/mvnpdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvnpdf.m 348s ***** demo 348s mu = [1, -1]; 348s sigma = [0.9, 0.4; 0.4, 0.3]; 348s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 348s x = [X1(:), X2(:)]; 348s p = mvnpdf (x, mu, sigma); 348s surf (X1, X2, reshape (p, 25, 25)); 348s ***** error y = mvnpdf (); 348s ***** error y = mvnpdf ([]); 348s ***** error y = mvnpdf (ones (3,3,3)); 348s ***** error ... 348s y = mvnpdf (ones (10, 2), [4, 2, 3]); 348s ***** error ... 348s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 348s ***** error ... 348s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 348s ***** shared x, mu, sigma 348s x = [1, 2, 5, 4, 6]; 348s mu = [2, 0, -1, 1, 4]; 348s sigma = [2, 2, 2, 2, 2]; 348s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 348s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 348s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 348s 9 tests, 9 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/loglrnd.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/loglrnd.m 348s ***** assert (size (loglrnd (1, 1)), [1 1]) 348s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 348s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 348s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 348s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 348s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 348s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 348s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 348s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 348s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 348s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 348s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 348s ***** assert (class (loglrnd (1, 1)), "double") 348s ***** assert (class (loglrnd (1, single (1))), "single") 348s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 348s ***** assert (class (loglrnd (single (1), 1)), "single") 348s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 348s ***** error loglrnd () 348s ***** error loglrnd (1) 348s ***** error ... 348s loglrnd (ones (3), ones (2)) 348s ***** error ... 348s loglrnd (ones (2), ones (3)) 348s ***** error loglrnd (i, 2, 3) 348s ***** error loglrnd (1, i, 3) 348s ***** error ... 348s loglrnd (1, 2, -1) 348s ***** error ... 348s loglrnd (1, 2, 1.2) 348s ***** error ... 348s loglrnd (1, 2, ones (2)) 348s ***** error ... 348s loglrnd (1, 2, [2 -1 2]) 348s ***** error ... 348s loglrnd (1, 2, [2 0 2.5]) 348s ***** error ... 348s loglrnd (1, 2, 2, -1, 5) 348s ***** error ... 348s loglrnd (1, 2, 2, 1.5, 5) 348s ***** error ... 348s loglrnd (2, ones (2), 3) 348s ***** error ... 348s loglrnd (2, ones (2), [3, 2]) 348s ***** error ... 348s loglrnd (2, ones (2), 3, 2) 348s 33 tests, 33 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/gpinv.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gpinv.m 348s ***** demo 348s ## Plot various iCDFs from the generalized Pareto distribution 348s p = 0.001:0.001:0.999; 348s x1 = gpinv (p, 1, 1, 0); 348s x2 = gpinv (p, 5, 1, 0); 348s x3 = gpinv (p, 20, 1, 0); 348s x4 = gpinv (p, 1, 2, 0); 348s x5 = gpinv (p, 5, 2, 0); 348s x6 = gpinv (p, 20, 2, 0); 348s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 348s p, x4, "-c", p, x5, "-m", p, x6, "-k") 348s grid on 348s ylim ([0, 5]) 348s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 348s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 348s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 348s "location", "southeast") 348s title ("Generalized Pareto iCDF") 348s xlabel ("probability") 348s ylabel ("values in x") 348s ***** shared p, y1, y2, y3 348s p = [-1, 0, 1/2, 1, 2]; 348s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 348s y2 = [NaN, 0, 1, Inf, NaN]; 348s y3 = [NaN, 0, 1/2, 1, NaN]; 348s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 348s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 348s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 348s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 348s ***** assert (gpinv (p, 0, 1, 0), y1) 348s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 348s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 348s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 348s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 348s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 348s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 348s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 348s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 348s ***** assert (gpinv (p, 1, 1, 0), y2) 348s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 348s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 348s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 348s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 348s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 348s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 348s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 348s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 348s ***** assert (gpinv (p, -1, 1, 0), y3) 348s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 348s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 348s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 348s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 348s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 348s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 348s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 348s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 348s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 348s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 348s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 348s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 348s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 348s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 348s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 348s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 348s ***** error gpinv () 348s ***** error gpinv (1) 348s ***** error gpinv (1, 2) 348s ***** error gpinv (1, 2, 3) 348s ***** error ... 348s gpinv (ones (3), ones (2), ones(2), ones(2)) 348s ***** error ... 348s gpinv (ones (2), ones (3), ones(2), ones(2)) 348s ***** error ... 348s gpinv (ones (2), ones (2), ones(3), ones(2)) 348s ***** error ... 348s gpinv (ones (2), ones (2), ones(2), ones(3)) 348s ***** error gpinv (i, 2, 3, 4) 348s ***** error gpinv (1, i, 3, 4) 348s ***** error gpinv (1, 2, i, 4) 348s ***** error gpinv (1, 2, 3, i) 348s 51 tests, 51 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/mvtpdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvtpdf.m 348s ***** demo 348s ## Compute the pdf of a multivariate t distribution with correlation 348s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 348s 348s rho = [1, 0.4; 0.4, 1]; 348s df = 2; 348s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 348s X = [X1(:), X2(:)]; 348s y = mvtpdf (X, rho, df); 348s surf (X1, X2, reshape (y, 25, 25)); 348s title ("Bivariate Student's t probability density function"); 348s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 348s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 348s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 348s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 348s [0.04713313 0.03722421 0.02069011]', 1E-7) 348s 3 tests, 3 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/geopdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/geopdf.m 348s ***** demo 348s ## Plot various PDFs from the geometric distribution 348s x = 0:10; 348s y1 = geopdf (x, 0.2); 348s y2 = geopdf (x, 0.5); 348s y3 = geopdf (x, 0.7); 348s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 348s grid on 348s ylim ([0, 0.8]) 348s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 348s title ("Geometric PDF") 348s xlabel ("values in x (number of failures)") 348s ylabel ("density") 348s ***** shared x, y 348s x = [-1 0 1 Inf]; 348s y = [0, 1/2, 1/4, NaN]; 348s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 348s ***** assert (geopdf (x, 0.5), y) 348s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 348s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 348s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 348s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 348s ***** error geopdf () 348s ***** error geopdf (1) 348s ***** error geopdf (1,2,3) 348s ***** error geopdf (ones (3), ones (2)) 348s ***** error geopdf (ones (2), ones (3)) 348s ***** error geopdf (i, 2) 348s ***** error geopdf (2, i) 348s 13 tests, 13 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/loglcdf.m] 348s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/loglcdf.m 348s ***** demo 348s ## Plot various CDFs from the log-logistic distribution 348s x = 0:0.001:2; 348s p1 = loglcdf (x, log (1), 1/0.5); 348s p2 = loglcdf (x, log (1), 1); 348s p3 = loglcdf (x, log (1), 1/2); 348s p4 = loglcdf (x, log (1), 1/4); 348s p5 = loglcdf (x, log (1), 1/8); 348s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 348s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 348s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 348s grid on 348s title ("Log-logistic CDF") 348s xlabel ("values in x") 348s ylabel ("probability") 348s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 349s ***** shared out1, out2 349s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 349s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 349s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 349s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 349s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 349s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 349s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 349s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 349s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 349s ***** assert (class (loglcdf (1, single (2), 3)), "single") 349s ***** assert (class (loglcdf (1, 2, single (3))), "single") 349s ***** error loglcdf (1) 349s ***** error loglcdf (1, 2) 349s ***** error ... 349s loglcdf (1, 2, 3, 4) 349s ***** error ... 349s loglcdf (1, 2, 3, "uper") 349s ***** error ... 349s loglcdf (1, ones (2), ones (3)) 349s ***** error ... 349s loglcdf (1, ones (2), ones (3), "upper") 349s ***** error ... 349s loglcdf (ones (2), 1, ones (3)) 349s ***** error ... 349s loglcdf (ones (2), 1, ones (3), "upper") 349s ***** error ... 349s loglcdf (ones (2), ones (3), 1) 349s ***** error ... 349s loglcdf (ones (2), ones (3), 1, "upper") 349s ***** error loglcdf (i, 2, 3) 349s ***** error loglcdf (i, 2, 3, "upper") 349s ***** error loglcdf (1, i, 3) 349s ***** error loglcdf (1, i, 3, "upper") 349s ***** error loglcdf (1, 2, i) 349s ***** error loglcdf (1, 2, i, "upper") 349s 25 tests, 25 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/logirnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logirnd.m 349s ***** assert (size (logirnd (1, 1)), [1 1]) 349s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 349s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 349s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 349s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 349s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 349s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (logirnd (1, 1)), "double") 349s ***** assert (class (logirnd (1, single (1))), "single") 349s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 349s ***** assert (class (logirnd (single (1), 1)), "single") 349s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 349s ***** error logirnd () 349s ***** error logirnd (1) 349s ***** error ... 349s logirnd (ones (3), ones (2)) 349s ***** error ... 349s logirnd (ones (2), ones (3)) 349s ***** error logirnd (i, 2, 3) 349s ***** error logirnd (1, i, 3) 349s ***** error ... 349s logirnd (1, 2, -1) 349s ***** error ... 349s logirnd (1, 2, 1.2) 349s ***** error ... 349s logirnd (1, 2, ones (2)) 349s ***** error ... 349s logirnd (1, 2, [2 -1 2]) 349s ***** error ... 349s logirnd (1, 2, [2 0 2.5]) 349s ***** error ... 349s logirnd (1, 2, 2, -1, 5) 349s ***** error ... 349s logirnd (1, 2, 2, 1.5, 5) 349s ***** error ... 349s logirnd (2, ones (2), 3) 349s ***** error ... 349s logirnd (2, ones (2), [3, 2]) 349s ***** error ... 349s logirnd (2, ones (2), 3, 2) 349s 33 tests, 33 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/nctcdf.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nctcdf.m 349s ***** demo 349s ## Plot various CDFs from the noncentral Τ distribution 349s x = -5:0.01:5; 349s p1 = nctcdf (x, 1, 0); 349s p2 = nctcdf (x, 4, 0); 349s p3 = nctcdf (x, 1, 2); 349s p4 = nctcdf (x, 4, 2); 349s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 349s grid on 349s xlim ([-5, 5]) 349s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 349s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 349s title ("Noncentral Τ CDF") 349s xlabel ("values in x") 349s ylabel ("probability") 349s ***** demo 349s ## Compare the noncentral T CDF with MU = 1 to the T CDF 349s ## with the same number of degrees of freedom (10). 349s 349s x = -5:0.1:5; 349s p1 = nctcdf (x, 10, 1); 349s p2 = tcdf (x, 10); 349s plot (x, p1, "-", x, p2, "-") 349s grid on 349s xlim ([-5, 5]) 349s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 349s title ("Noncentral T vs T CDFs") 349s xlabel ("values in x") 349s ylabel ("probability") 349s ***** test 349s x = -2:0.1:2; 349s p = nctcdf (x, 10, 1); 349s assert (p(1), 0.003302485766631558, 1e-14); 349s assert (p(2), 0.004084668193532631, 1e-14); 349s assert (p(3), 0.005052800319478737, 1e-14); 349s assert (p(41), 0.8076115625303751, 1e-14); 349s ***** test 349s p = nctcdf (12, 10, 3); 349s assert (p, 0.9997719343243797, 1e-14); 349s ***** test 349s p = nctcdf (2, 3, 2); 349s assert (p, 0.4430757822176028, 1e-14); 349s ***** test 349s p = nctcdf (2, 3, 2, "upper"); 349s assert (p, 0.5569242177823971, 1e-14); 349s ***** test 349s p = nctcdf ([3, 6], 3, 2, "upper"); 349s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 349s ***** error nctcdf () 349s ***** error nctcdf (1) 349s ***** error nctcdf (1, 2) 349s ***** error nctcdf (1, 2, 3, "tail") 349s ***** error nctcdf (1, 2, 3, 4) 349s ***** error ... 349s nctcdf (ones (3), ones (2), ones (2)) 349s ***** error ... 349s nctcdf (ones (2), ones (3), ones (2)) 349s ***** error ... 349s nctcdf (ones (2), ones (2), ones (3)) 349s ***** error nctcdf (i, 2, 2) 349s ***** error nctcdf (2, i, 2) 349s ***** error nctcdf (2, 2, i) 349s 16 tests, 16 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/binornd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/binornd.m 349s ***** assert (size (binornd (2, 1/2)), [1 1]) 349s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 349s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 349s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 349s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 349s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 349s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 349s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 349s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (binornd (1, 1)), "double") 349s ***** assert (class (binornd (1, single (0))), "single") 349s ***** assert (class (binornd (1, single ([0, 0]))), "single") 349s ***** assert (class (binornd (1, single (1), 2)), "single") 349s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 349s ***** assert (class (binornd (single (1), 1, 2)), "single") 349s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 349s ***** error binornd () 349s ***** error binornd (1) 349s ***** error ... 349s binornd (ones (3), ones (2)) 349s ***** error ... 349s binornd (ones (2), ones (3)) 349s ***** error binornd (i, 2) 349s ***** error binornd (1, i) 349s ***** error ... 349s binornd (1, 1/2, -1) 349s ***** error ... 349s binornd (1, 1/2, 1.2) 349s ***** error ... 349s binornd (1, 1/2, ones (2)) 349s ***** error ... 349s binornd (1, 1/2, [2 -1 2]) 349s ***** error ... 349s binornd (1, 1/2, [2 0 2.5]) 349s ***** error ... 349s binornd (1, 1/2, 2, -1, 5) 349s ***** error ... 349s binornd (1, 1/2, 2, 1.5, 5) 349s ***** error ... 349s binornd (2, 1/2 * ones (2), 3) 349s ***** error ... 349s binornd (2, 1/2 * ones (2), [3, 2]) 349s ***** error ... 349s binornd (2, 1/2 * ones (2), 3, 2) 349s ***** error ... 349s binornd (2 * ones (2), 1/2, 3) 349s ***** error ... 349s binornd (2 * ones (2), 1/2, [3, 2]) 349s ***** error ... 349s binornd (2 * ones (2), 1/2, 3, 2) 349s 40 tests, 40 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/mnrnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mnrnd.m 349s ***** test 349s n = 10; 349s pk = [0.2, 0.5, 0.3]; 349s r = mnrnd (n, pk); 349s assert (size (r), size (pk)); 349s assert (all (r >= 0)); 349s assert (all (round (r) == r)); 349s assert (sum (r) == n); 349s ***** test 349s n = 10 * ones (3, 1); 349s pk = [0.2, 0.5, 0.3]; 349s r = mnrnd (n, pk); 349s assert (size (r), [length(n), length(pk)]); 349s assert (all (r >= 0)); 349s assert (all (round (r) == r)); 349s assert (all (sum (r, 2) == n)); 349s ***** test 349s n = (1:2)'; 349s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 349s r = mnrnd (n, pk); 349s assert (size (r), size (pk)); 349s assert (all (r >= 0)); 349s assert (all (round (r) == r)); 349s assert (all (sum (r, 2) == n)); 349s 3 tests, 3 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/nakainv.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nakainv.m 349s ***** demo 349s ## Plot various iCDFs from the Nakagami distribution 349s p = 0.001:0.001:0.999; 349s x1 = nakainv (p, 0.5, 1); 349s x2 = nakainv (p, 1, 1); 349s x3 = nakainv (p, 1, 2); 349s x4 = nakainv (p, 1, 3); 349s x5 = nakainv (p, 2, 1); 349s x6 = nakainv (p, 2, 2); 349s x7 = nakainv (p, 5, 1); 349s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 349s p, x5, "-k", p, x6, "-b", p, x7, "-c") 349s grid on 349s ylim ([0, 3]) 349s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 349s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 349s "μ = 5, ω = 1"}, "location", "northwest") 349s title ("Nakagami iCDF") 349s xlabel ("probability") 349s ylabel ("values in x") 349s ***** shared p, y 349s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 349s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 349s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 349s ***** assert (nakainv (p, 1, 1), y, eps) 349s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 349s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 349s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 349s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 349s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 349s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 349s ***** error nakainv () 349s ***** error nakainv (1) 349s ***** error nakainv (1, 2) 349s ***** error ... 349s nakainv (ones (3), ones (2), ones(2)) 349s ***** error ... 349s nakainv (ones (2), ones (3), ones(2)) 349s ***** error ... 349s nakainv (ones (2), ones (2), ones(3)) 349s ***** error nakainv (i, 4, 3) 349s ***** error nakainv (1, i, 3) 349s ***** error nakainv (1, 4, i) 349s 17 tests, 17 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/evrnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/evrnd.m 349s ***** assert (size (evrnd (1, 1)), [1 1]) 349s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 349s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 349s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 349s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 349s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 349s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (evrnd (1, 1)), "double") 349s ***** assert (class (evrnd (1, single (1))), "single") 349s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 349s ***** assert (class (evrnd (single (1), 1)), "single") 349s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 349s ***** error evrnd () 349s ***** error evrnd (1) 349s ***** error ... 349s evrnd (ones (3), ones (2)) 349s ***** error ... 349s evrnd (ones (2), ones (3)) 349s ***** error evrnd (i, 2, 3) 349s ***** error evrnd (1, i, 3) 349s ***** error ... 349s evrnd (1, 2, -1) 349s ***** error ... 349s evrnd (1, 2, 1.2) 349s ***** error ... 349s evrnd (1, 2, ones (2)) 349s ***** error ... 349s evrnd (1, 2, [2 -1 2]) 349s ***** error ... 349s evrnd (1, 2, [2 0 2.5]) 349s ***** error ... 349s evrnd (1, 2, 2, -1, 5) 349s ***** error ... 349s evrnd (1, 2, 2, 1.5, 5) 349s ***** error ... 349s evrnd (2, ones (2), 3) 349s ***** error ... 349s evrnd (2, ones (2), [3, 2]) 349s ***** error ... 349s evrnd (2, ones (2), 3, 2) 349s 33 tests, 33 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/wishrnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wishrnd.m 349s ***** assert(size (wishrnd (1,2)), [1, 1]); 349s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 349s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 349s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 349s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 349s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 349s ***** error wishrnd () 349s ***** error wishrnd (1) 349s ***** error wishrnd ([1; 1], 2) 349s 9 tests, 9 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/chi2pdf.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/chi2pdf.m 349s ***** demo 349s ## Plot various PDFs from the chi-squared distribution 349s x = 0:0.01:8; 349s y1 = chi2pdf (x, 1); 349s y2 = chi2pdf (x, 2); 349s y3 = chi2pdf (x, 3); 349s y4 = chi2pdf (x, 4); 349s y5 = chi2pdf (x, 6); 349s y6 = chi2pdf (x, 9); 349s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 349s x, y4, "-c", x, y5, "-m", x, y6, "-y") 349s grid on 349s xlim ([0, 8]) 349s ylim ([0, 0.5]) 349s legend ({"df = 1", "df = 2", "df = 3", ... 349s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 349s title ("Chi-squared PDF") 349s xlabel ("values in x") 349s ylabel ("density") 349s ***** shared x, y 349s x = [-1 0 0.5 1 Inf]; 349s y = [0, 1/2 * exp(-x(2:5)/2)]; 349s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 349s ***** assert (chi2pdf (x, 2), y) 349s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 349s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 349s ***** assert (chi2pdf (2, Inf), 0) 349s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 349s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 349s ***** error chi2pdf () 349s ***** error chi2pdf (1) 349s ***** error chi2pdf (1,2,3) 349s ***** error ... 349s chi2pdf (ones (3), ones (2)) 349s ***** error ... 349s chi2pdf (ones (2), ones (3)) 349s ***** error chi2pdf (i, 2) 349s ***** error chi2pdf (2, i) 349s 14 tests, 14 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/gumbelrnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gumbelrnd.m 349s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 349s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 349s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 349s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 349s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 349s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 349s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (gumbelrnd (1, 1)), "double") 349s ***** assert (class (gumbelrnd (1, single (1))), "single") 349s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 349s ***** assert (class (gumbelrnd (single (1), 1)), "single") 349s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 349s ***** error gumbelrnd () 349s ***** error gumbelrnd (1) 349s ***** error ... 349s gumbelrnd (ones (3), ones (2)) 349s ***** error ... 349s gumbelrnd (ones (2), ones (3)) 349s ***** error gumbelrnd (i, 2, 3) 349s ***** error gumbelrnd (1, i, 3) 349s ***** error ... 349s gumbelrnd (1, 2, -1) 349s ***** error ... 349s gumbelrnd (1, 2, 1.2) 349s ***** error ... 349s gumbelrnd (1, 2, ones (2)) 349s ***** error ... 349s gumbelrnd (1, 2, [2 -1 2]) 349s ***** error ... 349s gumbelrnd (1, 2, [2 0 2.5]) 349s ***** error ... 349s gumbelrnd (1, 2, 2, -1, 5) 349s ***** error ... 349s gumbelrnd (1, 2, 2, 1.5, 5) 349s ***** error ... 349s gumbelrnd (2, ones (2), 3) 349s ***** error ... 349s gumbelrnd (2, ones (2), [3, 2]) 349s ***** error ... 349s gumbelrnd (2, ones (2), 3, 2) 349s 33 tests, 33 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/gampdf.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gampdf.m 349s ***** demo 349s ## Plot various PDFs from the Gamma distribution 349s x = 0:0.01:20; 349s y1 = gampdf (x, 1, 2); 349s y2 = gampdf (x, 2, 2); 349s y3 = gampdf (x, 3, 2); 349s y4 = gampdf (x, 5, 1); 349s y5 = gampdf (x, 9, 0.5); 349s y6 = gampdf (x, 7.5, 1); 349s y7 = gampdf (x, 0.5, 1); 349s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 349s x, y5, "-k", x, y6, "-b", x, y7, "-c") 349s grid on 349s ylim ([0,0.5]) 349s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 349s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 349s "α = 0.5, β = 1"}, "location", "northeast") 349s title ("Gamma PDF") 349s xlabel ("values in x") 349s ylabel ("density") 349s ***** shared x, y 349s x = [-1 0 0.5 1 Inf]; 349s y = [0 exp(-x(2:end))]; 349s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 349s ***** assert (gampdf (x, 1, ones (1,5)), y) 349s ***** assert (gampdf (x, ones (1,5), 1), y) 349s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN 0 y(5)]) 349s ***** assert (gampdf (x, [0 Inf NaN Inf 1], 1), [NaN 0 NaN 0 y(5)]) 349s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 349s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 349s ***** assert (gampdf (2, Inf, 4), 0) 349s ***** assert (gampdf (2, 4, Inf), 0) 349s ***** assert (gampdf (2, Inf, Inf), 0) 349s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 349s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 349s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 349s ***** error gampdf () 349s ***** error gampdf (1) 349s ***** error gampdf (1,2) 349s ***** error ... 349s gampdf (ones (3), ones (2), ones (2)) 349s ***** error ... 349s gampdf (ones (2), ones (3), ones (2)) 349s ***** error ... 349s gampdf (ones (2), ones (2), ones (3)) 349s ***** error gampdf (i, 2, 2) 349s ***** error gampdf (2, i, 2) 349s ***** error gampdf (2, 2, i) 349s 22 tests, 22 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/gamrnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gamrnd.m 349s ***** assert (size (gamrnd (1, 1)), [1 1]) 349s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 349s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 349s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 349s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 349s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 349s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (gamrnd (1, 1)), "double") 349s ***** assert (class (gamrnd (1, single (1))), "single") 349s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 349s ***** assert (class (gamrnd (single (1), 1)), "single") 349s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 349s ***** error gamrnd () 349s ***** error gamrnd (1) 349s ***** error ... 349s gamrnd (ones (3), ones (2)) 349s ***** error ... 349s gamrnd (ones (2), ones (3)) 349s ***** error gamrnd (i, 2, 3) 349s ***** error gamrnd (1, i, 3) 349s ***** error ... 349s gamrnd (1, 2, -1) 349s ***** error ... 349s gamrnd (1, 2, 1.2) 349s ***** error ... 349s gamrnd (1, 2, ones (2)) 349s ***** error ... 349s gamrnd (1, 2, [2 -1 2]) 349s ***** error ... 349s gamrnd (1, 2, [2 0 2.5]) 349s ***** error ... 349s gamrnd (1, 2, 2, -1, 5) 349s ***** error ... 349s gamrnd (1, 2, 2, 1.5, 5) 349s ***** error ... 349s gamrnd (2, ones (2), 3) 349s ***** error ... 349s gamrnd (2, ones (2), [3, 2]) 349s ***** error ... 349s gamrnd (2, ones (2), 3, 2) 349s 33 tests, 33 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/hygepdf.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hygepdf.m 349s ***** demo 349s ## Plot various PDFs from the hypergeometric distribution 349s x = 0:60; 349s y1 = hygepdf (x, 500, 50, 100); 349s y2 = hygepdf (x, 500, 60, 200); 349s y3 = hygepdf (x, 500, 70, 300); 349s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 349s grid on 349s xlim ([0, 60]) 349s ylim ([0, 0.18]) 349s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 349s "m = 500, k = 70, μ = 300"}, "location", "northeast") 349s title ("Hypergeometric PDF") 349s xlabel ("values in x (number of successes)") 349s ylabel ("density") 349s ***** shared x, y 349s x = [-1 0 1 2 3]; 349s y = [0 1/6 4/6 1/6 0]; 349s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 349s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 349s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 349s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 349s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 349s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 349s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 349s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 349s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 349s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 349s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 349s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 349s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 349s ***** test 349s z = zeros(3,5); 349s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 349s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 349s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 349s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 349s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 349s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 349s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 349s ***** error hygepdf () 349s ***** error hygepdf (1) 349s ***** error hygepdf (1,2) 349s ***** error hygepdf (1,2,3) 349s ***** error ... 349s hygepdf (1, ones (3), ones (2), ones (2)) 349s ***** error ... 349s hygepdf (1, ones (2), ones (3), ones (2)) 349s ***** error ... 349s hygepdf (1, ones (2), ones (2), ones (3)) 349s ***** error hygepdf (i, 2, 2, 2) 349s ***** error hygepdf (2, i, 2, 2) 349s ***** error hygepdf (2, 2, i, 2) 349s ***** error hygepdf (2, 2, 2, i) 349s 25 tests, 25 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/copulacdf.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/copulacdf.m 349s ***** test 349s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 349s theta = [1; 2]; 349s p = copulacdf ("Clayton", x, theta); 349s expected_p = [0.1395; 0.1767]; 349s assert (p, expected_p, 0.001); 349s ***** test 349s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 349s p = copulacdf ("Gumbel", x, 2); 349s expected_p = [0.1464; 0.1464]; 349s assert (p, expected_p, 0.001); 349s ***** test 349s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 349s theta = [1; 2]; 349s p = copulacdf ("Frank", x, theta); 349s expected_p = [0.0699; 0.0930]; 349s assert (p, expected_p, 0.001); 349s ***** test 349s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 349s theta = [0.3; 0.7]; 349s p = copulacdf ("AMH", x, theta); 349s expected_p = [0.0629; 0.0959]; 349s assert (p, expected_p, 0.001); 349s ***** test 349s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 349s theta = [0.2, 0.1, 0.1, 0.05]; 349s p = copulacdf ("FGM", x, theta); 349s expected_p = [0.0558; 0.0293]; 349s assert (p, expected_p, 0.001); 349s 5 tests, 5 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/betarnd.m] 349s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/betarnd.m 349s ***** assert (size (betarnd (2, 1/2)), [1 1]) 349s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 349s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 349s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 349s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 349s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 349s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 349s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 349s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (betarnd (1, 1)), "double") 349s ***** assert (class (betarnd (1, single (0))), "single") 349s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 349s ***** assert (class (betarnd (1, single (1), 2)), "single") 349s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 349s ***** assert (class (betarnd (single (1), 1, 2)), "single") 349s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 349s ***** error betarnd () 349s ***** error betarnd (1) 349s ***** error ... 349s betarnd (ones (3), ones (2)) 349s ***** error ... 349s betarnd (ones (2), ones (3)) 349s ***** error betarnd (i, 2) 349s ***** error betarnd (1, i) 349s ***** error ... 349s betarnd (1, 1/2, -1) 349s ***** error ... 349s betarnd (1, 1/2, 1.2) 349s ***** error ... 349s betarnd (1, 1/2, ones (2)) 349s ***** error ... 349s betarnd (1, 1/2, [2 -1 2]) 349s ***** error ... 349s betarnd (1, 1/2, [2 0 2.5]) 349s ***** error ... 349s betarnd (1, 1/2, 2, -1, 5) 349s ***** error ... 349s betarnd (1, 1/2, 2, 1.5, 5) 349s ***** error ... 349s betarnd (2, 1/2 * ones (2), 3) 350s ***** error ... 350s betarnd (2, 1/2 * ones (2), [3, 2]) 350s ***** error ... 350s betarnd (2, 1/2 * ones (2), 3, 2) 350s ***** error ... 350s betarnd (2 * ones (2), 1/2, 3) 350s ***** error ... 350s betarnd (2 * ones (2), 1/2, [3, 2]) 350s ***** error ... 350s betarnd (2 * ones (2), 1/2, 3, 2) 350s 40 tests, 40 passed, 0 known failure, 0 skipped 350s [inst/dist_fun/chi2cdf.m] 350s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/chi2cdf.m 350s ***** demo 350s ## Plot various CDFs from the chi-squared distribution 350s x = 0:0.01:8; 350s p1 = chi2cdf (x, 1); 350s p2 = chi2cdf (x, 2); 350s p3 = chi2cdf (x, 3); 350s p4 = chi2cdf (x, 4); 350s p5 = chi2cdf (x, 6); 350s p6 = chi2cdf (x, 9); 350s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 350s x, p4, "-c", x, p5, "-m", x, p6, "-y") 350s grid on 350s xlim ([0, 8]) 350s legend ({"df = 1", "df = 2", "df = 3", ... 350s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 350s title ("Chi-squared CDF") 350s xlabel ("values in x") 350s ylabel ("probability") 350s ***** shared x, p, u 350s x = [-1, 0, 0.5, 1, 2]; 350s p = [0, (1 - exp (-x(2:end) / 2))]; 350s u = [1, 0, NaN, 0.606530659712633, 0.367879441171442]; 350s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 350s ***** assert (chi2cdf (x, 2), p, eps) 350s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [0, 1, NaN, p(4:5)], eps) 350s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), u, 3 * eps) 350s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 350s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 350s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 350s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 350s ***** error chi2cdf () 350s ***** error chi2cdf (1) 350s ***** error chi2cdf (1, 2, 3, 4) 350s ***** error chi2cdf (1, 2, 3) 350s ***** error chi2cdf (1, 2, "uper") 350s ***** error ... 350s chi2cdf (ones (3), ones (2)) 350s ***** error ... 350s chi2cdf (ones (2), ones (3)) 350s ***** error chi2cdf (i, 2) 350s ***** error chi2cdf (2, i) 350s 17 tests, 17 passed, 0 known failure, 0 skipped 350s [inst/dist_fun/mvtcdf.m] 350s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvtcdf.m 350s ***** demo 350s ## Compute the cdf of a multivariate Student's t distribution with 350s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 350s 350s rho = [1, 0.4; 0.4, 1]; 350s df = 2; 350s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 350s X = [X1(:), X2(:)]; 350s p = mvtcdf (X, rho, df); 350s surf (X1, X2, reshape (p, 25, 25)); 350s title ("Bivariate Student's t cumulative distribution function"); 350s ***** test 350s x = [1, 2]; 350s rho = [1, 0.5; 0.5, 1]; 350s df = 4; 350s a = [-1, 0]; 350s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 350s ***** test 350s x = [1, 2;2, 4;1, 5]; 350s rho = [1, 0.5; 0.5, 1]; 350s df = 4; 350s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 350s assert (mvtcdf(x, rho, df), p, 1e-14); 350s ***** test 350s x = [1, 2, 2, 4, 1, 5]; 350s rho = eye (6); 350s rho(rho == 0) = 0.5; 350s df = 4; 350s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 362s ***** error mvtcdf (1) 362s ***** error mvtcdf (1, 2) 362s ***** error ... 362s mvtcdf (1, [2, 3; 3, 2], 1) 362s ***** error ... 362s mvtcdf ([2, 3, 4], ones (2), 1) 362s ***** error ... 362s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 362s ***** error ... 362s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 362s ***** error ... 362s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 362s 10 tests, 10 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/nakapdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nakapdf.m 362s ***** demo 362s ## Plot various PDFs from the Nakagami distribution 362s x = 0:0.01:3; 362s y1 = nakapdf (x, 0.5, 1); 362s y2 = nakapdf (x, 1, 1); 362s y3 = nakapdf (x, 1, 2); 362s y4 = nakapdf (x, 1, 3); 362s y5 = nakapdf (x, 2, 1); 362s y6 = nakapdf (x, 2, 2); 362s y7 = nakapdf (x, 5, 1); 362s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 362s x, y5, "-k", x, y6, "-b", x, y7, "-c") 362s grid on 362s xlim ([0, 3]) 362s ylim ([0, 2]) 362s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 362s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 362s "μ = 5, ω = 1"}, "location", "northeast") 362s title ("Nakagami PDF") 362s xlabel ("values in x") 362s ylabel ("density") 362s ***** shared x, y 362s x = [-1, 0, 1, 2, Inf]; 362s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 362s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 362s ***** assert (nakapdf (x, 1, 1), y, eps) 362s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 362s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 362s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 362s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 362s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 362s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 362s ***** error nakapdf () 362s ***** error nakapdf (1) 362s ***** error nakapdf (1, 2) 362s ***** error ... 362s nakapdf (ones (3), ones (2), ones(2)) 362s ***** error ... 362s nakapdf (ones (2), ones (3), ones(2)) 362s ***** error ... 362s nakapdf (ones (2), ones (2), ones(3)) 362s ***** error nakapdf (i, 4, 3) 362s ***** error nakapdf (1, i, 3) 362s ***** error nakapdf (1, 4, i) 362s 17 tests, 17 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/ncfpdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncfpdf.m 362s ***** demo 362s ## Plot various PDFs from the noncentral F distribution 362s x = 0:0.01:5; 362s y1 = ncfpdf (x, 2, 5, 1); 362s y2 = ncfpdf (x, 2, 5, 2); 362s y3 = ncfpdf (x, 5, 10, 1); 362s y4 = ncfpdf (x, 10, 20, 10); 362s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 362s grid on 362s xlim ([0, 5]) 362s ylim ([0, 0.8]) 362s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 362s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 362s "location", "northeast") 362s title ("Noncentral F PDF") 362s xlabel ("values in x") 362s ylabel ("density") 362s ***** demo 362s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 362s ## same number of numerator and denominator degrees of freedom (5, 20) 362s 362s x = 0.01:0.1:10.01; 362s y1 = ncfpdf (x, 5, 20, 10); 362s y2 = fpdf (x, 5, 20); 362s plot (x, y1, "-", x, y2, "-"); 362s grid on 362s xlim ([0, 10]) 362s ylim ([0, 0.8]) 362s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 362s title ("Noncentral F vs F PDFs") 362s xlabel ("values in x") 362s ylabel ("density") 362s ***** shared x1, df1, df2, lambda 362s x1 = [-Inf, 2, NaN, 4, Inf]; 362s df1 = [2, 0, -1, 1, 4]; 362s df2 = [2, 4, 5, 6, 8]; 362s lambda = [1, NaN, 3, -1, 2]; 362s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 362s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 362s 0.05607937264237208, NaN], 1e-14); 362s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 362s 0.080125760971946518, NaN], 1e-14); 362s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 362s 0.0715902008258656, NaN], 1e-14); 362s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 362s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 362s NaN, 0.2152571783045893], 1e-14); 362s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 362s NaN, 0.05560846335398539], 1e-14); 362s ***** error ncfpdf () 362s ***** error ncfpdf (1) 362s ***** error ncfpdf (1, 2) 362s ***** error ncfpdf (1, 2, 3) 362s ***** error ... 362s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 362s ***** error ... 362s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 362s ***** error ... 362s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 362s ***** error ... 362s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 362s ***** error ncfpdf (i, 2, 2, 2) 362s ***** error ncfpdf (2, i, 2, 2) 362s ***** error ncfpdf (2, 2, i, 2) 362s ***** error ncfpdf (2, 2, 2, i) 362s 19 tests, 19 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/unidrnd.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unidrnd.m 362s ***** assert (size (unidrnd (2)), [1, 1]) 362s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 362s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 362s ***** assert (size (unidrnd (1, 3)), [3, 3]) 362s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 362s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 362s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 362s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 362s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 362s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 362s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 362s ***** assert (unidrnd (0, 1, 1), NaN) 362s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 362s ***** assert (class (unidrnd (2)), "double") 362s ***** assert (class (unidrnd (single (2))), "single") 362s ***** assert (class (unidrnd (single ([2 2]))), "single") 362s ***** error unidrnd () 362s ***** error unidrnd (i) 362s ***** error ... 362s unidrnd (1, -1) 362s ***** error ... 362s unidrnd (1, 1.2) 362s ***** error ... 362s unidrnd (1, ones (2)) 362s ***** error ... 362s unidrnd (1, [2 -1 2]) 362s ***** error ... 362s unidrnd (1, [2 0 2.5]) 362s ***** error ... 362s unidrnd (ones (2), ones (2)) 362s ***** error ... 362s unidrnd (1, 2, -1, 5) 362s ***** error ... 362s unidrnd (1, 2, 1.5, 5) 362s ***** error unidrnd (ones (2,2), 3) 362s ***** error unidrnd (ones (2,2), [3, 2]) 362s ***** error unidrnd (ones (2,2), 2, 3) 362s 29 tests, 29 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/mvnrnd.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvnrnd.m 362s ***** error mvnrnd () 362s ***** error mvnrnd ([2, 3, 4]) 362s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 362s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 362s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 362s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 362s 6 tests, 6 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/binoinv.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/binoinv.m 362s ***** demo 362s ## Plot various iCDFs from the binomial distribution 362s p = 0.001:0.001:0.999; 362s x1 = binoinv (p, 20, 0.5); 362s x2 = binoinv (p, 20, 0.7); 362s x3 = binoinv (p, 40, 0.5); 362s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 362s grid on 362s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 362s "n = 40, ps = 0.5"}, "location", "southeast") 362s title ("Binomial iCDF") 362s xlabel ("probability") 362s ylabel ("values in x (number of successes)") 362s ***** shared p 362s p = [-1 0 0.5 1 2]; 362s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 362s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 362s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 362s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 362s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 362s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 362s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 362s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 362s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 362s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 362s ***** shared x, tol 362s x = magic (3) + 1; 362s tol = 1; 362s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 362s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 362s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 362s ***** error binoinv () 362s ***** error binoinv (1) 362s ***** error binoinv (1,2) 362s ***** error binoinv (1,2,3,4) 362s ***** error ... 362s binoinv (ones (3), ones (2), ones (2)) 362s ***** error ... 362s binoinv (ones (2), ones (3), ones (2)) 362s ***** error ... 362s binoinv (ones (2), ones (2), ones (3)) 362s ***** error binoinv (i, 2, 2) 362s ***** error binoinv (2, i, 2) 362s ***** error binoinv (2, 2, i) 362s 23 tests, 23 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/ncx2cdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncx2cdf.m 362s ***** demo 362s ## Plot various CDFs from the noncentral chi-squared distribution 362s x = 0:0.1:10; 362s p1 = ncx2cdf (x, 2, 1); 362s p2 = ncx2cdf (x, 2, 2); 362s p3 = ncx2cdf (x, 2, 3); 362s p4 = ncx2cdf (x, 4, 1); 362s p5 = ncx2cdf (x, 4, 2); 362s p6 = ncx2cdf (x, 4, 3); 362s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 362s x, p4, "-m", x, p5, "-c", x, p6, "-y") 362s grid on 362s xlim ([0, 10]) 362s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 362s "df = 2, λ = 3", "df = 4, λ = 1", ... 362s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 362s title ("Noncentral chi-squared CDF") 362s xlabel ("values in x") 362s ylabel ("probability") 362s ***** demo 362s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 362s ## chi-squared CDF with the same number of degrees of freedom (4). 362s 362s x = 0:0.1:10; 362s p1 = ncx2cdf (x, 4, 2); 362s p2 = chi2cdf (x, 4); 362s plot (x, p1, "-", x, p2, "-") 362s grid on 362s xlim ([0, 10]) 362s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 362s title ("Noncentral chi-squared vs chi-squared CDFs") 362s xlabel ("values in x") 362s ylabel ("probability") 362s ***** test 362s x = -2:0.1:2; 362s p = ncx2cdf (x, 10, 1); 362s assert (p([1:21]), zeros (1, 21), 3e-84); 362s assert (p(22), 1.521400636466575e-09, 1e-14); 362s assert (p(30), 6.665480510026046e-05, 1e-14); 362s assert (p(41), 0.002406447308399836, 1e-14); 362s ***** test 362s p = ncx2cdf (12, 10, 3); 362s assert (p, 0.4845555602398649, 1e-14); 362s ***** test 362s p = ncx2cdf (2, 3, 2); 362s assert (p, 0.2207330870741212, 1e-14); 362s ***** test 362s p = ncx2cdf (2, 3, 2, "upper"); 362s assert (p, 0.7792669129258789, 1e-14); 362s ***** test 362s p = ncx2cdf ([3, 6], 3, 2, "upper"); 362s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 362s ***** error ncx2cdf () 362s ***** error ncx2cdf (1) 362s ***** error ncx2cdf (1, 2) 362s ***** error ncx2cdf (1, 2, 3, "tail") 362s ***** error ncx2cdf (1, 2, 3, 4) 362s ***** error ... 362s ncx2cdf (ones (3), ones (2), ones (2)) 362s ***** error ... 362s ncx2cdf (ones (2), ones (3), ones (2)) 362s ***** error ... 362s ncx2cdf (ones (2), ones (2), ones (3)) 362s ***** error ncx2cdf (i, 2, 2) 362s ***** error ncx2cdf (2, i, 2) 362s ***** error ncx2cdf (2, 2, i) 362s 16 tests, 16 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/jsupdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/jsupdf.m 362s ***** error jsupdf () 362s ***** error jsupdf (1, 2, 3, 4) 362s ***** error ... 362s jsupdf (1, ones (2), ones (3)) 362s 3 tests, 3 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/unifrnd.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unifrnd.m 362s ***** assert (size (unifrnd (1, 1)), [1 1]) 362s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 362s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 362s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 362s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 362s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 362s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 362s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 362s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 362s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 362s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 362s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 362s ***** assert (class (unifrnd (1, 1)), "double") 362s ***** assert (class (unifrnd (1, single (1))), "single") 362s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 362s ***** assert (class (unifrnd (single (1), 1)), "single") 362s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 362s ***** error unifrnd () 362s ***** error unifrnd (1) 362s ***** error ... 362s unifrnd (ones (3), ones (2)) 362s ***** error ... 362s unifrnd (ones (2), ones (3)) 362s ***** error unifrnd (i, 2, 3) 362s ***** error unifrnd (1, i, 3) 362s ***** error ... 362s unifrnd (1, 2, -1) 362s ***** error ... 362s unifrnd (1, 2, 1.2) 362s ***** error ... 362s unifrnd (1, 2, ones (2)) 362s ***** error ... 362s unifrnd (1, 2, [2 -1 2]) 362s ***** error ... 362s unifrnd (1, 2, [2 0 2.5]) 362s ***** error ... 362s unifrnd (1, 2, 2, -1, 5) 362s ***** error ... 362s unifrnd (1, 2, 2, 1.5, 5) 362s ***** error ... 362s unifrnd (2, ones (2), 3) 362s ***** error ... 362s unifrnd (2, ones (2), [3, 2]) 362s ***** error ... 362s unifrnd (2, ones (2), 3, 2) 362s 33 tests, 33 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/tcdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tcdf.m 362s ***** demo 362s ## Plot various CDFs from the Student's T distribution 362s x = -5:0.01:5; 362s p1 = tcdf (x, 1); 362s p2 = tcdf (x, 2); 362s p3 = tcdf (x, 5); 362s p4 = tcdf (x, Inf); 362s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 362s grid on 362s xlim ([-5, 5]) 362s ylim ([0, 1]) 362s legend ({"df = 1", "df = 2", ... 362s "df = 5", 'df = \infty'}, "location", "southeast") 362s title ("Student's T CDF") 362s xlabel ("values in x") 362s ylabel ("probability") 362s ***** shared x,y 362s x = [-Inf 0 1 Inf]; 362s y = [0 1/2 3/4 1]; 362s ***** assert (tcdf (x, ones (1,4)), y, eps) 362s ***** assert (tcdf (x, 1), y, eps) 362s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 362s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 362s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 362s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 362s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 362s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 362s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 362s ***** error tcdf () 362s ***** error tcdf (1) 362s ***** error tcdf (1, 2, "uper") 362s ***** error tcdf (1, 2, 3) 362s ***** error ... 362s tcdf (ones (3), ones (2)) 362s ***** error ... 362s tcdf (ones (3), ones (2)) 362s ***** error ... 362s tcdf (ones (3), ones (2), "upper") 362s ***** error tcdf (i, 2) 362s ***** error tcdf (2, i) 362s ***** shared tol_rel 362s tol_rel = 10 * eps; 362s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 362s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 362s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 362s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 362s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 362s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 362s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 362s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 362s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 362s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 362s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 362s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 362s 30 tests, 30 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/gamcdf.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gamcdf.m 362s ***** demo 362s ## Plot various CDFs from the Gamma distribution 362s x = 0:0.01:20; 362s p1 = gamcdf (x, 1, 2); 362s p2 = gamcdf (x, 2, 2); 362s p3 = gamcdf (x, 3, 2); 362s p4 = gamcdf (x, 5, 1); 362s p5 = gamcdf (x, 9, 0.5); 362s p6 = gamcdf (x, 7.5, 1); 362s p7 = gamcdf (x, 0.5, 1); 362s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 362s x, p5, "-k", x, p6, "-b", x, p7, "-c") 362s grid on 362s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 362s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 362s "α = 0.5, β = 1"}, "location", "southeast") 362s title ("Gamma CDF") 362s xlabel ("values in x") 362s ylabel ("probability") 362s ***** shared x, y, u 362s x = [-1, 0, 0.5, 1, 2, Inf]; 362s y = [0, gammainc(x(2:end), 1)]; 362s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 362s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 362s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 362s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 362s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 362s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 362s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 362s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 362s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 362s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 362s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 362s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 362s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 362s ***** error gamcdf () 362s ***** error gamcdf (1) 362s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 362s ***** error gamcdf (1, 2, 3, "uper") 362s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 362s ***** error gamcdf (2, 3, 4, [1, 2]) 362s ***** error ... 362s [p, plo, pup] = gamcdf (1, 2, 3) 362s ***** error ... 362s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 362s ***** error [p, plo, pup] = ... 362s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 362s ***** error [p, plo, pup] = ... 362s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 362s ***** error [p, plo, pup] = ... 362s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 362s ***** error ... 362s gamcdf (ones (3), ones (2), ones (2)) 362s ***** error ... 362s gamcdf (ones (2), ones (3), ones (2)) 362s ***** error ... 362s gamcdf (ones (2), ones (2), ones (3)) 362s ***** error gamcdf (i, 2, 2) 362s ***** error gamcdf (2, i, 2) 362s ***** error gamcdf (2, 2, i) 362s ***** error ... 362s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 362s 30 tests, 30 passed, 0 known failure, 0 skipped 362s [inst/dist_fun/ncx2inv.m] 362s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncx2inv.m 362s ***** demo 362s ## Plot various iCDFs from the noncentral chi-squared distribution 362s p = 0.001:0.001:0.999; 362s x1 = ncx2inv (p, 2, 1); 362s x2 = ncx2inv (p, 2, 2); 362s x3 = ncx2inv (p, 2, 3); 362s x4 = ncx2inv (p, 4, 1); 362s x5 = ncx2inv (p, 4, 2); 362s x6 = ncx2inv (p, 4, 3); 362s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 362s p, x4, "-m", p, x5, "-c", p, x6, "-y") 362s grid on 362s ylim ([0, 10]) 362s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 362s "df = 2, λ = 3", "df = 4, λ = 1", ... 362s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 362s title ("Noncentral chi-squared iCDF") 362s xlabel ("probability") 362s ylabel ("values in x") 362s ***** demo 362s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 362s ## chi-squared CDF with the same number of degrees of freedom (4). 362s 362s p = 0.001:0.001:0.999; 362s x1 = ncx2inv (p, 4, 2); 362s x2 = chi2inv (p, 4); 362s plot (p, x1, "-", p, x2, "-"); 362s grid on 362s ylim ([0, 10]) 362s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 362s title ("Noncentral chi-squared vs chi-squared quantile functions") 362s xlabel ("probability") 362s ylabel ("values in x") 362s ***** test 362s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 362s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 362s ***** test 362s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 362s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 362s ***** test 362s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 362s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 363s ***** test 363s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 363s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 363s ***** test 363s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 363s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 363s ***** test 363s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 363s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 363s ***** test 363s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 364s ***** error ncx2inv () 364s ***** error ncx2inv (1) 364s ***** error ncx2inv (1, 2) 364s ***** error ... 364s ncx2inv (ones (3), ones (2), ones (2)) 364s ***** error ... 364s ncx2inv (ones (2), ones (3), ones (2)) 364s ***** error ... 364s ncx2inv (ones (2), ones (2), ones (3)) 364s ***** error ncx2inv (i, 2, 2) 364s ***** error ncx2inv (2, i, 2) 364s ***** error ncx2inv (2, 2, i) 364s 16 tests, 16 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/chi2inv.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/chi2inv.m 364s ***** demo 364s ## Plot various iCDFs from the chi-squared distribution 364s p = 0.001:0.001:0.999; 364s x1 = chi2inv (p, 1); 364s x2 = chi2inv (p, 2); 364s x3 = chi2inv (p, 3); 364s x4 = chi2inv (p, 4); 364s x5 = chi2inv (p, 6); 364s x6 = chi2inv (p, 9); 364s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 364s p, x4, "-c", p, x5, "-m", p, x6, "-y") 364s grid on 364s ylim ([0, 8]) 364s legend ({"df = 1", "df = 2", "df = 3", ... 364s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 364s title ("Chi-squared iCDF") 364s xlabel ("probability") 364s ylabel ("values in x") 364s ***** shared p 364s p = [-1 0 0.3934693402873666 1 2]; 364s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 364s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 364s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 364s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 364s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 364s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 364s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 364s ***** error chi2inv () 364s ***** error chi2inv (1) 364s ***** error chi2inv (1,2,3) 364s ***** error ... 364s chi2inv (ones (3), ones (2)) 364s ***** error ... 364s chi2inv (ones (2), ones (3)) 364s ***** error chi2inv (i, 2) 364s ***** error chi2inv (2, i) 364s 14 tests, 14 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/raylinv.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/raylinv.m 364s ***** demo 364s ## Plot various iCDFs from the Rayleigh distribution 364s p = 0.001:0.001:0.999; 364s x1 = raylinv (p, 0.5); 364s x2 = raylinv (p, 1); 364s x3 = raylinv (p, 2); 364s x4 = raylinv (p, 3); 364s x5 = raylinv (p, 4); 364s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 364s grid on 364s ylim ([0, 10]) 364s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 364s "σ = 3", "σ = 4"}, "location", "northwest") 364s title ("Rayleigh iCDF") 364s xlabel ("probability") 364s ylabel ("values in x") 364s ***** test 364s p = 0:0.1:0.5; 364s sigma = 1:6; 364s x = raylinv (p, sigma); 364s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 364s assert (x, expected_x, 0.001); 364s ***** test 364s p = 0:0.1:0.5; 364s x = raylinv (p, 0.5); 364s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 364s assert (x, expected_x, 0.001); 364s ***** error raylinv () 364s ***** error raylinv (1) 364s ***** error ... 364s raylinv (ones (3), ones (2)) 364s ***** error ... 364s raylinv (ones (2), ones (3)) 364s ***** error raylinv (i, 2) 364s ***** error raylinv (2, i) 364s 8 tests, 8 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/expcdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/expcdf.m 364s ***** demo 364s ## Plot various CDFs from the exponential distribution 364s x = 0:0.01:5; 364s p1 = expcdf (x, 2/3); 364s p2 = expcdf (x, 1.0); 364s p3 = expcdf (x, 2.0); 364s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 364s grid on 364s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 364s title ("Exponential CDF") 364s xlabel ("values in x") 364s ylabel ("probability") 364s ***** shared x, p 364s x = [-1 0 0.5 1 Inf]; 364s p = [0, 1 - exp(-x(2:end)/2)]; 364s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 364s ***** assert (expcdf (x, 2), p, 1e-16) 364s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 364s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 364s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 364s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 364s ***** test 364s [p, plo, pup] = expcdf (1, 2, 3); 364s assert (p, 0.39346934028737, 1e-14); 364s assert (plo, 0.08751307220484, 1e-14); 364s assert (pup, 0.93476821257933, 1e-14); 364s ***** test 364s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 364s assert (p, 0.39346934028737, 1e-14); 364s assert (plo, 0.14466318041675, 1e-14); 364s assert (pup, 0.79808291849140, 1e-14); 364s ***** test 364s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 364s assert (p, 0.60653065971263, 1e-14); 364s assert (plo, 0.20191708150860, 1e-14); 364s assert (pup, 0.85533681958325, 1e-14); 364s ***** error expcdf () 364s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 364s ***** error expcdf (1, 2, 3, 4, "uper") 364s ***** error ... 364s expcdf (ones (3), ones (2)) 364s ***** error ... 364s expcdf (2, 3, [1, 2]) 364s ***** error ... 364s [p, plo, pup] = expcdf (1, 2) 364s ***** error [p, plo, pup] = ... 364s expcdf (1, 2, 3, 0) 364s ***** error [p, plo, pup] = ... 364s expcdf (1, 2, 3, 1.22) 364s ***** error [p, plo, pup] = ... 364s expcdf (1, 2, 3, "alpha", "upper") 364s ***** error expcdf (i, 2) 364s ***** error expcdf (2, i) 364s ***** error ... 364s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 364s 21 tests, 21 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/evpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/evpdf.m 364s ***** demo 364s ## Plot various PDFs from the Extreme value distribution 364s x = -10:0.001:10; 364s y1 = evpdf (x, 0.5, 2); 364s y2 = evpdf (x, 1.0, 2); 364s y3 = evpdf (x, 1.5, 3); 364s y4 = evpdf (x, 3.0, 4); 364s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 364s grid on 364s ylim ([0, 0.2]) 364s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 364s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 364s title ("Extreme value PDF") 364s xlabel ("values in x") 364s ylabel ("density") 364s ***** shared x, y0, y1 364s x = [-5, 0, 1, 2, 3]; 364s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 364s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 364s ***** assert (evpdf (x), y0, 1e-4) 364s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 364s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 364s ***** error evpdf () 364s ***** error ... 364s evpdf (ones (3), ones (2), ones (2)) 364s ***** error evpdf (i, 2, 2) 364s ***** error evpdf (2, i, 2) 364s ***** error evpdf (2, 2, i) 364s 8 tests, 8 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/normpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/normpdf.m 364s ***** demo 364s ## Plot various PDFs from the normal distribution 364s x = -5:0.01:5; 364s y1 = normpdf (x, 0, 0.5); 364s y2 = normpdf (x, 0, 1); 364s y3 = normpdf (x, 0, 2); 364s y4 = normpdf (x, -2, 0.8); 364s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 364s grid on 364s xlim ([-5, 5]) 364s ylim ([0, 0.9]) 364s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 364s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 364s title ("Normal PDF") 364s xlabel ("values in x") 364s ylabel ("density") 364s ***** shared x, y 364s x = [-Inf, 1, 2, Inf]; 364s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 364s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 364s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 364s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 364s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 364s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 364s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 364s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 364s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 364s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 364s ***** error normpdf () 364s ***** error ... 364s normpdf (ones (3), ones (2), ones (2)) 364s ***** error ... 364s normpdf (ones (2), ones (3), ones (2)) 364s ***** error ... 364s normpdf (ones (2), ones (2), ones (3)) 364s ***** error normpdf (i, 2, 2) 364s ***** error normpdf (2, i, 2) 364s ***** error normpdf (2, 2, i) 364s 16 tests, 16 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/bvtcdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bvtcdf.m 364s ***** test 364s x = [1, 2]; 364s rho = [1, 0.5; 0.5, 1]; 364s df = 4; 364s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 364s ***** test 364s x = [3, 2;2, 4;1, 5]; 364s rho = [1, 0.5; 0.5, 1]; 364s df = 4; 364s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 364s 2 tests, 2 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/logicdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logicdf.m 364s ***** demo 364s ## Plot various CDFs from the logistic distribution 364s x = -5:0.01:20; 364s p1 = logicdf (x, 5, 2); 364s p2 = logicdf (x, 9, 3); 364s p3 = logicdf (x, 9, 4); 364s p4 = logicdf (x, 6, 2); 364s p5 = logicdf (x, 2, 1); 364s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 364s grid on 364s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 364s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 364s title ("Logistic CDF") 364s xlabel ("values in x") 364s ylabel ("probability") 364s ***** shared x, y 364s x = [-Inf -log(3) 0 log(3) Inf]; 364s y = [0, 1/4, 1/2, 3/4, 1]; 364s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 364s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1], eps) 364s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 364s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 364s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 364s ***** error logicdf () 364s ***** error logicdf (1) 364s ***** error ... 364s logicdf (1, 2) 364s ***** error logicdf (1, 2, 3, "tail") 364s ***** error logicdf (1, 2, 3, 4) 364s ***** error ... 364s logicdf (1, ones (2), ones (3)) 364s ***** error ... 364s logicdf (ones (2), 1, ones (3)) 364s ***** error ... 364s logicdf (ones (2), ones (3), 1) 364s ***** error logicdf (i, 2, 3) 364s ***** error logicdf (1, i, 3) 364s ***** error logicdf (1, 2, i) 364s 16 tests, 16 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/wishpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wishpdf.m 364s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 364s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 364s ***** 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); 364s ***** error wishpdf () 364s ***** error wishpdf (1, 2) 364s ***** error wishpdf (1, 2, 0) 364s ***** error wishpdf (1, 2) 364s 7 tests, 7 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/hygecdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hygecdf.m 364s ***** demo 364s ## Plot various CDFs from the hypergeometric distribution 364s x = 0:60; 364s p1 = hygecdf (x, 500, 50, 100); 364s p2 = hygecdf (x, 500, 60, 200); 364s p3 = hygecdf (x, 500, 70, 300); 364s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 364s grid on 364s xlim ([0, 60]) 364s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 364s "m = 500, k = 70, n = 300"}, "location", "southeast") 364s title ("Hypergeometric CDF") 364s xlabel ("values in x (number of successes)") 364s ylabel ("probability") 364s ***** shared x, y 364s x = [-1 0 1 2 3]; 364s y = [0 1/6 5/6 1 1]; 364s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 364s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 364s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 364s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 364s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 364s [y(5) NaN NaN NaN y(1)], 5*eps) 364s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 364s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 364s [y(5) NaN NaN NaN y(1)], 5*eps) 364s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 364s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 364s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 364s [y(5) NaN NaN NaN y(1)], 5*eps) 364s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 364s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 364s ***** test 364s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 364s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 364s ***** test 364s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 364s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 364s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 364s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 364s eps ("single")) 364s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 364s eps ("single")) 364s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 364s eps ("single")) 364s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 364s eps ("single")) 364s ***** error hygecdf () 364s ***** error hygecdf (1) 364s ***** error hygecdf (1,2) 364s ***** error hygecdf (1,2,3) 364s ***** error hygecdf (1,2,3,4,5) 364s ***** error hygecdf (1,2,3,4,"uper") 364s ***** error ... 364s hygecdf (ones (2), ones (3), 1, 1) 364s ***** error ... 364s hygecdf (1, ones (2), ones (3), 1) 364s ***** error ... 364s hygecdf (1, 1, ones (2), ones (3)) 364s ***** error hygecdf (i, 2, 2, 2) 364s ***** error hygecdf (2, i, 2, 2) 364s ***** error hygecdf (2, 2, i, 2) 364s ***** error hygecdf (2, 2, 2, i) 364s 32 tests, 32 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/nbininv.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nbininv.m 364s ***** demo 364s ## Plot various iCDFs from the negative binomial distribution 364s p = 0.001:0.001:0.999; 364s x1 = nbininv (p, 2, 0.15); 364s x2 = nbininv (p, 5, 0.2); 364s x3 = nbininv (p, 4, 0.4); 364s x4 = nbininv (p, 10, 0.3); 364s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 364s grid on 364s ylim ([0, 40]) 364s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 364s "r = 10, ps = 0.3"}, "location", "northwest") 364s title ("Negative binomial iCDF") 364s xlabel ("probability") 364s ylabel ("values in x (number of failures)") 364s ***** shared p 364s p = [-1 0 3/4 1 2]; 364s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 364s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 364s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 364s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 364s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 364s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 364s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 364s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 364s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 364s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 364s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 364s ***** shared y, tol 364s y = magic (3) + 1; 364s tol = 1; 364s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 364s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 364s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 364s ***** error nbininv () 364s ***** error nbininv (1) 364s ***** error nbininv (1, 2) 364s ***** error ... 364s nbininv (ones (3), ones (2), ones (2)) 364s ***** error ... 364s nbininv (ones (2), ones (3), ones (2)) 364s ***** error ... 364s nbininv (ones (2), ones (2), ones (3)) 364s ***** error nbininv (i, 2, 2) 364s ***** error nbininv (2, i, 2) 364s ***** error nbininv (2, 2, i) 364s 23 tests, 23 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/binocdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/binocdf.m 364s ***** demo 364s ## Plot various CDFs from the binomial distribution 364s x = 0:40; 364s p1 = binocdf (x, 20, 0.5); 364s p2 = binocdf (x, 20, 0.7); 364s p3 = binocdf (x, 40, 0.5); 364s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 364s grid on 364s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 364s "n = 40, ps = 0.5"}, "location", "southeast") 364s title ("Binomial CDF") 364s xlabel ("values in x (number of successes)") 364s ylabel ("probability") 364s ***** shared x, p, p1 364s x = [-1 0 1 2 3]; 364s p = [0 1/4 3/4 1 1]; 364s p1 = 1 - p; 364s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 364s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 364s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 364s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 364s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 364s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 364s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 364s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 364s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 364s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 364s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 364s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 364s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 364s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 364s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 364s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 364s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 364s ***** error binocdf () 364s ***** error binocdf (1) 364s ***** error binocdf (1, 2) 364s ***** error binocdf (1, 2, 3, 4, 5) 364s ***** error binocdf (1, 2, 3, "tail") 364s ***** error binocdf (1, 2, 3, 4) 364s ***** error ... 364s binocdf (ones (3), ones (2), ones (2)) 364s ***** error ... 364s binocdf (ones (2), ones (3), ones (2)) 364s ***** error ... 364s binocdf (ones (2), ones (2), ones (3)) 364s ***** error binocdf (i, 2, 2) 364s ***** error binocdf (2, i, 2) 364s ***** error binocdf (2, 2, i) 364s 29 tests, 29 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/wblpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wblpdf.m 364s ***** demo 364s ## Plot various PDFs from the Weibul distribution 364s x = 0:0.001:2.5; 364s y1 = wblpdf (x, 1, 0.5); 364s y2 = wblpdf (x, 1, 1); 364s y3 = wblpdf (x, 1, 1.5); 364s y4 = wblpdf (x, 1, 5); 364s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 364s grid on 364s ylim ([0, 2.5]) 364s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 364s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 364s title ("Weibul PDF") 364s xlabel ("values in x") 364s ylabel ("density") 364s ***** shared x,y 364s x = [-1 0 0.5 1 Inf]; 364s y = [0, exp(-x(2:4)), NaN]; 364s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 364s ***** assert (wblpdf (x, 1, ones (1,5)), y) 364s ***** assert (wblpdf (x, ones (1,5), 1), y) 364s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 364s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 364s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 364s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 364s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 364s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 364s ***** error wblpdf () 364s ***** error wblpdf (1,2,3,4) 364s ***** error wblpdf (ones (3), ones (2), ones (2)) 364s ***** error wblpdf (ones (2), ones (3), ones (2)) 364s ***** error wblpdf (ones (2), ones (2), ones (3)) 364s ***** error wblpdf (i, 2, 2) 364s ***** error wblpdf (2, i, 2) 364s ***** error wblpdf (2, 2, i) 364s 17 tests, 17 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/hnpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/hnpdf.m 364s ***** demo 364s ## Plot various PDFs from the half-normal distribution 364s x = 0:0.001:10; 364s y1 = hnpdf (x, 0, 1); 364s y2 = hnpdf (x, 0, 2); 364s y3 = hnpdf (x, 0, 3); 364s y4 = hnpdf (x, 0, 5); 364s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 364s grid on 364s xlim ([0, 10]) 364s ylim ([0, 0.9]) 364s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 364s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 364s title ("Half-normal PDF") 364s xlabel ("values in x") 364s ylabel ("density") 364s ***** demo 364s ## Plot half-normal against normal probability density function 364s x = -5:0.001:5; 364s y1 = hnpdf (x, 0, 1); 364s y2 = normpdf (x); 364s plot (x, y1, "-b", x, y2, "-g") 364s grid on 364s xlim ([-5, 5]) 364s ylim ([0, 0.9]) 364s legend ({"half-normal with μ = 0, σ = 1", ... 364s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 364s title ("Half-normal against standard normal PDF") 364s xlabel ("values in x") 364s ylabel ("density") 364s ***** shared x, y 364s x = [-Inf, -1, 0, 1/2, 1, Inf]; 364s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 364s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 364s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 364s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 364s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 364s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 364s ***** error hnpdf () 364s ***** error hnpdf (1) 364s ***** error hnpdf (1, 2) 364s ***** error ... 364s hnpdf (1, ones (2), ones (3)) 364s ***** error ... 364s hnpdf (ones (2), 1, ones (3)) 364s ***** error ... 364s hnpdf (ones (2), ones (3), 1) 364s ***** error hnpdf (i, 2, 3) 364s ***** error hnpdf (1, i, 3) 364s ***** error hnpdf (1, 2, i) 364s 14 tests, 14 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/iwishpdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/iwishpdf.m 364s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 364s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 364s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 364s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 364s ***** error iwishpdf () 364s ***** error iwishpdf (1, 2) 364s ***** error iwishpdf (1, 2, 0) 364s 6 tests, 6 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/ncfcdf.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncfcdf.m 364s ***** demo 364s ## Plot various CDFs from the noncentral F distribution 364s x = 0:0.01:5; 364s p1 = ncfcdf (x, 2, 5, 1); 364s p2 = ncfcdf (x, 2, 5, 2); 364s p3 = ncfcdf (x, 5, 10, 1); 364s p4 = ncfcdf (x, 10, 20, 10); 364s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 364s grid on 364s xlim ([0, 5]) 364s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 364s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 364s "location", "southeast") 364s title ("Noncentral F CDF") 364s xlabel ("values in x") 364s ylabel ("probability") 364s ***** demo 364s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 364s ## same number of numerator and denominator degrees of freedom (5, 20) 364s 364s x = 0.01:0.1:10.01; 364s p1 = ncfcdf (x, 5, 20, 10); 364s p2 = fcdf (x, 5, 20); 364s plot (x, p1, "-", x, p2, "-"); 364s grid on 364s xlim ([0, 10]) 364s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 364s title ("Noncentral F vs F CDFs") 364s xlabel ("values in x") 364s ylabel ("probability") 364s ***** test 364s x = -2:0.1:2; 364s p = ncfcdf (x, 10, 1, 3); 364s assert (p([1:21]), zeros (1, 21), 1e-76); 364s assert (p(22), 0.004530737275319753, 1e-14); 364s assert (p(30), 0.255842099135669, 1e-14); 364s assert (p(41), 0.4379890998457305, 1e-14); 364s ***** test 364s p = ncfcdf (12, 10, 3, 2); 364s assert (p, 0.9582287900447416, 1e-14); 364s ***** test 364s p = ncfcdf (2, 3, 2, 1); 364s assert (p, 0.5731985522994989, 1e-14); 364s ***** test 364s p = ncfcdf (2, 3, 2, 1, "upper"); 364s assert (p, 0.4268014477004823, 1e-14); 364s ***** test 364s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 364s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 364s ***** error ncfcdf () 364s ***** error ncfcdf (1) 364s ***** error ncfcdf (1, 2) 364s ***** error ncfcdf (1, 2, 3) 364s ***** error ncfcdf (1, 2, 3, 4, "tail") 364s ***** error ncfcdf (1, 2, 3, 4, 5) 364s ***** error ... 364s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 364s ***** error ... 364s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 364s ***** error ... 364s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 364s ***** error ... 364s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 364s ***** error ncfcdf (i, 2, 2, 2) 364s ***** error ncfcdf (2, i, 2, 2) 364s ***** error ncfcdf (2, 2, i, 2) 364s ***** error ncfcdf (2, 2, 2, i) 364s 19 tests, 19 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/copularnd.m] 364s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/copularnd.m 364s ***** test 364s theta = 0.5; 364s r = copularnd ("Gaussian", theta); 364s assert (size (r), [1, 2]); 364s assert (all ((r >= 0) & (r <= 1))); 364s ***** test 364s theta = 0.5; 364s df = 2; 364s r = copularnd ("t", theta, df); 364s assert (size (r), [1, 2]); 364s assert (all ((r >= 0) & (r <= 1))); 364s ***** test 364s theta = 0.5; 364s r = copularnd ("Clayton", theta); 364s assert (size (r), [1, 2]); 364s assert (all ((r >= 0) & (r <= 1))); 364s ***** test 364s theta = 0.5; 364s n = 2; 364s r = copularnd ("Clayton", theta, n); 364s assert (size (r), [n, 2]); 364s assert (all ((r >= 0) & (r <= 1))); 364s ***** test 364s theta = [1; 2]; 364s n = 2; 364s d = 3; 364s r = copularnd ("Clayton", theta, n, d); 364s assert (size (r), [n, d]); 364s assert (all ((r >= 0) & (r <= 1))); 364s 5 tests, 5 passed, 0 known failure, 0 skipped 364s [inst/dist_fun/wblcdf.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/wblcdf.m 365s ***** demo 365s ## Plot various CDFs from the Weibull distribution 365s x = 0:0.001:2.5; 365s p1 = wblcdf (x, 1, 0.5); 365s p2 = wblcdf (x, 1, 1); 365s p3 = wblcdf (x, 1, 1.5); 365s p4 = wblcdf (x, 1, 5); 365s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 365s grid on 365s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 365s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 365s title ("Weibull CDF") 365s xlabel ("values in x") 365s ylabel ("probability") 365s ***** shared x, y 365s x = [-1 0 0.5 1 Inf]; 365s y = [0, 1-exp(-x(2:4)), 1]; 365s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 365s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 365s ***** assert (wblcdf (x, "upper"), 1 - y) 365s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 365s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 365s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 365s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 365s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 365s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 365s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 365s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 365s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 365s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 365s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 365s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 365s ***** error wblcdf () 365s ***** error wblcdf (1,2,3,4,5,6,7) 365s ***** error wblcdf (1, 2, 3, 4, "uper") 365s ***** error ... 365s wblcdf (ones (3), ones (2), ones (2)) 365s ***** error wblcdf (2, 3, 4, [1, 2]) 365s ***** error ... 365s [p, plo, pup] = wblcdf (1, 2, 3) 365s ***** error [p, plo, pup] = ... 365s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 365s ***** error [p, plo, pup] = ... 365s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 365s ***** error [p, plo, pup] = ... 365s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 365s ***** error wblcdf (i, 2, 2) 365s ***** error wblcdf (2, i, 2) 365s ***** error wblcdf (2, 2, i) 365s ***** error ... 365s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 365s 28 tests, 28 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/bisainv.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bisainv.m 365s ***** demo 365s ## Plot various iCDFs from the Birnbaum-Saunders distribution 365s p = 0.001:0.001:0.999; 365s x1 = bisainv (p, 1, 0.5); 365s x2 = bisainv (p, 1, 1); 365s x3 = bisainv (p, 1, 2); 365s x4 = bisainv (p, 1, 5); 365s x5 = bisainv (p, 1, 10); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 365s grid on 365s ylim ([0, 10]) 365s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 365s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 365s title ("Birnbaum-Saunders iCDF") 365s xlabel ("probability") 365s ylabel ("values in x") 365s ***** demo 365s ## Plot various iCDFs from the Birnbaum-Saunders distribution 365s p = 0.001:0.001:0.999; 365s x1 = bisainv (p, 1, 0.3); 365s x2 = bisainv (p, 2, 0.3); 365s x3 = bisainv (p, 1, 0.5); 365s x4 = bisainv (p, 3, 0.5); 365s x5 = bisainv (p, 5, 0.5); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 365s grid on 365s ylim ([0, 10]) 365s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 365s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 365s title ("Birnbaum-Saunders iCDF") 365s xlabel ("probability") 365s ylabel ("values in x") 365s ***** shared p, y, f 365s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 365s p = [-1, 0, 1/4, 1/2, 1, 2]; 365s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 365s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 365s ***** assert (bisainv (p, 1, ones (1,6)), y) 365s ***** assert (bisainv (p, ones (1,6), 1), y) 365s ***** assert (bisainv (p, 1, 1), y) 365s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 365s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 365s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 365s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 365s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 365s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 365s ***** error bisainv () 365s ***** error bisainv (1) 365s ***** error bisainv (1, 2) 365s ***** error bisainv (1, 2, 3, 4) 365s ***** error ... 365s bisainv (ones (3), ones (2), ones(2)) 365s ***** error ... 365s bisainv (ones (2), ones (3), ones(2)) 365s ***** error ... 365s bisainv (ones (2), ones (2), ones(3)) 365s ***** error bisainv (i, 4, 3) 365s ***** error bisainv (1, i, 3) 365s ***** error bisainv (1, 4, i) 365s 20 tests, 20 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/geocdf.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/geocdf.m 365s ***** demo 365s ## Plot various CDFs from the geometric distribution 365s x = 0:10; 365s p1 = geocdf (x, 0.2); 365s p2 = geocdf (x, 0.5); 365s p3 = geocdf (x, 0.7); 365s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 365s grid on 365s xlim ([0, 10]) 365s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 365s title ("Geometric CDF") 365s xlabel ("values in x (number of failures)") 365s ylabel ("probability") 365s ***** test 365s p = geocdf ([1, 2, 3, 4], 0.25); 365s assert (p(1), 0.4375000000, 1e-14); 365s assert (p(2), 0.5781250000, 1e-14); 365s assert (p(3), 0.6835937500, 1e-14); 365s assert (p(4), 0.7626953125, 1e-14); 365s ***** test 365s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 365s assert (p(1), 0.5625000000, 1e-14); 365s assert (p(2), 0.4218750000, 1e-14); 365s assert (p(3), 0.3164062500, 1e-14); 365s assert (p(4), 0.2373046875, 1e-14); 365s ***** shared x, p 365s x = [-1 0 1 Inf]; 365s p = [0 0.5 0.75 1]; 365s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 365s ***** assert (geocdf (x, 0.5), p) 365s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 365s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 365s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 365s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 365s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 365s ***** error geocdf () 365s ***** error geocdf (1) 365s ***** error ... 365s geocdf (ones (3), ones (2)) 365s ***** error ... 365s geocdf (ones (2), ones (3)) 365s ***** error geocdf (i, 2) 365s ***** error geocdf (2, i) 365s ***** error geocdf (2, 3, "tail") 365s ***** error geocdf (2, 3, 5) 365s 17 tests, 17 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/lognpdf.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/lognpdf.m 365s ***** demo 365s ## Plot various PDFs from the log-normal distribution 365s x = 0:0.01:5; 365s y1 = lognpdf (x, 0, 1); 365s y2 = lognpdf (x, 0, 0.5); 365s y3 = lognpdf (x, 0, 0.25); 365s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 365s grid on 365s ylim ([0, 2]) 365s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 365s "location", "northeast") 365s title ("Log-normal PDF") 365s xlabel ("values in x") 365s ylabel ("density") 365s ***** shared x, y 365s x = [-1 0 e Inf]; 365s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 365s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 365s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 365s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 365s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 365s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 365s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 365s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 365s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 365s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 365s ***** error lognpdf () 365s ***** error lognpdf (1,2,3,4) 365s ***** error lognpdf (ones (3), ones (2), ones (2)) 365s ***** error lognpdf (ones (2), ones (3), ones (2)) 365s ***** error lognpdf (ones (2), ones (2), ones (3)) 365s ***** error lognpdf (i, 2, 2) 365s ***** error lognpdf (2, i, 2) 365s ***** error lognpdf (2, 2, i) 365s 17 tests, 17 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/laplacernd.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/laplacernd.m 365s ***** assert (size (laplacernd (1, 1)), [1 1]) 365s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 365s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 365s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 365s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 365s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 365s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 365s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 365s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 365s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 365s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 365s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 365s ***** assert (class (laplacernd (1, 1)), "double") 365s ***** assert (class (laplacernd (1, single (1))), "single") 365s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 365s ***** assert (class (laplacernd (single (1), 1)), "single") 365s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 365s ***** error laplacernd () 365s ***** error laplacernd (1) 365s ***** error ... 365s laplacernd (ones (3), ones (2)) 365s ***** error ... 365s laplacernd (ones (2), ones (3)) 365s ***** error laplacernd (i, 2, 3) 365s ***** error laplacernd (1, i, 3) 365s ***** error ... 365s laplacernd (1, 2, -1) 365s ***** error ... 365s laplacernd (1, 2, 1.2) 365s ***** error ... 365s laplacernd (1, 2, ones (2)) 365s ***** error ... 365s laplacernd (1, 2, [2 -1 2]) 365s ***** error ... 365s laplacernd (1, 2, [2 0 2.5]) 365s ***** error ... 365s laplacernd (1, 2, 2, -1, 5) 365s ***** error ... 365s laplacernd (1, 2, 2, 1.5, 5) 365s ***** error ... 365s laplacernd (2, ones (2), 3) 365s ***** error ... 365s laplacernd (2, ones (2), [3, 2]) 365s ***** error ... 365s laplacernd (2, ones (2), 3, 2) 365s 33 tests, 33 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/laplacepdf.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/laplacepdf.m 365s ***** demo 365s ## Plot various PDFs from the Laplace distribution 365s x = -10:0.01:10; 365s y1 = laplacepdf (x, 0, 1); 365s y2 = laplacepdf (x, 0, 2); 365s y3 = laplacepdf (x, 0, 4); 365s y4 = laplacepdf (x, -5, 4); 365s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 365s grid on 365s xlim ([-10, 10]) 365s ylim ([0, 0.6]) 365s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 365s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 365s title ("Laplace PDF") 365s xlabel ("values in x") 365s ylabel ("density") 365s ***** shared x, y 365s x = [-Inf -log(2) 0 log(2) Inf]; 365s y = [0, 1/4, 1/2, 1/4, 0]; 365s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 365s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 365s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 365s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 365s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 365s ***** error laplacepdf () 365s ***** error laplacepdf (1) 365s ***** error ... 365s laplacepdf (1, 2) 365s ***** error laplacepdf (1, 2, 3, 4) 365s ***** error ... 365s laplacepdf (1, ones (2), ones (3)) 365s ***** error ... 365s laplacepdf (ones (2), 1, ones (3)) 365s ***** error ... 365s laplacepdf (ones (2), ones (3), 1) 365s ***** error laplacepdf (i, 2, 3) 365s ***** error laplacepdf (1, i, 3) 365s ***** error laplacepdf (1, 2, i) 365s 15 tests, 15 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/ncx2rnd.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncx2rnd.m 365s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 365s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 365s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 365s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 365s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 365s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 365s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 365s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 365s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 365s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 365s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 365s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 365s ***** assert (class (ncx2rnd (1, 1)), "double") 365s ***** assert (class (ncx2rnd (1, single (1))), "single") 365s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 365s ***** assert (class (ncx2rnd (single (1), 1)), "single") 365s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 365s ***** error ncx2rnd () 365s ***** error ncx2rnd (1) 365s ***** error ... 365s ncx2rnd (ones (3), ones (2)) 365s ***** error ... 365s ncx2rnd (ones (2), ones (3)) 365s ***** error ncx2rnd (i, 2) 365s ***** error ncx2rnd (1, i) 365s ***** error ... 365s ncx2rnd (1, 2, -1) 365s ***** error ... 365s ncx2rnd (1, 2, 1.2) 365s ***** error ... 365s ncx2rnd (1, 2, ones (2)) 365s ***** error ... 365s ncx2rnd (1, 2, [2 -1 2]) 365s ***** error ... 365s ncx2rnd (1, 2, [2 0 2.5]) 365s ***** error ... 365s ncx2rnd (1, 2, 2, -1, 5) 365s ***** error ... 365s ncx2rnd (1, 2, 2, 1.5, 5) 365s ***** error ... 365s ncx2rnd (2, ones (2), 3) 365s ***** error ... 365s ncx2rnd (2, ones (2), [3, 2]) 365s ***** error ... 365s ncx2rnd (2, ones (2), 3, 2) 365s 33 tests, 33 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/geornd.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/geornd.m 365s ***** assert (size (geornd (0.5)), [1, 1]) 365s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 365s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 365s ***** assert (size (geornd (0.5, 3)), [3, 3]) 365s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 365s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 365s ***** assert (class (geornd (0.5)), "double") 365s ***** assert (class (geornd (single (0.5))), "single") 365s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 365s ***** assert (class (geornd (single (0))), "single") 365s ***** assert (class (geornd (single (1))), "single") 365s ***** error geornd () 365s ***** error geornd (i) 365s ***** error ... 365s geornd (1, -1) 365s ***** error ... 365s geornd (1, 1.2) 365s ***** error ... 365s geornd (1, ones (2)) 365s ***** error ... 365s geornd (1, [2 -1 2]) 365s ***** error ... 365s geornd (1, [2 0 2.5]) 365s ***** error ... 365s geornd (ones (2), ones (2)) 365s ***** error ... 365s geornd (1, 2, -1, 5) 365s ***** error ... 365s geornd (1, 2, 1.5, 5) 365s ***** error geornd (ones (2,2), 3) 365s ***** error geornd (ones (2,2), [3, 2]) 365s ***** error geornd (ones (2,2), 2, 3) 365s 24 tests, 24 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/unifcdf.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unifcdf.m 365s ***** demo 365s ## Plot various CDFs from the continuous uniform distribution 365s x = 0:0.1:10; 365s p1 = unifcdf (x, 2, 5); 365s p2 = unifcdf (x, 3, 9); 365s plot (x, p1, "-b", x, p2, "-g") 365s grid on 365s xlim ([0, 10]) 365s ylim ([0, 1]) 365s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 365s title ("Continuous uniform CDF") 365s xlabel ("values in x") 365s ylabel ("probability") 365s ***** shared x, y 365s x = [-1 0 0.5 1 2] + 1; 365s y = [0 0 0.5 1 1]; 365s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 365s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 365s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 365s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 365s ***** assert (unifcdf (x, ones (1,5), 2), y) 365s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 365s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 365s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 365s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 365s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 365s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 365s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 365s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 365s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 365s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 365s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 365s ***** error unifcdf () 365s ***** error unifcdf (1) 365s ***** error unifcdf (1, 2) 365s ***** error unifcdf (1, 2, 3, 4) 365s ***** error unifcdf (1, 2, 3, "tail") 365s ***** error ... 365s unifcdf (ones (3), ones (2), ones (2)) 365s ***** error ... 365s unifcdf (ones (2), ones (3), ones (2)) 365s ***** error ... 365s unifcdf (ones (2), ones (2), ones (3)) 365s ***** error unifcdf (i, 2, 2) 365s ***** error unifcdf (2, i, 2) 365s ***** error unifcdf (2, 2, i) 365s 27 tests, 27 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/poissinv.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/poissinv.m 365s ***** demo 365s ## Plot various iCDFs from the Poisson distribution 365s p = 0.001:0.001:0.999; 365s x1 = poissinv (p, 13); 365s x2 = poissinv (p, 4); 365s x3 = poissinv (p, 10); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 365s grid on 365s ylim ([0, 20]) 365s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 365s title ("Poisson iCDF") 365s xlabel ("probability") 365s ylabel ("values in x (number of occurences)") 365s ***** shared p 365s p = [-1 0 0.5 1 2]; 365s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 365s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 365s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 365s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 365s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 365s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 365s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 365s ***** error poissinv () 365s ***** error poissinv (1) 365s ***** error ... 365s poissinv (ones (3), ones (2)) 365s ***** error ... 365s poissinv (ones (2), ones (3)) 365s ***** error poissinv (i, 2) 365s ***** error poissinv (2, i) 365s 13 tests, 13 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/norminv.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/norminv.m 365s ***** demo 365s ## Plot various iCDFs from the normal distribution 365s p = 0.001:0.001:0.999; 365s x1 = norminv (p, 0, 0.5); 365s x2 = norminv (p, 0, 1); 365s x3 = norminv (p, 0, 2); 365s x4 = norminv (p, -2, 0.8); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 365s grid on 365s ylim ([-5, 5]) 365s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 365s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 365s title ("Normal iCDF") 365s xlabel ("probability") 365s ylabel ("values in x") 365s ***** shared p 365s p = [-1 0 0.5 1 2]; 365s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 365s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 365s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 365s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 365s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 365s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 365s ***** assert (norminv (p), probit (p)) 365s ***** assert (norminv (0.31254), probit (0.31254)) 365s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 365s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 365s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 365s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 365s ***** error norminv () 365s ***** error ... 365s norminv (ones (3), ones (2), ones (2)) 365s ***** error ... 365s norminv (ones (2), ones (3), ones (2)) 365s ***** error ... 365s norminv (ones (2), ones (2), ones (3)) 365s ***** error norminv (i, 2, 2) 365s ***** error norminv (2, i, 2) 365s ***** error norminv (2, 2, i) 365s 19 tests, 19 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/gumbelinv.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gumbelinv.m 365s ***** demo 365s ## Plot various iCDFs from the Gumbel distribution 365s p = 0.001:0.001:0.999; 365s x1 = gumbelinv (p, 0.5, 2); 365s x2 = gumbelinv (p, 1.0, 2); 365s x3 = gumbelinv (p, 1.5, 3); 365s x4 = gumbelinv (p, 3.0, 4); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 365s grid on 365s ylim ([-5, 20]) 365s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 365s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 365s title ("Gumbel iCDF") 365s xlabel ("probability") 365s ylabel ("values in x") 365s ***** shared p, x 365s p = [0, 0.05, 0.5 0.95]; 365s x = [-Inf, -1.0972, 0.3665, 2.9702]; 365s ***** assert (gumbelinv (p), x, 1e-4) 365s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 365s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 365s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 365s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 365s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 365s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 365s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 365s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 365s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 365s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 365s p = [0.05, 0.5, 0.95]; 365s x = gumbelinv(p); 365s ***** assert (gumbelcdf(x), p, 1e-4) 365s ***** error gumbelinv () 365s ***** error gumbelinv (1,2,3,4,5,6) 365s ***** error ... 365s gumbelinv (ones (3), ones (2), ones (2)) 365s ***** error ... 365s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 365s ***** error ... 365s [p, plo, pup] = gumbelinv (1, 2, 3) 365s ***** error [p, plo, pup] = ... 365s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 365s ***** error [p, plo, pup] = ... 365s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 365s ***** error gumbelinv (i, 2, 2) 365s ***** error gumbelinv (2, i, 2) 365s ***** error gumbelinv (2, 2, i) 365s ***** error ... 365s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 365s 23 tests, 23 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/invgrnd.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/invgrnd.m 365s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 365s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 365s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 365s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 365s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 365s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 365s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 365s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 365s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 365s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 365s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 365s ***** test 365s r = invgrnd (1, [1, 0, -1]); 365s assert (r([2:3]), [NaN, NaN]) 365s ***** assert (class (invgrnd (1, 0)), "double") 365s ***** assert (class (invgrnd (1, single (0))), "single") 365s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 365s ***** assert (class (invgrnd (1, single (1))), "single") 365s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 365s ***** assert (class (invgrnd (single (1), 1)), "single") 365s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 365s ***** error invgrnd () 365s ***** error invgrnd (1) 365s ***** error ... 365s invgrnd (ones (3), ones (2)) 365s ***** error ... 365s invgrnd (ones (2), ones (3)) 365s ***** error invgrnd (i, 2, 3) 365s ***** error invgrnd (1, i, 3) 365s ***** error ... 365s invgrnd (1, 2, -1) 365s ***** error ... 365s invgrnd (1, 2, 1.2) 365s ***** error ... 365s invgrnd (1, 2, ones (2)) 365s ***** error ... 365s invgrnd (1, 2, [2 -1 2]) 365s ***** error ... 365s invgrnd (1, 2, [2 0 2.5]) 365s ***** error ... 365s invgrnd (1, 2, 2, -1, 5) 365s ***** error ... 365s invgrnd (1, 2, 2, 1.5, 5) 365s ***** error ... 365s invgrnd (2, ones (2), 3) 365s ***** error ... 365s invgrnd (2, ones (2), [3, 2]) 365s ***** error ... 365s invgrnd (2, ones (2), 3, 2) 365s 35 tests, 35 passed, 0 known failure, 0 skipped 365s [inst/dist_fun/finv.m] 365s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/finv.m 365s ***** demo 365s ## Plot various iCDFs from the F distribution 365s p = 0.001:0.001:0.999; 365s x1 = finv (p, 1, 1); 365s x2 = finv (p, 2, 1); 365s x3 = finv (p, 5, 2); 365s x4 = finv (p, 10, 1); 365s x5 = finv (p, 100, 100); 365s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 365s grid on 365s ylim ([0, 4]) 365s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 365s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 365s "df1 = 100, df2 = 100"}, "location", "northwest") 365s title ("F iCDF") 365s xlabel ("probability") 365s ylabel ("values in x") 365s ***** shared p 365s p = [-1 0 0.5 1 2]; 365s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 365s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 365s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 365s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN Inf NaN]) 365s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN Inf NaN]) 365s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 365s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 365s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 365s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 365s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 365s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 365s ***** test 365s x = finv (0.35, Inf, 4); 365s assert (x, 0.9014, 1e-4) 365s ***** test 365s x = finv (0, Inf, 4); 365s assert (x, 0) 365s ***** test 365s x = finv (1, Inf, 4); 365s assert (x, Inf) 365s ***** test 365s x = finv (0.35, 4, Inf); 365s assert (x, 0.6175, 1e-4) 365s ***** test 365s x = finv (0, 4, Inf); 365s assert (x, 0) 365s ***** test 365s x = finv (1, 4, Inf); 365s assert (x, Inf) 366s ***** test 366s x = finv ([0, 0.000001, 0.35, 1, 1.2], Inf, Inf); 366s assert (x, [0, 1, 1, 1, NaN]); 366s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 366s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 366s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 366s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 366s ***** error finv () 366s ***** error finv (1) 366s ***** error finv (1,2) 366s ***** error ... 366s finv (ones (3), ones (2), ones (2)) 366s ***** error ... 366s finv (ones (2), ones (3), ones (2)) 366s ***** error ... 366s finv (ones (2), ones (2), ones (3)) 366s ***** error finv (i, 2, 2) 366s ***** error finv (2, i, 2) 366s ***** error finv (2, 2, i) 366s 31 tests, 31 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/fcdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/fcdf.m 366s ***** demo 366s ## Plot various CDFs from the F distribution 366s x = 0.01:0.01:4; 366s p1 = fcdf (x, 1, 2); 366s p2 = fcdf (x, 2, 1); 366s p3 = fcdf (x, 5, 2); 366s p4 = fcdf (x, 10, 1); 366s p5 = fcdf (x, 100, 100); 366s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 366s grid on 366s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 366s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 366s "df1 = 100, df2 = 100"}, "location", "southeast") 366s title ("F CDF") 366s xlabel ("values in x") 366s ylabel ("probability") 366s ***** shared x, y 366s x = [-1, 0, 0.5, 1, 2, Inf]; 366s y = [0, 0, 1/3, 1/2, 2/3, 1]; 366s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 366s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 366s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 366s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 366s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 366s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 366s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 366s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 366s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 366s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 366s ***** error fcdf () 366s ***** error fcdf (1) 366s ***** error fcdf (1, 2) 366s ***** error fcdf (1, 2, 3, 4) 366s ***** error fcdf (1, 2, 3, "tail") 366s ***** error ... 366s fcdf (ones (3), ones (2), ones (2)) 366s ***** error ... 366s fcdf (ones (2), ones (3), ones (2)) 366s ***** error ... 366s fcdf (ones (2), ones (2), ones (3)) 366s ***** error fcdf (i, 2, 2) 366s ***** error fcdf (2, i, 2) 366s ***** error fcdf (2, 2, i) 366s 21 tests, 21 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/raylcdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/raylcdf.m 366s ***** demo 366s ## Plot various CDFs from the Rayleigh distribution 366s x = 0:0.01:10; 366s p1 = raylcdf (x, 0.5); 366s p2 = raylcdf (x, 1); 366s p3 = raylcdf (x, 2); 366s p4 = raylcdf (x, 3); 366s p5 = raylcdf (x, 4); 366s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 366s grid on 366s ylim ([0, 1]) 366s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 366s "σ = 3", "σ = 4"}, "location", "southeast") 366s title ("Rayleigh CDF") 366s xlabel ("values in x") 366s ylabel ("probability") 366s ***** test 366s x = 0:0.5:2.5; 366s sigma = 1:6; 366s p = raylcdf (x, sigma); 366s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 366s assert (p, expected_p, 0.001); 366s ***** test 366s x = 0:0.5:2.5; 366s p = raylcdf (x, 0.5); 366s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 366s assert (p, expected_p, 0.001); 366s ***** shared x, p 366s x = [-1, 0, 1, 2, Inf]; 366s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 366s ***** assert (raylcdf (x, 1), p, 1e-14) 366s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 366s ***** error raylcdf () 366s ***** error raylcdf (1) 366s ***** error raylcdf (1, 2, "uper") 366s ***** error raylcdf (1, 2, 3) 366s ***** error ... 366s raylcdf (ones (3), ones (2)) 366s ***** error ... 366s raylcdf (ones (2), ones (3)) 366s ***** error raylcdf (i, 2) 366s ***** error raylcdf (2, i) 366s 12 tests, 12 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/chi2rnd.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/chi2rnd.m 366s ***** assert (size (chi2rnd (2)), [1, 1]) 366s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 366s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 366s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 366s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 366s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 366s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 366s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 366s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 366s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 366s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 366s ***** assert (class (chi2rnd (2)), "double") 366s ***** assert (class (chi2rnd (single (2))), "single") 366s ***** assert (class (chi2rnd (single ([2 2]))), "single") 366s ***** error chi2rnd () 366s ***** error chi2rnd (i) 366s ***** error ... 366s chi2rnd (1, -1) 366s ***** error ... 366s chi2rnd (1, 1.2) 366s ***** error ... 366s chi2rnd (1, ones (2)) 366s ***** error ... 366s chi2rnd (1, [2 -1 2]) 366s ***** error ... 366s chi2rnd (1, [2 0 2.5]) 366s ***** error ... 366s chi2rnd (ones (2), ones (2)) 366s ***** error ... 366s chi2rnd (1, 2, -1, 5) 366s ***** error ... 366s chi2rnd (1, 2, 1.5, 5) 366s ***** error chi2rnd (ones (2,2), 3) 366s ***** error chi2rnd (ones (2,2), [3, 2]) 366s ***** error chi2rnd (ones (2,2), 2, 3) 366s 27 tests, 27 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/tripdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/tripdf.m 366s ***** demo 366s ## Plot various CDFs from the triangular distribution 366s x = 0.001:0.001:10; 366s y1 = tripdf (x, 3, 4, 6); 366s y2 = tripdf (x, 1, 2, 5); 366s y3 = tripdf (x, 2, 3, 9); 366s y4 = tripdf (x, 2, 5, 9); 366s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 366s grid on 366s xlim ([0, 10]) 366s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 366s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 366s "location", "northeast") 366s title ("Triangular CDF") 366s xlabel ("values in x") 366s ylabel ("probability") 366s ***** shared x, y, deps 366s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 366s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 366s deps = 2*eps; 366s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 366s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 366s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 366s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 366s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 366s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 366s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 366s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 366s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 366s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 366s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 366s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 366s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 366s ***** error tripdf () 366s ***** error tripdf (1) 366s ***** error tripdf (1, 2) 366s ***** error tripdf (1, 2, 3) 366s ***** error ... 366s tripdf (1, 2, 3, 4, 5) 366s ***** error ... 366s tripdf (ones (3), ones (2), ones(2), ones(2)) 366s ***** error ... 366s tripdf (ones (2), ones (3), ones(2), ones(2)) 366s ***** error ... 366s tripdf (ones (2), ones (2), ones(3), ones(2)) 366s ***** error ... 366s tripdf (ones (2), ones (2), ones(2), ones(3)) 366s ***** error tripdf (i, 2, 3, 4) 366s ***** error tripdf (1, i, 3, 4) 366s ***** error tripdf (1, 2, i, 4) 366s ***** error tripdf (1, 2, 3, i) 366s 26 tests, 26 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/loglinv.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/loglinv.m 366s ***** demo 366s ## Plot various iCDFs from the log-logistic distribution 366s p = 0.001:0.001:0.999; 366s x1 = loglinv (p, log (1), 1/0.5); 366s x2 = loglinv (p, log (1), 1); 366s x3 = loglinv (p, log (1), 1/2); 366s x4 = loglinv (p, log (1), 1/4); 366s x5 = loglinv (p, log (1), 1/8); 366s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 366s ylim ([0, 20]) 366s grid on 366s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 366s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 366s title ("Log-logistic iCDF") 366s xlabel ("probability") 366s ylabel ("x") 366s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 366s ***** shared p, out1, out2 366s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 366s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 366s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 366s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 366s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 366s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 366s ***** assert (class (loglinv (single (1), 2, 3)), "single") 366s ***** assert (class (loglinv (1, single (2), 3)), "single") 366s ***** assert (class (loglinv (1, 2, single (3))), "single") 366s ***** error loglinv (1) 366s ***** error loglinv (1, 2) 366s ***** error ... 366s loglinv (1, ones (2), ones (3)) 366s ***** error ... 366s loglinv (ones (2), 1, ones (3)) 366s ***** error ... 366s loglinv (ones (2), ones (3), 1) 366s ***** error loglinv (i, 2, 3) 366s ***** error loglinv (1, i, 3) 366s ***** error loglinv (1, 2, i) 366s 14 tests, 14 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/jsucdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/jsucdf.m 366s ***** error jsucdf () 366s ***** error jsucdf (1, 2, 3, 4) 366s ***** error ... 366s jsucdf (1, ones (2), ones (3)) 366s 3 tests, 3 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/invgpdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/invgpdf.m 366s ***** demo 366s ## Plot various PDFs from the inverse Gaussian distribution 366s x = 0:0.001:3; 366s y1 = invgpdf (x, 1, 0.2); 366s y2 = invgpdf (x, 1, 1); 366s y3 = invgpdf (x, 1, 3); 366s y4 = invgpdf (x, 3, 0.2); 366s y5 = invgpdf (x, 3, 1); 366s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 366s grid on 366s xlim ([0, 3]) 366s ylim ([0, 3]) 366s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 366s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 366s title ("Inverse Gaussian PDF") 366s xlabel ("values in x") 366s ylabel ("density") 366s ***** shared x, y 366s x = [-Inf, -1, 0, 1/2, 1, Inf]; 366s y = [0, 0, 0, 0.8788, 0.3989, 0]; 366s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 366s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 366s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 366s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 366s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 366s ***** error invgpdf () 366s ***** error invgpdf (1) 366s ***** error invgpdf (1, 2) 366s ***** error ... 366s invgpdf (1, ones (2), ones (3)) 366s ***** error ... 366s invgpdf (ones (2), 1, ones (3)) 366s ***** error ... 366s invgpdf (ones (2), ones (3), 1) 366s ***** error invgpdf (i, 2, 3) 366s ***** error invgpdf (1, i, 3) 366s ***** error invgpdf (1, 2, i) 366s 14 tests, 14 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/gprnd.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gprnd.m 366s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 366s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 366s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 366s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 366s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 366s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 366s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 366s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 366s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 366s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 366s ***** assert (size (gprnd (1,1,0)), [1, 1]) 366s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 366s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 366s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 366s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 366s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 366s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 366s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 366s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 366s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 366s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 366s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 366s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 366s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 366s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 366s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 366s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 366s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 366s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 366s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 366s ***** assert (class (gprnd (0, 1, 0)), "double") 366s ***** assert (class (gprnd (0, 1, single (0))), "single") 366s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 366s ***** assert (class (gprnd (0, single (1),0)), "single") 366s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 366s ***** assert (class (gprnd (single (0), 1, 0)), "single") 366s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 366s ***** error gprnd () 366s ***** error gprnd (1) 366s ***** error gprnd (1, 2) 366s ***** error ... 366s gprnd (ones (3), ones (2), ones (2)) 366s ***** error ... 366s gprnd (ones (2), ones (3), ones (2)) 366s ***** error ... 366s gprnd (ones (2), ones (2), ones (3)) 366s ***** error gprnd (i, 2, 3) 366s ***** error gprnd (1, i, 3) 366s ***** error gprnd (1, 2, i) 366s ***** error ... 366s gprnd (1, 2, 3, -1) 366s ***** error ... 366s gprnd (1, 2, 3, 1.2) 366s ***** error ... 366s gprnd (1, 2, 3, ones (2)) 366s ***** error ... 366s gprnd (1, 2, 3, [2 -1 2]) 366s ***** error ... 366s gprnd (1, 2, 3, [2 0 2.5]) 366s ***** error ... 366s gprnd (1, 2, 3, 2, -1, 5) 366s ***** error ... 366s gprnd (1, 2, 3, 2, 1.5, 5) 366s ***** error ... 366s gprnd (2, ones (2), 2, 3) 366s ***** error ... 366s gprnd (2, ones (2), 2, [3, 2]) 366s ***** error ... 366s gprnd (2, ones (2), 2, 3, 2) 366s 56 tests, 56 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/raylrnd.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/raylrnd.m 366s ***** assert (size (raylrnd (2)), [1, 1]) 366s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 366s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 366s ***** assert (size (raylrnd (1, 3)), [3, 3]) 366s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 366s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 366s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 366s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 366s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 366s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 366s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 366s ***** assert (raylrnd (0, 1, 1), NaN) 366s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 366s ***** assert (class (raylrnd (2)), "double") 366s ***** assert (class (raylrnd (single (2))), "single") 366s ***** assert (class (raylrnd (single ([2 2]))), "single") 366s ***** error raylrnd () 366s ***** error raylrnd (i) 366s ***** error ... 366s raylrnd (1, -1) 366s ***** error ... 366s raylrnd (1, 1.2) 366s ***** error ... 366s raylrnd (1, ones (2)) 366s ***** error ... 366s raylrnd (1, [2 -1 2]) 366s ***** error ... 366s raylrnd (1, [2 0 2.5]) 366s ***** error ... 366s raylrnd (ones (2), ones (2)) 366s ***** error ... 366s raylrnd (1, 2, -1, 5) 366s ***** error ... 366s raylrnd (1, 2, 1.5, 5) 366s ***** error raylrnd (ones (2,2), 3) 366s ***** error raylrnd (ones (2,2), [3, 2]) 366s ***** error raylrnd (ones (2,2), 2, 3) 366s 29 tests, 29 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/raylpdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/raylpdf.m 366s ***** demo 366s ## Plot various PDFs from the Rayleigh distribution 366s x = 0:0.01:10; 366s y1 = raylpdf (x, 0.5); 366s y2 = raylpdf (x, 1); 366s y3 = raylpdf (x, 2); 366s y4 = raylpdf (x, 3); 366s y5 = raylpdf (x, 4); 366s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 366s grid on 366s ylim ([0, 1.25]) 366s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 366s "σ = 3", "σ = 4"}, "location", "northeast") 366s title ("Rayleigh PDF") 366s xlabel ("values in x") 366s ylabel ("density") 366s ***** test 366s x = 0:0.5:2.5; 366s sigma = 1:6; 366s y = raylpdf (x, sigma); 366s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 366s assert (y, expected_y, 0.001); 366s ***** test 366s x = 0:0.5:2.5; 366s y = raylpdf (x, 0.5); 366s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 366s assert (y, expected_y, 0.001); 366s ***** error raylpdf () 366s ***** error raylpdf (1) 366s ***** error ... 366s raylpdf (ones (3), ones (2)) 366s ***** error ... 366s raylpdf (ones (2), ones (3)) 366s ***** error raylpdf (i, 2) 366s ***** error raylpdf (2, i) 366s 8 tests, 8 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/betacdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/betacdf.m 366s ***** demo 366s ## Plot various CDFs from the Beta distribution 366s x = 0:0.005:1; 366s p1 = betacdf (x, 0.5, 0.5); 366s p2 = betacdf (x, 5, 1); 366s p3 = betacdf (x, 1, 3); 366s p4 = betacdf (x, 2, 2); 366s p5 = betacdf (x, 2, 5); 366s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 366s grid on 366s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 366s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 366s title ("Beta CDF") 366s xlabel ("values in x") 366s ylabel ("probability") 366s ***** shared x, y, x1, x2 366s x = [-1 0 0.5 1 2]; 366s y = [0 0 0.75 1 1]; 366s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 366s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 366s ***** assert (betacdf (x, ones (1, 5), 2), y) 366s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 366s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 366s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 366s x1 = [0.1:0.2:0.9]; 366s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 366s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 366s 1e-14); 366s x2 = [1, 2, 3]; 366s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 366s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 366s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 366s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 366s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 366s ***** error betacdf () 366s ***** error betacdf (1) 366s ***** error betacdf (1, 2) 366s ***** error betacdf (1, 2, 3, 4, 5) 366s ***** error betacdf (1, 2, 3, "tail") 366s ***** error betacdf (1, 2, 3, 4) 366s ***** error ... 366s betacdf (ones (3), ones (2), ones (2)) 366s ***** error ... 366s betacdf (ones (2), ones (3), ones (2)) 366s ***** error ... 366s betacdf (ones (2), ones (2), ones (3)) 366s ***** error betacdf (i, 2, 2) 366s ***** error betacdf (2, i, 2) 366s ***** error betacdf (2, 2, i) 366s 25 tests, 25 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/plpdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/plpdf.m 366s ***** demo 366s ## Plot various PDFs from the Piecewise linear distribution 366s data = 0:0.01:10; 366s x1 = [0, 1, 3, 4, 7, 10]; 366s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 366s x2 = [0, 2, 5, 6, 7, 8]; 366s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 366s y1 = plpdf (data, x1, Fx1); 366s y2 = plpdf (data, x2, Fx2); 366s plot (data, y1, "-b", data, y2, "g") 366s grid on 366s ylim ([0, 0.6]) 366s xlim ([0, 10]) 366s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 366s title ("Piecewise linear CDF") 366s xlabel ("values in data") 366s ylabel ("density") 366s ***** shared x, Fx 366s x = [0, 1, 3, 4, 7, 10]; 366s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 366s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 366s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 366s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 366s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 366s ***** assert (plpdf (8, x, Fx), 0.1, eps); 366s ***** error plpdf () 366s ***** error plpdf (1) 366s ***** error plpdf (1, 2) 366s ***** error ... 366s plpdf (1, [0, 1, 2], [0, 1]) 366s ***** error ... 366s plpdf (1, [0], [1]) 366s ***** error ... 366s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 366s ***** error ... 366s plpdf (1, [0, 1, 2], [0, i, 1]) 366s ***** error ... 366s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 366s ***** error ... 366s plpdf (1, [0, i, 2], [0, 0.5, 1]) 366s ***** error ... 366s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 366s 15 tests, 15 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/nbinpdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/nbinpdf.m 366s ***** demo 366s ## Plot various PDFs from the negative binomial distribution 366s x = 0:40; 366s y1 = nbinpdf (x, 2, 0.15); 366s y2 = nbinpdf (x, 5, 0.2); 366s y3 = nbinpdf (x, 4, 0.4); 366s y4 = nbinpdf (x, 10, 0.3); 366s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 366s grid on 366s xlim ([0, 40]) 366s ylim ([0, 0.12]) 366s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 366s "r = 10, ps = 0.3"}, "location", "northeast") 366s title ("Negative binomial PDF") 366s xlabel ("values in x (number of failures)") 366s ylabel ("density") 366s ***** shared x, y 366s x = [-1 0 1 2 Inf]; 366s y = [0 1/2 1/4 1/8 NaN]; 366s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 366s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 366s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 366s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 366s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 366s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 366s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 366s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 366s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 366s ***** error nbinpdf () 366s ***** error nbinpdf (1) 366s ***** error nbinpdf (1, 2) 366s ***** error ... 366s nbinpdf (ones (3), ones (2), ones (2)) 366s ***** error ... 366s nbinpdf (ones (2), ones (3), ones (2)) 366s ***** error ... 366s nbinpdf (ones (2), ones (2), ones (3)) 366s ***** error nbinpdf (i, 2, 2) 366s ***** error nbinpdf (2, i, 2) 366s ***** error nbinpdf (2, 2, i) 366s 18 tests, 18 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/cauchyinv.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/cauchyinv.m 366s ***** demo 366s ## Plot various iCDFs from the Cauchy distribution 366s p = 0.001:0.001:0.999; 366s x1 = cauchyinv (p, 0, 0.5); 366s x2 = cauchyinv (p, 0, 1); 366s x3 = cauchyinv (p, 0, 2); 366s x4 = cauchyinv (p, -2, 1); 366s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 366s grid on 366s ylim ([-5, 5]) 366s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 366s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 366s title ("Cauchy iCDF") 366s xlabel ("probability") 366s ylabel ("values in x") 366s ***** shared p 366s p = [-1 0 0.5 1 2]; 366s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 366s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 366s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 366s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 366s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 366s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 366s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 366s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 366s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 366s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 366s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 366s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 366s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 366s ***** error cauchyinv () 366s ***** error cauchyinv (1) 366s ***** error ... 366s cauchyinv (1, 2) 366s ***** error cauchyinv (1, 2, 3, 4) 366s ***** error ... 366s cauchyinv (ones (3), ones (2), ones(2)) 366s ***** error ... 366s cauchyinv (ones (2), ones (3), ones(2)) 366s ***** error ... 366s cauchyinv (ones (2), ones (2), ones(3)) 366s ***** error cauchyinv (i, 4, 3) 366s ***** error cauchyinv (1, i, 3) 366s ***** error cauchyinv (1, 4, i) 366s 20 tests, 20 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/bvncdf.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/bvncdf.m 366s ***** demo 366s mu = [1, -1]; 366s sigma = [0.9, 0.4; 0.4, 0.3]; 366s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 366s x = [X1(:), X2(:)]; 366s p = bvncdf (x, mu, sigma); 366s Z = reshape (p, 25, 25); 366s surf (X1, X2, Z); 366s title ("Bivariate Normal Distribution"); 366s ylabel "X1" 366s xlabel "X2" 366s ***** test 366s mu = [1, -1]; 366s sigma = [0.9, 0.4; 0.4, 0.3]; 366s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 366s x = [X1(:), X2(:)]; 366s p = bvncdf (x, mu, sigma); 366s p_out = [0.00011878988774500, 0.00034404112322371, ... 366s 0.00087682502191813, 0.00195221905058185, ... 366s 0.00378235566873474, 0.00638175749734415, ... 366s 0.00943764224329656, 0.01239164888125426, ... 366s 0.01472750274376648, 0.01623228313374828]'; 366s assert (p([1:10]), p_out, 1e-16); 366s ***** test 366s mu = [1, -1]; 366s sigma = [0.9, 0.4; 0.4, 0.3]; 366s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 366s x = [X1(:), X2(:)]; 366s p = bvncdf (x, mu, sigma); 366s p_out = [0.8180695783608276, 0.8854485749482751, ... 366s 0.9308108777385832, 0.9579855743025508, ... 366s 0.9722897881414742, 0.9788150170059926, ... 366s 0.9813597788804785, 0.9821977956568989, ... 366s 0.9824283794464095, 0.9824809345614861]'; 366s assert (p([616:625]), p_out, 3e-16); 366s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 366s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 366s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 366s 5 tests, 5 passed, 0 known failure, 0 skipped 366s [inst/dist_fun/trirnd.m] 366s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/trirnd.m 366s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 366s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 366s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 366s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 366s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 366s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 366s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 366s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 367s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 367s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 367s ***** assert (class (trirnd (1, 1.5, 2)), "double") 367s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 367s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 367s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 367s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 367s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 367s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 367s ***** error trirnd () 367s ***** error trirnd (1) 367s ***** error trirnd (1, 2) 367s ***** error ... 367s trirnd (ones (3), 5 * ones (2), ones (2)) 367s ***** error ... 367s trirnd (ones (2), 5 * ones (3), ones (2)) 367s ***** error ... 367s trirnd (ones (2), 5 * ones (2), ones (3)) 367s ***** error trirnd (i, 5, 3) 367s ***** error trirnd (1, 5+i, 3) 367s ***** error trirnd (1, 5, i) 367s ***** error ... 367s trirnd (1, 5, 3, -1) 367s ***** error ... 367s trirnd (1, 5, 3, 1.2) 367s ***** error ... 367s trirnd (1, 5, 3, ones (2)) 367s ***** error ... 367s trirnd (1, 5, 3, [2 -1 2]) 367s ***** error ... 367s trirnd (1, 5, 3, [2 0 2.5]) 367s ***** error ... 367s trirnd (1, 5, 3, 2, -1, 5) 367s ***** error ... 367s trirnd (1, 5, 3, 2, 1.5, 5) 367s ***** error ... 367s trirnd (2, 5 * ones (2), 2, 3) 367s ***** error ... 367s trirnd (2, 5 * ones (2), 2, [3, 2]) 367s ***** error ... 367s trirnd (2, 5 * ones (2), 2, 3, 2) 367s 36 tests, 36 passed, 0 known failure, 0 skipped 367s [inst/dist_fun/poisspdf.m] 367s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/poisspdf.m 367s ***** demo 367s ## Plot various PDFs from the Poisson distribution 367s x = 0:20; 367s y1 = poisspdf (x, 1); 367s y2 = poisspdf (x, 4); 367s y3 = poisspdf (x, 10); 367s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 367s grid on 367s ylim ([0, 0.4]) 367s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 367s title ("Poisson PDF") 367s xlabel ("values in x (number of occurences)") 367s ylabel ("density") 367s ***** shared x, y 367s x = [-1 0 1 2 Inf]; 367s y = [0, exp(-1)*[1 1 0.5], 0]; 367s ***** assert (poisspdf (x, ones (1,5)), y, eps) 367s ***** assert (poisspdf (x, 1), y, eps) 367s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 367s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 367s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 367s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 367s ***** error poisspdf () 367s ***** error poisspdf (1) 367s ***** error ... 367s poisspdf (ones (3), ones (2)) 367s ***** error ... 367s poisspdf (ones (2), ones (3)) 367s ***** error poisspdf (i, 2) 367s ***** error poisspdf (2, i) 367s 12 tests, 12 passed, 0 known failure, 0 skipped 367s [inst/dist_fun/ricecdf.m] 367s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ricecdf.m 367s ***** demo 367s ## Plot various CDFs from the Rician distribution 367s x = 0:0.01:10; 367s p1 = ricecdf (x, 0, 1); 367s p2 = ricecdf (x, 0.5, 1); 367s p3 = ricecdf (x, 1, 1); 367s p4 = ricecdf (x, 2, 1); 367s p5 = ricecdf (x, 4, 1); 367s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 367s grid on 367s ylim ([0, 1]) 367s xlim ([0, 8]) 367s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 367s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 367s title ("Rician CDF") 367s xlabel ("values in x") 367s ylabel ("probability") 367s ***** demo 367s ## Plot various CDFs from the Rician distribution 367s x = 0:0.01:10; 367s p1 = ricecdf (x, 0, 0.5); 367s p2 = ricecdf (x, 0, 2); 367s p3 = ricecdf (x, 0, 3); 367s p4 = ricecdf (x, 2, 2); 367s p5 = ricecdf (x, 4, 2); 367s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 367s grid on 367s ylim ([0, 1]) 367s xlim ([0, 8]) 367s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 367s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 367s title ("Rician CDF") 367s xlabel ("values in x") 367s ylabel ("probability") 367s ***** test 367s x = 0:0.5:2.5; 367s s = 1:6; 367s p = ricecdf (x, s, 1); 367s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 367s assert (p, expected_p, 0.001); 367s ***** test 367s x = 0:0.5:2.5; 367s sigma = 1:6; 367s p = ricecdf (x, 1, sigma); 367s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 367s assert (p, expected_p, 0.001); 367s ***** test 367s x = 0:0.5:2.5; 367s p = ricecdf (x, 0, 1); 367s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 367s assert (p, expected_p, 0.001); 367s ***** test 367s x = 0:0.5:2.5; 367s p = ricecdf (x, 1, 1); 367s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 367s assert (p, expected_p, 0.001); 367s ***** shared x, p 367s x = [-1, 0, 1, 2, Inf]; 367s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 367s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 367s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 367s ***** error ricecdf () 367s ***** error ricecdf (1) 367s ***** error ricecdf (1, 2) 367s ***** error ricecdf (1, 2, 3, "uper") 367s ***** error ricecdf (1, 2, 3, 4) 367s ***** error ... 367s ricecdf (ones (3), ones (2), ones (2)) 367s ***** error ... 367s ricecdf (ones (2), ones (3), ones (2)) 367s ***** error ... 367s ricecdf (ones (2), ones (2), ones (3)) 367s ***** error ricecdf (i, 2, 3) 367s ***** error ricecdf (2, i, 3) 367s ***** error ricecdf (2, 2, i) 367s 17 tests, 17 passed, 0 known failure, 0 skipped 367s [inst/dist_fun/vmcdf.m] 367s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/vmcdf.m 367s ***** demo 367s ## Plot various CDFs from the von Mises distribution 367s x1 = [-pi:0.1:pi]; 367s p1 = vmcdf (x1, 0, 0.5); 367s p2 = vmcdf (x1, 0, 1); 367s p3 = vmcdf (x1, 0, 2); 367s p4 = vmcdf (x1, 0, 4); 367s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 367s grid on 367s xlim ([-pi, pi]) 367s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 367s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 367s title ("Von Mises CDF") 367s xlabel ("values in x") 367s ylabel ("probability") 367s ***** shared x, p0, p1 367s x = [-pi:pi/2:pi]; 367s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 367s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 367s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 367s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 367s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 367s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 367s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 367s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 367s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 367s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 367s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 367s ***** error vmcdf () 367s ***** error vmcdf (1) 367s ***** error vmcdf (1, 2) 367s ***** error vmcdf (1, 2, 3, "tail") 367s ***** error vmcdf (1, 2, 3, 4) 367s ***** error ... 367s vmcdf (ones (3), ones (2), ones (2)) 367s ***** error ... 367s vmcdf (ones (2), ones (3), ones (2)) 367s ***** error ... 367s vmcdf (ones (2), ones (2), ones (3)) 367s ***** error vmcdf (i, 2, 2) 367s ***** error vmcdf (2, i, 2) 367s ***** error vmcdf (2, 2, i) 367s 20 tests, 20 passed, 0 known failure, 0 skipped 367s [inst/dist_fun/unifpdf.m] 367s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/unifpdf.m 367s ***** demo 367s ## Plot various PDFs from the continuous uniform distribution 367s x = 0:0.001:10; 367s y1 = unifpdf (x, 2, 5); 367s y2 = unifpdf (x, 3, 9); 367s plot (x, y1, "-b", x, y2, "-g") 367s grid on 367s xlim ([0, 10]) 367s ylim ([0, 0.4]) 367s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 367s title ("Continuous uniform PDF") 367s xlabel ("values in x") 367s ylabel ("density") 367s ***** shared x, y 367s x = [-1 0 0.5 1 2] + 1; 367s y = [0 1 1 1 0]; 367s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 367s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 367s ***** assert (unifpdf (x, ones (1,5), 2), y) 367s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 367s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 367s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 367s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 367s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 367s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 367s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 367s ***** error unifpdf () 367s ***** error unifpdf (1) 367s ***** error unifpdf (1, 2) 367s ***** error ... 367s unifpdf (ones (3), ones (2), ones (2)) 367s ***** error ... 367s unifpdf (ones (2), ones (3), ones (2)) 367s ***** error ... 367s unifpdf (ones (2), ones (2), ones (3)) 367s ***** error unifpdf (i, 2, 2) 367s ***** error unifpdf (2, i, 2) 367s ***** error unifpdf (2, 2, i) 367s 19 tests, 19 passed, 0 known failure, 0 skipped 367s [inst/dist_fun/expinv.m] 367s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/expinv.m 367s ***** demo 367s ## Plot various iCDFs from the exponential distribution 367s p = 0.001:0.001:0.999; 367s x1 = expinv (p, 2/3); 367s x2 = expinv (p, 1.0); 367s x3 = expinv (p, 2.0); 367s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 367s grid on 367s ylim ([0, 5]) 367s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 367s title ("Exponential iCDF") 367s xlabel ("probability") 367s ylabel ("values in x") 367s ***** shared p 367s p = [-1 0 0.3934693402873666 1 2]; 367s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 367s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 367s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 367s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 367s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 367s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 367s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 367s ***** error expinv () 367s ***** error expinv (1, 2 ,3 ,4 ,5) 367s ***** error ... 367s expinv (ones (3), ones (2)) 367s ***** error ... 367s expinv (2, 3, [1, 2]) 367s ***** error ... 367s [x, xlo, xup] = expinv (1, 2) 367s ***** error [x, xlo, xup] = ... 367s expinv (1, 2, 3, 0) 367s ***** error [x, xlo, xup] = ... 367s expinv (1, 2, 3, 1.22) 368s ***** error [x, xlo, xup] = ... 368s expinv (1, 2, 3, [0.05, 0.1]) 368s ***** error expinv (i, 2) 368s ***** error expinv (2, i) 368s ***** error ... 368s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 368s 18 tests, 18 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/binopdf.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/binopdf.m 368s ***** demo 368s ## Plot various PDFs from the binomial distribution 368s x = 0:40; 368s y1 = binopdf (x, 20, 0.5); 368s y2 = binopdf (x, 20, 0.7); 368s y3 = binopdf (x, 40, 0.5); 368s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 368s grid on 368s ylim ([0, 0.25]) 368s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 368s "n = 40, ps = 0.5"}, "location", "northeast") 368s title ("Binomial PDF") 368s xlabel ("values in x (number of successes)") 368s ylabel ("density") 368s ***** shared x, y 368s x = [-1 0 1 2 3]; 368s y = [0 1/4 1/2 1/4 0]; 368s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 368s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 368s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 368s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 368s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 368s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 368s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 368s ***** assert (binopdf (1, 1, 1), 1) 368s ***** assert (binopdf (0, 3, 0), 1) 368s ***** assert (binopdf (2, 2, 1), 1) 368s ***** assert (binopdf (1, 2, 1), 0) 368s ***** assert (binopdf (0, 1.1, 0), NaN) 368s ***** assert (binopdf (1, 2, -1), NaN) 368s ***** assert (binopdf (1, 2, 1.5), NaN) 368s ***** assert (binopdf ([], 1, 1), []) 368s ***** assert (binopdf (1, [], 1), []) 368s ***** assert (binopdf (1, 1, []), []) 368s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 368s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 368s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 368s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 368s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 368s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 368s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 368s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 368s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 368s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 368s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 368s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 368s ***** error binopdf () 368s ***** error binopdf (1) 368s ***** error binopdf (1, 2) 368s ***** error binopdf (1, 2, 3, 4) 368s ***** error ... 368s binopdf (ones (3), ones (2), ones (2)) 368s ***** error ... 368s binopdf (ones (2), ones (3), ones (2)) 368s ***** error ... 368s binopdf (ones (2), ones (2), ones (3)) 368s ***** error binopdf (i, 2, 2) 368s ***** error binopdf (2, i, 2) 368s ***** error binopdf (2, 2, i) 368s 39 tests, 39 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/mvtcdfqmc.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvtcdfqmc.m 368s ***** error mvtcdfqmc (1, 2, 3); 368s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 368s 2 tests, 2 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/gumbelpdf.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gumbelpdf.m 368s ***** demo 368s ## Plot various PDFs from the Extreme value distribution 368s x = -5:0.001:20; 368s y1 = gumbelpdf (x, 0.5, 2); 368s y2 = gumbelpdf (x, 1.0, 2); 368s y3 = gumbelpdf (x, 1.5, 3); 368s y4 = gumbelpdf (x, 3.0, 4); 368s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 368s grid on 368s ylim ([0, 0.2]) 368s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 368s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 368s title ("Extreme value PDF") 368s xlabel ("values in x") 368s ylabel ("density") 368s ***** shared x, y0, y1 368s x = [-5, 0, 1, 2, 3]; 368s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 368s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 368s ***** assert (gumbelpdf (x), y0, 1e-4) 368s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 368s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 368s ***** error gumbelpdf () 368s ***** error ... 368s gumbelpdf (ones (3), ones (2), ones (2)) 368s ***** error gumbelpdf (i, 2, 2) 368s ***** error gumbelpdf (2, i, 2) 368s ***** error gumbelpdf (2, 2, i) 368s 8 tests, 8 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/mvtrnd.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/mvtrnd.m 368s ***** test 368s rho = [1, 0.5; 0.5, 1]; 368s df = 3; 368s n = 10; 368s r = mvtrnd (rho, df, n); 368s assert (size (r), [10, 2]); 368s ***** test 368s rho = [1, 0.5; 0.5, 1]; 368s df = [2; 3]; 368s n = 2; 368s r = mvtrnd (rho, df, 2); 368s assert (size (r), [2, 2]); 368s 2 tests, 2 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/ncfinv.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/ncfinv.m 368s ***** demo 368s ## Plot various iCDFs from the noncentral F distribution 368s p = 0.001:0.001:0.999; 368s x1 = ncfinv (p, 2, 5, 1); 368s x2 = ncfinv (p, 2, 5, 2); 368s x3 = ncfinv (p, 5, 10, 1); 368s x4 = ncfinv (p, 10, 20, 10); 368s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 368s grid on 368s ylim ([0, 5]) 368s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 368s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 368s "location", "northwest") 368s title ("Noncentral F iCDF") 368s xlabel ("probability") 368s ylabel ("values in x") 368s ***** demo 368s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 368s ## same number of numerator and denominator degrees of freedom (5, 20) 368s 368s p = 0.001:0.001:0.999; 368s x1 = ncfinv (p, 5, 20, 10); 368s x2 = finv (p, 5, 20); 368s plot (p, x1, "-", p, x2, "-"); 368s grid on 368s ylim ([0, 10]) 368s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 368s title ("Noncentral F vs F quantile functions") 368s xlabel ("probability") 368s ylabel ("values in x") 368s ***** test 368s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 368s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 368s ***** test 368s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 368s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 368s ***** test 368s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 368s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 368s ***** test 368s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 368s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 368s ***** test 368s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 368s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 368s ***** test 368s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 368s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 368s ***** test 368s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 368s ***** error ncfinv () 368s ***** error ncfinv (1) 368s ***** error ncfinv (1, 2) 368s ***** error ncfinv (1, 2, 3) 368s ***** error ... 368s ncfinv (ones (3), ones (2), ones (2), ones (2)) 368s ***** error ... 368s ncfinv (ones (2), ones (3), ones (2), ones (2)) 368s ***** error ... 368s ncfinv (ones (2), ones (2), ones (3), ones (2)) 368s ***** error ... 368s ncfinv (ones (2), ones (2), ones (2), ones (3)) 368s ***** error ncfinv (i, 2, 2, 2) 368s ***** error ncfinv (2, i, 2, 2) 368s ***** error ncfinv (2, 2, i, 2) 368s ***** error ncfinv (2, 2, 2, i) 368s 19 tests, 19 passed, 0 known failure, 0 skipped 368s [inst/dist_fun/gppdf.m] 368s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/gppdf.m 368s ***** demo 368s ## Plot various PDFs from the generalized Pareto distribution 368s x = 0:0.001:5; 368s y1 = gppdf (x, 1, 1, 0); 368s y2 = gppdf (x, 5, 1, 0); 368s y3 = gppdf (x, 20, 1, 0); 368s y4 = gppdf (x, 1, 2, 0); 368s y5 = gppdf (x, 5, 2, 0); 368s y6 = gppdf (x, 20, 2, 0); 368s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 368s x, y4, "-c", x, y5, "-m", x, y6, "-k") 368s grid on 368s xlim ([0, 5]) 368s ylim ([0, 1]) 368s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 368s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 368s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 368s "location", "northeast") 368s title ("Generalized Pareto PDF") 368s xlabel ("values in x") 368s ylabel ("density") 368s ***** shared x, y1, y2, y3 368s x = [-Inf, -1, 0, 1/2, 1, Inf]; 368s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 368s y2 = [0, 0, 1, 4/9, 1/4, 0]; 368s y3 = [0, 0, 1, 1, 1, 0]; 368s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 368s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 368s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 368s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 368s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 368s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 368s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 368s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 368s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 368s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 368s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 368s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 368s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 368s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 368s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 368s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 370s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 370s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 370s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 370s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 370s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 370s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 370s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 370s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 370s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 370s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 370s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 370s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 370s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 370s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 370s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 370s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 370s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 370s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 370s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 370s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 370s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 370s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 370s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 370s ***** error gpcdf () 370s ***** error gpcdf (1) 370s ***** error gpcdf (1, 2) 370s ***** error gpcdf (1, 2, 3) 370s ***** error ... 370s gpcdf (ones (3), ones (2), ones(2), ones(2)) 370s ***** error ... 370s gpcdf (ones (2), ones (3), ones(2), ones(2)) 370s ***** error ... 370s gpcdf (ones (2), ones (2), ones(3), ones(2)) 370s ***** error ... 370s gpcdf (ones (2), ones (2), ones(2), ones(3)) 370s ***** error gpcdf (i, 2, 3, 4) 370s ***** error gpcdf (1, i, 3, 4) 370s ***** error gpcdf (1, 2, i, 4) 370s ***** error gpcdf (1, 2, 3, i) 370s 51 tests, 51 passed, 0 known failure, 0 skipped 370s [inst/dist_fun/geoinv.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/geoinv.m 370s ***** demo 370s ## Plot various iCDFs from the geometric distribution 370s p = 0.001:0.001:0.999; 370s x1 = geoinv (p, 0.2); 370s x2 = geoinv (p, 0.5); 370s x3 = geoinv (p, 0.7); 370s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 370s grid on 370s ylim ([0, 10]) 370s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 370s title ("Geometric iCDF") 370s xlabel ("probability") 370s ylabel ("values in x (number of failures)") 370s ***** shared p 370s p = [-1 0 0.75 1 2]; 370s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 370s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 370s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 370s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 370s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 370s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 370s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 370s ***** error geoinv () 370s ***** error geoinv (1) 370s ***** error ... 370s geoinv (ones (3), ones (2)) 370s ***** error ... 370s geoinv (ones (2), ones (3)) 370s ***** error ... 370s geoinv (i, 2) 370s ***** error ... 370s geoinv (2, i) 370s 13 tests, 13 passed, 0 known failure, 0 skipped 370s [inst/dist_fun/logninv.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/logninv.m 370s ***** demo 370s ## Plot various iCDFs from the log-normal distribution 370s p = 0.001:0.001:0.999; 370s x1 = logninv (p, 0, 1); 370s x2 = logninv (p, 0, 0.5); 370s x3 = logninv (p, 0, 0.25); 370s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 370s grid on 370s ylim ([0, 3]) 370s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 370s "location", "northwest") 370s title ("Log-normal iCDF") 370s xlabel ("probability") 370s ylabel ("values in x") 370s ***** shared p 370s p = [-1 0 0.5 1 2]; 370s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 370s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 370s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN], 2*eps) 370s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 370s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 370s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 370s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN], 2*eps) 370s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 370s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 370s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 370s ***** error logninv () 370s ***** error logninv (1,2,3,4) 370s ***** error logninv (ones (3), ones (2), ones (2)) 370s ***** error logninv (ones (2), ones (3), ones (2)) 370s ***** error logninv (ones (2), ones (2), ones (3)) 370s ***** error logninv (i, 2, 2) 370s ***** error logninv (2, i, 2) 370s ***** error logninv (2, 2, i) 370s 18 tests, 18 passed, 0 known failure, 0 skipped 370s [inst/dist_fun/betainv.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/betainv.m 370s ***** demo 370s ## Plot various iCDFs from the Beta distribution 370s p = 0.001:0.001:0.999; 370s x1 = betainv (p, 0.5, 0.5); 370s x2 = betainv (p, 5, 1); 370s x3 = betainv (p, 1, 3); 370s x4 = betainv (p, 2, 2); 370s x5 = betainv (p, 2, 5); 370s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 370s grid on 370s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 370s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 370s title ("Beta iCDF") 370s xlabel ("probability") 370s ylabel ("values in x") 370s ***** shared p 370s p = [-1 0 0.75 1 2]; 370s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 370s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 370s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 370s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 370s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 370s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 370s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 370s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 370s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 370s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 370s ***** error betainv () 370s ***** error betainv (1) 370s ***** error betainv (1,2) 370s ***** error betainv (1,2,3,4) 370s ***** error ... 370s betainv (ones (3), ones (2), ones (2)) 370s ***** error ... 370s betainv (ones (2), ones (3), ones (2)) 370s ***** error ... 370s betainv (ones (2), ones (2), ones (3)) 370s ***** error betainv (i, 2, 2) 370s ***** error betainv (2, i, 2) 370s ***** error betainv (2, 2, i) 370s 20 tests, 20 passed, 0 known failure, 0 skipped 370s [inst/dist_fun/cauchyrnd.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/cauchyrnd.m 370s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 370s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 370s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 370s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 370s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 370s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 370s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 370s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 370s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 370s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 370s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 370s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 370s ***** assert (class (cauchyrnd (1, 1)), "double") 370s ***** assert (class (cauchyrnd (1, single (1))), "single") 370s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 370s ***** assert (class (cauchyrnd (single (1), 1)), "single") 370s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 370s ***** error cauchyrnd () 370s ***** error cauchyrnd (1) 370s ***** error ... 370s cauchyrnd (ones (3), ones (2)) 370s ***** error ... 370s cauchyrnd (ones (2), ones (3)) 370s ***** error cauchyrnd (i, 2, 3) 370s ***** error cauchyrnd (1, i, 3) 370s ***** error ... 370s cauchyrnd (1, 2, -1) 370s ***** error ... 370s cauchyrnd (1, 2, 1.2) 370s ***** error ... 370s cauchyrnd (1, 2, ones (2)) 370s ***** error ... 370s cauchyrnd (1, 2, [2 -1 2]) 370s ***** error ... 370s cauchyrnd (1, 2, [2 0 2.5]) 370s ***** error ... 370s cauchyrnd (1, 2, 2, -1, 5) 370s ***** error ... 370s cauchyrnd (1, 2, 2, 1.5, 5) 370s ***** error ... 370s cauchyrnd (2, ones (2), 3) 370s ***** error ... 370s cauchyrnd (2, ones (2), [3, 2]) 370s ***** error ... 370s cauchyrnd (2, ones (2), 3, 2) 370s 33 tests, 33 passed, 0 known failure, 0 skipped 370s [inst/dist_fun/vminv.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fun/vminv.m 370s ***** demo 370s ## Plot various iCDFs from the von Mises distribution 370s 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]; 370s x1 = vminv (p1, 0, 0.5); 370s x2 = vminv (p1, 0, 1); 370s x3 = vminv (p1, 0, 2); 370s x4 = vminv (p1, 0, 4); 370s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 370s grid on 370s ylim ([-pi, pi]) 370s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 370s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 370s title ("Von Mises iCDF") 370s xlabel ("probability") 370s ylabel ("values in x") 370s ***** shared x, p0, p1 370s x = [-pi:pi/2:pi]; 370s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 370s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 370s ***** assert (vminv (p0, 0, 1), x, 5e-5) 370s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 370s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 370s ***** error vminv () 370s ***** error vminv (1) 370s ***** error vminv (1, 2) 370s ***** error ... 370s vminv (ones (3), ones (2), ones (2)) 370s ***** error ... 370s vminv (ones (2), ones (3), ones (2)) 370s ***** error ... 370s vminv (ones (2), ones (2), ones (3)) 370s ***** error vminv (i, 2, 2) 370s ***** error vminv (2, i, 2) 370s ***** error vminv (2, 2, i) 370s 12 tests, 12 passed, 0 known failure, 0 skipped 370s [inst/canoncorr.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/canoncorr.m 370s ***** shared X,Y,A,B,r,U,V,k 370s k = 10; 370s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 370s [A,B,r,U,V,stats] = canoncorr (X,Y); 370s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 370s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 370s ***** assert (r, [0.99590 0.26754], 1E-5); 370s ***** assert (U, center(X) * A, 10*eps); 370s ***** assert (V, center(Y) * B, 10*eps); 370s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 370s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 370s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 370s ***** assert (r, ones(1, 5), 10*eps); 370s 8 tests, 8 passed, 0 known failure, 0 skipped 370s [inst/princomp.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/princomp.m 370s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 370s ***** test 370s x=[7 4 3 370s 4 1 8 370s 6 3 5 370s 8 6 1 370s 8 5 7 370s 7 2 9 370s 5 3 3 370s 9 5 8 370s 7 4 5 370s 8 2 2]; 370s R = corrcoef (x); 370s [V, lambda] = eig (R); 370s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 370s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 370s ## contribution of first 2 PCs to each original variable 370s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 370s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 370s F = zscore(x)*B; 370s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 370s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 370s ***** test 370s x=[1,2,3;2,1,3]'; 370s [COEFF,SCORE,latent,tsquare] = princomp(x); 370s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 370s m(:,1) = m(:,1)*sign(COEFF(1,1)); 370s m(:,2) = m(:,2)*sign(COEFF(1,2)); 370s ***** assert(COEFF,m(1:2,:),10*eps); 370s ***** assert(SCORE,-m,10*eps); 370s ***** assert(latent,[1.5;.5],10*eps); 370s ***** assert(tsquare,[4;4;4]/3,10*eps); 370s ***** test 370s x=x'; 370s [COEFF,SCORE,latent,tsquare] = princomp(x); 370s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 370s m(:,1) = m(:,1)*sign(COEFF(1,1)); 370s m(:,2) = m(:,2)*sign(COEFF(1,2)); 370s m(:,3) = m(:,3)*sign(COEFF(3,3)); 370s ***** assert(COEFF,m,10*eps); 370s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 370s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 370s ***** assert(latent,[1;0;0],10*eps); 370s ***** assert(tsquare,[0.5;0.5],10*eps) 370s ***** test 370s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 370s ***** assert(COEFF,m(:, 1),10*eps); 370s ***** assert(SCORE,-m(1:2,1),10*eps); 370s ***** assert(latent,[1],10*eps); 370s ***** assert(tsquare,[0.5;0.5],10*eps) 370s 19 tests, 19 passed, 0 known failure, 0 skipped 370s [inst/bartlett_test.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/bartlett_test.m 370s ***** error bartlett_test () 370s ***** error ... 370s bartlett_test (1, 2, 3, 4); 370s ***** error bartlett_test (randn (50, 2), 0); 370s ***** error ... 370s bartlett_test (randn (50, 2), [1, 2, 3]); 370s ***** error ... 370s bartlett_test (randn (50, 1), ones (55, 1)); 370s ***** error ... 370s bartlett_test (randn (50, 1), ones (50, 2)); 370s ***** error ... 370s bartlett_test (randn (50, 2), [], 1.2); 370s ***** error ... 370s bartlett_test (randn (50, 2), [], "alpha"); 370s ***** error ... 370s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 370s ***** error ... 370s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 370s ***** warning ... 370s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 370s ***** test 370s load examgrades 370s [h, pval, chisq, df] = bartlett_test (grades); 370s assert (h, 1); 370s assert (pval, 7.908647337018238e-08, 1e-14); 370s assert (chisq, 38.73324, 1e-5); 370s assert (df, 4); 370s ***** test 370s load examgrades 370s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 370s assert (h, 1); 370s assert (pval, 0.01172, 1e-5); 370s assert (chisq, 8.89274, 1e-5); 370s assert (df, 2); 370s ***** test 370s load examgrades 370s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 370s assert (h, 0); 370s assert (pval, 0.88118, 1e-5); 370s assert (chisq, 0.02234, 1e-5); 370s assert (df, 1); 370s ***** test 370s load examgrades 370s grades = [grades; nan(10, 5)]; 370s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 370s assert (h, 0); 370s assert (pval, 0.88118, 1e-5); 370s assert (chisq, 0.02234, 1e-5); 370s assert (df, 1); 370s ***** test 370s load examgrades 370s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 370s assert (h, 0); 370s assert (pval, 0.01791, 1e-5); 370s assert (chisq, 5.60486, 1e-5); 370s assert (df, 1); 370s 16 tests, 16 passed, 0 known failure, 0 skipped 370s [inst/ismissing.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ismissing.m 370s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 370s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 370s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 370s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 370s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 370s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 370s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 370s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 370s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 370s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 370s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 370s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 370s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 370s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 370s ***** assert (ismissing (double (NaN)), true) 370s ***** assert (ismissing (single (NaN)), true) 370s ***** assert (ismissing (' '), true) 370s ***** assert (ismissing ({''}), true) 370s ***** assert (ismissing ({' '}), false) 370s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 370s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 370s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 370s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 370s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 370s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 370s ***** assert (ismissing ({'123', '', 123}), [false false false]) 370s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 370s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 370s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 370s ***** assert (ismissing ({1, 2, 3}), [false false false]) 370s ***** assert (ismissing ([struct struct struct]), [false false false]) 370s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 370s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 370s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 370s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 370s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 370s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 370s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 370s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 370s ***** assert (ismissing ([]), logical([])) 370s ***** assert (ismissing (''), logical([])) 370s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 370s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 370s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 370s ***** error ismissing () 370s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 370s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 370s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 370s ***** error ismissing (struct, 1) 370s 49 tests, 49 passed, 0 known failure, 0 skipped 370s [inst/pdist2.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/pdist2.m 370s ***** shared x, y, xx 370s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 370s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 370s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 370s ***** test 370s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 370s assert (pdist2 (x, y), d); 370s ***** test 370s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 370s 3.4641, 2.2361, 3.3166, 5.4772]; 370s i = [3, 1, 1, 1; 2, 3, 3, 2]; 370s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 370s 3.4641, 2.2361, 3.3166, 5.4772]; 370s i = [1, 2, 2, 3;2, 1, 1, 2]; 370s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s yy = [1 2 3;5 6 7;9 5 1]; 370s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 370s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 370s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 370s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s yy = [1 2 3;5 6 7;9 5 1]; 370s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 370s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 370s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s yy = [1 2 3;5 6 7;9 5 1]; 370s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 370s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 370s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 370s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 370s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 370s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 370s ***** test 370s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 370s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 370s i = [2, 2, 2; 3, 4, 4]; 370s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 370s i = [1, 1, 3; 4, 3, 1]; 370s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 370s assert ({D, I}, {d, i}, 1e-4); 370s ***** test 370s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 370s assert (pdist2 (x, y, "cityblock"), d); 370s ***** test 370s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 370s assert (pdist2 (x, y, "chebychev"), d); 370s ***** test 370s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 370s assert (pdist2 (x, y, "cosine"), d, 1e-4); 370s ***** test 370s yy = [1 2 3;5 6 7;9 5 1]; 370s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 370s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 370s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 370s assert ({D, I}, {d, i}, eps); 370s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 370s assert ({D, I}, {d, i}, eps); 370s ***** test 370s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 370s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 370s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 370s assert ({D, I}, {d, i}, eps); 370s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 370s assert ({D, I}, {d, i}, eps); 370s ***** test 370s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 370s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 370s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 370s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 370s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 370s assert ({D, I}, {d, i}); 370s ***** warning ... 370s pdist2 (xx, xx, "mahalanobis"); 370s ***** error pdist2 (1) 370s ***** error ... 370s pdist2 (ones (4, 5), ones (4)) 370s ***** error ... 370s pdist2 (ones (4, 2, 3), ones (3, 2)) 370s ***** error ... 370s pdist2 (ones (3), ones (3), "euclidean", "Largest") 370s ***** error ... 370s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 370s ***** error ... 370s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 370s ***** error ... 370s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 370s ***** error ... 370s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 370s ***** error ... 370s pdist2 (ones (3), ones (3), "seuclidean", 3) 370s ***** error ... 370s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 370s ***** error ... 370s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 370s ***** error ... 370s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 370s ***** error ... 370s pdist2 (ones (3), eye (3), "minkowski", 0) 370s ***** error ... 370s pdist2 (ones (3), eye (3), "minkowski", -5) 370s ***** error ... 370s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 370s ***** error ... 370s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 370s ***** error ... 370s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 370s 33 tests, 33 passed, 0 known failure, 0 skipped 370s [inst/pcacov.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/pcacov.m 370s ***** demo 370s x = [ 7 26 6 60; 370s 1 29 15 52; 370s 11 56 8 20; 370s 11 31 8 47; 370s 7 52 6 33; 370s 11 55 9 22; 370s 3 71 17 6; 370s 1 31 22 44; 370s 2 54 18 22; 370s 21 47 4 26; 370s 1 40 23 34; 370s 11 66 9 12; 370s 10 68 8 12 370s ]; 370s Kxx = cov (x); 370s [coeff, latent, explained] = pcacov (Kxx) 370s ***** test 370s load hald 370s Kxx = cov (ingredients); 370s [coeff,latent,explained] = pcacov(Kxx); 370s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 370s -0.6785, -0.0200, -0.5440, 0.4933; ... 370s 0.0290, 0.7553, 0.4036, 0.5156; ... 370s 0.7309, -0.1085, -0.4684, 0.4844]; 370s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 370s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 370s assert (coeff, c_out, 1e-4); 370s assert (latent, l_out, 1e-4); 370s assert (explained, e_out, 1e-4); 370s ***** error pcacov (ones (2,3)) 370s ***** error pcacov (ones (3,3,3)) 370s 3 tests, 3 passed, 0 known failure, 0 skipped 370s [inst/plsregress.m] 370s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/plsregress.m 370s ***** demo 370s ## Perform Partial Least-Squares Regression 370s 370s ## Load the spectra data set and use the near infrared (NIR) spectral 370s ## intensities (NIR) as the predictor and the corresponding octave 370s ## ratings (octave) as the response. 370s load spectra 370s 370s ## Perform PLS regression with 10 components 370s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 370s 370s ## Plot the percentage of explained variance in the response variable 370s ## (PCTVAR) as a function of the number of components. 370s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 370s xlim ([1, 10]); 370s xlabel ("Number of PLS components"); 370s ylabel ("Percentage of Explained Variance in octane"); 370s title ("Explained Variance per PLS components"); 370s 370s ## Compute the fitted response and display the residuals. 370s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 370s residuals = octane - octane_fitted; 370s figure 370s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 370s xlabel ("Observations"); 370s ylabel ("Residuals"); 370s title ("Residuals in octane's fitted response"); 370s ***** demo 370s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 370s 370s ## Load the spectra data set and use the near infrared (NIR) spectral 370s ## intensities (NIR) as the predictor and the corresponding octave 370s ## ratings (octave) as the response. Variables with a VIP score greater than 370s ## 1 are considered important for the projection of the PLS regression model. 370s load spectra 370s 370s ## Perform PLS regression with 10 components 370s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 370s plsregress (NIR, octane, 10); 370s 370s ## Calculate the normalized PLS weights 370s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 370s 370s ## Calculate the VIP scores for 10 components 370s nobs = size (xload, 1); 370s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 370s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 370s 370s ## Find variables with a VIP score greater than or equal to 1 370s VIPidx = find (VIPscore >= 1); 370s 370s ## Plot the VIP scores 370s scatter (1:length (VIPscore), VIPscore, "xb"); 370s hold on 370s scatter (VIPidx, VIPscore (VIPidx), "xr"); 370s plot ([1, length(VIPscore)], [1, 1], "--k"); 370s hold off 370s axis ("tight"); 370s xlabel ("Predictor Variables"); 370s ylabel ("VIP scores"); 370s title ("VIP scores for each predictor variable with 10 components"); 370s ***** test 370s load spectra 370s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 370s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 370s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 370s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 370s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 370s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 370s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 370s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 370s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 370s assert (xload(1,:), xload1_out, 1e-4); 370s assert (yload, yload_out, 1e-4); 370s assert (xscore(1,:), xscore1_out, 1e-4); 370s assert (yscore(1,:), yscore1_out, 1e-4); 370s ***** test 370s load spectra 370s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 370s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 370s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 370s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 370s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 370s assert (xload(1,:), xload1_out, 1e-4); 370s assert (yload, yload_out, 1e-4); 370s assert (xscore(1,:), xscore1_out, 1e-4); 370s assert (yscore(1,:), yscore1_out, 1e-4); 370s ***** error 370s plsregress (1) 370s ***** error plsregress (1, "asd") 370s ***** error plsregress (1, {1,2,3}) 370s ***** error plsregress ("asd", 1) 370s ***** error plsregress ({1,2,3}, 1) 370s ***** error ... 370s plsregress (ones (20,3), ones (15,1)) 370s ***** error ... 370s plsregress (ones (20,3), ones (20,1), 0) 370s ***** error ... 370s plsregress (ones (20,3), ones (20,1), -5) 370s ***** error ... 370s plsregress (ones (20,3), ones (20,1), 3.2) 370s ***** error ... 370s plsregress (ones (20,3), ones (20,1), [2, 3]) 370s ***** error ... 370s plsregress (ones (20,3), ones (20,1), 4) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 371s ***** error ... 371s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 371s ***** error plsregress (1, 2) 371s 24 tests, 24 passed, 0 known failure, 0 skipped 371s [inst/harmmean.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/harmmean.m 371s ***** test 371s x = [0:10]; 371s y = [x;x+5;x+10]; 371s assert (harmmean (x), 0); 371s m = [0 8.907635160795225 14.30854471766802]; 371s assert (harmmean (y, 2), m', 4e-14); 371s assert (harmmean (y, "all"), 0); 371s y(2,4) = NaN; 371s m(2) = 9.009855936313949; 371s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 371s assert (harmmean (y', "omitnan"), m, 4e-14); 371s z = y + 20; 371s assert (harmmean (z, "all"), NaN); 371s assert (harmmean (z, "all", "includenan"), NaN); 371s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 371s m = [24.59488458841874 NaN 34.71244385944397]; 371s assert (harmmean (z'), m, 4e-14); 371s assert (harmmean (z', "includenan"), m, 4e-14); 371s m(2) = 29.84104075528277; 371s assert (harmmean (z', "omitnan"), m, 4e-14); 371s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 371s ***** test 371s x = repmat ([1:20;6:25], [5 2 6 3]); 371s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 371s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 371s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 371s assert (size (harmmean (x, [1 4 3])), [1 40]); 371s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 371s ***** test 371s x = repmat ([1:20;6:25], [5 2 6 3]); 371s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 371s assert (harmmean (x, [3 2]), m, 4e-14); 371s x(2,5,6,3) = NaN; 371s m(2,3) = NaN; 371s assert (harmmean (x, [3 2]), m, 4e-14); 371s m(2,3) = 13.06617961315406; 371s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 371s ***** error harmmean ("char") 371s ***** error harmmean ([1 -1 3]) 371s ***** error ... 371s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 371s ***** error ... 371s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 371s ***** error ... 371s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 371s 8 tests, 8 passed, 0 known failure, 0 skipped 371s [inst/grp2idx.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/grp2idx.m 371s ***** test 371s in = [true false false true]; 371s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 371s assert (nthargout (1:3, @grp2idx, in), out) 371s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 371s ***** test 371s assert (nthargout (1:3, @grp2idx, [false, true]), 371s {[1; 2] {"0"; "1"} [false; true]}); 371s assert (nthargout (1:3, @grp2idx, [true, false]), 371s {[1; 2] {"1"; "0"} [true; false]}); 371s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 371s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 371s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 371s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 371s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 371s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 371s [1; -3; -2; 2; -1; 3]}); 371s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 371s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 371s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 371s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 371s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 371s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 371s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 371s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 371s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 371s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 371s 10 tests, 10 passed, 0 known failure, 0 skipped 371s [inst/fitrgam.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitrgam.m 371s ***** demo 371s # Train a RegressionGAM Model for synthetic values 371s 371s f1 = @(x) cos (3 *x); 371s f2 = @(x) x .^ 3; 371s 371s # generate x1 and x2 for f1 and f2 371s x1 = 2 * rand (50, 1) - 1; 371s x2 = 2 * rand (50, 1) - 1; 371s 371s # calculate y 371s y = f1(x1) + f2(x2); 371s 371s # add noise 371s y = y + y .* 0.2 .* rand (50,1); 371s X = [x1, x2]; 371s 371s # create an object 371s a = fitrgam (X, y, "tol", 1e-3) 371s ***** test 371s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 371s y = [1; 2; 3; 4]; 371s a = fitrgam (x, y); 371s assert ({a.X, a.Y}, {x, y}) 371s assert ({a.BaseModel.Intercept}, {2.5000}) 371s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 371s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 371s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 371s assert ({a.Formula}, {[]}) 371s ***** test 371s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 371s y = [1; 2; 3; 4]; 371s pnames = {"A", "B", "C", "D"}; 371s formula = "Y ~ A + B + C + D + A:C"; 371s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 371s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 371s assert ({a.IntMatrix}, {intMat}) 371s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 371s assert ({a.Formula}, {formula}) 371s ***** error fitrgam () 371s ***** error fitrgam (ones(10,2)) 371s ***** error 371s fitrgam (ones (4,2), ones (4, 1), "K") 371s ***** error 371s fitrgam (ones (4,2), ones (3, 1)) 371s ***** error 371s fitrgam (ones (4,2), ones (3, 1), "K", 2) 371s 7 tests, 7 passed, 0 known failure, 0 skipped 371s [inst/crossval.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/crossval.m 371s ***** demo 371s ## Determine the optimal number of clusters using cross-validation 371s 371s ## Declare a function to compute the sum of squared distances 371s ## between data points and a varying number of clusters. 371s function D = dist2clusters (X, Y, k) 371s [Z, Zmu, Zstd] = zscore (X); 371s [~, C] = kmeans (Z, k); 371s ZY = (Y - Zmu) ./ Zstd; 371s d = pdist2 (C, ZY, 'euclidean', 'Smallest', 1); 371s D = sum (d .^ 2); 371s endfunction 371s 371s load fisheriris 371s for k = 1:8 371s fcn = @(X, Y) dist2clusters (X, Y, k); 371s distances = crossval (fcn, meas); 371s cvdist(k) = sum (distances); 371s endfor 371s 371s plot(cvdist) 371s xlabel('Number of Clusters') 371s ylabel('CV Sum of Squared Distances') 371s xlim ([1,8]); 371s ***** test 371s function yfit = regf (Xtrain, ytrain, Xtest) 371s b = regress (ytrain, Xtrain); 371s yfit = Xtest * b; 371s endfunction 371s 371s load carsmall 371s data = [Acceleration Horsepower Weight MPG]; 371s data(any(isnan(data),2),:) = []; 371s 371s y = data(:,4); 371s X = [ones(length(y),1) data(:,1:3)]; 371s rand ("seed", 3); 371s cvMSE = crossval('mse',X,y,'Predfun',@regf); 371s assert (cvMSE, 18.720, 1e-3); 371s ***** error ... 371s crossval ('fe', rand (10, 1), rand (10, 1), 1); 371s ***** error ... 371s crossval ('mse', rand (10, 1), rand (10, 1), 1); 371s ***** error ... 371s crossval ('mse', rand (10, 1), 'Predfun', @(x,y) x + y); 371s ***** error ... 371s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y) sum (x + y)); 371s ***** error ... 371s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y,z) sum (x + y)); 371s ***** error crossval (@(x) x); 371s ***** error ... 371s crossval (@(x) x, rand (10, 3), rand (10, 1)); 371s ***** error ... 371s crossval (@(x,y) [x, y], rand (10, 3), rand (10, 1)); 371s ***** error crossval ({1}, 1, 1); 371s ***** error ... 371s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Holdout', 0.1, 'Leaveout', true) 371s ***** error ... 371s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Partition', cvpartition (10, 'Leaveout'), 'Stratify', true) 371s 12 tests, 12 passed, 0 known failure, 0 skipped 371s [inst/cl_multinom.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cl_multinom.m 371s ***** demo 371s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 371s ***** error cl_multinom (); 371s ***** error cl_multinom (1, 2, 3, 4, 5); 371s ***** error ... 371s cl_multinom (1, 2, 3, 4); 371s ***** error ... 371s cl_multinom (1, 2, 3, "some string"); 371s 4 tests, 4 passed, 0 known failure, 0 skipped 371s [inst/glmfit.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/glmfit.m 371s ***** demo 371s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 371s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 371s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 371s b = glmfit (x, [y n], "binomial", "Link", "probit"); 371s yfit = glmval (b, x, "probit", "Size", n); 371s plot (x, y./n, 'o', x, yfit ./ n, '-') 371s ***** demo 371s load fisheriris 371s X = meas (51:end, :); 371s y = strcmp ("versicolor", species(51:end)); 371s b = glmfit (X, y, "binomial", "link", "logit") 371s ***** test 371s load fisheriris; 371s X = meas(51:end,:); 371s y = strcmp ("versicolor", species(51:end)); 371s b = glmfit (X, y, "binomial", "link", "logit"); 371s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 371s ***** test 371s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 371s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 371s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 371s b_matlab = [-0.7631; 0.1113]; 371s dev_matlab = 0.0111; 371s assert (Bnew, b_matlab, 0.001); 371s assert (dev, dev_matlab, 0.001); 371s ***** test 371s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 371s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 371s p_input = 1; 371s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 371s b_matlab = [0.3813; 0.0950]; 371s dev_matlab = 0.0051; 371s assert (Bnew, b_matlab, 0.001); 371s assert (dev, dev_matlab, 0.001); 371s ***** error glmfit () 371s ***** error glmfit (1) 371s ***** error glmfit (1, 2) 371s ***** error ... 371s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 371s ***** error ... 371s glmfit ('abc', rand (6, 1), 'poisson') 371s ***** error ... 371s glmfit ([], rand (6, 1), 'poisson') 371s ***** error ... 371s glmfit (rand (5, 2), 'abc', 'poisson') 371s ***** error ... 371s glmfit (rand (5, 2), [], 'poisson') 371s ***** error ... 371s glmfit (rand (5, 2), rand (6, 1), 'poisson') 371s ***** error ... 371s glmfit (rand (6, 2), rand (6, 1), 3) 371s ***** error ... 371s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 3), 'binomial') 371s ***** error ... 371s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 2), 'normal') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 371s ***** error ... 371s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 371s ***** error ... 371s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 371s 70 tests, 70 passed, 0 known failure, 0 skipped 371s [inst/kmeans.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/kmeans.m 371s ***** demo 371s ## Generate a two-cluster problem 371s randn ("seed", 31) # for reproducibility 371s C1 = randn (100, 2) + 1; 371s randn ("seed", 32) # for reproducibility 371s C2 = randn (100, 2) - 1; 371s data = [C1; C2]; 371s 371s ## Perform clustering 371s rand ("seed", 1) # for reproducibility 371s [idx, centers] = kmeans (data, 2); 371s 371s ## Plot the result 371s figure; 371s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 371s hold on; 371s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 371s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 371s title ("A simple two-clusters example"); 371s hold off; 371s ***** demo 371s ## Cluster data using k-means clustering, then plot the cluster regions 371s ## Load Fisher's iris data set and use the petal lengths and widths as 371s ## predictors 371s 371s load fisheriris 371s X = meas(:,3:4); 371s 371s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 371s title ("Fisher's Iris Data"); 371s xlabel ("Petal Lengths (cm)"); 371s ylabel ("Petal Widths (cm)"); 371s 371s ## Cluster the data. Specify k = 3 clusters 371s rand ("seed", 1) # for reproducibility 371s [idx, C] = kmeans (X, 3); 371s x1 = min (X(:,1)):0.01:max (X(:,1)); 371s x2 = min (X(:,2)):0.01:max (X(:,2)); 371s [x1G, x2G] = meshgrid (x1, x2); 371s XGrid = [x1G(:), x2G(:)]; 371s 371s idx2Region = kmeans (XGrid, 3, "MaxIter", 10, "Start", C); 371s figure; 371s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 371s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 371s hold on; 371s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 371s title ("Fisher's Iris Data"); 371s xlabel ("Petal Lengths (cm)"); 371s ylabel ("Petal Widths (cm)"); 371s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 371s hold off 371s ***** demo 371s ## Partition Data into Two Clusters 371s 371s randn ("seed", 1) # for reproducibility 371s r1 = randn (100, 2) * 0.75 + ones (100, 2); 371s randn ("seed", 2) # for reproducibility 371s r2 = randn (100, 2) * 0.5 - ones (100, 2); 371s X = [r1; r2]; 371s 371s plot (X(:,1), X(:,2), "."); 371s title ("Randomly Generated Data"); 371s rand ("seed", 1) # for reproducibility 371s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 371s "Replicates", 5, "Display", "final"); 371s figure; 371s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 371s hold on 371s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 371s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 371s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 371s title ("Cluster Assignments and Centroids"); 371s hold off 371s ***** demo 371s ## Assign New Data to Existing Clusters 371s 371s ## Generate a training data set using three distributions 371s randn ("seed", 5) # for reproducibility 371s r1 = randn (100, 2) * 0.75 + ones (100, 2); 371s randn ("seed", 7) # for reproducibility 371s r2 = randn (100, 2) * 0.5 - ones (100, 2); 371s randn ("seed", 9) # for reproducibility 371s r3 = randn (100, 2) * 0.75; 371s X = [r1; r2; r3]; 371s 371s ## Partition the training data into three clusters by using kmeans 371s 371s rand ("seed", 1) # for reproducibility 371s [idx, C] = kmeans (X, 3); 371s 371s ## Plot the clusters and the cluster centroids 371s 371s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 371s hold on 371s plot (C(:,1), C(:,2), "kx"); 371s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 371s 371s ## Generate a test data set 371s randn ("seed", 25) # for reproducibility 371s r1 = randn (100, 2) * 0.75 + ones (100, 2); 371s randn ("seed", 27) # for reproducibility 371s r2 = randn (100, 2) * 0.5 - ones (100, 2); 371s randn ("seed", 29) # for reproducibility 371s r3 = randn (100, 2) * 0.75; 371s Xtest = [r1; r2; r3]; 371s 371s ## Classify the test data set using the existing clusters 371s ## Find the nearest centroid from each test data point by using pdist2 371s 371s D = pdist2 (C, Xtest, "euclidean"); 371s [group, ~] = find (D == min (D)); 371s 371s ## Plot the test data and label the test data using idx_test with gscatter 371s 371s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 371s box on; 371s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 371s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 371s "Data classified to Cluster 3", "Location", "NorthWest"); 371s title ("Assign New Data to Existing Clusters"); 371s ***** test 371s samples = 4; 371s dims = 3; 371s k = 2; 371s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 371s "emptyAction", "singleton"); 371s assert (size (cls), [samples, 1]); 371s assert (size (c), [k, dims]); 371s assert (size (d), [k, 1]); 371s assert (size (z), [samples, k]); 371s ***** test 371s samples = 4; 371s dims = 3; 371s k = 2; 371s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 371s "emptyAction", "singleton"); 371s assert (size (cls), [samples, 1]); 371s assert (size (c), [k, dims]); 371s assert (size (d), [k, 1]); 371s assert (size (z), [samples, k]); 371s ***** test 371s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 371s assert (cls, [1; 1]); 371s assert (c, [1.5, 0; NA, NA]); 371s ***** test 371s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 371s "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 371s ***** test 371s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 371s ***** test 371s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 371s ***** error kmeans (rand (3,2), 4); 371s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 371s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 371s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 371s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 371s ***** error kmeans (rand (3,4), 2, "start", "normal"); 371s ***** error kmeans (rand (4,3), 2, "replicates", i); 371s ***** error kmeans (rand (4,3), 2, "replicates", -1); 371s ***** error kmeans (rand (4,3), 2, "replicates", []); 371s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 371s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 371s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 371s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 371s ***** error kmeans (rand (4,3), 2, "maxiter", []); 371s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 371s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 371s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 371s 31 tests, 31 passed, 0 known failure, 0 skipped 371s [inst/dcov.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dcov.m 371s ***** demo 371s base=@(x) (x- min(x))./(max(x)-min(x)); 371s N = 5e2; 371s x = randn (N,1); x = base (x); 371s z = randn (N,1); z = base (z); 371s # Linear relations 371s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 371s ly = x .* cy; 371s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 371s # Correlated Gaussian 371s cz = 1 - abs (cy); 371s gy = base ( ly + cz.*z); 371s # Shapes 371s sx = repmat (x,1,7); 371s sy = zeros (size (ly)); 371s v = 2 * rand (size(x,1),2) - 1; 371s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 371s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 371s tmp = R(35) * v.'; 371s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 371s tmp = R(45) * v.'; 371s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 371s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 371s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 371s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 371s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 371s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 371s sy = base (sy); 371s sx = base (sx); 371s # scaled shape 371s sc = 1/3; 371s ssy = (sy-0.5) * sc + 0.5; 371s n = size (ly,2); 371s ym = 1.2; 371s xm = 0.5; 371s fmt={'horizontalalignment','center'}; 371s ff = "% .2f"; 371s figure (1) 371s for i=1:n 371s subplot(4,n,i); 371s plot (x, gy(:,i), '.b'); 371s axis tight 371s axis off 371s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 371s 371s subplot(4,n,i+n); 371s plot (x, ly(:,i), '.b'); 371s axis tight 371s axis off 371s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 371s 371s subplot(4,n,i+2*n); 371s plot (sx(:,i), sy(:,i), '.b'); 371s axis tight 371s axis off 371s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 371s v = axis (); 371s 371s subplot(4,n,i+3*n); 371s plot (sx(:,i), ssy(:,i), '.b'); 371s axis (v) 371s axis off 371s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 371s endfor 371s ***** error dcov (randn (30, 5), randn (25,5)) 371s 1 test, 1 passed, 0 known failure, 0 skipped 371s [inst/mahal.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/mahal.m 371s ***** error mahal () 371s ***** error mahal (1, 2, 3) 371s ***** error mahal ("A", "B") 371s ***** error mahal ([1, 2], ["A", "B"]) 371s ***** error mahal (ones (2, 2, 2)) 371s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 371s ***** error mahal (ones (2, 2), ones (2, 3)) 371s ***** test 371s X = [1 0; 0 1; 1 1; 0 0]; 371s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 371s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 371s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 371s 9 tests, 9 passed, 0 known failure, 0 skipped 371s [inst/ttest.m] 371s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ttest.m 371s ***** test 371s x = 8:0.1:12; 371s [h, pval, ci] = ttest (x, 10); 371s assert (h, 0) 371s assert (pval, 1, 10*eps) 371s assert (ci, [9.6219 10.3781], 1E-5) 371s [h, pval, ci0] = ttest (x, 0); 371s assert (h, 1) 371s assert (pval, 0) 371s assert (ci0, ci, 2e-15) 371s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 371s assert (h, 0) 371s assert (pval, 0.5, 10*eps) 371s assert (ci, [9.68498 Inf], 1E-5) 372s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 372s ***** error ttest ([8:0.1:12], 10, "tail", 25); 372s 3 tests, 3 passed, 0 known failure, 0 skipped 372s [inst/hmmgenerate.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hmmgenerate.m 372s ***** test 372s len = 25; 372s transprob = [0.8, 0.2; 0.4, 0.6]; 372s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 372s [sequence, states] = hmmgenerate (len, transprob, outprob); 372s assert (length (sequence), len); 372s assert (length (states), len); 372s assert (min (sequence) >= 1); 372s assert (max (sequence) <= columns (outprob)); 372s assert (min (states) >= 1); 372s assert (max (states) <= rows (transprob)); 372s ***** test 372s len = 25; 372s transprob = [0.8, 0.2; 0.4, 0.6]; 372s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 372s symbols = {"A", "B", "C"}; 372s statenames = {"One", "Two"}; 372s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 372s "symbols", symbols, "statenames", statenames); 372s assert (length (sequence), len); 372s assert (length (states), len); 372s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 372s strcmp (sequence, "C") == ones (1, len)); 372s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 372s 2 tests, 2 passed, 0 known failure, 0 skipped 372s [inst/cophenet.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cophenet.m 372s ***** demo 372s randn ("seed", 5) # for reproducibility 372s X = randn (10,2); 372s y = pdist (X); 372s Z = linkage (y, "average"); 372s cophenet (Z, y) 372s ***** error cophenet () 372s ***** error cophenet (1) 372s ***** error ... 372s cophenet (ones (2,2), 1) 372s ***** error ... 372s cophenet ([1 2 1], "a") 372s ***** error ... 372s cophenet ([1 2 1], [1 2]) 372s 5 tests, 5 passed, 0 known failure, 0 skipped 372s [inst/gscatter.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/gscatter.m 372s ***** demo 372s load fisheriris; 372s X = meas(:,3:4); 372s cidcs = kmeans (X, 3, "Replicates", 5); 372s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 372s title ("Fisher's iris data"); 372s ***** shared visibility_setting 372s visibility_setting = get (0, "DefaultFigureVisible"); 372s ***** test 372s hf = figure ("visible", "off"); 372s unwind_protect 372s load fisheriris; 372s X = meas(:,3:4); 372s cidcs = kmeans (X, 3, "Replicates", 5); 372s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 372s title ("Fisher's iris data"); 372s unwind_protect_cleanup 372s close (hf); 372s end_unwind_protect 372s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 372s ***** error gscatter (); 372s ***** error gscatter ([1]); 372s ***** error gscatter ([1], [2]); 372s ***** error gscatter ('abc', [1 2 3], [1]); 372s ***** error gscatter ([1 2 3], [1 2], [1]); 372s ***** error gscatter ([1 2 3], 'abc', [1]); 372s ***** error gscatter ([1 2], [1 2], [1]); 372s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 372s 9 tests, 9 passed, 0 known failure, 0 skipped 372s [inst/chi2gof.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/chi2gof.m 372s ***** demo 372s x = normrnd (50, 5, 100, 1); 372s [h, p, stats] = chi2gof (x) 372s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 372s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 372s ***** demo 372s x = rand (100,1 ); 372s n = length (x); 372s binedges = linspace (0, 1, 11); 372s expectedCounts = n * diff (binedges); 372s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 372s ***** demo 372s bins = 0:5; 372s obsCounts = [6 16 10 12 4 2]; 372s n = sum(obsCounts); 372s lambdaHat = sum(bins.*obsCounts) / n; 372s expCounts = n * poisspdf(bins,lambdaHat); 372s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 372s "expected", expCounts, "nparams",1) 372s ***** error chi2gof () 372s ***** error chi2gof ([2,3;3,4]) 372s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 372s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 372s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 372s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 372s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 372s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 372s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 372s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 372s ***** test 372s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 372s [h, p, stats] = chi2gof (x); 372s assert (h, 0); 372s assert (p, NaN); 372s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 372s assert (stats.df, 0); 372s assert (stats.edges, [1, 2.5, 4], 1e-14); 372s assert (stats.O, [7, 5], 1e-14); 372s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 372s 11 tests, 11 passed, 0 known failure, 0 skipped 372s [inst/combnk.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/combnk.m 372s ***** demo 372s c = combnk (1:5, 2); 372s disp ("All pairs of integers between 1 and 5:"); 372s disp (c); 372s ***** test 372s c = combnk (1:3, 2); 372s assert (c, [1, 2; 1, 3; 2, 3]); 372s ***** test 372s c = combnk (1:3, 6); 372s assert (isempty (c)); 372s ***** test 372s c = combnk ({1, 2, 3}, 2); 372s assert (c, {1, 2; 1, 3; 2, 3}); 372s ***** test 372s c = combnk ("hello", 2); 372s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 372s 4 tests, 4 passed, 0 known failure, 0 skipped 372s [inst/nansum.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/nansum.m 372s ***** demo 372s ## Find the column sums for a matrix with missing values., 372s 372s x = magic (3); 372s x([1, 4, 7:9]) = NaN 372s s = nansum (x) 372s ***** demo 372s ## Find the row sums for a matrix with missing values., 372s 372s x = magic (3); 372s x([1, 4, 7:9]) = NaN 372s s = nansum (x, 2) 372s ***** demo 372s ## Find the sum of all the values in a multidimensional array 372s ## with missing values. 372s 372s x = reshape (1:30, [2, 5, 3]); 372s x([10:12, 25]) = NaN 372s s = nansum (x, "all") 372s ***** demo 372s ## Find the sum of a multidimensional array with missing values over 372s ## multiple dimensions. 372s 372s x = reshape (1:30, [2, 5, 3]); 372s x([10:12, 25]) = NaN 372s s = nansum (x, [2, 3]) 372s ***** assert (nansum ([]), 0) 372s ***** assert (nansum (NaN), 0) 372s ***** assert (nansum (NaN(3)), [0, 0, 0]) 372s ***** assert (nansum ([2 4 NaN 7]), 13) 372s ***** assert (nansum ([2 4 NaN Inf]), Inf) 372s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 372s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 372s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 372s ***** test 372s x = magic(3); 372s x([1 6:9]) = NaN; 372s assert (nansum (x), [7, 6, 0]) 372s assert (nansum (x, 2), [1; 8; 4]) 372s ***** test 372s x = reshape(1:24, [2, 4, 3]); 372s x([5:6, 20]) = NaN; 372s assert (nansum (x, "all"), 269) 372s ***** test 372s x = reshape(1:24,[2, 4, 3]); 372s x([5:6, 20]) = NaN; 372s assert (squeeze (nansum (x, [1, 2])), [25; 100; 144]) 372s assert (nansum (x, [2, 3]), [139; 130]) 372s ***** error nansum ({3}) 372s ***** error nansum (ones (3), 0) 372s ***** error nansum (ones (3), 1.5) 372s ***** error nansum (ones (3), 1.5) 372s ***** error ... 372s nansum (ones (3, 3, 3), [2, 2.5]) 372s ***** error ... 372s nansum (ones (3, 3, 3), [-1, 2]) 372s ***** error ... 372s nansum (ones (3, 3, 3), [2, 2, 3]) 372s 18 tests, 18 passed, 0 known failure, 0 skipped 372s [inst/cdfplot.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cdfplot.m 372s ***** demo 372s x = randn(100,1); 372s cdfplot (x); 372s ***** test 372s hf = figure ("visible", "off"); 372s unwind_protect 372s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 372s [hCDF, stats] = cdfplot (x); 372s assert (stats.min, 2); 372s assert (stats.max, 6); 372s assert (stats.median, 3.5); 372s assert (stats.std, 1.35400640077266, 1e-14); 372s unwind_protect_cleanup 372s close (hf); 372s end_unwind_protect 372s ***** test 372s hf = figure ("visible", "off"); 372s unwind_protect 372s x = randn(100,1); 372s cdfplot (x); 372s unwind_protect_cleanup 372s close (hf); 372s end_unwind_protect 372s ***** error cdfplot (); 372s ***** error cdfplot ([x',x']); 372s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 372s 5 tests, 5 passed, 0 known failure, 0 skipped 372s [inst/slicesample.m] 372s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/slicesample.m 372s ***** demo 372s ## Define function to sample 372s d = 2; 372s mu = [-1; 2]; 372s rand ("seed", 5) # for reproducibility 372s Sigma = rand (d); 372s Sigma = (Sigma + Sigma'); 372s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 372s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 372s 372s ## Inputs 372s start = ones (1,2); 372s nsamples = 500; 372s K = 500; 372s m = 10; 372s rande ("seed", 4); rand ("seed", 5) # for reproducibility 372s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 372s figure; 372s hold on; 372s plot (smpl(:,1), smpl(:,2), 'x'); 372s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 372s z = reshape (pdf ([x(:), y(:)]), size(x)); 372s mesh (x, y, z, "facecolor", "None"); 372s 372s ## Using sample points to find the volume of half a sphere with radius of .5 372s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 372s int = mean (f (smpl) ./ pdf (smpl)); 372s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 372s trueerr = abs (2/3*pi*.25^(3/2)-int); 372s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 372s fprintf ("Monte Carlo integral error estimate %f\n", errest); 372s fprintf ("The actual error %f\n", trueerr); 372s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 372s ***** demo 372s ## Integrate truncated normal distribution to find normalization constant 372s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 372s nsamples = 1e3; 372s rande ("seed", 4); rand ("seed", 5) # for reproducibility 372s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 372s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 372s x = linspace (-3, 3, 1000); 372s area (x, f(x)); 372s xlabel ("x"); 372s ylabel ("f(x)"); 372s int = mean (f (smpl) ./ pdf (smpl)); 372s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 372s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 372s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 372s fprintf("Monte Carlo integral error estimate %f\n", errest); 372s fprintf("The actual error %f\n", trueerr); 372s ***** test 372s start = 0.5; 372s nsamples = 1e3; 372s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 372s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 372s assert (mean (smpl, 1), 1, .15); 372s assert (var (smpl, 1), 1, .25); 373s ***** error slicesample (); 373s ***** error slicesample (1); 373s ***** error slicesample (1, 1); 373s 4 tests, 4 passed, 0 known failure, 0 skipped 373s [inst/confusionmat.m] 373s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/confusionmat.m 373s ***** test 373s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 373s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 373s 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; ... 373s 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]; 373s assert (confusionmat (Yt, Yp), C) 373s 1 test, 1 passed, 0 known failure, 0 skipped 373s [inst/ridge.m] 373s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ridge.m 373s ***** demo 373s ## Perform ridge regression for a range of ridge parameters and observe 373s ## how the coefficient estimates change based on the acetylene dataset. 373s 373s load acetylene 373s 373s X = [x1, x2, x3]; 373s 373s x1x2 = x1 .* x2; 373s x1x3 = x1 .* x3; 373s x2x3 = x2 .* x3; 373s 373s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 373s 373s k = 0:1e-5:5e-3; 373s 373s b = ridge (y, D, k); 373s 373s figure 373s plot (k, b, "LineWidth", 2) 373s ylim ([-100, 100]) 373s grid on 373s xlabel ("Ridge Parameter") 373s ylabel ("Standardized Coefficient") 373s title ("Ridge Trace") 373s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 373s 373s ***** demo 373s 373s load carbig 373s X = [Acceleration Weight Displacement Horsepower]; 373s y = MPG; 373s 373s n = length(y); 373s 373s rand("seed",1); % For reproducibility 373s 373s c = cvpartition(n,'HoldOut',0.3); 373s idxTrain = training(c,1); 373s idxTest = ~idxTrain; 373s 373s idxTrain = training(c,1); 373s idxTest = ~idxTrain; 373s 373s k = 5; 373s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 373s 373s % Predict MPG values for the test data using the model. 373s yhat = b(1) + X(idxTest,:)*b(2:end); 373s scatter(y(idxTest),yhat) 373s 373s hold on 373s plot(y(idxTest),y(idxTest),"r") 373s xlabel('Actual MPG') 373s ylabel('Predicted MPG') 373s hold off 373s 373s ***** test 373s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 373s assert (b, [0.5533; 0.5533], 1e-4); 373s ***** test 373s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 373s assert (b, [0.4841; 0.4841], 1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0); 373s assert (b,[10.2273;1.97128;-0.601818],1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0.0005); 373s assert (b,[10.2233;1.9712;-0.6056],1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0.001); 373s assert (b,[10.2194;1.9711;-0.6094],1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0.002); 373s assert (b,[10.2116;1.9709;-0.6169],1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0.005); 373s assert (b,[10.1882;1.9704;-0.6393],1e-4); 373s ***** test 373s load acetylene 373s x = [x1, x2, x3]; 373s b = ridge (y, x, 0.01); 373s assert (b,[10.1497;1.9695;-0.6761],1e-4); 373s ***** error ridge (1) 373s ***** error ridge (1, 2) 373s ***** error ridge (ones (3), ones (3), 2) 373s ***** error ridge ([1, 2], ones (2), 2) 373s ***** error ridge ([], ones (3), 2) 373s ***** error ridge (ones (5,1), [], 2) 373s ***** error ... 373s ridge ([1; 2; 3; 4; 5], ones (3), 3) 373s ***** error ... 373s ridge ([1; 2; 3], ones (3), 3, 2) 373s ***** error ... 373s ridge ([1; 2; 3], ones (3), 3, "some") 373s 17 tests, 17 passed, 0 known failure, 0 skipped 373s [inst/hotelling_t2test.m] 373s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hotelling_t2test.m 373s ***** error hotelling_t2test (); 373s ***** error ... 373s hotelling_t2test (1); 373s ***** error ... 373s hotelling_t2test (ones(2,2,2)); 373s ***** error ... 373s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 373s ***** error ... 373s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 373s ***** error ... 373s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 373s ***** error ... 373s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 373s ***** error ... 373s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 373s ***** error ... 373s hotelling_t2test (ones(20,1), [0, 0]); 373s ***** error ... 373s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 373s ***** error ... 373s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 373s ***** test 373s randn ("seed", 1); 373s x = randn (50000, 5); 373s [h, pval, stats] = hotelling_t2test (x); 373s assert (h, 0); 373s assert (stats.df1, 5); 373s assert (stats.df2, 49995); 373s ***** test 373s randn ("seed", 1); 373s x = randn (50000, 5); 373s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 373s assert (h, 1); 373s assert (stats.df1, 5); 373s assert (stats.df2, 49995); 373s 13 tests, 13 passed, 0 known failure, 0 skipped 373s [inst/violin.m] 373s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/violin.m 373s ***** demo 373s clf 373s x = zeros (9e2, 10); 373s for i=1:10 373s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 373s endfor 373s h = violin (x, "color", "c"); 373s axis tight 373s set (h.violin, "linewidth", 2); 373s set (gca, "xgrid", "on"); 373s xlabel ("Variables") 373s ylabel ("Values") 373s ***** demo 373s clf 373s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 373s subplot (1,2,1) 373s title ("Grade 3 heights - vertical"); 373s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 373s violin (data, "Nbins", 10); 373s axis tight 373s 373s subplot(1,2,2) 373s title ("Grade 3 heights - horizontal"); 373s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 373s violin (data, "horizontal", "Nbins", 10); 373s axis tight 373s ***** demo 373s clf 373s data = exprnd (0.1, 500,4); 373s violin (data, "nbins", {5,10,50,100}); 373s axis ([0 5 0 max(data(:))]) 373s ***** demo 373s clf 373s data = exprnd (0.1, 500,4); 373s violin (data, "color", jet(4)); 373s axis ([0 5 0 max(data(:))]) 373s ***** demo 373s clf 373s data = repmat(exprnd (0.1, 500,1), 1, 4); 373s violin (data, "width", linspace (0.1,0.5,4)); 373s axis ([0 5 0 max(data(:))]) 373s ***** demo 373s clf 373s data = repmat(exprnd (0.1, 500,1), 1, 4); 373s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 373s axis ([0 5 0 max(data(:))]) 373s ***** test 373s hf = figure ("visible", "off"); 373s unwind_protect 373s data = exprnd (0.1, 500,4); 373s violin (data, "color", jet(4)); 373s axis ([0 5 0 max(data(:))]) 373s unwind_protect_cleanup 373s close (hf); 373s end_unwind_protect 374s ***** test 374s hf = figure ("visible", "off"); 374s unwind_protect 374s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 374s subplot (1,2,1) 374s title ("Grade 3 heights - vertical"); 374s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 374s violin (data, "Nbins", 10); 374s axis tight 374s unwind_protect_cleanup 374s close (hf); 374s end_unwind_protect 374s ***** test 374s hf = figure ("visible", "off"); 374s unwind_protect 374s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 374s subplot (1,2,1) 374s title ("Grade 3 heights - vertical"); 374s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 374s violin (data, "Nbins", 10); 374s axis tight 374s subplot(1,2,2) 374s title ("Grade 3 heights - horizontal"); 374s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 374s violin (data, "horizontal", "Nbins", 10); 374s axis tight 374s unwind_protect_cleanup 374s close (hf); 374s end_unwind_protect 374s ***** test 374s hf = figure ("visible", "off"); 374s unwind_protect 374s data = repmat(exprnd (0.1, 500,1), 1, 4); 374s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 374s axis ([0 5 0 max(data(:))]) 374s unwind_protect_cleanup 374s close (hf); 374s end_unwind_protect 374s ***** test 374s hf = figure ("visible", "off"); 374s unwind_protect 374s data = repmat(exprnd (0.1, 500,1), 1, 4); 374s violin (data, "width", linspace (0.1,0.5,4)); 374s axis ([0 5 0 max(data(:))]) 374s unwind_protect_cleanup 374s close (hf); 374s end_unwind_protect 375s 5 tests, 5 passed, 0 known failure, 0 skipped 375s [inst/jackknife.m] 375s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/jackknife.m 375s ***** demo 375s for k = 1:1000 375s rand ("seed", k); # for reproducibility 375s x = rand (10, 1); 375s s(k) = std (x); 375s jackstat = jackknife (@std, x); 375s j(k) = 10 * std (x) - 9 * mean (jackstat); 375s endfor 375s figure(); 375s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 375s ***** demo 375s for k = 1:1000 375s randn ("seed", k); # for reproducibility 375s x = randn (1, 50); 375s rand ("seed", k); # for reproducibility 375s y = rand (1, 50); 375s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 375s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 375s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 375s endfor 375s t = (j - sqrt (1 / 12)) ./ sqrt (v); 375s figure(); 375s plot (sort (tcdf (t, 49)), ... 375s "-;Almost linear mapping indicates good fit with t-distribution.;") 375s ***** test 375s ##Example from Quenouille, Table 1 375s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 375s jackstat = jackknife ( @(x) 1/mean(x), d ); 375s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 375s 1 test, 1 passed, 0 known failure, 0 skipped 375s [inst/mhsample.m] 375s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/mhsample.m 375s ***** demo 375s ## Define function to sample 375s d = 2; 375s mu = [-1; 2]; 375s rand ("seed", 5) # for reproducibility 375s Sigma = rand (d); 375s Sigma = (Sigma + Sigma'); 375s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 375s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 375s ## Inputs 375s start = ones (1, 2); 375s nsamples = 500; 375s sym = true; 375s K = 500; 375s m = 10; 375s rand ("seed", 8) # for reproducibility 375s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 375s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 375s "symmetric", sym, "burnin", K, "thin", m); 375s figure; 375s hold on; 375s plot (smpl(:, 1), smpl(:, 2), 'x'); 375s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 375s z = reshape (pdf ([x(:), y(:)]), size(x)); 375s mesh (x, y, z, "facecolor", "None"); 375s ## Using sample points to find the volume of half a sphere with radius of .5 375s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 375s int = mean (f (smpl) ./ pdf (smpl)); 375s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 375s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 375s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 375s printf ("Monte Carlo integral error estimate %f\n", errest); 375s printf ("The actual error %f\n", trueerr); 375s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 375s ***** demo 375s ## Integrate truncated normal distribution to find normalization constant 375s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 375s nsamples = 1e3; 375s rand ("seed", 5) # for reproducibility 375s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 375s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 375s "symmetric", true, "thin", 4); 375s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 375s x = linspace (-3, 3, 1000); 375s area(x, f(x)); 375s xlabel ('x'); 375s ylabel ('f(x)'); 375s int = mean (f (smpl) ./ pdf (smpl)); 375s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 375s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 375s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 375s printf ("Monte Carlo integral error estimate %f\n", errest); 375s printf ("The actual error %f\n", trueerr); 375s ***** test 375s nchain = 1e4; 375s start = rand (nchain, 1); 375s nsamples = 1e3; 375s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 375s proppdf = @(x, y) 1/3; 375s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 375s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 375s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 375s "burnin", 0); 375s assert (mean (mean (smpl, 1), 3), 1, .01); 375s assert (mean (var (smpl, 1), 3), 1, .01) 379s ***** error mhsample (); 379s ***** error mhsample (1); 379s ***** error mhsample (1, 1); 379s ***** error mhsample (1, 1, "pdf", @(x)x); 379s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 379s 6 tests, 6 passed, 0 known failure, 0 skipped 379s [inst/probit.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/probit.m 379s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 379s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 379s ***** error probit () 379s ***** error probit (1, 2) 379s 4 tests, 4 passed, 0 known failure, 0 skipped 379s [inst/inconsistent.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/inconsistent.m 379s ***** error inconsistent () 379s ***** error inconsistent ([1 2 1], 2, 3) 379s ***** error inconsistent (ones (2, 2)) 379s ***** error inconsistent ([1 2 1], -1) 379s ***** error inconsistent ([1 2 1], 1.3) 379s ***** error inconsistent ([1 2 1], [1 1]) 379s ***** error inconsistent (ones (2, 3)) 379s ***** test 379s load fisheriris; 379s Z = linkage(meas, 'average', 'chebychev'); 379s assert (cond (inconsistent (Z)), 39.9, 1e-3); 379s 8 tests, 8 passed, 0 known failure, 0 skipped 379s [inst/loadmodel.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/loadmodel.m 379s ***** error loadmodel () 379s ***** error ... 379s loadmodel ("fisheriris.mat") 379s ***** error ... 379s loadmodel ("fail_loadmodel.mdl") 379s ***** error ... 379s loadmodel ("fail_load_model.mdl") 379s 4 tests, 4 passed, 0 known failure, 0 skipped 379s [inst/ztest2.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ztest2.m 379s ***** error ztest2 (); 379s ***** error ztest2 (1); 379s ***** error ztest2 (1, 2); 379s ***** error ztest2 (1, 2, 3); 379s ***** error ztest2 (1, 2, 3, 2); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha") 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha", 0); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha", 1.2); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha", "val"); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "tail", "val"); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 379s ***** error ... 379s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 379s 12 tests, 12 passed, 0 known failure, 0 skipped 379s [inst/nanmax.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/nanmax.m 379s ***** demo 379s ## Find the column maximum values and their indices 379s ## for matrix data with missing values. 379s 379s x = magic (3); 379s x([1, 6:9]) = NaN 379s [y, ind] = nanmax (x) 379s ***** demo 379s ## Find the maximum of all the values in an array, ignoring missing values. 379s ## Create a 2-by-5-by-3 array x with some missing values. 379s 379s x = reshape (1:30, [2, 5, 3]); 379s x([10:12, 25]) = NaN 379s 379s ## Find the maximum of the elements of x. 379s 379s y = nanmax (x, [], 'all') 379s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 379s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 379s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 379s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 379s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 379s ***** shared x, y 379s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 379s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 379s y = x; 379s y(2,3,1) = 0.51; 379s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 379s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 379s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 379s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 379s ***** assert (nanmax (x, [], 'all'), 6.77) 379s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 379s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 379s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 379s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 379s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 379s ***** test 379s xx = repmat ([1:20;6:25], [5 2 6 3]); 379s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 379s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 379s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 379s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 379s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 379s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 379s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 379s ***** assert (nanmax (magic (3), [], 3), magic (3)) 379s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 379s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 379s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 379s ***** error ... 379s nanmax (y, [], [1, 1, 2]) 379s ***** error ... 379s [v, idx] = nanmax(x, y, [1 2]) 379s 24 tests, 24 passed, 0 known failure, 0 skipped 379s [inst/fitcnet.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitcnet.m 379s ***** demo 379s ## Train a Neural Network on the Fisher's Iris data set and display 379s ## a confusion chart with the classification results. 379s 379s load fisheriris 379s Mdl = fitcnet (meas, species); 379s pred_species = resubPredict (Mdl); 379s confusionchart (species, pred_species, "Title", ... 379s "Fully Connected Neural Network classification on Fisher's Iris dataset"); 379s ***** test 379s load fisheriris 379s x = meas; 379s y = grp2idx (species); 379s Mdl = fitcnet (x, y, "IterationLimit", 50); 379s assert (class (Mdl), "ClassificationNeuralNetwork"); 379s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 379s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 379s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 379s ***** error fitcnet () 379s ***** error fitcnet (ones (4,1)) 379s ***** error 379s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 379s ***** error 379s fitcnet (ones (4,2), ones (3, 1)) 379s ***** error 379s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 379s 6 tests, 6 passed, 0 known failure, 0 skipped 379s [inst/levene_test.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/levene_test.m 379s ***** error levene_test () 379s ***** error ... 379s levene_test (1, 2, 3, 4, 5); 379s ***** error levene_test (randn (50, 2), 0); 379s ***** error ... 379s levene_test (randn (50, 2), [1, 2, 3]); 379s ***** error ... 379s levene_test (randn (50, 1), ones (55, 1)); 379s ***** error ... 379s levene_test (randn (50, 1), ones (50, 2)); 379s ***** error ... 379s levene_test (randn (50, 2), [], 1.2); 379s ***** error ... 379s levene_test (randn (50, 2), "some_string"); 379s ***** error ... 379s levene_test (randn (50, 2), [], "alpha"); 379s ***** error ... 379s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 379s ***** error ... 379s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 379s ***** error ... 379s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 379s ***** warning ... 379s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades); 379s assert (h, 1); 379s assert (pval, 9.523239714592791e-07, 1e-14); 379s assert (W, 8.59529, 1e-5); 379s assert (df, [4, 595]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 379s assert (h, 1); 379s assert (pval, 9.523239714592791e-07, 1e-14); 379s assert (W, 8.59529, 1e-5); 379s assert (df, [4, 595]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades, [], "median"); 379s assert (h, 1); 379s assert (pval, 1.312093241723211e-06, 1e-14); 379s assert (W, 8.415969, 1e-6); 379s assert (df, [4, 595]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades(:,[1:3])); 379s assert (h, 1); 379s assert (pval, 0.004349390980463497, 1e-14); 379s assert (W, 5.52139, 1e-5); 379s assert (df, [2, 357]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 379s assert (h, 1); 379s assert (pval, 0.004355216763951453, 1e-14); 379s assert (W, 5.52001, 1e-5); 379s assert (df, [2, 357]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 379s assert (h, 0); 379s assert (pval, 0.1807494957440653, 2e-14); 379s assert (W, 1.80200, 1e-5); 379s assert (df, [1, 238]); 379s ***** test 379s load examgrades 379s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 379s assert (h, 0); 379s assert (pval, 0.1978225622063785, 2e-14); 379s assert (W, 1.66768, 1e-5); 379s assert (df, [1, 238]); 379s 20 tests, 20 passed, 0 known failure, 0 skipped 379s [inst/kstest.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/kstest.m 379s ***** demo 379s ## Use the stock return data set to test the null hypothesis that the data 379s ## come from a standard normal distribution against the alternative 379s ## hypothesis that the population CDF of the data is larger that the 379s ## standard normal CDF. 379s 379s load stockreturns; 379s x = stocks(:,2); 379s [h, p, k, c] = kstest (x, "Tail", "larger") 379s 379s ## Compute the empirical CDF and plot against the standard normal CDF 379s [f, x_values] = ecdf (x); 379s h1 = plot (x_values, f); 379s hold on; 379s h2 = plot (x_values, normcdf (x_values), 'r--'); 379s set (h1, "LineWidth", 2); 379s set (h2, "LineWidth", 2); 379s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 379s "Location", "southeast"); 379s title ("Empirical CDF of stock return data against standard normal CDF") 379s ***** error kstest () 379s ***** error kstest (ones (2, 4)) 379s ***** error kstest ([2, 3, 5, 3+3i]) 379s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "tail") 379s ***** error ... 379s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "tail", 0) 379s ***** error ... 379s kstest ([2,3,4,5,6], "tail", "whatever") 379s ***** error ... 379s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 379s ***** error ... 379s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 379s ***** error ... 379s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5, 'resubstitution')) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 379s ***** error ... 379s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 379s ***** test 379s load examgrades 379s [h, p] = kstest (grades(:,1)); 379s assert (h, true); 379s assert (p, 7.58603305206105e-107, 1e-14); 379s ***** test 379s load examgrades 379s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 379s assert (h, false); 379s assert (p, 0.5612, 1e-4); 379s ***** test 379s load examgrades 379s x = grades(:,1); 379s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 379s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 379s assert (h, true); 379s assert (p, 0.0021, 1e-4); 379s ***** test 379s load stockreturns 379s x = stocks(:,3); 379s [h,p,k,c] = kstest (x, "Tail", "larger"); 379s assert (h, true); 379s assert (p, 5.085438806199252e-05, 1e-14); 379s assert (k, 0.2197, 1e-4); 379s assert (c, 0.1207, 1e-4); 379s 21 tests, 21 passed, 0 known failure, 0 skipped 379s [inst/Regression/RegressionGAM.m] 379s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Regression/RegressionGAM.m 379s ***** demo 379s ## Train a RegressionGAM Model for synthetic values 379s f1 = @(x) cos (3 * x); 379s f2 = @(x) x .^ 3; 379s x1 = 2 * rand (50, 1) - 1; 379s x2 = 2 * rand (50, 1) - 1; 379s y = f1(x1) + f2(x2); 379s y = y + y .* 0.2 .* rand (50,1); 379s X = [x1, x2]; 379s a = fitrgam (X, y, "tol", 1e-3) 379s ***** demo 379s ## Declare two different functions 379s f1 = @(x) cos (3 * x); 379s f2 = @(x) x .^ 3; 379s 379s ## Generate 80 samples for f1 and f2 379s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 379s X1 = f1 (x); 379s X2 = f2 (x); 379s 379s ## Create a synthetic response by adding noise 379s rand ("seed", 3); 379s Ytrue = X1 + X2; 379s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 379s 379s ## Assemble predictor data 379s X = [X1, X2]; 379s 379s ## Train the GAM and test on the same data 379s a = fitrgam (X, Y, "order", [5, 5]); 379s [ypred, ySDsd, yInt] = predict (a, X); 379s 379s ## Plot the results 379s figure 379s [sortedY, indY] = sort (Ytrue); 379s plot (sortedY, "r-"); 379s xlim ([0, 80]); 379s hold on 379s plot (ypred(indY), "g+") 379s plot (yInt(indY,1), "k:") 379s plot (yInt(indY,2), "k:") 379s xlabel ("Predictor samples"); 379s ylabel ("Response"); 379s title ("actual vs predicted values for function f1(x) = cos (3x) "); 379s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 379s 379s ## Use 30% Holdout partitioning for training and testing data 379s C = cvpartition (80, "HoldOut", 0.3); 379s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 379s 379s ## Plot the results 379s figure 379s [sortedY, indY] = sort (Ytrue(test(C))); 379s plot (sortedY, 'r-'); 379s xlim ([0, sum(test(C))]); 379s hold on 379s plot (ypred(indY), "g+") 379s plot (yInt(indY,1),'k:') 379s plot (yInt(indY,2),'k:') 379s xlabel ("Predictor samples"); 379s ylabel ("Response"); 379s title ("actual vs predicted values for function f1(x) = cos (3x) "); 379s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 379s ***** test 379s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 379s y = [1; 2; 3; 4]; 379s a = RegressionGAM (x, y); 379s assert ({a.X, a.Y}, {x, y}) 379s assert ({a.BaseModel.Intercept}, {2.5000}) 379s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 379s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 379s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 379s assert ({a.Formula}, {[]}) 380s ***** test 380s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 380s y = [1; 2; 3; 4]; 380s pnames = {"A", "B", "C", "D"}; 380s formula = "Y ~ A + B + C + D + A:C"; 380s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 380s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 380s assert ({a.IntMatrix}, {intMat}) 380s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 380s assert ({a.Formula}, {formula}) 380s ***** error RegressionGAM () 380s ***** error RegressionGAM (ones(10,2)) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (5,1)) 380s ***** error ... 380s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 380s ***** error 380s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 380s ***** error 380s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 380s ***** error ... 380s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 380s ***** error ... 380s predict (RegressionGAM (ones(10,1), ones(10,1))) 380s ***** error ... 380s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 380s ***** error ... 380s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 380s 39 tests, 39 passed, 0 known failure, 0 skipped 380s [inst/mcnemar_test.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/mcnemar_test.m 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 380s assert (h, 1); 380s assert (pval, 3.8151e-06, 1e-10); 380s assert (chisq, 21.356, 1e-3); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 380s assert (h, 1); 380s assert (pval, 0.034690, 1e-6); 380s assert (isempty (chisq), true); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 380s assert (h, 0); 380s assert (pval, 0.034690, 1e-6); 380s assert (isempty (chisq), true); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 380s assert (h, 1); 380s assert (pval, 0.034690, 1e-6); 380s assert (isempty (chisq), true); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 380s assert (h, 1); 380s assert (pval, 0.033006, 1e-6); 380s assert (chisq, 4.5455, 1e-4); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 380s assert (h, 0); 380s assert (pval, 0.052479, 1e-6); 380s assert (isempty (chisq), true); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 380s assert (h, 0); 380s assert (pval, 0.055009, 1e-6); 380s assert (chisq, 3.6818, 1e-4); 380s ***** test 380s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 380s assert (h, 1); 380s assert (pval, 0.055009, 1e-6); 380s assert (chisq, 3.6818, 1e-4); 380s ***** error mcnemar_test (59, 6, 16, 80) 380s ***** error mcnemar_test (ones (3, 3)) 380s ***** error ... 380s mcnemar_test ([59,6;16,-80]) 380s ***** error ... 380s mcnemar_test ([59,6;16,4.5]) 380s ***** error ... 380s mcnemar_test ([59,6;16,80], {""}) 380s ***** error ... 380s mcnemar_test ([59,6;16,80], -0.2) 380s ***** error ... 380s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 380s ***** error ... 380s mcnemar_test ([59,6;16,80], 1) 380s ***** error ... 380s mcnemar_test ([59,6;16,80], "") 380s 17 tests, 17 passed, 0 known failure, 0 skipped 380s [inst/barttest.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/barttest.m 380s ***** error barttest () 380s ***** error barttest ([2,NaN;3,4]) 380s ***** error barttest (ones (30, 4), "alpha") 380s ***** error barttest (ones (30, 4), 0) 380s ***** error barttest (ones (30, 4), 1.2) 380s ***** error barttest (ones (30, 4), [0.2, 0.05]) 380s ***** error barttest (ones (30, 1)) 380s ***** error barttest (ones (30, 1), 0.05) 380s ***** test 380s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 380s [ndim, pval, chisq] = barttest (x); 380s assert (ndim, 2); 380s assert (pval, 0); 380s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 380s ***** test 380s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 380s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 380s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 380s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 380s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 380s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 380s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 380s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 380s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 380s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 380s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 380s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 380s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 380s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 380s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 380s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 380s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 380s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 380s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 380s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 380s [ndim, pval, chisq] = barttest (x); 380s assert (ndim, 3); 380s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 380s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 380s assert (chisq, chisq_out, 1e-4); 380s 10 tests, 10 passed, 0 known failure, 0 skipped 380s [inst/kruskalwallis.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/kruskalwallis.m 380s ***** demo 380s x = meshgrid (1:6); 380s x = x + normrnd (0, 1, 6, 6); 380s kruskalwallis (x, [], 'off'); 380s ***** demo 380s x = meshgrid (1:6); 380s x = x + normrnd (0, 1, 6, 6); 380s [p, atab] = kruskalwallis(x); 380s ***** demo 380s x = ones (30, 4) .* [-2, 0, 1, 5]; 380s x = x + normrnd (0, 2, 30, 4); 380s group = {"A", "B", "C", "D"}; 380s kruskalwallis (x, group); 380s ***** test 380s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 380s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 380s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 380s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 380s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 380s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 380s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 380s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 380s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 380s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 380s group = [1:10] .* ones (10,10); 380s group = group(:); 380s [p, tbl] = kruskalwallis (data, group, "off"); 380s assert (p, 0.048229, 1e-6); 380s assert (tbl{2,5}, 17.03124, 1e-5); 380s assert (tbl{2,3}, 9, 0); 380s assert (tbl{4,2}, 82655.5, 1e-16); 380s data = reshape (data, 10, 10); 380s [p, tbl, stats] = kruskalwallis (data, [], "off"); 380s assert (p, 0.048229, 1e-6); 380s assert (tbl{2,5}, 17.03124, 1e-5); 380s assert (tbl{2,3}, 9, 0); 380s assert (tbl{4,2}, 82655.5, 1e-16); 380s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 380s N = 10 * ones (1, 10); 380s assert (stats.meanranks, means, 1e-6); 380s assert (length (stats.gnames), 10, 0); 380s assert (stats.n, N, 0); 380s 1 test, 1 passed, 0 known failure, 0 skipped 380s [inst/datasample.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/datasample.m 380s ***** error datasample(); 380s ***** error datasample(1); 380s ***** error datasample({1, 2, 3}, 1); 380s ***** error datasample([1 2], -1); 380s ***** error datasample([1 2], 1.5); 380s ***** error datasample([1 2], [1 1]); 380s ***** error datasample([1 2], 'g', [1 1]); 380s ***** error datasample([1 2], 1, -1); 380s ***** error datasample([1 2], 1, 1.5); 380s ***** error datasample([1 2], 1, [1 1]); 380s ***** error datasample([1 2], 1, 1, "Replace", -2); 380s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 380s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 380s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 380s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 380s ***** test 380s dat = randn (10, 4); 380s assert (size (datasample (dat, 3, 1)), [3 4]); 380s ***** test 380s dat = randn (10, 4); 380s assert (size (datasample (dat, 3, 2)), [10 3]); 380s 17 tests, 17 passed, 0 known failure, 0 skipped 380s [inst/runstest.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/runstest.m 380s ***** test 380s ## NIST beam deflection data 380s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 380s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 380s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 380s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 380s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 380s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 380s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 380s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 380s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 380s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 380s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 380s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 380s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 380s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 380s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 380s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 380s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 380s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 380s [h, p, stats] = runstest (data, median (data)); 380s expected_h = 1; 380s expected_p = 0.008562; 380s expected_z = 2.6229; 380s assert (h, expected_h); 380s assert (p, expected_p, 1E-6); 380s assert (stats.z, expected_z, 1E-4); 380s ***** shared x 380s x = [45, -60, 1.225, 55.4, -9 27]; 380s ***** test 380s [h, p, stats] = runstest (x); 380s assert (h, 0); 380s assert (p, 0.6, 1e-14); 380s assert (stats.nruns, 5); 380s assert (stats.n1, 3); 380s assert (stats.n0, 3); 380s assert (stats.z, 0.456435464587638, 1e-14); 380s ***** test 380s [h, p, stats] = runstest (x, [], "method", "approximate"); 380s assert (h, 0); 380s assert (p, 0.6481, 1e-4); 380s assert (stats.z, 0.456435464587638, 1e-14); 380s ***** test 380s [h, p, stats] = runstest (x, [], "tail", "left"); 380s assert (h, 0); 380s assert (p, 0.9, 1e-14); 380s assert (stats.z, 1.369306393762915, 1e-14); 380s ***** error runstest (ones (2,20)) 380s ***** error runstest (["asdasda"]) 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], "updown") 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "method", "some") 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 380s ***** error ... 380s runstest ([2 3 4 3 2 3 4], [], "option", "some") 380s 14 tests, 14 passed, 0 known failure, 0 skipped 380s [inst/normplot.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/normplot.m 380s ***** demo 380s h = normplot([1:20]); 380s ***** demo 380s h = normplot([1:20;5:2:44]'); 380s ***** demo 380s ax = newplot(); 380s h = normplot(ax, [1:20]); 380s ax = gca; 380s h = normplot(ax, [-10:10]); 380s set (ax, "xlim", [-11, 21]); 380s ***** error normplot (); 380s ***** error normplot (23); 380s ***** error normplot (23, [1:20]); 380s ***** error normplot (ones(3,4,5)); 380s ***** test 380s hf = figure ("visible", "off"); 380s unwind_protect 380s ax = newplot (hf); 380s h = normplot (ax, [1:20]); 380s ax = gca; 380s h = normplot(ax, [-10:10]); 380s set (ax, "xlim", [-11, 21]); 380s unwind_protect_cleanup 380s close (hf); 380s end_unwind_protect 380s ***** test 380s hf = figure ("visible", "off"); 380s unwind_protect 380s h = normplot([1:20;5:2:44]'); 380s unwind_protect_cleanup 380s close (hf); 380s end_unwind_protect 380s 6 tests, 6 passed, 0 known failure, 0 skipped 380s [inst/bar3.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/bar3.m 380s ***** demo 380s ## Plotting 5 bars in the same series. 380s 380s z = [50; 40; 30; 20; 10]; 380s bar3 (z); 380s ***** demo 380s ## Plotting 5 bars in different groups. 380s 380s z = [50, 40, 30, 20, 10]; 380s bar3 (z); 380s ***** demo 380s ## A 3D bar graph with each series corresponding to a column in z. 380s 380s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 380s bar3 (z); 380s ***** demo 380s ## Specify y-axis locations as tick names. y must be a column vector! 380s 380s y = [1950, 1960, 1970, 1980, 1990]'; 380s z = [16, 8, 4, 2, 1]'; 380s bar3 (y, z); 380s ***** demo 380s ## Plot 3 series as a grouped plot without any space between the grouped bars 380s 380s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 380s bar3 (z, 1, 'grouped'); 380s ***** demo 380s ## Plot a stacked style 3D bar graph 380s 380s z = [19, 30, 21, 30; 40, 16, 32, 12]; 380s b = bar3 (z, 0.5, 'stacked'); 380s ***** error bar3 ("A") 380s ***** error bar3 ({2,3,4,5}) 380s ***** error ... 380s bar3 ([1,2,3]', ones (2)) 380s ***** error ... 380s bar3 ([1:5], 1.2) 380s ***** error ... 380s bar3 ([1:5]', ones (5), 1.2) 380s ***** error ... 380s bar3 ([1:5]', ones (5), [0.8, 0.7]) 380s ***** error ... 380s bar3 (ones (5), 'width') 380s ***** error ... 380s bar3 (ones (5), 'width', 1.2) 380s ***** error ... 380s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 380s ***** error ... 380s bar3 (ones (5), 'color') 380s ***** error ... 380s bar3 (ones (5), 'color', [0.8, 0.8]) 380s ***** error ... 380s bar3 (ones (5), 'color', "brown") 380s ***** error ... 380s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 380s ***** error ... 380s bar3 (ones (5), 'xlabel') 380s ***** error ... 380s bar3 (ones (5), 'xlabel', 4) 380s ***** error ... 380s bar3 (ones (5), 'ylabel') 380s ***** error ... 380s bar3 (ones (5), 'ylabel', 4) 380s ***** error bar3 (ones (5), 'this', 4) 380s ***** error ... 380s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 380s ***** error ... 380s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 380s 20 tests, 20 passed, 0 known failure, 0 skipped 380s [inst/fullfact.m] 380s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fullfact.m 380s ***** demo 380s ## Full factorial design with 3 ordinal variables 380s fullfact ([2, 3, 4]) 380s ***** error fullfact (); 380s ***** error ... 380s fullfact (Inf); 380s ***** error ... 380s fullfact (NaN); 380s ***** error ... 380s fullfact (ones (2)); 380s ***** error ... 380s fullfact ([1, 2, NaN]); 380s ***** error ... 380s fullfact ([1, 2, Inf]); 380s ***** error fullfact (2.5); 380s ***** error fullfact (0); 380s ***** error fullfact (-3); 380s ***** error fullfact (3+2i); 380s ***** error fullfact ([1, 2, -3]); 380s ***** error fullfact ([0, 1, 2]); 380s ***** test 380s A = fullfact (1); 380s assert (A, 1); 380s ***** test 380s A = fullfact (2); 380s assert (A, [1; 2]); 380s ***** test 380s ***** test 380s A = fullfact (3); 380s assert (A, [1; 2; 3]); 380s ***** test 380s A = fullfact ([1, 2, 4]); 380s A_out = [1, 1, 1; 1, 2, 1; 1, 1, 2; 1, 2, 2; ... 380s 1, 1, 3; 1, 2, 3; 1, 1, 4; 1, 2, 4]; 380s assert (A, A_out); 381s ***** test 381s A = fullfact ([2, 2]); 381s assert (A, [1, 1; 2, 1; 1, 2; 2, 2]); 381s ***** test 381s A = fullfact ([2, 2, 4]); 381s A_out = [1, 1, 1; 2, 1, 1; 1, 2, 1; 2, 2, 1; ... 381s 1, 1, 2; 2, 1, 2; 1, 2, 2; 2, 2, 2; ... 381s 1, 1, 3; 2, 1, 3; 1, 2, 3; 2, 2, 3; ... 381s 1, 1, 4; 2, 1, 4; 1, 2, 4; 2, 2, 4]; 381s assert (A, A_out); 381s ***** test 381s A = fullfact ([3, 2, 4]); 381s A_out = [1, 1, 1; 2, 1, 1; 3, 1, 1; 1, 2, 1; 2, 2, 1; 3, 2, 1; ... 381s 1, 1, 2; 2, 1, 2; 3, 1, 2; 1, 2, 2; 2, 2, 2; 3, 2, 2; ... 381s 1, 1, 3; 2, 1, 3; 3, 1, 3; 1, 2, 3; 2, 2, 3; 3, 2, 3; ... 381s 1, 1, 4; 2, 1, 4; 3, 1, 4; 1, 2, 4; 2, 2, 4; 3, 2, 4]; 381s assert (A, A_out); 381s ***** test 381s A = fullfact ([4, 2]); 381s assert (A, [1, 1; 2, 1; 3, 1; 4, 1; 1, 2; 2, 2; 3, 2; 4, 2]); 381s 21 tests, 21 passed, 0 known failure, 0 skipped 381s [inst/bar3h.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/bar3h.m 381s ***** demo 381s ## Plotting 5 bars in the same series. 381s 381s y = [50; 40; 30; 20; 10]; 381s bar3h (y); 381s ***** demo 381s ## Plotting 5 bars in different groups. 381s 381s y = [50, 40, 30, 20, 10]; 381s bar3h (y); 381s ***** demo 381s ## A 3D bar graph with each series corresponding to a column in y. 381s 381s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 381s bar3h (y); 381s ***** demo 381s ## Specify z-axis locations as tick names. z must be a column vector! 381s 381s z = [1950, 1960, 1970, 1980, 1990]'; 381s y = [16, 8, 4, 2, 1]'; 381s bar3h (z, y); 381s ***** demo 381s ## Plot 3 series as a grouped plot without any space between the grouped bars 381s 381s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 381s bar3h (y, 1, 'grouped'); 381s ***** demo 381s ## Plot a stacked style 3D bar graph 381s 381s y = [19, 30, 21, 30; 40, 16, 32, 12]; 381s b = bar3h (y, 0.5, 'stacked'); 381s ***** error bar3h ("A") 381s ***** error bar3h ({2,3,4,5}) 381s ***** error ... 381s bar3h ([1,2,3]', ones (2)) 381s ***** error ... 381s bar3h ([1:5], 1.2) 381s ***** error ... 381s bar3h ([1:5]', ones (5), 1.2) 381s ***** error ... 381s bar3h ([1:5]', ones (5), [0.8, 0.7]) 381s ***** error ... 381s bar3h (ones (5), 'width') 381s ***** error ... 381s bar3h (ones (5), 'width', 1.2) 381s ***** error ... 381s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 381s ***** error ... 381s bar3h (ones (5), 'color') 381s ***** error ... 381s bar3h (ones (5), 'color', [0.8, 0.8]) 381s ***** error ... 381s bar3h (ones (5), 'color', "brown") 381s ***** error ... 381s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 381s ***** error ... 381s bar3h (ones (5), 'xlabel') 381s ***** error ... 381s bar3h (ones (5), 'xlabel', 4) 381s ***** error ... 381s bar3h (ones (5), 'zlabel') 381s ***** error ... 381s bar3h (ones (5), 'zlabel', 4) 381s ***** error bar3h (ones (5), 'this', 4) 381s ***** error ... 381s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 381s ***** error ... 381s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 381s 20 tests, 20 passed, 0 known failure, 0 skipped 381s [inst/adtest.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/adtest.m 381s ***** error adtest (); 381s ***** error adtest (ones (20,2)); 381s ***** error adtest ([1+i,0-3i]); 381s ***** error ... 381s adtest (ones (20,1), "Distribution", "normal"); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"norm", 5}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"ev", 5}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", 35); 381s ***** error ... 381s adtest (rand (20,1), "Name", "norm"); 381s ***** error ... 381s adtest (rand (20,1), "Name", {"norm", 75, 10}); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 381s ***** error ... 381s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 381s ***** error ... 381s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 381s "Asymptotic", true); 381s ***** error ... 381s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 381s "Alpha", 0.000000001); 381s ***** error ... 381s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 381s "Alpha", 0.999999999); 381s ***** error ... 381s adtest (10); 381s ***** warning ... 381s randn ("seed", 34); 381s adtest (ones (20,1), "Alpha", 0.000001); 381s ***** warning ... 381s randn ("seed", 34); 381s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 381s ***** warning ... 381s randn ("seed", 34); 381s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 381s ***** test 381s load examgrades 381s x = grades(:,1); 381s [h, pval, adstat, cv] = adtest (x); 381s assert (h, false); 381s assert (pval, 0.1854, 1e-4); 381s assert (adstat, 0.5194, 1e-4); 381s assert (cv, 0.7470, 1e-4); 381s ***** test 381s load examgrades 381s x = grades(:,1); 381s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 381s assert (h, false); 381s assert (pval, 0.071363, 1e-6); 381s ***** test 381s load examgrades 381s x = grades(:,1); 381s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 381s assert (h, false); 381s assert (pval, 0.4687, 1e-4); 381s 25 tests, 25 passed, 0 known failure, 0 skipped 381s [inst/stepwisefit.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/stepwisefit.m 381s ***** test 381s % Sample data from Draper and Smith (n = 13, k = 4) 381s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 381s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 381s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 381s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 381s 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]'; 381s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 381s assert(X_use, [4 1]) 381s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 381s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 381s assert(X_use, [4 1]) 381s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 381s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 381s assert(X_use, [4 1]) 381s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 381s 1 test, 1 passed, 0 known failure, 0 skipped 381s [inst/vartest.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/vartest.m 381s ***** error vartest (); 381s ***** error vartest ([1, 2, 3, 4], -0.5); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 0); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "tail", "val"); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "dim", 3); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 381s ***** error ... 381s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 381s ***** test 381s load carsmall 381s [h, pval, ci] = vartest (MPG, 7^2); 381s assert (h, 1); 381s assert (pval, 0.04335086742174443, 1e-14); 381s assert (ci, [49.397; 88.039], 1e-3); 381s ***** test 381s load carsmall 381s [h, pval, ci] = vartest (MPG, 7^2, "tail", "left"); 381s assert (h, 0); 381s assert (pval, 0.978324566289128, 1e-14); 381s assert (ci, [0; 83.685], 1e-3); 381s ***** test 381s load carsmall 381s [h, pval, ci] = vartest (MPG, 7^2, "tail", "right"); 381s assert (h, 1); 381s assert (pval, 0.021675433710872, 1e-14); 381s assert (ci, [51.543; Inf], 1e-3); 381s 14 tests, 14 passed, 0 known failure, 0 skipped 381s [inst/fishertest.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fishertest.m 381s ***** demo 381s ## A Fisher's exact test example 381s 381s x = [3, 1; 1, 3] 381s [h, p, stats] = fishertest(x) 381s ***** assert (fishertest ([3, 4; 5, 7]), false); 381s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 381s ***** test 381s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 381s assert (pval, 1, 1e-14); 381s assert (stats.OddsRatio, 1.05); 381s CI = [0.159222057151289, 6.92429189601808]; 381s assert (stats.ConfidenceInterval, CI, 1e-14) 381s ***** test 381s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 381s assert (pval, 0.08080808080808080, 1e-14); 381s assert (stats.OddsRatio, 0); 381s assert (stats.ConfidenceInterval, [-Inf, Inf]) 381s ***** error fishertest (); 381s ***** error fishertest (1, 2, 3, 4, 5, 6); 381s ***** error ... 381s fishertest (ones (2, 2, 2)); 381s ***** error ... 381s fishertest ([1, 2; -3, 4]); 381s ***** error ... 381s fishertest ([1, 2; 3, 4+i]); 381s ***** error ... 381s fishertest ([1, 2; 3, 4.2]); 381s ***** error ... 381s fishertest ([NaN, 2; 3, 4]); 381s ***** error ... 381s fishertest ([1, Inf; 3, 4]); 381s ***** error ... 381s fishertest (ones (2) * 1e8); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "alpha", 0); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "alpha", 1.2); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "alpha", "val"); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "tail", "val"); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 381s ***** error ... 381s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 381s 19 tests, 19 passed, 0 known failure, 0 skipped 381s [inst/ppplot.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ppplot.m 381s ***** test 381s hf = figure ("visible", "off"); 381s unwind_protect 381s 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]); 381s unwind_protect_cleanup 381s close (hf); 381s end_unwind_protect 381s ***** error ppplot () 381s ***** error ppplot (ones (2,2)) 381s ***** error ppplot (1, 2) 381s ***** error ppplot ([1 2 3 4], 2) 381s 5 tests, 5 passed, 0 known failure, 0 skipped 381s [inst/procrustes.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/procrustes.m 381s ***** demo 381s ## Create some random points in two dimensions 381s n = 10; 381s randn ("seed", 1); 381s X = normrnd (0, 1, [n, 2]); 381s 381s ## Those same points, rotated, scaled, translated, plus some noise 381s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 381s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 381s 381s ## Conform Y to X, plot original X and Y, and transformed Y 381s [d, Z] = procrustes (X, Y); 381s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 381s ***** demo 381s ## Find Procrustes distance and plot superimposed shape 381s 381s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 381s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 381s plot (X(:,1),X(:,2),"x"); 381s hold on 381s plot (Y(:,1),Y(:,2),"o"); 381s xlim ([0 100]); 381s ylim ([0 100]); 381s legend ("Target shape (X)", "Source shape (Y)"); 381s [d, Z] = procrustes (X, Y) 381s plot (Z(:,1), Z(:,2), "s"); 381s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 381s hold off 381s ***** demo 381s ## Apply Procrustes transformation to larger set of points 381s 381s ## Create matrices with landmark points for two triangles 381s X = [5, 0; 5, 5; 8, 5]; # target 381s Y = [0, 0; 1, 0; 1, 1]; # source 381s 381s ## Create a matrix with more points on the source triangle 381s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 381s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 381s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 381s 381s ## Plot both shapes, including the larger set of points for the source shape 381s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 381s hold on 381s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 381s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 381s xlim ([-1 10]); 381s ylim ([-1 6]); 381s legend ("Target shape (X)", "Source shape (Y)", ... 381s "More points on Y", "Location", "northwest"); 381s hold off 381s 381s ## Obtain the Procrustes transformation 381s [d, Z, transform] = procrustes (X, Y) 381s 381s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 381s ## on the source shape onto the target shape, and then visualize the results. 381s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 381s figure 381s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 381s hold on 381s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 381s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 381s xlim ([-1 10]); 381s ylim ([-1 6]); 381s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 381s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 381s legend ("Target shape (X)", "Source shape (Y)", ... 381s "More points on Y", "Transformed source shape (Z)", ... 381s "Transformed additional points", "Location", "northwest"); 381s hold off 381s ***** demo 381s ## Compare shapes without reflection 381s 381s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 381s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 381s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 381s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 381s plot (T(:,1), T(:,2), "x-"); 381s hold on 381s plot (S(:,1), S(:,2), "o-"); 381s legend ("Target shape (d)", "Source shape (b)"); 381s hold off 381s d_false = procrustes (T, S, "reflection", false); 381s printf ("Procrustes distance without reflection: %f\n", d_false); 381s d_true = procrustes (T, S, "reflection", true); 381s printf ("Procrustes distance with reflection: %f\n", d_true); 381s d_best = procrustes (T, S, "reflection", "best"); 381s printf ("Procrustes distance with best fit: %f\n", d_true); 381s ***** error procrustes (); 381s ***** error procrustes (1, 2, 3, 4, 5, 6); 381s ***** error ... 381s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 381s ***** error ... 381s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 381s ***** error ... 381s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 381s ***** error ... 381s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (11, 3)); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 4)); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), true); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 381s ***** error ... 381s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 381s 15 tests, 15 passed, 0 known failure, 0 skipped 381s [inst/knnsearch.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/knnsearch.m 381s ***** demo 381s ## find 10 nearest neighbour of a point using different distance metrics 381s ## and compare the results by plotting 381s load fisheriris 381s X = meas(:,3:4); 381s Y = species; 381s point = [5, 1.45]; 381s 381s ## calculate 10 nearest-neighbours by minkowski distance 381s [id, d] = knnsearch (X, point, "K", 10); 381s 381s ## calculate 10 nearest-neighbours by minkowski distance 381s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 381s 381s ## calculate 10 nearest-neighbours by chebychev distance 381s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 381s 381s ## plotting the results 381s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 381s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 381s xlabel("Petal length (cm)"); 381s ylabel("Petal width (cm)"); 381s 381s line (point(1), point(2), "marker", "X", "color", "k", ... 381s "linewidth", 2, "displayname", "query point") 381s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 381s "linestyle", "none", "markersize", 10, "displayname", "euclidean") 381s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 381s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 381s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 381s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 381s xlim ([4.5 5.5]); 381s ylim ([1 2]); 381s axis square; 381s ***** demo 381s ## knnsearch on iris dataset using kdtree method 381s load fisheriris 381s X = meas(:,3:4); 381s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 381s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 381s 381s ## new point to be predicted 381s point = [5 1.45]; 381s 381s line (point(1), point(2), "marker", "X", "color", "k", ... 381s "linewidth", 2, "displayname", "query point") 381s 381s ## knnsearch using kdtree method 381s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 381s 381s ## plotting predicted neighbours 381s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 381s "linestyle", "none", "markersize", 10, ... 381s "displayname", "nearest neighbour") 381s xlim ([4 6]) 381s ylim ([1 3]) 381s axis square 381s ## details of predicted labels 381s tabulate (species(idx)) 381s 381s ctr = point - d(end); 381s diameter = 2 * d(end); 381s ## Draw a circle around the 10 nearest neighbors. 381s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 381s 381s ## here only 8 neighbours are plotted instead of 10 since the dataset 381s ## contains duplicate values 381s ***** shared X, Y 381s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 381s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * sqrt (2)); 381s ***** test 381s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 381s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * sqrt (2)); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 381s assert (iscell (idx), true); 381s assert (iscell (D), true) 381s assert (idx {1}, [1]); 381s assert (idx {2}', [1, 2]); 381s assert (D{1}, ones (1, 1) * sqrt (2)); 381s assert (D{2}', ones (1, 2) * sqrt (2)); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 381s assert (idx, [1, 2; 1, 2]); 381s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * sqrt (2)); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 381s assert (idx, [1, 2; 1, 2]); 381s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 381s ***** test 381s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 381s yy = [2, 4; 2, 6]; 381s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 381s assert (idx, [3; 2]); 381s assert (D, [0; 3.162277660168377], 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * sqrt (2)); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 381s assert (idx, [1; 1]); 381s assert (D, [2; 2]); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 381s assert (idx, [1; 1]); 381s assert (D, [1; 1]); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 381s assert (idx, [2; 3]); 381s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 381s assert (idx, [1; 1]); 381s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 381s assert (idx, [1; 1]); 381s assert (D, [0.5; 0.5]); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 381s assert (idx, [1; 1]); 381s assert (D, [0.5; 0.5]); 381s ***** test 381s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 381s assert (idx, [1, 2; 1, 2]); 381s assert (D, [0.5, 1; 0.5, 0.5]); 381s ***** test 381s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 381s b = [1, 1]; 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 381s assert (iscell (idx), true); 381s assert (iscell (D), true) 381s assert (cell2mat (idx)', [4, 2, 3, 6, 1, 5, 7, 9]); 381s assert (cell2mat (D)', [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 381s ***** test 381s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 381s b = [1, 1]; 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 381s assert (iscell (idx), true); 381s assert (iscell (D), true) 381s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 381s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 381s ***** test 381s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 381s b = [1, 1]; 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 381s assert (iscell (idx), false); 381s assert (iscell (D), false) 381s assert (idx, [4, 2, 3, 6, 1]); 381s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 381s ***** test 381s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 381s b = [1, 1]; 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 381s assert (iscell (idx), false); 381s assert (iscell (D), false) 381s assert (idx, [4, 2, 3, 6, 1]); 381s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 381s ***** test 381s load fisheriris 381s a = meas; 381s b = min(meas); 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 381s assert (idx, [42, 9, 14, 39, 13]); 381s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874], 1e-4); 381s ***** test 381s load fisheriris 381s a = meas; 381s b = mean(meas); 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 381s assert (idx, [65, 83, 89, 72, 100]); 381s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625], 1e-4); 381s ***** test 381s load fisheriris 381s a = meas; 381s b = max(meas); 381s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 381s assert (idx, [118, 132, 110, 106, 136]); 381s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 381s 381s ***** test 381s load fisheriris 381s a = meas; 381s b = max(meas); 381s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 381s assert (iscell (idx), true); 381s assert (iscell (D), true); 381s assert (cell2mat (idx)', [118, 132, 110, 106, 136]); 381s assert (cell2mat (D)', [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 381s ***** error knnsearch (1) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (4)) 381s ***** error ... 381s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "P", -2) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 381s ***** error ... 381s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 381s 42 tests, 42 passed, 0 known failure, 0 skipped 381s [inst/anova2.m] 381s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/anova2.m 381s ***** demo 381s 381s # Factorial (Crossed) Two-way ANOVA with Interaction 381s 381s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 381s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 381s 381s [p, atab, stats] = anova2(popcorn, 3, "on"); 381s ***** demo 381s 381s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 381s 381s data = [54, 43, 78, 111; 381s 23, 34, 37, 41; 381s 45, 65, 99, 78; 381s 31, 33, 36, 35; 381s 15, 25, 30, 26]; 381s 381s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 381s ***** demo 381s 381s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 381s 381s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 381s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 381s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 381s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 381s 381s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 381s ***** test 381s ## Test for anova2 ("interaction") 381s ## comparison with results from Matlab for column effect 381s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 381s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 381s [p, atab, stats] = anova2 (popcorn, 3, "off"); 381s assert (p(1), 7.678957383294716e-07, 1e-14); 381s assert (p(2), 0.0001003738963050171, 1e-14); 381s assert (p(3), 0.7462153966366274, 1e-14); 381s assert (atab{2,5}, 56.700, 1e-14); 381s assert (atab{2,3}, 2, 0); 381s assert (atab{4,2}, 0.08333333333333348, 1e-14); 381s assert (atab{5,4}, 0.1388888888888889, 1e-14); 381s assert (atab{5,2}, 1.666666666666667, 1e-14); 381s assert (atab{6,2}, 22); 381s assert (stats.source, "anova2"); 381s assert (stats.colmeans, [6.25, 4.75, 4]); 381s assert (stats.inter, 1, 0); 381s assert (stats.pval, 0.7462153966366274, 1e-14); 381s assert (stats.df, 12); 381s ***** test 381s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 381s data = [54, 43, 78, 111; 381s 23, 34, 37, 41; 381s 45, 65, 99, 78; 381s 31, 33, 36, 35; 381s 15, 25, 30, 26]; 381s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 381s assert (atab{2,2}, 2174.95, 1e-10); 381s assert (atab{3,2}, 8371.7, 1e-10); 381s assert (atab{4,2}, 2404.3, 1e-10); 381s assert (atab{5,2}, 12950.95, 1e-10); 381s assert (atab{2,4}, 724.983333333333, 1e-10); 381s assert (atab{3,4}, 2092.925, 1e-10); 381s assert (atab{4,4}, 200.358333333333, 1e-10); 381s assert (atab{2,5}, 3.61843363972882, 1e-10); 381s assert (atab{3,5}, 10.445909412303, 1e-10); 381s assert (atab{2,6}, 0.087266112738617, 1e-10); 381s assert (atab{3,6}, 0.000698397753556, 1e-10); 381s ***** test 381s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 381s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 381s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 381s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 381s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 381s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 381s assert (atab{2,2}, 745.360306290833, 1e-10); 381s assert (atab{3,2}, 278.01854140125, 1e-10); 381s assert (atab{4,2}, 180.180377467501, 1e-10); 381s assert (atab{5,2}, 1203.55922515958, 1e-10); 381s assert (atab{2,4}, 372.680153145417, 1e-10); 381s assert (atab{3,4}, 92.67284713375, 1e-10); 381s assert (atab{4,4}, 10.0100209704167, 1e-10); 381s assert (atab{2,5}, 4.02146005730833, 1e-10); 381s assert (atab{3,5}, 9.25800729165627, 1e-10); 381s assert (atab{2,6}, 0.141597630656771, 1e-10); 381s assert (atab{3,6}, 0.000636643812875719, 1e-10); 382s 3 tests, 3 passed, 0 known failure, 0 skipped 382s [inst/qrandn.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/qrandn.m 382s ***** demo 382s z = qrandn (-5, 5e6); 382s [c x] = hist (z,linspace(-1.5,1.5,200),1); 382s figure(1) 382s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 382s 382s z = qrandn (-0.14286, 5e6); 382s [c x] = hist (z,linspace(-2,2,200),1); 382s figure(2) 382s plot(x,c,"r."); axis tight; axis([-2,2]); 382s 382s z = qrandn (2.75, 5e6); 382s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 382s figure(3) 382s semilogy(x,c,"r."); axis tight; axis([-100,100]); 382s 382s # --------- 382s # Figures from the reference paper. 382s ***** error qrandn ([1 2], 1) 382s ***** error qrandn (4, 1) 382s ***** error qrandn (3, 1) 382s ***** error qrandn (2.5, 1, 2, 3) 382s ***** error qrandn (2.5) 382s ***** test 382s q = 1.5; 382s s = [2, 3]; 382s z = qrandn (q, s); 382s assert (isnumeric (z) && isequal (size (z), s)); 382s 6 tests, 6 passed, 0 known failure, 0 skipped 382s [inst/isoutlier.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/isoutlier.m 382s ***** demo 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s TF = isoutlier (A, "mean") 382s ***** demo 382s ## Use a moving detection method to detect local outliers in a sine wave 382s 382s x = -2*pi:0.1:2*pi; 382s A = sin(x); 382s A(47) = 0; 382s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 382s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 382s plot (time, A) 382s hold on 382s plot (time(TF), A(TF), "x") 382s datetick ('x', 20, 'keepticks') 382s legend ("Original Data", "Outlier Data") 382s ***** demo 382s ## Locate an outlier in a vector of data and visualize the outlier 382s 382s x = 1:10; 382s A = [60 59 49 49 58 100 61 57 48 58]; 382s [TF, L, U, C] = isoutlier (A); 382s plot (x, A); 382s hold on 382s plot (x(TF), A(TF), "x"); 382s xlim ([1,10]); 382s line ([1,10], [L, L], "Linestyle", ":"); 382s text (1.1, L-2, "Lower Threshold"); 382s line ([1,10], [U, U], "Linestyle", ":"); 382s text (1.1, U-2, "Upper Threshold"); 382s line ([1,10], [C, C], "Linestyle", ":"); 382s text (1.1, C-3, "Center Value"); 382s legend ("Original Data", "Outlier Data"); 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 382s assert (isoutlier (A, "median"), ... 382s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "mean"); 382s assert (L, -109.2459044922864, 1e-12) 382s assert (U, 264.9792378256198, 1e-12) 382s assert (C, 77.8666666666666, 1e-12) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "median"); 382s assert (L, 50.104386688966386, 1e-12) 382s assert (U, 67.895613311033610, 1e-12) 382s assert (C, 59) 382s ***** test 382s A = magic(5) + diag(200*ones(1,5)); 382s T = logical (eye (5)); 382s assert (isoutlier (A, 2), T) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 382s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 382s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 382s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 382s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 382s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 382s assert (L, l, 1e-4) 382s assert (U, u, 1e-4) 382s assert (C, c) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 382s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 382s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 382s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 382s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 382s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 382s assert (L, l, 1e-4) 382s assert (U, u, 1e-4) 382s assert (C, c) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "movmean", 5); 382s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 382s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 382s 52.5979, 51.0627]; 382s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 382s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 382s 66.9373]; 382s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 382s 60.6, 59.8, 59.25, 59]; 382s assert (L, l, 1e-4) 382s assert (U, u, 1e-4) 382s assert (C, c, 1e-4) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 382s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 382s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 382s 52.5979, 51.0627]; 382s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 382s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 382s 66.9373]; 382s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 382s 60.6, 59.8, 59.25, 59]; 382s assert (L, l, 1e-4) 382s assert (U, u, 1e-4) 382s assert (C, c, 1e-4) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "gesd"); 382s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 34.235977035439944, 1e-12) 382s assert (U, 89.764022964560060, 1e-12) 382s assert (C, 62) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 382s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 31.489256770616173, 1e-12) 382s assert (U, 92.510743229383820, 1e-12) 382s assert (C, 62) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 382s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 23.976664158788935, 1e-12) 382s assert (U, 100.02333584121110, 1e-12) 382s assert (C, 62) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "grubbs"); 382s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 54.642809574646606, 1e-12) 382s assert (U, 63.511036579199555, 1e-12) 382s assert (C, 59.076923076923080, 1e-12) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 382s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 54.216083184201850, 1e-12) 382s assert (U, 63.937762969644310, 1e-12) 382s assert (C, 59.076923076923080, 1e-12) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 382s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 382s assert (L, 57) 382s assert (U, 100) 382s assert (C, 78.5) 382s ***** test 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 382s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 382s assert (L, 57.5) 382s assert (U, 62) 382s assert (C, 59.75) 382s ***** shared A 382s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 382s ***** error ... 382s isoutlier (A, "movmedian", 0); 382s ***** error ... 382s isoutlier (A, "movmedian", []); 382s ***** error ... 382s isoutlier (A, "movmedian", [2 3 4]); 382s ***** error ... 382s isoutlier (A, "movmedian", 1.4); 382s ***** error ... 382s isoutlier (A, "movmedian", [0 1]); 382s ***** error ... 382s isoutlier (A, "movmedian", [2 -1]); 382s ***** error ... 382s isoutlier (A, "movmedian", {2 3}); 382s ***** error ... 382s isoutlier (A, "movmedian", "char"); 382s 382s ***** error ... 382s isoutlier (A, "movmean", 0); 382s ***** error ... 382s isoutlier (A, "movmean", []); 382s ***** error ... 382s isoutlier (A, "movmean", [2 3 4]); 382s ***** error ... 382s isoutlier (A, "movmean", 1.4); 382s ***** error ... 382s isoutlier (A, "movmean", [0 1]); 382s ***** error ... 382s isoutlier (A, "movmean", [2 -1]); 382s ***** error ... 382s isoutlier (A, "movmean", {2 3}); 382s ***** error ... 382s isoutlier (A, "movmean", "char"); 382s 382s ***** error ... 382s isoutlier (A, "percentiles", [-1 90]); 382s ***** error ... 382s isoutlier (A, "percentiles", [10 -90]); 382s ***** error ... 382s isoutlier (A, "percentiles", [90]); 382s ***** error ... 382s isoutlier (A, "percentiles", [90 20]); 382s ***** error ... 382s isoutlier (A, "percentiles", [90 20]); 382s ***** error ... 382s isoutlier (A, "percentiles", [10 20 90]); 382s ***** error ... 382s isoutlier (A, "percentiles", {10 90}); 382s ***** error ... 382s isoutlier (A, "percentiles", "char"); 382s 382s ***** error ... 382s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "SamplePoints", 15); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 382s 382s ***** error ... 382s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 382s ***** error ... 382s isoutlier (A, "gesd", "ThresholdFactor", 3); 382s ***** error ... 382s isoutlier (A, "grubbs", "ThresholdFactor", 3); 382s 382s ***** error ... 382s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 382s ***** error ... 382s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 382s 382s ***** error ... 382s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 382s ***** error isoutlier (A, {1}); 382s ***** error isoutlier (A, true); 382s ***** error isoutlier (A, false); 382s ***** error isoutlier (A, 0); 382s ***** error isoutlier (A, [1 2]); 382s ***** error isoutlier (A, -2); 382s 59 tests, 59 passed, 0 known failure, 0 skipped 382s [inst/cmdscale.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cmdscale.m 382s ***** shared m, n, X, D 382s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 382s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 382s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 382s 2 tests, 2 passed, 0 known failure, 0 skipped 382s [inst/fitgmdist.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitgmdist.m 382s ***** demo 382s ## Generate a two-cluster problem 382s C1 = randn (100, 2) + 2; 382s C2 = randn (100, 2) - 2; 382s data = [C1; C2]; 382s 382s ## Perform clustering 382s GMModel = fitgmdist (data, 2); 382s 382s ## Plot the result 382s figure 382s [heights, bins] = hist3([C1; C2]); 382s [xx, yy] = meshgrid(bins{1}, bins{2}); 382s bbins = [xx(:), yy(:)]; 382s contour (reshape (GMModel.pdf (bbins), size (heights))); 382s ***** demo 382s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 382s nbOrientations = 2; 382s initial_orientations = [38.0; 18.0]; 382s initial_weights = ones (1, nbOrientations) / nbOrientations; 382s initial_Sigma = 10 * ones (1, 1, nbOrientations); 382s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 382s "ComponentProportion", initial_weights); 382s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 382s "RegularizationValue", 0.0001) 382s ***** test 382s load fisheriris 382s classes = unique (species); 382s [~, score] = pca (meas, "NumComponents", 2); 382s options.MaxIter = 1000; 382s options.TolFun = 1e-6; 382s options.Display = "off"; 382s GMModel = fitgmdist (score, 2, "Options", options); 382s assert (isa (GMModel, "gmdistribution"), true); 382s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 382s 1 test, 1 passed, 0 known failure, 0 skipped 382s [inst/cluster.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cluster.m 382s ***** error cluster () 382s ***** error cluster ([1 1], "Cutoff", 1) 382s ***** error cluster ([1 2 1], "Bogus", 1) 382s ***** error cluster ([1 2 1], "Cutoff", -1) 382s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 382s ***** test 382s 6 tests, 6 passed, 0 known failure, 0 skipped 382s [inst/ttest2.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ttest2.m 382s ***** test 382s a = 1:5; 382s b = 6:10; 382s b(5) = NaN; 382s [h,p,ci,stats] = ttest2 (a,b); 382s assert (h, 1); 382s assert (p, 0.002535996080258229, 1e-14); 382s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 382s assert (stats.tstat, -4.582575694955839, 1e-14); 382s assert (stats.df, 7); 382s assert (stats.sd, 1.4638501094228, 1e-13); 382s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 382s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 382s 3 tests, 3 passed, 0 known failure, 0 skipped 382s [inst/nanmin.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/nanmin.m 382s ***** demo 382s ## Find the column minimum values and their indices 382s ## for matrix data with missing values. 382s 382s x = magic (3); 382s x([1, 6:9]) = NaN 382s [y, ind] = nanmin (x) 382s ***** demo 382s ## Find the minimum of all the values in an array, ignoring missing values. 382s ## Create a 2-by-5-by-3 array x with some missing values. 382s 382s x = reshape (1:30, [2, 5, 3]); 382s x([10:12, 25]) = NaN 382s 382s ## Find the minimum of the elements of x. 382s 382s y = nanmin (x, [], 'all') 382s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 382s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 382s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 382s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 382s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 382s ***** shared x, y 382s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 382s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 382s y = x; 382s y(2,3,1) = 0.51; 382s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 382s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 382s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 382s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 382s ***** assert (nanmin (x, [], 'all'), -2.95) 382s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 382s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 382s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 382s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 382s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 382s ***** test 382s xx = repmat ([1:20;6:25], [5 2 6 3]); 382s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 382s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 382s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 382s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 382s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 382s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 382s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 382s ***** assert (nanmin (magic (3), [], 3), magic (3)) 382s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 382s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 382s ***** assert (nanmin (ones (2), 3), ones (2,2)) 382s ***** error ... 382s nanmin (y, [], [1, 1, 2]) 382s ***** error ... 382s [v, idx] = nanmin(x, y, [1 2]) 382s 24 tests, 24 passed, 0 known failure, 0 skipped 382s [inst/confusionchart.m] 382s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/confusionchart.m 382s ***** demo 382s close all 382s ## Setting the chart properties 382s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 382s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 382s confusionchart (Yt, Yp, "Title", ... 382s "Demonstration with summaries","Normalization",... 382s "absolute","ColumnSummary", "column-normalized","RowSummary",... 382s "row-normalized") 382s ***** demo 382s close all 382s ## Cellstr as inputs 382s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 382s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 382s m = confusionmat (Yt, Yp); 382s confusionchart (m, {"Positive", "Negative"}); 382s hold off 382s ***** demo 382s close all 382s ## Editing the object properties 382s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 382s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 382s cm = confusionchart (Yt, Yp); 382s cm.Title = "This is an example with a green diagonal"; 382s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 382s hold off 382s ***** demo 382s close all 382s ## Confusion chart in a uipanel 382s h = uipanel (); 382s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 382s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 382s cm = confusionchart (h, Yt, Yp); 382s hold off 382s ***** demo 382s close all 382s ## Sorting classes 382s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 382s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 382s cm = confusionchart (Yt, Yp, "Title", ... 382s "Classes are sorted in ascending order"); 382s cm = confusionchart (Yt, Yp, "Title", ... 382s "Classes are sorted according to clusters"); 382s sortClasses (cm, "cluster"); 382s ***** shared visibility_setting 382s visibility_setting = get (0, "DefaultFigureVisible"); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ()", "Invalid call"); 382s set (0, "DefaultFigureVisible", visibility_setting); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 382s set (0, "DefaultFigureVisible", visibility_setting); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 382s set (0, "DefaultFigureVisible", visibility_setting); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 382s set (0, "DefaultFigureVisible", visibility_setting); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 382s ".* YLabel .* string"); 382s set (0, "DefaultFigureVisible", visibility_setting); 382s ***** test 382s set (0, "DefaultFigureVisible", "off"); 382s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 382s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 383s ".* FontName .* string"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 383s ".* FontSize .* numeric"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 383s ".* DiagonalColor .* color"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 383s ".* OffDiagonalColor .* color"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 383s ".* invalid .* Normalization"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 383s ".* invalid .* ColumnSummary"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 383s ".* invalid .* RowSummary"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 383s ".* invalid .* GridVisible"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 383s ".* invalid .* HandleVisibility"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 383s ".* invalid .* OuterPosition"); 383s set (0, "DefaultFigureVisible", visibility_setting); 383s ***** test 383s set (0, "DefaultFigureVisible", "off"); 383s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 383s ".* invalid .* Position"); 383s set (0, "DefaultFigureVisible", visibility_setting); 384s ***** test 384s set (0, "DefaultFigureVisible", "off"); 384s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 384s set (0, "DefaultFigureVisible", visibility_setting); 384s 18 tests, 18 passed, 0 known failure, 0 skipped 384s [inst/squareform.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/squareform.m 384s ***** shared v, m 384s v = 1:6; 384s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 384s ***** assert (squareform (v), m) 384s ***** assert (squareform (squareform (v)), v) 384s ***** assert (squareform (m), v) 384s ***** assert (squareform (v'), m) 384s ***** assert (squareform (1), [0 1;1 0]) 384s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 384s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 384s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 384s ***** test 384s for c = {@single, @double, @uint8, @uint32, @uint64} 384s f = c{1}; 384s assert (squareform (f (v)), f (m)) 384s assert (squareform (f (m)), f (v)) 384s endfor 384s 9 tests, 9 passed, 0 known failure, 0 skipped 384s [inst/signrank.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/signrank.m 384s ***** test 384s load gradespaired.mat 384s [p, h, stats] = signrank (gradespaired(:,1), ... 384s gradespaired(:,2), 'tail', 'left'); 384s assert (p, 0.0047, 1e-4); 384s assert (h, true); 384s assert (stats.zval, -2.5982, 1e-4); 384s assert (stats.signedrank, 2017.5); 384s ***** test 384s load ('gradespaired.mat'); 384s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 384s 'tail', 'left', 'method', 'exact'); 384s assert (p, 0.0045, 1e-4); 384s assert (h, true); 384s assert (stats.zval, NaN); 384s assert (stats.signedrank, 2017.5); 384s ***** test 384s load mileage 384s [p, h, stats] = signrank (mileage(:,2), 33); 384s assert (p, 0.0312, 1e-4); 384s assert (h, true); 384s assert (stats.zval, NaN); 384s assert (stats.signedrank, 21); 384s ***** test 384s load mileage 384s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 384s assert (p, 0.0156, 1e-4); 384s assert (h, true); 384s assert (stats.zval, NaN); 384s assert (stats.signedrank, 21); 384s ***** test 384s load mileage 384s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 384s 'alpha', 0.01, 'method', 'approximate'); 384s assert (p, 0.0180, 1e-4); 384s assert (h, false); 384s assert (stats.zval, 2.0966, 1e-4); 384s assert (stats.signedrank, 21); 384s ***** error signrank (ones (2)) 384s ***** error ... 384s signrank ([1, 2, 3, 4], ones (2)) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [1, 2, 3]) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'tail') 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'alpha', 0) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'alpha', "a") 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'tail', "some") 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'method', 0.01) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'method', "some") 384s ***** error ... 384s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 384s 22 tests, 22 passed, 0 known failure, 0 skipped 384s [inst/hmmviterbi.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hmmviterbi.m 384s ***** test 384s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 384s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 384s transprob = [0.8, 0.2; 0.4, 0.6]; 384s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 384s vpath = hmmviterbi (sequence, transprob, outprob); 384s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 384s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 384s assert (vpath, expected); 384s ***** test 384s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 384s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 384s transprob = [0.8, 0.2; 0.4, 0.6]; 384s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 384s symbols = {"A", "B", "C"}; 384s statenames = {"One", "Two"}; 384s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 384s "statenames", statenames); 384s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 384s "One", "One", "One", "One", "One", "One", "One", "Two", ... 384s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 384s assert (vpath, expected); 384s 2 tests, 2 passed, 0 known failure, 0 skipped 384s [inst/manova1.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/manova1.m 384s ***** demo 384s load carbig 384s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 384s ***** test 384s load carbig 384s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 384s assert (d, 3); 384s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 384s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 384s ***** test 384s load carbig 384s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 384s assert (d, 2); 384s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 384s [1e-12, 1e-12, 1e-12]'); 384s 2 tests, 2 passed, 0 known failure, 0 skipped 384s [inst/linkage.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/linkage.m 384s ***** shared x, t 384s x = reshape (mod (magic (6),5), [], 3); 384s t = 1e-6; 384s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 384s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 384s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 384s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 384s lastwarn(); # Clear last warning before the test 384s ***** warning linkage (pdist (x), "centroid"); 384s ***** test 384s warning off Octave:clustering 384s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 384s warning on Octave:clustering 384s ***** warning linkage (pdist (x), "median"); 384s ***** test 384s warning off Octave:clustering 384s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 384s warning on Octave:clustering 384s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 384s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 384s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 384s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 384s 12 tests, 12 passed, 0 known failure, 0 skipped 384s [inst/binotest.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/binotest.m 384s ***** demo 384s % flip a coin 1000 times, showing 475 heads 384s % Hypothesis: coin is fair, i.e. p=1/2 384s [h,p_val,ci] = binotest(475,1000,0.5) 384s % Result: h = 0 : null hypothesis not rejected, coin could be fair 384s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 384s % 0.444 <= p <= 0.506 with 95% confidence 384s ***** demo 384s % flip a coin 100 times, showing 65 heads 384s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 384s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 384s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 384s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 384s % 0 <= p <= 0.76 with 99% confidence 384s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 384s [h,p_val,ci] = binotest (51,235,1/6); 384s assert (p_val, 0.0437, 0.00005) 384s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 384s assert (p_val, 0.027, 0.0005) 384s 1 test, 1 passed, 0 known failure, 0 skipped 384s [inst/normalise_distribution.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/normalise_distribution.m 384s ***** test 384s v = normalise_distribution ([1 2 3], [], 1); 384s assert (v, [0 0 0]) 384s ***** test 384s v = normalise_distribution ([1 2 3], [], 2); 384s assert (v, norminv ([1 3 5] / 6), 3 * eps) 384s ***** test 384s v = normalise_distribution ([1 2 3]', [], 2); 384s assert (v, [0 0 0]') 384s ***** test 384s v = normalise_distribution ([1 2 3]', [], 1); 384s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 384s ***** test 384s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 384s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 384s ***** test 384s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 384s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 384s ***** test 384s A = randn ( 10 ); 384s N = normalise_distribution (A, @normcdf); 384s assert (A, N, 10000 * eps) 384s ***** test 384s A = exprnd (1, 100); 384s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 384s assert (mean (vec (N)), 0, 0.1) 384s assert (std (vec (N)), 1, 0.1) 384s ***** test 384s A = rand (1000,1); 384s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 384s assert (mean (vec (N)), 0, 0.2) 384s assert (std (vec (N)), 1, 0.1) 384s ***** test 384s A = [rand(1000,1), randn(1000, 1)]; 384s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 384s assert (mean (N), [0, 0], 0.2) 384s assert (std (N), [1, 1], 0.1) 384s ***** test 384s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 384s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 384s assert (mean (N, 2), [0, 0, 0]', 0.2); 384s assert (std (N, [], 2), [1, 1, 1]', 0.1); 384s ***** xtest 384s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 384s N = normalise_distribution (A); 384s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 384s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 384s ***** test 384s ***** error normalise_distribution (zeros (3, 4), ... 384s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 384s 14 tests, 14 passed, 0 known failure, 0 skipped 384s [inst/fitlm.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/fitlm.m 384s ***** demo 384s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 384s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 384s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 384s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 384s 25.694 ]'; 384s 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]'; 384s 384s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 384s ***** demo 384s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 384s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 384s brands = {'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'}; 384s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 384s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 384s 384s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 384s "CategoricalVars",[1,2],"display","on"); 384s ***** test 384s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 384s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 384s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 384s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 384s 25.694 ]'; 384s 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]'; 384s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 384s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 384s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 384s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 384s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 384s assert (TAB{2,2}, 10, 1e-04); 384s assert (TAB{3,2}, 7.99999999999999, 1e-09); 384s assert (TAB{4,2}, 8.99999999999999, 1e-09); 384s assert (TAB{5,2}, 11.0001428571429, 1e-09); 384s assert (TAB{6,2}, 19.0001111111111, 1e-09); 384s assert (TAB{2,3}, 1.01775379540949, 1e-09); 384s assert (TAB{3,3}, 1.64107868458008, 1e-09); 384s assert (TAB{4,3}, 1.43932122062479, 1e-09); 384s assert (TAB{5,3}, 1.48983900477565, 1e-09); 384s assert (TAB{6,3}, 1.3987687997822, 1e-09); 384s assert (TAB{2,6}, 9.82555903510687, 1e-09); 384s assert (TAB{3,6}, 4.87484242844031, 1e-09); 384s assert (TAB{4,6}, 6.25294748040552, 1e-09); 384s assert (TAB{5,6}, 7.38344399756088, 1e-09); 384s assert (TAB{6,6}, 13.5834536158296, 1e-09); 384s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 384s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 384s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 384s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 384s ***** test 384s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 384s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 384s brands = bsxfun (@times, ones(6,1), [1,2,3]); 384s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 384s 384s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 384s "categoricalvars",[1,2],"display","off"); 384s assert (TAB{2,2}, 5.66666666666667, 1e-09); 384s assert (TAB{3,2}, -1.33333333333333, 1e-09); 384s assert (TAB{4,2}, -2.16666666666667, 1e-09); 384s assert (TAB{5,2}, 1.16666666666667, 1e-09); 384s assert (TAB{6,2}, -0.333333333333334, 1e-09); 384s assert (TAB{7,2}, -0.166666666666667, 1e-09); 384s assert (TAB{2,3}, 0.215165741455965, 1e-09); 384s assert (TAB{3,3}, 0.304290309725089, 1e-09); 384s assert (TAB{4,3}, 0.304290309725089, 1e-09); 384s assert (TAB{5,3}, 0.304290309725089, 1e-09); 384s assert (TAB{6,3}, 0.43033148291193, 1e-09); 384s assert (TAB{7,3}, 0.43033148291193, 1e-09); 384s assert (TAB{2,6}, 26.3362867542108, 1e-09); 384s assert (TAB{3,6}, -4.38178046004138, 1e-09); 384s assert (TAB{4,6}, -7.12039324756724, 1e-09); 384s assert (TAB{5,6}, 3.83405790253621, 1e-09); 384s assert (TAB{6,6}, -0.774596669241495, 1e-09); 384s assert (TAB{7,6}, -0.387298334620748, 1e-09); 384s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 384s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 384s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 384s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 384s assert (TAB{6,7}, 0.453570536021938, 1e-09); 384s assert (TAB{7,7}, 0.705316781644046, 1e-09); 384s ## Test with string ids for categorical variables 384s brands = {'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'; ... 384s 'Gourmet', 'National', 'Generic'}; 384s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 384s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 384s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 384s "categoricalvars",[1,2],"display","off"); 384s ***** test 384s load carsmall 384s X = [Weight,Horsepower,Acceleration]; 384s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 384s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 384s assert (TAB{2,2}, 47.9767628118615, 1e-09); 384s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 384s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 384s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 384s assert (TAB{2,3}, 3.87851641748551, 1e-09); 384s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 384s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 384s assert (TAB{5,3}, 0.193325043113178, 1e-09); 384s assert (TAB{2,6}, 12.369874881944, 1e-09); 384s assert (TAB{3,6}, -5.80228828790225, 1e-09); 384s assert (TAB{4,6}, -1.76626492228599, 1e-09); 384s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 384s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 384s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 384s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 384s assert (TAB{5,7}, 0.952359384151778, 1e-09); 384s 3 tests, 3 passed, 0 known failure, 0 skipped 384s [inst/gmdistribution.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/gmdistribution.m 384s ***** test 384s mu = eye(2); 384s Sigma = eye(2); 384s GM = gmdistribution (mu, Sigma); 384s density = GM.pdf ([0 0; 1 1]); 384s assert (density(1) - density(2), 0, 1e-6); 384s 384s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 384s assert (idx, [1; 2]); 384s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 384s assert (nlogl - nlogl2, 0, 1e-6); 384s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 384s assert (P - P3, zeros (2), 1e-6); 384s [idx4,nlogl4] = cluster (GM, eye(2)); 384s assert (size (nlogl4), [1 1]); 384s idx5 = cluster (GM, eye(2)); 384s assert (idx - idx5, zeros (2,1)); 384s 384s D = GM.mahal ([1;0]); 384s assert (D - M(1,:), zeros (1,2), 1e-6); 384s 384s P = GM.posterior ([0 1]); 384s assert (P - P2(2,:), zeros (1,2), 1e-6); 384s 384s R = GM.random(20); 384s assert (size(R), [20, 2]); 384s 384s R = GM.random(); 384s assert (size(R), [1, 2]); 384s 1 test, 1 passed, 0 known failure, 0 skipped 384s [inst/friedman.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/friedman.m 384s ***** demo 384s load popcorn; 384s friedman (popcorn, 3); 384s ***** demo 384s load popcorn; 384s [p, atab] = friedman (popcorn, 3, "off"); 384s disp (p); 384s ***** test 384s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 384s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 384s [p, atab] = friedman (popcorn, 3, "off"); 384s assert (p, 0.001028853354594794, 1e-14); 384s assert (atab{2,2}, 99.75, 1e-14); 384s assert (atab{2,3}, 2, 0); 384s assert (atab{2,4}, 49.875, 1e-14); 384s assert (atab{2,5}, 13.75862068965517, 1e-14); 384s assert (atab{2,6}, 0.001028853354594794, 1e-14); 384s assert (atab{3,2}, 0.08333333333333215, 1e-14); 384s assert (atab{3,4}, 0.04166666666666607, 1e-14); 384s assert (atab{4,3}, 12, 0); 384s ***** test 384s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 384s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 384s [p, atab, stats] = friedman (popcorn, 3, "off"); 384s assert (atab{5,2}, 116, 0); 384s assert (atab{5,3}, 17, 0); 384s assert (stats.source, "friedman"); 384s assert (stats.n, 2); 384s assert (stats.meanranks, [8, 4.75, 2.25], 0); 384s assert (stats.sigma, 2.692582403567252, 1e-14); 384s 2 tests, 2 passed, 0 known failure, 0 skipped 384s [inst/mnrfit.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/mnrfit.m 384s ***** error mnrfit (ones (50,1)) 384s ***** error ... 384s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 384s ***** error ... 384s mnrfit (ones (50, 4, 2), ones (50, 1)) 384s ***** error ... 384s mnrfit (ones (50, 4), ones (50, 1, 3)) 384s ***** error ... 384s mnrfit (ones (50, 4), ones (45,1)) 384s ***** error ... 384s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 384s ***** error ... 384s mnrfit (ones (5, 4), ones (5, 1), "model") 384s ***** error ... 384s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 384s ***** error ... 384s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 384s ***** error ... 384s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 384s ***** error ... 384s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 384s ***** error ... 384s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 384s ***** error ... 384s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 384s 13 tests, 13 passed, 0 known failure, 0 skipped 384s [inst/regress_gp.m] 384s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/regress_gp.m 384s ***** demo 384s ## Linear fitting of 1D Data 384s rand ("seed", 125); 384s X = 2 * rand (5, 1) - 1; 384s randn ("seed", 25); 384s Y = 2 * X - 1 + 0.3 * randn (5, 1); 384s 384s ## Points for interpolation/extrapolation 384s Xfit = linspace (-2, 2, 10)'; 384s 384s ## Fit regression model 384s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 384s 384s ## Plot fitted data 384s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 384s title ("Gaussian process regression with linear kernel"); 384s ***** demo 384s ## Linear fitting of 2D Data 384s rand ("seed", 135); 384s X = 2 * rand (4, 2) - 1; 384s randn ("seed", 35); 384s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 384s 384s ## Mesh for interpolation/extrapolation 384s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 384s Xfit = [x1(:), x2(:)]; 384s 384s ## Fit regression model 384s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 384s Ypred = reshape (Ypred, 10, 10); 384s YintU = reshape (Yint(:,1), 10, 10); 384s YintL = reshape (Yint(:,2), 10, 10); 384s 384s ## Plot fitted data 384s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 384s hold on; 384s h = mesh (x1, x2, Ypred, zeros (10, 10)); 384s set (h, "facecolor", "none", "edgecolor", "yellow"); 384s h = mesh (x1, x2, YintU, ones (10, 10)); 384s set (h, "facecolor", "none", "edgecolor", "cyan"); 384s h = mesh (x1, x2, YintL, ones (10, 10)); 384s set (h, "facecolor", "none", "edgecolor", "cyan"); 384s hold off 384s axis tight 384s view (75, 25) 384s title ("Gaussian process regression with linear kernel"); 384s ***** demo 384s ## Projection over basis function with linear kernel 384s pp = [2, 2, 0.3, 1]; 384s n = 10; 384s rand ("seed", 145); 384s X = 2 * rand (n, 1) - 1; 384s randn ("seed", 45); 384s Y = polyval (pp, X) + 0.3 * randn (n, 1); 384s 384s ## Powers 384s px = [sqrt(abs(X)), X, X.^2, X.^3]; 384s 384s ## Points for interpolation/extrapolation 384s Xfit = linspace (-1, 1, 100)'; 384s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 384s 384s ## Define a prior covariance assuming that the sqrt component is not present 384s Sp = 100 * eye (size (px, 2) + 1); 384s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 384s 384s ## Fit regression model 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 384s 384s ## Plot fitted data 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("Linear kernel over basis function with prior covariance"); 384s ***** demo 384s ## Projection over basis function with linear kernel 384s pp = [2, 2, 0.3, 1]; 384s n = 10; 384s rand ("seed", 145); 384s X = 2 * rand (n, 1) - 1; 384s randn ("seed", 45); 384s Y = polyval (pp, X) + 0.3 * randn (n, 1); 384s 384s ## Powers 384s px = [sqrt(abs(X)), X, X.^2, X.^3]; 384s 384s ## Points for interpolation/extrapolation 384s Xfit = linspace (-1, 1, 100)'; 384s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 384s 384s ## Fit regression model without any assumption on prior covariance 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 384s 384s ## Plot fitted data 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("Linear kernel over basis function without prior covariance"); 384s ***** demo 384s ## Projection over basis function with rbf kernel 384s pp = [2, 2, 0.3, 1]; 384s n = 10; 384s rand ("seed", 145); 384s X = 2 * rand (n, 1) - 1; 384s randn ("seed", 45); 384s Y = polyval (pp, X) + 0.3 * randn (n, 1); 384s 384s ## Powers 384s px = [sqrt(abs(X)), X, X.^2, X.^3]; 384s 384s ## Points for interpolation/extrapolation 384s Xfit = linspace (-1, 1, 100)'; 384s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 384s 384s ## Fit regression model with RBF kernel (standard parameters) 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 384s 384s ## Plot fitted data 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("RBF kernel over basis function with standard parameters"); 384s text (-0.5, 4, "theta = 5\n g = 0.01"); 384s ***** demo 384s ## Projection over basis function with rbf kernel 384s pp = [2, 2, 0.3, 1]; 384s n = 10; 384s rand ("seed", 145); 384s X = 2 * rand (n, 1) - 1; 384s randn ("seed", 45); 384s Y = polyval (pp, X) + 0.3 * randn (n, 1); 384s 384s ## Powers 384s px = [sqrt(abs(X)), X, X.^2, X.^3]; 384s 384s ## Points for interpolation/extrapolation 384s Xfit = linspace (-1, 1, 100)'; 384s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 384s 384s ## Fit regression model with RBF kernel with different parameters 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 384s 384s ## Plot fitted data 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("GP regression with RBF kernel and non default parameters"); 384s text (-0.5, 4, "theta = 10\n g = 0.01"); 384s 384s ## Fit regression model with RBF kernel with different parameters 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 384s 384s ## Plot fitted data 384s figure 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("GP regression with RBF kernel and non default parameters"); 384s text (-0.5, 4, "theta = 50\n g = 0.01"); 384s 384s ## Fit regression model with RBF kernel with different parameters 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 384s 384s ## Plot fitted data 384s figure 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("GP regression with RBF kernel and non default parameters"); 384s text (-0.5, 4, "theta = 50\n g = 0.001"); 384s 384s ## Fit regression model with RBF kernel with different parameters 384s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 384s 384s ## Plot fitted data 384s figure 384s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 384s Xfit, polyval (pp, Xfit), "g-;True;"); 384s axis tight 384s axis manual 384s hold on 384s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 384s hold off 384s title ("GP regression with RBF kernel and non default parameters"); 384s text (-0.5, 4, "theta = 50\n g = 0.05"); 384s ***** demo 384s ## RBF fitting on noiseless 1D Data 384s x = [0:2*pi/7:2*pi]'; 384s y = 5 * sin (x); 384s 384s ## Predictive grid of 500 equally spaced locations 384s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 384s 384s ## Fit regression model with RBF kernel 384s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 384s 384s ## Plot fitted data 384s r = mvnrnd (Yfit, diag (Ysd)', 50); 384s plot (xi, r', "c-"); 384s hold on 384s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 384s plot (x, y, ".k;Predictor points;", "markersize", 20) 384s plot (xi, 5 * sin (xi), "-y;True Function;"); 384s xlim ([-0.5,2*pi+0.5]); 384s ylim ([-10,10]); 384s hold off 384s title ("GP regression with RBF kernel on noiseless 1D data"); 384s text (0, -7, "theta = 5\n g = 0.01"); 384s ***** demo 384s ## RBF fitting on noisy 1D Data 384s x = [0:2*pi/7:2*pi]'; 384s x = [x; x]; 384s y = 5 * sin (x) + randn (size (x)); 384s 384s ## Predictive grid of 500 equally spaced locations 384s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 384s 384s ## Fit regression model with RBF kernel 384s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 384s 384s ## Plot fitted data 384s r = mvnrnd (Yfit, diag (Ysd)', 50); 384s plot (xi, r', "c-"); 384s hold on 384s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 384s plot (x, y, ".k;Predictor points;", "markersize", 20) 384s plot (xi, 5 * sin (xi), "-y;True Function;"); 384s xlim ([-0.5,2*pi+0.5]); 384s ylim ([-10,10]); 384s hold off 384s title ("GP regression with RBF kernel on noisy 1D data"); 384s text (0, -7, "theta = 5\n g = 0.01"); 384s ***** error regress_gp (ones (20, 2)) 384s ***** error regress_gp (ones (20, 2), ones (20, 1)) 384s ***** error ... 384s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 385s ***** error ... 385s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 385s 22 tests, 22 passed, 0 known failure, 0 skipped 385s [inst/hmmestimate.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hmmestimate.m 385s ***** test 385s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 385s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 385s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 385s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 385s [transprobest, outprobest] = hmmestimate (sequence, states); 385s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 385s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 385s assert (transprobest, expectedtransprob, 0.001); 385s assert (outprobest, expectedoutprob, 0.001); 385s ***** test 385s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 385s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 385s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 385s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 385s "Two", "One", "One", "One", "One", "One", "One"}; 385s symbols = {"A", "B", "C"}; 385s statenames = {"One", "Two"}; 385s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 385s symbols, "statenames", statenames); 385s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 385s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 385s assert (transprobest, expectedtransprob, 0.001); 385s assert (outprobest, expectedoutprob, 0.001); 385s ***** test 385s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 385s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 385s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 385s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 385s pseudotransitions = [8, 2; 4, 6]; 385s pseudoemissions = [2, 4, 4; 7, 2, 1]; 385s [transprobest, outprobest] = hmmestimate (sequence, states, ... 385s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 385s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 385s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 385s 0.823529, 0.117647, 0.058824]; 385s assert (transprobest, expectedtransprob, 0.001); 385s assert (outprobest, expectedoutprob, 0.001); 385s 3 tests, 3 passed, 0 known failure, 0 skipped 385s [inst/monotone_smooth.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/monotone_smooth.m 385s ***** error ... 385s monotone_smooth (1) 385s ***** error ... 385s monotone_smooth ("char", 1) 385s ***** error ... 385s monotone_smooth ({1,2,3}, 1) 385s ***** error ... 385s monotone_smooth (ones(20,3), 1) 385s ***** error ... 385s monotone_smooth (1, "char") 385s ***** error ... 385s monotone_smooth (1, {1,2,3}) 385s ***** error ... 385s monotone_smooth (1, ones(20,3)) 385s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 385s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 385s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 385s 10 tests, 10 passed, 0 known failure, 0 skipped 385s [inst/hotelling_t2test2.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/hotelling_t2test2.m 385s ***** error hotelling_t2test2 (); 385s ***** error ... 385s hotelling_t2test2 ([2, 3, 4, 5, 6]); 385s ***** error ... 385s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 385s ***** error ... 385s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 385s ***** error ... 385s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 385s ***** error ... 385s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 385s ***** error ... 385s hotelling_t2test2 (ones (20,1), ones (20,2)); 385s ***** error ... 385s hotelling_t2test2 (ones (20,2), ones (25,3)); 385s ***** test 385s randn ("seed", 1); 385s x1 = randn (60000, 5); 385s randn ("seed", 5); 385s x2 = randn (30000, 5); 385s [h, pval, stats] = hotelling_t2test2 (x1, x2); 385s assert (h, 0); 385s assert (stats.df1, 5); 385s assert (stats.df2, 89994); 385s 14 tests, 14 passed, 0 known failure, 0 skipped 385s [inst/ztest.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ztest.m 385s ***** error ztest (); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 2, -0.5); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 385s ***** error ... 385s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 385s ***** test 385s load carsmall 385s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 385s assert (h, 0); 385s assert (pval, 1, 1e-14); 385s assert (ci, [22.094; 25.343], 1e-3); 385s ***** test 385s load carsmall 385s [h, pval, ci] = ztest (MPG, 26, 8); 385s assert (h, 1); 385s assert (pval, 0.00568359158544743, 1e-14); 385s assert (ci, [22.101; 25.335], 1e-3); 385s ***** test 385s load carsmall 385s [h, pval, ci] = ztest (MPG, 26, 4); 385s assert (h, 1); 385s assert (pval, 3.184168011941316e-08, 1e-14); 385s assert (ci, [22.909; 24.527], 1e-3); 385s ***** test 385s x = normrnd (10, 2, 100, 1); 385s [h, pval, ci] = ztest (x, 10, 2, "tail", "right"); 385s assert (isnan (pval), false); 385s assert (pval >= 0 && pval <= 1, true); 385s ***** test 385s x = normrnd (10, 2, 100, 1); 385s [h, pval, ci] = ztest (x, 10, 2, "tail", "left"); 385s assert (isnan (pval), false); 385s assert (pval >= 0 && pval <= 1, true); 385s ***** test 385s load fisheriris; 385s x = meas(:,1); 385s m = 5.8; 385s sigma = 0.8; 385s [h, pval, ci] = ztest (x, m, sigma, "tail", "right"); 385s assert (h, 0) 385s assert (pval, 0.2535, 1e-4) 385s assert (ci, [5.7359; Inf], 1e-5) 385s ***** test 385s load fisheriris; 385s x = meas(:,1); 385s m = 5.8; 385s sigma = 0.8; 385s [h, pval, ci] = ztest (x, m, sigma, "tail", "left"); 385s assert (h, 0) 385s assert (pval, 0.7465, 1e-4) 385s assert (ci, [-Inf; 5.9508], 1e-4) 385s 17 tests, 17 passed, 0 known failure, 0 skipped 385s [inst/ff2n.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/ff2n.m 385s ***** error ff2n (); 385s ***** error ff2n (2, 5); 385s ***** error ff2n (2.5); 385s ***** error ff2n (0); 385s ***** error ff2n (-3); 385s ***** error ff2n (3+2i); 385s ***** error ff2n (Inf); 385s ***** error ff2n (NaN); 385s ***** test 385s A = ff2n (3); 385s assert (A, [0, 0, 0; 0, 0, 1; 0, 1, 0; 0, 1, 1; ... 385s 1, 0, 0; 1, 0, 1; 1, 1, 0; 1, 1, 1]); 385s ***** test 385s A = ff2n (2); 385s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 385s 10 tests, 10 passed, 0 known failure, 0 skipped 385s [inst/trimmean.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/trimmean.m 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s out = trimmean (x, 10, [1, 2]); 385s assert (out(1,1,1), 10.3889, 1e-4); 385s assert (out(1,1,2), 29.6111, 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s out = trimmean (x, 10, 1); 385s assert (out(:,:,1), [-17.6, 8, 13, 18]); 385s assert (out(:,:,2), [23, 28, 33, 10.6]); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, 1); 385s assert (out(:,:,1), [-23, 8, 13, 18]); 385s assert (out(:,:,2), [23, 28, 33, 3.75]); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s out = trimmean (x, 10, 2); 385s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 385s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, 2); 385s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 385s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s out = trimmean (x, 10, [1, 2, 3]); 385s assert (out, trimmean (x, 10, "all")); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, [1, 2]); 385s assert (out(1,1,1), 10.7647, 1e-4); 385s assert (out(1,1,2), 29.1176, 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, [1, 3]); 385s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, [2, 3]); 385s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, [1, 2, 3]); 385s assert (out, trimmean (x, 10, "all")); 385s ***** test 385s x = reshape (1:40, [5, 4, 2]); 385s x([3, 37]) = -100; 385s x([4, 38]) = NaN; 385s out = trimmean (x, 10, [2, 3, 5]); 385s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 385s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 385s ***** assert (trimmean ([], 10), NaN) 385s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 385s ***** error trimmean (1) 385s ***** error trimmean (1,2,3,4,5) 385s ***** error trimmean ([1 2 3 4], -10) 385s ***** error trimmean ([1 2 3 4], 100) 385s ***** error trimmean ([1 2 3 4], 10, "flag") 385s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 385s ***** error ... 385s trimmean ([1 2 3 4], 10, -1) 385s ***** error ... 385s trimmean ([1 2 3 4], 10, "floor", -1) 385s ***** error ... 385s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 385s ***** error ... 385s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 385s 26 tests, 26 passed, 0 known failure, 0 skipped 385s [inst/dist_wrap/icdf.m] 385s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/icdf.m 385s ***** shared p 385s p = [0.05:0.05:0.5]; 385s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 385s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 385s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 385s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 385s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 385s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 385s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 385s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 385s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 385s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 385s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 385s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 385s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 385s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 385s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 385s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 385s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 385s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 385s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 385s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 385s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 385s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 385s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 385s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 385s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 385s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 385s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 385s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 385s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 385s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 385s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 385s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 385s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 385s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 385s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 385s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 385s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 385s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 385s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 385s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 385s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 385s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 385s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 385s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 385s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 385s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 385s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 385s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 386s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 386s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 386s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 387s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 387s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 387s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 387s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 387s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 387s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 387s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 387s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 388s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 389s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 389s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 389s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 389s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 389s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 389s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 389s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 389s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 389s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 389s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 389s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 394s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 399s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 399s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 399s ***** error icdf (1) 399s ***** error icdf ({"beta"}) 399s ***** error icdf ("beta", {[1 2 3 4 5]}) 399s ***** error icdf ("beta", "text") 399s ***** error icdf ("beta", 1+i) 399s ***** error ... 399s icdf ("Beta", p, "a", 2) 399s ***** error ... 399s icdf ("Beta", p, 5, "") 399s ***** error ... 399s icdf ("Beta", p, 5, {2}) 399s ***** error icdf ("chi2", p) 399s ***** error icdf ("Beta", p, 5) 399s ***** error icdf ("Burr", p, 5) 399s ***** error icdf ("Burr", p, 5, 2) 399s 86 tests, 86 passed, 0 known failure, 0 skipped 399s [inst/dist_wrap/random.m] 399s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/random.m 399s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 399s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 399s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 399s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 399s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 399s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 399s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 399s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 399s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 399s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 399s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 399s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 399s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 399s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 399s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 399s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 399s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 399s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 399s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 399s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 399s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 399s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 399s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 399s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 399s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 399s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 399s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 399s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 399s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 399s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 399s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 399s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 399s ***** error random (1) 399s ***** error random ({"beta"}) 399s ***** error ... 399s random ("Beta", "a", 2) 399s ***** error ... 399s random ("Beta", 5, "") 399s ***** error ... 399s random ("Beta", 5, {2}) 399s ***** error ... 399s random ("Beta", "a", 2, 2, 10) 399s ***** error ... 399s random ("Beta", 5, "", 2, 10) 399s ***** error ... 399s random ("Beta", 5, {2}, 2, 10) 399s ***** error ... 399s random ("Beta", 5, "", 2, 10) 399s ***** error random ("chi2") 399s ***** error random ("Beta", 5) 399s ***** error random ("Burr", 5) 399s ***** error random ("Burr", 5, 2) 399s 87 tests, 87 passed, 0 known failure, 0 skipped 399s [inst/dist_wrap/fitdist.m] 399s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/fitdist.m 399s ***** test 399s x = betarnd (1, 1, 100, 1); 399s pd = fitdist (x, "Beta"); 399s [phat, pci] = betafit (x); 399s assert ([pd.a, pd.b], phat); 399s assert (paramci (pd), pci); 399s ***** test 399s x1 = betarnd (1, 1, 100, 1); 399s x2 = betarnd (5, 2, 100, 1); 399s pd = fitdist ([x1; x2], "Beta", "By", [ones(100, 1); 2*ones(100, 1)]); 399s [phat, pci] = betafit (x1); 399s assert ([pd{1}.a, pd{1}.b], phat); 399s assert (paramci (pd{1}), pci); 399s [phat, pci] = betafit (x2); 399s assert ([pd{2}.a, pd{2}.b], phat); 399s assert (paramci (pd{2}), pci); 399s ***** warning ... 399s fitdist ([betarnd(1, 1, 100, 1); nan(100, 1)], "Beta", ... 399s "By", [ones(100, 1); 2*ones(100, 1)]); 399s ***** test 399s N = 1; 399s x = binornd (N, 0.5, 100, 1); 399s pd = fitdist (x, "binomial"); 399s [phat, pci] = binofit (sum (x), numel (x)); 399s assert ([pd.N, pd.p], [N, phat]); 399s assert (paramci (pd), pci); 399s ***** test 399s N = 3; 399s x = binornd (N, 0.4, 100, 1); 399s pd = fitdist (x, "binomial", "ntrials", N); 399s [phat, pci] = binofit (sum (x), numel (x) * N); 399s assert ([pd.N, pd.p], [N, phat]); 399s assert (paramci (pd), pci); 399s ***** test 399s N = 1; 399s x1 = binornd (N, 0.5, 100, 1); 399s x2 = binornd (N, 0.7, 100, 1); 399s pd = fitdist ([x1; x2], "binomial", "By", [ones(100, 1); 2*ones(100, 1)]); 399s [phat, pci] = binofit (sum (x1), numel (x1)); 399s assert ([pd{1}.N, pd{1}.p], [N, phat]); 399s assert (paramci (pd{1}), pci); 399s [phat, pci] = binofit (sum (x2), numel (x2)); 399s assert ([pd{2}.N, pd{2}.p], [N, phat]); 399s assert (paramci (pd{2}), pci); 399s ***** warning ... 399s fitdist ([binornd(1, 0.5, 100, 1); nan(100, 1)], "binomial", ... 399s "By", [ones(100, 1); 2*ones(100, 1)]); 399s ***** test 399s N = 5; 399s x1 = binornd (N, 0.5, 100, 1); 399s x2 = binornd (N, 0.8, 100, 1); 399s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 399s "By", [ones(100, 1); 2*ones(100, 1)]); 399s [phat, pci] = binofit (sum (x1), numel (x1) * N); 399s assert ([pd{1}.N, pd{1}.p], [N, phat]); 399s assert (paramci (pd{1}), pci); 399s [phat, pci] = binofit (sum (x2), numel (x2) * N); 399s assert ([pd{2}.N, pd{2}.p], [N, phat]); 399s assert (paramci (pd{2}), pci); 399s ***** warning ... 399s fitdist ([binornd(5, 0.5, 100, 1); nan(100, 1)], "binomial", "ntrials", 5, ... 399s "By", [ones(100, 1); 2*ones(100, 1)]); 399s ***** test 399s x = bisarnd (1, 1, 100, 1); 399s pd = fitdist (x, "BirnbaumSaunders"); 399s [phat, pci] = bisafit (x); 399s assert ([pd.beta, pd.gamma], phat); 399s assert (paramci (pd), pci); 399s ***** test 399s x1 = bisarnd (1, 1, 100, 1); 399s x2 = bisarnd (5, 2, 100, 1); 399s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 399s [phat, pci] = bisafit (x1); 399s assert ([pd{1}.beta, pd{1}.gamma], phat); 399s assert (paramci (pd{1}), pci); 399s [phat, pci] = bisafit (x2); 399s assert ([pd{2}.beta, pd{2}.gamma], phat); 399s assert (paramci (pd{2}), pci); 400s ***** warning ... 400s fitdist ([bisarnd(1, 1, 100, 1); nan(100, 1)], "bisa", ... 400s "By", [ones(100, 1); 2*ones(100, 1)]); 400s ***** test 400s x = burrrnd (1, 2, 1, 100, 1); 400s pd = fitdist (x, "Burr"); 400s [phat, pci] = burrfit (x); 400s assert ([pd.alpha, pd.c, pd.k], phat); 400s assert (paramci (pd), pci); 400s ***** test 400s rand ("seed", 4); # for reproducibility 400s x1 = burrrnd (1, 2, 1, 100, 1); 400s rand ("seed", 3); # for reproducibility 400s x2 = burrrnd (1, 0.5, 2, 100, 1); 400s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 400s [phat, pci] = burrfit (x1); 400s assert ([pd{1}.alpha, pd{1}.c, pd{1}.k], phat); 400s assert (paramci (pd{1}), pci); 400s [phat, pci] = burrfit (x2); 400s assert ([pd{2}.alpha, pd{2}.c, pd{2}.k], phat); 400s assert (paramci (pd{2}), pci); 400s ***** warning ... 400s fitdist ([burrrnd(1, 2, 1, 100, 1); nan(100, 1)], "burr", ... 400s "By", [ones(100, 1); 2*ones(100, 1)]); 401s ***** test 401s x = exprnd (1, 100, 1); 401s pd = fitdist (x, "exponential"); 401s [muhat, muci] = expfit (x); 401s assert ([pd.mu], muhat); 401s assert (paramci (pd), muci); 401s ***** test 401s x1 = exprnd (1, 100, 1); 401s x2 = exprnd (5, 100, 1); 401s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 401s [muhat, muci] = expfit (x1); 401s assert ([pd{1}.mu], muhat); 401s assert (paramci (pd{1}), muci); 401s [muhat, muci] = expfit (x2); 401s assert ([pd{2}.mu], muhat); 401s assert (paramci (pd{2}), muci); 401s ***** warning ... 401s fitdist ([exprnd(1, 100, 1); nan(100, 1)], "exponential", ... 401s "By", [ones(100, 1); 2*ones(100, 1)]); 401s ***** test 401s x = evrnd (1, 1, 100, 1); 401s pd = fitdist (x, "ev"); 401s [phat, pci] = evfit (x); 401s assert ([pd.mu, pd.sigma], phat); 401s assert (paramci (pd), pci); 401s ***** test 401s x1 = evrnd (1, 1, 100, 1); 401s x2 = evrnd (5, 2, 100, 1); 401s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 401s [phat, pci] = evfit (x1); 401s assert ([pd{1}.mu, pd{1}.sigma], phat); 401s assert (paramci (pd{1}), pci); 401s [phat, pci] = evfit (x2); 401s assert ([pd{2}.mu, pd{2}.sigma], phat); 401s assert (paramci (pd{2}), pci); 401s ***** warning ... 401s fitdist ([evrnd(1, 1, 100, 1); nan(100, 1)], "extremevalue", ... 401s "By", [ones(100, 1); 2*ones(100, 1)]); 401s ***** test 401s x = gamrnd (1, 1, 100, 1); 401s pd = fitdist (x, "Gamma"); 401s [phat, pci] = gamfit (x); 401s assert ([pd.a, pd.b], phat); 401s assert (paramci (pd), pci); 401s ***** test 401s x1 = gamrnd (1, 1, 100, 1); 401s x2 = gamrnd (5, 2, 100, 1); 401s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 401s [phat, pci] = gamfit (x1); 401s assert ([pd{1}.a, pd{1}.b], phat); 401s assert (paramci (pd{1}), pci); 401s [phat, pci] = gamfit (x2); 401s assert ([pd{2}.a, pd{2}.b], phat); 401s assert (paramci (pd{2}), pci); 401s ***** warning ... 401s fitdist ([gamrnd(1, 1, 100, 1); nan(100, 1)], "Gamma", ... 401s "By", [ones(100, 1); 2*ones(100, 1)]); 401s ***** test 401s rand ("seed", 4); # for reproducibility 401s x = gevrnd (-0.5, 1, 2, 1000, 1); 401s pd = fitdist (x, "generalizedextremevalue"); 401s [phat, pci] = gevfit (x); 401s assert ([pd.k, pd.sigma, pd.mu], phat); 401s assert (paramci (pd), pci); 401s ***** test 401s rand ("seed", 5); # for reproducibility 401s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 401s rand ("seed", 9); # for reproducibility 401s x2 = gevrnd (0, 1, -4, 1000, 1); 401s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 401s [phat, pci] = gevfit (x1); 401s assert ([pd{1}.k, pd{1}.sigma, pd{1}.mu], phat); 401s assert (paramci (pd{1}), pci); 401s [phat, pci] = gevfit (x2); 401s assert ([pd{2}.k, pd{2}.sigma, pd{2}.mu], phat); 401s assert (paramci (pd{2}), pci); 402s ***** warning ... 402s fitdist ([gevrnd(-0.5, 1, 2, 1000, 1); nan(1000, 1)], "gev", ... 402s "By", [ones(1000, 1); 2*ones(1000, 1)]); 402s ***** test 402s x = gprnd (1, 1, 1, 100, 1); 402s pd = fitdist (x, "GeneralizedPareto"); 402s [phat, pci] = gpfit (x, 1); 402s assert ([pd.k, pd.sigma, pd.theta], phat); 402s assert (paramci (pd), pci); 402s ***** test 402s x = gprnd (1, 1, 2, 100, 1); 402s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 402s [phat, pci] = gpfit (x, 2); 402s assert ([pd.k, pd.sigma, pd.theta], phat); 402s assert (paramci (pd), pci); 402s ***** test 402s x1 = gprnd (1, 1, 1, 100, 1); 402s x2 = gprnd (0, 2, 1, 100, 1); 402s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 402s [phat, pci] = gpfit (x1, 1); 402s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 402s assert (paramci (pd{1}), pci); 402s [phat, pci] = gpfit (x2, 1); 402s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 402s assert (paramci (pd{2}), pci); 402s ***** warning ... 402s fitdist ([gprnd(1, 1, 1, 100, 1); nan(100, 1)], "gp", ... 402s "By", [ones(100, 1); 2*ones(100, 1)]); 402s ***** test 402s x1 = gprnd (3, 2, 2, 100, 1); 402s x2 = gprnd (2, 3, 2, 100, 1); 402s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 402s "By", [ones(100,1); 2*ones(100,1)]); 402s [phat, pci] = gpfit (x1, 2); 402s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 402s assert (paramci (pd{1}), pci); 402s [phat, pci] = gpfit (x2, 2); 402s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 402s assert (paramci (pd{2}), pci); 402s ***** warning ... 402s fitdist ([gprnd(3, 2, 2, 100, 1); nan(100, 1)], "gp", "theta", 2, ... 402s "By", [ones(100, 1); 2*ones(100, 1)]); 402s ***** test 402s x = hnrnd (0, 1, 100, 1); 402s pd = fitdist (x, "HalfNormal"); 402s [phat, pci] = hnfit (x, 0); 402s assert ([pd.mu, pd.sigma], phat); 402s assert (paramci (pd), pci); 403s ***** test 403s x = hnrnd (1, 1, 100, 1); 403s pd = fitdist (x, "HalfNormal", "mu", 1); 403s [phat, pci] = hnfit (x, 1); 403s assert ([pd.mu, pd.sigma], phat); 403s assert (paramci (pd), pci); 403s ***** test 403s x1 = hnrnd (0, 1, 100, 1); 403s x2 = hnrnd (0, 2, 100, 1); 403s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 403s [phat, pci] = hnfit (x1, 0); 403s assert ([pd{1}.mu, pd{1}.sigma], phat); 403s assert (paramci (pd{1}), pci); 403s [phat, pci] = hnfit (x2, 0); 403s assert ([pd{2}.mu, pd{2}.sigma], phat); 403s assert (paramci (pd{2}), pci); 403s ***** warning ... 403s fitdist ([hnrnd(0, 1, 100, 1); nan(100, 1)], "HalfNormal", ... 403s "By", [ones(100, 1); 2*ones(100, 1)]); 403s ***** test 403s x1 = hnrnd (2, 1, 100, 1); 403s x2 = hnrnd (2, 2, 100, 1); 403s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 403s "By", [ones(100,1); 2*ones(100,1)]); 403s [phat, pci] = hnfit (x1, 2); 403s assert ([pd{1}.mu, pd{1}.sigma], phat); 403s assert (paramci (pd{1}), pci); 403s [phat, pci] = hnfit (x2, 2); 403s assert ([pd{2}.mu, pd{2}.sigma], phat); 403s assert (paramci (pd{2}), pci); 403s ***** warning ... 403s fitdist ([hnrnd(2, 1, 100, 1); nan(100, 1)], "HalfNormal", "mu", 2, ... 403s "By", [ones(100, 1); 2*ones(100, 1)]); 403s ***** test 403s x = invgrnd (1, 1, 100, 1); 403s pd = fitdist (x, "InverseGaussian"); 403s [phat, pci] = invgfit (x); 403s assert ([pd.mu, pd.lambda], phat); 403s assert (paramci (pd), pci); 403s ***** test 403s x1 = invgrnd (1, 1, 100, 1); 403s x2 = invgrnd (5, 2, 100, 1); 403s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 403s [phat, pci] = invgfit (x1); 403s assert ([pd{1}.mu, pd{1}.lambda], phat); 403s assert (paramci (pd{1}), pci); 403s [phat, pci] = invgfit (x2); 403s assert ([pd{2}.mu, pd{2}.lambda], phat); 403s assert (paramci (pd{2}), pci); 403s ***** warning ... 403s fitdist ([invgrnd(1, 1, 100, 1); nan(100, 1)], "InverseGaussian", ... 403s "By", [ones(100, 1); 2*ones(100, 1)]); 403s ***** test 403s x = logirnd (1, 1, 100, 1); 403s pd = fitdist (x, "logistic"); 403s [phat, pci] = logifit (x); 403s assert ([pd.mu, pd.sigma], phat); 403s assert (paramci (pd), pci); 403s ***** test 403s x1 = logirnd (1, 1, 100, 1); 403s x2 = logirnd (5, 2, 100, 1); 403s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 403s [phat, pci] = logifit (x1); 403s assert ([pd{1}.mu, pd{1}.sigma], phat); 403s assert (paramci (pd{1}), pci); 403s [phat, pci] = logifit (x2); 403s assert ([pd{2}.mu, pd{2}.sigma], phat); 403s assert (paramci (pd{2}), pci); 404s ***** warning ... 404s fitdist ([logirnd(1, 1, 100, 1); nan(100, 1)], "logistic", ... 404s "By", [ones(100, 1); 2*ones(100, 1)]); 404s ***** test 404s x = loglrnd (1, 1, 100, 1); 404s pd = fitdist (x, "loglogistic"); 404s [phat, pci] = loglfit (x); 404s assert ([pd.mu, pd.sigma], phat); 404s assert (paramci (pd), pci); 404s ***** test 404s x1 = loglrnd (1, 1, 100, 1); 404s x2 = loglrnd (5, 2, 100, 1); 404s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 404s [phat, pci] = loglfit (x1); 404s assert ([pd{1}.mu, pd{1}.sigma], phat); 404s assert (paramci (pd{1}), pci); 404s [phat, pci] = loglfit (x2); 404s assert ([pd{2}.mu, pd{2}.sigma], phat); 404s assert (paramci (pd{2}), pci); 404s ***** warning ... 404s fitdist ([loglrnd(1, 1, 100, 1); nan(100, 1)], "loglogistic", ... 404s "By", [ones(100, 1); 2*ones(100, 1)]); 404s ***** test 404s x = lognrnd (1, 1, 100, 1); 404s pd = fitdist (x, "lognormal"); 404s [phat, pci] = lognfit (x); 404s assert ([pd.mu, pd.sigma], phat); 404s assert (paramci (pd), pci); 404s ***** test 404s x1 = lognrnd (1, 1, 100, 1); 404s x2 = lognrnd (5, 2, 100, 1); 404s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 404s [phat, pci] = lognfit (x1); 404s assert ([pd{1}.mu, pd{1}.sigma], phat); 404s assert (paramci (pd{1}), pci); 404s [phat, pci] = lognfit (x2); 404s assert ([pd{2}.mu, pd{2}.sigma], phat); 404s assert (paramci (pd{2}), pci); 405s ***** warning ... 405s fitdist ([lognrnd(1, 1, 100, 1); nan(100, 1)], "lognormal", ... 405s "By", [ones(100, 1); 2*ones(100, 1)]); 405s ***** test 405s x = nakarnd (2, 0.5, 100, 1); 405s pd = fitdist (x, "Nakagami"); 405s [phat, pci] = nakafit (x); 405s assert ([pd.mu, pd.omega], phat); 405s assert (paramci (pd), pci); 405s ***** test 405s x1 = nakarnd (2, 0.5, 100, 1); 405s x2 = nakarnd (5, 0.8, 100, 1); 405s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 405s [phat, pci] = nakafit (x1); 405s assert ([pd{1}.mu, pd{1}.omega], phat); 405s assert (paramci (pd{1}), pci); 405s [phat, pci] = nakafit (x2); 405s assert ([pd{2}.mu, pd{2}.omega], phat); 405s assert (paramci (pd{2}), pci); 405s ***** warning ... 405s fitdist ([nakarnd(2, 0.5, 100, 1); nan(100, 1)], "Nakagami", ... 405s "By", [ones(100, 1); 2*ones(100, 1)]); 405s ***** test 405s randp ("seed", 123); 405s randg ("seed", 321); 405s x = nbinrnd (2, 0.5, 100, 1); 405s pd = fitdist (x, "negativebinomial"); 405s [phat, pci] = nbinfit (x); 405s assert ([pd.R, pd.P], phat); 405s assert (paramci (pd), pci); 405s ***** test 405s randp ("seed", 345); 405s randg ("seed", 543); 405s x1 = nbinrnd (2, 0.5, 100, 1); 405s randp ("seed", 432); 405s randg ("seed", 234); 405s x2 = nbinrnd (5, 0.8, 100, 1); 405s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 405s [phat, pci] = nbinfit (x1); 405s assert ([pd{1}.R, pd{1}.P], phat); 405s assert (paramci (pd{1}), pci); 405s [phat, pci] = nbinfit (x2); 405s assert ([pd{2}.R, pd{2}.P], phat); 405s assert (paramci (pd{2}), pci); 405s ***** warning ... 405s fitdist ([nbinrnd(2, 0.5, 100, 1); nan(100, 1)], "nbin", ... 405s "By", [ones(100, 1); 2*ones(100, 1)]); 405s ***** test 405s x = normrnd (1, 1, 100, 1); 405s pd = fitdist (x, "normal"); 405s [muhat, sigmahat, muci, sigmaci] = normfit (x); 405s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 405s assert (paramci (pd), [muci, sigmaci]); 405s ***** test 405s x1 = normrnd (1, 1, 100, 1); 405s x2 = normrnd (5, 2, 100, 1); 405s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 405s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 405s assert ([pd{1}.mu, pd{1}.sigma], [muhat, sigmahat]); 405s assert (paramci (pd{1}), [muci, sigmaci]); 405s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 405s assert ([pd{2}.mu, pd{2}.sigma], [muhat, sigmahat]); 405s assert (paramci (pd{2}), [muci, sigmaci]); 406s ***** warning ... 406s fitdist ([normrnd(1, 1, 100, 1); nan(100, 1)], "normal", ... 406s "By", [ones(100, 1); 2*ones(100, 1)]); 406s ***** test 406s x = poissrnd (1, 100, 1); 406s pd = fitdist (x, "poisson"); 406s [phat, pci] = poissfit (x); 406s assert (pd.lambda, phat); 406s assert (paramci (pd), pci); 406s ***** test 406s x1 = poissrnd (1, 100, 1); 406s x2 = poissrnd (5, 100, 1); 406s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 406s [phat, pci] = poissfit (x1); 406s assert (pd{1}.lambda, phat); 406s assert (paramci (pd{1}), pci); 406s [phat, pci] = poissfit (x2); 406s assert (pd{2}.lambda, phat); 406s assert (paramci (pd{2}), pci); 406s ***** warning ... 406s fitdist ([poissrnd(1, 100, 1); nan(100, 1)], "poisson", ... 406s "By", [ones(100, 1); 2*ones(100, 1)]); 406s ***** test 406s x = raylrnd (1, 100, 1); 406s pd = fitdist (x, "rayleigh"); 406s [phat, pci] = raylfit (x); 406s assert (pd.sigma, phat); 406s assert (paramci (pd), pci); 406s ***** test 406s x1 = raylrnd (1, 100, 1); 406s x2 = raylrnd (5, 100, 1); 406s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 406s [phat, pci] = raylfit (x1); 406s assert (pd{1}.sigma, phat); 406s assert (paramci (pd{1}), pci); 406s [phat, pci] = raylfit (x2); 406s assert (pd{2}.sigma, phat); 406s assert (paramci (pd{2}), pci); 406s ***** warning ... 406s fitdist ([raylrnd(1, 100, 1); nan(100, 1)], "rayleigh", ... 406s "By", [ones(100, 1); 2*ones(100, 1)]); 406s ***** test 406s x = ricernd (1, 1, 100, 1); 406s pd = fitdist (x, "rician"); 406s [phat, pci] = ricefit (x); 406s assert ([pd.s, pd.sigma], phat); 406s assert (paramci (pd), pci); 406s ***** test 406s x1 = ricernd (1, 1, 100, 1); 406s x2 = ricernd (5, 2, 100, 1); 406s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 406s [phat, pci] = ricefit (x1); 406s assert ([pd{1}.s, pd{1}.sigma], phat); 406s assert (paramci (pd{1}), pci); 406s [phat, pci] = ricefit (x2); 406s assert ([pd{2}.s, pd{2}.sigma], phat); 406s assert (paramci (pd{2}), pci); 407s ***** warning ... 407s fitdist ([ricernd(1, 1, 100, 1); nan(100, 1)], "rician", ... 407s "By", [ones(100, 1); 2*ones(100, 1)]); 407s ***** warning ... 407s fitdist ([1 2 3 4 5], "Stable"); 407s ***** test 407s x = tlsrnd (0, 1, 1, 100, 1); 407s pd = fitdist (x, "tlocationscale"); 407s [phat, pci] = tlsfit (x); 407s assert ([pd.mu, pd.sigma, pd.nu], phat); 407s assert (paramci (pd), pci); 407s ***** test 407s x1 = tlsrnd (0, 1, 1, 100, 1); 407s x2 = tlsrnd (5, 2, 1, 100, 1); 407s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 407s [phat, pci] = tlsfit (x1); 407s assert ([pd{1}.mu, pd{1}.sigma, pd{1}.nu], phat); 407s assert (paramci (pd{1}), pci); 407s [phat, pci] = tlsfit (x2); 407s assert ([pd{2}.mu, pd{2}.sigma, pd{2}.nu], phat); 407s assert (paramci (pd{2}), pci); 407s ***** warning ... 408s fitdist ([tlsrnd(0, 1, 1, 100, 1); nan(100, 1)], "tlocationscale", ... 408s "By", [ones(100, 1); 2*ones(100, 1)]); 408s ***** test 408s x = [1 2 3 4 5]; 408s pd = fitdist (x, "weibull"); 408s [phat, pci] = wblfit (x); 408s assert ([pd.lambda, pd.k], phat); 408s assert (paramci (pd), pci); 408s ***** test 408s x = [1 2 3 4 5 6 7 8 9 10]; 408s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 408s [phat, pci] = wblfit (x(1:5)); 408s assert ([pd{1}.lambda, pd{1}.k], phat); 408s assert (paramci (pd{1}), pci); 408s [phat, pci] = wblfit (x(6:10)); 408s assert ([pd{2}.lambda, pd{2}.k], phat); 408s assert (paramci (pd{2}), pci); 408s ***** warning ... 408s fitdist ([1 2 3 4 5 NaN NaN NaN NaN NaN], "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 408s ***** error fitdist (1) 408s ***** error fitdist (1, ["as";"sd"]) 408s ***** error fitdist (1, "some") 408s ***** error ... 408s fitdist (ones (2), "normal") 408s ***** error ... 408s fitdist ([i, 2, 3], "normal") 408s ***** error ... 408s fitdist (["a", "s", "d"], "normal") 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "By") 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 408s ***** error ... 408s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "alpha", i) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "ntrials", 0) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "options", 0) 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 408s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 408s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 408s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 408s ***** error ... 408s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 408s ***** error ... 408s fitdist (nan (100,1), "normal"); 408s ***** error ... 408s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 408s ***** error ... 408s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 408s ***** error ... 408s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 408s 103 tests, 103 passed, 0 known failure, 0 skipped 408s [inst/dist_wrap/makedist.m] 408s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/makedist.m 408s ***** test 408s pd = makedist ("beta"); 408s assert (class (pd), "BetaDistribution"); 408s assert (pd.a, 1); 408s assert (pd.b, 1); 408s ***** test 408s pd = makedist ("beta", "a", 5); 408s assert (pd.a, 5); 408s assert (pd.b, 1); 408s ***** test 408s pd = makedist ("beta", "b", 5); 408s assert (pd.a, 1); 408s assert (pd.b, 5); 408s ***** test 408s pd = makedist ("beta", "a", 3, "b", 5); 408s assert (pd.a, 3); 408s assert (pd.b, 5); 408s ***** test 408s pd = makedist ("binomial"); 408s assert (class (pd), "BinomialDistribution"); 408s assert (pd.N, 1); 408s assert (pd.p, 0.5); 408s ***** test 408s pd = makedist ("binomial", "N", 5); 408s assert (pd.N, 5); 408s assert (pd.p, 0.5); 408s ***** test 408s pd = makedist ("binomial", "p", 0.2); 408s assert (pd.N, 1); 408s assert (pd.p, 0.2); 408s ***** test 408s pd = makedist ("binomial", "N", 3, "p", 0.3); 408s assert (pd.N, 3); 408s assert (pd.p, 0.3); 408s ***** test 408s pd = makedist ("birnbaumsaunders"); 408s assert (class (pd), "BirnbaumSaundersDistribution"); 408s assert (pd.beta, 1); 408s assert (pd.gamma, 1); 408s ***** test 408s pd = makedist ("birnbaumsaunders", "beta", 5); 408s assert (pd.beta, 5); 408s assert (pd.gamma, 1); 408s ***** test 408s pd = makedist ("birnbaumsaunders", "gamma", 5); 408s assert (pd.beta, 1); 408s assert (pd.gamma, 5); 408s ***** test 408s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 408s assert (pd.beta, 3); 408s assert (pd.gamma, 5); 408s ***** test 408s pd = makedist ("burr"); 408s assert (class (pd), "BurrDistribution"); 408s assert (pd.alpha, 1); 408s assert (pd.c, 1); 408s assert (pd.k, 1); 408s ***** test 408s pd = makedist ("burr", "k", 5); 408s assert (pd.alpha, 1); 408s assert (pd.c, 1); 408s assert (pd.k, 5); 408s ***** test 408s pd = makedist ("burr", "c", 5); 408s assert (pd.alpha, 1); 408s assert (pd.c, 5); 408s assert (pd.k, 1); 408s ***** test 408s pd = makedist ("burr", "alpha", 3, "c", 5); 408s assert (pd.alpha, 3); 408s assert (pd.c, 5); 408s assert (pd.k, 1); 408s ***** test 408s pd = makedist ("burr", "k", 3, "c", 5); 408s assert (pd.alpha, 1); 408s assert (pd.c, 5); 408s assert (pd.k, 3); 408s ***** test 408s pd = makedist ("exponential"); 408s assert (class (pd), "ExponentialDistribution"); 408s assert (pd.mu, 1); 408s ***** test 408s pd = makedist ("exponential", "mu", 5); 408s assert (pd.mu, 5); 408s ***** test 408s pd = makedist ("extremevalue"); 408s assert (class (pd), "ExtremeValueDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("extremevalue", "mu", 5); 408s assert (class (pd), "ExtremeValueDistribution"); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("ev", "sigma", 5); 408s assert (class (pd), "ExtremeValueDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("ev", "mu", -3, "sigma", 5); 408s assert (class (pd), "ExtremeValueDistribution"); 408s assert (pd.mu, -3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("gamma"); 408s assert (class (pd), "GammaDistribution"); 408s assert (pd.a, 1); 408s assert (pd.b, 1); 408s ***** test 408s pd = makedist ("gamma", "a", 5); 408s assert (pd.a, 5); 408s assert (pd.b, 1); 408s ***** test 408s pd = makedist ("gamma", "b", 5); 408s assert (pd.a, 1); 408s assert (pd.b, 5); 408s ***** test 408s pd = makedist ("gamma", "a", 3, "b", 5); 408s assert (pd.a, 3); 408s assert (pd.b, 5); 408s ***** test 408s pd = makedist ("GeneralizedExtremeValue"); 408s assert (class (pd), "GeneralizedExtremeValueDistribution"); 408s assert (pd.k, 0); 408s assert (pd.sigma, 1); 408s assert (pd.mu, 0); 408s ***** test 408s pd = makedist ("GeneralizedExtremeValue", "k", 5); 408s assert (pd.k, 5); 408s assert (pd.sigma, 1); 408s assert (pd.mu, 0); 408s ***** test 408s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 408s assert (pd.k, 0); 408s assert (pd.sigma, 5); 408s assert (pd.mu, 0); 408s ***** test 408s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 408s assert (pd.k, 3); 408s assert (pd.sigma, 5); 408s assert (pd.mu, 0); 408s ***** test 408s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 408s assert (pd.k, 0); 408s assert (pd.sigma, 5); 408s assert (pd.mu, 3); 408s ***** test 408s pd = makedist ("GeneralizedPareto"); 408s assert (class (pd), "GeneralizedParetoDistribution"); 408s assert (pd.k, 1); 408s assert (pd.sigma, 1); 408s assert (pd.theta, 1); 408s ***** test 408s pd = makedist ("GeneralizedPareto", "k", 5); 408s assert (pd.k, 5); 408s assert (pd.sigma, 1); 408s assert (pd.theta, 1); 408s ***** test 408s pd = makedist ("GeneralizedPareto", "sigma", 5); 408s assert (pd.k, 1); 408s assert (pd.sigma, 5); 408s assert (pd.theta, 1); 408s ***** test 408s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 408s assert (pd.k, 3); 408s assert (pd.sigma, 5); 408s assert (pd.theta, 1); 408s ***** test 408s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 408s assert (pd.k, 1); 408s assert (pd.sigma, 5); 408s assert (pd.theta, 3); 408s ***** test 408s pd = makedist ("HalfNormal"); 408s assert (class (pd), "HalfNormalDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("HalfNormal", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("HalfNormal", "sigma", 5); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 408s assert (pd.mu, 3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("InverseGaussian"); 408s assert (class (pd), "InverseGaussianDistribution"); 408s assert (pd.mu, 1); 408s assert (pd.lambda, 1); 408s ***** test 408s pd = makedist ("InverseGaussian", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.lambda, 1); 408s ***** test 408s pd = makedist ("InverseGaussian", "lambda", 5); 408s assert (pd.mu, 1); 408s assert (pd.lambda, 5); 408s ***** test 408s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 408s assert (pd.mu, 3); 408s assert (pd.lambda, 5); 408s ***** test 408s pd = makedist ("logistic"); 408s assert (class (pd), "LogisticDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("logistic", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("logistic", "sigma", 5); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("logistic", "mu", 3, "sigma", 5); 408s assert (pd.mu, 3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("loglogistic"); 408s assert (class (pd), "LoglogisticDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("loglogistic", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("loglogistic", "sigma", 5); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 408s assert (pd.mu, 3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("Lognormal"); 408s assert (class (pd), "LognormalDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Lognormal", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Lognormal", "sigma", 5); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 408s assert (pd.mu, -3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("Loguniform"); 408s assert (class (pd), "LoguniformDistribution"); 408s assert (pd.Lower, 1); 408s assert (pd.Upper, 4); 408s ***** test 408s pd = makedist ("Loguniform", "Lower", 2); 408s assert (pd.Lower, 2); 408s assert (pd.Upper, 4); 408s ***** test 408s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 408s assert (pd.Lower, 1); 408s assert (pd.Upper, 3); 408s ***** test 408s pd = makedist ("Multinomial"); 408s assert (class (pd), "MultinomialDistribution"); 408s assert (pd.Probabilities, [0.5, 0.5]); 408s ***** test 408s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 408s assert (class (pd), "MultinomialDistribution"); 408s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 408s ***** test 408s pd = makedist ("Nakagami"); 408s assert (class (pd), "NakagamiDistribution"); 408s assert (pd.mu, 1); 408s assert (pd.omega, 1); 408s ***** test 408s pd = makedist ("Nakagami", "mu", 5); 408s assert (class (pd), "NakagamiDistribution"); 408s assert (pd.mu, 5); 408s assert (pd.omega, 1); 408s ***** test 408s pd = makedist ("Nakagami", "omega", 0.3); 408s assert (class (pd), "NakagamiDistribution"); 408s assert (pd.mu, 1); 408s assert (pd.omega, 0.3); 408s ***** test 408s pd = makedist ("NegativeBinomial"); 408s assert (class (pd), "NegativeBinomialDistribution"); 408s assert (pd.R, 1); 408s assert (pd.P, 0.5); 408s ***** test 408s pd = makedist ("NegativeBinomial", "R", 5); 408s assert (class (pd), "NegativeBinomialDistribution"); 408s assert (pd.R, 5); 408s assert (pd.P, 0.5); 408s ***** test 408s pd = makedist ("NegativeBinomial", "p", 0.3); 408s assert (class (pd), "NegativeBinomialDistribution"); 408s assert (pd.R, 1); 408s assert (pd.P, 0.3); 408s ***** test 408s pd = makedist ("Normal"); 408s assert (class (pd), "NormalDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Normal", "mu", 5); 408s assert (class (pd), "NormalDistribution"); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Normal", "sigma", 5); 408s assert (class (pd), "NormalDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("Normal", "mu", -3, "sigma", 5); 408s assert (class (pd), "NormalDistribution"); 408s assert (pd.mu, -3); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("PiecewiseLinear"); 408s assert (class (pd), "PiecewiseLinearDistribution"); 408s assert (pd.x, [0; 1]); 408s assert (pd.Fx, [0; 1]); 408s ***** test 408s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 408s assert (pd.x, [0; 1; 2]); 408s assert (pd.Fx, [0; 0.5; 1]); 408s ***** test 408s pd = makedist ("Poisson"); 408s assert (class (pd), "PoissonDistribution"); 408s assert (pd.lambda, 1); 408s ***** test 408s pd = makedist ("Poisson", "lambda", 5); 408s assert (pd.lambda, 5); 408s ***** test 408s pd = makedist ("Rayleigh"); 408s assert (class (pd), "RayleighDistribution"); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Rayleigh", "sigma", 5); 408s assert (pd.sigma, 5); 408s ***** test 408s pd = makedist ("Rician"); 408s assert (class (pd), "RicianDistribution"); 408s assert (pd.s, 1); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Rician", "s", 3); 408s assert (pd.s, 3); 408s assert (pd.sigma, 1); 408s ***** test 408s pd = makedist ("Rician", "sigma", 3); 408s assert (pd.s, 1); 408s assert (pd.sigma, 3); 408s ***** test 408s pd = makedist ("Rician", "s", 2, "sigma", 3); 408s assert (pd.s, 2); 408s assert (pd.sigma, 3); 408s ***** warning 408s pd = makedist ("stable"); 408s assert (class (pd), "double"); 408s assert (isempty (pd), true); 408s ***** test 408s pd = makedist ("tlocationscale"); 408s assert (class (pd), "tLocationScaleDistribution"); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 1); 408s assert (pd.nu, 5); 408s ***** test 408s pd = makedist ("tlocationscale", "mu", 5); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 1); 408s assert (pd.nu, 5); 408s ***** test 408s pd = makedist ("tlocationscale", "sigma", 2); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 2); 408s assert (pd.nu, 5); 408s ***** test 408s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 408s assert (pd.mu, 5); 408s assert (pd.sigma, 2); 408s assert (pd.nu, 5); 408s ***** test 408s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 408s assert (pd.mu, 0); 408s assert (pd.sigma, 2); 408s assert (pd.nu, 1); 408s ***** test 408s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 408s assert (pd.mu, -2); 408s assert (pd.sigma, 3); 408s assert (pd.nu, 1); 408s ***** test 408s pd = makedist ("Triangular"); 408s assert (class (pd), "TriangularDistribution"); 408s assert (pd.A, 0); 408s assert (pd.B, 0.5); 408s assert (pd.C, 1); 408s ***** test 408s pd = makedist ("Triangular", "A", -2); 408s assert (pd.A, -2); 408s assert (pd.B, 0.5); 408s assert (pd.C, 1); 408s ***** test 408s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 408s assert (pd.A, 0.5); 408s assert (pd.B, 0.9); 408s assert (pd.C, 1); 408s ***** test 408s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 408s assert (pd.A, 1); 408s assert (pd.B, 2); 408s assert (pd.C, 5); 408s ***** test 408s pd = makedist ("Uniform"); 408s assert (class (pd), "UniformDistribution"); 408s assert (pd.Lower, 0); 408s assert (pd.Upper, 1); 408s ***** test 408s pd = makedist ("Uniform", "Lower", -2); 408s assert (pd.Lower, -2); 408s assert (pd.Upper, 1); 408s ***** test 408s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 408s assert (pd.Lower, 1); 408s assert (pd.Upper, 3); 408s ***** test 408s pd = makedist ("Weibull"); 408s assert (class (pd), "WeibullDistribution"); 408s assert (pd.lambda, 1); 408s assert (pd.k, 1); 408s ***** test 408s pd = makedist ("Weibull", "lambda", 3); 408s assert (pd.lambda, 3); 408s assert (pd.k, 1); 408s ***** test 408s pd = makedist ("Weibull", "lambda", 3, "k", 2); 408s assert (pd.lambda, 3); 408s assert (pd.k, 2); 408s ***** error makedist (1) 408s ***** error makedist (["as";"sd"]) 408s ***** error makedist ("some") 408s ***** error ... 408s makedist ("Beta", "a") 408s ***** error ... 408s makedist ("Beta", "a", 1, "Q", 23) 408s ***** error ... 408s makedist ("Binomial", "N", 1, "Q", 23) 408s ***** error ... 408s makedist ("BirnbaumSaunders", "N", 1) 408s ***** error ... 408s makedist ("Burr", "lambda", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("extremevalue", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("exponential", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Gamma", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("HalfNormal", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Logistic", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Loglogistic", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Lognormal", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Loguniform", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Multinomial", "k", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Nakagami", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Normal", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Poisson", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Rician", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Stable", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Triangular", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Uniform", "mu", 1, "sdfs", 34) 408s ***** error ... 408s makedist ("Weibull", "mu", 1, "sdfs", 34) 408s 131 tests, 131 passed, 0 known failure, 0 skipped 408s [inst/dist_wrap/cdf.m] 408s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/cdf.m 408s ***** shared x 408s x = [1:5]; 408s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 408s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 408s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 408s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 408s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 408s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 408s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 408s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 408s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 408s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 408s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 408s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 408s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 408s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 408s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 408s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 408s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 408s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 409s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 409s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 409s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 409s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 409s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 409s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 409s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 409s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 409s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 409s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 409s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 409s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 409s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 409s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 409s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 409s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 409s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 409s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 409s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 409s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 409s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 409s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 409s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 409s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 409s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 409s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 409s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 409s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 409s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 409s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 409s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 409s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 409s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 409s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 409s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 409s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 409s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 409s ***** error cdf (1) 409s ***** error cdf ({"beta"}) 409s ***** error cdf ("beta", {[1 2 3 4 5]}) 409s ***** error cdf ("beta", "text") 409s ***** error cdf ("beta", 1+i) 409s ***** error ... 409s cdf ("Beta", x, "a", 2) 409s ***** error ... 409s cdf ("Beta", x, 5, "") 409s ***** error ... 409s cdf ("Beta", x, 5, {2}) 409s ***** error cdf ("chi2", x) 409s ***** error cdf ("Beta", x, 5) 409s ***** error cdf ("Burr", x, 5) 409s ***** error cdf ("Burr", x, 5, 2) 409s 86 tests, 86 passed, 0 known failure, 0 skipped 409s [inst/dist_wrap/pdf.m] 409s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/pdf.m 409s ***** shared x 409s x = [1:5]; 409s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 409s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 409s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 409s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 409s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 409s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 409s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 409s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 409s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 409s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 409s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 409s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 409s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 409s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 409s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 409s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 409s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 409s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 409s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 409s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 409s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 409s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 409s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 409s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 409s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 409s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 409s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 409s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 409s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 409s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 409s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 409s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 409s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 409s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 410s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 410s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 410s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 410s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 410s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 410s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 410s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 410s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 410s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 410s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 410s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 410s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 410s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 410s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 410s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 410s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 410s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 410s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 410s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 410s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 410s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 410s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 410s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 410s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 410s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 410s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 410s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 410s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 410s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 410s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 410s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 410s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 410s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 410s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 410s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 410s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 410s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 410s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 410s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 410s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 410s ***** error pdf (1) 410s ***** error pdf ({"beta"}) 410s ***** error pdf ("beta", {[1 2 3 4 5]}) 410s ***** error pdf ("beta", "text") 410s ***** error pdf ("beta", 1+i) 410s ***** error ... 410s pdf ("Beta", x, "a", 2) 410s ***** error ... 410s pdf ("Beta", x, 5, "") 410s ***** error ... 410s pdf ("Beta", x, 5, {2}) 410s ***** error pdf ("chi2", x) 410s ***** error pdf ("Beta", x, 5) 410s ***** error pdf ("Burr", x, 5) 410s ***** error pdf ("Burr", x, 5, 2) 410s 86 tests, 86 passed, 0 known failure, 0 skipped 410s [inst/dist_wrap/mle.m] 410s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_wrap/mle.m 410s ***** error mle (ones (2)) 410s ***** error mle ("text") 410s ***** error mle ([1, 2, 3, i, 5]) 410s ***** error ... 410s mle ([1:50], "distribution") 410s ***** error ... 410s mle ([1:50], "censoring", logical ([1,0,1,0])) 410s ***** error ... 410s mle ([1:50], "frequency", [1,0,1,0]) 410s ***** error ... 410s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 410s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 410s ***** error mle ([1:50], "alpha", 1) 410s ***** error mle ([1:50], "alpha", -1) 410s ***** error mle ([1:50], "alpha", i) 410s ***** error ... 410s mle ([1:50], "ntrials", -1) 410s ***** error ... 410s mle ([1:50], "ntrials", [20, 50]) 410s ***** error ... 410s mle ([1:50], "ntrials", [20.3]) 410s ***** error ... 410s mle ([1:50], "ntrials", 3i) 410s ***** error ... 410s mle ([1:50], "options", 4) 410s ***** error ... 410s mle ([1:50], "options", struct ("x", 3)) 410s ***** error mle ([1:50], "NAME", "value") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 2 1 0], "distribution", "bernoulli") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "bino") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 -1 0], "distribution", "gp") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 -1 0], "distribution", "hn") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 410s ***** error mle ([1:50], "distribution", "value") 410s ***** error ... 410s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 410s 36 tests, 36 passed, 0 known failure, 0 skipped 410s [inst/Classification/CompactClassificationGAM.m] 410s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/CompactClassificationGAM.m 410s ***** demo 410s ## Create a generalized additive model classifier and its compact version 410s # and compare their size 410s 410s load fisheriris 410s X = meas; 410s Y = species; 410s 410s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 410s CMdl = crossval (Mdl) 410s ***** test 410s Mdl = CompactClassificationGAM (); 410s assert (class (Mdl), "CompactClassificationGAM") 410s ***** test 410s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 410s y = [0; 0; 1; 1]; 410s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 410s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 410s CMdl = compact (Mdl); 410s assert (class (CMdl), "CompactClassificationGAM"); 410s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 410s assert (CMdl.ClassNames, {'0'; '1'}) 410s assert (CMdl.PredictorNames, PredictorNames) 410s assert (CMdl.BaseModel.Intercept, 0) 411s ***** test 411s load fisheriris 411s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 411s X = meas(inds, :); 411s Y = species(inds, :)'; 411s Y = strcmp (Y, 'virginica')'; 411s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 411s CMdl = compact (Mdl); 411s assert (class (CMdl), "CompactClassificationGAM"); 411s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 411s assert (CMdl.ClassNames, {'0'; '1'}) 411s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 411s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 411s assert (CMdl.ModelwInt.Intercept, 0) 416s ***** test 416s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 416s Y = [0; 1; 0; 1; 1]; 416s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 416s CMdl = compact (Mdl); 416s assert (class (CMdl), "CompactClassificationGAM"); 416s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 416s assert (CMdl.ClassNames, {'0'; '1'}) 416s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 416s assert (CMdl.Knots, [4, 4, 4]) 416s assert (CMdl.Order, [3, 3, 3]) 416s assert (CMdl.DoF, [7, 7, 7]) 416s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 417s ***** error ... 417s CompactClassificationGAM (1) 417s ***** test 417s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 417s y = [1; 0; 1; 0; 1]; 417s Mdl = fitcgam (x, y, "interactions", "all"); 417s CMdl = compact (Mdl); 417s l = {'0'; '0'; '0'; '0'; '0'}; 417s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 417s 0.4259, 0.5741; 0.3760, 0.6240]; 417s [labels, scores] = predict (CMdl, x); 417s assert (class (CMdl), "CompactClassificationGAM"); 417s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 417s assert (CMdl.ClassNames, {'1'; '0'}) 417s assert (CMdl.PredictorNames, {'x1', 'x2'}) 417s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 417s assert (labels, l) 417s assert (scores, s, 1e-1) 420s ***** test 420s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 420s y = [0; 0; 1; 1]; 420s interactions = [false, true, false; true, false, true; false, true, false]; 420s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 420s CMdl = compact (Mdl); 420s [label, score] = predict (CMdl, x, "includeinteractions", true); 420s l = {'0'; '0'; '1'; '1'}; 420s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 420s assert (class (CMdl), "CompactClassificationGAM"); 420s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 420s assert (CMdl.ClassNames, {'0'; '1'}) 420s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 420s assert (CMdl.ModelwInt.Intercept, 0) 420s assert (label, l) 420s assert (score, s, 1e-1) 424s ***** shared CMdl 424s Mdl = fitcgam (ones (4,2), ones (4,1)); 424s CMdl = compact (Mdl); 425s ***** error ... 425s predict (CMdl) 425s ***** error ... 425s predict (CMdl, []) 425s ***** error ... 425s predict (CMdl, 1) 425s 10 tests, 10 passed, 0 known failure, 0 skipped 425s [inst/Classification/ConfusionMatrixChart.m] 425s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ConfusionMatrixChart.m 425s ***** demo 425s ## Create a simple ConfusionMatrixChart Object 425s 425s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 425s NormalizedValues = cm.NormalizedValues 425s ClassLabels = cm.ClassLabels 425s ***** test 425s hf = figure ("visible", "off"); 425s unwind_protect 425s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 425s assert (isa (cm, "ConfusionMatrixChart"), true); 425s unwind_protect_cleanup 425s close (hf); 425s end_unwind_protect 425s 1 test, 1 passed, 0 known failure, 0 skipped 425s [inst/Classification/ClassificationDiscriminant.m] 425s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationDiscriminant.m 425s ***** demo 425s ## Create discriminant classifier 425s ## Evaluate some model predictions on new data. 425s 425s load fisheriris 425s x = meas; 425s y = species; 425s xc = [min(x); mean(x); max(x)]; 425s obj = fitcdiscr (x, y); 425s [label, score, cost] = predict (obj, xc); 425s ***** demo 425s load fisheriris 425s model = fitcdiscr (meas, species); 425s X = mean (meas); 425s Y = {'versicolor'}; 425s ## Compute loss for discriminant model 425s L = loss (model, X, Y) 425s ***** demo 425s load fisheriris 425s mdl = fitcdiscr (meas, species); 425s X = mean (meas); 425s Y = {'versicolor'}; 425s ## Margin for discriminant model 425s m = margin (mdl, X, Y) 425s ***** demo 425s load fisheriris 425s x = meas; 425s y = species; 425s obj = fitcdiscr (x, y, "gamma", 0.4); 425s ## Cross-validation for discriminant model 425s CVMdl = crossval (obj) 425s ***** test 425s load fisheriris 425s x = meas; 425s y = species; 425s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 425s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 425s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 425s 0.092721, 0.115388, 0.055244, 0.032710; ... 425s 0.167514, 0.055244, 0.185188, 0.042665; ... 425s 0.038401, 0.032710, 0.042665, 0.041882]; 425s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 425s 5.9360, 2.7700, 4.2600, 1.3260; ... 425s 6.5880, 2.9740, 5.5520, 2.0260]; 425s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 425s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 425s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 425s assert (class (Mdl), "ClassificationDiscriminant"); 425s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 425s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 425s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 425s assert (Mdl.ClassNames, unique (species)) 425s assert (Mdl.Sigma, sigma, 1e-6) 425s assert (Mdl.Mu, mu, 1e-14) 425s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 425s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 425s assert (Mdl.PredictorNames, PredictorNames) 425s ***** test 425s load fisheriris 425s x = meas; 425s y = species; 425s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 425s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 425s 0.046361, 0.115388, 0.027622, 0.016355; ... 425s 0.083757, 0.027622, 0.185188, 0.021333; ... 425s 0.019201, 0.016355, 0.021333, 0.041882]; 425s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 425s 5.9360, 2.7700, 4.2600, 1.3260; ... 425s 6.5880, 2.9740, 5.5520, 2.0260]; 425s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 425s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 425s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 425s assert (class (Mdl), "ClassificationDiscriminant"); 425s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 425s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 425s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 425s assert (Mdl.ClassNames, unique (species)) 425s assert (Mdl.Sigma, sigma, 1e-6) 425s assert (Mdl.Mu, mu, 1e-14) 425s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 425s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 425s ***** shared X, Y, MODEL 425s X = rand (10,2); 425s Y = [ones(5,1);2*ones(5,1)]; 425s MODEL = ClassificationDiscriminant (X, Y); 425s ***** error ClassificationDiscriminant () 425s ***** error ... 425s ClassificationDiscriminant (ones(4, 1)) 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "prior") 425s ***** error ... 425s ClassificationDiscriminant (ones (4,2), ones (1,4)) 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 425s ***** error ... 425s ClassificationDiscriminant (X, Y, "ResponseName", 1) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "ClassNames", {1}) 426s ***** error ... 426s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 426s ***** error ... 426s ClassificationDiscriminant ([1;2;3;4;5], ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 426s ***** error ... 426s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 426s ***** error ... 426s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 426s ***** error ... 426s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "Cost", "string") 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 426s ***** error ... 426s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 426s ***** error ... 426s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 426s ***** error ... 426s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 426s ***** error ... 426s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 426s ***** error ... 426s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 426s ***** test 426s load fisheriris 426s x = meas; 426s y = species; 426s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 426s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 426s assert (label, {'versicolor'}) 426s assert (score, [0, 0.9999, 0.0001], 1e-4) 426s assert (cost, [1, 0.0001, 0.9999], 1e-4) 426s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 426s assert (label, {'versicolor'}) 426s assert (score, [0, 0.6368, 0.3632], 1e-4) 426s assert (cost, [1, 0.3632, 0.6368], 1e-4) 426s ***** test 426s load fisheriris 426s x = meas; 426s y = species; 426s xc = [min(x); mean(x); max(x)]; 426s Mdl = fitcdiscr (x, y); 426s [label, score, cost] = predict (Mdl, xc); 426s l = {'setosa'; 'versicolor'; 'virginica'}; 426s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 426s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 426s assert (label, l) 426s assert (score, s, 1e-4) 426s assert (cost, c, 1e-4) 426s ***** error ... 426s predict (MODEL) 426s ***** error ... 426s predict (MODEL, []) 426s ***** error ... 426s predict (MODEL, 1) 426s ***** test 426s load fisheriris 426s model = fitcdiscr (meas, species); 426s x = mean (meas); 426s y = {'versicolor'}; 426s L = loss (model, x, y); 426s assert (L, 0) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6]; 426s y = {'A'; 'B'; 'A'}; 426s model = fitcdiscr (x, y, "Gamma", 0.4); 426s x_test = [1, 6; 3, 3]; 426s y_test = {'A'; 'B'}; 426s L = loss (model, x_test, y_test); 426s assert (L, 0.3333, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6; 7, 8]; 426s y = ['1'; '2'; '3'; '1']; 426s model = fitcdiscr (x, y, "gamma" , 0.5); 426s x_test = [3, 3]; 426s y_test = ['1']; 426s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 426s assert (L, 0.2423, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6; 7, 8]; 426s y = ['1'; '2'; '3'; '1']; 426s model = fitcdiscr (x, y, "gamma" , 0.5); 426s x_test = [3, 3; 5, 7]; 426s y_test = ['1'; '2']; 426s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 426s assert (L, 0.3333, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6; 7, 8]; 426s y = ['1'; '2'; '3'; '1']; 426s model = fitcdiscr (x, y, "gamma" , 0.5); 426s x_test = [3, 3; 5, 7]; 426s y_test = ['1'; '2']; 426s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 426s assert (L, 0.5886, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6; 7, 8]; 426s y = ['1'; '2'; '3'; '1']; 426s model = fitcdiscr (x, y, "gamma" , 0.5); 426s x_test = [3, 3; 5, 7]; 426s y_test = ['1'; '2']; 426s W = [1; 2]; 426s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 426s assert (L, 0.5107, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6]; 426s y = {'A'; 'B'; 'A'}; 426s model = fitcdiscr (x, y, "gamma" , 0.5); 426s x_with_nan = [1, 2; NaN, 4]; 426s y_test = {'A'; 'B'}; 426s L = loss (model, x_with_nan, y_test); 426s assert (L, 0.3333, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6]; 426s y = {'A'; 'B'; 'A'}; 426s model = fitcdiscr (x, y); 426s x_with_nan = [1, 2; NaN, 4]; 426s y_test = {'A'; 'B'}; 426s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 426s assert (isnan (L)) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6]; 426s y = {'A'; 'B'; 'A'}; 426s model = fitcdiscr (x, y); 426s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 426s L = loss (model, x, y, 'LossFun', customLossFun); 426s assert (L, 0.8889, 1e-4) 426s ***** test 426s x = [1, 2; 3, 4; 5, 6]; 426s y = [1; 2; 1]; 426s model = fitcdiscr (x, y); 426s L = loss (model, x, y, 'LossFun', 'classiferror'); 426s assert (L, 0.3333, 1e-4) 426s ***** error ... 426s loss (MODEL) 426s ***** error ... 426s loss (MODEL, ones (4,2)) 426s ***** error ... 426s loss (MODEL, [], zeros (2)) 426s ***** error ... 426s loss (MODEL, 1, zeros (2)) 426s ***** error ... 426s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 426s ***** error ... 426s loss (MODEL, ones (4,2), ones (3,1)) 426s ***** error ... 426s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 426s ***** error ... 426s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 426s load fisheriris 426s mdl = fitcdiscr (meas, species); 426s X = mean (meas); 426s Y = {'versicolor'}; 426s m = margin (mdl, X, Y); 426s assert (m, 1, 1e-6) 426s ***** test 426s X = [1, 2; 3, 4; 5, 6]; 426s Y = [1; 2; 1]; 426s mdl = fitcdiscr (X, Y, "gamma", 0.5); 426s m = margin (mdl, X, Y); 426s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 426s ***** error ... 426s margin (MODEL) 426s ***** error ... 426s margin (MODEL, ones (4,2)) 426s ***** error ... 426s margin (MODEL, [], zeros (2)) 426s ***** error ... 426s margin (MODEL, 1, zeros (2)) 426s ***** error ... 426s margin (MODEL, ones (4,2), ones (3,1)) 426s ***** shared x, y, obj 426s load fisheriris 426s x = meas; 426s y = species; 426s obj = fitcdiscr (x, y, "gamma", 0.4); 426s ***** test 426s CVMdl = crossval (obj); 426s assert (class (CVMdl), "ClassificationPartitionedModel") 426s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 426s assert (CVMdl.KFold == 10) 426s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 426s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 426s ***** test 426s CVMdl = crossval (obj, "KFold", 3); 426s assert (class (CVMdl), "ClassificationPartitionedModel") 426s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 426s assert (CVMdl.KFold == 3) 426s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 426s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 426s ***** test 426s CVMdl = crossval (obj, "HoldOut", 0.2); 426s assert (class (CVMdl), "ClassificationPartitionedModel") 426s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 426s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 426s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 426s ***** test 426s CVMdl = crossval (obj, "LeaveOut", 'on'); 426s assert (class (CVMdl), "ClassificationPartitionedModel") 426s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 426s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 426s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 428s ***** test 428s partition = cvpartition (y, 'KFold', 3); 428s CVMdl = crossval (obj, 'cvPartition', partition); 428s assert (class (CVMdl), "ClassificationPartitionedModel") 428s assert (CVMdl.KFold == 3) 428s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 428s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 428s ***** error ... 428s crossval (obj, "kfold") 428s ***** error... 428s crossval (obj, "kfold", 12, "holdout", 0.2) 428s ***** error ... 428s crossval (obj, "kfold", 'a') 428s ***** error ... 428s crossval (obj, "holdout", 2) 428s ***** error ... 428s crossval (obj, "leaveout", 1) 428s ***** error ... 428s crossval (obj, "cvpartition", 1) 428s 67 tests, 67 passed, 0 known failure, 0 skipped 428s [inst/Classification/ClassificationPartitionedModel.m] 428s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationPartitionedModel.m 428s ***** demo 428s 428s load fisheriris 428s x = meas; 428s y = species; 428s 428s ## Create a KNN classifier model 428s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 428s 428s ## Create a partition for 5-fold cross-validation 428s partition = cvpartition (y, "KFold", 5); 428s 428s ## Create the ClassificationPartitionedModel object 428s cvModel = crossval (obj, 'cvPartition', partition) 428s ***** demo 428s 428s load fisheriris 428s x = meas; 428s y = species; 428s 428s ## Create a KNN classifier model 428s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 428s 428s ## Create the ClassificationPartitionedModel object 428s cvModel = crossval (obj); 428s 428s ## Predict the class labels for the observations not used for training 428s [label, score, cost] = kfoldPredict (cvModel); 428s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 428s sum (strcmp (label, y)) / numel (y) *100, ... 428s sum (strcmp (label, y)), numel (y)) 428s ***** test 428s load fisheriris 428s a = fitcdiscr (meas, species, "gamma", 0.3); 428s cvModel = crossval (a, "KFold", 5); 428s assert (class (cvModel), "ClassificationPartitionedModel"); 428s assert (cvModel.NumObservations, 150); 428s assert (numel (cvModel.Trained), 5); 428s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 428s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 428s assert (cvModel.KFold, 5); 428s ***** test 428s load fisheriris 428s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 428s cvModel = crossval (a, "HoldOut", 0.3); 428s assert (class (cvModel), "ClassificationPartitionedModel"); 428s assert ({cvModel.X, cvModel.Y}, {meas, species}); 428s assert (cvModel.NumObservations, 150); 428s assert (numel (cvModel.Trained), 1); 428s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 428s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 428s ***** test 428s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 428s y = ["a"; "a"; "b"; "b"]; 428s a = fitcgam (x, y, "Interactions", "all"); 428s cvModel = crossval (a, "KFold", 2); 428s assert (class (cvModel), "ClassificationPartitionedModel"); 428s assert (cvModel.NumObservations, 4); 428s assert (numel (cvModel.Trained), 2); 428s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 428s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 428s assert (cvModel.KFold, 2); 440s ***** test 440s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 440s y = ["a"; "a"; "b"; "b"]; 440s a = fitcgam (x, y); 440s cvModel = crossval (a, "LeaveOut", "on"); 440s assert (class (cvModel), "ClassificationPartitionedModel"); 440s assert ({cvModel.X, cvModel.Y}, {x, y}); 440s assert (cvModel.NumObservations, 4); 440s assert (numel (cvModel.Trained), 4); 440s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 440s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 447s ***** test 447s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 447s y = ["a"; "a"; "b"; "b"]; 447s a = fitcknn (x, y); 447s partition = cvpartition (y, "KFold", 2); 447s cvModel = ClassificationPartitionedModel (a, partition); 447s assert (class (cvModel), "ClassificationPartitionedModel"); 447s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 447s assert (cvModel.NumObservations, 4); 447s assert (cvModel.ModelParameters.NumNeighbors, 1); 447s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 447s assert (cvModel.ModelParameters.Distance, "euclidean"); 447s assert (! cvModel.ModelParameters.Standardize); 447s ***** test 447s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 447s y = ["a"; "a"; "b"; "b"]; 447s a = fitcknn (x, y, "NSMethod", "exhaustive"); 447s partition = cvpartition (y, "HoldOut", 0.2); 447s cvModel = ClassificationPartitionedModel (a, partition); 447s assert (class (cvModel), "ClassificationPartitionedModel"); 447s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 447s assert ({cvModel.X, cvModel.Y}, {x, y}); 447s assert (cvModel.NumObservations, 4); 447s assert (cvModel.ModelParameters.NumNeighbors, 1); 447s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 447s assert (cvModel.ModelParameters.Distance, "euclidean"); 447s assert (! cvModel.ModelParameters.Standardize); 447s ***** test 447s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 447s y = ["a"; "a"; "b"; "b"]; 447s k = 2; 447s a = fitcknn (x, y, "NumNeighbors" ,k); 447s partition = cvpartition (numel (y), "LeaveOut"); 447s cvModel = ClassificationPartitionedModel (a, partition); 447s assert (class (cvModel), "ClassificationPartitionedModel"); 447s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 447s assert ({cvModel.X, cvModel.Y}, {x, y}); 447s assert (cvModel.NumObservations, 4); 447s assert (cvModel.ModelParameters.NumNeighbors, k); 447s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 447s assert (cvModel.ModelParameters.Distance, "euclidean"); 447s assert (! cvModel.ModelParameters.Standardize); 447s ***** test 447s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 447s y = {"a"; "a"; "b"; "b"}; 447s a = fitcnet (x, y, "IterationLimit", 50); 447s cvModel = crossval (a, "KFold", 2); 447s assert (class (cvModel), "ClassificationPartitionedModel"); 447s assert (cvModel.NumObservations, 4); 447s assert (numel (cvModel.Trained), 2); 447s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 447s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 447s assert (cvModel.KFold, 2); 447s ***** test 447s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 447s y = {"a"; "a"; "b"; "b"}; 447s a = fitcnet (x, y, "LayerSizes", [5, 3]); 447s cvModel = crossval (a, "LeaveOut", "on"); 447s assert (class (cvModel), "ClassificationPartitionedModel"); 447s assert ({cvModel.X, cvModel.Y}, {x, y}); 447s assert (cvModel.NumObservations, 4); 447s assert (numel (cvModel.Trained), 4); 447s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 447s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 447s ***** test 447s load fisheriris 447s inds = ! strcmp (species, 'setosa'); 447s x = meas(inds, 3:4); 447s y = grp2idx (species(inds)); 447s SVMModel = fitcsvm (x,y); 447s CVMdl = crossval (SVMModel, "KFold", 5); 447s assert (class (CVMdl), "ClassificationPartitionedModel") 447s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 447s assert (CVMdl.KFold == 5) 447s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 447s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 447s ***** test 447s load fisheriris 447s inds = ! strcmp (species, 'setosa'); 447s x = meas(inds, 3:4); 447s y = grp2idx (species(inds)); 447s obj = fitcsvm (x, y); 447s CVMdl = crossval (obj, "HoldOut", 0.2); 447s assert (class (CVMdl), "ClassificationPartitionedModel") 447s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 447s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 447s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 447s ***** test 447s load fisheriris 447s inds = ! strcmp (species, 'setosa'); 447s x = meas(inds, 3:4); 447s y = grp2idx (species(inds)); 447s obj = fitcsvm (x, y); 447s CVMdl = crossval (obj, "LeaveOut", 'on'); 447s assert (class (CVMdl), "ClassificationPartitionedModel") 447s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 447s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 447s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 448s ***** error ... 448s ClassificationPartitionedModel () 448s ***** error ... 448s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 448s ***** error ... 448s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 448s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 448s ***** error ... 448s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 448s ones (4,1)), 'Holdout') 448s ***** test 448s load fisheriris 448s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 448s cvModel = crossval (a, "Kfold", 4); 448s [label, score, cost] = kfoldPredict (cvModel); 448s assert (class(cvModel), "ClassificationPartitionedModel"); 448s assert ({cvModel.X, cvModel.Y}, {meas, species}); 448s assert (cvModel.NumObservations, 150); 448s ***** # assert (label, {"b"; "b"; "a"; "a"}); 448s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 448s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 448s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 448s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 448s ***** test 448s x = ones(4, 11); 448s y = {"a"; "a"; "b"; "b"}; 448s k = 3; 448s a = fitcknn (x, y, "NumNeighbors", k); 448s partition = cvpartition (numel (y), "LeaveOut"); 448s cvModel = ClassificationPartitionedModel (a, partition); 448s [label, score, cost] = kfoldPredict (cvModel); 448s assert (class(cvModel), "ClassificationPartitionedModel"); 448s assert ({cvModel.X, cvModel.Y}, {x, y}); 448s assert (cvModel.NumObservations, 4); 448s assert (cvModel.ModelParameters.NumNeighbors, k); 448s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 448s assert (cvModel.ModelParameters.Distance, "euclidean"); 448s assert (! cvModel.ModelParameters.Standardize); 448s assert (label, {"b"; "b"; "a"; "a"}); 448s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 448s 0.6667, 0.3333], 1e-4); 448s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 448s 0.3333, 0.6667], 1e-4); 448s ***** error ... 448s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 448s ***** error ... 448s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 450s 20 tests, 20 passed, 0 known failure, 0 skipped 450s [inst/Classification/ClassificationNeuralNetwork.m] 450s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationNeuralNetwork.m 450s ***** error ... 450s ClassificationNeuralNetwork () 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2)) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", {1}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 450s "Activations", {"sigmoid", "unsupported_type"}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 450s ***** error ... 450s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 451s ***** error ... 451s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 451s ***** error ... 451s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 451s ***** error ... 451s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 451s ***** error ... 451s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 451s ***** error ... 451s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 451s ***** error ... 451s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 451s ***** error ... 451s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 451s ***** shared x, y, objST, Mdl 451s load fisheriris 451s x = meas; 451s y = grp2idx (species); 451s Mdl = fitcnet (x, y, "IterationLimit", 100); 451s ***** error ... 451s Mdl.ScoreTransform = "a"; 451s ***** error ... 451s predict (Mdl) 451s ***** error ... 451s predict (Mdl, []) 451s ***** error ... 451s predict (Mdl, 1) 451s ***** test 451s CVMdl = crossval (Mdl, "KFold", 5); 451s assert (class (CVMdl), "ClassificationPartitionedModel") 451s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 451s assert (CVMdl.KFold == 5) 451s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 451s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 451s ***** test 451s CVMdl = crossval (Mdl, "HoldOut", 0.2); 451s assert (class (CVMdl), "ClassificationPartitionedModel") 451s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 451s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 451s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 451s ***** error ... 451s crossval (Mdl, "KFold") 451s ***** error ... 451s crossval (Mdl, "KFold", 5, "leaveout", 'on') 451s ***** error ... 451s crossval (Mdl, "KFold", 'a') 451s ***** error ... 451s crossval (Mdl, "KFold", 1) 451s ***** error ... 451s crossval (Mdl, "KFold", -1) 451s ***** error ... 451s crossval (Mdl, "KFold", 11.5) 451s ***** error ... 451s crossval (Mdl, "KFold", [1,2]) 451s ***** error ... 451s crossval (Mdl, "Holdout", 'a') 451s ***** error ... 451s crossval (Mdl, "Holdout", 11.5) 451s ***** error ... 451s crossval (Mdl, "Holdout", -1) 451s ***** error ... 451s crossval (Mdl, "Holdout", 0) 451s ***** error ... 451s crossval (Mdl, "Holdout", 1) 451s ***** error ... 451s crossval (Mdl, "Leaveout", 1) 451s ***** error ... 451s crossval (Mdl, "CVPartition", 1) 451s ***** error ... 451s crossval (Mdl, "CVPartition", 'a') 451s ***** error ... 451s crossval (Mdl, "some", "some") 451s 58 tests, 58 passed, 0 known failure, 0 skipped 451s [inst/Classification/CompactClassificationSVM.m] 451s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/CompactClassificationSVM.m 451s ***** demo 451s ## Create a support vectors machine classifier and its compact version 451s # and compare their size 451s 451s load fisheriris 451s X = meas; 451s Y = species; 451s 451s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 451s CMdl = crossval (Mdl) 451s ***** error ... 451s CompactClassificationSVM (1) 451s ***** shared x, y, CMdl 451s load fisheriris 451s inds = ! strcmp (species, 'setosa'); 451s x = meas(inds, 3:4); 451s y = grp2idx (species(inds)); 451s ***** test 451s xc = [min(x); mean(x); max(x)]; 451s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 451s CMdl = compact (Mdl); 451s assert (isempty (CMdl.Alpha), true) 451s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 451s [label, score] = predict (CMdl, xc); 451s assert (label, [1; 2; 2]); 451s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 451s assert (score(:,1), -score(:,2), eps) 451s ***** test 451s Mdl = fitcsvm (x, y); 451s CMdl = compact (Mdl); 451s assert (isempty (CMdl.Beta), true) 451s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 451s assert (numel (CMdl.Alpha), 24) 451s assert (CMdl.Bias, -14.415, 1e-3) 451s xc = [min(x); mean(x); max(x)]; 451s label = predict (CMdl, xc); 451s assert (label, [1; 2; 2]); 451s ***** error ... 451s predict (CMdl) 451s ***** error ... 451s predict (CMdl, []) 451s ***** error ... 451s predict (CMdl, 1) 451s ***** test 451s CMdl.ScoreTransform = "a"; 451s ***** error ... 451s [labels, scores] = predict (CMdl, x); 451s ***** test 451s rand ("seed", 1); 451s C = cvpartition (y, 'HoldOut', 0.15); 451s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 451s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 451s CMdl = compact (Mdl); 451s testInds = test (C); 451s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 451s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 451s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 451s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 451s assert (computed_margin, expected_margin, 1e-4); 451s ***** error ... 451s margin (CMdl) 451s ***** error ... 451s margin (CMdl, zeros (2)) 451s ***** error ... 451s margin (CMdl, [], 1) 451s ***** error ... 451s margin (CMdl, 1, 1) 451s ***** error ... 451s margin (CMdl, [1, 2], []) 451s ***** error ... 451s margin (CMdl, [1, 2], [1; 2]) 451s ***** test 451s rand ("seed", 1); 451s C = cvpartition (y, 'HoldOut', 0.15); 451s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 451s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 451s CMdl = compact (Mdl); 451s testInds = test (C); 451s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 451s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 451s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 451s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 451s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 451s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 451s assert (L1, 2.8711, 1e-4); 451s assert (L2, 0.5333, 1e-4); 451s assert (L3, 10.9685, 1e-4); 451s assert (L4, 1.9827, 1e-4); 451s assert (L5, 1.5849, 1e-4); 451s assert (L6, 7.6739, 1e-4); 451s ***** error ... 451s loss (CMdl) 451s ***** error ... 451s loss (CMdl, zeros (2)) 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "LossFun") 451s ***** error ... 451s loss (CMdl, [], zeros (2)) 451s ***** error ... 451s loss (CMdl, 1, zeros (2)) 451s ***** error ... 451s loss (CMdl, [1, 2], []) 451s ***** error ... 451s loss (CMdl, [1, 2], [1; 2]) 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "LossFun", 1) 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "LossFun", "some") 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "Weights", 'a') 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 451s ***** error ... 451s loss (CMdl, [1, 2], 1, "some", "some") 451s 29 tests, 29 passed, 0 known failure, 0 skipped 451s [inst/Classification/CompactClassificationNeuralNetwork.m] 451s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/CompactClassificationNeuralNetwork.m 451s ***** demo 451s ## Create a neural network classifier and its compact version 451s # and compare their size 451s 451s load fisheriris 451s X = meas; 451s Y = species; 451s 451s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 451s CMdl = crossval (Mdl) 451s ***** error ... 451s CompactClassificationDiscriminant (1) 451s ***** shared x, y, CMdl 451s load fisheriris 451s x = meas; 451s y = grp2idx (species); 451s Mdl = fitcnet (x, y, "IterationLimit", 100); 451s CMdl = compact (Mdl); 451s ***** error ... 451s predict (CMdl) 451s ***** error ... 451s predict (CMdl, []) 451s ***** error ... 451s predict (CMdl, 1) 451s ***** error ... 451s CMdl.ScoreTransform = "a"; 451s 5 tests, 5 passed, 0 known failure, 0 skipped 451s [inst/Classification/CompactClassificationDiscriminant.m] 451s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/CompactClassificationDiscriminant.m 451s ***** demo 451s ## Create a discriminant analysis classifier and its compact version 451s # and compare their size 451s 451s load fisheriris 451s X = meas; 451s Y = species; 451s 451s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 451s CMdl = crossval (Mdl) 451s ***** test 451s load fisheriris 451s x = meas; 451s y = species; 451s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 451s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 451s CMdl = compact (Mdl); 451s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 451s 0.092721, 0.115388, 0.055244, 0.032710; ... 451s 0.167514, 0.055244, 0.185188, 0.042665; ... 451s 0.038401, 0.032710, 0.042665, 0.041882]; 451s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 451s 5.9360, 2.7700, 4.2600, 1.3260; ... 451s 6.5880, 2.9740, 5.5520, 2.0260]; 451s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 451s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 451s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 451s assert (class (CMdl), "CompactClassificationDiscriminant"); 451s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 451s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 451s assert (CMdl.ClassNames, unique (species)) 451s assert (CMdl.Sigma, sigma, 1e-6) 451s assert (CMdl.Mu, mu, 1e-14) 451s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 451s assert (CMdl.PredictorNames, PredictorNames) 451s ***** test 451s load fisheriris 451s x = meas; 451s y = species; 451s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 451s CMdl = compact (Mdl); 451s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 451s 0.046361, 0.115388, 0.027622, 0.016355; ... 451s 0.083757, 0.027622, 0.185188, 0.021333; ... 451s 0.019201, 0.016355, 0.021333, 0.041882]; 451s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 451s 5.9360, 2.7700, 4.2600, 1.3260; ... 451s 6.5880, 2.9740, 5.5520, 2.0260]; 451s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 451s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 451s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 451s assert (class (CMdl), "CompactClassificationDiscriminant"); 451s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 451s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 451s assert (CMdl.ClassNames, unique (species)) 451s assert (CMdl.Sigma, sigma, 1e-6) 451s assert (CMdl.Mu, mu, 1e-14) 451s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 451s ***** error ... 451s CompactClassificationDiscriminant (1) 451s ***** test 451s load fisheriris 451s x = meas; 451s y = species; 451s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 451s CMdl = compact (Mdl); 451s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 451s assert (label, {'versicolor'}) 451s assert (score, [0, 0.9999, 0.0001], 1e-4) 451s assert (cost, [1, 0.0001, 0.9999], 1e-4) 451s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 451s assert (label, {'versicolor'}) 451s assert (score, [0, 0.6368, 0.3632], 1e-4) 451s assert (cost, [1, 0.3632, 0.6368], 1e-4) 452s ***** test 452s load fisheriris 452s x = meas; 452s y = species; 452s xc = [min(x); mean(x); max(x)]; 452s Mdl = fitcdiscr (x, y); 452s CMdl = compact (Mdl); 452s [label, score, cost] = predict (CMdl, xc); 452s l = {'setosa'; 'versicolor'; 'virginica'}; 452s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 452s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 452s assert (label, l) 452s assert (score, s, 1e-4) 452s assert (cost, c, 1e-4) 452s ***** shared MODEL 452s X = rand (10,2); 452s Y = [ones(5,1);2*ones(5,1)]; 452s MODEL = compact (ClassificationDiscriminant (X, Y)); 452s ***** error ... 452s predict (MODEL) 452s ***** error ... 452s predict (MODEL, []) 452s ***** error ... 452s predict (MODEL, 1) 452s ***** test 452s load fisheriris 452s model = fitcdiscr (meas, species); 452s x = mean (meas); 452s y = {'versicolor'}; 452s L = loss (model, x, y); 452s assert (L, 0) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6]; 452s y = {'A'; 'B'; 'A'}; 452s model = fitcdiscr (x, y, "Gamma", 0.4); 452s x_test = [1, 6; 3, 3]; 452s y_test = {'A'; 'B'}; 452s L = loss (model, x_test, y_test); 452s assert (L, 0.3333, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6; 7, 8]; 452s y = ['1'; '2'; '3'; '1']; 452s model = fitcdiscr (x, y, "gamma" , 0.5); 452s x_test = [3, 3]; 452s y_test = ['1']; 452s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 452s assert (L, 0.2423, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6; 7, 8]; 452s y = ['1'; '2'; '3'; '1']; 452s model = fitcdiscr (x, y, "gamma" , 0.5); 452s x_test = [3, 3; 5, 7]; 452s y_test = ['1'; '2']; 452s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 452s assert (L, 0.3333, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6; 7, 8]; 452s y = ['1'; '2'; '3'; '1']; 452s model = fitcdiscr (x, y, "gamma" , 0.5); 452s x_test = [3, 3; 5, 7]; 452s y_test = ['1'; '2']; 452s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 452s assert (L, 0.5886, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6; 7, 8]; 452s y = ['1'; '2'; '3'; '1']; 452s model = fitcdiscr (x, y, "gamma" , 0.5); 452s x_test = [3, 3; 5, 7]; 452s y_test = ['1'; '2']; 452s W = [1; 2]; 452s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 452s assert (L, 0.5107, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6]; 452s y = {'A'; 'B'; 'A'}; 452s model = fitcdiscr (x, y, "gamma" , 0.5); 452s x_with_nan = [1, 2; NaN, 4]; 452s y_test = {'A'; 'B'}; 452s L = loss (model, x_with_nan, y_test); 452s assert (L, 0.3333, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6]; 452s y = {'A'; 'B'; 'A'}; 452s model = fitcdiscr (x, y); 452s x_with_nan = [1, 2; NaN, 4]; 452s y_test = {'A'; 'B'}; 452s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 452s assert (isnan (L)) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6]; 452s y = {'A'; 'B'; 'A'}; 452s model = fitcdiscr (x, y); 452s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 452s L = loss (model, x, y, 'LossFun', customLossFun); 452s assert (L, 0.8889, 1e-4) 452s ***** test 452s x = [1, 2; 3, 4; 5, 6]; 452s y = [1; 2; 1]; 452s model = fitcdiscr (x, y); 452s L = loss (model, x, y, 'LossFun', 'classiferror'); 452s assert (L, 0.3333, 1e-4) 452s ***** error ... 452s loss (MODEL) 452s ***** error ... 452s loss (MODEL, ones (4,2)) 452s ***** error ... 452s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 452s ***** error ... 452s loss (MODEL, ones (4,2), ones (3,1)) 452s ***** error ... 452s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 452s ***** error ... 452s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 452s load fisheriris 452s mdl = fitcdiscr (meas, species); 452s X = mean (meas); 452s Y = {'versicolor'}; 452s m = margin (mdl, X, Y); 452s assert (m, 1, 1e-6) 452s ***** test 452s X = [1, 2; 3, 4; 5, 6]; 452s Y = [1; 2; 1]; 452s mdl = fitcdiscr (X, Y, "gamma", 0.5); 452s m = margin (mdl, X, Y); 452s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 452s ***** error ... 452s margin (MODEL) 452s ***** error ... 452s margin (MODEL, ones (4,2)) 452s ***** error ... 452s margin (MODEL, ones (4,2), ones (3,1)) 452s 28 tests, 28 passed, 0 known failure, 0 skipped 452s [inst/Classification/ClassificationSVM.m] 452s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationSVM.m 452s ***** demo 452s ## Create a Support Vector Machine classifier and determine margin for test 452s ## data. 452s load fisheriris 452s rng(1); ## For reproducibility 452s 452s ## Select indices of the non-setosa species 452s inds = !strcmp(species, 'setosa'); 452s 452s ## Select features and labels for non-setosa species 452s X = meas(inds, 3:4); 452s Y = grp2idx(species(inds)); 452s 452s ## Convert labels to +1 and -1 452s unique_classes = unique(Y); 452s Y(Y == unique_classes(1)) = -1; 452s Y(Y == unique_classes(2)) = 1; 452s 452s ## Partition data for training and testing 452s cv = cvpartition(Y, 'HoldOut', 0.15); 452s X_train = X(training(cv), :); 452s Y_train = Y(training(cv)); 452s X_test = X(test(cv), :); 452s Y_test = Y(test(cv)); 452s 452s ## Train the SVM model 452s CVSVMModel = fitcsvm(X_train, Y_train); 452s 452s ## Calculate margins 452s m = margin(CVSVMModel, X_test, Y_test); 452s disp(m); 452s ***** demo 452s ## Create a Support Vector Machine classifier and determine loss for test 452s ## data. 452s load fisheriris 452s rng(1); ## For reproducibility 452s 452s ## Select indices of the non-setosa species 452s inds = !strcmp(species, 'setosa'); 452s 452s ## Select features and labels for non-setosa species 452s X = meas(inds, 3:4); 452s Y = grp2idx(species(inds)); 452s 452s ## Convert labels to +1 and -1 452s unique_classes = unique(Y); 452s Y(Y == unique_classes(1)) = -1; 452s Y(Y == unique_classes(2)) = 1; 452s 452s ## Randomly partition the data into training and testing sets 452s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 452s 452s X_train = X(training(cv), :); 452s Y_train = Y(training(cv)); 452s 452s X_test = X(test(cv), :); 452s Y_test = Y(test(cv)); 452s 452s ## Train the SVM model 452s SVMModel = fitcsvm(X_train, Y_train); 452s 452s ## Calculate loss 452s 452s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 452s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 452s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 452s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 452s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 452s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 452s ***** test 452s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 452s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 452s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 452s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 452s assert (class (a), "ClassificationSVM"); 452s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 452s assert ({a.X, a.Y}, {x, y}) 452s assert (a.NumObservations, 5) 452s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 452s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 452s ***** test 452s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 452s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 452s a = ClassificationSVM (x, y); 452s assert (class (a), "ClassificationSVM"); 452s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 452s assert (a.ModelParameters.BoxConstraint, 1) 452s assert (a.ClassNames, [1; -1]) 452s assert (a.ModelParameters.KernelOffset, 0) 452s ***** test 452s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 452s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 452s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 452s "KernelOffset", 2); 452s assert (class (a), "ClassificationSVM"); 452s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 452s assert (a.ModelParameters.BoxConstraint, 2) 452s assert (a.ModelParameters.KernelOffset, 2) 452s ***** test 452s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 452s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 452s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 452s "PolynomialOrder", 3); 452s assert (class (a), "ClassificationSVM"); 452s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 452s assert (a.ModelParameters.PolynomialOrder, 3) 452s ***** error ClassificationSVM () 452s ***** error ... 452s ClassificationSVM (ones(10,2)) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (5,1)) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", {1}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 452s ***** error ... 452s ClassificationSVM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 452s ***** error ... 452s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 452s ***** error ... 452s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 452s ***** error ... 452s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 452s ***** error ... 452s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 452s ***** error ... 452s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 452s ***** error ... 452s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 452s ***** error ... 452s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 452s ***** shared x, y, x_train, x_test, y_train, y_test, objST 452s load fisheriris 452s inds = ! strcmp (species, 'setosa'); 452s x = meas(inds, 3:4); 452s y = grp2idx (species(inds)); 452s ***** test 452s xc = [min(x); mean(x); max(x)]; 452s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 452s assert (isempty (obj.Alpha), true) 452s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 452s [label, score] = predict (obj, xc); 452s assert (label, [1; 2; 2]); 452s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 452s assert (score(:,1), -score(:,2), eps) 452s obj = fitPosterior (obj); 452s [label, probs] = predict (obj, xc); 452s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 3e-2); 452s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 452s ***** test 452s obj = fitcsvm (x, y); 452s assert (isempty (obj.Beta), true) 452s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 452s assert (numel (obj.Alpha), 24) 452s assert (obj.Bias, -14.415, 1e-3) 452s xc = [min(x); mean(x); max(x)]; 452s label = predict (obj, xc); 452s assert (label, [1; 2; 2]); 452s ***** error ... 452s predict (ClassificationSVM (ones (40,2), ones (40,1))) 452s ***** error ... 452s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 452s ***** error ... 452s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 452s ***** test 452s objST = fitcsvm (x, y); 452s objST.ScoreTransform = "a"; 452s ***** error ... 452s [labels, scores] = predict (objST, x); 452s ***** error ... 452s [labels, scores] = resubPredict (objST); 452s ***** test 452s rand ("seed", 1); 452s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 452s 'Tolerance', 1e-7); 452s obj = CVSVMModel.Trained{1}; 452s testInds = test (CVSVMModel.Partition); 452s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 452s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 452s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 452s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 452s assert (computed_margin, expected_margin, 1e-4); 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 452s ***** error ... 452s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 452s ***** test 452s rand ("seed", 1); 452s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 452s obj = CVSVMModel.Trained{1}; 452s testInds = test (CVSVMModel.Partition); 452s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 452s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 452s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 452s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 452s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 452s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 452s assert (L1, 2.8711, 1e-4); 452s assert (L2, 0.5333, 1e-4); 452s assert (L3, 10.9685, 1e-4); 452s assert (L4, 1.9827, 1e-4); 452s assert (L5, 1.5849, 1e-4); 452s assert (L6, 7.6739, 1e-4); 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones(2,1), "LossFun") 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "LossFun", 1) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "LossFun", "some") 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "Weights", ['a','b']) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "Weights", 'a') 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "Weights", [1,2,3]) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "Weights", 3) 452s ***** error ... 452s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 452s ones (2,1), "some", "some") 452s ***** error ... 452s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 453s ***** error ... 453s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 453s ***** test 453s SVMModel = fitcsvm (x, y); 453s CVMdl = crossval (SVMModel, "KFold", 5); 453s assert (class (CVMdl), "ClassificationPartitionedModel") 453s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 453s assert (CVMdl.KFold == 5) 453s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 453s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 453s ***** test 453s obj = fitcsvm (x, y); 453s CVMdl = crossval (obj, "HoldOut", 0.2); 453s assert (class (CVMdl), "ClassificationPartitionedModel") 453s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 453s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 453s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 453s ***** test 453s obj = fitcsvm (x, y); 453s CVMdl = crossval (obj, "LeaveOut", 'on'); 453s assert (class (CVMdl), "ClassificationPartitionedModel") 453s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 453s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 453s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 453s "KFold", 5, "leaveout", 'on') 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 453s ***** error ... 453s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 454s ***** error ... 454s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 454s 115 tests, 115 passed, 0 known failure, 0 skipped 454s [inst/Classification/ClassificationKNN.m] 454s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationKNN.m 454s ***** demo 454s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 454s ## Evaluate some model predictions on new data. 454s 454s load fisheriris 454s x = meas; 454s y = species; 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 454s [label, score, cost] = predict (obj, xc) 454s ***** demo 454s load fisheriris 454s x = meas; 454s y = species; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 454s 454s ## Create a cross-validated model 454s CVMdl = crossval (obj) 454s ***** demo 454s load fisheriris 454s x = meas; 454s y = species; 454s covMatrix = cov (x); 454s 454s ## Fit the k-NN model using the 'mahalanobis' distance 454s ## and the custom covariance matrix 454s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 454s 'Cov', covMatrix); 454s 454s ## Create a partition model using cvpartition 454s Partition = cvpartition (size (x, 1), 'kfold', 12); 454s 454s ## Create cross-validated model using 'cvPartition' name-value argument 454s CVMdl = crossval (obj, 'cvPartition', Partition) 454s 454s ## Access the trained model from first fold of cross-validation 454s CVMdl.Trained{1} 454s ***** demo 454s X = [1, 2; 3, 4; 5, 6]; 454s Y = {'A'; 'B'; 'A'}; 454s model = fitcknn (X, Y); 454s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 454s ## Calculate loss using custom loss function 454s L = loss (model, X, Y, 'LossFun', customLossFun) 454s ***** demo 454s X = [1, 2; 3, 4; 5, 6]; 454s Y = {'A'; 'B'; 'A'}; 454s model = fitcknn (X, Y); 454s ## Calculate loss using 'mincost' loss function 454s L = loss (model, X, Y, 'LossFun', 'mincost') 454s ***** demo 454s X = [1, 2; 3, 4; 5, 6]; 454s Y = ['1'; '2'; '3']; 454s model = fitcknn (X, Y); 454s X_test = [3, 3; 5, 7]; 454s Y_test = ['1'; '2']; 454s ## Specify custom Weights 454s W = [1; 2]; 454s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 454s ***** demo 454s load fisheriris 454s mdl = fitcknn (meas, species); 454s X = mean (meas); 454s Y = {'versicolor'}; 454s m = margin (mdl, X, Y) 454s ***** demo 454s X = [1, 2; 4, 5; 7, 8; 3, 2]; 454s Y = [2; 1; 3; 2]; 454s ## Train the model 454s mdl = fitcknn (X, Y); 454s ## Specify Vars and Labels 454s Vars = 1; 454s Labels = 2; 454s ## Calculate partialDependence 454s [pd, x, y] = partialDependence (mdl, Vars, Labels); 454s ***** demo 454s X = [1, 2; 4, 5; 7, 8; 3, 2]; 454s Y = [2; 1; 3; 2]; 454s ## Train the model 454s mdl = fitcknn (X, Y); 454s ## Specify Vars and Labels 454s Vars = 1; 454s Labels = 1; 454s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 454s ## Calculate partialDependence using queryPoints 454s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 454s queryPoints) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s k = 10; 454s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = ones (4, 11); 454s y = ["a"; "a"; "b"; "b"]; 454s k = 10; 454s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s k = 10; 454s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s k = 10; 454s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s weights = ones (4,1); 454s a = ClassificationKNN (x, y, "Standardize", 1); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.Standardize}, {true}) 454s assert ({a.Sigma}, {std(x, [], 1)}) 454s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s weights = ones (4,1); 454s a = ClassificationKNN (x, y, "Standardize", false); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.Standardize}, {false}) 454s assert ({a.Sigma}, {[]}) 454s assert ({a.Mu}, {[]}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s s = ones (1, 3); 454s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.DistParameter}, {s}) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 454s assert (class (a), "ClassificationKNN"); 454s assert (a.DistParameter, 5) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 454s "NSMethod", "exhaustive"); 454s assert (class (a), "ClassificationKNN"); 454s assert (a.DistParameter, 5) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 454s assert (class (a), "ClassificationKNN"); 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 454s assert ({a.BucketSize}, {20}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y, "IncludeTies", true); 454s assert (class (a), "ClassificationKNN"); 454s assert (a.IncludeTies, true); 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y); 454s assert (class (a), "ClassificationKNN"); 454s assert (a.IncludeTies, false); 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s a = ClassificationKNN (x, y); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Prior, [0.5; 0.5]) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s prior = [0.5; 0.5]; 454s a = ClassificationKNN (x, y, "Prior", "empirical"); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Prior, prior) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "a"; "b"]; 454s prior = [0.75; 0.25]; 454s a = ClassificationKNN (x, y, "Prior", "empirical"); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Prior, prior) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "a"; "b"]; 454s prior = [0.5; 0.5]; 454s a = ClassificationKNN (x, y, "Prior", "uniform"); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Prior, prior) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s cost = eye (2); 454s a = ClassificationKNN (x, y, "Cost", cost); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Cost, [1, 0; 0, 1]) 454s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 454s y = ["a"; "a"; "b"; "b"]; 454s cost = eye (2); 454s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 454s assert (class (a), "ClassificationKNN") 454s assert (a.Cost, [1, 0; 0, 1]) 454s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 454s assert ({a.BucketSize}, {50}) 454s ***** test 454s x = [1, 2; 3, 4; 5,6; 5, 8]; 454s y = {'9'; '9'; '6'; '7'}; 454s a = ClassificationKNN (x, y); 454s assert (a.Prior, [0.25; 0.25; 0.5]) 454s ***** test 454s load fisheriris 454s x = meas; 454s y = species; 454s ClassNames = {'setosa', 'versicolor', 'virginica'}; 454s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 454s assert (a.ClassNames, ClassNames') 454s ***** error ClassificationKNN () 454s ***** error ... 454s ClassificationKNN (ones(4, 1)) 454s ***** error ... 454s ClassificationKNN (ones (4,2), ones (1,4)) 454s ***** error ... 454s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 454s ***** error ... 454s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 454s ***** error ... 454s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", {1}) 454s ***** error ... 454s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 454s ***** error ... 454s ClassificationKNN (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 454s ***** error ... 454s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 454s ***** error ... 454s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 454s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 454s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 454s ***** error ... 454s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 454s ***** error ... 454s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 454s ***** error ... 454s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 454s ***** shared x, y 454s load fisheriris 454s x = meas; 454s y = species; 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 5); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"; "versicolor"; "virginica"}) 454s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 454s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"; "versicolor"; "virginica"}) 454s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 454s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 454s [l, s, c] = predict (obj, xc); 454s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 454s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"; "versicolor"; "virginica"}) 454s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 454s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 454s ***** test 454s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 454s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 454s obj = fitcknn (x, y, "NumNeighbors", 5); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 454s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 454s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 5); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 0.6, 0.4], 1e-4) 454s assert (c, [1, 0.4, 0.6], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 0.5, 0.5], 1e-4) 454s assert (c, [1, 0.5, 0.5], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"}) 454s assert (s, [0.9, 0.1, 0], 1e-4) 454s assert (c, [0.1, 0.9, 1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 454s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"}) 454s assert (s, [0.8, 0.2, 0], 1e-4) 454s assert (c, [0.2, 0.8, 1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 1, 0], 1e-4) 454s assert (c, [1, 0, 1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 0.7, 0.3], 1e-4) 454s assert (c, [1, 0.3, 0.7], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 0.6, 0.4], 1e-4) 454s assert (c, [1, 0.4, 0.6], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"virginica"}) 454s assert (s, [0, 0.1, 0.9], 1e-4) 454s assert (c, [1, 0.9, 0.1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"virginica"}) 454s assert (s, [0, 0.1, 0.9], 1e-4) 454s assert (c, [1, 0.9, 0.1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"versicolor"}) 454s assert (s, [0, 1, 0], 1e-4) 454s assert (c, [1, 0, 1], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"}) 454s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 454s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 454s ***** test 454s xc = [5, 3, 5, 1.45]; 454s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"}) 454s assert (s, [0.8, 0.2, 0], 1e-4) 454s assert (c, [0.2, 0.8, 1], 1e-4) 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa"; "versicolor"; "virginica"}) 454s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 454s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 454s ***** test 454s xc = [min(x); mean(x); max(x)]; 454s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 454s [l, s, c] = predict (obj, xc); 454s assert (l, {"setosa";"setosa";"setosa"}) 454s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 454s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 455s ***** error ... 455s predict (ClassificationKNN (ones (4,2), ones (4,1))) 455s ***** error ... 455s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 455s ***** error ... 455s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 455s ***** test 455s load fisheriris 455s model = fitcknn (meas, species, 'NumNeighbors', 5); 455s X = mean (meas); 455s Y = {'versicolor'}; 455s L = loss (model, X, Y); 455s assert (L, 0) 455s ***** test 455s load fisheriris 455s model = fitcknn (meas, species, 'NumNeighbors', 5); 455s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 455s assert (L, 0.1413, 1e-4) 455s ***** test 455s load fisheriris 455s model = fitcknn (meas, species); 455s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 455s assert (L, 0.1269, 1e-4) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = {'A'; 'B'; 'A'}; 455s model = fitcknn (X, Y); 455s X_test = [1, 6; 3, 3]; 455s Y_test = {'A'; 'B'}; 455s L = loss (model, X_test, Y_test); 455s assert (abs (L - 0.6667) > 1e-5) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = {'A'; 'B'; 'A'}; 455s model = fitcknn (X, Y); 455s X_with_nan = [1, 2; NaN, 4]; 455s Y_test = {'A'; 'B'}; 455s L = loss (model, X_with_nan, Y_test); 455s assert (abs (L - 0.3333) < 1e-4) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = {'A'; 'B'; 'A'}; 455s model = fitcknn (X, Y); 455s X_with_nan = [1, 2; NaN, 4]; 455s Y_test = {'A'; 'B'}; 455s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 455s assert (isnan (L)) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = {'A'; 'B'; 'A'}; 455s model = fitcknn (X, Y); 455s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 455s L = loss (model, X, Y, 'LossFun', customLossFun); 455s assert (L, 0) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = [1; 2; 1]; 455s model = fitcknn (X, Y); 455s L = loss (model, X, Y, 'LossFun', 'classiferror'); 455s assert (L, 0) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = [true; false; true]; 455s model = fitcknn (X, Y); 455s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 455s assert (abs (L - 0.1269) < 1e-4) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = ['1'; '2'; '1']; 455s model = fitcknn (X, Y); 455s L = loss (model, X, Y, 'LossFun', 'classiferror'); 455s assert (L, 0) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = ['1'; '2'; '3']; 455s model = fitcknn (X, Y); 455s X_test = [3, 3]; 455s Y_test = ['1']; 455s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 455s assert (L, 1) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = ['1'; '2'; '3']; 455s model = fitcknn (X, Y); 455s X_test = [3, 3; 5, 7]; 455s Y_test = ['1'; '2']; 455s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 455s assert (L, 1) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = ['1'; '2'; '3']; 455s model = fitcknn (X, Y); 455s X_test = [3, 3; 5, 7]; 455s Y_test = ['1'; '2']; 455s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 455s assert (L, 1) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = ['1'; '2'; '3']; 455s model = fitcknn (X, Y); 455s X_test = [3, 3; 5, 7]; 455s Y_test = ['1'; '2']; 455s W = [1; 2]; 455s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 455s assert (abs (L - 0.6931) < 1e-4) 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1))) 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 455s ***** error ... 455s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 455s ***** error ... 455s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 455s ones (4,1), 'LossFun') 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 455s ones (4,1), 'LossFun', 'a') 455s ***** error ... 455s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 455s ones (4,1), 'Weights', 'w') 455s ***** test 455s load fisheriris 455s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 455s X = mean (meas); 455s Y = {'versicolor'}; 455s m = margin (mdl, X, Y); 455s assert (m, 1) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = [1; 2; 3]; 455s mdl = fitcknn (X, Y); 455s m = margin (mdl, X, Y); 455s assert (m, [1; 1; 1]) 455s ***** test 455s X = [7, 8; 9, 10]; 455s Y = ['1'; '2']; 455s mdl = fitcknn (X, Y); 455s m = margin (mdl, X, Y); 455s assert (m, [1; 1]) 455s ***** test 455s X = [11, 12]; 455s Y = {'1'}; 455s mdl = fitcknn (X, Y); 455s m = margin (mdl, X, Y); 455s assert (isnan (m)) 455s ***** test 455s X = [1, 2; 3, 4; 5, 6]; 455s Y = [1; 2; 3]; 455s mdl = fitcknn (X, Y); 455s X1 = [15, 16]; 455s Y1 = [1]; 455s m = margin (mdl, X1, Y1); 455s assert (m, -1) 455s ***** error ... 455s margin (ClassificationKNN (ones (4,2), ones (4,1))) 455s ***** error ... 455s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 455s ***** error ... 455s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 455s ***** error ... 455s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 455s ***** error ... 455s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 455s ***** shared X, Y, mdl 455s X = [1, 2; 4, 5; 7, 8; 3, 2]; 455s Y = [2; 1; 3; 2]; 455s mdl = fitcknn (X, Y); 455s ***** test 455s Vars = 1; 455s Labels = 2; 455s [pd, x, y] = partialDependence (mdl, Vars, Labels); 455s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 455s 0.5000, 0.5000]; 455s assert (pd, pdm) 456s ***** test 456s Vars = 1; 456s Labels = 2; 456s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 456s 'NumObservationsToSample', 5); 456s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 456s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 456s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 456s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 456s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 456s assert (abs (pdm - pd) < 1) 456s ***** test 456s Vars = 1; 456s Labels = 2; 456s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 456s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000]; 456s assert (pd, pdm) 456s ***** test 456s Vars = [1, 2]; 456s Labels = 1; 456s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 456s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 456s queryPoints, 'UseParallel', true); 456s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 456s assert (pd, pdm) 456s ***** test 456s Vars = 1; 456s Labels = [1; 2]; 456s [pd, x, y] = partialDependence (mdl, Vars, Labels); 456s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 456s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 456s 0.5000, 0.5000, 0.5000]; 456s assert (pd, pdm) 457s ***** test 457s Vars = [1, 2]; 457s Labels = [1; 2]; 457s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 457s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 457s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 457s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 457s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 457s assert (pd, pdm) 457s ***** test 457s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 457s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 457s X = [X1, double(X2)]; 457s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 457s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 457s Vars = 1; 457s Labels = 1; 457s [pd, x, y] = partialDependence (mdl, Vars, Labels); 457s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 457s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 457s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 457s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 457s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 457s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 457s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 457s 0.7500, 0.7500, 0.7500]; 457s assert (pd, pdm) 458s ***** test 458s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 458s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 458s X = [X1, double(X2)]; 458s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 458s predictorNames = {'Feature1', 'Feature2'}; 458s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 458s Vars = 'Feature1'; 458s Labels = 1; 458s [pd, x, y] = partialDependence (mdl, Vars, Labels); 458s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 458s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 458s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 458s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 458s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 458s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 458s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 458s 0.7500, 0.7500, 0.7500]; 458s assert (pd, pdm) 458s ***** test 458s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 458s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 458s X = [X1, double(X2)]; 458s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 458s predictorNames = {'Feature1', 'Feature2'}; 458s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 458s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 458s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 458s new_X = [new_X1, double(new_X2)]; 458s Vars = 'Feature1'; 458s Labels = 1; 458s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 458s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 458s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 458s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 458s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 458s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 458s 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]; 458s assert (pd, pdm) 459s ***** error ... 459s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 459s ***** error ... 459s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 459s ***** error ... 459s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 459s ones (4,1), 'NumObservationsToSample') 459s ***** error ... 459s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 459s ones (4,1), 2) 459s ***** shared x, y, obj 459s load fisheriris 459s x = meas; 459s y = species; 459s covMatrix = cov (x); 459s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 459s 'mahalanobis', 'Cov', covMatrix); 459s ***** test 459s CVMdl = crossval (obj); 459s assert (class (CVMdl), "ClassificationPartitionedModel") 459s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 459s assert (CVMdl.KFold == 10) 459s assert (CVMdl.ModelParameters.NumNeighbors == 5) 459s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 459s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 459s assert (!CVMdl.ModelParameters.Standardize) 459s ***** test 459s CVMdl = crossval (obj, "KFold", 5); 459s assert (class (CVMdl), "ClassificationPartitionedModel") 459s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 459s assert (CVMdl.KFold == 5) 459s assert (CVMdl.ModelParameters.NumNeighbors == 5) 459s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 459s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 459s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 459s ***** test 459s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 459s CVMdl = crossval (obj, "HoldOut", 0.2); 459s assert (class (CVMdl), "ClassificationPartitionedModel") 459s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 459s assert (CVMdl.ModelParameters.NumNeighbors == 5) 459s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 459s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 459s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 459s ***** test 459s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 459s CVMdl = crossval (obj, "LeaveOut", 'on'); 459s assert (class (CVMdl), "ClassificationPartitionedModel") 459s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 459s assert (CVMdl.ModelParameters.NumNeighbors == 10) 459s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 459s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 459s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 460s ***** test 460s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 460s partition = cvpartition (y, 'KFold', 3); 460s CVMdl = crossval (obj, 'cvPartition', partition); 460s assert (class (CVMdl), "ClassificationPartitionedModel") 460s assert (CVMdl.KFold == 3) 460s assert (CVMdl.ModelParameters.NumNeighbors == 10) 460s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 460s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 460s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 460s ***** error ... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 460s ***** error... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 460s ***** error ... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 460s ***** error ... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 460s ***** error ... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 460s ***** error ... 460s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 460s 165 tests, 165 passed, 0 known failure, 0 skipped 460s [inst/Classification/ClassificationGAM.m] 460s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/Classification/ClassificationGAM.m 460s ***** demo 460s ## Train a GAM classifier for binary classification 460s ## using specific data and plot the decision boundaries. 460s 460s ## Define specific data 460s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 460s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 460s Y = [0; 0; 0; 0; 0; ... 460s 1; 1; 1; 1; 1]; 460s 460s ## Train the GAM model 460s obj = fitcgam (X, Y, "Interactions", "all") 460s 460s ## Create a grid of values for prediction 460s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 460s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 460s [x1G, x2G] = meshgrid (x1, x2); 460s XGrid = [x1G(:), x2G(:)]; 460s [labels, score] = predict (obj, XGrid); 460s ***** test 460s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 460s y = [0; 0; 1; 1]; 460s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 460s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 460s assert (class (a), "ClassificationGAM"); 460s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 460s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 460s assert (a.ClassNames, {'0'; '1'}) 460s assert (a.PredictorNames, PredictorNames) 460s assert (a.BaseModel.Intercept, 0) 461s ***** test 461s load fisheriris 461s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 461s X = meas(inds, :); 461s Y = species(inds, :)'; 461s Y = strcmp (Y, 'virginica')'; 461s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 461s assert (class (a), "ClassificationGAM"); 461s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 461s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 461s assert (a.ClassNames, {'0'; '1'}) 461s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 461s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 461s assert (a.ModelwInt.Intercept, 0) 466s ***** test 466s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 466s Y = [0; 1; 0; 1; 1]; 466s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 466s assert (class (a), "ClassificationGAM"); 466s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 466s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 466s assert (a.ClassNames, {'0'; '1'}) 466s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 466s assert (a.Knots, [4, 4, 4]) 466s assert (a.Order, [3, 3, 3]) 466s assert (a.DoF, [7, 7, 7]) 466s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 468s ***** error ClassificationGAM () 468s ***** error ... 468s ClassificationGAM (ones(4, 1)) 468s ***** error ... 468s ClassificationGAM (ones (4,2), ones (1,4)) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 468s ***** error ... 468s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 468s ***** error ... 468s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", {1}) 468s ***** error ... 468s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 468s ***** error ... 468s ClassificationGAM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 468s ***** error ... 468s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 468s ***** error ... 468s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 468s ***** error ... 468s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 468s ***** test 468s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 468s y = [1; 0; 1; 0; 1]; 468s a = ClassificationGAM (x, y, "interactions", "all"); 468s l = {'0'; '0'; '0'; '0'; '0'}; 468s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 468s 0.4259, 0.5741; 0.3760, 0.6240]; 468s [labels, scores] = predict (a, x); 468s assert (class (a), "ClassificationGAM"); 468s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 468s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 468s assert (a.ClassNames, {'1'; '0'}) 468s assert (a.PredictorNames, {'x1', 'x2'}) 468s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 468s assert (labels, l) 468s assert (scores, s, 1e-1) 470s ***** test 470s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 470s y = [0; 0; 1; 1]; 470s interactions = [false, true, false; true, false, true; false, true, false]; 470s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 470s [label, score] = predict (a, x, "includeinteractions", true); 470s l = {'0'; '0'; '1'; '1'}; 470s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 470s assert (class (a), "ClassificationGAM"); 470s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 470s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 470s assert (a.ClassNames, {'0'; '1'}) 470s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 470s assert (a.ModelwInt.Intercept, 0) 470s assert (label, l) 470s assert (score, s, 1e-1) 475s ***** error ... 475s predict (ClassificationGAM (ones (4,2), ones (4,1))) 475s ***** error ... 475s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 476s ***** error ... 476s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 478s ***** shared x, y, obj 478s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6]; 478s y = [0; 0; 1; 1; 0]; 478s obj = fitcgam (x, y); 479s ***** test 479s CVMdl = crossval (obj); 479s assert (class (CVMdl), "ClassificationPartitionedModel") 479s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 479s assert (CVMdl.KFold == 4) 479s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 479s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 479s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 479s warning: called from 479s cvpartition at line 764 column 19 479s crossval at line 792 column 9 479s __test__ at line 3 column 2 479s test at line 685 column 11 479s /tmp/tmp.YdhB1UcfDH at line 3142 column 2 479s 485s ***** test 485s CVMdl = crossval (obj, "KFold", 2); 485s assert (class (CVMdl), "ClassificationPartitionedModel") 485s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 485s assert (CVMdl.KFold == 2) 485s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 485s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 488s ***** test 488s CVMdl = crossval (obj, "HoldOut", 0.2); 488s assert (class (CVMdl), "ClassificationPartitionedModel") 488s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 488s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 488s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 489s ***** test 489s partition = cvpartition (y, 'KFold', 3); 489s CVMdl = crossval (obj, 'cvPartition', partition); 489s assert (class (CVMdl), "ClassificationPartitionedModel") 489s assert (CVMdl.KFold == 3) 489s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 489s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 489s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 489s warning: called from 489s cvpartition at line 764 column 19 489s __test__ at line 3 column 2 489s test at line 685 column 11 489s /tmp/tmp.YdhB1UcfDH at line 3142 column 2 489s 494s ***** error ... 494s crossval (obj, "kfold") 494s ***** error... 494s crossval (obj, "kfold", 12, "holdout", 0.2) 494s ***** error ... 494s crossval (obj, "kfold", 'a') 494s ***** error ... 494s crossval (obj, "holdout", 2) 494s ***** error ... 494s crossval (obj, "leaveout", 1) 494s ***** error ... 494s crossval (obj, "cvpartition", 1) 494s 35 tests, 35 passed, 0 known failure, 0 skipped 494s [inst/createns.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/createns.m 494s ***** test 494s ## Default ExhaustiveSearcher 494s X = [1, 2; 3, 4; 5, 6]; 494s obj = createns (X); 494s assert (isa (obj, "ExhaustiveSearcher")); 494s assert (obj.X, X); 494s assert (obj.Distance, "euclidean"); 494s ***** test 494s ## KDTreeSearcher with default parameters 494s X = [1, 2; 3, 4; 5, 6]; 494s obj = createns (X, "NSMethod", "kdtree"); 494s assert (isa (obj, "KDTreeSearcher")); 494s assert (obj.X, X); 494s assert (obj.Distance, "euclidean"); 494s ***** test 494s ## hnswSearcher with custom parameters 494s X = [1, 2; 3, 4; 5, 6]; 494s obj = createns (X, "NSMethod", "hnsw", "MaxNumLinksPerNode", 2, "TrainSetSize", 3); 494s assert (isa (obj, "hnswSearcher")); 494s assert (obj.X, X); 494s assert (obj.MaxNumLinksPerNode, 2); 494s assert (obj.TrainSetSize, 3); 494s ***** test 494s ## ExhaustiveSearcher with custom distance 494s X = [1, 2; 3, 4]; 494s obj = createns (X, "NSMethod", "exhaustive", "Distance", "cityblock"); 494s assert (isa (obj, "ExhaustiveSearcher")); 494s assert (obj.Distance, "cityblock"); 494s ***** error 494s createns () 494s ***** error 494s X = [1, 2; 3, 4]; createns (X, "NSMethod") 494s ***** error 494s createns ([1; Inf; 3]) 494s ***** error 494s X = [1, 2; 3, 4]; createns (X, "NSMethod", 1) 494s ***** error 494s X = [1, 2; 3, 4]; createns (X, "NSMethod", "invalid") 494s 9 tests, 9 passed, 0 known failure, 0 skipped 494s [inst/rmmissing.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/rmmissing.m 494s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 494s ***** assert (rmmissing ('abcd f'), 'abcdf') 494s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 494s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 494s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 494s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 494s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 494s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 494s ***** test 494s x = [1:6]; 494s x([2,4]) = NaN; 494s [~, idx] = rmmissing (x); 494s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 494s assert (class(idx), 'logical'); 494s x = reshape (x, [2, 3]); 494s [~, idx] = rmmissing (x); 494s assert (idx, logical ([0; 1])); 494s assert (class(idx), 'logical'); 494s [~, idx] = rmmissing (x, 2); 494s assert (idx, logical ([1, 1, 0])); 494s assert (class(idx), 'logical'); 494s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 494s assert (idx, logical ([0; 1])); 494s assert (class(idx), 'logical'); 494s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 494s assert (idx, logical ([0, 0, 0])); 494s assert (class(idx), 'logical'); 494s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 494s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 494s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 494s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 494s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 494s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 494s ***** assert (rmmissing ([]), []) 494s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 494s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 494s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 494s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 494s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 494s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 494s ***** error rmmissing (ones (0,1,2)) 494s ***** error rmmissing () 494s ***** error rmmissing (ones(2,2,2)) 494s ***** error rmmissing ([1 2; 3 4], 5) 494s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 494s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 494s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 494s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 494s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 494s 31 tests, 31 passed, 0 known failure, 0 skipped 494s [inst/cdfcalc.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/cdfcalc.m 494s ***** test 494s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 494s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 494s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 494s assert (xCDF, [2, 3, 4, 5, 6]'); 494s assert (n, 10); 494s ***** shared x 494s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 494s ***** error yCDF = cdfcalc (x); 494s ***** error [yCDF, xCDF] = cdfcalc (); 494s ***** error [yCDF, xCDF] = cdfcalc (x, x); 494s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 494s 5 tests, 5 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/burrlike.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/burrlike.m 494s ***** error burrlike (3.25) 494s ***** error burrlike ([1, 2, 3], ones (2)) 494s ***** error burrlike ([1, 2, 3], [-1, 3]) 494s ***** error ... 494s burrlike ([1, 2], [1, 3, 5, 7]) 494s ***** error ... 494s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 494s ***** error ... 494s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 494s ***** error ... 494s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 494s ***** error ... 494s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 494s 8 tests, 8 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/hnfit.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/hnfit.m 494s ***** demo 494s ## Sample 2 populations from different half-normal distributions 494s rand ("seed", 1); # for reproducibility 494s r1 = hnrnd (0, 5, 5000, 1); 494s rand ("seed", 2); # for reproducibility 494s r2 = hnrnd (0, 2, 5000, 1); 494s r = [r1, r2]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, [0.5:20], 1); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s hold on 494s 494s ## Estimate their shape parameters 494s mu_sigmaA = hnfit (r(:,1), 0); 494s mu_sigmaB = hnfit (r(:,2), 0); 494s 494s ## Plot their estimated PDFs 494s x = [0:0.2:10]; 494s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 494s plot (x, y, "-pr"); 494s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 494s plot (x, y, "-sg"); 494s xlim ([0, 10]) 494s ylim ([0, 0.5]) 494s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 494s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 494s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 494s mu_sigmaA(1), mu_sigmaA(2)), ... 494s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 494s mu_sigmaB(1), mu_sigmaB(2))}) 494s title ("Two population samples from different half-normal distributions") 494s hold off 494s ***** test 494s x = 1:20; 494s [paramhat, paramci] = hnfit (x, 0); 494s assert (paramhat, [0, 11.9791], 1e-4); 494s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 494s ***** test 494s x = 1:20; 494s [paramhat, paramci] = hnfit (x, 0, 0.01); 494s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 494s ***** error hnfit () 494s ***** error hnfit (1) 494s ***** error hnfit ([0.2, 0.5+i], 0); 494s ***** error hnfit (ones (2,2) * 0.5, 0); 494s ***** error ... 494s hnfit ([0.5, 1.2], [0, 1]); 494s ***** error ... 494s hnfit ([0.5, 1.2], 5+i); 494s ***** error ... 494s hnfit ([1:5], 2); 494s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 494s ***** error hnfit ([0.01:0.1:0.99], 0, i); 494s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 494s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 494s ***** error 494s hnfit ([1 2 3], 0, [], [1 5]) 494s ***** error 494s hnfit ([1 2 3], 0, [], [1 5 -1]) 494s 15 tests, 15 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/evlike.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/evlike.m 494s ***** test 494s x = 1:50; 494s [nlogL, acov] = evlike ([2.3, 1.2], x); 494s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 494s assert (nlogL, 3.242264755689906e+17, 1e-14); 494s assert (acov, avar_out, 1e-3); 494s ***** test 494s x = 1:50; 494s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 494s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 494s assert (nlogL, 481898704.0472211, 1e-6); 494s assert (acov, avar_out, 1e-3); 494s ***** test 494s x = 1:50; 494s [nlogL, acov] = evlike ([21, 15], x); 494s avar_out = [11.73913876598908, -5.9546128523121216; ... 494s -5.954612852312121, 3.708060045170236]; 494s assert (nlogL, 223.7612479380652, 1e-13); 494s assert (acov, avar_out, 1e-14); 494s ***** error evlike ([12, 15]) 494s ***** error evlike ([12, 15, 3], [1:50]) 494s ***** error evlike ([12, 3], ones (10, 2)) 494s ***** error ... 494s evlike ([12, 15], [1:50], [1, 2, 3]) 494s ***** error ... 494s evlike ([12, 15], [1:50], [], [1, 2, 3]) 494s 8 tests, 8 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/gevfit.m] 494s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gevfit.m 494s ***** demo 494s ## Sample 2 populations from 2 different exponential distributions 494s rand ("seed", 1); # for reproducibility 494s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 494s rand ("seed", 2); # for reproducibility 494s r2 = gevrnd (0, 1, -4, 5000, 1); 494s r = [r1, r2]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, 50, 5); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s hold on 494s 494s ## Estimate their k, sigma, and mu parameters 494s k_sigma_muA = gevfit (r(:,1)); 494s k_sigma_muB = gevfit (r(:,2)); 494s 494s ## Plot their estimated PDFs 494s x = [-10:0.5:20]; 494s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 494s plot (x, y, "-pr"); 494s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 494s plot (x, y, "-sg"); 494s ylim ([0, 0.7]) 494s xlim ([-7, 5]) 494s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 494s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 494s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 494s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 494s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 494s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 494s title ("Two population samples from different exponential distributions") 494s hold off 494s ***** test 494s x = 1:50; 494s [pfit, pci] = gevfit (x); 494s pfit_out = [-0.4407, 15.1923, 21.5309]; 494s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 494s assert (pfit, pfit_out, 1e-3); 494s assert (pci, pci_out, 1e-3); 495s ***** test 495s x = 1:2:50; 495s [pfit, pci] = gevfit (x); 495s pfit_out = [-0.4434, 15.2024, 21.0532]; 495s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 495s assert (pfit, pfit_out, 1e-3); 495s assert (pci, pci_out, 1e-3); 495s ***** error gevfit (ones (2,5)); 495s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 495s ***** error gevfit ([1, 2, 3, 4, 5], 0); 495s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 495s ***** error ... 495s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 495s ***** error ... 495s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 495s ***** error ... 495s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 495s ***** error ... 495s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 495s ***** error ... 495s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 495s 11 tests, 11 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/bisalike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/bisalike.m 495s ***** test 495s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 495s assert (nlogL, 215.5905, 1e-4); 495s ***** test 495s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 495s assert (nlogL, 8.9950, 1e-4); 495s ***** error bisalike (3.25) 495s ***** error bisalike ([5, 0.2], ones (2)) 495s ***** error bisalike ([5, 0.2], [-1, 3]) 495s ***** error ... 495s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 495s ***** error ... 495s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 495s ***** error ... 495s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 495s ***** error ... 495s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 495s 9 tests, 9 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/hnlike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/hnlike.m 495s ***** test 495s x = 1:20; 495s paramhat = hnfit (x, 0); 495s [nlogL, acov] = hnlike (paramhat, x); 495s assert (nlogL, 64.179177404891300, 1e-14); 495s ***** test 495s x = 1:20; 495s paramhat = hnfit (x, 0); 495s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 495s assert (nlogL, 64.179177404891300, 1e-14); 495s ***** error ... 495s hnlike ([12, 15]); 495s ***** error hnlike ([12, 15, 3], [1:50]); 495s ***** error hnlike ([3], [1:50]); 495s ***** error ... 495s hnlike ([0, 3], ones (2)); 495s ***** error ... 495s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 495s ***** error ... 495s hnlike ([1, 2], ones (10, 1), ones (8,1)) 495s ***** error ... 495s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 495s 9 tests, 9 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/evfit.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/evfit.m 495s ***** demo 495s ## Sample 3 populations from different extreme value distributions 495s rand ("seed", 1); # for reproducibility 495s r1 = evrnd (2, 5, 400, 1); 495s rand ("seed", 12); # for reproducibility 495s r2 = evrnd (-5, 3, 400, 1); 495s rand ("seed", 13); # for reproducibility 495s r3 = evrnd (14, 8, 400, 1); 495s r = [r1, r2, r3]; 495s 495s ## Plot them normalized and fix their colors 495s hist (r, 25, 0.4); 495s h = findobj (gca, "Type", "patch"); 495s set (h(1), "facecolor", "c"); 495s set (h(2), "facecolor", "g"); 495s set (h(3), "facecolor", "r"); 495s ylim ([0, 0.28]) 495s xlim ([-30, 30]); 495s hold on 495s 495s ## Estimate their MU and SIGMA parameters 495s mu_sigmaA = evfit (r(:,1)); 495s mu_sigmaB = evfit (r(:,2)); 495s mu_sigmaC = evfit (r(:,3)); 495s 495s ## Plot their estimated PDFs 495s x = [min(r(:)):max(r(:))]; 495s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 495s plot (x, y, "-pr"); 495s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 495s plot (x, y, "-sg"); 495s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 495s plot (x, y, "-^c"); 495s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 495s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 495s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 495s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 495s mu_sigmaA(1), mu_sigmaA(2)), ... 495s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 495s mu_sigmaB(1), mu_sigmaB(2)), ... 495s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 495s mu_sigmaC(1), mu_sigmaC(2))}) 495s title ("Three population samples from different extreme value distributions") 495s hold off 495s ***** test 495s x = 1:50; 495s [paramhat, paramci] = evfit (x); 495s paramhat_out = [32.6811, 13.0509]; 495s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 495s assert (paramhat, paramhat_out, 1e-4); 495s assert (paramci, paramci_out, 1e-4); 495s ***** test 495s x = 1:50; 495s [paramhat, paramci] = evfit (x, 0.01); 495s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 495s assert (paramci, paramci_out, 1e-4); 495s ***** error evfit (ones (2,5)); 495s ***** error evfit (single (ones (1,5))); 495s ***** error evfit ([1, 2, 3, 4, NaN]); 495s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 495s ***** error 495s evfit ([1 2 3], 0.05, [], [1 5]) 495s ***** error 495s evfit ([1 2 3], 0.05, [], [1 5 -1]) 495s ***** error ... 495s evfit ([1:10], 0.05, [], [], 5) 495s 9 tests, 9 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/logilike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/logilike.m 495s ***** test 495s nlogL = logilike ([25.5, 8.7725], [1:50]); 495s assert (nlogL, 206.6769, 1e-4); 495s ***** test 495s nlogL = logilike ([3, 0.8645], [1:5]); 495s assert (nlogL, 9.0699, 1e-4); 495s ***** error logilike (3.25) 495s ***** error logilike ([5, 0.2], ones (2)) 495s ***** error ... 495s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 495s ***** error ... 495s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 495s ***** error ... 495s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 495s ***** error ... 495s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 495s 8 tests, 8 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/betalike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/betalike.m 495s ***** test 495s x = 0.01:0.02:0.99; 495s [nlogL, avar] = betalike ([2.3, 1.2], x); 495s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 495s assert (nlogL, 17.873477715879040, 3e-14); 495s assert (avar, avar_out, 1e-7); 495s ***** test 495s x = 0.01:0.02:0.99; 495s [nlogL, avar] = betalike ([1, 4], x); 495s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 495s assert (nlogL, 79.648061114839550, 1e-13); 495s assert (avar, avar_out, 1e-7); 495s ***** test 495s x = 0.00:0.02:1; 495s [nlogL, avar] = betalike ([1, 4], x); 495s avar_out = [0.00000801564765, 0.00000131397245; ... 495s 0.00000131397245, 0.00070827639442]; 495s assert (nlogL, 573.2008434477486, 1e-10); 495s assert (avar, avar_out, 1e-14); 495s ***** error ... 495s betalike ([12, 15]); 495s ***** error betalike ([12, 15, 3], [1:50]); 495s ***** error ... 495s betalike ([12, 15], ones (10, 1), ones (8,1)) 495s ***** error ... 495s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 495s ***** error ... 495s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 495s 8 tests, 8 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/betafit.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/betafit.m 495s ***** demo 495s ## Sample 2 populations from different Beta distributions 495s randg ("seed", 1); # for reproducibility 495s r1 = betarnd (2, 5, 500, 1); 495s randg ("seed", 2); # for reproducibility 495s r2 = betarnd (2, 2, 500, 1); 495s r = [r1, r2]; 495s 495s ## Plot them normalized and fix their colors 495s hist (r, 12, 15); 495s h = findobj (gca, "Type", "patch"); 495s set (h(1), "facecolor", "c"); 495s set (h(2), "facecolor", "g"); 495s hold on 495s 495s ## Estimate their shape parameters 495s a_b_A = betafit (r(:,1)); 495s a_b_B = betafit (r(:,2)); 495s 495s ## Plot their estimated PDFs 495s x = [min(r(:)):0.01:max(r(:))]; 495s y = betapdf (x, a_b_A(1), a_b_A(2)); 495s plot (x, y, "-pr"); 495s y = betapdf (x, a_b_B(1), a_b_B(2)); 495s plot (x, y, "-sg"); 495s ylim ([0, 4]) 495s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 495s "Normalized HIST of sample 2 with α=2 and β=2", ... 495s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 495s a_b_A(1), a_b_A(2)), ... 495s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 495s a_b_B(1), a_b_B(2))}) 495s title ("Two population samples from different Beta distributions") 495s hold off 495s ***** test 495s x = 0.01:0.02:0.99; 495s [paramhat, paramci] = betafit (x); 495s paramhat_out = [1.0199, 1.0199]; 495s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 495s assert (paramhat, paramhat_out, 1e-4); 495s assert (paramci, paramci_out, 1e-4); 495s ***** test 495s x = 0.01:0.02:0.99; 495s [paramhat, paramci] = betafit (x, 0.01); 495s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 495s assert (paramci, paramci_out, 1e-4); 495s ***** test 495s x = 0.00:0.02:1; 495s [paramhat, paramci] = betafit (x); 495s paramhat_out = [0.0875, 0.1913]; 495s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 495s assert (paramhat, paramhat_out, 1e-4); 495s assert (paramci, paramci_out, 1e-4); 495s ***** error betafit ([0.2, 0.5+i]); 495s ***** error betafit (ones (2,2) * 0.5); 495s ***** error betafit ([0.5, 1.2]); 495s ***** error betafit ([0.1, 0.1]); 495s ***** error betafit ([0.01:0.1:0.99], 1.2); 495s ***** error ... 495s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 495s ***** error ... 495s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 495s ***** error ... 495s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 495s ***** error ... 495s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 495s ***** error ... 495s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 495s 13 tests, 13 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/invglike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/invglike.m 495s ***** test 495s nlogL = invglike ([25.5, 19.6973], [1:50]); 495s assert (nlogL, 219.1516, 1e-4); 495s ***** test 495s nlogL = invglike ([3, 8.1081], [1:5]); 495s assert (nlogL, 9.0438, 1e-4); 495s ***** error invglike (3.25) 495s ***** error invglike ([5, 0.2], ones (2)) 495s ***** error invglike ([5, 0.2], [-1, 3]) 495s ***** error ... 495s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 495s ***** error ... 495s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 495s ***** error ... 495s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 495s ***** error ... 495s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 495s 9 tests, 9 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/gumbellike.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gumbellike.m 495s ***** test 495s x = 1:50; 495s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 495s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 495s assert (nlogL, 3.242264755689906e+17, 1e-14); 495s assert (avar, avar_out, 1e-3); 495s ***** test 495s x = 1:50; 495s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 495s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 495s assert (nlogL, 481898704.0472211, 1e-6); 495s assert (avar, avar_out, 1e-3); 495s ***** test 495s x = 1:50; 495s [nlogL, avar] = gumbellike ([21, 15], x); 495s avar_out = [11.73913876598908, -5.9546128523121216; ... 495s -5.954612852312121, 3.708060045170236]; 495s assert (nlogL, 223.7612479380652, 1e-13); 495s assert (avar, avar_out, 1e-14); 495s ***** error gumbellike ([12, 15]); 495s ***** error gumbellike ([12, 15, 3], [1:50]); 495s ***** error gumbellike ([12, 3], ones (10, 2)); 495s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 495s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 495s 8 tests, 8 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/ricefit.m] 495s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/ricefit.m 495s ***** demo 495s ## Sample 3 populations from different Gamma distributions 495s randg ("seed", 5); # for reproducibility 495s randp ("seed", 6); 495s r1 = ricernd (1, 2, 3000, 1); 495s randg ("seed", 2); # for reproducibility 495s randp ("seed", 8); 495s r2 = ricernd (2, 4, 3000, 1); 495s randg ("seed", 7); # for reproducibility 495s randp ("seed", 9); 495s r3 = ricernd (7.5, 1, 3000, 1); 495s r = [r1, r2, r3]; 495s 495s ## Plot them normalized and fix their colors 495s hist (r, 75, 4); 495s h = findobj (gca, "Type", "patch"); 495s set (h(1), "facecolor", "c"); 495s set (h(2), "facecolor", "g"); 495s set (h(3), "facecolor", "r"); 495s ylim ([0, 0.7]); 495s xlim ([0, 12]); 495s hold on 495s 495s ## Estimate their α and β parameters 495s s_sigmaA = ricefit (r(:,1)); 495s s_sigmaB = ricefit (r(:,2)); 495s s_sigmaC = ricefit (r(:,3)); 495s 495s ## Plot their estimated PDFs 495s x = [0.01,0.1:0.2:18]; 495s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 495s plot (x, y, "-pr"); 495s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 495s plot (x, y, "-sg"); 495s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 495s plot (x, y, "-^c"); 495s hold off 495s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 495s "Normalized HIST of sample 2 with s=2 and σ=4", ... 495s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 495s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 495s s_sigmaA(1), s_sigmaA(2)), ... 495s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 495s s_sigmaB(1), s_sigmaB(2)), ... 495s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 495s s_sigmaC(1), s_sigmaC(2))}) 495s title ("Three population samples from different Rician distributions") 495s hold off 495s ***** test 495s [paramhat, paramci] = ricefit ([1:50]); 495s assert (paramhat, [15.3057, 17.6668], 1e-4); 495s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 495s ***** test 495s [paramhat, paramci] = ricefit ([1:50], 0.01); 495s assert (paramhat, [15.3057, 17.6668], 1e-4); 495s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 495s ***** test 495s [paramhat, paramci] = ricefit ([1:5]); 495s assert (paramhat, [2.3123, 1.6812], 1e-4); 495s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 495s ***** test 495s [paramhat, paramci] = ricefit ([1:5], 0.01); 495s assert (paramhat, [2.3123, 1.6812], 1e-4); 495s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 495s ***** test 495s freq = [1 1 1 1 5]; 495s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 495s assert (paramhat, [3.5181, 1.5565], 1e-4); 495s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 495s ***** test 495s censor = [1 0 0 0 0]; 495s [paramhat, paramci] = ricefit ([1:5], [], censor); 495s assert (paramhat, [3.2978, 1.1527], 1e-4); 495s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 496s ***** assert (class (ricefit (single ([1:50]))), "single") 496s ***** error ricefit (ones (2)) 496s ***** error ricefit ([1:50], 1) 496s ***** error ricefit ([1:50], -1) 496s ***** error ricefit ([1:50], {0.05}) 496s ***** error ricefit ([1:50], "k") 496s ***** error ricefit ([1:50], i) 496s ***** error ricefit ([1:50], [0.01 0.02]) 496s ***** error ricefit ([1:50], [], [1 1]) 496s ***** error ricefit ([1:50], [], [], [1 1]) 496s ***** error ... 496s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 496s ***** error ricefit ([1 2 3 -4]) 496s ***** error ricefit ([1 2 0], [], [1 0 0]) 496s 19 tests, 19 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/invgfit.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/invgfit.m 496s ***** demo 496s ## Sample 3 populations from different inverse Gaussian distributions 496s rand ("seed", 5); randn ("seed", 5); # for reproducibility 496s r1 = invgrnd (1, 0.2, 2000, 1); 496s rand ("seed", 2); randn ("seed", 2); # for reproducibility 496s r2 = invgrnd (1, 3, 2000, 1); 496s rand ("seed", 7); randn ("seed", 7); # for reproducibility 496s r3 = invgrnd (3, 1, 2000, 1); 496s r = [r1, r2, r3]; 496s 496s ## Plot them normalized and fix their colors 496s hist (r, [0.1:0.1:3.2], 9); 496s h = findobj (gca, "Type", "patch"); 496s set (h(1), "facecolor", "c"); 496s set (h(2), "facecolor", "g"); 496s set (h(3), "facecolor", "r"); 496s ylim ([0, 3]); 496s xlim ([0, 3]); 496s hold on 496s 496s ## Estimate their MU and LAMBDA parameters 496s mu_lambdaA = invgfit (r(:,1)); 496s mu_lambdaB = invgfit (r(:,2)); 496s mu_lambdaC = invgfit (r(:,3)); 496s 496s ## Plot their estimated PDFs 496s x = [0:0.1:3]; 496s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 496s plot (x, y, "-pr"); 496s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 496s plot (x, y, "-sg"); 496s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 496s plot (x, y, "-^c"); 496s hold off 496s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 496s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 496s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 496s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 496s mu_lambdaA(1), mu_lambdaA(2)), ... 496s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 496s mu_lambdaB(1), mu_lambdaB(2)), ... 496s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 496s mu_lambdaC(1), mu_lambdaC(2))}) 496s title ("Three population samples from different inverse Gaussian distributions") 496s hold off 496s ***** test 496s paramhat = invgfit ([1:50]); 496s paramhat_out = [25.5, 19.6973]; 496s assert (paramhat, paramhat_out, 1e-4); 496s ***** test 496s paramhat = invgfit ([1:5]); 496s paramhat_out = [3, 8.1081]; 496s assert (paramhat, paramhat_out, 1e-4); 496s ***** error invgfit (ones (2,5)); 496s ***** error invgfit ([-1 2 3 4]); 496s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 496s ***** error invgfit ([1, 2, 3, 4, 5], 0); 496s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 496s ***** error ... 496s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 496s ***** error ... 496s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 496s ***** error ... 496s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 496s ***** error ... 496s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 496s ***** error ... 496s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 496s 12 tests, 12 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/gamlike.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gamlike.m 496s ***** test 496s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 496s assert (nlogL, 19.4426, 1e-4); 496s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 496s ***** test 496s [nlogL, acov] = gamlike([2, 3], [5:45]); 496s assert (nlogL, 305.8070, 1e-4); 496s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 496s ***** test 496s [nlogL, acov] = gamlike([2, 13], [5:45]); 496s assert (nlogL, 163.2261, 1e-4); 496s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 496s ***** error ... 496s gamlike ([12, 15]) 496s ***** error gamlike ([12, 15, 3], [1:50]) 496s ***** error gamlike ([12, 3], ones (10, 2)) 496s ***** error ... 496s gamlike ([12, 15], [1:50], [1, 2, 3]) 496s ***** error ... 496s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 496s 8 tests, 8 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/poissfit.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/poissfit.m 496s ***** demo 496s ## Sample 3 populations from 3 different Poisson distributions 496s randp ("seed", 2); # for reproducibility 496s r1 = poissrnd (1, 1000, 1); 496s randp ("seed", 2); # for reproducibility 496s r2 = poissrnd (4, 1000, 1); 496s randp ("seed", 3); # for reproducibility 496s r3 = poissrnd (10, 1000, 1); 496s r = [r1, r2, r3]; 496s 496s ## Plot them normalized and fix their colors 496s hist (r, [0:20], 1); 496s h = findobj (gca, "Type", "patch"); 496s set (h(1), "facecolor", "c"); 496s set (h(2), "facecolor", "g"); 496s set (h(3), "facecolor", "r"); 496s hold on 496s 496s ## Estimate their lambda parameter 496s lambdahat = poissfit (r); 496s 496s ## Plot their estimated PDFs 496s x = [0:20]; 496s y = poisspdf (x, lambdahat(1)); 496s plot (x, y, "-pr"); 496s y = poisspdf (x, lambdahat(2)); 496s plot (x, y, "-sg"); 496s y = poisspdf (x, lambdahat(3)); 496s plot (x, y, "-^c"); 496s xlim ([0, 20]) 496s ylim ([0, 0.4]) 496s legend ({"Normalized HIST of sample 1 with λ=1", ... 496s "Normalized HIST of sample 2 with λ=4", ... 496s "Normalized HIST of sample 3 with λ=10", ... 496s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 496s lambdahat(1)), ... 496s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 496s lambdahat(2)), ... 496s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 496s lambdahat(3))}) 496s title ("Three population samples from different Poisson distributions") 496s hold off 496s ***** test 496s x = [1 3 2 4 5 4 3 4]; 496s [lhat, lci] = poissfit (x); 496s assert (lhat, 3.25) 496s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 496s ***** test 496s x = [1 3 2 4 5 4 3 4]; 496s [lhat, lci] = poissfit (x, 0.01); 496s assert (lhat, 3.25) 496s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 496s ***** test 496s x = [1 2 3 4 5]; 496s f = [1 1 2 3 1]; 496s [lhat, lci] = poissfit (x, [], f); 496s assert (lhat, 3.25) 496s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 496s ***** test 496s x = [1 2 3 4 5]; 496s f = [1 1 2 3 1]; 496s [lhat, lci] = poissfit (x, 0.01, f); 496s assert (lhat, 3.25) 496s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 496s ***** error poissfit ([1 2 -1 3]) 496s ***** error poissfit ([1 2 3], 0) 496s ***** error poissfit ([1 2 3], 1.2) 496s ***** error poissfit ([1 2 3], [0.02 0.05]) 496s ***** error 496s poissfit ([1 2 3], [], [1 5]) 496s ***** error 496s poissfit ([1 2 3], [], [1 5 -1]) 496s 10 tests, 10 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/wbllike.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/wbllike.m 496s ***** test 496s x = 1:50; 496s [nlogL, acov] = wbllike ([2.3, 1.2], x); 496s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 496s assert (nlogL, 945.9589180651594, 1e-12); 496s assert (acov, avar_out, 1e-4); 496s ***** test 496s x = 1:50; 496s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 496s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 496s assert (nlogL, 424.9879809704742, 6e-14); 496s assert (acov, avar_out, 1e-4); 496s ***** test 496s x = 1:50; 496s [nlogL, acov] = wbllike ([21, 15], x); 496s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 496s assert (nlogL, 1635190.328991511, 1e-8); 496s assert (acov, avar_out, 1e-8); 496s ***** error wbllike ([12, 15]); 496s ***** error wbllike ([12, 15, 3], [1:50]); 496s ***** error wbllike ([12, 3], ones (10, 2)); 496s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 496s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 496s ***** error ... 496s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 496s 9 tests, 9 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/expfit.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/expfit.m 496s ***** demo 496s ## Sample 3 populations from 3 different exponential distributions 496s rande ("seed", 1); # for reproducibility 496s r1 = exprnd (2, 4000, 1); 496s rande ("seed", 2); # for reproducibility 496s r2 = exprnd (5, 4000, 1); 496s rande ("seed", 3); # for reproducibility 496s r3 = exprnd (12, 4000, 1); 496s r = [r1, r2, r3]; 496s 496s ## Plot them normalized and fix their colors 496s hist (r, 48, 0.52); 496s h = findobj (gca, "Type", "patch"); 496s set (h(1), "facecolor", "c"); 496s set (h(2), "facecolor", "g"); 496s set (h(3), "facecolor", "r"); 496s hold on 496s 496s ## Estimate their mu parameter 496s muhat = expfit (r); 496s 496s ## Plot their estimated PDFs 496s x = [0:max(r(:))]; 496s y = exppdf (x, muhat(1)); 496s plot (x, y, "-pr"); 496s y = exppdf (x, muhat(2)); 496s plot (x, y, "-sg"); 496s y = exppdf (x, muhat(3)); 496s plot (x, y, "-^c"); 496s ylim ([0, 0.6]) 496s xlim ([0, 40]) 496s legend ({"Normalized HIST of sample 1 with μ=2", ... 496s "Normalized HIST of sample 2 with μ=5", ... 496s "Normalized HIST of sample 3 with μ=12", ... 496s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 496s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 496s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 496s title ("Three population samples from different exponential distributions") 496s hold off 496s ***** assert (expfit (1), 1) 496s ***** assert (expfit (1:3), 2) 496s ***** assert (expfit ([1:3]'), 2) 496s ***** assert (expfit (1:3, []), 2) 496s ***** assert (expfit (1:3, [], [], []), 2) 496s ***** assert (expfit (magic (3)), [5 5 5]) 496s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 496s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 496s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 496s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 496s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 496s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 496s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 496s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 496s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 496s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 496s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 496s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 496s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 496s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 496s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 496s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 496s [1.75 4.75 7.75]) 496s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 496s [1.75 4.75 7.75]) 496s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 496s [3.5 19/3 31/3]) 496s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 496s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 496s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 496s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 496s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 496s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 496s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 496s 1000*eps) 496s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 496s [0.953017262058213; 7.337731146400207], 1000*eps) 496s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 496s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 496s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 496s 1000*eps) 496s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 496s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 496s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 496s 1000*eps) 496s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 496s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 496s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 496s 1000*eps) 496s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 496s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 496s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 496s 1000*eps) 496s ***** test 496s x = reshape (1:8, [4 2]); 496s x(4) = NaN; 496s [muhat,muci] = expfit (x); 496s assert ({muhat, muci}, {[NaN, 6.5], ... 496s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 496s ***** test 496s x = magic (3); 496s censor = [0 1 0; 0 1 0; 0 1 0]; 496s freq = [1 1 0; 1 1 0; 1 1 0]; 496s [muhat,muci] = expfit (x, [], censor, freq); 496s assert ({muhat, muci}, {[5 NaN NaN], ... 496s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 496s ***** error expfit () 496s ***** error expfit (1,2,3,4,5) 496s ***** error [a b censor] = expfit (1) 496s ***** error expfit (1, [1 2]) 496s ***** error expfit ([-1 2 3 4 5]) 496s ***** error expfit ([1:5], [], "test") 496s ***** error expfit ([1:5], [], [], "test") 496s ***** error expfit ([1:5], [], [0 0 0 0]) 496s ***** error expfit ([1:5], [], [], [1 1 1 1]) 496s 47 tests, 47 passed, 0 known failure, 0 skipped 496s [inst/dist_fit/gamfit.m] 496s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gamfit.m 496s ***** demo 496s ## Sample 3 populations from different Gamma distributions 496s randg ("seed", 5); # for reproducibility 496s r1 = gamrnd (1, 2, 2000, 1); 496s randg ("seed", 2); # for reproducibility 496s r2 = gamrnd (2, 2, 2000, 1); 496s randg ("seed", 7); # for reproducibility 496s r3 = gamrnd (7.5, 1, 2000, 1); 496s r = [r1, r2, r3]; 496s 496s ## Plot them normalized and fix their colors 496s hist (r, 75, 4); 496s h = findobj (gca, "Type", "patch"); 496s set (h(1), "facecolor", "c"); 496s set (h(2), "facecolor", "g"); 496s set (h(3), "facecolor", "r"); 496s ylim ([0, 0.62]); 496s xlim ([0, 12]); 496s hold on 496s 496s ## Estimate their α and β parameters 496s a_bA = gamfit (r(:,1)); 496s a_bB = gamfit (r(:,2)); 496s a_bC = gamfit (r(:,3)); 496s 496s ## Plot their estimated PDFs 496s x = [0.01,0.1:0.2:18]; 496s y = gampdf (x, a_bA(1), a_bA(2)); 496s plot (x, y, "-pr"); 496s y = gampdf (x, a_bB(1), a_bB(2)); 496s plot (x, y, "-sg"); 496s y = gampdf (x, a_bC(1), a_bC(2)); 496s plot (x, y, "-^c"); 496s hold off 496s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 496s "Normalized HIST of sample 2 with α=2 and β=2", ... 496s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 496s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 496s a_bA(1), a_bA(2)), ... 496s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 496s a_bB(1), a_bB(2)), ... 496s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 496s a_bC(1), a_bC(2))}) 496s title ("Three population samples from different Gamma distributions") 496s hold off 496s ***** shared x 496s 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]; 496s ***** test 496s [paramhat, paramci] = gamfit (x); 496s assert (paramhat, [3.4248, 0.9752], 1e-4); 496s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 496s ***** test 496s [paramhat, paramci] = gamfit (x, 0.01); 496s assert (paramhat, [3.4248, 0.9752], 1e-4); 496s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 496s ***** test 496s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 496s [paramhat, paramci] = gamfit (x, [], [], freq); 496s assert (paramhat, [3.3025, 1.0615], 1e-4); 496s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 496s ***** test 496s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 496s assert (paramhat, [4.4484, 0.9689], 1e-4); 496s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 496s ***** test 496s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 496s assert (paramhat, [4.4484, 0.9689], 1e-4); 496s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 496s ***** test 496s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 496s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 496s assert (paramhat, [4.7537, 0.9308], 1e-4); 496s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 497s ***** test 497s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 497s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 497s [paramhat, paramci] = gamfit (x, [], cens, freq); 497s assert (paramhat, [3.4736, 1.0847], 1e-4); 497s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 497s ***** test 497s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 497s assert (paramhat, [Inf, 0]); 497s assert (paramci, [Inf, 0; Inf, 0]); 497s ***** test 497s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 497s assert (paramhat, [NaN, NaN]); 497s assert (paramci, [NaN, NaN; NaN, NaN]); 497s ***** test 497s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 497s assert (paramhat, [Inf, 0]); 497s assert (paramci, [Inf, 0; Inf, 0]); 497s ***** assert (class (gamfit (single (x))), "single") 497s ***** error gamfit (ones (2)) 497s ***** error gamfit (x, 1) 497s ***** error gamfit (x, -1) 497s ***** error gamfit (x, {0.05}) 497s ***** error gamfit (x, "a") 497s ***** error gamfit (x, i) 497s ***** error gamfit (x, [0.01 0.02]) 497s ***** error 497s gamfit ([1 2 3], 0.05, [], [1 5]) 497s ***** error 497s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 497s ***** error ... 497s gamfit ([1:10], 0.05, [], [], 5) 497s ***** error gamfit ([1 2 3 -4]) 497s ***** error ... 497s gamfit ([1 2 0], [], [1 0 0]) 497s 23 tests, 23 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/ricelike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/ricelike.m 497s ***** test 497s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 497s assert (nlogL, 204.5230311010569, 1e-12); 497s ***** test 497s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 497s assert (nlogL, 8.65562164930058, 1e-12); 497s ***** error ricelike (3.25) 497s ***** error ricelike ([5, 0.2], ones (2)) 497s ***** error ... 497s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 497s ***** error ... 497s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 497s ***** error ... 497s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 497s ***** error ... 497s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 497s ***** error ... 497s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 497s 9 tests, 9 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/gplike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gplike.m 497s ***** test 497s k = 0.8937; sigma = 1.3230; theta = 1; 497s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 497s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 497s [nlogL, acov] = gplike ([k, sigma, theta], x); 497s assert (nlogL, 21.736, 1e-3); 497s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 497s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 497s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 497s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 497s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 497s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 497s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 497s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 497s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 497s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 497s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 497s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 497s ***** error gplike () 497s ***** error gplike (1) 497s ***** error gplike ([1, 2, 0], []) 497s ***** error gplike ([1, 2, 0], ones (2)) 497s ***** error gplike (2, [1:10]) 497s ***** error gplike ([2, 3], [1:10]) 497s ***** error ... 497s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 497s ***** error ... 497s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 497s 20 tests, 20 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/rayllike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/rayllike.m 497s ***** test 497s x = [1 3 2 4 5 4 3 4]; 497s [nlogL, acov] = rayllike (3.25, x); 497s assert (nlogL, 14.7442, 1e-4) 497s ***** test 497s x = [1 2 3 4 5]; 497s f = [1 1 2 3 1]; 497s [nlogL, acov] = rayllike (3.25, x, [], f); 497s assert (nlogL, 14.7442, 1e-4) 497s ***** test 497s x = [1 2 3 4 5 6]; 497s f = [1 1 2 3 1 0]; 497s [nlogL, acov] = rayllike (3.25, x, [], f); 497s assert (nlogL, 14.7442, 1e-4) 497s ***** test 497s x = [1 2 3 4 5 6]; 497s c = [0 0 0 0 0 1]; 497s f = [1 1 2 3 1 0]; 497s [nlogL, acov] = rayllike (3.25, x, c, f); 497s assert (nlogL, 14.7442, 1e-4) 497s ***** error rayllike (1) 497s ***** error rayllike ([1 2 3], [1 2]) 497s ***** error ... 497s rayllike (3.25, ones (10, 2)) 497s ***** error ... 497s rayllike (3.25, [1 2 3 -4 5]) 497s ***** error ... 497s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 497s ***** error ... 497s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 497s ***** error ... 497s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 497s ***** error ... 497s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 497s ***** error ... 497s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 497s 13 tests, 13 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/lognlike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/lognlike.m 497s ***** test 497s x = 1:50; 497s [nlogL, avar] = lognlike ([0, 0.25], x); 497s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 497s assert (nlogL, 3962.330333301793, 1e-10); 497s assert (avar, avar_out, 1e-7); 497s ***** test 497s x = 1:50; 497s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 497s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 497s assert (nlogL, 2473.183051225747, 1e-10); 497s assert (avar, avar_out, 1e-7); 497s ***** test 497s x = 1:50; 497s [nlogL, avar] = lognlike ([0, 0.5], x); 497s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 497s assert (nlogL, 1119.072424020455, 1e-12); 497s assert (avar, avar_out, 1e-6); 497s ***** test 497s x = 1:50; 497s censor = ones (1, 50); 497s censor([2, 4, 6, 8, 12, 14]) = 0; 497s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 497s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 497s assert (nlogL, 1091.746371145497, 1e-12); 497s assert (avar, avar_out, 1e-6); 497s ***** test 497s x = 1:50; 497s censor = ones (1, 50); 497s censor([2, 4, 6, 8, 12, 14]) = 0; 497s [nlogL, avar] = lognlike ([0, 1], x, censor); 497s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 497s assert (nlogL, 349.3969104144271, 1e-12); 497s assert (avar, avar_out, 1e-6); 497s ***** error ... 497s lognlike ([12, 15]); 497s ***** error lognlike ([12, 15], ones (2)); 497s ***** error ... 497s lognlike ([12, 15, 3], [1:50]); 497s ***** error ... 497s lognlike ([12, 15], [1:50], [1, 2, 3]); 497s ***** error ... 497s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 497s 10 tests, 10 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/binolike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/binolike.m 497s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 497s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 497s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 497s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 497s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 497s ***** test 497s [nlogL, acov] = binolike ([3, 0.333], 3); 497s assert (acov(4), 0.0740, 1e-4) 497s ***** error binolike (3.25) 497s ***** error binolike ([5, 0.2], ones (2)) 497s ***** error ... 497s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 497s ***** error binolike ([1.5, 0.2], 1) 497s ***** error binolike ([-1, 0.2], 1) 497s ***** error binolike ([Inf, 0.2], 1) 497s ***** error binolike ([5, 1.2], [3, 5]) 497s ***** error binolike ([5, -0.2], [3, 5]) 497s ***** error ... 497s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 497s ***** error ... 497s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 497s ***** error binolike ([5, 0.2], [-1, 3]) 497s ***** error binolike ([5, 0.2], [3, 5, 7]) 497s 18 tests, 18 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/gumbelfit.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gumbelfit.m 497s ***** demo 497s ## Sample 3 populations from different Gumbel distributions 497s rand ("seed", 1); # for reproducibility 497s r1 = gumbelrnd (2, 5, 400, 1); 497s rand ("seed", 11); # for reproducibility 497s r2 = gumbelrnd (-5, 3, 400, 1); 497s rand ("seed", 16); # for reproducibility 497s r3 = gumbelrnd (14, 8, 400, 1); 497s r = [r1, r2, r3]; 497s 497s ## Plot them normalized and fix their colors 497s hist (r, 25, 0.32); 497s h = findobj (gca, "Type", "patch"); 497s set (h(1), "facecolor", "c"); 497s set (h(2), "facecolor", "g"); 497s set (h(3), "facecolor", "r"); 497s ylim ([0, 0.28]) 497s xlim ([-11, 50]); 497s hold on 497s 497s ## Estimate their MU and BETA parameters 497s mu_betaA = gumbelfit (r(:,1)); 497s mu_betaB = gumbelfit (r(:,2)); 497s mu_betaC = gumbelfit (r(:,3)); 497s 497s ## Plot their estimated PDFs 497s x = [min(r(:)):max(r(:))]; 497s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 497s plot (x, y, "-pr"); 497s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 497s plot (x, y, "-sg"); 497s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 497s plot (x, y, "-^c"); 497s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 497s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 497s "Normalized HIST of sample 3 with μ=14 and β=8", ... 497s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 497s mu_betaA(1), mu_betaA(2)), ... 497s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 497s mu_betaB(1), mu_betaB(2)), ... 497s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 497s mu_betaC(1), mu_betaC(2))}) 497s title ("Three population samples from different Gumbel distributions") 497s hold off 497s ***** test 497s x = 1:50; 497s [paramhat, paramci] = gumbelfit (x); 497s paramhat_out = [18.3188, 13.0509]; 497s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 497s assert (paramhat, paramhat_out, 1e-4); 497s assert (paramci, paramci_out, 1e-4); 497s ***** test 497s x = 1:50; 497s [paramhat, paramci] = gumbelfit (x, 0.01); 497s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 497s assert (paramci, paramci_out, 1e-4); 497s ***** error gumbelfit (ones (2,5)); 497s ***** error ... 497s gumbelfit (single (ones (1,5))); 497s ***** error ... 497s gumbelfit ([1, 2, 3, 4, NaN]); 497s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 497s ***** error ... 497s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 497s ***** error ... 497s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 497s ***** error 497s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 497s ***** error ... 497s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 497s 10 tests, 10 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/nakalike.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/nakalike.m 497s ***** test 497s nlogL = nakalike ([0.735504, 858.5], [1:50]); 497s assert (nlogL, 202.8689, 1e-4); 497s ***** test 497s nlogL = nakalike ([1.17404, 11], [1:5]); 497s assert (nlogL, 8.6976, 1e-4); 497s ***** test 497s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 497s assert (nlogL, 8.6976, 1e-4); 497s ***** test 497s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 497s assert (nlogL, 8.6976, 1e-4); 497s ***** error nakalike (3.25) 497s ***** error nakalike ([5, 0.2], ones (2)) 497s ***** error ... 497s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 497s ***** error ... 497s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 497s ***** error ... 497s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 497s ***** error ... 497s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 497s ***** error ... 497s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 497s 11 tests, 11 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/tlsfit.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/tlsfit.m 497s ***** demo 497s ## Sample 3 populations from 3 different location-scale T distributions 497s randn ("seed", 1); # for reproducibility 497s randg ("seed", 2); # for reproducibility 497s r1 = tlsrnd (-4, 3, 1, 2000, 1); 497s randn ("seed", 3); # for reproducibility 497s randg ("seed", 4); # for reproducibility 497s r2 = tlsrnd (0, 3, 1, 2000, 1); 497s randn ("seed", 5); # for reproducibility 497s randg ("seed", 6); # for reproducibility 497s r3 = tlsrnd (5, 5, 4, 2000, 1); 497s r = [r1, r2, r3]; 497s 497s ## Plot them normalized and fix their colors 497s hist (r, [-21:21], [1, 1, 1]); 497s h = findobj (gca, "Type", "patch"); 497s set (h(1), "facecolor", "c"); 497s set (h(2), "facecolor", "g"); 497s set (h(3), "facecolor", "r"); 497s ylim ([0, 0.25]); 497s xlim ([-20, 20]); 497s hold on 497s 497s ## Estimate their lambda parameter 497s mu_sigma_nuA = tlsfit (r(:,1)); 497s mu_sigma_nuB = tlsfit (r(:,2)); 497s mu_sigma_nuC = tlsfit (r(:,3)); 497s 497s ## Plot their estimated PDFs 497s x = [-20:0.1:20]; 497s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 497s plot (x, y, "-pr"); 497s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 497s plot (x, y, "-sg"); 497s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 497s plot (x, y, "-^c"); 497s hold off 497s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 497s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 497s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 497s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 497s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 497s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 497s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 497s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 497s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 497s title ("Three population samples from different location-scale T distributions") 497s hold off 497s ***** test 497s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 497s [paramhat, paramci] = tlsfit (x); 497s paramhat_out = [0.035893, 0.862711, 0.649261]; 497s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 497s assert (paramhat, paramhat_out, 1e-6); 497s assert (paramci, paramci_out, 1e-5); 497s ***** test 497s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 497s [paramhat, paramci] = tlsfit (x, 0.01); 497s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 497s assert (paramci, paramci_out, 1e-4); 497s ***** error tlsfit (ones (2,5)); 497s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 497s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 497s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 497s ***** error ... 497s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 497s 12 tests, 12 passed, 0 known failure, 0 skipped 497s [inst/dist_fit/raylfit.m] 497s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/raylfit.m 497s ***** demo 497s ## Sample 3 populations from 3 different Rayleigh distributions 497s rand ("seed", 2); # for reproducibility 497s r1 = raylrnd (1, 1000, 1); 497s rand ("seed", 2); # for reproducibility 497s r2 = raylrnd (2, 1000, 1); 497s rand ("seed", 3); # for reproducibility 497s r3 = raylrnd (4, 1000, 1); 497s r = [r1, r2, r3]; 497s 497s ## Plot them normalized and fix their colors 497s hist (r, [0.5:0.5:10.5], 2); 497s h = findobj (gca, "Type", "patch"); 497s set (h(1), "facecolor", "c"); 497s set (h(2), "facecolor", "g"); 497s set (h(3), "facecolor", "r"); 497s hold on 497s 497s ## Estimate their lambda parameter 497s sigmaA = raylfit (r(:,1)); 497s sigmaB = raylfit (r(:,2)); 497s sigmaC = raylfit (r(:,3)); 497s 497s ## Plot their estimated PDFs 497s x = [0:0.1:10]; 497s y = raylpdf (x, sigmaA); 497s plot (x, y, "-pr"); 497s y = raylpdf (x, sigmaB); 497s plot (x, y, "-sg"); 497s y = raylpdf (x, sigmaC); 497s plot (x, y, "-^c"); 497s xlim ([0, 10]) 497s ylim ([0, 0.7]) 497s legend ({"Normalized HIST of sample 1 with σ=1", ... 497s "Normalized HIST of sample 2 with σ=2", ... 497s "Normalized HIST of sample 3 with σ=4", ... 497s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 497s sigmaA), ... 497s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 497s sigmaB), ... 497s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 497s sigmaC)}) 497s title ("Three population samples from different Rayleigh distributions") 497s hold off 497s ***** test 497s x = [1 3 2 4 5 4 3 4]; 497s [shat, sci] = raylfit (x); 497s assert (shat, 2.4495, 1e-4) 497s assert (sci, [1.8243; 3.7279], 1e-4) 497s ***** test 497s x = [1 3 2 4 5 4 3 4]; 497s [shat, sci] = raylfit (x, 0.01); 497s assert (shat, 2.4495, 1e-4) 497s assert (sci, [1.6738; 4.3208], 1e-4) 498s ***** test 498s x = [1 2 3 4 5]; 498s f = [1 1 2 3 1]; 498s [shat, sci] = raylfit (x, [], [], f); 498s assert (shat, 2.4495, 1e-4) 498s assert (sci, [1.8243; 3.7279], 1e-4) 498s ***** test 498s x = [1 2 3 4 5]; 498s f = [1 1 2 3 1]; 498s [shat, sci] = raylfit (x, 0.01, [], f); 498s assert (shat, 2.4495, 1e-4) 498s assert (sci, [1.6738; 4.3208], 1e-4) 498s ***** test 498s x = [1 2 3 4 5 6]; 498s c = [0 0 0 0 0 1]; 498s f = [1 1 2 3 1 1]; 498s [shat, sci] = raylfit (x, 0.01, c, f); 498s assert (shat, 2.4495, 1e-4) 498s assert (sci, [1.6738; 4.3208], 1e-4) 498s ***** error raylfit (ones (2,5)); 498s ***** error raylfit ([1 2 -1 3]) 498s ***** error raylfit ([1 2 3], 0) 498s ***** error raylfit ([1 2 3], 1.2) 498s ***** error raylfit ([1 2 3], [0.02 0.05]) 498s ***** error ... 498s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error 498s raylfit ([1 2 3], [], [], [1 5]) 498s ***** error 498s raylfit ([1 2 3], [], [], [1 5 -1]) 498s 16 tests, 16 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/binofit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/binofit.m 498s ***** demo 498s ## Sample 2 populations from different binomial distributions 498s rand ("seed", 1); # for reproducibility 498s r1 = binornd (50, 0.15, 1000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = binornd (100, 0.5, 1000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 23, 0.35); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s hold on 498s 498s ## Estimate their probability of success 498s pshatA = binofit (r(:,1), 50); 498s pshatB = binofit (r(:,2), 100); 498s 498s ## Plot their estimated PDFs 498s x = [min(r(:,1)):max(r(:,1))]; 498s y = binopdf (x, 50, mean (pshatA)); 498s plot (x, y, "-pg"); 498s x = [min(r(:,2)):max(r(:,2))]; 498s y = binopdf (x, 100, mean (pshatB)); 498s plot (x, y, "-sc"); 498s ylim ([0, 0.2]) 498s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 498s "Normalized HIST of sample 2 with ps=0.50", ... 498s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 498s mean (pshatA)), ... 498s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 498s mean (pshatB))}) 498s title ("Two population samples from different binomial distributions") 498s hold off 498s ***** test 498s x = 0:3; 498s [pshat, psci] = binofit (x, 3); 498s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 498s assert (psci(1,:), [0, 0.7076], 1e-4); 498s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 498s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 498s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 498s ***** error ... 498s binofit ([1 2 3 4]) 498s ***** error ... 498s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 498s ***** error binofit (ones(2), [1, 2, 3, 3]) 498s ***** error ... 498s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 498s ***** error ... 498s binofit ([1, 4, 3, 2], [5, 5, 5]) 498s ***** error ... 498s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 498s ***** error binofit ([1, 2, 1], 3, 1.2); 498s ***** error binofit ([1, 2, 1], 3, 0); 498s ***** error binofit ([1, 2, 1], 3, "alpha"); 498s 10 tests, 10 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/geofit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/geofit.m 498s ***** demo 498s ## Sample 2 populations from different geometric distributions 498s rande ("seed", 1); # for reproducibility 498s r1 = geornd (0.15, 1000, 1); 498s rande ("seed", 2); # for reproducibility 498s r2 = geornd (0.5, 1000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 0:0.5:20.5, 1); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s hold on 498s 498s ## Estimate their probability of success 498s pshatA = geofit (r(:,1)); 498s pshatB = geofit (r(:,2)); 498s 498s ## Plot their estimated PDFs 498s x = [0:15]; 498s y = geopdf (x, pshatA); 498s plot (x, y, "-pg"); 498s y = geopdf (x, pshatB); 498s plot (x, y, "-sc"); 498s xlim ([0, 15]) 498s ylim ([0, 0.6]) 498s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 498s "Normalized HIST of sample 2 with ps=0.50", ... 498s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 498s mean (pshatA)), ... 498s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 498s mean (pshatB))}) 498s title ("Two population samples from different geometric distributions") 498s hold off 498s ***** test 498s x = 0:5; 498s [pshat, psci] = geofit (x); 498s assert (pshat, 0.2857, 1e-4); 498s assert (psci, [0.092499; 0.478929], 1e-5); 498s ***** test 498s x = 0:5; 498s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 498s assert (pshat, 0.2857, 1e-4); 498s assert (psci, [0.092499; 0.478929], 1e-5); 498s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 498s ***** error geofit () 498s ***** error geofit (-1, [1 2 3 3]) 498s ***** error geofit (1, 0) 498s ***** error geofit (1, 1.2) 498s ***** error geofit (1, [0.02 0.05]) 498s ***** error ... 498s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 498s ***** error ... 498s geofit ([1.5, 0.2], [], [1, 1, 1]) 498s 10 tests, 10 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/logifit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/logifit.m 498s ***** demo 498s ## Sample 3 populations from different logistic distributions 498s rand ("seed", 5) # for reproducibility 498s r1 = logirnd (2, 1, 2000, 1); 498s rand ("seed", 2) # for reproducibility 498s r2 = logirnd (5, 2, 2000, 1); 498s rand ("seed", 7) # for reproducibility 498s r3 = logirnd (9, 4, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [-6:20], 1); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s set (h(3), "facecolor", "r"); 498s ylim ([0, 0.3]); 498s xlim ([-5, 20]); 498s hold on 498s 498s ## Estimate their MU and LAMBDA parameters 498s mu_sA = logifit (r(:,1)); 498s mu_sB = logifit (r(:,2)); 498s mu_sC = logifit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [-5:0.5:20]; 498s y = logipdf (x, mu_sA(1), mu_sA(2)); 498s plot (x, y, "-pr"); 498s y = logipdf (x, mu_sB(1), mu_sB(2)); 498s plot (x, y, "-sg"); 498s y = logipdf (x, mu_sC(1), mu_sC(2)); 498s plot (x, y, "-^c"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 498s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 498s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 498s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 498s mu_sA(1), mu_sA(2)), ... 498s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 498s mu_sB(1), mu_sB(2)), ... 498s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 498s mu_sC(1), mu_sC(2))}) 498s title ("Three population samples from different logistic distributions") 498s hold off 498s ***** test 498s paramhat = logifit ([1:50]); 498s paramhat_out = [25.5, 8.7724]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = logifit ([1:5]); 498s paramhat_out = [3, 0.8645]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 498s paramhat_out = [3, 0.8645]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 498s paramhat_out = logifit ([1:5, 5]); 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** error logifit (ones (2,5)); 498s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 498s ***** error logifit ([1, 2, 3, 4, 5], 0); 498s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error ... 498s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 13 tests, 13 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/poisslike.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/poisslike.m 498s ***** test 498s x = [1 3 2 4 5 4 3 4]; 498s [nlogL, avar] = poisslike (3.25, x); 498s assert (nlogL, 13.9533, 1e-4) 498s ***** test 498s x = [1 2 3 4 5]; 498s f = [1 1 2 3 1]; 498s [nlogL, avar] = poisslike (3.25, x, f); 498s assert (nlogL, 13.9533, 1e-4) 498s ***** error poisslike (1) 498s ***** error poisslike ([1 2 3], [1 2]) 498s ***** error ... 498s poisslike (3.25, ones (10, 2)) 498s ***** error ... 498s poisslike (3.25, [1 2 3 -4 5]) 498s ***** error ... 498s poisslike (3.25, ones (10, 1), ones (8,1)) 498s ***** error ... 498s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 498s 8 tests, 8 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gpfit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gpfit.m 498s ***** demo 498s ## Sample 2 populations from different generalized Pareto distributions 498s ## Assume location parameter θ is known 498s theta = 0; 498s rand ("seed", 5); # for reproducibility 498s r1 = gprnd (1, 2, theta, 20000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = gprnd (3, 1, theta, 20000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [0.1:0.2:100], 5); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "r"); 498s set (h(2), "facecolor", "c"); 498s ylim ([0, 1]); 498s xlim ([0, 5]); 498s hold on 498s 498s ## Estimate their α and β parameters 498s k_sigmaA = gpfit (r(:,1), theta); 498s k_sigmaB = gpfit (r(:,2), theta); 498s 498s ## Plot their estimated PDFs 498s x = [0.01, 0.1:0.2:18]; 498s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 498s plot (x, y, "-pc"); 498s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 498s plot (x, y, "-sr"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 498s "Normalized HIST of sample 2 with k=2 and σ=2", ... 498s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 498s k_sigmaA(1), k_sigmaA(2)), ... 498s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 498s k_sigmaB(1), k_sigmaB(2))}) 498s title ("Two population samples from different generalized Pareto distributions") 498s text (2, 0.7, "Known location parameter θ = 0") 498s hold off 498s ***** test 498s k = 0.8937; sigma = 1.3230; theta = 1; 498s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 498s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 498s [hat, ci] = gpfit (x, theta); 498s assert (hat, [k, sigma, theta], 1e-4); 498s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 498s ***** error gpfit () 498s ***** error gpfit (1) 498s ***** error gpfit ([0.2, 0.5+i], 0); 498s ***** error gpfit (ones (2,2) * 0.5, 0); 498s ***** error ... 498s gpfit ([0.5, 1.2], [0, 1]); 498s ***** error ... 498s gpfit ([0.5, 1.2], 5+i); 498s ***** error ... 498s gpfit ([1:5], 2); 498s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 498s ***** error gpfit ([0.01:0.1:0.99], 0, i); 498s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 498s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 498s ***** error 498s gpfit ([1 2 3], 0, [], [1 5]) 498s ***** error 498s gpfit ([1 2 3], 0, [], [1 5 -1]) 498s ***** error ... 498s gpfit ([1:10], 1, 0.05, [], 5) 498s 15 tests, 15 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/bisafit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/bisafit.m 498s ***** demo 498s ## Sample 3 populations from different Birnbaum-Saunders distributions 498s rand ("seed", 5); # for reproducibility 498s r1 = bisarnd (1, 0.5, 2000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = bisarnd (2, 0.3, 2000, 1); 498s rand ("seed", 7); # for reproducibility 498s r3 = bisarnd (4, 0.5, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 80, 4.2); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s set (h(3), "facecolor", "r"); 498s ylim ([0, 1.1]); 498s xlim ([0, 8]); 498s hold on 498s 498s ## Estimate their α and β parameters 498s beta_gammaA = bisafit (r(:,1)); 498s beta_gammaB = bisafit (r(:,2)); 498s beta_gammaC = bisafit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [0:0.1:8]; 498s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 498s plot (x, y, "-pr"); 498s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 498s plot (x, y, "-sg"); 498s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 498s plot (x, y, "-^c"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 498s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 498s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 498s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 498s beta_gammaA(1), beta_gammaA(2)), ... 498s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 498s beta_gammaB(1), beta_gammaB(2)), ... 498s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 498s beta_gammaC(1), beta_gammaC(2))}) 498s title ("Three population samples from different Birnbaum-Saunders distributions") 498s hold off 498s ***** test 498s paramhat = bisafit ([1:50]); 498s paramhat_out = [16.2649, 1.0156]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = bisafit ([1:5]); 498s paramhat_out = [2.5585, 0.5839]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** error bisafit (ones (2,5)); 498s ***** error bisafit ([-1 2 3 4]); 498s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 498s ***** error bisafit ([1, 2, 3, 4, 5], 0); 498s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error ... 498s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 12 tests, 12 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/normlike.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/normlike.m 498s ***** error normlike ([12, 15]); 498s ***** error normlike ([12, 15], ones (2)); 498s ***** error ... 498s normlike ([12, 15, 3], [1:50]); 498s ***** error ... 498s normlike ([12, 15], [1:50], [1, 2, 3]); 498s ***** error ... 498s normlike ([12, 15], [1:50], [], [1, 2, 3]); 498s ***** error ... 498s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 498s ***** test 498s x = 1:50; 498s [nlogL, avar] = normlike ([2.3, 1.2], x); 498s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 498s assert (nlogL, 13014.95883783327, 1e-10); 498s assert (avar, avar_out, 1e-4); 498s ***** test 498s x = 1:50; 498s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 498s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 498s assert (nlogL, 2854.802587833265, 1e-10); 498s assert (avar, avar_out, 1e-4); 498s ***** test 498s x = 1:50; 498s [nlogL, avar] = normlike ([21, 15], x); 498s avar_out = [5.460474308300396, -1.600790513833993; ... 498s -1.600790513833993, 2.667984189723321]; 498s assert (nlogL, 206.738325604233, 1e-12); 498s assert (avar, avar_out, 1e-14); 498s ***** test 498s x = 1:50; 498s censor = ones (1, 50); 498s censor([2, 4, 6, 8, 12, 14]) = 0; 498s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 498s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 498s assert (nlogL, Inf); 498s assert (avar, [NaN, NaN; NaN, NaN]); 498s ***** test 498s x = 1:50; 498s censor = ones (1, 50); 498s censor([2, 4, 6, 8, 12, 14]) = 0; 498s [nlogL, avar] = normlike ([21, 15], x, censor); 498s avar_out = [24.4824488866131, -10.6649544179636; ... 498s -10.6649544179636, 6.22827849965737]; 498s assert (nlogL, 86.9254371829733, 1e-12); 498s assert (avar, avar_out, 8e-14); 498s 11 tests, 11 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/unidfit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/unidfit.m 498s ***** demo 498s ## Sample 2 populations from different discrete uniform distributions 498s rand ("seed", 1); # for reproducibility 498s r1 = unidrnd (5, 1000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = unidrnd (9, 1000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 0:0.5:20.5, 1); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s hold on 498s 498s ## Estimate their probability of success 498s NhatA = unidfit (r(:,1)); 498s NhatB = unidfit (r(:,2)); 498s 498s ## Plot their estimated PDFs 498s x = [0:10]; 498s y = unidpdf (x, NhatA); 498s plot (x, y, "-pg"); 498s y = unidpdf (x, NhatB); 498s plot (x, y, "-sc"); 498s xlim ([0, 10]) 498s ylim ([0, 0.4]) 498s legend ({"Normalized HIST of sample 1 with N=5", ... 498s "Normalized HIST of sample 2 with N=9", ... 498s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 498s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 498s title ("Two population samples from different discrete uniform distributions") 498s hold off 498s ***** test 498s x = 0:5; 498s [Nhat, Nci] = unidfit (x); 498s assert (Nhat, 5); 498s assert (Nci, [5; 9]); 498s ***** test 498s x = 0:5; 498s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 498s assert (Nhat, 5); 498s assert (Nci, [5; 9]); 498s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 498s ***** error unidfit () 498s ***** error unidfit (-1, [1 2 3 3]) 498s ***** error unidfit (1, 0) 498s ***** error unidfit (1, 1.2) 498s ***** error unidfit (1, [0.02 0.05]) 498s ***** error ... 498s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 498s ***** error ... 498s unidfit ([1.5, 0.2], [], [1, 1, 1]) 498s ***** error ... 498s unidfit ([1.5, 0.2], [], [1, -1]) 498s 11 tests, 11 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/logllike.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/logllike.m 498s ***** test 498s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 498s assert (nlogL, 211.2965, 1e-4); 498s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 498s ***** test 498s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 498s assert (nlogL, 9.2206, 1e-4); 498s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 498s ***** error logllike (3.25) 498s ***** error logllike ([5, 0.2], ones (2)) 498s ***** error ... 498s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 498s ***** error ... 498s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 498s ***** error ... 498s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 498s ***** error ... 498s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 498s 8 tests, 8 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gevlike.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gevlike.m 498s ***** test 498s x = 1; 498s k = 0.2; 498s sigma = 0.3; 498s mu = 0.5; 498s [L, C] = gevlike ([k sigma mu], x); 498s expected_L = 0.75942; 498s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 498s assert (L, expected_L, 0.001); 498s assert (C, inv (expected_C), 0.001); 498s ***** test 498s x = 1; 498s k = 0; 498s sigma = 0.3; 498s mu = 0.5; 498s [L, C] = gevlike ([k sigma mu], x); 498s expected_L = 0.65157; 498s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 498s assert (L, expected_L, 0.001); 498s assert (C, inv (expected_C), 0.001); 498s ***** test 498s x = -5:-1; 498s k = -0.2; 498s sigma = 0.3; 498s mu = 0.5; 498s [L, C] = gevlike ([k sigma mu], x); 498s expected_L = 3786.4; 498s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 498s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 498s 8.7297e-05, 1.2034e-05, -0.0019125]; 498s assert (L, expected_L, -0.001); 498s assert (C, expected_C, -0.001); 498s ***** test 498s x = -5:0; 498s k = -0.2; 498s sigma = 0.3; 498s mu = 0.5; 498s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 498s expected_L = 3786.4; 498s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 498s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 498s 8.7297e-05, 1.2034e-05, -0.0019125]; 498s assert (L, expected_L, -0.001); 498s assert (C, expected_C, -0.001); 498s ***** error gevlike (3.25) 498s ***** error gevlike ([1, 2, 3], ones (2)) 498s ***** error ... 498s gevlike ([1, 2], [1, 3, 5, 7]) 498s ***** error ... 498s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 498s ***** error ... 498s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 498s ***** error ... 498s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 498s ***** error ... 498s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 498s 11 tests, 11 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/loglfit.m] 498s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/loglfit.m 498s ***** demo 498s ## Sample 3 populations from different log-logistic distributions 498s rand ("seed", 5) # for reproducibility 498s r1 = loglrnd (0, 1, 2000, 1); 498s rand ("seed", 2) # for reproducibility 498s r2 = loglrnd (0, 0.5, 2000, 1); 498s rand ("seed", 7) # for reproducibility 498s r3 = loglrnd (0, 0.125, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [0.05:0.1:2.5], 10); 498s h = findobj (gca, "Type", "patch"); 498s set (h(1), "facecolor", "c"); 498s set (h(2), "facecolor", "g"); 498s set (h(3), "facecolor", "r"); 498s ylim ([0, 3.5]); 498s xlim ([0, 2.0]); 498s hold on 498s 498s ## Estimate their MU and LAMBDA parameters 498s a_bA = loglfit (r(:,1)); 498s a_bB = loglfit (r(:,2)); 498s a_bC = loglfit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [0.01:0.1:2.01]; 498s y = loglpdf (x, a_bA(1), a_bA(2)); 498s plot (x, y, "-pr"); 498s y = loglpdf (x, a_bB(1), a_bB(2)); 498s plot (x, y, "-sg"); 498s y = loglpdf (x, a_bC(1), a_bC(2)); 498s plot (x, y, "-^c"); 498s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 498s "Normalized HIST of sample 2 with α=1 and β=2", ... 498s "Normalized HIST of sample 3 with α=1 and β=8", ... 498s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 498s a_bA(1), a_bA(2)), ... 498s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 498s a_bB(1), a_bB(2)), ... 498s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 498s a_bC(1), a_bC(2))}) 498s title ("Three population samples from different log-logistic distributions") 498s hold off 498s ***** test 498s [paramhat, paramci] = loglfit ([1:50]); 498s paramhat_out = [3.09717, 0.468525]; 498s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 498s assert (paramhat, paramhat_out, 1e-5); 498s assert (paramci, paramci_out, 1e-5); 498s ***** test 498s paramhat = loglfit ([1:5]); 498s paramhat_out = [1.01124, 0.336449]; 498s assert (paramhat, paramhat_out, 1e-5); 498s ***** test 498s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 498s paramhat_out = [1.01124, 0.336449]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 498s paramhat_out = loglfit ([1:5, 5]); 498s assert (paramhat, paramhat_out, 1e-4); 499s ***** error loglfit (ones (2,5)); 499s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 499s ***** error loglfit ([1, 2, 3, 4, 5], 0); 499s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 499s ***** error ... 499s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 499s ***** error ... 499s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 499s ***** error ... 499s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 499s ***** error ... 499s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 499s ***** error ... 499s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 499s 13 tests, 13 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/normfit.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/normfit.m 499s ***** demo 499s ## Sample 3 populations from 3 different normal distributions 499s randn ("seed", 1); # for reproducibility 499s r1 = normrnd (2, 5, 5000, 1); 499s randn ("seed", 2); # for reproducibility 499s r2 = normrnd (5, 2, 5000, 1); 499s randn ("seed", 3); # for reproducibility 499s r3 = normrnd (9, 4, 5000, 1); 499s r = [r1, r2, r3]; 499s 499s ## Plot them normalized and fix their colors 499s hist (r, 15, 0.4); 499s h = findobj (gca, "Type", "patch"); 499s set (h(1), "facecolor", "c"); 499s set (h(2), "facecolor", "g"); 499s set (h(3), "facecolor", "r"); 499s hold on 499s 499s ## Estimate their mu and sigma parameters 499s [muhat, sigmahat] = normfit (r); 499s 499s ## Plot their estimated PDFs 499s x = [min(r(:)):max(r(:))]; 499s y = normpdf (x, muhat(1), sigmahat(1)); 499s plot (x, y, "-pr"); 499s y = normpdf (x, muhat(2), sigmahat(2)); 499s plot (x, y, "-sg"); 499s y = normpdf (x, muhat(3), sigmahat(3)); 499s plot (x, y, "-^c"); 499s ylim ([0, 0.5]) 499s xlim ([-20, 20]) 499s hold off 499s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 499s "Normalized HIST of sample 2 with mu=5, σ=2", ... 499s "Normalized HIST of sample 3 with mu=9, σ=4", ... 499s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 499s muhat(1), sigmahat(1)), ... 499s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 499s muhat(2), sigmahat(2)), ... 499s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 499s muhat(3), sigmahat(3))}, "location", "northwest") 499s title ("Three population samples from different normal distributions") 499s hold off 499s ***** test 499s load lightbulb 499s idx = find (lightbulb(:,2) == 0); 499s censoring = lightbulb(idx,3) == 1; 499s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 499s assert (muHat, 9496.59586737857, 1e-11); 499s assert (sigmaHat, 3064.021012796456, 2e-12); 499s ***** test 499s randn ("seed", 234); 499s x = normrnd (3, 5, [1000, 1]); 499s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 499s assert (muCI(1) < 3); 499s assert (muCI(2) > 3); 499s assert (sigmaCI(1) < 5); 499s assert (sigmaCI(2) > 5); 499s ***** error ... 499s normfit (ones (3,3,3)) 499s ***** error ... 499s normfit (ones (20,3), [], zeros (20,1)) 499s ***** error normfit (ones (20,1), 0) 499s ***** error normfit (ones (20,1), -0.3) 499s ***** error normfit (ones (20,1), 1.2) 499s ***** error normfit (ones (20,1), [0.05 0.1]) 499s ***** error normfit (ones (20,1), 0.02+i) 499s ***** error ... 499s normfit (ones (20,1), [], zeros(15,1)) 499s ***** error ... 499s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 499s ***** error ... 499s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 499s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 499s 13 tests, 13 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/wblfit.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/wblfit.m 499s ***** demo 499s ## Sample 3 populations from 3 different Weibull distributions 499s rande ("seed", 1); # for reproducibility 499s r1 = wblrnd(2, 4, 2000, 1); 499s rande ("seed", 2); # for reproducibility 499s r2 = wblrnd(5, 2, 2000, 1); 499s rande ("seed", 5); # for reproducibility 499s r3 = wblrnd(1, 5, 2000, 1); 499s r = [r1, r2, r3]; 499s 499s ## Plot them normalized and fix their colors 499s hist (r, 30, [2.5 2.1 3.2]); 499s h = findobj (gca, "Type", "patch"); 499s set (h(1), "facecolor", "c"); 499s set (h(2), "facecolor", "g"); 499s set (h(3), "facecolor", "r"); 499s ylim ([0, 2]); 499s xlim ([0, 10]); 499s hold on 499s 499s ## Estimate their lambda parameter 499s lambda_kA = wblfit (r(:,1)); 499s lambda_kB = wblfit (r(:,2)); 499s lambda_kC = wblfit (r(:,3)); 499s 499s ## Plot their estimated PDFs 499s x = [0:0.1:15]; 499s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 499s plot (x, y, "-pr"); 499s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 499s plot (x, y, "-sg"); 499s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 499s plot (x, y, "-^c"); 499s hold off 499s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 499s "Normalized HIST of sample 2 with λ=5 and k=2", ... 499s "Normalized HIST of sample 3 with λ=1 and k=5", ... 499s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 499s lambda_kA(1), lambda_kA(2)), ... 499s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 499s lambda_kB(1), lambda_kB(2)), ... 499s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 499s lambda_kC(1), lambda_kC(2))}) 499s title ("Three population samples from different Weibull distributions") 499s hold off 499s ***** test 499s x = 1:50; 499s [paramhat, paramci] = wblfit (x); 499s paramhat_out = [28.3636, 1.7130]; 499s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 499s assert (paramhat, paramhat_out, 1e-4); 499s assert (paramci, paramci_out, 1e-4); 499s ***** test 499s x = 1:50; 499s [paramhat, paramci] = wblfit (x, 0.01); 499s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 499s assert (paramci, paramci_out, 1e-4); 499s ***** error wblfit (ones (2,5)); 499s ***** error wblfit ([-1 2 3 4]); 499s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 499s ***** error wblfit ([1, 2, 3, 4, 5], 0); 499s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 499s ***** error ... 499s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 499s 13 tests, 13 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/lognfit.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/lognfit.m 499s ***** demo 499s ## Sample 3 populations from 3 different log-normal distributions 499s randn ("seed", 1); # for reproducibility 499s r1 = lognrnd (0, 0.25, 1000, 1); 499s randn ("seed", 2); # for reproducibility 499s r2 = lognrnd (0, 0.5, 1000, 1); 499s randn ("seed", 3); # for reproducibility 499s r3 = lognrnd (0, 1, 1000, 1); 499s r = [r1, r2, r3]; 499s 499s ## Plot them normalized and fix their colors 499s hist (r, 30, 2); 499s h = findobj (gca, "Type", "patch"); 499s set (h(1), "facecolor", "c"); 499s set (h(2), "facecolor", "g"); 499s set (h(3), "facecolor", "r"); 499s hold on 499s 499s ## Estimate their mu and sigma parameters 499s mu_sigmaA = lognfit (r(:,1)); 499s mu_sigmaB = lognfit (r(:,2)); 499s mu_sigmaC = lognfit (r(:,3)); 499s 499s ## Plot their estimated PDFs 499s x = [0:0.1:6]; 499s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 499s plot (x, y, "-pr"); 499s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 499s plot (x, y, "-sg"); 499s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 499s plot (x, y, "-^c"); 499s ylim ([0, 2]) 499s xlim ([0, 6]) 499s hold off 499s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 499s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 499s "Normalized HIST of sample 3 with mu=0, σ=1", ... 499s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 499s mu_sigmaA(1), mu_sigmaA(2)), ... 499s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 499s mu_sigmaB(1), mu_sigmaB(2)), ... 499s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 499s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 499s title ("Three population samples from different log-normal distributions") 499s hold off 499s ***** test 499s randn ("seed", 1); 499s x = lognrnd (3, 5, [1000, 1]); 499s [paramhat, paramci] = lognfit (x, 0.01); 499s assert (paramci(1,1) < 3); 499s assert (paramci(1,2) > 3); 499s assert (paramci(2,1) < 5); 499s assert (paramci(2,2) > 5); 499s ***** error ... 499s lognfit (ones (20,3)) 499s ***** error ... 499s lognfit ({1, 2, 3, 4, 5}) 499s ***** error ... 499s lognfit ([-1, 2, 3, 4, 5]) 499s ***** error lognfit (ones (20,1), 0) 499s ***** error lognfit (ones (20,1), -0.3) 499s ***** error lognfit (ones (20,1), 1.2) 499s ***** error lognfit (ones (20,1), [0.05, 0.1]) 499s ***** error lognfit (ones (20,1), 0.02+i) 499s ***** error ... 499s lognfit (ones (20,1), [], zeros(15,1)) 499s ***** error ... 499s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 499s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 499s 12 tests, 12 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/nbinlike.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/nbinlike.m 499s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 499s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 499s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 499s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 499s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 499s ***** error nbinlike (3.25) 499s ***** error nbinlike ([5, 0.2], ones (2)) 499s ***** error nbinlike ([5, 0.2], [-1, 3]) 499s ***** error ... 499s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 499s ***** error nbinlike ([-5, 0.2], [1:15]) 499s ***** error nbinlike ([0, 0.2], [1:15]) 499s ***** error nbinlike ([5, 1.2], [3, 5]) 499s ***** error nbinlike ([5, -0.2], [3, 5]) 499s ***** error ... 499s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 499s ***** error ... 499s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 499s ***** error ... 499s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 499s 16 tests, 16 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/gevfit_lmom.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/gevfit_lmom.m 499s ***** xtest <31070> 499s data = 1:50; 499s [pfit, pci] = gevfit_lmom (data); 499s expected_p = [-0.28 15.01 20.22]'; 499s assert (pfit, expected_p, 0.1); 499s 1 test, 1 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/tlslike.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/tlslike.m 499s ***** test 499s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 499s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 499s acov_out = [0.2525, 0.0670, 0.0288; ... 499s 0.0670, 0.5724, 0.1786; ... 499s 0.0288, 0.1786, 0.1789]; 499s assert (nlogL, 17.9979636579, 1e-10); 499s assert (acov, acov_out, 1e-4); 499s ***** error tlslike ([12, 15, 1]); 499s ***** error tlslike ([12, 15], [1:50]); 499s ***** error tlslike ([12, 3, 1], ones (10, 2)); 499s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 499s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 499s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 499s 7 tests, 7 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/nbinfit.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/nbinfit.m 499s ***** demo 499s ## Sample 2 populations from different negative binomial distributions 499s randp ("seed", 5); randg ("seed", 5); # for reproducibility 499s r1 = nbinrnd (2, 0.15, 5000, 1); 499s randp ("seed", 8); randg ("seed", 8); # for reproducibility 499s r2 = nbinrnd (5, 0.2, 5000, 1); 499s r = [r1, r2]; 499s 499s ## Plot them normalized and fix their colors 499s hist (r, [0:51], 1); 499s h = findobj (gca, "Type", "patch"); 499s set (h(1), "facecolor", "c"); 499s set (h(2), "facecolor", "g"); 499s hold on 499s 499s ## Estimate their probability of success 499s r_psA = nbinfit (r(:,1)); 499s r_psB = nbinfit (r(:,2)); 499s 499s ## Plot their estimated PDFs 499s x = [0:40]; 499s y = nbinpdf (x, r_psA(1), r_psA(2)); 499s plot (x, y, "-pg"); 499s x = [min(r(:,2)):max(r(:,2))]; 499s y = nbinpdf (x, r_psB(1), r_psB(2)); 499s plot (x, y, "-sc"); 499s ylim ([0, 0.1]) 499s xlim ([0, 50]) 499s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 499s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 499s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 499s r_psA(1), r_psA(2)), ... 499s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 499s r_psB(1), r_psB(2))}) 499s title ("Two population samples from negative different binomial distributions") 499s hold off 499s ***** test 499s [paramhat, paramci] = nbinfit ([1:50]); 499s assert (paramhat, [2.420857, 0.086704], 1e-6); 499s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 499s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 499s ***** test 499s [paramhat, paramci] = nbinfit ([1:20]); 499s assert (paramhat, [3.588233, 0.254697], 1e-6); 499s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 499s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 499s ***** test 499s [paramhat, paramci] = nbinfit ([1:10]); 499s assert (paramhat, [8.8067, 0.6156], 1e-4); 499s assert (paramci(:,1), [0; 30.7068], 1e-4); 499s assert (paramci(:,2), [0.0217; 1], 1e-4); 499s ***** test 499s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 499s assert (paramhat, [8.8067, 0.6156], 1e-4); 499s assert (paramci(:,1), [0; 30.7068], 1e-4); 499s assert (paramci(:,2), [0.0217; 1], 1e-4); 499s ***** test 499s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 499s assert (paramhat, [8.8067, 0.6156], 1e-4); 499s assert (paramci(:,1), [0; 30.7068], 1e-4); 499s assert (paramci(:,2), [0.0217; 1], 1e-4); 499s ***** error nbinfit ([-1 2 3 3]) 499s ***** error nbinfit (ones (2)) 499s ***** error nbinfit ([1 2 1.2 3]) 499s ***** error nbinfit ([1 2 3], 0) 499s ***** error nbinfit ([1 2 3], 1.2) 499s ***** error nbinfit ([1 2 3], [0.02 0.05]) 499s ***** error ... 499s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 499s ***** error ... 499s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 499s ***** error ... 499s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 499s ***** error ... 499s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 499s ***** error ... 499s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 499s 16 tests, 16 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/explike.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/explike.m 499s ***** test 499s x = 12; 499s beta = 5; 499s [L, V] = explike (beta, x); 499s expected_L = 4.0094; 499s expected_V = 6.5789; 499s assert (L, expected_L, 0.001); 499s assert (V, expected_V, 0.001); 499s ***** test 499s x = 1:5; 499s beta = 2; 499s [L, V] = explike (beta, x); 499s expected_L = 10.9657; 499s expected_V = 0.4; 499s assert (L, expected_L, 0.001); 499s assert (V, expected_V, 0.001); 499s ***** error explike () 499s ***** error explike (2) 499s ***** error explike ([12, 3], [1:50]) 499s ***** error explike (3, ones (10, 2)) 499s ***** error ... 499s explike (3, [1:50], [1, 2, 3]) 499s ***** error ... 499s explike (3, [1:50], [], [1, 2, 3]) 499s 8 tests, 8 passed, 0 known failure, 0 skipped 499s [inst/dist_fit/burrfit.m] 499s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/burrfit.m 499s ***** demo 499s ## Sample 3 populations from different Burr type XII distributions 499s rand ("seed", 4); # for reproducibility 499s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 499s rand ("seed", 2); # for reproducibility 499s r2 = burrrnd (1, 3, 1, 10000, 1); 499s rand ("seed", 9); # for reproducibility 499s r3 = burrrnd (0.5, 2, 3, 10000, 1); 499s r = [r1, r2, r3]; 499s 499s ## Plot them normalized and fix their colors 499s hist (r, [0.1:0.2:20], [18, 5, 3]); 499s h = findobj (gca, "Type", "patch"); 499s set (h(1), "facecolor", "c"); 499s set (h(2), "facecolor", "g"); 499s set (h(3), "facecolor", "r"); 499s ylim ([0, 3]); 499s xlim ([0, 5]); 499s hold on 499s 499s ## Estimate their α and β parameters 499s lambda_c_kA = burrfit (r(:,1)); 499s lambda_c_kB = burrfit (r(:,2)); 499s lambda_c_kC = burrfit (r(:,3)); 499s 499s ## Plot their estimated PDFs 499s x = [0.01:0.15:15]; 499s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 499s plot (x, y, "-pr"); 499s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 499s plot (x, y, "-sg"); 499s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 499s plot (x, y, "-^c"); 499s hold off 499s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 499s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 499s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 499s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 499s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 499s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 499s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 499s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 499s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 499s title ("Three population samples from different Burr type XII distributions") 499s hold off 499s ***** test 499s l = 1; c = 2; k = 3; 499s r = burrrnd (l, c, k, 100000, 1); 499s lambda_c_kA = burrfit (r); 499s assert (lambda_c_kA(1), l, 0.2); 499s assert (lambda_c_kA(2), c, 0.2); 499s assert (lambda_c_kA(3), k, 0.3); 501s ***** test 501s l = 0.5; c = 1; k = 3; 501s r = burrrnd (l, c, k, 100000, 1); 501s lambda_c_kA = burrfit (r); 501s assert (lambda_c_kA(1), l, 0.2); 501s assert (lambda_c_kA(2), c, 0.2); 501s assert (lambda_c_kA(3), k, 0.3); 502s ***** test 502s l = 1; c = 3; k = 1; 502s r = burrrnd (l, c, k, 100000, 1); 502s lambda_c_kA = burrfit (r); 502s assert (lambda_c_kA(1), l, 0.2); 502s assert (lambda_c_kA(2), c, 0.2); 502s assert (lambda_c_kA(3), k, 0.3); 504s ***** test 504s l = 3; c = 2; k = 1; 504s r = burrrnd (l, c, k, 100000, 1); 504s lambda_c_kA = burrfit (r); 504s assert (lambda_c_kA(1), l, 0.2); 504s assert (lambda_c_kA(2), c, 0.2); 504s assert (lambda_c_kA(3), k, 0.3); 506s ***** test 506s l = 4; c = 2; k = 4; 506s r = burrrnd (l, c, k, 100000, 1); 506s lambda_c_kA = burrfit (r); 506s assert (lambda_c_kA(1), l, 0.2); 506s assert (lambda_c_kA(2), c, 0.2); 506s assert (lambda_c_kA(3), k, 0.3); 507s ***** error burrfit (ones (2,5)); 507s ***** error burrfit ([-1 2 3 4]); 507s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 507s ***** error burrfit ([1, 2, 3, 4, 5], 0); 507s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 507s ***** error ... 507s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 508s ***** error ... 508s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 508s ***** error 508s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 508s ***** error 508s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 508s ***** error ... 508s burrfit ([1:10], 0.05, [], [], 5) 508s 15 tests, 15 passed, 0 known failure, 0 skipped 508s [inst/dist_fit/nakafit.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/nakafit.m 508s ***** demo 508s ## Sample 3 populations from different Nakagami distributions 508s randg ("seed", 5) # for reproducibility 508s r1 = nakarnd (0.5, 1, 2000, 1); 508s randg ("seed", 2) # for reproducibility 508s r2 = nakarnd (5, 1, 2000, 1); 508s randg ("seed", 7) # for reproducibility 508s r3 = nakarnd (2, 2, 2000, 1); 508s r = [r1, r2, r3]; 508s 508s ## Plot them normalized and fix their colors 508s hist (r, [0.05:0.1:3.5], 10); 508s h = findobj (gca, "Type", "patch"); 508s set (h(1), "facecolor", "c"); 508s set (h(2), "facecolor", "g"); 508s set (h(3), "facecolor", "r"); 508s ylim ([0, 2.5]); 508s xlim ([0, 3.0]); 508s hold on 508s 508s ## Estimate their MU and LAMBDA parameters 508s mu_omegaA = nakafit (r(:,1)); 508s mu_omegaB = nakafit (r(:,2)); 508s mu_omegaC = nakafit (r(:,3)); 508s 508s ## Plot their estimated PDFs 508s x = [0.01:0.1:3.01]; 508s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 508s plot (x, y, "-pr"); 508s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 508s plot (x, y, "-sg"); 508s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 508s plot (x, y, "-^c"); 508s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 508s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 508s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 508s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 508s mu_omegaA(1), mu_omegaA(2)), ... 508s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 508s mu_omegaB(1), mu_omegaB(2)), ... 508s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 508s mu_omegaC(1), mu_omegaC(2))}) 508s title ("Three population samples from different Nakagami distributions") 508s hold off 508s ***** test 508s paramhat = nakafit ([1:50]); 508s paramhat_out = [0.7355, 858.5]; 508s assert (paramhat, paramhat_out, 1e-4); 508s ***** test 508s paramhat = nakafit ([1:5]); 508s paramhat_out = [1.1740, 11]; 508s assert (paramhat, paramhat_out, 1e-4); 508s ***** test 508s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 508s paramhat_out = [1.1740, 11]; 508s assert (paramhat, paramhat_out, 1e-4); 508s ***** test 508s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 508s paramhat_out = nakafit ([1:5, 5]); 508s assert (paramhat, paramhat_out, 1e-4); 508s ***** error nakafit (ones (2,5)); 508s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 508s ***** error nakafit ([1, 2, 3, 4, 5], 0); 508s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 508s ***** error ... 508s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 508s 15 tests, 15 passed, 0 known failure, 0 skipped 508s [inst/dist_fit/unifit.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/dist_fit/unifit.m 508s ***** demo 508s ## Sample 2 populations from different continuous uniform distributions 508s rand ("seed", 5); # for reproducibility 508s r1 = unifrnd (2, 5, 2000, 1); 508s rand ("seed", 6); # for reproducibility 508s r2 = unifrnd (3, 9, 2000, 1); 508s r = [r1, r2]; 508s 508s ## Plot them normalized and fix their colors 508s hist (r, 0:0.5:10, 2); 508s h = findobj (gca, "Type", "patch"); 508s set (h(1), "facecolor", "c"); 508s set (h(2), "facecolor", "g"); 508s hold on 508s 508s ## Estimate their probability of success 508s a_bA = unifit (r(:,1)); 508s a_bB = unifit (r(:,2)); 508s 508s ## Plot their estimated PDFs 508s x = [0:10]; 508s y = unifpdf (x, a_bA(1), a_bA(2)); 508s plot (x, y, "-pg"); 508s y = unifpdf (x, a_bB(1), a_bB(2)); 508s plot (x, y, "-sc"); 508s xlim ([1, 10]) 508s ylim ([0, 0.5]) 508s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 508s "Normalized HIST of sample 2 with a=3 and b=9", ... 508s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 508s a_bA(1), a_bA(2)), ... 508s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 508s a_bB(1), a_bB(2))}) 508s title ("Two population samples from different continuous uniform distributions") 508s hold off 508s ***** test 508s x = 0:5; 508s [paramhat, paramci] = unifit (x); 508s assert (paramhat, [0, 5]); 508s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 508s ***** test 508s x = 0:5; 508s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 508s assert (paramhat, [0, 5]); 508s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 508s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 508s ***** error unifit () 508s ***** error unifit (-1, [1 2 3 3]) 508s ***** error unifit (1, 0) 508s ***** error unifit (1, 1.2) 508s ***** error unifit (1, [0.02 0.05]) 508s ***** error ... 508s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 508s ***** error ... 508s unifit ([1.5, 0.2], [], [1, -1]) 508s ***** error ... 508s unifit ([1.5, 0.2], [], [1, 1, 1]) 508s 11 tests, 11 passed, 0 known failure, 0 skipped 508s [inst/randsample.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/randsample.m 508s ***** test 508s n = 20; 508s k = 5; 508s x = randsample(n, k); 508s assert (size(x), [1 k]); 508s x = randsample(n, k, true); 508s assert (size(x), [1 k]); 508s x = randsample(n, k, false); 508s assert (size(x), [1 k]); 508s x = randsample(n, k, true, ones(n, 1)); 508s assert (size(x), [1 k]); 508s x = randsample(1:n, k); 508s assert (size(x), [1 k]); 508s x = randsample(1:n, k, true); 508s assert (size(x), [1 k]); 508s x = randsample(1:n, k, false); 508s assert (size(x), [1 k]); 508s x = randsample(1:n, k, true, ones(n, 1)); 508s assert (size(x), [1 k]); 508s x = randsample((1:n)', k); 508s assert (size(x), [k 1]); 508s x = randsample((1:n)', k, true); 508s assert (size(x), [k 1]); 508s x = randsample((1:n)', k, false); 508s assert (size(x), [k 1]); 508s x = randsample((1:n)', k, true, ones(n, 1)); 508s assert (size(x), [k 1]); 508s n = 10; 508s k = 100; 508s x = randsample(n, k, true, 1:n); 508s assert (size(x), [1 k]); 508s x = randsample((1:n)', k, true); 508s assert (size(x), [k 1]); 508s x = randsample(k, k, false, 1:k); 508s assert (size(x), [1 k]); 508s 1 test, 1 passed, 0 known failure, 0 skipped 508s [inst/chi2test.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/chi2test.m 508s ***** error chi2test (); 508s ***** error chi2test ([1, 2, 3, 4, 5]); 508s ***** error chi2test ([1, 2; 2, 1+3i]); 508s ***** error chi2test ([NaN, 6; 34, 12]); 508s ***** error ... 508s p = chi2test (ones (3, 3), "mutual", []); 508s ***** error ... 508s p = chi2test (ones (3, 3, 3), "testtype", 2); 508s ***** error ... 508s p = chi2test (ones (3, 3, 3), "mutual"); 508s ***** error ... 508s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 508s ***** error ... 508s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 508s ***** error ... 508s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 508s ***** warning p = chi2test (ones (2)); 508s ***** warning p = chi2test (ones (3, 2)); 508s ***** warning p = chi2test (0.4 * ones (3)); 508s ***** test 508s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 508s p = chi2test (x); 508s assert (p, 0.017787, 1e-6); 508s ***** test 508s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 508s [p, chisq] = chi2test (x); 508s assert (chisq, 11.9421, 1e-4); 508s ***** test 508s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 508s [p, chisq, df] = chi2test (x); 508s assert (df, 4); 508s ***** test 508s ***** shared x 508s x(:,:,1) = [59, 32; 9,16]; 508s x(:,:,2) = [55, 24;12,33]; 508s x(:,:,3) = [107,80;17,56];%! 508s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 508s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 508s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 508s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 508s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 508s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 508s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 508s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 508s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 508s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 508s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 508s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 508s ***** test 508s [pval, chisq, df, E] = chi2test (x); 508s assert (chisq, 64.0982, 1e-4); 508s assert (df, 7); 508s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 508s ***** test 508s [pval, chisq, df, E] = chi2test (x, "joint", 2); 508s assert (chisq, 56.0943, 1e-4); 508s assert (df, 5); 508s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 508s ***** test 508s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 508s assert (chisq, 146.6058, 1e-4); 508s assert (df, 9); 508s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 508s ***** test 508s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 508s assert (chisq, 52.2509, 1e-4); 508s assert (df, 3); 508s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 508s ***** test 508s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 508s assert (chisq, 1.6034, 1e-4); 508s assert (df, 2); 508s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 508s 34 tests, 34 passed, 0 known failure, warning: matrix singular to machine precision, rcond = 3.50566e-20 508s warning: called from 508s regress at line 131 column 5 508s __test__ at line 33 column 3 508s test at line 685 column 11 508s /tmp/tmp.YdhB1UcfDH at line 3590 column 2 508s 508s 0 skipped 508s [inst/regress.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/regress.m 508s ***** test 508s % Longley data from the NIST Statistical Reference Dataset 508s Z = [ 60323 83.0 234289 2356 1590 107608 1947 508s 61122 88.5 259426 2325 1456 108632 1948 508s 60171 88.2 258054 3682 1616 109773 1949 508s 61187 89.5 284599 3351 1650 110929 1950 508s 63221 96.2 328975 2099 3099 112075 1951 508s 63639 98.1 346999 1932 3594 113270 1952 508s 64989 99.0 365385 1870 3547 115094 1953 508s 63761 100.0 363112 3578 3350 116219 1954 508s 66019 101.2 397469 2904 3048 117388 1955 508s 67857 104.6 419180 2822 2857 118734 1956 508s 68169 108.4 442769 2936 2798 120445 1957 508s 66513 110.8 444546 4681 2637 121950 1958 508s 68655 112.6 482704 3813 2552 123366 1959 508s 69564 114.2 502601 3931 2514 125368 1960 508s 69331 115.7 518173 4806 2572 127852 1961 508s 70551 116.9 554894 4007 2827 130081 1962 ]; 508s % Results certified by NIST using 500 digit arithmetic 508s % b and standard error in b 508s V = [ -3482258.63459582 890420.383607373 508s 15.0618722713733 84.9149257747669 508s -0.358191792925910E-01 0.334910077722432E-01 508s -2.02022980381683 0.488399681651699 508s -1.03322686717359 0.214274163161675 508s -0.511041056535807E-01 0.226073200069370 508s 1829.15146461355 455.478499142212 ]; 508s Rsq = 0.995479004577296; 508s F = 330.285339234588; 508s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 508s alpha = 0.05; 508s [b, bint, r, rint, stats] = regress (y, X, alpha); 508s assert(b,V(:,1),4e-6); 508s assert(stats(1),Rsq,1e-12); 508s assert(stats(2),F,3e-8); 508s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 508s 1 test, 1 passed, 0 known failure, 0 skipped 508s [inst/anovan.m] 508s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/inst/anovan.m 508s ***** demo 508s 508s # Two-sample unpaired test on independent samples (equivalent to Student's 508s # t-test). Note that the absolute value of t-statistic can be obtained by 508s # taking the square root of the reported F statistic. In this example, 508s # t = sqrt (1.44) = 1.20. 508s 508s score = [54 23 45 54 45 43 34 65 77 46 65]'; 508s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 508s "female" "female" "female"}'; 508s 508s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 508s ***** demo 508s 508s # Two-sample paired test on dependent or matched samples equivalent to a 508s # paired t-test. As for the first example, the t-statistic can be obtained by 508s # taking the square root of the reported F statistic. Note that the interaction 508s # between treatment x subject was dropped from the full model by assigning 508s # subject as a random factor ('). 508s 508s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 508s treatment = {"before" "after"; "before" "after"; "before" "after"; 508s "before" "after"; "before" "after"}'; 508s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 508s 508s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 508s "model", "full", "random", 2, "sstype", 2, ... 508s "varnames", {"treatment", "subject"}, ... 508s "display", "on"); 508s ***** demo 508s 508s # One-way ANOVA on the data from a study on the strength of structural beams, 508s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 508s 508s strength = [82 86 79 83 84 85 86 87 74 82 ... 508s 78 75 76 77 79 79 77 78 82 79]'; 508s alloy = {"st","st","st","st","st","st","st","st", ... 508s "al1","al1","al1","al1","al1","al1", ... 508s "al2","al2","al2","al2","al2","al2"}'; 508s 508s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 508s "varnames", "alloy"); 508s ***** demo 508s 508s # One-way repeated measures ANOVA on the data from a study on the number of 508s # words recalled by 10 subjects for three time conditions, in Loftus & Masson 508s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 508s # between seconds x subject was dropped from the full model by assigning 508s # subject as a random factor ('). 508s 508s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 508s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 508s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 508s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 508s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 508s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 508s 508s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 508s "model", "full", "random", 2, "sstype", 2, ... 508s "display", "on", "varnames", {"seconds", "subject"}); 508s ***** demo 508s 508s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 508s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 508s # New York: MacMillan 508s 508s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 508s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 508s brands = {"Gourmet", "National", "Generic"; ... 508s "Gourmet", "National", "Generic"; ... 508s "Gourmet", "National", "Generic"; ... 508s "Gourmet", "National", "Generic"; ... 508s "Gourmet", "National", "Generic"; ... 508s "Gourmet", "National", "Generic"}; 508s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 508s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 508s 508s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 508s "display", "on", "model", "full", ... 508s "varnames", {"brands", "popper"}); 508s ***** demo 508s 508s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 508s # gender and having a college degree on salaries of company employees, 508s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 508s 508s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 508s 25 29 27 19 18 21 20 21 22 19]'; 508s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 508s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 508s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 508s 508s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 508s "sstype", 3, "display", "on", "varnames", ... 508s {"gender", "degree"}); 508s ***** demo 508s 508s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 508s # adding sugar and/or milk on the tendency of coffee to make people babble, 508s # in from Navarro (2019): 16.10 508s 508s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 508s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 508s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 508s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 508s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 508s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 508s 508s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 508s "sstype", 3, "display", "on", ... 508s "varnames", {"sugar", "milk"}); 508s ***** demo 508s 508s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 508s # of three different drugs, biofeedback and diet on patient blood pressure, 508s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 508s # * Missing values introduced to make the sample sizes unequal to test the 508s # calculation of different types of sums-of-squares 508s 508s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 508s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 508s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 508s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 508s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 508s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 508s 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; 508s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 508s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 508s 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; 508s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 508s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 508s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 508s 173 194 197 190 176 198 164 190 169 164 176 175; 508s 186 194 201 215 219 209 164 166 159 182 187 174 ... 508s 189 194 217 206 199 195 171 173 196 199 180 NaN; 508s 180 187 199 170 204 194 162 184 183 156 180 173 ... 508s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 508s 508s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 508s "model", "full", "sstype", 3, ... 508s "display", "on", ... 508s "varnames", {"drug", "feedback", "diet"}); 508s ***** demo 508s 508s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 508s # factor. The data is from a randomized block design study on the effects 508s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 508s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 508s # Note that all interactions involving block were dropped from the full model 508s # by assigning block as a random factor ('). 508s 508s measurement = [444 614 423 625 408 856 447 719 ... 508s 764 831 586 782 609 1002 606 766]'; 508s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 508s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 508s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 508s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 508s 508s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 508s "sstype", 2, "model", "full", "random", 3, ... 508s "display", "on", ... 508s "varnames", {"strain", "treatment", "block"}); 508s ***** demo 508s 508s # One-way ANCOVA on data from a study of the additive effects of species 508s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 508s # Text eveR 508s 508s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 508s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 508s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 508s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 508s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 508s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 508s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 508s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 508s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 508s 508s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 508s "continuous", 2, "sstype", "h", "display", "on", ... 508s "varnames", {"species", "temp"}); 508s ***** demo 508s 508s # Factorial ANCOVA on data from a study of the effects of treatment and 508s # exercise on stress reduction score after adjusting for age. Data from R 508s # datarium package). 508s 508s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 508s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 508s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 508s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 508s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 508s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 508s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 508s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 508s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 508s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 508s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 508s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 508s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 508s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 508s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 508s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 508s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 508s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 508s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 508s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 508s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 508s 508s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 508s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 508s "continuous", 3, "sstype", "h", "display", "on", ... 508s "varnames", {"treatment", "exercise", "age"}); 508s ***** demo 508s 508s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 508s # relating to the contrasts are shown in the table of model parameters, and 508s # can be retrieved from the STATS.coeffs output. 508s 508s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 508s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 508s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 508s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 508s 25.694 ]'; 508s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 508s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 508s C = [ 0.4001601 0.3333333 0.5 0.0 508s 0.4001601 0.3333333 -0.5 0.0 508s 0.4001601 -0.6666667 0.0 0.0 508s -0.6002401 0.0000000 0.0 0.5 508s -0.6002401 0.0000000 0.0 -0.5]; 508s 508s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 508s "alpha", 0.05, "display", "on"); 508s ***** demo 508s 508s # One-way ANOVA with the linear model fit by weighted least squares to 508s # account for heteroskedasticity. In this example, the variance appears 508s # proportional to the outcome, so weights have been estimated by initially 508s # fitting the model without weights and regressing the absolute residuals on 508s # the fitted values. Although this data could have been analysed by Welch's 508s # ANOVA test, the approach here can generalize to ANOVA models with more than 508s # one factor. 508s 508s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 508s 2, 2, 2, 2, 2, 2, 2, 2, ... 508s 3, 3, 3, 3, 3, 3, 3, 3]'; 508s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 508s 10, 25, 66, 43, 47, 56, 6, 39, ... 508s 11, 39, 26, 35, 25, 14, 24, 17]'; 508s 508s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 508s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 508s b = polyfit (fitted, abs (STATS.resid), 1); 508s v = polyval (b, fitted); # Variance as a function of the fitted values 508s figure("Name", "Regression of the absolute residuals on the fitted values"); 508s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 508s xlabel("Fitted values"); ylabel("Absolute residuals"); 508s 508s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 508s ***** test 508s score = [54 23 45 54 45 43 34 65 77 46 65]'; 508s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 508s 'female' 'female' 'female'}'; 508s 508s [P, T, STATS] = anovan (score,gender,'display','off'); 508s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 508s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 508s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 508s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 508s ***** test 508s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 508s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 508s 'before' 'after'; 'before' 'after'}'; 508s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 508s 508s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 508s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 508s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 508s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 508s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 508s ***** test 508s strength = [82 86 79 83 84 85 86 87 74 82 ... 508s 78 75 76 77 79 79 77 78 82 79]'; 508s alloy = {'st','st','st','st','st','st','st','st', ... 508s 'al1','al1','al1','al1','al1','al1', ... 508s 'al2','al2','al2','al2','al2','al2'}'; 508s 508s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 508s assert (P(1), 0.000152643638830491, 1e-09); 508s assert (ATAB{2,6}, 15.4, 1e-09); 508s ***** test 508s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 508s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 508s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 508s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 508s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 508s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 508s 508s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 508s assert (P(1), 1.51865926758752e-07, 1e-09); 508s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 508s assert (ATAB{3,2}, 942.533333333333, 1e-09); 508s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 508s ***** test 508s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 508s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 508s brands = {'Gourmet', 'National', 'Generic'; ... 508s 'Gourmet', 'National', 'Generic'; ... 508s 'Gourmet', 'National', 'Generic'; ... 508s 'Gourmet', 'National', 'Generic'; ... 508s 'Gourmet', 'National', 'Generic'; ... 508s 'Gourmet', 'National', 'Generic'}; 508s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 508s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 508s 508s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 508s assert (P(1), 7.67895738278171e-07, 1e-09); 508s assert (P(2), 0.000100373896304998, 1e-09); 508s assert (P(3), 0.746215396636649, 1e-09); 508s assert (ATAB{2,6}, 56.7, 1e-09); 508s assert (ATAB{3,6}, 32.4, 1e-09); 508s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 508s ***** test 508s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 508s 25 29 27 19 18 21 20 21 22 19]'; 508s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 508s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 508s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 508s 508s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 508s assert (P(1), 0.747462549227232, 1e-09); 508s assert (P(2), 1.03809316857694e-08, 1e-09); 508s assert (P(3), 0.523689833702691, 1e-09); 508s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 508s assert (ATAB{3,2}, 272.391841491841, 1e-09); 508s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 508s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 508s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 508s assert (P(1), 2.53445097305047e-08, 1e-09); 508s assert (P(2), 0.00388133678528749, 1e-09); 508s assert (P(3), 0.523689833702671, 1e-09); 508s assert (ATAB{2,2}, 242.227272727273, 1e-09); 508s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 508s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 508s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 508s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 508s assert (P(1), 0.00388133678528743, 1e-09); 508s assert (P(2), 1.03809316857694e-08, 1e-09); 508s assert (P(3), 0.523689833702691, 1e-09); 508s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 508s assert (ATAB{3,2}, 272.391841491841, 1e-09); 508s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 508s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 508s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 508s assert (P(1), 0.00442898146583742, 1e-09); 508s assert (P(2), 1.30634252053587e-08, 1e-09); 508s assert (P(3), 0.523689833702691, 1e-09); 508s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 508s assert (ATAB{3,2}, 264.335664335664, 1e-09); 508s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 508s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 508s ***** test 508s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 508s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 508s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 508s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 508s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 508s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 508s 508s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 508s assert (P(1), 0.0108632139833963, 1e-09); 508s assert (P(2), 0.0810606976703546, 1e-09); 508s assert (P(3), 0.00175433329935627, 1e-09); 508s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 508s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 508s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 508s assert (ATAB{5,2}, 3.1625, 1e-09); 508s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 508s assert (P(1), 0.0373333189297505, 1e-09); 508s assert (P(2), 0.017075098787169, 1e-09); 508s assert (P(3), 0.00175433329935627, 1e-09); 508s assert (ATAB{2,2}, 1.444, 1e-09); 508s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 508s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 508s assert (ATAB{5,2}, 3.1625, 1e-09); 508s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 508s assert (P(1), 0.017075098787169, 1e-09); 508s assert (P(2), 0.0810606976703546, 1e-09); 508s assert (P(3), 0.00175433329935627, 1e-09); 508s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 508s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 508s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 508s assert (ATAB{5,2}, 3.1625, 1e-09); 508s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 508s assert (P(1), 0.0454263063473954, 1e-09); 508s assert (P(2), 0.0746719907091438, 1e-09); 508s assert (P(3), 0.00175433329935627, 1e-09); 508s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 508s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 508s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 508s assert (ATAB{5,2}, 3.1625, 1e-09); 508s ***** test 508s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 508s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 508s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 508s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 508s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 508s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 508s 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; 508s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 508s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 508s 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; 508s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 508s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 508s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 508s 173 194 197 190 176 198 164 190 169 164 176 175; 508s 186 194 201 215 219 209 164 166 159 182 187 174 ... 508s 189 194 217 206 199 195 171 173 196 199 180 NaN; 508s 180 187 199 170 204 194 162 184 183 156 180 173 ... 508s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 508s 508s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 508s assert (P(1), 7.02561843825325e-05, 1e-09); 508s assert (P(2), 0.000425806013389362, 1e-09); 508s assert (P(3), 6.16780773446401e-07, 1e-09); 508s assert (P(4), 0.261347622678438, 1e-09); 508s assert (P(5), 0.0542278432357043, 1e-09); 508s assert (P(6), 0.590353225626655, 1e-09); 508s assert (P(7), 0.0861628249564267, 1e-09); 508s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 508s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 508s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 508s assert (ATAB{5,2}, 437.066007908781, 1e-09); 508s assert (ATAB{6,2}, 976.180770397332, 1e-09); 508s assert (ATAB{7,2}, 46.616653365254, 1e-09); 508s assert (ATAB{8,2}, 814.345251396648, 1e-09); 508s assert (ATAB{9,2}, 9065.8, 1e-09); 508s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 508s assert (P(1), 9.4879638470754e-05, 1e-09); 508s assert (P(2), 0.00124177666315809, 1e-09); 508s assert (P(3), 6.86162012732911e-07, 1e-09); 508s assert (P(4), 0.260856132341256, 1e-09); 508s assert (P(5), 0.0523758623892078, 1e-09); 508s assert (P(6), 0.590353225626655, 1e-09); 508s assert (P(7), 0.0861628249564267, 1e-09); 508s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 508s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 508s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 508s assert (ATAB{5,2}, 437.693674777847, 1e-09); 508s assert (ATAB{6,2}, 988.431929811402, 1e-09); 508s assert (ATAB{7,2}, 46.616653365254, 1e-09); 508s assert (ATAB{8,2}, 814.345251396648, 1e-09); 508s assert (ATAB{9,2}, 9065.8, 1e-09); 508s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 508s assert (P(1), 0.000106518678028207, 1e-09); 508s assert (P(2), 0.00125371366571508, 1e-09); 508s assert (P(3), 5.30813260778464e-07, 1e-09); 508s assert (P(4), 0.308353667232981, 1e-09); 508s assert (P(5), 0.0562901327343161, 1e-09); 508s assert (P(6), 0.599091042141092, 1e-09); 508s assert (P(7), 0.0861628249564267, 1e-09); 508s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 508s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 508s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 508s assert (ATAB{5,2}, 382.07709497207, 1e-09); 508s assert (ATAB{6,2}, 963.037988826813, 1e-09); 508s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 508s assert (ATAB{8,2}, 814.345251396648, 1e-09); 508s assert (ATAB{9,2}, 9065.8, 1e-09); 508s ***** test 508s measurement = [444 614 423 625 408 856 447 719 ... 508s 764 831 586 782 609 1002 606 766]'; 508s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 508s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 508s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 508s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 508s 508s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 508s assert (P(1), 0.0914352969909372, 1e-09); 508s assert (P(2), 5.04077373924908e-05, 1e-09); 508s assert (P(4), 0.0283196918836667, 1e-09); 508s assert (ATAB{2,2}, 286.132500000002, 1e-09); 508s assert (ATAB{3,2}, 2275.29, 1e-09); 508s assert (ATAB{4,2}, 1242.5625, 1e-09); 508s assert (ATAB{5,2}, 495.905000000001, 1e-09); 508s assert (ATAB{6,2}, 207.007499999999, 1e-09); 509s ***** test 509s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 509s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 509s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 509s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 509s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 509s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 509s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 509s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 509s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 509s 509s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 509s assert (P(1), 6.27153318786007e-14, 1e-09); 509s assert (P(2), 2.48773241196644e-25, 1e-09); 509s assert (ATAB{2,2}, 598.003953318404, 1e-09); 509s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 509s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 509s assert (ATAB{2,6}, 187.399388123951, 1e-09); 509s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 509s ***** test 509s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 509s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 509s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 509s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 509s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 509s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 509s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 509s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 509s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 509s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 509s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 509s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 509s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 509s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 509s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 509s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 509s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 509s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 509s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 509s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 509s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 509s 509s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 509s assert (P(5), 0.9245630968248468, 1e-09); 509s assert (P(6), 0.791115159521822, 1e-09); 509s assert (P(7), 0.9296668751457956, 1e-09); 509s [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'); 509s assert (P(1), 0.00158132928938933, 1e-09); 509s assert (P(2), 2.12537505039986e-07, 1e-09); 509s assert (P(3), 0.00390292555160047, 1e-09); 509s assert (P(4), 0.0164086580775543, 1e-09); 509s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 509s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 509s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 509s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 509s ***** test 509s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 509s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 509s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 509s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 509s 25.694 ]'; 509s 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]'; 509s C = [ 0.4001601 0.3333333 0.5 0.0 509s 0.4001601 0.3333333 -0.5 0.0 509s 0.4001601 -0.6666667 0.0 0.0 509s -0.6002401 0.0000000 0.0 0.5 509s -0.6002401 0.0000000 0.0 -0.5]; 509s 509s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 509s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 509s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 509s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 509s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 509s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 509s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 509s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 509s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 509s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 509s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 509s assert (STATS.coeffs(1,5), 40.161, 1e-03); 509s assert (STATS.coeffs(2,5), -9.624, 1e-03); 509s assert (STATS.coeffs(3,5), -3.825, 1e-03); 509s assert (STATS.coeffs(4,5), -4.875, 1e-03); 509s assert (STATS.coeffs(5,5), -5.515, 1e-03); 509s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 509s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 509s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 509s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 509s 12 tests, 12 passed, 0 known failure, 0 skipped 509s Checking C++ files ... 509s [src/fcnnpredict.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/fcnnpredict.cc 509s ***** shared X, Y, MODEL 509s load fisheriris 509s X = meas; 509s Y = grp2idx (species); 509s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 509s ***** test 509s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 509s assert (numel (Y_pred), numel (Y)); 509s assert (isequal (size (Y_pred), size (Y)), true); 509s assert (columns (Y_scores), numel (unique (Y))); 509s assert (rows (Y_scores), numel (Y)); 509s ***** error ... 509s fcnnpredict (MODEL); 509s ***** error ... 509s [Q, W, E] = fcnnpredict (MODEL, X); 509s ***** error ... 509s fcnnpredict (1, X); 509s ***** error ... 509s fcnnpredict (struct ("L", {1, 2, 3}), X); 509s ***** error ... 509s fcnnpredict (struct ("L", 1), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", 1), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {1}), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 509s "Activations", [2]), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 509s "Activations", [2; 2]), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 509s "Activations", {{2, 2}}), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 509s "Activations", {{"sigmoid", "softmax"}}), X); 509s ***** error ... 509s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 509s "Activations", "sigmoid"), X); 509s ***** error ... 509s fcnnpredict (MODEL, complex (X)); 509s ***** error ... 509s fcnnpredict (MODEL, {1, 2, 3, 4}); 509s ***** error ... 509s fcnnpredict (MODEL, "asd"); 509s ***** error ... 509s fcnnpredict (MODEL, []); 509s ***** error ... 509s fcnnpredict (MODEL, X(:,[1:3])); 509s 20 tests, 20 passed, 0 known failure, 0 skipped 509s [src/svmpredict.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/svmpredict.cc 509s ***** test 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s model = svmtrain (L, D, '-c 1 -g 0.07'); 509s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 509s assert (size (predict_label), size (dec_values)); 509s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 509s assert (dec_values(1), 1.225836001973273, 1e-14); 509s assert (dec_values(2), -0.3212992933043805, 1e-14); 509s assert (predict_label(1), 1); 509s ***** shared L, D, model 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s model = svmtrain (L, D, '-c 1 -g 0.07'); 509s ***** error ... 509s [p, a] = svmpredict (L, D, model); 509s ***** error p = svmpredict (L, D); 509s ***** error ... 509s p = svmpredict (single (L), D, model); 509s ***** error p = svmpredict (L, D, 123); 509s 5 tests, 5 passed, 0 known failure, 0 skipped 509s [src/libsvmwrite.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/libsvmwrite.cc 509s ***** shared L, D 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s ***** error libsvmwrite ("", L, D); 509s ***** error ... 509s libsvmwrite (tempname (), [L;L], D); 509s ***** error ... 509s OUT = libsvmwrite (tempname (), L, D); 509s ***** error ... 509s libsvmwrite (tempname (), single (L), D); 509s ***** error libsvmwrite (13412, L, D); 509s ***** error ... 509s libsvmwrite (tempname (), L, full (D)); 509s ***** error ... 509s libsvmwrite (tempname (), L, D, D); 509s 7 tests, 7 passed, 0 known failure, 0 skipped 509s [src/fcnntrain.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/fcnntrain.cc 509s ***** shared X, Y, MODEL 509s load fisheriris 509s X = meas; 509s Y = grp2idx (species); 509s ***** error ... 509s model = fcnntrain (X, Y); 509s ***** error ... 509s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 509s ***** error ... 509s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 509s 33 tests, 33 passed, 0 known failure, 0 skipped 509s [src/editDistance.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/editDistance.cc 509s ***** error d = editDistance (1, 2, 3, 4); 509s ***** error ... 509s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 509s ***** error ... 509s [C, IA] = editDistance ({"AS","SD","AD"}); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, [1, 2]); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, -2); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, 1.25); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 509s ***** error ... 509s d = editDistance ("string1", "string2", [1, 2]); 509s ***** error ... 509s d = editDistance ("string1", "string2", -2); 509s ***** error ... 509s d = editDistance ("string1", "string2", 1.25); 509s ***** error ... 509s d = editDistance ({{"string1", "string2"}, 2}); 509s ***** error ... 509s d = editDistance ({{"string1", "string2"}, 2}, 2); 509s ***** error ... 509s d = editDistance ([1, 2, 3]); 509s ***** error ... 509s d = editDistance (["AS","SD","AD","AS"]); 509s ***** error ... 509s d = editDistance (["AS","SD","AD"], 2); 509s ***** error ... 509s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 509s ***** error ... 509s d = editDistance ([1,2,3], {"AS","AS","AD"}); 509s ***** error ... 509s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 509s ***** error ... 509s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 509s ***** test 509s d = editDistance ({"AS","SD","AD"}); 509s assert (d, [2; 1; 1]); 509s assert (class (d), "double"); 509s ***** test 509s C = editDistance ({"AS","SD","AD"}, 1); 509s assert (iscellstr (C), true); 509s assert (C, {"AS";"SD"}); 509s ***** test 509s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 509s assert (class (IA), "double"); 509s assert (IA, [1;2]); 509s ***** test 509s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 509s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 509s assert (class (IA), "double"); 509s assert (A(IA), C); 509s ***** test 509s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 509s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 509s assert (class (IA), "cell"); 509s assert (C, {"ASS"; "FDE"; "OPA"}); 509s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 509s assert (A(IA{2}), {"FDE"; "EDS"}); 509s assert (A(IA{3}), {"OPA"}); 509s ***** test 509s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 509s [C, IA, IC] = editDistance (A, 2); 509s assert (class (IA), "double"); 509s assert (A(IA), C); 509s assert (IC, [1; 1; 3; 1; 5]); 509s ***** test 509s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 509s assert (d, [0; 1; 2]); 509s assert (class (d), "double"); 509s ***** test 509s d = editDistance ({"AS","SD","AD"}, {"AS"}); 509s assert (d, [0; 2; 1]); 509s assert (class (d), "double"); 509s ***** test 509s d = editDistance ({"AS"}, {"AS","SD","AD"}); 509s assert (d, [0; 2; 1]); 509s assert (class (d), "double"); 509s ***** test 509s b = editDistance ("Octave", "octave"); 509s assert (b, 1); 509s assert (class (b), "double"); 509s 33 tests, 33 passed, 0 known failure, 0 skipped 509s [src/svmtrain.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/svmtrain.cc 509s ***** test 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s model = svmtrain(L, D, '-c 1 -g 0.07'); 509s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 509s assert (isstruct (model), true); 509s assert (isfield (model, "Parameters"), true); 509s assert (model.totalSV, 130); 509s assert (model.nr_class, 2); 509s assert (size (model.Label), [2, 1]); 509s ***** shared L, D 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s ***** error [L, D] = svmtrain (L, D); 509s ***** error ... 509s model = svmtrain (single (L), D); 509s ***** error ... 509s model = svmtrain (L, D, "", ""); 509s 4 tests, 4 passed, 0 known failure, 0 skipped 509s [src/libsvmread.cc] 509s >>>>> /tmp/autopkgtest.NoTi52/build.da7/src/src/libsvmread.cc 509s ***** error [L, D] = libsvmread (24); 509s ***** error ... 509s D = libsvmread ("filename"); 509s ***** test 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s assert (size (L), [270, 1]); 509s assert (size (D), [270, 13]); 509s ***** test 509s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 509s assert (issparse (L), false); 509s assert (issparse (D), true); 509s 4 tests, 4 passed, 0 known failure, 0 skipped 510s Done running the unit tests. 510s Summary: 11023 tests, 11021 passed, 1 known failures, 1 skipped 510s autopkgtest [04:50:58]: test command1: -----------------------] 512s autopkgtest [04:51:00]: test command1: - - - - - - - - - - results - - - - - - - - - - 512s command1 PASS 513s autopkgtest [04:51:01]: @@@@@@@@@@@@@@@@@@@@ summary 513s command1 PASS