0s autopkgtest [08:48:47]: starting date and time: 2026-02-05 08:48:47+0000 0s autopkgtest [08:48:47]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [08:48:47]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.yfg6aan5/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.42-2ubuntu5 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-ppc64el-5.secgroup --name adt-resolute-ppc64el-octave-statistics-20260205-084846-juju-7f2275-prod-proposed-migration-environment-2-1998f123-f730-45cb-911e-45af89193c05 --image adt/ubuntu-resolute-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-ppc64el -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 7s Creating nova instance adt-resolute-ppc64el-octave-statistics-20260205-084846-juju-7f2275-prod-proposed-migration-environment-2-1998f123-f730-45cb-911e-45af89193c05 from image adt/ubuntu-resolute-ppc64el-server-20260205.img (UUID f866c950-0b62-4023-bac6-0f13279e15ed)... 70s autopkgtest [08:49:57]: testbed dpkg architecture: ppc64el 71s autopkgtest [08:49:58]: testbed apt version: 3.1.14 71s autopkgtest [08:49:58]: @@@@@@@@@@@@@@@@@@@@ test bed setup 71s autopkgtest [08:49:58]: testbed release detected to be: None 72s autopkgtest [08:49:59]: updating testbed package index (apt update) 72s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 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 73s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [35.4 kB] 73s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5260 B] 73s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [228 kB] 73s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1719 kB] 73s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el Packages [261 kB] 73s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el Packages [1514 kB] 73s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse ppc64el Packages [21.9 kB] 73s Fetched 3910 kB in 1s (3599 kB/s) 74s Reading package lists... 75s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 75s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 75s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 75s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 76s Reading package lists... 76s Reading package lists... 76s Building dependency tree... 76s Reading state information... 76s Calculating upgrade... 76s The following packages will be upgraded: 76s libc-bin libc-gconv-modules-extra libc6 locales pollinate 76s python3-referencing sed 76s 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 76s Need to get 8612 kB of archives. 76s After this operation, 0 B of additional disk space will be used. 76s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el sed ppc64el 4.9-2build3 [211 kB] 77s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libc-gconv-modules-extra ppc64el 2.42-2ubuntu5 [1448 kB] 78s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libc6 ppc64el 2.42-2ubuntu5 [1913 kB] 80s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libc-bin ppc64el 2.42-2ubuntu5 [748 kB] 81s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el locales all 2.42-2ubuntu5 [4255 kB] 86s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el pollinate all 4.33-4ubuntu5 [14.0 kB] 86s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-referencing all 0.36.2-1ubuntu2 [22.2 kB] 86s dpkg-preconfigure: unable to re-open stdin: No such file or directory 86s Fetched 8612 kB in 9s (945 kB/s) 86s (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 ... 82008 files and directories currently installed.) 86s Preparing to unpack .../sed_4.9-2build3_ppc64el.deb ... 86s Unpacking sed (4.9-2build3) over (4.9-2build2) ... 86s Setting up sed (4.9-2build3) ... 87s (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 ... 82008 files and directories currently installed.) 87s Preparing to unpack .../libc-gconv-modules-extra_2.42-2ubuntu5_ppc64el.deb ... 87s Unpacking libc-gconv-modules-extra:ppc64el (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 87s Setting up libc-gconv-modules-extra:ppc64el (2.42-2ubuntu5) ... 87s (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 ... 82008 files and directories currently installed.) 87s Preparing to unpack .../libc6_2.42-2ubuntu5_ppc64el.deb ... 87s Unpacking libc6:ppc64el (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 88s Setting up libc6:ppc64el (2.42-2ubuntu5) ... 88s (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 ... 82008 files and directories currently installed.) 88s Preparing to unpack .../libc-bin_2.42-2ubuntu5_ppc64el.deb ... 88s Unpacking libc-bin (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 88s Setting up libc-bin (2.42-2ubuntu5) ... 88s (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 ... 82008 files and directories currently installed.) 88s Preparing to unpack .../locales_2.42-2ubuntu5_all.deb ... 89s Unpacking locales (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 89s Preparing to unpack .../pollinate_4.33-4ubuntu5_all.deb ... 89s Unpacking pollinate (4.33-4ubuntu5) over (4.33-4ubuntu4) ... 89s Preparing to unpack .../python3-referencing_0.36.2-1ubuntu2_all.deb ... 90s Unpacking python3-referencing (0.36.2-1ubuntu2) over (0.36.2-1ubuntu1) ... 90s Setting up locales (2.42-2ubuntu5) ... 90s Generating locales (this might take a while)... 91s en_US.UTF-8... done 91s Generation complete. 91s Setting up pollinate (4.33-4ubuntu5) ... 102s Setting up python3-referencing (0.36.2-1ubuntu2) ... 102s Processing triggers for man-db (2.13.1-1) ... 104s Processing triggers for install-info (7.2-5) ... 104s Processing triggers for systemd (259-1ubuntu3) ... 105s autopkgtest [08:50:32]: upgrading testbed (apt dist-upgrade and autopurge) 105s Reading package lists... 105s Building dependency tree... 105s Reading state information... 106s Calculating upgrade... 106s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 106s Reading package lists... 106s Building dependency tree... 106s Reading state information... 106s Solving dependencies... 106s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 107s autopkgtest [08:50:34]: rebooting testbed after setup commands that affected boot 153s autopkgtest [08:51:20]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:45:54 UTC 2026 156s autopkgtest [08:51:23]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 159s Get:1 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (dsc) [2289 B] 159s Get:2 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (tar) [1424 kB] 159s Get:3 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (diff) [10.3 kB] 160s gpgv: Signature made Mon Oct 27 09:10:08 2025 UTC 160s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 160s gpgv: Can't check signature: No public key 160s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.6-2.dsc: no acceptable signature found 160s autopkgtest [08:51:27]: testing package octave-statistics version 1.7.6-2 161s autopkgtest [08:51:28]: build not needed 170s autopkgtest [08:51:37]: test command1: preparing testbed 170s Reading package lists... 170s Building dependency tree... 170s Reading state information... 170s Solving dependencies... 171s The following NEW packages will be installed: 171s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 171s cpp-15 cpp-15-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper 171s debugedit dh-autoreconf dh-octave dh-octave-autopkgtest 171s dh-strip-nondeterminism diffstat dwz fontconfig fontconfig-config 171s fonts-freefont-otf g++ g++-15 g++-15-powerpc64le-linux-gnu 171s g++-powerpc64le-linux-gnu gcc gcc-15 gcc-15-powerpc64le-linux-gnu 171s gcc-powerpc64le-linux-gnu gettext gfortran gfortran-15 171s gfortran-15-powerpc64le-linux-gnu gfortran-powerpc64le-linux-gnu 171s gnuplot-data gnuplot-nox hdf5-helpers intltool-debian krb5-multidev 171s libaec-dev libaec0 libalgorithm-c3-perl libaliased-perl libamd3 libaom3 171s libapp-cmd-perl libappstream5 libapt-pkg-perl libarchive-zip-perl 171s libarpack2t64 libarray-intspan-perl libasan8 libasound2-data libasound2t64 171s libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 171s libb-hooks-endofscope-perl libb-hooks-op-check-perl libb-keywords-perl 171s libb2-1 libberkeleydb-perl libblas-dev libblas3 libboolean-perl 171s libbrotli-dev libc-dev-bin libc6-dev libcairo2 libcamd3 libcapture-tiny-perl 171s libcarp-assert-more-perl libcc1-0 libccolamd3 libcgi-pm-perl libcholmod5 171s libclass-c3-perl libclass-data-inheritable-perl libclass-inspector-perl 171s libclass-load-perl libclass-method-modifiers-perl libclass-tiny-perl 171s libclass-xsaccessor-perl libclone-choose-perl libclone-perl libcolamd3 171s libconfig-inifiles-perl libconfig-model-backend-yaml-perl 171s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 171s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl 171s libcrypt-dev libcups2t64 libcurl4-openssl-dev libcxsparse4 171s libdata-dpath-perl libdata-messagepack-perl libdata-optlist-perl 171s libdata-section-perl libdata-validate-domain-perl libdata-validate-ip-perl 171s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 171s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 171s libdevel-stacktrace-perl libdouble-conversion3 libduktape207 171s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 171s libencode-locale-perl liberror-perl libevent-2.1-7t64 171s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 171s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 171s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 171s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 171s libfile-which-perl libflac14 libfltk-gl1.3t64 libfltk1.3t64 libfont-ttf-perl 171s libfontconfig1 libfontenc1 libfyaml0 libgbm1 libgcc-15-dev libgd3 171s libgetopt-long-descriptive-perl libgfortran-15-dev libgfortran5 libgl-dev 171s libgl1 libgl1-mesa-dri libgl2ps1.4 libglpk40 libglu1-mesa libglvnd0 171s libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl libgnutls-dane0t64 171s libgnutls-openssl27t64 libgnutls28-dev libgomp1 171s libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 libgraphite2-3 171s libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 libhdf5-cpp-310 171s libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 171s libhdf5-hl-fortran-310 libheif-plugin-aomdec libheif-plugin-libde265 171s libheif1 libhtml-form-perl libhtml-html5-entities-perl libhtml-parser-perl 171s libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl 171s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 171s libhttp-negotiate-perl libhwy1t64 libice6 libidn2-dev libimagequant0 171s libimport-into-perl libindirect-perl libinput-bin libinput10 libintl-perl 171s libio-html-perl libio-interactive-perl libio-socket-ssl-perl 171s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 171s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 171s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 171s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 171s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 171s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 171s liblingua-en-inflect-perl liblist-compare-perl liblist-moreutils-perl 171s liblist-moreutils-xs-perl liblist-someutils-perl liblist-utilsby-perl 171s liblog-any-adapter-screen-perl liblog-any-perl liblog-log4perl-perl liblsan0 171s libltdl7 liblua5.4-0 liblwp-mediatypes-perl liblwp-protocol-https-perl 171s libmailtools-perl libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 171s libmodule-implementation-perl libmodule-pluggable-perl 171s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 171s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 171s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 171s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 171s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 171s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 171s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 171s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 171s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 171s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 171s libpath-iterator-rule-perl libpath-tiny-perl libpcre2-16-0 171s libperl-critic-perl libperlio-gzip-perl libperlio-utf8-strict-perl 171s libpixman-1-0 libpkgconf3 libpod-constants-perl libpod-parser-perl 171s libpod-pom-perl libpod-spell-perl libportaudio2 libppi-perl 171s libppix-quotelike-perl libppix-regexp-perl libppix-utils-perl 171s libproc-processtable-perl libproxy1v5 libpsl-dev libpulse0 libqhull-r8.0 171s libqrupdate1 libqscintilla2-qt6-15 libqscintilla2-qt6-l10n 171s libqt6core5compat6 libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 171s libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 171s libqt6sql6 libqt6widgets6 libqt6xml6 libquadmath0 libreadline-dev 171s libreadonly-perl libregexp-common-perl libregexp-pattern-license-perl 171s libregexp-pattern-perl libregexp-wildcards-perl librole-tiny-perl 171s librtmp-dev libsafe-isa-perl libsamplerate0 libsereal-decoder-perl 171s libsereal-encoder-perl libset-intspan-perl libsharpyuv0 libsm6 libsndfile1 171s libsoftware-copyright-perl libsoftware-license-perl 171s libsoftware-licensemoreutils-perl libsort-versions-perl libspqr4 171s libssh2-1-dev libssl-dev libstdc++-15-dev libstemmer0d libstrictures-perl 171s libstring-copyright-perl libstring-escape-perl libstring-format-perl 171s libstring-license-perl libstring-rewriteprefix-perl libsub-exporter-perl 171s libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl 171s libsub-name-perl libsub-quote-perl libsub-uplevel-perl libsuitesparseconfig7 171s libsyntax-keyword-try-perl libsz2 libtask-weaken-perl libtasn1-6-dev 171s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 171s libtext-glob-perl libtext-levenshtein-damerau-perl 171s libtext-levenshteinxs-perl libtext-markdown-discount-perl 171s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 171s libtext-wrapper-perl libtext-xslate-perl libthai-data libthai0 libtiff6 171s libtime-duration-perl libtime-moment-perl libtimedate-perl libtoml-tiny-perl 171s libtool libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 171s libunbound8 libunicode-utf8-perl libunwind8 liburi-perl 171s libvariable-magic-perl libvorbis0a libvorbisenc2 libvulkan1 libwacom-common 171s libwacom9 libwayland-client0 libwebp7 libwebpmux3 libwmflite-0.2-7 171s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 171s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 171s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 171s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 171s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 171s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 171s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 171s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 171s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 171s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 171s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 171s licensecheck lintian linux-libc-dev lzip lzop m4 mesa-libgallium nettle-dev 171s octave octave-common octave-dev octave-io octave-statistics 171s octave-statistics-common patchutils perl-openssl-defaults perltidy pkgconf 171s pkgconf-bin po-debconf rpcsvc-proto t1utils tex-common texinfo texinfo-lib 171s unzip x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools 171s xserver-common xtrans-dev xvfb zlib1g-dev 171s 0 upgraded, 495 newly installed, 0 to remove and 0 not upgraded. 171s Need to get 212 MB of archives. 171s After this operation, 796 MB of additional disk space will be used. 171s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfyaml0 ppc64el 0.9.3-1 [282 kB] 171s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstemmer0d ppc64el 3.0.1-1 [179 kB] 171s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el libappstream5 ppc64el 1.1.1-1 [275 kB] 171s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el appstream ppc64el 1.1.1-1 [77.9 kB] 171s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el m4 ppc64el 1.4.20-2 [236 kB] 171s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el autoconf all 2.72-3.1ubuntu1 [384 kB] 171s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el autotools-dev all 20240727.1 [43.4 kB] 171s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el automake all 1:1.18.1-3build1 [582 kB] 171s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el autopoint all 0.23.2-1 [620 kB] 171s Get:10 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcapture-tiny-perl all 0.50-1 [20.7 kB] 171s Get:11 http://ftpmaster.internal/ubuntu resolute/main ppc64el libparams-util-perl ppc64el 1.102-3build1 [21.3 kB] 171s Get:12 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-install-perl all 0.929-1 [9764 B] 171s Get:13 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-optlist-perl all 0.114-1 [9708 B] 171s Get:14 http://ftpmaster.internal/ubuntu resolute/main ppc64el libb-hooks-op-check-perl ppc64el 0.22-3build2 [9884 B] 171s Get:15 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdynaloader-functions-perl all 0.004-2 [11.5 kB] 171s Get:16 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdevel-callchecker-perl ppc64el 0.009-2 [14.1 kB] 171s Get:17 http://ftpmaster.internal/ubuntu resolute/main ppc64el libparams-classify-perl ppc64el 0.015-2build6 [22.2 kB] 171s Get:18 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmodule-runtime-perl all 0.018-1 [15.2 kB] 171s Get:19 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtry-tiny-perl all 0.32-1 [21.2 kB] 171s Get:20 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmodule-implementation-perl all 0.09-2 [12.0 kB] 171s Get:21 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpackage-stash-perl all 0.40-1 [19.5 kB] 171s Get:22 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libclass-load-perl all 0.25-2 [12.7 kB] 171s Get:23 http://ftpmaster.internal/ubuntu resolute/main ppc64el libio-stringy-perl all 2.113-2 [45.3 kB] 171s Get:24 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libparams-validate-perl ppc64el 1.31-2build4 [55.4 kB] 171s Get:25 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-exporter-perl all 0.990-1 [49.0 kB] 171s Get:26 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 171s Get:27 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libio-tiecombine-perl all 1.005-3 [9464 B] 171s Get:28 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libmodule-pluggable-perl all 5.2-5 [19.5 kB] 171s Get:29 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libstring-rewriteprefix-perl all 0.009-1 [6310 B] 171s Get:30 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libapp-cmd-perl all 0.338-1 [58.5 kB] 172s Get:31 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libboolean-perl all 0.46-3 [8430 B] 172s Get:32 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsub-uplevel-perl all 0.2800-3 [11.6 kB] 172s Get:33 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtest-exception-perl all 0.43-3 [13.4 kB] 172s Get:34 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libcarp-assert-more-perl all 2.9.0-1 [19.4 kB] 172s Get:35 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-which-perl all 1.27-2 [12.5 kB] 172s Get:36 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-homedir-perl all 1.006-2 [37.0 kB] 172s Get:37 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libclone-choose-perl all 0.010-2 [7738 B] 172s Get:38 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhash-merge-perl all 0.302-1 [13.0 kB] 172s Get:39 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjson-perl all 4.10000-1 [81.9 kB] 172s Get:40 http://ftpmaster.internal/ubuntu resolute/main ppc64el libexporter-tiny-perl all 1.006003-1 [35.5 kB] 172s Get:41 http://ftpmaster.internal/ubuntu resolute/universe ppc64el liblist-moreutils-xs-perl ppc64el 0.430-4build1 [43.2 kB] 172s Get:42 http://ftpmaster.internal/ubuntu resolute/universe ppc64el liblist-moreutils-perl all 0.430-2 [38.2 kB] 172s Get:43 http://ftpmaster.internal/ubuntu resolute/universe ppc64el liblog-log4perl-perl all 1.57-1 [345 kB] 172s Get:44 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmouse-perl ppc64el 2.6.1-1 [138 kB] 172s Get:45 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 172s Get:46 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libmousex-strictconstructor-perl all 0.02-3 [4582 B] 172s Get:47 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 172s Get:48 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpath-tiny-perl all 0.148-1 [47.9 kB] 172s Get:49 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libpod-pom-perl all 2.01-4 [61.3 kB] 172s Get:50 http://ftpmaster.internal/ubuntu resolute/main ppc64el libregexp-common-perl all 2024080801-1 [162 kB] 172s Get:51 http://ftpmaster.internal/ubuntu resolute/main ppc64el libyaml-tiny-perl all 1.76-1 [24.2 kB] 172s Get:52 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libconfig-model-perl all 2.155-1 [356 kB] 172s Get:53 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libyaml-pp-perl all 0.39.0-1 [107 kB] 172s Get:54 http://ftpmaster.internal/ubuntu resolute/universe ppc64el cme all 1.044-2 [68.0 kB] 172s Get:55 http://ftpmaster.internal/ubuntu resolute/main ppc64el libisl23 ppc64el 0.27-1build1 [893 kB] 172s Get:56 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmpc3 ppc64el 1.3.1-2 [62.5 kB] 172s Get:57 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-15-powerpc64le-linux-gnu ppc64el 15.2.0-12ubuntu1 [11.4 MB] 179s Get:58 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-15 ppc64el 15.2.0-12ubuntu1 [1038 B] 179s Get:59 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [5746 B] 179s Get:60 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp ppc64el 4:15.2.0-4ubuntu1 [22.4 kB] 179s Get:61 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 179s Get:62 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcc1-0 ppc64el 15.2.0-12ubuntu1 [49.0 kB] 179s Get:63 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgomp1 ppc64el 15.2.0-12ubuntu1 [169 kB] 179s Get:64 http://ftpmaster.internal/ubuntu resolute/main ppc64el libitm1 ppc64el 15.2.0-12ubuntu1 [32.2 kB] 179s Get:65 http://ftpmaster.internal/ubuntu resolute/main ppc64el libasan8 ppc64el 15.2.0-12ubuntu1 [3006 kB] 180s Get:66 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblsan0 ppc64el 15.2.0-12ubuntu1 [1374 kB] 181s Get:67 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtsan2 ppc64el 15.2.0-12ubuntu1 [2729 kB] 182s Get:68 http://ftpmaster.internal/ubuntu resolute/main ppc64el libubsan1 ppc64el 15.2.0-12ubuntu1 [1231 kB] 182s Get:69 http://ftpmaster.internal/ubuntu resolute/main ppc64el libquadmath0 ppc64el 15.2.0-12ubuntu1 [160 kB] 182s Get:70 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgcc-15-dev ppc64el 15.2.0-12ubuntu1 [1670 kB] 183s Get:71 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-15-powerpc64le-linux-gnu ppc64el 15.2.0-12ubuntu1 [22.4 MB] 193s Get:72 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-15 ppc64el 15.2.0-12ubuntu1 [530 kB] 194s Get:73 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [1220 B] 194s Get:74 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc ppc64el 4:15.2.0-4ubuntu1 [5032 B] 194s Get:75 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libc-dev-bin ppc64el 2.42-2ubuntu5 [23.9 kB] 194s Get:76 http://ftpmaster.internal/ubuntu resolute/main ppc64el linux-libc-dev ppc64el 6.18.0-9.9 [1847 kB] 194s Get:77 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcrypt-dev ppc64el 1:4.5.1-1 [162 kB] 194s Get:78 http://ftpmaster.internal/ubuntu resolute/main ppc64el rpcsvc-proto ppc64el 1.4.3-1build1 [84.2 kB] 195s Get:79 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libc6-dev ppc64el 2.42-2ubuntu5 [2079 kB] 195s Get:80 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtool all 2.5.4-9 [169 kB] 195s Get:81 http://ftpmaster.internal/ubuntu resolute/main ppc64el dh-autoreconf all 21 [12.5 kB] 195s Get:82 http://ftpmaster.internal/ubuntu resolute/main ppc64el libarchive-zip-perl all 1.68-1 [90.2 kB] 195s Get:83 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 195s Get:84 http://ftpmaster.internal/ubuntu resolute/main ppc64el dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 195s Get:85 http://ftpmaster.internal/ubuntu resolute/main ppc64el debugedit ppc64el 1:5.2-3build1 [57.3 kB] 195s Get:86 http://ftpmaster.internal/ubuntu resolute/main ppc64el dwz ppc64el 0.16-2 [142 kB] 195s Get:87 http://ftpmaster.internal/ubuntu resolute/main ppc64el gettext ppc64el 0.23.2-1 [1177 kB] 196s Get:88 http://ftpmaster.internal/ubuntu resolute/main ppc64el intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 196s Get:89 http://ftpmaster.internal/ubuntu resolute/main ppc64el po-debconf all 1.0.22 [215 kB] 196s Get:90 http://ftpmaster.internal/ubuntu resolute/main ppc64el debhelper all 13.28ubuntu1 [916 kB] 196s Get:91 http://ftpmaster.internal/ubuntu resolute/universe ppc64el aglfn all 1.7+git20191031.4036a9c-2build1 [33.2 kB] 196s Get:92 http://ftpmaster.internal/ubuntu resolute/universe ppc64el gnuplot-data all 6.0.2+dfsg1-2ubuntu1 [76.0 kB] 196s Get:93 http://ftpmaster.internal/ubuntu resolute/universe ppc64el fonts-freefont-otf all 20211204+svn4273-4build1 [4594 kB] 198s Get:94 http://ftpmaster.internal/ubuntu resolute/main ppc64el fontconfig-config ppc64el 2.17.1-3ubuntu1 [38.5 kB] 198s Get:95 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfontconfig1 ppc64el 2.17.1-3ubuntu1 [193 kB] 198s Get:96 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpixman-1-0 ppc64el 0.46.4-1 [347 kB] 198s Get:97 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-render0 ppc64el 1.17.0-2ubuntu1 [17.4 kB] 198s Get:98 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-shm0 ppc64el 1.17.0-2ubuntu1 [6072 B] 198s Get:99 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxrender1 ppc64el 1:0.9.12-1 [23.0 kB] 198s Get:100 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcairo2 ppc64el 1.18.4-3 [759 kB] 199s Get:101 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsharpyuv0 ppc64el 1.5.0-0.1build1 [24.7 kB] 199s Get:102 http://ftpmaster.internal/ubuntu resolute/main ppc64el libaom3 ppc64el 3.13.1-2 [2908 kB] 200s Get:103 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif-plugin-aomdec ppc64el 1.21.2-1 [14.4 kB] 200s Get:104 http://ftpmaster.internal/ubuntu resolute/main ppc64el libde265-0 ppc64el 1.0.16-1build1 [300 kB] 200s Get:105 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif-plugin-libde265 ppc64el 1.21.2-1 [10.2 kB] 200s Get:106 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif1 ppc64el 1.21.2-1 [657 kB] 201s Get:107 http://ftpmaster.internal/ubuntu resolute/main ppc64el libimagequant0 ppc64el 2.18.0-1build1 [43.2 kB] 201s Get:108 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg-turbo8 ppc64el 2.1.5-4ubuntu2 [215 kB] 201s Get:109 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg8 ppc64el 8c-2ubuntu11 [2148 B] 201s Get:110 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdeflate0 ppc64el 1.23-2 [63.3 kB] 201s Get:111 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjbig0 ppc64el 2.1-6.1ubuntu3 [37.1 kB] 201s Get:112 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblerc4 ppc64el 4.0.0+ds-5ubuntu2 [315 kB] 201s Get:113 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwebp7 ppc64el 1.5.0-0.1build1 [330 kB] 201s Get:114 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtiff6 ppc64el 4.7.0-3ubuntu3 [307 kB] 201s Get:115 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxpm4 ppc64el 1:3.5.17-1build3 [50.5 kB] 201s Get:116 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgd3 ppc64el 2.3.3-13ubuntu1 [165 kB] 201s Get:117 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblua5.4-0 ppc64el 5.4.8-1 [213 kB] 201s Get:118 http://ftpmaster.internal/ubuntu resolute/main ppc64el fontconfig ppc64el 2.17.1-3ubuntu1 [182 kB] 201s Get:119 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgraphite2-3 ppc64el 1.3.14-11ubuntu1 [85.3 kB] 201s Get:120 http://ftpmaster.internal/ubuntu resolute/main ppc64el libharfbuzz0b ppc64el 12.3.2-1 [663 kB] 202s Get:121 http://ftpmaster.internal/ubuntu resolute/main ppc64el libthai-data all 0.1.30-1 [155 kB] 202s Get:122 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdatrie1 ppc64el 0.2.14-1 [22.7 kB] 202s Get:123 http://ftpmaster.internal/ubuntu resolute/main ppc64el libthai0 ppc64el 0.1.30-1 [22.5 kB] 202s Get:124 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpango-1.0-0 ppc64el 1.57.0-1 [283 kB] 202s Get:125 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpangoft2-1.0-0 ppc64el 1.57.0-1 [61.2 kB] 202s Get:126 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpangocairo-1.0-0 ppc64el 1.57.0-1 [31.0 kB] 202s Get:127 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwebpmux3 ppc64el 1.5.0-0.1build1 [31.3 kB] 202s Get:128 http://ftpmaster.internal/ubuntu resolute/universe ppc64el gnuplot-nox ppc64el 6.0.2+dfsg1-2ubuntu1 [1390 kB] 203s Get:129 http://ftpmaster.internal/ubuntu resolute/universe ppc64el dh-octave-autopkgtest all 1.14.0 [11.9 kB] 203s Get:130 http://ftpmaster.internal/ubuntu resolute/main ppc64el libapt-pkg-perl ppc64el 0.1.43 [71.1 kB] 203s Get:131 http://ftpmaster.internal/ubuntu resolute/main ppc64el libarray-intspan-perl all 2.004-2 [25.0 kB] 203s Get:132 http://ftpmaster.internal/ubuntu resolute/main ppc64el libconfig-inifiles-perl all 3.000003-4 [38.5 kB] 203s Get:133 http://ftpmaster.internal/ubuntu resolute/main ppc64el libyaml-libyaml-perl ppc64el 0.904.0+ds-1 [46.5 kB] 203s Get:134 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 203s Get:135 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libexporter-lite-perl all 0.09-2 [9748 B] 203s Get:136 http://ftpmaster.internal/ubuntu resolute/main ppc64el libencode-locale-perl all 1.05-3 [11.6 kB] 203s Get:137 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtimedate-perl all 2.3300-2 [34.0 kB] 203s Get:138 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhttp-date-perl all 6.06-1 [10.2 kB] 203s Get:139 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-listing-perl all 6.16-1 [11.3 kB] 203s Get:140 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-tagset-perl all 3.24-1 [14.1 kB] 203s Get:141 http://ftpmaster.internal/ubuntu resolute/main ppc64el liburi-perl all 5.34-2build1 [100 kB] 203s Get:142 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-parser-perl ppc64el 3.83-1build1 [91.8 kB] 203s Get:143 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-tree-perl all 5.07-3 [200 kB] 203s Get:144 http://ftpmaster.internal/ubuntu resolute/main ppc64el libclone-perl ppc64el 0.47-1 [11.1 kB] 203s Get:145 http://ftpmaster.internal/ubuntu resolute/main ppc64el libio-html-perl all 1.004-3 [15.9 kB] 203s Get:146 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 203s Get:147 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhttp-message-perl all 7.01-1ubuntu1 [76.1 kB] 203s Get:148 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhttp-cookies-perl all 6.11-1 [18.2 kB] 203s Get:149 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhttp-negotiate-perl all 6.01-2 [12.4 kB] 203s Get:150 http://ftpmaster.internal/ubuntu resolute/main ppc64el perl-openssl-defaults ppc64el 7build4 [6710 B] 203s Get:151 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-ssleay-perl ppc64el 1.94-3 [323 kB] 203s Get:152 http://ftpmaster.internal/ubuntu resolute/main ppc64el libio-socket-ssl-perl all 2.098-1 [205 kB] 203s Get:153 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-http-perl all 6.24-1build1 [21.7 kB] 203s Get:154 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblwp-protocol-https-perl all 6.14-1 [9040 B] 203s Get:155 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwww-robotrules-perl all 6.02-1build1 [12.4 kB] 203s Get:156 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwww-perl all 6.81-1build1 [141 kB] 203s Get:157 http://ftpmaster.internal/ubuntu resolute/main ppc64el liberror-perl all 0.17030-1 [23.5 kB] 203s Get:158 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libparse-debcontrol-perl all 2.005-6 [20.4 kB] 203s Get:159 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsoftware-copyright-perl all 0.015-1 [14.4 kB] 203s Get:160 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libalgorithm-c3-perl all 0.11-2 [10.2 kB] 203s Get:161 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libclass-c3-perl all 0.35-2 [18.4 kB] 203s Get:162 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libmro-compat-perl all 0.15-2 [10.1 kB] 203s Get:163 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libdata-section-perl all 0.200008-1 [11.6 kB] 203s Get:164 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-template-perl all 1.61-1 [48.5 kB] 203s Get:165 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsoftware-license-perl all 0.104007-1 [123 kB] 203s Get:166 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 203s Get:167 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsort-versions-perl all 1.62-3 [7378 B] 203s Get:168 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-reform-perl all 1.20-5 [35.4 kB] 203s Get:169 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-autoformat-perl all 1.750000-2 [29.8 kB] 203s Get:170 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 203s Get:171 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtoml-tiny-perl all 0.20-1 [21.8 kB] 203s Get:172 http://ftpmaster.internal/ubuntu resolute/main ppc64el libclass-inspector-perl all 1.36-3 [15.4 kB] 203s Get:173 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-sharedir-perl all 1.118-3 [14.0 kB] 203s Get:174 http://ftpmaster.internal/ubuntu resolute/main ppc64el libindirect-perl ppc64el 0.39-2build5 [22.9 kB] 203s Get:175 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxs-parse-keyword-perl ppc64el 0.49-1 [65.2 kB] 203s Get:176 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxs-parse-sublike-perl ppc64el 0.41-1 [51.2 kB] 203s Get:177 http://ftpmaster.internal/ubuntu resolute/main ppc64el libobject-pad-perl ppc64el 0.823-2 [143 kB] 203s Get:178 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsyntax-keyword-try-perl ppc64el 0.31-1 [26.5 kB] 203s Get:179 http://ftpmaster.internal/ubuntu resolute/main ppc64el libio-interactive-perl all 1.027-1 [10.8 kB] 203s Get:180 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblog-any-perl all 1.718-1build1 [69.6 kB] 203s Get:181 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 203s Get:182 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 203s Get:183 http://ftpmaster.internal/ubuntu resolute/main ppc64el libvariable-magic-perl ppc64el 0.64-1build1 [37.2 kB] 203s Get:184 http://ftpmaster.internal/ubuntu resolute/main ppc64el libb-hooks-endofscope-perl all 0.28-2 [15.8 kB] 203s Get:185 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-identify-perl ppc64el 0.14-4 [10.4 kB] 203s Get:186 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-name-perl ppc64el 0.28-1 [10.9 kB] 203s Get:187 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnamespace-clean-perl all 0.27-2 [14.0 kB] 203s Get:188 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnumber-compare-perl all 0.03-3 [5974 B] 203s Get:189 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtext-glob-perl all 0.11-3 [6780 B] 203s Get:190 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 203s Get:191 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpod-parser-perl all 1.67-1 [80.6 kB] 203s Get:192 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpod-constants-perl all 0.19-2 [16.3 kB] 203s Get:193 http://ftpmaster.internal/ubuntu resolute/main ppc64el libset-intspan-perl all 1.19-3 [24.8 kB] 203s Get:194 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstring-copyright-perl all 0.003014-1 [20.5 kB] 203s Get:195 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstring-escape-perl all 2010.002-3 [16.1 kB] 203s Get:196 http://ftpmaster.internal/ubuntu resolute/main ppc64el libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 203s Get:197 http://ftpmaster.internal/ubuntu resolute/main ppc64el libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 203s Get:198 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 203s Get:199 http://ftpmaster.internal/ubuntu resolute/main ppc64el licensecheck all 3.3.9-1ubuntu2 [37.2 kB] 203s Get:200 http://ftpmaster.internal/ubuntu resolute/main ppc64el diffstat ppc64el 1.68-1 [34.9 kB] 203s Get:201 http://ftpmaster.internal/ubuntu resolute/main ppc64el libberkeleydb-perl ppc64el 0.66-2 [121 kB] 203s Get:202 http://ftpmaster.internal/ubuntu resolute/main ppc64el libclass-xsaccessor-perl ppc64el 1.19-4build6 [35.2 kB] 203s Get:203 http://ftpmaster.internal/ubuntu resolute/main ppc64el libconfig-tiny-perl all 2.30-1 [14.7 kB] 203s Get:204 http://ftpmaster.internal/ubuntu resolute/main ppc64el libconst-fast-perl all 0.014-2 [8034 B] 203s Get:205 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcpanel-json-xs-perl ppc64el 4.40-1 [123 kB] 203s Get:206 http://ftpmaster.internal/ubuntu resolute/main ppc64el libaliased-perl all 0.34-3 [12.8 kB] 203s Get:207 http://ftpmaster.internal/ubuntu resolute/main ppc64el libclass-data-inheritable-perl all 0.10-1 [8038 B] 203s Get:208 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 203s Get:209 http://ftpmaster.internal/ubuntu resolute/main ppc64el libexception-class-perl all 1.45-1 [28.6 kB] 203s Get:210 http://ftpmaster.internal/ubuntu resolute/main ppc64el libiterator-perl all 0.03+ds1-2 [18.8 kB] 203s Get:211 http://ftpmaster.internal/ubuntu resolute/main ppc64el libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 203s Get:212 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-dpath-perl all 0.60-1 [37.3 kB] 203s Get:213 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-domain-tld-perl all 1.75-4 [29.0 kB] 203s Get:214 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-validate-domain-perl all 0.15-1 [10.4 kB] 203s Get:215 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 203s Get:216 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-netmask-perl all 2.0003-1build1 [24.8 kB] 203s Get:217 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnetaddr-ip-perl ppc64el 4.079+dfsg-2build5 [81.4 kB] 203s Get:218 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-validate-ip-perl all 0.31-1 [17.2 kB] 203s Get:219 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-validate-uri-perl all 0.07-3 [10.8 kB] 203s Get:220 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdevel-size-perl ppc64el 0.85-1 [20.1 kB] 203s Get:221 http://ftpmaster.internal/ubuntu resolute/main ppc64el libemail-address-xs-perl ppc64el 1.05-1build5 [33.6 kB] 203s Get:222 http://ftpmaster.internal/ubuntu resolute/main ppc64el libipc-system-simple-perl all 1.30-2 [22.3 kB] 203s Get:223 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-basedir-perl all 0.09-2 [14.4 kB] 203s Get:224 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-find-rule-perl all 0.35-1build1 [24.0 kB] 203s Get:225 http://ftpmaster.internal/ubuntu resolute/main ppc64el libio-string-perl all 1.08-4 [11.1 kB] 203s Get:226 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfont-ttf-perl all 1.06-2 [323 kB] 203s Get:227 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 203s Get:228 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 203s Get:229 http://ftpmaster.internal/ubuntu resolute/main ppc64el libipc-run3-perl all 0.049-1 [28.8 kB] 203s Get:230 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjson-maybexs-perl all 1.004008-1 [11.1 kB] 203s Get:231 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblist-compare-perl all 0.55-2 [62.9 kB] 203s Get:232 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblist-someutils-perl all 0.59-1 [30.4 kB] 203s Get:233 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblist-utilsby-perl all 0.12-2 [14.9 kB] 203s Get:234 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmldbm-perl all 2.05-4 [16.0 kB] 203s Get:235 http://ftpmaster.internal/ubuntu resolute/main ppc64el libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 203s Get:236 http://ftpmaster.internal/ubuntu resolute/main ppc64el libimport-into-perl all 1.002005-2 [10.7 kB] 203s Get:237 http://ftpmaster.internal/ubuntu resolute/main ppc64el librole-tiny-perl all 2.002004-1 [16.3 kB] 203s Get:238 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsub-quote-perl all 2.006009-1ubuntu1 [20.3 kB] 203s Get:239 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmoo-perl all 2.005005-1 [47.4 kB] 203s Get:240 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstrictures-perl all 2.000006-1build1 [15.2 kB] 203s Get:241 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmoox-aliases-perl all 0.001006-2 [6796 B] 203s Get:242 http://ftpmaster.internal/ubuntu resolute/main ppc64el libperlio-gzip-perl ppc64el 0.20-1build5 [15.7 kB] 203s Get:243 http://ftpmaster.internal/ubuntu resolute/main ppc64el libperlio-utf8-strict-perl ppc64el 0.010-1build4 [12.0 kB] 203s Get:244 http://ftpmaster.internal/ubuntu resolute/main ppc64el libproc-processtable-perl ppc64el 0.637-1 [36.8 kB] 203s Get:245 http://ftpmaster.internal/ubuntu resolute/main ppc64el libregexp-wildcards-perl all 1.05-3 [12.9 kB] 203s Get:246 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsereal-decoder-perl ppc64el 5.004+ds-1build5 [131 kB] 203s Get:247 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsereal-encoder-perl ppc64el 5.004+ds-1build4 [120 kB] 203s Get:248 http://ftpmaster.internal/ubuntu resolute/main ppc64el libterm-readkey-perl ppc64el 2.38-2build5 [24.7 kB] 203s Get:249 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtext-levenshteinxs-perl ppc64el 0.03-5build5 [8634 B] 203s Get:250 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmarkdown2 ppc64el 2.2.7-2.1build1 [49.1 kB] 203s Get:251 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtext-markdown-discount-perl ppc64el 0.18-1 [12.5 kB] 203s Get:252 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdata-messagepack-perl ppc64el 1.02-3 [33.4 kB] 203s Get:253 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtext-xslate-perl ppc64el 3.5.9-2build1 [165 kB] 203s Get:254 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtime-duration-perl all 1.21-2 [12.3 kB] 203s Get:255 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtime-moment-perl ppc64el 0.46-1 [86.6 kB] 203s Get:256 http://ftpmaster.internal/ubuntu resolute/main ppc64el libunicode-utf8-perl ppc64el 0.63-1 [22.1 kB] 203s Get:257 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcgi-pm-perl all 4.71-1build1 [185 kB] 203s Get:258 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhtml-form-perl all 6.13-1build1 [31.3 kB] 203s Get:259 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwww-mechanize-perl all 2.20-1ubuntu1 [95.5 kB] 203s Get:260 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 203s Get:261 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxml-sax-base-perl all 1.09-3 [18.9 kB] 203s Get:262 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 203s Get:263 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxml-libxml-perl ppc64el 2.0207+dfsg+really+2.0207-0ubuntu7 [315 kB] 203s Get:264 http://ftpmaster.internal/ubuntu resolute/main ppc64el lzip ppc64el 1.25-4 [95.8 kB] 203s Get:265 http://ftpmaster.internal/ubuntu resolute/main ppc64el lzop ppc64el 1.04-2build4 [88.8 kB] 203s Get:266 http://ftpmaster.internal/ubuntu resolute/main ppc64el patchutils ppc64el 0.4.3-1 [91.4 kB] 203s Get:267 http://ftpmaster.internal/ubuntu resolute/main ppc64el t1utils ppc64el 1.41-4build4 [76.9 kB] 203s Get:268 http://ftpmaster.internal/ubuntu resolute/main ppc64el unzip ppc64el 6.0-29ubuntu1 [200 kB] 203s Get:269 http://ftpmaster.internal/ubuntu resolute/main ppc64el lintian all 2.127.0ubuntu1 [1079 kB] 204s Get:270 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libconfig-model-dpkg-perl all 3.016 [194 kB] 204s Get:271 http://ftpmaster.internal/ubuntu resolute/main ppc64el libconvert-binhex-perl all 1.125-3 [27.1 kB] 204s Get:272 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnet-smtp-ssl-perl all 1.04-2 [6218 B] 204s Get:273 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmailtools-perl all 2.22-1 [77.1 kB] 204s Get:274 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmime-tools-perl all 5.515-1 [187 kB] 204s Get:275 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libb-keywords-perl all 1.29-1 [10.4 kB] 204s Get:276 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libclass-tiny-perl all 1.008-2 [16.4 kB] 204s Get:277 http://ftpmaster.internal/ubuntu resolute/universe ppc64el liblingua-en-inflect-perl all 1.905-2 [50.8 kB] 204s Get:278 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libpod-spell-perl all 1.27-1 [30.4 kB] 204s Get:279 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsafe-isa-perl all 1.000010-1build1 [7334 B] 204s Get:280 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtask-weaken-perl all 1.06-2 [7924 B] 204s Get:281 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libppi-perl all 1.284-1 [281 kB] 204s Get:282 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libreadonly-perl all 2.050-3 [19.9 kB] 204s Get:283 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libppix-quotelike-perl all 0.023-1 [71.6 kB] 204s Get:284 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libppix-regexp-perl all 0.091-1 [234 kB] 204s Get:285 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libppix-utils-perl all 0.003-2 [28.4 kB] 204s Get:286 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libstring-format-perl all 1.18-1build1 [8824 B] 204s Get:287 http://ftpmaster.internal/ubuntu resolute/universe ppc64el perltidy all 20250105-1build1 [645 kB] 205s Get:288 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libperl-critic-perl all 1.156-1 [654 kB] 205s Get:289 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-wrapper-perl all 1.05-4 [9820 B] 205s Get:290 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsuitesparseconfig7 ppc64el 1:7.12.1+dfsg-1 [22.1 kB] 205s Get:291 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libamd3 ppc64el 1:7.12.1+dfsg-1 [44.6 kB] 205s Get:292 http://ftpmaster.internal/ubuntu resolute/main ppc64el libblas3 ppc64el 3.12.1-7ubuntu1 [291 kB] 206s Get:293 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgfortran5 ppc64el 15.2.0-12ubuntu1 [620 kB] 206s Get:294 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblapack3 ppc64el 3.12.1-7ubuntu1 [2960 kB] 208s Get:295 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libarpack2t64 ppc64el 3.9.1-6 [107 kB] 208s Get:296 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libccolamd3 ppc64el 1:7.12.1+dfsg-1 [41.2 kB] 208s Get:297 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libcamd3 ppc64el 1:7.12.1+dfsg-1 [38.5 kB] 208s Get:298 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcolamd3 ppc64el 1:7.12.1+dfsg-1 [31.0 kB] 208s Get:299 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libcholmod5 ppc64el 1:7.12.1+dfsg-1 [985 kB] 209s Get:300 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libcxsparse4 ppc64el 1:7.12.1+dfsg-1 [115 kB] 209s Get:301 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfftw3-double3 ppc64el 3.3.10-2fakesync1build2 [445 kB] 209s Get:302 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfftw3-single3 ppc64el 3.3.10-2fakesync1build2 [458 kB] 209s Get:303 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxfixes3 ppc64el 1:6.0.0-2build2 [11.8 kB] 209s Get:304 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcursor1 ppc64el 1:1.2.3-1build1 [28.3 kB] 209s Get:305 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxft2 ppc64el 2.3.6-1build2 [61.6 kB] 209s Get:306 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxinerama1 ppc64el 2:1.1.4-3build2 [6844 B] 209s Get:307 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libfltk1.3t64 ppc64el 1.3.11-3 [714 kB] 209s Get:308 http://ftpmaster.internal/ubuntu resolute/main ppc64el libglvnd0 ppc64el 1.7.0-3 [67.2 kB] 209s Get:309 http://ftpmaster.internal/ubuntu resolute/main ppc64el libx11-xcb1 ppc64el 2:1.8.12-1build1 [8022 B] 209s Get:310 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-dri3-0 ppc64el 1.17.0-2ubuntu1 [7964 B] 209s Get:311 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-present0 ppc64el 1.17.0-2ubuntu1 [6340 B] 209s Get:312 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-randr0 ppc64el 1.17.0-2ubuntu1 [19.1 kB] 209s Get:313 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-sync1 ppc64el 1.17.0-2ubuntu1 [9864 B] 209s Get:314 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-xfixes0 ppc64el 1.17.0-2ubuntu1 [10.8 kB] 209s Get:315 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxshmfence1 ppc64el 1.3.3-1build1 [5420 B] 209s Get:316 http://ftpmaster.internal/ubuntu resolute/main ppc64el mesa-libgallium ppc64el 25.3.3-1ubuntu1 [12.5 MB] 218s Get:317 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgbm1 ppc64el 25.3.3-1ubuntu1 [41.7 kB] 218s Get:318 http://ftpmaster.internal/ubuntu resolute/main ppc64el libvulkan1 ppc64el 1.4.335.0-1 [175 kB] 218s Get:319 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgl1-mesa-dri ppc64el 25.3.3-1ubuntu1 [36.4 kB] 218s Get:320 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-glx0 ppc64el 1.17.0-2ubuntu1 [26.4 kB] 218s Get:321 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxxf86vm1 ppc64el 1:1.1.4-2 [12.0 kB] 218s Get:322 http://ftpmaster.internal/ubuntu resolute/main ppc64el libglx-mesa0 ppc64el 25.3.3-1ubuntu1 [132 kB] 218s Get:323 http://ftpmaster.internal/ubuntu resolute/main ppc64el libglx0 ppc64el 1.7.0-3 [42.3 kB] 218s Get:324 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgl1 ppc64el 1.7.0-3 [103 kB] 218s Get:325 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libfltk-gl1.3t64 ppc64el 1.3.11-3 [46.0 kB] 218s Get:326 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgl2ps1.4 ppc64el 1.4.2+dfsg1-4 [58.1 kB] 218s Get:327 http://ftpmaster.internal/ubuntu resolute/main ppc64el libltdl7 ppc64el 2.5.4-9 [51.5 kB] 218s Get:328 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libglpk40 ppc64el 5.0-2 [488 kB] 218s Get:329 http://ftpmaster.internal/ubuntu resolute/main ppc64el libopengl0 ppc64el 1.7.0-3 [35.6 kB] 218s Get:330 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libglu1-mesa ppc64el 9.0.2-1.1build2 [274 kB] 218s Get:331 http://ftpmaster.internal/ubuntu resolute/main ppc64el libhwy1t64 ppc64el 1.3.0-2 [251 kB] 218s Get:332 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblcms2-2 ppc64el 2.17-1 [246 kB] 218s Get:333 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjxl0.11 ppc64el 0.11.1-6ubuntu1 [1411 kB] 218s Get:334 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwmflite-0.2-7 ppc64el 0.2.13-2 [81.5 kB] 218s Get:335 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgraphicsmagick-q16-3t64 ppc64el 1.4+really1.3.45+hg17696-1build1 [1610 kB] 219s Get:336 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgraphicsmagick++-q16-12t64 ppc64el 1.4+really1.3.45+hg17696-1build1 [132 kB] 219s Get:337 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsz2 ppc64el 1.1.5-1 [25.3 kB] 219s Get:338 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-310 ppc64el 1.14.6+repack-2 [1545 kB] 220s Get:339 http://ftpmaster.internal/ubuntu resolute/main ppc64el libasound2-data all 1.2.15.3-1ubuntu1 [21.4 kB] 220s Get:340 http://ftpmaster.internal/ubuntu resolute/main ppc64el libasound2t64 ppc64el 1.2.15.3-1ubuntu1 [523 kB] 220s Get:341 http://ftpmaster.internal/ubuntu resolute/main ppc64el libopus0 ppc64el 1.6.1-1 [3720 kB] 222s Get:342 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsamplerate0 ppc64el 0.2.2-4build2 [1346 kB] 222s Get:343 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjack-jackd2-0 ppc64el 1.9.22~dfsg-5 [333 kB] 222s Get:344 http://ftpmaster.internal/ubuntu resolute/main ppc64el libasyncns0 ppc64el 0.8-7 [13.3 kB] 222s Get:345 http://ftpmaster.internal/ubuntu resolute/main ppc64el libogg0 ppc64el 1.3.6-2 [25.7 kB] 222s Get:346 http://ftpmaster.internal/ubuntu resolute/main ppc64el libflac14 ppc64el 1.5.0+ds-5 [213 kB] 222s Get:347 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmp3lame0 ppc64el 3.100-6build2 [217 kB] 222s Get:348 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmpg123-0t64 ppc64el 1.33.3-2 [214 kB] 222s Get:349 http://ftpmaster.internal/ubuntu resolute/main ppc64el libvorbis0a ppc64el 1.3.7-3build1 [148 kB] 222s Get:350 http://ftpmaster.internal/ubuntu resolute/main ppc64el libvorbisenc2 ppc64el 1.3.7-3build1 [85.4 kB] 222s Get:351 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsndfile1 ppc64el 1.2.2-4 [322 kB] 222s Get:352 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpulse0 ppc64el 1:17.0+dfsg1-2ubuntu4 [316 kB] 222s Get:353 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libportaudio2 ppc64el 19.7.0+git20251227.3270c9ae-0ubuntu1 [96.6 kB] 222s Get:354 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqhull-r8.0 ppc64el 2020.2-8 [227 kB] 222s Get:355 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqrupdate1 ppc64el 1.1.5-3 [48.7 kB] 222s Get:356 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqscintilla2-qt6-l10n all 2.14.1+dfsg-2 [55.5 kB] 222s Get:357 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libb2-1 ppc64el 0.98.1-1.1build2 [17.6 kB] 222s Get:358 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libdouble-conversion3 ppc64el 3.4.0-1 [46.0 kB] 222s Get:359 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpcre2-16-0 ppc64el 10.46-1 [292 kB] 222s Get:360 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6core6t64 ppc64el 6.9.2+dfsg-3ubuntu2 [2314 kB] 224s Get:361 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwayland-client0 ppc64el 1.24.0-2 [32.8 kB] 224s Get:362 http://ftpmaster.internal/ubuntu resolute/main ppc64el libegl-mesa0 ppc64el 25.3.3-1ubuntu1 [147 kB] 224s Get:363 http://ftpmaster.internal/ubuntu resolute/main ppc64el libegl1 ppc64el 1.7.0-3 [34.9 kB] 224s Get:364 http://ftpmaster.internal/ubuntu resolute/main ppc64el x11-common all 1:7.7+24ubuntu1 [22.4 kB] 224s Get:365 http://ftpmaster.internal/ubuntu resolute/main ppc64el libice6 ppc64el 2:1.1.1-1build1 [51.9 kB] 224s Get:366 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmtdev1t64 ppc64el 1.1.7-1build1 [18.7 kB] 224s Get:367 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwacom-common all 2.16.1-1 [113 kB] 224s Get:368 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwacom9 ppc64el 2.16.1-1 [34.8 kB] 224s Get:369 http://ftpmaster.internal/ubuntu resolute/main ppc64el libinput-bin ppc64el 1.30.1-1 [25.6 kB] 224s Get:370 http://ftpmaster.internal/ubuntu resolute/main ppc64el libinput10 ppc64el 1.30.1-1 [196 kB] 224s Get:371 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libmd4c0 ppc64el 0.5.2-2build1 [60.0 kB] 224s Get:372 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6dbus6 ppc64el 6.9.2+dfsg-3ubuntu2 [322 kB] 224s Get:373 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsm6 ppc64el 2:1.2.6-1 [18.6 kB] 224s Get:374 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libts0t64 ppc64el 1.22-1.1build2 [70.1 kB] 224s Get:375 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-util1 ppc64el 0.4.1-1build1 [11.2 kB] 224s Get:376 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxcb-image0 ppc64el 0.4.0-2build2 [13.1 kB] 224s Get:377 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxcb-render-util0 ppc64el 0.3.10-1build1 [11.3 kB] 224s Get:378 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxcb-cursor0 ppc64el 0.1.5-1build1 [11.9 kB] 224s Get:379 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxcb-icccm4 ppc64el 0.4.2-1build1 [11.2 kB] 224s Get:380 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxcb-keysyms1 ppc64el 0.4.1-1build1 [9078 B] 224s Get:381 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-shape0 ppc64el 1.17.0-2ubuntu1 [6420 B] 224s Get:382 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-xinput0 ppc64el 1.17.0-2ubuntu1 [38.3 kB] 224s Get:383 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb-xkb1 ppc64el 1.17.0-2ubuntu1 [37.6 kB] 224s Get:384 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxkbcommon-x11-0 ppc64el 1.12.3-1 [15.6 kB] 224s Get:385 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6gui6 ppc64el 6.9.2+dfsg-3ubuntu2 [4279 kB] 225s Get:386 http://ftpmaster.internal/ubuntu resolute/main ppc64el libavahi-common-data ppc64el 0.8-17ubuntu2 [31.5 kB] 225s Get:387 http://ftpmaster.internal/ubuntu resolute/main ppc64el libavahi-common3 ppc64el 0.8-17ubuntu2 [26.3 kB] 225s Get:388 http://ftpmaster.internal/ubuntu resolute/main ppc64el libavahi-client3 ppc64el 0.8-17ubuntu2 [31.1 kB] 225s Get:389 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcups2t64 ppc64el 2.4.16-1ubuntu1 [353 kB] 225s Get:390 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6widgets6 ppc64el 6.9.2+dfsg-3ubuntu2 [3270 kB] 226s Get:391 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6printsupport6 ppc64el 6.9.2+dfsg-3ubuntu2 [247 kB] 226s Get:392 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqscintilla2-qt6-15 ppc64el 2.14.1+dfsg-2 [1375 kB] 227s Get:393 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6core5compat6 ppc64el 6.9.2-3build1 [173 kB] 227s Get:394 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6sql6 ppc64el 6.9.2+dfsg-3ubuntu2 [167 kB] 227s Get:395 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6help6 ppc64el 6.9.2-5 [225 kB] 227s Get:396 http://ftpmaster.internal/ubuntu resolute/main ppc64el libduktape207 ppc64el 2.7.0+tests-0ubuntu4 [155 kB] 227s Get:397 http://ftpmaster.internal/ubuntu resolute/main ppc64el libproxy1v5 ppc64el 0.5.12-1 [30.3 kB] 227s Get:398 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6network6 ppc64el 6.9.2+dfsg-3ubuntu2 [973 kB] 227s Get:399 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6opengl6 ppc64el 6.9.2+dfsg-3ubuntu2 [499 kB] 227s Get:400 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6openglwidgets6 ppc64el 6.9.2+dfsg-3ubuntu2 [45.5 kB] 227s Get:401 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqt6xml6 ppc64el 6.9.2+dfsg-3ubuntu2 [93.2 kB] 227s Get:402 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libspqr4 ppc64el 1:7.12.1+dfsg-1 [205 kB] 227s Get:403 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libumfpack6 ppc64el 1:7.12.1+dfsg-1 [367 kB] 227s Get:404 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libtext-unidecode-perl all 1.30-3 [105 kB] 227s Get:405 http://ftpmaster.internal/ubuntu resolute/main ppc64el libintl-perl all 1.35-1 [701 kB] 227s Get:406 http://ftpmaster.internal/ubuntu resolute/universe ppc64el texinfo-lib ppc64el 7.2-5 [540 kB] 228s Get:407 http://ftpmaster.internal/ubuntu resolute/universe ppc64el tex-common all 6.20 [30.0 kB] 228s Get:408 http://ftpmaster.internal/ubuntu resolute/universe ppc64el texinfo all 7.2-5 [1217 kB] 228s Get:409 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave-common all 10.3.0-3 [6088 kB] 230s Get:410 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave ppc64el 10.3.0-3 [10.5 MB] 232s Get:411 http://ftpmaster.internal/ubuntu resolute/main ppc64el libncurses-dev ppc64el 6.6+20251231-1 [505 kB] 232s Get:412 http://ftpmaster.internal/ubuntu resolute/main ppc64el libreadline-dev ppc64el 8.3-3 [252 kB] 232s Get:413 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-fortran-310 ppc64el 1.14.6+repack-2 [117 kB] 232s Get:414 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-hl-310 ppc64el 1.14.6+repack-2 [76.3 kB] 232s Get:415 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-hl-fortran-310 ppc64el 1.14.6+repack-2 [35.1 kB] 232s Get:416 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-cpp-310 ppc64el 1.14.6+repack-2 [128 kB] 232s Get:417 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-hl-cpp-310 ppc64el 1.14.6+repack-2 [11.7 kB] 232s Get:418 http://ftpmaster.internal/ubuntu resolute/main ppc64el zlib1g-dev ppc64el 1:1.3.dfsg+really1.3.1-1ubuntu2 [903 kB] 233s Get:419 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg-turbo8-dev ppc64el 2.1.5-4ubuntu2 [358 kB] 233s Get:420 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg8-dev ppc64el 8c-2ubuntu11 [1484 B] 233s Get:421 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg-dev ppc64el 8c-2ubuntu11 [1486 B] 233s Get:422 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libaec0 ppc64el 1.1.5-1 [29.7 kB] 233s Get:423 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libaec-dev ppc64el 1.1.5-1 [31.9 kB] 233s Get:424 http://ftpmaster.internal/ubuntu resolute/main ppc64el libbrotli-dev ppc64el 1.1.0-2build6 [428 kB] 233s Get:425 http://ftpmaster.internal/ubuntu resolute/main ppc64el libidn2-dev ppc64el 2.3.8-4 [125 kB] 233s Get:426 http://ftpmaster.internal/ubuntu resolute/main ppc64el comerr-dev ppc64el 2.1-1.47.2-3ubuntu2 [45.4 kB] 233s Get:427 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgssrpc4t64 ppc64el 1.22.1-2 [64.9 kB] 233s Get:428 http://ftpmaster.internal/ubuntu resolute/main ppc64el libkadm5clnt-mit12 ppc64el 1.22.1-2 [43.9 kB] 233s Get:429 http://ftpmaster.internal/ubuntu resolute/main ppc64el libkdb5-10t64 ppc64el 1.22.1-2 [48.6 kB] 233s Get:430 http://ftpmaster.internal/ubuntu resolute/main ppc64el libkadm5srv-mit12 ppc64el 1.22.1-2 [64.5 kB] 233s Get:431 http://ftpmaster.internal/ubuntu resolute/main ppc64el krb5-multidev ppc64el 1.22.1-2 [126 kB] 233s Get:432 http://ftpmaster.internal/ubuntu resolute/main ppc64el libkrb5-dev ppc64el 1.22.1-2 [11.9 kB] 233s Get:433 http://ftpmaster.internal/ubuntu resolute/main ppc64el libldap-dev ppc64el 2.6.10+dfsg-1ubuntu5 [381 kB] 233s Get:434 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpkgconf3 ppc64el 1.8.1-4build1 [37.9 kB] 233s Get:435 http://ftpmaster.internal/ubuntu resolute/main ppc64el pkgconf-bin ppc64el 1.8.1-4build1 [22.7 kB] 233s Get:436 http://ftpmaster.internal/ubuntu resolute/main ppc64el pkgconf ppc64el 1.8.1-4build1 [16.8 kB] 233s Get:437 http://ftpmaster.internal/ubuntu resolute/main ppc64el libnghttp2-dev ppc64el 1.64.0-1.1ubuntu1 [138 kB] 233s Get:438 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpsl-dev ppc64el 0.21.2-1.1build2 [80.9 kB] 233s Get:439 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgmpxx4ldbl ppc64el 2:6.3.0+dfsg-5ubuntu1 [10.2 kB] 233s Get:440 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgmp-dev ppc64el 2:6.3.0+dfsg-5ubuntu1 [382 kB] 233s Get:441 http://ftpmaster.internal/ubuntu resolute/main ppc64el libevent-2.1-7t64 ppc64el 2.1.12-stable-10build1 [172 kB] 233s Get:442 http://ftpmaster.internal/ubuntu resolute/main ppc64el libunbound8 ppc64el 1.24.2-1ubuntu1 [576 kB] 233s Get:443 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgnutls-dane0t64 ppc64el 3.8.10-3ubuntu1 [25.5 kB] 233s Get:444 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgnutls-openssl27t64 ppc64el 3.8.10-3ubuntu1 [25.0 kB] 233s Get:445 http://ftpmaster.internal/ubuntu resolute/main ppc64el libp11-kit-dev ppc64el 0.25.10-1 [29.3 kB] 233s Get:446 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtasn1-6-dev ppc64el 4.21.0-2 [106 kB] 233s Get:447 http://ftpmaster.internal/ubuntu resolute/main ppc64el nettle-dev ppc64el 3.10.2-1 [1235 kB] 234s Get:448 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgnutls28-dev ppc64el 3.8.10-3ubuntu1 [1252 kB] 234s Get:449 http://ftpmaster.internal/ubuntu resolute/main ppc64el librtmp-dev ppc64el 2.4+20151223.gitfa8646d.1-3 [77.1 kB] 234s Get:450 http://ftpmaster.internal/ubuntu resolute/main ppc64el libssl-dev ppc64el 3.5.3-1ubuntu2 [3418 kB] 236s Get:451 http://ftpmaster.internal/ubuntu resolute/main ppc64el libssh2-1-dev ppc64el 1.11.1-1build1 [318 kB] 236s Get:452 http://ftpmaster.internal/ubuntu resolute/main ppc64el libzstd-dev ppc64el 1.5.7+dfsg-3 [528 kB] 236s Get:453 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcurl4-openssl-dev ppc64el 8.18.0-1ubuntu1 [660 kB] 237s Get:454 http://ftpmaster.internal/ubuntu resolute/universe ppc64el hdf5-helpers ppc64el 1.14.6+repack-2 [17.3 kB] 237s Get:455 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-dev ppc64el 1.14.6+repack-2 [3941 kB] 238s Get:456 http://ftpmaster.internal/ubuntu resolute/main ppc64el xorg-sgml-doctools all 1:1.11-1.1build1 [10.3 kB] 238s Get:457 http://ftpmaster.internal/ubuntu resolute/main ppc64el x11proto-dev all 2025.1-1 [608 kB] 239s Get:458 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxau-dev ppc64el 1:1.0.11-1build1 [10.7 kB] 239s Get:459 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxdmcp-dev ppc64el 1:1.1.5-2 [27.4 kB] 239s Get:460 http://ftpmaster.internal/ubuntu resolute/main ppc64el xtrans-dev all 1.6.0-1build1 [66.2 kB] 239s Get:461 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxcb1-dev ppc64el 1.17.0-2ubuntu1 [97.3 kB] 239s Get:462 http://ftpmaster.internal/ubuntu resolute/main ppc64el libx11-dev ppc64el 2:1.8.12-1build1 [856 kB] 239s Get:463 http://ftpmaster.internal/ubuntu resolute/main ppc64el libglx-dev ppc64el 1.7.0-3 [14.1 kB] 239s Get:464 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgl-dev ppc64el 1.7.0-3 [103 kB] 239s Get:465 http://ftpmaster.internal/ubuntu resolute/main ppc64el libblas-dev ppc64el 3.12.1-7ubuntu1 [306 kB] 239s Get:466 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblapack-dev ppc64el 3.12.1-7ubuntu1 [6357 kB] 241s Get:467 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfftw3-long3 ppc64el 3.3.10-2fakesync1build2 [458 kB] 241s Get:468 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfftw3-bin ppc64el 3.3.10-2fakesync1build2 [35.5 kB] 241s Get:469 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfftw3-dev ppc64el 3.3.10-2fakesync1build2 [1100 kB] 242s Get:470 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgfortran-15-dev ppc64el 15.2.0-12ubuntu1 [651 kB] 242s Get:471 http://ftpmaster.internal/ubuntu resolute/main ppc64el gfortran-15-powerpc64le-linux-gnu ppc64el 15.2.0-12ubuntu1 [12.3 MB] 244s Get:472 http://ftpmaster.internal/ubuntu resolute/main ppc64el gfortran-15 ppc64el 15.2.0-12ubuntu1 [18.1 kB] 244s Get:473 http://ftpmaster.internal/ubuntu resolute/main ppc64el gfortran-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [1020 B] 244s Get:474 http://ftpmaster.internal/ubuntu resolute/main ppc64el gfortran ppc64el 4:15.2.0-4ubuntu1 [1166 B] 244s Get:475 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstdc++-15-dev ppc64el 15.2.0-12ubuntu1 [2747 kB] 244s Get:476 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-15-powerpc64le-linux-gnu ppc64el 15.2.0-12ubuntu1 [13.0 MB] 245s Get:477 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-15 ppc64el 15.2.0-12ubuntu1 [25.3 kB] 245s Get:478 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [970 B] 245s Get:479 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++ ppc64el 4:15.2.0-4ubuntu1 [1092 B] 245s Get:480 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave-dev ppc64el 10.3.0-3 [469 kB] 245s Get:481 http://ftpmaster.internal/ubuntu resolute/universe ppc64el dh-octave all 1.14.0 [21.1 kB] 245s Get:482 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfontenc1 ppc64el 1:1.1.8-1build2 [16.1 kB] 245s Get:483 http://ftpmaster.internal/ubuntu resolute/main ppc64el libunwind8 ppc64el 1.8.3-0ubuntu1 [68.2 kB] 245s Get:484 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxt6t64 ppc64el 1:1.2.1-1.3 [203 kB] 245s Get:485 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxmu6 ppc64el 2:1.1.3-4 [56.9 kB] 245s Get:486 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxaw7 ppc64el 2:1.0.16-1build1 [234 kB] 245s Get:487 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxfont2 ppc64el 1:2.0.6-2 [119 kB] 245s Get:488 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxkbfile1 ppc64el 1:1.1.0-1build5 [90.2 kB] 245s Get:489 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxrandr2 ppc64el 2:1.5.4-1build1 [21.7 kB] 245s Get:490 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave-io ppc64el 2.7.0-3 [273 kB] 245s Get:491 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave-statistics-common all 1.7.6-2 [1008 kB] 245s Get:492 http://ftpmaster.internal/ubuntu resolute/universe ppc64el octave-statistics ppc64el 1.7.6-2 [211 kB] 245s Get:493 http://ftpmaster.internal/ubuntu resolute/main ppc64el x11-xkb-utils ppc64el 7.7+9build1 [202 kB] 245s Get:494 http://ftpmaster.internal/ubuntu resolute/main ppc64el xserver-common all 2:21.1.21-1ubuntu1 [34.8 kB] 245s Get:495 http://ftpmaster.internal/ubuntu resolute/universe ppc64el xvfb ppc64el 2:21.1.21-1ubuntu1 [1135 kB] 246s Fetched 212 MB in 1min 15s (2843 kB/s) 246s Selecting previously unselected package libfyaml0:ppc64el. 247s (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 ... 82008 files and directories currently installed.) 247s Preparing to unpack .../000-libfyaml0_0.9.3-1_ppc64el.deb ... 247s Unpacking libfyaml0:ppc64el (0.9.3-1) ... 247s Selecting previously unselected package libstemmer0d:ppc64el. 247s Preparing to unpack .../001-libstemmer0d_3.0.1-1_ppc64el.deb ... 247s Unpacking libstemmer0d:ppc64el (3.0.1-1) ... 247s Selecting previously unselected package libappstream5:ppc64el. 247s Preparing to unpack .../002-libappstream5_1.1.1-1_ppc64el.deb ... 247s Unpacking libappstream5:ppc64el (1.1.1-1) ... 247s Selecting previously unselected package appstream. 247s Preparing to unpack .../003-appstream_1.1.1-1_ppc64el.deb ... 247s Unpacking appstream (1.1.1-1) ... 247s Selecting previously unselected package m4. 247s Preparing to unpack .../004-m4_1.4.20-2_ppc64el.deb ... 247s Unpacking m4 (1.4.20-2) ... 247s Selecting previously unselected package autoconf. 247s Preparing to unpack .../005-autoconf_2.72-3.1ubuntu1_all.deb ... 247s Unpacking autoconf (2.72-3.1ubuntu1) ... 247s Selecting previously unselected package autotools-dev. 247s Preparing to unpack .../006-autotools-dev_20240727.1_all.deb ... 247s Unpacking autotools-dev (20240727.1) ... 247s Selecting previously unselected package automake. 247s Preparing to unpack .../007-automake_1%3a1.18.1-3build1_all.deb ... 247s Unpacking automake (1:1.18.1-3build1) ... 247s Selecting previously unselected package autopoint. 247s Preparing to unpack .../008-autopoint_0.23.2-1_all.deb ... 247s Unpacking autopoint (0.23.2-1) ... 247s Selecting previously unselected package libcapture-tiny-perl. 247s Preparing to unpack .../009-libcapture-tiny-perl_0.50-1_all.deb ... 247s Unpacking libcapture-tiny-perl (0.50-1) ... 247s Selecting previously unselected package libparams-util-perl. 247s Preparing to unpack .../010-libparams-util-perl_1.102-3build1_ppc64el.deb ... 247s Unpacking libparams-util-perl (1.102-3build1) ... 247s Selecting previously unselected package libsub-install-perl. 247s Preparing to unpack .../011-libsub-install-perl_0.929-1_all.deb ... 247s Unpacking libsub-install-perl (0.929-1) ... 247s Selecting previously unselected package libdata-optlist-perl. 247s Preparing to unpack .../012-libdata-optlist-perl_0.114-1_all.deb ... 247s Unpacking libdata-optlist-perl (0.114-1) ... 247s Selecting previously unselected package libb-hooks-op-check-perl:ppc64el. 247s Preparing to unpack .../013-libb-hooks-op-check-perl_0.22-3build2_ppc64el.deb ... 247s Unpacking libb-hooks-op-check-perl:ppc64el (0.22-3build2) ... 247s Selecting previously unselected package libdynaloader-functions-perl. 247s Preparing to unpack .../014-libdynaloader-functions-perl_0.004-2_all.deb ... 247s Unpacking libdynaloader-functions-perl (0.004-2) ... 247s Selecting previously unselected package libdevel-callchecker-perl:ppc64el. 247s Preparing to unpack .../015-libdevel-callchecker-perl_0.009-2_ppc64el.deb ... 247s Unpacking libdevel-callchecker-perl:ppc64el (0.009-2) ... 247s Selecting previously unselected package libparams-classify-perl:ppc64el. 247s Preparing to unpack .../016-libparams-classify-perl_0.015-2build6_ppc64el.deb ... 247s Unpacking libparams-classify-perl:ppc64el (0.015-2build6) ... 247s Selecting previously unselected package libmodule-runtime-perl. 247s Preparing to unpack .../017-libmodule-runtime-perl_0.018-1_all.deb ... 247s Unpacking libmodule-runtime-perl (0.018-1) ... 247s Selecting previously unselected package libtry-tiny-perl. 247s Preparing to unpack .../018-libtry-tiny-perl_0.32-1_all.deb ... 247s Unpacking libtry-tiny-perl (0.32-1) ... 247s Selecting previously unselected package libmodule-implementation-perl. 247s Preparing to unpack .../019-libmodule-implementation-perl_0.09-2_all.deb ... 247s Unpacking libmodule-implementation-perl (0.09-2) ... 247s Selecting previously unselected package libpackage-stash-perl. 247s Preparing to unpack .../020-libpackage-stash-perl_0.40-1_all.deb ... 247s Unpacking libpackage-stash-perl (0.40-1) ... 247s Selecting previously unselected package libclass-load-perl. 247s Preparing to unpack .../021-libclass-load-perl_0.25-2_all.deb ... 247s Unpacking libclass-load-perl (0.25-2) ... 247s Selecting previously unselected package libio-stringy-perl. 247s Preparing to unpack .../022-libio-stringy-perl_2.113-2_all.deb ... 247s Unpacking libio-stringy-perl (2.113-2) ... 247s Selecting previously unselected package libparams-validate-perl:ppc64el. 247s Preparing to unpack .../023-libparams-validate-perl_1.31-2build4_ppc64el.deb ... 247s Unpacking libparams-validate-perl:ppc64el (1.31-2build4) ... 247s Selecting previously unselected package libsub-exporter-perl. 247s Preparing to unpack .../024-libsub-exporter-perl_0.990-1_all.deb ... 247s Unpacking libsub-exporter-perl (0.990-1) ... 247s Selecting previously unselected package libgetopt-long-descriptive-perl. 247s Preparing to unpack .../025-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 247s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 247s Selecting previously unselected package libio-tiecombine-perl. 247s Preparing to unpack .../026-libio-tiecombine-perl_1.005-3_all.deb ... 247s Unpacking libio-tiecombine-perl (1.005-3) ... 247s Selecting previously unselected package libmodule-pluggable-perl. 247s Preparing to unpack .../027-libmodule-pluggable-perl_5.2-5_all.deb ... 247s Unpacking libmodule-pluggable-perl (5.2-5) ... 247s Selecting previously unselected package libstring-rewriteprefix-perl. 247s Preparing to unpack .../028-libstring-rewriteprefix-perl_0.009-1_all.deb ... 247s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 247s Selecting previously unselected package libapp-cmd-perl. 247s Preparing to unpack .../029-libapp-cmd-perl_0.338-1_all.deb ... 247s Unpacking libapp-cmd-perl (0.338-1) ... 247s Selecting previously unselected package libboolean-perl. 247s Preparing to unpack .../030-libboolean-perl_0.46-3_all.deb ... 247s Unpacking libboolean-perl (0.46-3) ... 247s Selecting previously unselected package libsub-uplevel-perl. 247s Preparing to unpack .../031-libsub-uplevel-perl_0.2800-3_all.deb ... 247s Unpacking libsub-uplevel-perl (0.2800-3) ... 247s Selecting previously unselected package libtest-exception-perl. 247s Preparing to unpack .../032-libtest-exception-perl_0.43-3_all.deb ... 247s Unpacking libtest-exception-perl (0.43-3) ... 247s Selecting previously unselected package libcarp-assert-more-perl. 247s Preparing to unpack .../033-libcarp-assert-more-perl_2.9.0-1_all.deb ... 247s Unpacking libcarp-assert-more-perl (2.9.0-1) ... 247s Selecting previously unselected package libfile-which-perl. 247s Preparing to unpack .../034-libfile-which-perl_1.27-2_all.deb ... 247s Unpacking libfile-which-perl (1.27-2) ... 247s Selecting previously unselected package libfile-homedir-perl. 247s Preparing to unpack .../035-libfile-homedir-perl_1.006-2_all.deb ... 247s Unpacking libfile-homedir-perl (1.006-2) ... 247s Selecting previously unselected package libclone-choose-perl. 247s Preparing to unpack .../036-libclone-choose-perl_0.010-2_all.deb ... 247s Unpacking libclone-choose-perl (0.010-2) ... 247s Selecting previously unselected package libhash-merge-perl. 247s Preparing to unpack .../037-libhash-merge-perl_0.302-1_all.deb ... 247s Unpacking libhash-merge-perl (0.302-1) ... 247s Selecting previously unselected package libjson-perl. 247s Preparing to unpack .../038-libjson-perl_4.10000-1_all.deb ... 247s Unpacking libjson-perl (4.10000-1) ... 247s Selecting previously unselected package libexporter-tiny-perl. 247s Preparing to unpack .../039-libexporter-tiny-perl_1.006003-1_all.deb ... 247s Unpacking libexporter-tiny-perl (1.006003-1) ... 247s Selecting previously unselected package liblist-moreutils-xs-perl. 247s Preparing to unpack .../040-liblist-moreutils-xs-perl_0.430-4build1_ppc64el.deb ... 247s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 247s Selecting previously unselected package liblist-moreutils-perl. 247s Preparing to unpack .../041-liblist-moreutils-perl_0.430-2_all.deb ... 247s Unpacking liblist-moreutils-perl (0.430-2) ... 247s Selecting previously unselected package liblog-log4perl-perl. 247s Preparing to unpack .../042-liblog-log4perl-perl_1.57-1_all.deb ... 247s Unpacking liblog-log4perl-perl (1.57-1) ... 247s Selecting previously unselected package libmouse-perl:ppc64el. 247s Preparing to unpack .../043-libmouse-perl_2.6.1-1_ppc64el.deb ... 247s Unpacking libmouse-perl:ppc64el (2.6.1-1) ... 247s Selecting previously unselected package libmousex-nativetraits-perl. 247s Preparing to unpack .../044-libmousex-nativetraits-perl_1.09-3_all.deb ... 247s Unpacking libmousex-nativetraits-perl (1.09-3) ... 247s Selecting previously unselected package libmousex-strictconstructor-perl. 247s Preparing to unpack .../045-libmousex-strictconstructor-perl_0.02-3_all.deb ... 247s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 247s Selecting previously unselected package libparse-recdescent-perl. 247s Preparing to unpack .../046-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 247s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 247s Selecting previously unselected package libpath-tiny-perl. 247s Preparing to unpack .../047-libpath-tiny-perl_0.148-1_all.deb ... 247s Unpacking libpath-tiny-perl (0.148-1) ... 247s Selecting previously unselected package libpod-pom-perl. 247s Preparing to unpack .../048-libpod-pom-perl_2.01-4_all.deb ... 247s Unpacking libpod-pom-perl (2.01-4) ... 247s Selecting previously unselected package libregexp-common-perl. 247s Preparing to unpack .../049-libregexp-common-perl_2024080801-1_all.deb ... 247s Unpacking libregexp-common-perl (2024080801-1) ... 247s Selecting previously unselected package libyaml-tiny-perl. 247s Preparing to unpack .../050-libyaml-tiny-perl_1.76-1_all.deb ... 247s Unpacking libyaml-tiny-perl (1.76-1) ... 247s Selecting previously unselected package libconfig-model-perl. 247s Preparing to unpack .../051-libconfig-model-perl_2.155-1_all.deb ... 247s Unpacking libconfig-model-perl (2.155-1) ... 248s Selecting previously unselected package libyaml-pp-perl. 248s Preparing to unpack .../052-libyaml-pp-perl_0.39.0-1_all.deb ... 248s Unpacking libyaml-pp-perl (0.39.0-1) ... 248s Selecting previously unselected package cme. 248s Preparing to unpack .../053-cme_1.044-2_all.deb ... 248s Unpacking cme (1.044-2) ... 248s Selecting previously unselected package libisl23:ppc64el. 248s Preparing to unpack .../054-libisl23_0.27-1build1_ppc64el.deb ... 248s Unpacking libisl23:ppc64el (0.27-1build1) ... 248s Selecting previously unselected package libmpc3:ppc64el. 248s Preparing to unpack .../055-libmpc3_1.3.1-2_ppc64el.deb ... 248s Unpacking libmpc3:ppc64el (1.3.1-2) ... 248s Selecting previously unselected package cpp-15-powerpc64le-linux-gnu. 248s Preparing to unpack .../056-cpp-15-powerpc64le-linux-gnu_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking cpp-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package cpp-15. 248s Preparing to unpack .../057-cpp-15_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking cpp-15 (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package cpp-powerpc64le-linux-gnu. 248s Preparing to unpack .../058-cpp-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 248s Unpacking cpp-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 248s Selecting previously unselected package cpp. 248s Preparing to unpack .../059-cpp_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 248s Unpacking cpp (4:15.2.0-4ubuntu1) ... 248s Selecting previously unselected package libdebhelper-perl. 248s Preparing to unpack .../060-libdebhelper-perl_13.28ubuntu1_all.deb ... 248s Unpacking libdebhelper-perl (13.28ubuntu1) ... 248s Selecting previously unselected package libcc1-0:ppc64el. 248s Preparing to unpack .../061-libcc1-0_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libcc1-0:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libgomp1:ppc64el. 248s Preparing to unpack .../062-libgomp1_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libgomp1:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libitm1:ppc64el. 248s Preparing to unpack .../063-libitm1_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libitm1:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libasan8:ppc64el. 248s Preparing to unpack .../064-libasan8_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libasan8:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package liblsan0:ppc64el. 248s Preparing to unpack .../065-liblsan0_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking liblsan0:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libtsan2:ppc64el. 248s Preparing to unpack .../066-libtsan2_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libtsan2:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libubsan1:ppc64el. 248s Preparing to unpack .../067-libubsan1_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libubsan1:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libquadmath0:ppc64el. 248s Preparing to unpack .../068-libquadmath0_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libquadmath0:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package libgcc-15-dev:ppc64el. 248s Preparing to unpack .../069-libgcc-15-dev_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking libgcc-15-dev:ppc64el (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package gcc-15-powerpc64le-linux-gnu. 248s Preparing to unpack .../070-gcc-15-powerpc64le-linux-gnu_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking gcc-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package gcc-15. 248s Preparing to unpack .../071-gcc-15_15.2.0-12ubuntu1_ppc64el.deb ... 248s Unpacking gcc-15 (15.2.0-12ubuntu1) ... 248s Selecting previously unselected package gcc-powerpc64le-linux-gnu. 248s Preparing to unpack .../072-gcc-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 248s Unpacking gcc-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 248s Selecting previously unselected package gcc. 248s Preparing to unpack .../073-gcc_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 248s Unpacking gcc (4:15.2.0-4ubuntu1) ... 248s Selecting previously unselected package libc-dev-bin. 248s Preparing to unpack .../074-libc-dev-bin_2.42-2ubuntu5_ppc64el.deb ... 248s Unpacking libc-dev-bin (2.42-2ubuntu5) ... 249s Selecting previously unselected package linux-libc-dev:ppc64el. 249s Preparing to unpack .../075-linux-libc-dev_6.18.0-9.9_ppc64el.deb ... 249s Unpacking linux-libc-dev:ppc64el (6.18.0-9.9) ... 249s Selecting previously unselected package libcrypt-dev:ppc64el. 249s Preparing to unpack .../076-libcrypt-dev_1%3a4.5.1-1_ppc64el.deb ... 249s Unpacking libcrypt-dev:ppc64el (1:4.5.1-1) ... 249s Selecting previously unselected package rpcsvc-proto. 249s Preparing to unpack .../077-rpcsvc-proto_1.4.3-1build1_ppc64el.deb ... 249s Unpacking rpcsvc-proto (1.4.3-1build1) ... 249s Selecting previously unselected package libc6-dev:ppc64el. 249s Preparing to unpack .../078-libc6-dev_2.42-2ubuntu5_ppc64el.deb ... 249s Unpacking libc6-dev:ppc64el (2.42-2ubuntu5) ... 249s Selecting previously unselected package libtool. 249s Preparing to unpack .../079-libtool_2.5.4-9_all.deb ... 249s Unpacking libtool (2.5.4-9) ... 249s Selecting previously unselected package dh-autoreconf. 249s Preparing to unpack .../080-dh-autoreconf_21_all.deb ... 249s Unpacking dh-autoreconf (21) ... 249s Selecting previously unselected package libarchive-zip-perl. 249s Preparing to unpack .../081-libarchive-zip-perl_1.68-1_all.deb ... 249s Unpacking libarchive-zip-perl (1.68-1) ... 249s Selecting previously unselected package libfile-stripnondeterminism-perl. 249s Preparing to unpack .../082-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 249s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 249s Selecting previously unselected package dh-strip-nondeterminism. 249s Preparing to unpack .../083-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 249s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 249s Selecting previously unselected package debugedit. 249s Preparing to unpack .../084-debugedit_1%3a5.2-3build1_ppc64el.deb ... 249s Unpacking debugedit (1:5.2-3build1) ... 249s Selecting previously unselected package dwz. 249s Preparing to unpack .../085-dwz_0.16-2_ppc64el.deb ... 249s Unpacking dwz (0.16-2) ... 249s Selecting previously unselected package gettext. 249s Preparing to unpack .../086-gettext_0.23.2-1_ppc64el.deb ... 249s Unpacking gettext (0.23.2-1) ... 249s Selecting previously unselected package intltool-debian. 249s Preparing to unpack .../087-intltool-debian_0.35.0+20060710.6build1_all.deb ... 249s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 249s Selecting previously unselected package po-debconf. 249s Preparing to unpack .../088-po-debconf_1.0.22_all.deb ... 249s Unpacking po-debconf (1.0.22) ... 249s Selecting previously unselected package debhelper. 249s Preparing to unpack .../089-debhelper_13.28ubuntu1_all.deb ... 249s Unpacking debhelper (13.28ubuntu1) ... 249s Selecting previously unselected package aglfn. 249s Preparing to unpack .../090-aglfn_1.7+git20191031.4036a9c-2build1_all.deb ... 249s Unpacking aglfn (1.7+git20191031.4036a9c-2build1) ... 249s Selecting previously unselected package gnuplot-data. 249s Preparing to unpack .../091-gnuplot-data_6.0.2+dfsg1-2ubuntu1_all.deb ... 249s Unpacking gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 249s Selecting previously unselected package fonts-freefont-otf. 249s Preparing to unpack .../092-fonts-freefont-otf_20211204+svn4273-4build1_all.deb ... 249s Unpacking fonts-freefont-otf (20211204+svn4273-4build1) ... 249s Selecting previously unselected package fontconfig-config. 249s Preparing to unpack .../093-fontconfig-config_2.17.1-3ubuntu1_ppc64el.deb ... 249s Unpacking fontconfig-config (2.17.1-3ubuntu1) ... 249s Selecting previously unselected package libfontconfig1:ppc64el. 249s Preparing to unpack .../094-libfontconfig1_2.17.1-3ubuntu1_ppc64el.deb ... 249s Unpacking libfontconfig1:ppc64el (2.17.1-3ubuntu1) ... 250s Selecting previously unselected package libpixman-1-0:ppc64el. 250s Preparing to unpack .../095-libpixman-1-0_0.46.4-1_ppc64el.deb ... 250s Unpacking libpixman-1-0:ppc64el (0.46.4-1) ... 250s Selecting previously unselected package libxcb-render0:ppc64el. 250s Preparing to unpack .../096-libxcb-render0_1.17.0-2ubuntu1_ppc64el.deb ... 250s Unpacking libxcb-render0:ppc64el (1.17.0-2ubuntu1) ... 250s Selecting previously unselected package libxcb-shm0:ppc64el. 250s Preparing to unpack .../097-libxcb-shm0_1.17.0-2ubuntu1_ppc64el.deb ... 250s Unpacking libxcb-shm0:ppc64el (1.17.0-2ubuntu1) ... 250s Selecting previously unselected package libxrender1:ppc64el. 250s Preparing to unpack .../098-libxrender1_1%3a0.9.12-1_ppc64el.deb ... 250s Unpacking libxrender1:ppc64el (1:0.9.12-1) ... 250s Selecting previously unselected package libcairo2:ppc64el. 250s Preparing to unpack .../099-libcairo2_1.18.4-3_ppc64el.deb ... 250s Unpacking libcairo2:ppc64el (1.18.4-3) ... 250s Selecting previously unselected package libsharpyuv0:ppc64el. 250s Preparing to unpack .../100-libsharpyuv0_1.5.0-0.1build1_ppc64el.deb ... 250s Unpacking libsharpyuv0:ppc64el (1.5.0-0.1build1) ... 250s Selecting previously unselected package libaom3:ppc64el. 250s Preparing to unpack .../101-libaom3_3.13.1-2_ppc64el.deb ... 250s Unpacking libaom3:ppc64el (3.13.1-2) ... 250s Selecting previously unselected package libheif-plugin-aomdec:ppc64el. 250s Preparing to unpack .../102-libheif-plugin-aomdec_1.21.2-1_ppc64el.deb ... 250s Unpacking libheif-plugin-aomdec:ppc64el (1.21.2-1) ... 250s Selecting previously unselected package libde265-0:ppc64el. 250s Preparing to unpack .../103-libde265-0_1.0.16-1build1_ppc64el.deb ... 250s Unpacking libde265-0:ppc64el (1.0.16-1build1) ... 250s Selecting previously unselected package libheif-plugin-libde265:ppc64el. 250s Preparing to unpack .../104-libheif-plugin-libde265_1.21.2-1_ppc64el.deb ... 250s Unpacking libheif-plugin-libde265:ppc64el (1.21.2-1) ... 250s Selecting previously unselected package libheif1:ppc64el. 250s Preparing to unpack .../105-libheif1_1.21.2-1_ppc64el.deb ... 250s Unpacking libheif1:ppc64el (1.21.2-1) ... 250s Selecting previously unselected package libimagequant0:ppc64el. 250s Preparing to unpack .../106-libimagequant0_2.18.0-1build1_ppc64el.deb ... 250s Unpacking libimagequant0:ppc64el (2.18.0-1build1) ... 250s Selecting previously unselected package libjpeg-turbo8:ppc64el. 250s Preparing to unpack .../107-libjpeg-turbo8_2.1.5-4ubuntu2_ppc64el.deb ... 250s Unpacking libjpeg-turbo8:ppc64el (2.1.5-4ubuntu2) ... 250s Selecting previously unselected package libjpeg8:ppc64el. 250s Preparing to unpack .../108-libjpeg8_8c-2ubuntu11_ppc64el.deb ... 250s Unpacking libjpeg8:ppc64el (8c-2ubuntu11) ... 250s Selecting previously unselected package libdeflate0:ppc64el. 250s Preparing to unpack .../109-libdeflate0_1.23-2_ppc64el.deb ... 250s Unpacking libdeflate0:ppc64el (1.23-2) ... 250s Selecting previously unselected package libjbig0:ppc64el. 250s Preparing to unpack .../110-libjbig0_2.1-6.1ubuntu3_ppc64el.deb ... 250s Unpacking libjbig0:ppc64el (2.1-6.1ubuntu3) ... 250s Selecting previously unselected package liblerc4:ppc64el. 250s Preparing to unpack .../111-liblerc4_4.0.0+ds-5ubuntu2_ppc64el.deb ... 250s Unpacking liblerc4:ppc64el (4.0.0+ds-5ubuntu2) ... 250s Selecting previously unselected package libwebp7:ppc64el. 250s Preparing to unpack .../112-libwebp7_1.5.0-0.1build1_ppc64el.deb ... 250s Unpacking libwebp7:ppc64el (1.5.0-0.1build1) ... 250s Selecting previously unselected package libtiff6:ppc64el. 250s Preparing to unpack .../113-libtiff6_4.7.0-3ubuntu3_ppc64el.deb ... 250s Unpacking libtiff6:ppc64el (4.7.0-3ubuntu3) ... 250s Selecting previously unselected package libxpm4:ppc64el. 250s Preparing to unpack .../114-libxpm4_1%3a3.5.17-1build3_ppc64el.deb ... 250s Unpacking libxpm4:ppc64el (1:3.5.17-1build3) ... 250s Selecting previously unselected package libgd3:ppc64el. 250s Preparing to unpack .../115-libgd3_2.3.3-13ubuntu1_ppc64el.deb ... 250s Unpacking libgd3:ppc64el (2.3.3-13ubuntu1) ... 250s Selecting previously unselected package liblua5.4-0:ppc64el. 250s Preparing to unpack .../116-liblua5.4-0_5.4.8-1_ppc64el.deb ... 250s Unpacking liblua5.4-0:ppc64el (5.4.8-1) ... 250s Selecting previously unselected package fontconfig. 250s Preparing to unpack .../117-fontconfig_2.17.1-3ubuntu1_ppc64el.deb ... 250s Unpacking fontconfig (2.17.1-3ubuntu1) ... 250s Selecting previously unselected package libgraphite2-3:ppc64el. 250s Preparing to unpack .../118-libgraphite2-3_1.3.14-11ubuntu1_ppc64el.deb ... 250s Unpacking libgraphite2-3:ppc64el (1.3.14-11ubuntu1) ... 250s Selecting previously unselected package libharfbuzz0b:ppc64el. 250s Preparing to unpack .../119-libharfbuzz0b_12.3.2-1_ppc64el.deb ... 250s Unpacking libharfbuzz0b:ppc64el (12.3.2-1) ... 250s Selecting previously unselected package libthai-data. 250s Preparing to unpack .../120-libthai-data_0.1.30-1_all.deb ... 250s Unpacking libthai-data (0.1.30-1) ... 250s Selecting previously unselected package libdatrie1:ppc64el. 250s Preparing to unpack .../121-libdatrie1_0.2.14-1_ppc64el.deb ... 250s Unpacking libdatrie1:ppc64el (0.2.14-1) ... 250s Selecting previously unselected package libthai0:ppc64el. 250s Preparing to unpack .../122-libthai0_0.1.30-1_ppc64el.deb ... 250s Unpacking libthai0:ppc64el (0.1.30-1) ... 250s Selecting previously unselected package libpango-1.0-0:ppc64el. 250s Preparing to unpack .../123-libpango-1.0-0_1.57.0-1_ppc64el.deb ... 250s Unpacking libpango-1.0-0:ppc64el (1.57.0-1) ... 250s Selecting previously unselected package libpangoft2-1.0-0:ppc64el. 250s Preparing to unpack .../124-libpangoft2-1.0-0_1.57.0-1_ppc64el.deb ... 250s Unpacking libpangoft2-1.0-0:ppc64el (1.57.0-1) ... 250s Selecting previously unselected package libpangocairo-1.0-0:ppc64el. 250s Preparing to unpack .../125-libpangocairo-1.0-0_1.57.0-1_ppc64el.deb ... 250s Unpacking libpangocairo-1.0-0:ppc64el (1.57.0-1) ... 250s Selecting previously unselected package libwebpmux3:ppc64el. 250s Preparing to unpack .../126-libwebpmux3_1.5.0-0.1build1_ppc64el.deb ... 250s Unpacking libwebpmux3:ppc64el (1.5.0-0.1build1) ... 250s Selecting previously unselected package gnuplot-nox. 250s Preparing to unpack .../127-gnuplot-nox_6.0.2+dfsg1-2ubuntu1_ppc64el.deb ... 250s Unpacking gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 250s Selecting previously unselected package dh-octave-autopkgtest. 250s Preparing to unpack .../128-dh-octave-autopkgtest_1.14.0_all.deb ... 250s Unpacking dh-octave-autopkgtest (1.14.0) ... 250s Selecting previously unselected package libapt-pkg-perl. 250s Preparing to unpack .../129-libapt-pkg-perl_0.1.43_ppc64el.deb ... 250s Unpacking libapt-pkg-perl (0.1.43) ... 250s Selecting previously unselected package libarray-intspan-perl. 250s Preparing to unpack .../130-libarray-intspan-perl_2.004-2_all.deb ... 250s Unpacking libarray-intspan-perl (2.004-2) ... 250s Selecting previously unselected package libconfig-inifiles-perl. 250s Preparing to unpack .../131-libconfig-inifiles-perl_3.000003-4_all.deb ... 250s Unpacking libconfig-inifiles-perl (3.000003-4) ... 250s Selecting previously unselected package libyaml-libyaml-perl. 250s Preparing to unpack .../132-libyaml-libyaml-perl_0.904.0+ds-1_ppc64el.deb ... 250s Unpacking libyaml-libyaml-perl (0.904.0+ds-1) ... 250s Selecting previously unselected package libconfig-model-backend-yaml-perl. 250s Preparing to unpack .../133-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 250s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 250s Selecting previously unselected package libexporter-lite-perl. 250s Preparing to unpack .../134-libexporter-lite-perl_0.09-2_all.deb ... 250s Unpacking libexporter-lite-perl (0.09-2) ... 250s Selecting previously unselected package libencode-locale-perl. 250s Preparing to unpack .../135-libencode-locale-perl_1.05-3_all.deb ... 250s Unpacking libencode-locale-perl (1.05-3) ... 250s Selecting previously unselected package libtimedate-perl. 250s Preparing to unpack .../136-libtimedate-perl_2.3300-2_all.deb ... 250s Unpacking libtimedate-perl (2.3300-2) ... 250s Selecting previously unselected package libhttp-date-perl. 250s Preparing to unpack .../137-libhttp-date-perl_6.06-1_all.deb ... 250s Unpacking libhttp-date-perl (6.06-1) ... 250s Selecting previously unselected package libfile-listing-perl. 250s Preparing to unpack .../138-libfile-listing-perl_6.16-1_all.deb ... 250s Unpacking libfile-listing-perl (6.16-1) ... 250s Selecting previously unselected package libhtml-tagset-perl. 250s Preparing to unpack .../139-libhtml-tagset-perl_3.24-1_all.deb ... 250s Unpacking libhtml-tagset-perl (3.24-1) ... 250s Selecting previously unselected package liburi-perl. 250s Preparing to unpack .../140-liburi-perl_5.34-2build1_all.deb ... 250s Unpacking liburi-perl (5.34-2build1) ... 250s Selecting previously unselected package libhtml-parser-perl:ppc64el. 250s Preparing to unpack .../141-libhtml-parser-perl_3.83-1build1_ppc64el.deb ... 250s Unpacking libhtml-parser-perl:ppc64el (3.83-1build1) ... 250s Selecting previously unselected package libhtml-tree-perl. 250s Preparing to unpack .../142-libhtml-tree-perl_5.07-3_all.deb ... 250s Unpacking libhtml-tree-perl (5.07-3) ... 250s Selecting previously unselected package libclone-perl:ppc64el. 250s Preparing to unpack .../143-libclone-perl_0.47-1_ppc64el.deb ... 250s Unpacking libclone-perl:ppc64el (0.47-1) ... 250s Selecting previously unselected package libio-html-perl. 250s Preparing to unpack .../144-libio-html-perl_1.004-3_all.deb ... 250s Unpacking libio-html-perl (1.004-3) ... 250s Selecting previously unselected package liblwp-mediatypes-perl. 250s Preparing to unpack .../145-liblwp-mediatypes-perl_6.04-2_all.deb ... 250s Unpacking liblwp-mediatypes-perl (6.04-2) ... 250s Selecting previously unselected package libhttp-message-perl. 250s Preparing to unpack .../146-libhttp-message-perl_7.01-1ubuntu1_all.deb ... 250s Unpacking libhttp-message-perl (7.01-1ubuntu1) ... 250s Selecting previously unselected package libhttp-cookies-perl. 250s Preparing to unpack .../147-libhttp-cookies-perl_6.11-1_all.deb ... 250s Unpacking libhttp-cookies-perl (6.11-1) ... 250s Selecting previously unselected package libhttp-negotiate-perl. 250s Preparing to unpack .../148-libhttp-negotiate-perl_6.01-2_all.deb ... 250s Unpacking libhttp-negotiate-perl (6.01-2) ... 250s Selecting previously unselected package perl-openssl-defaults:ppc64el. 251s Preparing to unpack .../149-perl-openssl-defaults_7build4_ppc64el.deb ... 251s Unpacking perl-openssl-defaults:ppc64el (7build4) ... 251s Selecting previously unselected package libnet-ssleay-perl:ppc64el. 251s Preparing to unpack .../150-libnet-ssleay-perl_1.94-3_ppc64el.deb ... 251s Unpacking libnet-ssleay-perl:ppc64el (1.94-3) ... 251s Selecting previously unselected package libio-socket-ssl-perl. 251s Preparing to unpack .../151-libio-socket-ssl-perl_2.098-1_all.deb ... 251s Unpacking libio-socket-ssl-perl (2.098-1) ... 251s Selecting previously unselected package libnet-http-perl. 251s Preparing to unpack .../152-libnet-http-perl_6.24-1build1_all.deb ... 251s Unpacking libnet-http-perl (6.24-1build1) ... 251s Selecting previously unselected package liblwp-protocol-https-perl. 251s Preparing to unpack .../153-liblwp-protocol-https-perl_6.14-1_all.deb ... 251s Unpacking liblwp-protocol-https-perl (6.14-1) ... 251s Selecting previously unselected package libwww-robotrules-perl. 251s Preparing to unpack .../154-libwww-robotrules-perl_6.02-1build1_all.deb ... 251s Unpacking libwww-robotrules-perl (6.02-1build1) ... 251s Selecting previously unselected package libwww-perl. 251s Preparing to unpack .../155-libwww-perl_6.81-1build1_all.deb ... 251s Unpacking libwww-perl (6.81-1build1) ... 251s Selecting previously unselected package liberror-perl. 251s Preparing to unpack .../156-liberror-perl_0.17030-1_all.deb ... 251s Unpacking liberror-perl (0.17030-1) ... 251s Selecting previously unselected package libparse-debcontrol-perl. 251s Preparing to unpack .../157-libparse-debcontrol-perl_2.005-6_all.deb ... 251s Unpacking libparse-debcontrol-perl (2.005-6) ... 251s Selecting previously unselected package libsoftware-copyright-perl. 251s Preparing to unpack .../158-libsoftware-copyright-perl_0.015-1_all.deb ... 251s Unpacking libsoftware-copyright-perl (0.015-1) ... 251s Selecting previously unselected package libalgorithm-c3-perl. 251s Preparing to unpack .../159-libalgorithm-c3-perl_0.11-2_all.deb ... 251s Unpacking libalgorithm-c3-perl (0.11-2) ... 251s Selecting previously unselected package libclass-c3-perl. 251s Preparing to unpack .../160-libclass-c3-perl_0.35-2_all.deb ... 251s Unpacking libclass-c3-perl (0.35-2) ... 251s Selecting previously unselected package libmro-compat-perl. 251s Preparing to unpack .../161-libmro-compat-perl_0.15-2_all.deb ... 251s Unpacking libmro-compat-perl (0.15-2) ... 251s Selecting previously unselected package libdata-section-perl. 251s Preparing to unpack .../162-libdata-section-perl_0.200008-1_all.deb ... 251s Unpacking libdata-section-perl (0.200008-1) ... 251s Selecting previously unselected package libtext-template-perl. 251s Preparing to unpack .../163-libtext-template-perl_1.61-1_all.deb ... 251s Unpacking libtext-template-perl (1.61-1) ... 251s Selecting previously unselected package libsoftware-license-perl. 251s Preparing to unpack .../164-libsoftware-license-perl_0.104007-1_all.deb ... 251s Unpacking libsoftware-license-perl (0.104007-1) ... 251s Selecting previously unselected package libsoftware-licensemoreutils-perl. 251s Preparing to unpack .../165-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 251s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 251s Selecting previously unselected package libsort-versions-perl. 251s Preparing to unpack .../166-libsort-versions-perl_1.62-3_all.deb ... 251s Unpacking libsort-versions-perl (1.62-3) ... 251s Selecting previously unselected package libtext-reform-perl. 251s Preparing to unpack .../167-libtext-reform-perl_1.20-5_all.deb ... 251s Unpacking libtext-reform-perl (1.20-5) ... 251s Selecting previously unselected package libtext-autoformat-perl. 251s Preparing to unpack .../168-libtext-autoformat-perl_1.750000-2_all.deb ... 251s Unpacking libtext-autoformat-perl (1.750000-2) ... 251s Selecting previously unselected package libtext-levenshtein-damerau-perl. 251s Preparing to unpack .../169-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 251s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 251s Selecting previously unselected package libtoml-tiny-perl. 251s Preparing to unpack .../170-libtoml-tiny-perl_0.20-1_all.deb ... 251s Unpacking libtoml-tiny-perl (0.20-1) ... 251s Selecting previously unselected package libclass-inspector-perl. 251s Preparing to unpack .../171-libclass-inspector-perl_1.36-3_all.deb ... 251s Unpacking libclass-inspector-perl (1.36-3) ... 251s Selecting previously unselected package libfile-sharedir-perl. 251s Preparing to unpack .../172-libfile-sharedir-perl_1.118-3_all.deb ... 251s Unpacking libfile-sharedir-perl (1.118-3) ... 251s Selecting previously unselected package libindirect-perl. 251s Preparing to unpack .../173-libindirect-perl_0.39-2build5_ppc64el.deb ... 251s Unpacking libindirect-perl (0.39-2build5) ... 251s Selecting previously unselected package libxs-parse-keyword-perl. 251s Preparing to unpack .../174-libxs-parse-keyword-perl_0.49-1_ppc64el.deb ... 251s Unpacking libxs-parse-keyword-perl (0.49-1) ... 251s Selecting previously unselected package libxs-parse-sublike-perl:ppc64el. 251s Preparing to unpack .../175-libxs-parse-sublike-perl_0.41-1_ppc64el.deb ... 251s Unpacking libxs-parse-sublike-perl:ppc64el (0.41-1) ... 251s Selecting previously unselected package libobject-pad-perl. 251s Preparing to unpack .../176-libobject-pad-perl_0.823-2_ppc64el.deb ... 251s Unpacking libobject-pad-perl (0.823-2) ... 251s Selecting previously unselected package libsyntax-keyword-try-perl. 251s Preparing to unpack .../177-libsyntax-keyword-try-perl_0.31-1_ppc64el.deb ... 251s Unpacking libsyntax-keyword-try-perl (0.31-1) ... 251s Selecting previously unselected package libio-interactive-perl. 251s Preparing to unpack .../178-libio-interactive-perl_1.027-1_all.deb ... 251s Unpacking libio-interactive-perl (1.027-1) ... 251s Selecting previously unselected package liblog-any-perl. 251s Preparing to unpack .../179-liblog-any-perl_1.718-1build1_all.deb ... 251s Unpacking liblog-any-perl (1.718-1build1) ... 251s Selecting previously unselected package liblog-any-adapter-screen-perl. 251s Preparing to unpack .../180-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 251s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 251s Selecting previously unselected package libsub-exporter-progressive-perl. 251s Preparing to unpack .../181-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 251s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 251s Selecting previously unselected package libvariable-magic-perl. 251s Preparing to unpack .../182-libvariable-magic-perl_0.64-1build1_ppc64el.deb ... 251s Unpacking libvariable-magic-perl (0.64-1build1) ... 251s Selecting previously unselected package libb-hooks-endofscope-perl. 251s Preparing to unpack .../183-libb-hooks-endofscope-perl_0.28-2_all.deb ... 251s Unpacking libb-hooks-endofscope-perl (0.28-2) ... 251s Selecting previously unselected package libsub-identify-perl. 251s Preparing to unpack .../184-libsub-identify-perl_0.14-4_ppc64el.deb ... 251s Unpacking libsub-identify-perl (0.14-4) ... 251s Selecting previously unselected package libsub-name-perl:ppc64el. 251s Preparing to unpack .../185-libsub-name-perl_0.28-1_ppc64el.deb ... 251s Unpacking libsub-name-perl:ppc64el (0.28-1) ... 251s Selecting previously unselected package libnamespace-clean-perl. 251s Preparing to unpack .../186-libnamespace-clean-perl_0.27-2_all.deb ... 251s Unpacking libnamespace-clean-perl (0.27-2) ... 251s Selecting previously unselected package libnumber-compare-perl. 251s Preparing to unpack .../187-libnumber-compare-perl_0.03-3_all.deb ... 251s Unpacking libnumber-compare-perl (0.03-3) ... 251s Selecting previously unselected package libtext-glob-perl. 251s Preparing to unpack .../188-libtext-glob-perl_0.11-3_all.deb ... 251s Unpacking libtext-glob-perl (0.11-3) ... 251s Selecting previously unselected package libpath-iterator-rule-perl. 251s Preparing to unpack .../189-libpath-iterator-rule-perl_1.015-2_all.deb ... 251s Unpacking libpath-iterator-rule-perl (1.015-2) ... 251s Selecting previously unselected package libpod-parser-perl. 251s Preparing to unpack .../190-libpod-parser-perl_1.67-1_all.deb ... 251s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 251s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 251s Unpacking libpod-parser-perl (1.67-1) ... 251s Selecting previously unselected package libpod-constants-perl. 251s Preparing to unpack .../191-libpod-constants-perl_0.19-2_all.deb ... 251s Unpacking libpod-constants-perl (0.19-2) ... 251s Selecting previously unselected package libset-intspan-perl. 251s Preparing to unpack .../192-libset-intspan-perl_1.19-3_all.deb ... 251s Unpacking libset-intspan-perl (1.19-3) ... 251s Selecting previously unselected package libstring-copyright-perl. 251s Preparing to unpack .../193-libstring-copyright-perl_0.003014-1_all.deb ... 251s Unpacking libstring-copyright-perl (0.003014-1) ... 251s Selecting previously unselected package libstring-escape-perl. 251s Preparing to unpack .../194-libstring-escape-perl_2010.002-3_all.deb ... 251s Unpacking libstring-escape-perl (2010.002-3) ... 251s Selecting previously unselected package libregexp-pattern-license-perl. 251s Preparing to unpack .../195-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 251s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 251s Selecting previously unselected package libregexp-pattern-perl. 251s Preparing to unpack .../196-libregexp-pattern-perl_0.2.14-2_all.deb ... 251s Unpacking libregexp-pattern-perl (0.2.14-2) ... 251s Selecting previously unselected package libstring-license-perl. 251s Preparing to unpack .../197-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 251s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 251s Selecting previously unselected package licensecheck. 251s Preparing to unpack .../198-licensecheck_3.3.9-1ubuntu2_all.deb ... 251s Unpacking licensecheck (3.3.9-1ubuntu2) ... 251s Selecting previously unselected package diffstat. 251s Preparing to unpack .../199-diffstat_1.68-1_ppc64el.deb ... 251s Unpacking diffstat (1.68-1) ... 251s Selecting previously unselected package libberkeleydb-perl:ppc64el. 251s Preparing to unpack .../200-libberkeleydb-perl_0.66-2_ppc64el.deb ... 251s Unpacking libberkeleydb-perl:ppc64el (0.66-2) ... 251s Selecting previously unselected package libclass-xsaccessor-perl. 251s Preparing to unpack .../201-libclass-xsaccessor-perl_1.19-4build6_ppc64el.deb ... 251s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 251s Selecting previously unselected package libconfig-tiny-perl. 251s Preparing to unpack .../202-libconfig-tiny-perl_2.30-1_all.deb ... 251s Unpacking libconfig-tiny-perl (2.30-1) ... 251s Selecting previously unselected package libconst-fast-perl. 251s Preparing to unpack .../203-libconst-fast-perl_0.014-2_all.deb ... 251s Unpacking libconst-fast-perl (0.014-2) ... 251s Selecting previously unselected package libcpanel-json-xs-perl:ppc64el. 251s Preparing to unpack .../204-libcpanel-json-xs-perl_4.40-1_ppc64el.deb ... 251s Unpacking libcpanel-json-xs-perl:ppc64el (4.40-1) ... 252s Selecting previously unselected package libaliased-perl. 252s Preparing to unpack .../205-libaliased-perl_0.34-3_all.deb ... 252s Unpacking libaliased-perl (0.34-3) ... 252s Selecting previously unselected package libclass-data-inheritable-perl. 252s Preparing to unpack .../206-libclass-data-inheritable-perl_0.10-1_all.deb ... 252s Unpacking libclass-data-inheritable-perl (0.10-1) ... 252s Selecting previously unselected package libdevel-stacktrace-perl. 252s Preparing to unpack .../207-libdevel-stacktrace-perl_2.0500-1_all.deb ... 252s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 252s Selecting previously unselected package libexception-class-perl. 252s Preparing to unpack .../208-libexception-class-perl_1.45-1_all.deb ... 252s Unpacking libexception-class-perl (1.45-1) ... 252s Selecting previously unselected package libiterator-perl. 252s Preparing to unpack .../209-libiterator-perl_0.03+ds1-2_all.deb ... 252s Unpacking libiterator-perl (0.03+ds1-2) ... 252s Selecting previously unselected package libiterator-util-perl. 252s Preparing to unpack .../210-libiterator-util-perl_0.02+ds1-2_all.deb ... 252s Unpacking libiterator-util-perl (0.02+ds1-2) ... 252s Selecting previously unselected package libdata-dpath-perl. 252s Preparing to unpack .../211-libdata-dpath-perl_0.60-1_all.deb ... 252s Unpacking libdata-dpath-perl (0.60-1) ... 252s Selecting previously unselected package libnet-domain-tld-perl. 252s Preparing to unpack .../212-libnet-domain-tld-perl_1.75-4_all.deb ... 252s Unpacking libnet-domain-tld-perl (1.75-4) ... 252s Selecting previously unselected package libdata-validate-domain-perl. 252s Preparing to unpack .../213-libdata-validate-domain-perl_0.15-1_all.deb ... 252s Unpacking libdata-validate-domain-perl (0.15-1) ... 252s Selecting previously unselected package libnet-ipv6addr-perl. 252s Preparing to unpack .../214-libnet-ipv6addr-perl_1.02-1_all.deb ... 252s Unpacking libnet-ipv6addr-perl (1.02-1) ... 252s Selecting previously unselected package libnet-netmask-perl. 252s Preparing to unpack .../215-libnet-netmask-perl_2.0003-1build1_all.deb ... 252s Unpacking libnet-netmask-perl (2.0003-1build1) ... 252s Selecting previously unselected package libnetaddr-ip-perl. 252s Preparing to unpack .../216-libnetaddr-ip-perl_4.079+dfsg-2build5_ppc64el.deb ... 252s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 252s Selecting previously unselected package libdata-validate-ip-perl. 252s Preparing to unpack .../217-libdata-validate-ip-perl_0.31-1_all.deb ... 252s Unpacking libdata-validate-ip-perl (0.31-1) ... 252s Selecting previously unselected package libdata-validate-uri-perl. 252s Preparing to unpack .../218-libdata-validate-uri-perl_0.07-3_all.deb ... 252s Unpacking libdata-validate-uri-perl (0.07-3) ... 252s Selecting previously unselected package libdevel-size-perl. 252s Preparing to unpack .../219-libdevel-size-perl_0.85-1_ppc64el.deb ... 252s Unpacking libdevel-size-perl (0.85-1) ... 252s Selecting previously unselected package libemail-address-xs-perl. 252s Preparing to unpack .../220-libemail-address-xs-perl_1.05-1build5_ppc64el.deb ... 252s Unpacking libemail-address-xs-perl (1.05-1build5) ... 252s Selecting previously unselected package libipc-system-simple-perl. 252s Preparing to unpack .../221-libipc-system-simple-perl_1.30-2_all.deb ... 252s Unpacking libipc-system-simple-perl (1.30-2) ... 252s Selecting previously unselected package libfile-basedir-perl. 252s Preparing to unpack .../222-libfile-basedir-perl_0.09-2_all.deb ... 252s Unpacking libfile-basedir-perl (0.09-2) ... 252s Selecting previously unselected package libfile-find-rule-perl. 252s Preparing to unpack .../223-libfile-find-rule-perl_0.35-1build1_all.deb ... 252s Unpacking libfile-find-rule-perl (0.35-1build1) ... 252s Selecting previously unselected package libio-string-perl. 252s Preparing to unpack .../224-libio-string-perl_1.08-4_all.deb ... 252s Unpacking libio-string-perl (1.08-4) ... 252s Selecting previously unselected package libfont-ttf-perl. 252s Preparing to unpack .../225-libfont-ttf-perl_1.06-2_all.deb ... 252s Unpacking libfont-ttf-perl (1.06-2) ... 252s Selecting previously unselected package libhtml-html5-entities-perl. 252s Preparing to unpack .../226-libhtml-html5-entities-perl_0.004-3_all.deb ... 252s Unpacking libhtml-html5-entities-perl (0.004-3) ... 252s Selecting previously unselected package libhtml-tokeparser-simple-perl. 252s Preparing to unpack .../227-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 252s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 252s Selecting previously unselected package libipc-run3-perl. 252s Preparing to unpack .../228-libipc-run3-perl_0.049-1_all.deb ... 252s Unpacking libipc-run3-perl (0.049-1) ... 252s Selecting previously unselected package libjson-maybexs-perl. 252s Preparing to unpack .../229-libjson-maybexs-perl_1.004008-1_all.deb ... 252s Unpacking libjson-maybexs-perl (1.004008-1) ... 252s Selecting previously unselected package liblist-compare-perl. 252s Preparing to unpack .../230-liblist-compare-perl_0.55-2_all.deb ... 252s Unpacking liblist-compare-perl (0.55-2) ... 252s Selecting previously unselected package liblist-someutils-perl. 252s Preparing to unpack .../231-liblist-someutils-perl_0.59-1_all.deb ... 252s Unpacking liblist-someutils-perl (0.59-1) ... 252s Selecting previously unselected package liblist-utilsby-perl. 252s Preparing to unpack .../232-liblist-utilsby-perl_0.12-2_all.deb ... 252s Unpacking liblist-utilsby-perl (0.12-2) ... 252s Selecting previously unselected package libmldbm-perl. 252s Preparing to unpack .../233-libmldbm-perl_2.05-4_all.deb ... 252s Unpacking libmldbm-perl (2.05-4) ... 252s Selecting previously unselected package libclass-method-modifiers-perl. 252s Preparing to unpack .../234-libclass-method-modifiers-perl_2.15-1_all.deb ... 252s Unpacking libclass-method-modifiers-perl (2.15-1) ... 252s Selecting previously unselected package libimport-into-perl. 252s Preparing to unpack .../235-libimport-into-perl_1.002005-2_all.deb ... 252s Unpacking libimport-into-perl (1.002005-2) ... 252s Selecting previously unselected package librole-tiny-perl. 252s Preparing to unpack .../236-librole-tiny-perl_2.002004-1_all.deb ... 252s Unpacking librole-tiny-perl (2.002004-1) ... 252s Selecting previously unselected package libsub-quote-perl. 252s Preparing to unpack .../237-libsub-quote-perl_2.006009-1ubuntu1_all.deb ... 252s Unpacking libsub-quote-perl (2.006009-1ubuntu1) ... 252s Selecting previously unselected package libmoo-perl. 252s Preparing to unpack .../238-libmoo-perl_2.005005-1_all.deb ... 252s Unpacking libmoo-perl (2.005005-1) ... 252s Selecting previously unselected package libstrictures-perl. 252s Preparing to unpack .../239-libstrictures-perl_2.000006-1build1_all.deb ... 252s Unpacking libstrictures-perl (2.000006-1build1) ... 252s Selecting previously unselected package libmoox-aliases-perl. 252s Preparing to unpack .../240-libmoox-aliases-perl_0.001006-2_all.deb ... 252s Unpacking libmoox-aliases-perl (0.001006-2) ... 252s Selecting previously unselected package libperlio-gzip-perl. 252s Preparing to unpack .../241-libperlio-gzip-perl_0.20-1build5_ppc64el.deb ... 252s Unpacking libperlio-gzip-perl (0.20-1build5) ... 252s Selecting previously unselected package libperlio-utf8-strict-perl. 252s Preparing to unpack .../242-libperlio-utf8-strict-perl_0.010-1build4_ppc64el.deb ... 252s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 252s Selecting previously unselected package libproc-processtable-perl:ppc64el. 252s Preparing to unpack .../243-libproc-processtable-perl_0.637-1_ppc64el.deb ... 252s Unpacking libproc-processtable-perl:ppc64el (0.637-1) ... 252s Selecting previously unselected package libregexp-wildcards-perl. 252s Preparing to unpack .../244-libregexp-wildcards-perl_1.05-3_all.deb ... 252s Unpacking libregexp-wildcards-perl (1.05-3) ... 252s Selecting previously unselected package libsereal-decoder-perl. 252s Preparing to unpack .../245-libsereal-decoder-perl_5.004+ds-1build5_ppc64el.deb ... 252s Unpacking libsereal-decoder-perl (5.004+ds-1build5) ... 252s Selecting previously unselected package libsereal-encoder-perl. 252s Preparing to unpack .../246-libsereal-encoder-perl_5.004+ds-1build4_ppc64el.deb ... 252s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 252s Selecting previously unselected package libterm-readkey-perl. 252s Preparing to unpack .../247-libterm-readkey-perl_2.38-2build5_ppc64el.deb ... 252s Unpacking libterm-readkey-perl (2.38-2build5) ... 252s Selecting previously unselected package libtext-levenshteinxs-perl. 252s Preparing to unpack .../248-libtext-levenshteinxs-perl_0.03-5build5_ppc64el.deb ... 252s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 252s Selecting previously unselected package libmarkdown2:ppc64el. 252s Preparing to unpack .../249-libmarkdown2_2.2.7-2.1build1_ppc64el.deb ... 252s Unpacking libmarkdown2:ppc64el (2.2.7-2.1build1) ... 252s Selecting previously unselected package libtext-markdown-discount-perl. 252s Preparing to unpack .../250-libtext-markdown-discount-perl_0.18-1_ppc64el.deb ... 252s Unpacking libtext-markdown-discount-perl (0.18-1) ... 252s Selecting previously unselected package libdata-messagepack-perl. 252s Preparing to unpack .../251-libdata-messagepack-perl_1.02-3_ppc64el.deb ... 252s Unpacking libdata-messagepack-perl (1.02-3) ... 252s Selecting previously unselected package libtext-xslate-perl:ppc64el. 252s Preparing to unpack .../252-libtext-xslate-perl_3.5.9-2build1_ppc64el.deb ... 252s Unpacking libtext-xslate-perl:ppc64el (3.5.9-2build1) ... 252s Selecting previously unselected package libtime-duration-perl. 252s Preparing to unpack .../253-libtime-duration-perl_1.21-2_all.deb ... 252s Unpacking libtime-duration-perl (1.21-2) ... 252s Selecting previously unselected package libtime-moment-perl. 252s Preparing to unpack .../254-libtime-moment-perl_0.46-1_ppc64el.deb ... 252s Unpacking libtime-moment-perl (0.46-1) ... 252s Selecting previously unselected package libunicode-utf8-perl. 252s Preparing to unpack .../255-libunicode-utf8-perl_0.63-1_ppc64el.deb ... 252s Unpacking libunicode-utf8-perl (0.63-1) ... 252s Selecting previously unselected package libcgi-pm-perl. 252s Preparing to unpack .../256-libcgi-pm-perl_4.71-1build1_all.deb ... 252s Unpacking libcgi-pm-perl (4.71-1build1) ... 252s Selecting previously unselected package libhtml-form-perl. 252s Preparing to unpack .../257-libhtml-form-perl_6.13-1build1_all.deb ... 252s Unpacking libhtml-form-perl (6.13-1build1) ... 252s Selecting previously unselected package libwww-mechanize-perl. 252s Preparing to unpack .../258-libwww-mechanize-perl_2.20-1ubuntu1_all.deb ... 252s Unpacking libwww-mechanize-perl (2.20-1ubuntu1) ... 252s Selecting previously unselected package libxml-namespacesupport-perl. 252s Preparing to unpack .../259-libxml-namespacesupport-perl_1.12-2_all.deb ... 252s Unpacking libxml-namespacesupport-perl (1.12-2) ... 252s Selecting previously unselected package libxml-sax-base-perl. 252s Preparing to unpack .../260-libxml-sax-base-perl_1.09-3_all.deb ... 252s Unpacking libxml-sax-base-perl (1.09-3) ... 252s Selecting previously unselected package libxml-sax-perl. 252s Preparing to unpack .../261-libxml-sax-perl_1.02+dfsg-4_all.deb ... 252s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 252s Selecting previously unselected package libxml-libxml-perl. 252s Preparing to unpack .../262-libxml-libxml-perl_2.0207+dfsg+really+2.0207-0ubuntu7_ppc64el.deb ... 252s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 252s Selecting previously unselected package lzip. 252s Preparing to unpack .../263-lzip_1.25-4_ppc64el.deb ... 252s Unpacking lzip (1.25-4) ... 253s Selecting previously unselected package lzop. 253s Preparing to unpack .../264-lzop_1.04-2build4_ppc64el.deb ... 253s Unpacking lzop (1.04-2build4) ... 253s Selecting previously unselected package patchutils. 253s Preparing to unpack .../265-patchutils_0.4.3-1_ppc64el.deb ... 253s Unpacking patchutils (0.4.3-1) ... 253s Selecting previously unselected package t1utils. 253s Preparing to unpack .../266-t1utils_1.41-4build4_ppc64el.deb ... 253s Unpacking t1utils (1.41-4build4) ... 253s Selecting previously unselected package unzip. 253s Preparing to unpack .../267-unzip_6.0-29ubuntu1_ppc64el.deb ... 253s Unpacking unzip (6.0-29ubuntu1) ... 253s Selecting previously unselected package lintian. 253s Preparing to unpack .../268-lintian_2.127.0ubuntu1_all.deb ... 253s Unpacking lintian (2.127.0ubuntu1) ... 253s Selecting previously unselected package libconfig-model-dpkg-perl. 253s Preparing to unpack .../269-libconfig-model-dpkg-perl_3.016_all.deb ... 253s Unpacking libconfig-model-dpkg-perl (3.016) ... 253s Selecting previously unselected package libconvert-binhex-perl. 253s Preparing to unpack .../270-libconvert-binhex-perl_1.125-3_all.deb ... 253s Unpacking libconvert-binhex-perl (1.125-3) ... 253s Selecting previously unselected package libnet-smtp-ssl-perl. 253s Preparing to unpack .../271-libnet-smtp-ssl-perl_1.04-2_all.deb ... 253s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 253s Selecting previously unselected package libmailtools-perl. 253s Preparing to unpack .../272-libmailtools-perl_2.22-1_all.deb ... 253s Unpacking libmailtools-perl (2.22-1) ... 253s Selecting previously unselected package libmime-tools-perl. 253s Preparing to unpack .../273-libmime-tools-perl_5.515-1_all.deb ... 253s Unpacking libmime-tools-perl (5.515-1) ... 253s Selecting previously unselected package libb-keywords-perl. 253s Preparing to unpack .../274-libb-keywords-perl_1.29-1_all.deb ... 253s Unpacking libb-keywords-perl (1.29-1) ... 253s Selecting previously unselected package libclass-tiny-perl. 253s Preparing to unpack .../275-libclass-tiny-perl_1.008-2_all.deb ... 253s Unpacking libclass-tiny-perl (1.008-2) ... 253s Selecting previously unselected package liblingua-en-inflect-perl. 253s Preparing to unpack .../276-liblingua-en-inflect-perl_1.905-2_all.deb ... 253s Unpacking liblingua-en-inflect-perl (1.905-2) ... 253s Selecting previously unselected package libpod-spell-perl. 253s Preparing to unpack .../277-libpod-spell-perl_1.27-1_all.deb ... 253s Unpacking libpod-spell-perl (1.27-1) ... 253s Selecting previously unselected package libsafe-isa-perl. 253s Preparing to unpack .../278-libsafe-isa-perl_1.000010-1build1_all.deb ... 253s Unpacking libsafe-isa-perl (1.000010-1build1) ... 253s Selecting previously unselected package libtask-weaken-perl. 253s Preparing to unpack .../279-libtask-weaken-perl_1.06-2_all.deb ... 253s Unpacking libtask-weaken-perl (1.06-2) ... 253s Selecting previously unselected package libppi-perl. 253s Preparing to unpack .../280-libppi-perl_1.284-1_all.deb ... 253s Unpacking libppi-perl (1.284-1) ... 253s Selecting previously unselected package libreadonly-perl. 253s Preparing to unpack .../281-libreadonly-perl_2.050-3_all.deb ... 253s Unpacking libreadonly-perl (2.050-3) ... 253s Selecting previously unselected package libppix-quotelike-perl. 253s Preparing to unpack .../282-libppix-quotelike-perl_0.023-1_all.deb ... 253s Unpacking libppix-quotelike-perl (0.023-1) ... 253s Selecting previously unselected package libppix-regexp-perl. 253s Preparing to unpack .../283-libppix-regexp-perl_0.091-1_all.deb ... 253s Unpacking libppix-regexp-perl (0.091-1) ... 253s Selecting previously unselected package libppix-utils-perl. 253s Preparing to unpack .../284-libppix-utils-perl_0.003-2_all.deb ... 253s Unpacking libppix-utils-perl (0.003-2) ... 253s Selecting previously unselected package libstring-format-perl. 253s Preparing to unpack .../285-libstring-format-perl_1.18-1build1_all.deb ... 253s Unpacking libstring-format-perl (1.18-1build1) ... 253s Selecting previously unselected package perltidy. 253s Preparing to unpack .../286-perltidy_20250105-1build1_all.deb ... 253s Unpacking perltidy (20250105-1build1) ... 253s Selecting previously unselected package libperl-critic-perl. 253s Preparing to unpack .../287-libperl-critic-perl_1.156-1_all.deb ... 253s Unpacking libperl-critic-perl (1.156-1) ... 253s Selecting previously unselected package libtext-wrapper-perl. 253s Preparing to unpack .../288-libtext-wrapper-perl_1.05-4_all.deb ... 253s Unpacking libtext-wrapper-perl (1.05-4) ... 253s Selecting previously unselected package libsuitesparseconfig7:ppc64el. 253s Preparing to unpack .../289-libsuitesparseconfig7_1%3a7.12.1+dfsg-1_ppc64el.deb ... 253s Unpacking libsuitesparseconfig7:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libamd3:ppc64el. 254s Preparing to unpack .../290-libamd3_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libamd3:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libblas3:ppc64el. 254s Preparing to unpack .../291-libblas3_3.12.1-7ubuntu1_ppc64el.deb ... 254s Unpacking libblas3:ppc64el (3.12.1-7ubuntu1) ... 254s Selecting previously unselected package libgfortran5:ppc64el. 254s Preparing to unpack .../292-libgfortran5_15.2.0-12ubuntu1_ppc64el.deb ... 254s Unpacking libgfortran5:ppc64el (15.2.0-12ubuntu1) ... 254s Selecting previously unselected package liblapack3:ppc64el. 254s Preparing to unpack .../293-liblapack3_3.12.1-7ubuntu1_ppc64el.deb ... 254s Unpacking liblapack3:ppc64el (3.12.1-7ubuntu1) ... 254s Selecting previously unselected package libarpack2t64:ppc64el. 254s Preparing to unpack .../294-libarpack2t64_3.9.1-6_ppc64el.deb ... 254s Unpacking libarpack2t64:ppc64el (3.9.1-6) ... 254s Selecting previously unselected package libccolamd3:ppc64el. 254s Preparing to unpack .../295-libccolamd3_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libccolamd3:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libcamd3:ppc64el. 254s Preparing to unpack .../296-libcamd3_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libcamd3:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libcolamd3:ppc64el. 254s Preparing to unpack .../297-libcolamd3_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libcolamd3:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libcholmod5:ppc64el. 254s Preparing to unpack .../298-libcholmod5_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libcholmod5:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libcxsparse4:ppc64el. 254s Preparing to unpack .../299-libcxsparse4_1%3a7.12.1+dfsg-1_ppc64el.deb ... 254s Unpacking libcxsparse4:ppc64el (1:7.12.1+dfsg-1) ... 254s Selecting previously unselected package libfftw3-double3:ppc64el. 254s Preparing to unpack .../300-libfftw3-double3_3.3.10-2fakesync1build2_ppc64el.deb ... 254s Unpacking libfftw3-double3:ppc64el (3.3.10-2fakesync1build2) ... 254s Selecting previously unselected package libfftw3-single3:ppc64el. 254s Preparing to unpack .../301-libfftw3-single3_3.3.10-2fakesync1build2_ppc64el.deb ... 254s Unpacking libfftw3-single3:ppc64el (3.3.10-2fakesync1build2) ... 254s Selecting previously unselected package libxfixes3:ppc64el. 254s Preparing to unpack .../302-libxfixes3_1%3a6.0.0-2build2_ppc64el.deb ... 254s Unpacking libxfixes3:ppc64el (1:6.0.0-2build2) ... 254s Selecting previously unselected package libxcursor1:ppc64el. 254s Preparing to unpack .../303-libxcursor1_1%3a1.2.3-1build1_ppc64el.deb ... 254s Unpacking libxcursor1:ppc64el (1:1.2.3-1build1) ... 254s Selecting previously unselected package libxft2:ppc64el. 254s Preparing to unpack .../304-libxft2_2.3.6-1build2_ppc64el.deb ... 254s Unpacking libxft2:ppc64el (2.3.6-1build2) ... 254s Selecting previously unselected package libxinerama1:ppc64el. 254s Preparing to unpack .../305-libxinerama1_2%3a1.1.4-3build2_ppc64el.deb ... 254s Unpacking libxinerama1:ppc64el (2:1.1.4-3build2) ... 254s Selecting previously unselected package libfltk1.3t64:ppc64el. 254s Preparing to unpack .../306-libfltk1.3t64_1.3.11-3_ppc64el.deb ... 254s Unpacking libfltk1.3t64:ppc64el (1.3.11-3) ... 254s Selecting previously unselected package libglvnd0:ppc64el. 254s Preparing to unpack .../307-libglvnd0_1.7.0-3_ppc64el.deb ... 254s Unpacking libglvnd0:ppc64el (1.7.0-3) ... 254s Selecting previously unselected package libx11-xcb1:ppc64el. 254s Preparing to unpack .../308-libx11-xcb1_2%3a1.8.12-1build1_ppc64el.deb ... 254s Unpacking libx11-xcb1:ppc64el (2:1.8.12-1build1) ... 254s Selecting previously unselected package libxcb-dri3-0:ppc64el. 254s Preparing to unpack .../309-libxcb-dri3-0_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-dri3-0:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxcb-present0:ppc64el. 254s Preparing to unpack .../310-libxcb-present0_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-present0:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxcb-randr0:ppc64el. 254s Preparing to unpack .../311-libxcb-randr0_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-randr0:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxcb-sync1:ppc64el. 254s Preparing to unpack .../312-libxcb-sync1_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-sync1:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxcb-xfixes0:ppc64el. 254s Preparing to unpack .../313-libxcb-xfixes0_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-xfixes0:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxshmfence1:ppc64el. 254s Preparing to unpack .../314-libxshmfence1_1.3.3-1build1_ppc64el.deb ... 254s Unpacking libxshmfence1:ppc64el (1.3.3-1build1) ... 254s Selecting previously unselected package mesa-libgallium:ppc64el. 254s Preparing to unpack .../315-mesa-libgallium_25.3.3-1ubuntu1_ppc64el.deb ... 254s Unpacking mesa-libgallium:ppc64el (25.3.3-1ubuntu1) ... 254s Selecting previously unselected package libgbm1:ppc64el. 254s Preparing to unpack .../316-libgbm1_25.3.3-1ubuntu1_ppc64el.deb ... 254s Unpacking libgbm1:ppc64el (25.3.3-1ubuntu1) ... 254s Selecting previously unselected package libvulkan1:ppc64el. 254s Preparing to unpack .../317-libvulkan1_1.4.335.0-1_ppc64el.deb ... 254s Unpacking libvulkan1:ppc64el (1.4.335.0-1) ... 254s Selecting previously unselected package libgl1-mesa-dri:ppc64el. 254s Preparing to unpack .../318-libgl1-mesa-dri_25.3.3-1ubuntu1_ppc64el.deb ... 254s Unpacking libgl1-mesa-dri:ppc64el (25.3.3-1ubuntu1) ... 254s Selecting previously unselected package libxcb-glx0:ppc64el. 254s Preparing to unpack .../319-libxcb-glx0_1.17.0-2ubuntu1_ppc64el.deb ... 254s Unpacking libxcb-glx0:ppc64el (1.17.0-2ubuntu1) ... 254s Selecting previously unselected package libxxf86vm1:ppc64el. 254s Preparing to unpack .../320-libxxf86vm1_1%3a1.1.4-2_ppc64el.deb ... 254s Unpacking libxxf86vm1:ppc64el (1:1.1.4-2) ... 254s Selecting previously unselected package libglx-mesa0:ppc64el. 254s Preparing to unpack .../321-libglx-mesa0_25.3.3-1ubuntu1_ppc64el.deb ... 254s Unpacking libglx-mesa0:ppc64el (25.3.3-1ubuntu1) ... 254s Selecting previously unselected package libglx0:ppc64el. 254s Preparing to unpack .../322-libglx0_1.7.0-3_ppc64el.deb ... 254s Unpacking libglx0:ppc64el (1.7.0-3) ... 254s Selecting previously unselected package libgl1:ppc64el. 254s Preparing to unpack .../323-libgl1_1.7.0-3_ppc64el.deb ... 254s Unpacking libgl1:ppc64el (1.7.0-3) ... 254s Selecting previously unselected package libfltk-gl1.3t64:ppc64el. 254s Preparing to unpack .../324-libfltk-gl1.3t64_1.3.11-3_ppc64el.deb ... 254s Unpacking libfltk-gl1.3t64:ppc64el (1.3.11-3) ... 254s Selecting previously unselected package libgl2ps1.4:ppc64el. 254s Preparing to unpack .../325-libgl2ps1.4_1.4.2+dfsg1-4_ppc64el.deb ... 254s Unpacking libgl2ps1.4:ppc64el (1.4.2+dfsg1-4) ... 254s Selecting previously unselected package libltdl7:ppc64el. 254s Preparing to unpack .../326-libltdl7_2.5.4-9_ppc64el.deb ... 254s Unpacking libltdl7:ppc64el (2.5.4-9) ... 254s Selecting previously unselected package libglpk40:ppc64el. 254s Preparing to unpack .../327-libglpk40_5.0-2_ppc64el.deb ... 254s Unpacking libglpk40:ppc64el (5.0-2) ... 254s Selecting previously unselected package libopengl0:ppc64el. 254s Preparing to unpack .../328-libopengl0_1.7.0-3_ppc64el.deb ... 254s Unpacking libopengl0:ppc64el (1.7.0-3) ... 254s Selecting previously unselected package libglu1-mesa:ppc64el. 254s Preparing to unpack .../329-libglu1-mesa_9.0.2-1.1build2_ppc64el.deb ... 254s Unpacking libglu1-mesa:ppc64el (9.0.2-1.1build2) ... 254s Selecting previously unselected package libhwy1t64:ppc64el. 254s Preparing to unpack .../330-libhwy1t64_1.3.0-2_ppc64el.deb ... 254s Unpacking libhwy1t64:ppc64el (1.3.0-2) ... 255s Selecting previously unselected package liblcms2-2:ppc64el. 255s Preparing to unpack .../331-liblcms2-2_2.17-1_ppc64el.deb ... 255s Unpacking liblcms2-2:ppc64el (2.17-1) ... 255s Selecting previously unselected package libjxl0.11:ppc64el. 255s Preparing to unpack .../332-libjxl0.11_0.11.1-6ubuntu1_ppc64el.deb ... 255s Unpacking libjxl0.11:ppc64el (0.11.1-6ubuntu1) ... 255s Selecting previously unselected package libwmflite-0.2-7:ppc64el. 255s Preparing to unpack .../333-libwmflite-0.2-7_0.2.13-2_ppc64el.deb ... 255s Unpacking libwmflite-0.2-7:ppc64el (0.2.13-2) ... 255s Selecting previously unselected package libgraphicsmagick-q16-3t64. 255s Preparing to unpack .../334-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17696-1build1_ppc64el.deb ... 255s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 255s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 255s Preparing to unpack .../335-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17696-1build1_ppc64el.deb ... 255s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 255s Selecting previously unselected package libsz2:ppc64el. 255s Preparing to unpack .../336-libsz2_1.1.5-1_ppc64el.deb ... 255s Unpacking libsz2:ppc64el (1.1.5-1) ... 255s Selecting previously unselected package libhdf5-310:ppc64el. 255s Preparing to unpack .../337-libhdf5-310_1.14.6+repack-2_ppc64el.deb ... 255s Unpacking libhdf5-310:ppc64el (1.14.6+repack-2) ... 255s Selecting previously unselected package libasound2-data. 255s Preparing to unpack .../338-libasound2-data_1.2.15.3-1ubuntu1_all.deb ... 255s Unpacking libasound2-data (1.2.15.3-1ubuntu1) ... 255s Selecting previously unselected package libasound2t64:ppc64el. 255s Preparing to unpack .../339-libasound2t64_1.2.15.3-1ubuntu1_ppc64el.deb ... 255s Unpacking libasound2t64:ppc64el (1.2.15.3-1ubuntu1) ... 255s Selecting previously unselected package libopus0:ppc64el. 255s Preparing to unpack .../340-libopus0_1.6.1-1_ppc64el.deb ... 255s Unpacking libopus0:ppc64el (1.6.1-1) ... 255s Selecting previously unselected package libsamplerate0:ppc64el. 255s Preparing to unpack .../341-libsamplerate0_0.2.2-4build2_ppc64el.deb ... 255s Unpacking libsamplerate0:ppc64el (0.2.2-4build2) ... 255s Selecting previously unselected package libjack-jackd2-0:ppc64el. 255s Preparing to unpack .../342-libjack-jackd2-0_1.9.22~dfsg-5_ppc64el.deb ... 255s Unpacking libjack-jackd2-0:ppc64el (1.9.22~dfsg-5) ... 255s Selecting previously unselected package libasyncns0:ppc64el. 255s Preparing to unpack .../343-libasyncns0_0.8-7_ppc64el.deb ... 255s Unpacking libasyncns0:ppc64el (0.8-7) ... 255s Selecting previously unselected package libogg0:ppc64el. 255s Preparing to unpack .../344-libogg0_1.3.6-2_ppc64el.deb ... 255s Unpacking libogg0:ppc64el (1.3.6-2) ... 255s Selecting previously unselected package libflac14:ppc64el. 255s Preparing to unpack .../345-libflac14_1.5.0+ds-5_ppc64el.deb ... 255s Unpacking libflac14:ppc64el (1.5.0+ds-5) ... 255s Selecting previously unselected package libmp3lame0:ppc64el. 255s Preparing to unpack .../346-libmp3lame0_3.100-6build2_ppc64el.deb ... 255s Unpacking libmp3lame0:ppc64el (3.100-6build2) ... 255s Selecting previously unselected package libmpg123-0t64:ppc64el. 255s Preparing to unpack .../347-libmpg123-0t64_1.33.3-2_ppc64el.deb ... 255s Unpacking libmpg123-0t64:ppc64el (1.33.3-2) ... 255s Selecting previously unselected package libvorbis0a:ppc64el. 255s Preparing to unpack .../348-libvorbis0a_1.3.7-3build1_ppc64el.deb ... 255s Unpacking libvorbis0a:ppc64el (1.3.7-3build1) ... 255s Selecting previously unselected package libvorbisenc2:ppc64el. 255s Preparing to unpack .../349-libvorbisenc2_1.3.7-3build1_ppc64el.deb ... 255s Unpacking libvorbisenc2:ppc64el (1.3.7-3build1) ... 255s Selecting previously unselected package libsndfile1:ppc64el. 255s Preparing to unpack .../350-libsndfile1_1.2.2-4_ppc64el.deb ... 255s Unpacking libsndfile1:ppc64el (1.2.2-4) ... 255s Selecting previously unselected package libpulse0:ppc64el. 255s Preparing to unpack .../351-libpulse0_1%3a17.0+dfsg1-2ubuntu4_ppc64el.deb ... 255s Unpacking libpulse0:ppc64el (1:17.0+dfsg1-2ubuntu4) ... 255s Selecting previously unselected package libportaudio2:ppc64el. 255s Preparing to unpack .../352-libportaudio2_19.7.0+git20251227.3270c9ae-0ubuntu1_ppc64el.deb ... 255s Unpacking libportaudio2:ppc64el (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 255s Selecting previously unselected package libqhull-r8.0:ppc64el. 255s Preparing to unpack .../353-libqhull-r8.0_2020.2-8_ppc64el.deb ... 255s Unpacking libqhull-r8.0:ppc64el (2020.2-8) ... 255s Selecting previously unselected package libqrupdate1:ppc64el. 255s Preparing to unpack .../354-libqrupdate1_1.1.5-3_ppc64el.deb ... 255s Unpacking libqrupdate1:ppc64el (1.1.5-3) ... 255s Selecting previously unselected package libqscintilla2-qt6-l10n. 255s Preparing to unpack .../355-libqscintilla2-qt6-l10n_2.14.1+dfsg-2_all.deb ... 255s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 255s Selecting previously unselected package libb2-1:ppc64el. 255s Preparing to unpack .../356-libb2-1_0.98.1-1.1build2_ppc64el.deb ... 255s Unpacking libb2-1:ppc64el (0.98.1-1.1build2) ... 255s Selecting previously unselected package libdouble-conversion3:ppc64el. 255s Preparing to unpack .../357-libdouble-conversion3_3.4.0-1_ppc64el.deb ... 255s Unpacking libdouble-conversion3:ppc64el (3.4.0-1) ... 255s Selecting previously unselected package libpcre2-16-0:ppc64el. 255s Preparing to unpack .../358-libpcre2-16-0_10.46-1_ppc64el.deb ... 255s Unpacking libpcre2-16-0:ppc64el (10.46-1) ... 255s Selecting previously unselected package libqt6core6t64:ppc64el. 255s Preparing to unpack .../359-libqt6core6t64_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 255s Unpacking libqt6core6t64:ppc64el (6.9.2+dfsg-3ubuntu2) ... 255s Selecting previously unselected package libwayland-client0:ppc64el. 255s Preparing to unpack .../360-libwayland-client0_1.24.0-2_ppc64el.deb ... 255s Unpacking libwayland-client0:ppc64el (1.24.0-2) ... 255s Selecting previously unselected package libegl-mesa0:ppc64el. 255s Preparing to unpack .../361-libegl-mesa0_25.3.3-1ubuntu1_ppc64el.deb ... 255s Unpacking libegl-mesa0:ppc64el (25.3.3-1ubuntu1) ... 255s Selecting previously unselected package libegl1:ppc64el. 255s Preparing to unpack .../362-libegl1_1.7.0-3_ppc64el.deb ... 255s Unpacking libegl1:ppc64el (1.7.0-3) ... 255s Selecting previously unselected package x11-common. 255s Preparing to unpack .../363-x11-common_1%3a7.7+24ubuntu1_all.deb ... 255s Unpacking x11-common (1:7.7+24ubuntu1) ... 255s Selecting previously unselected package libice6:ppc64el. 255s Preparing to unpack .../364-libice6_2%3a1.1.1-1build1_ppc64el.deb ... 255s Unpacking libice6:ppc64el (2:1.1.1-1build1) ... 255s Selecting previously unselected package libmtdev1t64:ppc64el. 255s Preparing to unpack .../365-libmtdev1t64_1.1.7-1build1_ppc64el.deb ... 255s Unpacking libmtdev1t64:ppc64el (1.1.7-1build1) ... 255s Selecting previously unselected package libwacom-common. 255s Preparing to unpack .../366-libwacom-common_2.16.1-1_all.deb ... 255s Unpacking libwacom-common (2.16.1-1) ... 255s Selecting previously unselected package libwacom9:ppc64el. 255s Preparing to unpack .../367-libwacom9_2.16.1-1_ppc64el.deb ... 255s Unpacking libwacom9:ppc64el (2.16.1-1) ... 255s Selecting previously unselected package libinput-bin. 255s Preparing to unpack .../368-libinput-bin_1.30.1-1_ppc64el.deb ... 255s Unpacking libinput-bin (1.30.1-1) ... 255s Selecting previously unselected package libinput10:ppc64el. 255s Preparing to unpack .../369-libinput10_1.30.1-1_ppc64el.deb ... 255s Unpacking libinput10:ppc64el (1.30.1-1) ... 255s Selecting previously unselected package libmd4c0:ppc64el. 255s Preparing to unpack .../370-libmd4c0_0.5.2-2build1_ppc64el.deb ... 255s Unpacking libmd4c0:ppc64el (0.5.2-2build1) ... 255s Selecting previously unselected package libqt6dbus6:ppc64el. 255s Preparing to unpack .../371-libqt6dbus6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 255s Unpacking libqt6dbus6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 255s Selecting previously unselected package libsm6:ppc64el. 255s Preparing to unpack .../372-libsm6_2%3a1.2.6-1_ppc64el.deb ... 255s Unpacking libsm6:ppc64el (2:1.2.6-1) ... 255s Selecting previously unselected package libts0t64:ppc64el. 255s Preparing to unpack .../373-libts0t64_1.22-1.1build2_ppc64el.deb ... 255s Unpacking libts0t64:ppc64el (1.22-1.1build2) ... 255s Selecting previously unselected package libxcb-util1:ppc64el. 255s Preparing to unpack .../374-libxcb-util1_0.4.1-1build1_ppc64el.deb ... 255s Unpacking libxcb-util1:ppc64el (0.4.1-1build1) ... 256s Selecting previously unselected package libxcb-image0:ppc64el. 256s Preparing to unpack .../375-libxcb-image0_0.4.0-2build2_ppc64el.deb ... 256s Unpacking libxcb-image0:ppc64el (0.4.0-2build2) ... 256s Selecting previously unselected package libxcb-render-util0:ppc64el. 256s Preparing to unpack .../376-libxcb-render-util0_0.3.10-1build1_ppc64el.deb ... 256s Unpacking libxcb-render-util0:ppc64el (0.3.10-1build1) ... 256s Selecting previously unselected package libxcb-cursor0:ppc64el. 256s Preparing to unpack .../377-libxcb-cursor0_0.1.5-1build1_ppc64el.deb ... 256s Unpacking libxcb-cursor0:ppc64el (0.1.5-1build1) ... 256s Selecting previously unselected package libxcb-icccm4:ppc64el. 256s Preparing to unpack .../378-libxcb-icccm4_0.4.2-1build1_ppc64el.deb ... 256s Unpacking libxcb-icccm4:ppc64el (0.4.2-1build1) ... 256s Selecting previously unselected package libxcb-keysyms1:ppc64el. 256s Preparing to unpack .../379-libxcb-keysyms1_0.4.1-1build1_ppc64el.deb ... 256s Unpacking libxcb-keysyms1:ppc64el (0.4.1-1build1) ... 256s Selecting previously unselected package libxcb-shape0:ppc64el. 256s Preparing to unpack .../380-libxcb-shape0_1.17.0-2ubuntu1_ppc64el.deb ... 256s Unpacking libxcb-shape0:ppc64el (1.17.0-2ubuntu1) ... 256s Selecting previously unselected package libxcb-xinput0:ppc64el. 256s Preparing to unpack .../381-libxcb-xinput0_1.17.0-2ubuntu1_ppc64el.deb ... 256s Unpacking libxcb-xinput0:ppc64el (1.17.0-2ubuntu1) ... 256s Selecting previously unselected package libxcb-xkb1:ppc64el. 256s Preparing to unpack .../382-libxcb-xkb1_1.17.0-2ubuntu1_ppc64el.deb ... 256s Unpacking libxcb-xkb1:ppc64el (1.17.0-2ubuntu1) ... 256s Selecting previously unselected package libxkbcommon-x11-0:ppc64el. 256s Preparing to unpack .../383-libxkbcommon-x11-0_1.12.3-1_ppc64el.deb ... 256s Unpacking libxkbcommon-x11-0:ppc64el (1.12.3-1) ... 256s Selecting previously unselected package libqt6gui6:ppc64el. 256s Preparing to unpack .../384-libqt6gui6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6gui6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libavahi-common-data:ppc64el. 256s Preparing to unpack .../385-libavahi-common-data_0.8-17ubuntu2_ppc64el.deb ... 256s Unpacking libavahi-common-data:ppc64el (0.8-17ubuntu2) ... 256s Selecting previously unselected package libavahi-common3:ppc64el. 256s Preparing to unpack .../386-libavahi-common3_0.8-17ubuntu2_ppc64el.deb ... 256s Unpacking libavahi-common3:ppc64el (0.8-17ubuntu2) ... 256s Selecting previously unselected package libavahi-client3:ppc64el. 256s Preparing to unpack .../387-libavahi-client3_0.8-17ubuntu2_ppc64el.deb ... 256s Unpacking libavahi-client3:ppc64el (0.8-17ubuntu2) ... 256s Selecting previously unselected package libcups2t64:ppc64el. 256s Preparing to unpack .../388-libcups2t64_2.4.16-1ubuntu1_ppc64el.deb ... 256s Unpacking libcups2t64:ppc64el (2.4.16-1ubuntu1) ... 256s Selecting previously unselected package libqt6widgets6:ppc64el. 256s Preparing to unpack .../389-libqt6widgets6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6widgets6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqt6printsupport6:ppc64el. 256s Preparing to unpack .../390-libqt6printsupport6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6printsupport6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqscintilla2-qt6-15:ppc64el. 256s Preparing to unpack .../391-libqscintilla2-qt6-15_2.14.1+dfsg-2_ppc64el.deb ... 256s Unpacking libqscintilla2-qt6-15:ppc64el (2.14.1+dfsg-2) ... 256s Selecting previously unselected package libqt6core5compat6:ppc64el. 256s Preparing to unpack .../392-libqt6core5compat6_6.9.2-3build1_ppc64el.deb ... 256s Unpacking libqt6core5compat6:ppc64el (6.9.2-3build1) ... 256s Selecting previously unselected package libqt6sql6:ppc64el. 256s Preparing to unpack .../393-libqt6sql6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6sql6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqt6help6:ppc64el. 256s Preparing to unpack .../394-libqt6help6_6.9.2-5_ppc64el.deb ... 256s Unpacking libqt6help6:ppc64el (6.9.2-5) ... 256s Selecting previously unselected package libduktape207:ppc64el. 256s Preparing to unpack .../395-libduktape207_2.7.0+tests-0ubuntu4_ppc64el.deb ... 256s Unpacking libduktape207:ppc64el (2.7.0+tests-0ubuntu4) ... 256s Selecting previously unselected package libproxy1v5:ppc64el. 256s Preparing to unpack .../396-libproxy1v5_0.5.12-1_ppc64el.deb ... 256s Unpacking libproxy1v5:ppc64el (0.5.12-1) ... 256s Selecting previously unselected package libqt6network6:ppc64el. 256s Preparing to unpack .../397-libqt6network6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6network6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqt6opengl6:ppc64el. 256s Preparing to unpack .../398-libqt6opengl6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6opengl6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqt6openglwidgets6:ppc64el. 256s Preparing to unpack .../399-libqt6openglwidgets6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6openglwidgets6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libqt6xml6:ppc64el. 256s Preparing to unpack .../400-libqt6xml6_6.9.2+dfsg-3ubuntu2_ppc64el.deb ... 256s Unpacking libqt6xml6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 256s Selecting previously unselected package libspqr4:ppc64el. 256s Preparing to unpack .../401-libspqr4_1%3a7.12.1+dfsg-1_ppc64el.deb ... 256s Unpacking libspqr4:ppc64el (1:7.12.1+dfsg-1) ... 256s Selecting previously unselected package libumfpack6:ppc64el. 256s Preparing to unpack .../402-libumfpack6_1%3a7.12.1+dfsg-1_ppc64el.deb ... 256s Unpacking libumfpack6:ppc64el (1:7.12.1+dfsg-1) ... 256s Selecting previously unselected package libtext-unidecode-perl. 256s Preparing to unpack .../403-libtext-unidecode-perl_1.30-3_all.deb ... 256s Unpacking libtext-unidecode-perl (1.30-3) ... 256s Selecting previously unselected package libintl-perl. 256s Preparing to unpack .../404-libintl-perl_1.35-1_all.deb ... 256s Unpacking libintl-perl (1.35-1) ... 256s Selecting previously unselected package texinfo-lib. 256s Preparing to unpack .../405-texinfo-lib_7.2-5_ppc64el.deb ... 256s Unpacking texinfo-lib (7.2-5) ... 256s Selecting previously unselected package tex-common. 256s Preparing to unpack .../406-tex-common_6.20_all.deb ... 256s Unpacking tex-common (6.20) ... 256s Selecting previously unselected package texinfo. 256s Preparing to unpack .../407-texinfo_7.2-5_all.deb ... 256s Unpacking texinfo (7.2-5) ... 256s Selecting previously unselected package octave-common. 256s Preparing to unpack .../408-octave-common_10.3.0-3_all.deb ... 256s Unpacking octave-common (10.3.0-3) ... 257s Selecting previously unselected package octave. 257s Preparing to unpack .../409-octave_10.3.0-3_ppc64el.deb ... 257s Unpacking octave (10.3.0-3) ... 257s Selecting previously unselected package libncurses-dev:ppc64el. 257s Preparing to unpack .../410-libncurses-dev_6.6+20251231-1_ppc64el.deb ... 257s Unpacking libncurses-dev:ppc64el (6.6+20251231-1) ... 257s Selecting previously unselected package libreadline-dev:ppc64el. 257s Preparing to unpack .../411-libreadline-dev_8.3-3_ppc64el.deb ... 257s Unpacking libreadline-dev:ppc64el (8.3-3) ... 257s Selecting previously unselected package libhdf5-fortran-310:ppc64el. 257s Preparing to unpack .../412-libhdf5-fortran-310_1.14.6+repack-2_ppc64el.deb ... 257s Unpacking libhdf5-fortran-310:ppc64el (1.14.6+repack-2) ... 257s Selecting previously unselected package libhdf5-hl-310:ppc64el. 257s Preparing to unpack .../413-libhdf5-hl-310_1.14.6+repack-2_ppc64el.deb ... 257s Unpacking libhdf5-hl-310:ppc64el (1.14.6+repack-2) ... 257s Selecting previously unselected package libhdf5-hl-fortran-310:ppc64el. 257s Preparing to unpack .../414-libhdf5-hl-fortran-310_1.14.6+repack-2_ppc64el.deb ... 257s Unpacking libhdf5-hl-fortran-310:ppc64el (1.14.6+repack-2) ... 257s Selecting previously unselected package libhdf5-cpp-310:ppc64el. 257s Preparing to unpack .../415-libhdf5-cpp-310_1.14.6+repack-2_ppc64el.deb ... 257s Unpacking libhdf5-cpp-310:ppc64el (1.14.6+repack-2) ... 257s Selecting previously unselected package libhdf5-hl-cpp-310:ppc64el. 257s Preparing to unpack .../416-libhdf5-hl-cpp-310_1.14.6+repack-2_ppc64el.deb ... 257s Unpacking libhdf5-hl-cpp-310:ppc64el (1.14.6+repack-2) ... 257s Selecting previously unselected package zlib1g-dev:ppc64el. 257s Preparing to unpack .../417-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu2_ppc64el.deb ... 257s Unpacking zlib1g-dev:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 257s Selecting previously unselected package libjpeg-turbo8-dev:ppc64el. 257s Preparing to unpack .../418-libjpeg-turbo8-dev_2.1.5-4ubuntu2_ppc64el.deb ... 257s Unpacking libjpeg-turbo8-dev:ppc64el (2.1.5-4ubuntu2) ... 257s Selecting previously unselected package libjpeg8-dev:ppc64el. 257s Preparing to unpack .../419-libjpeg8-dev_8c-2ubuntu11_ppc64el.deb ... 257s Unpacking libjpeg8-dev:ppc64el (8c-2ubuntu11) ... 257s Selecting previously unselected package libjpeg-dev:ppc64el. 257s Preparing to unpack .../420-libjpeg-dev_8c-2ubuntu11_ppc64el.deb ... 257s Unpacking libjpeg-dev:ppc64el (8c-2ubuntu11) ... 257s Selecting previously unselected package libaec0:ppc64el. 257s Preparing to unpack .../421-libaec0_1.1.5-1_ppc64el.deb ... 257s Unpacking libaec0:ppc64el (1.1.5-1) ... 257s Selecting previously unselected package libaec-dev:ppc64el. 257s Preparing to unpack .../422-libaec-dev_1.1.5-1_ppc64el.deb ... 257s Unpacking libaec-dev:ppc64el (1.1.5-1) ... 257s Selecting previously unselected package libbrotli-dev:ppc64el. 257s Preparing to unpack .../423-libbrotli-dev_1.1.0-2build6_ppc64el.deb ... 257s Unpacking libbrotli-dev:ppc64el (1.1.0-2build6) ... 257s Selecting previously unselected package libidn2-dev:ppc64el. 257s Preparing to unpack .../424-libidn2-dev_2.3.8-4_ppc64el.deb ... 257s Unpacking libidn2-dev:ppc64el (2.3.8-4) ... 257s Selecting previously unselected package comerr-dev:ppc64el. 257s Preparing to unpack .../425-comerr-dev_2.1-1.47.2-3ubuntu2_ppc64el.deb ... 257s Unpacking comerr-dev:ppc64el (2.1-1.47.2-3ubuntu2) ... 257s Selecting previously unselected package libgssrpc4t64:ppc64el. 257s Preparing to unpack .../426-libgssrpc4t64_1.22.1-2_ppc64el.deb ... 257s Unpacking libgssrpc4t64:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package libkadm5clnt-mit12:ppc64el. 257s Preparing to unpack .../427-libkadm5clnt-mit12_1.22.1-2_ppc64el.deb ... 257s Unpacking libkadm5clnt-mit12:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package libkdb5-10t64:ppc64el. 257s Preparing to unpack .../428-libkdb5-10t64_1.22.1-2_ppc64el.deb ... 257s Unpacking libkdb5-10t64:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package libkadm5srv-mit12:ppc64el. 257s Preparing to unpack .../429-libkadm5srv-mit12_1.22.1-2_ppc64el.deb ... 257s Unpacking libkadm5srv-mit12:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package krb5-multidev:ppc64el. 257s Preparing to unpack .../430-krb5-multidev_1.22.1-2_ppc64el.deb ... 257s Unpacking krb5-multidev:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package libkrb5-dev:ppc64el. 257s Preparing to unpack .../431-libkrb5-dev_1.22.1-2_ppc64el.deb ... 257s Unpacking libkrb5-dev:ppc64el (1.22.1-2) ... 257s Selecting previously unselected package libldap-dev:ppc64el. 257s Preparing to unpack .../432-libldap-dev_2.6.10+dfsg-1ubuntu5_ppc64el.deb ... 257s Unpacking libldap-dev:ppc64el (2.6.10+dfsg-1ubuntu5) ... 258s Selecting previously unselected package libpkgconf3:ppc64el. 258s Preparing to unpack .../433-libpkgconf3_1.8.1-4build1_ppc64el.deb ... 258s Unpacking libpkgconf3:ppc64el (1.8.1-4build1) ... 258s Selecting previously unselected package pkgconf-bin. 258s Preparing to unpack .../434-pkgconf-bin_1.8.1-4build1_ppc64el.deb ... 258s Unpacking pkgconf-bin (1.8.1-4build1) ... 258s Selecting previously unselected package pkgconf:ppc64el. 258s Preparing to unpack .../435-pkgconf_1.8.1-4build1_ppc64el.deb ... 258s Unpacking pkgconf:ppc64el (1.8.1-4build1) ... 258s Selecting previously unselected package libnghttp2-dev:ppc64el. 258s Preparing to unpack .../436-libnghttp2-dev_1.64.0-1.1ubuntu1_ppc64el.deb ... 258s Unpacking libnghttp2-dev:ppc64el (1.64.0-1.1ubuntu1) ... 258s Selecting previously unselected package libpsl-dev:ppc64el. 258s Preparing to unpack .../437-libpsl-dev_0.21.2-1.1build2_ppc64el.deb ... 258s Unpacking libpsl-dev:ppc64el (0.21.2-1.1build2) ... 258s Selecting previously unselected package libgmpxx4ldbl:ppc64el. 258s Preparing to unpack .../438-libgmpxx4ldbl_2%3a6.3.0+dfsg-5ubuntu1_ppc64el.deb ... 258s Unpacking libgmpxx4ldbl:ppc64el (2:6.3.0+dfsg-5ubuntu1) ... 258s Selecting previously unselected package libgmp-dev:ppc64el. 258s Preparing to unpack .../439-libgmp-dev_2%3a6.3.0+dfsg-5ubuntu1_ppc64el.deb ... 258s Unpacking libgmp-dev:ppc64el (2:6.3.0+dfsg-5ubuntu1) ... 258s Selecting previously unselected package libevent-2.1-7t64:ppc64el. 258s Preparing to unpack .../440-libevent-2.1-7t64_2.1.12-stable-10build1_ppc64el.deb ... 258s Unpacking libevent-2.1-7t64:ppc64el (2.1.12-stable-10build1) ... 258s Selecting previously unselected package libunbound8:ppc64el. 258s Preparing to unpack .../441-libunbound8_1.24.2-1ubuntu1_ppc64el.deb ... 258s Unpacking libunbound8:ppc64el (1.24.2-1ubuntu1) ... 258s Selecting previously unselected package libgnutls-dane0t64:ppc64el. 258s Preparing to unpack .../442-libgnutls-dane0t64_3.8.10-3ubuntu1_ppc64el.deb ... 258s Unpacking libgnutls-dane0t64:ppc64el (3.8.10-3ubuntu1) ... 258s Selecting previously unselected package libgnutls-openssl27t64:ppc64el. 258s Preparing to unpack .../443-libgnutls-openssl27t64_3.8.10-3ubuntu1_ppc64el.deb ... 258s Unpacking libgnutls-openssl27t64:ppc64el (3.8.10-3ubuntu1) ... 258s Selecting previously unselected package libp11-kit-dev:ppc64el. 258s Preparing to unpack .../444-libp11-kit-dev_0.25.10-1_ppc64el.deb ... 258s Unpacking libp11-kit-dev:ppc64el (0.25.10-1) ... 258s Selecting previously unselected package libtasn1-6-dev:ppc64el. 258s Preparing to unpack .../445-libtasn1-6-dev_4.21.0-2_ppc64el.deb ... 258s Unpacking libtasn1-6-dev:ppc64el (4.21.0-2) ... 258s Selecting previously unselected package nettle-dev:ppc64el. 258s Preparing to unpack .../446-nettle-dev_3.10.2-1_ppc64el.deb ... 258s Unpacking nettle-dev:ppc64el (3.10.2-1) ... 258s Selecting previously unselected package libgnutls28-dev:ppc64el. 258s Preparing to unpack .../447-libgnutls28-dev_3.8.10-3ubuntu1_ppc64el.deb ... 258s Unpacking libgnutls28-dev:ppc64el (3.8.10-3ubuntu1) ... 258s Selecting previously unselected package librtmp-dev:ppc64el. 258s Preparing to unpack .../448-librtmp-dev_2.4+20151223.gitfa8646d.1-3_ppc64el.deb ... 258s Unpacking librtmp-dev:ppc64el (2.4+20151223.gitfa8646d.1-3) ... 258s Selecting previously unselected package libssl-dev:ppc64el. 258s Preparing to unpack .../449-libssl-dev_3.5.3-1ubuntu2_ppc64el.deb ... 258s Unpacking libssl-dev:ppc64el (3.5.3-1ubuntu2) ... 258s Selecting previously unselected package libssh2-1-dev:ppc64el. 258s Preparing to unpack .../450-libssh2-1-dev_1.11.1-1build1_ppc64el.deb ... 258s Unpacking libssh2-1-dev:ppc64el (1.11.1-1build1) ... 258s Selecting previously unselected package libzstd-dev:ppc64el. 258s Preparing to unpack .../451-libzstd-dev_1.5.7+dfsg-3_ppc64el.deb ... 258s Unpacking libzstd-dev:ppc64el (1.5.7+dfsg-3) ... 258s Selecting previously unselected package libcurl4-openssl-dev:ppc64el. 258s Preparing to unpack .../452-libcurl4-openssl-dev_8.18.0-1ubuntu1_ppc64el.deb ... 258s Unpacking libcurl4-openssl-dev:ppc64el (8.18.0-1ubuntu1) ... 258s Selecting previously unselected package hdf5-helpers. 258s Preparing to unpack .../453-hdf5-helpers_1.14.6+repack-2_ppc64el.deb ... 258s Unpacking hdf5-helpers (1.14.6+repack-2) ... 258s Selecting previously unselected package libhdf5-dev. 258s Preparing to unpack .../454-libhdf5-dev_1.14.6+repack-2_ppc64el.deb ... 258s Unpacking libhdf5-dev (1.14.6+repack-2) ... 258s Selecting previously unselected package xorg-sgml-doctools. 258s Preparing to unpack .../455-xorg-sgml-doctools_1%3a1.11-1.1build1_all.deb ... 258s Unpacking xorg-sgml-doctools (1:1.11-1.1build1) ... 258s Selecting previously unselected package x11proto-dev. 258s Preparing to unpack .../456-x11proto-dev_2025.1-1_all.deb ... 258s Unpacking x11proto-dev (2025.1-1) ... 258s Selecting previously unselected package libxau-dev:ppc64el. 258s Preparing to unpack .../457-libxau-dev_1%3a1.0.11-1build1_ppc64el.deb ... 258s Unpacking libxau-dev:ppc64el (1:1.0.11-1build1) ... 258s Selecting previously unselected package libxdmcp-dev:ppc64el. 258s Preparing to unpack .../458-libxdmcp-dev_1%3a1.1.5-2_ppc64el.deb ... 258s Unpacking libxdmcp-dev:ppc64el (1:1.1.5-2) ... 258s Selecting previously unselected package xtrans-dev. 258s Preparing to unpack .../459-xtrans-dev_1.6.0-1build1_all.deb ... 258s Unpacking xtrans-dev (1.6.0-1build1) ... 258s Selecting previously unselected package libxcb1-dev:ppc64el. 258s Preparing to unpack .../460-libxcb1-dev_1.17.0-2ubuntu1_ppc64el.deb ... 258s Unpacking libxcb1-dev:ppc64el (1.17.0-2ubuntu1) ... 258s Selecting previously unselected package libx11-dev:ppc64el. 258s Preparing to unpack .../461-libx11-dev_2%3a1.8.12-1build1_ppc64el.deb ... 258s Unpacking libx11-dev:ppc64el (2:1.8.12-1build1) ... 258s Selecting previously unselected package libglx-dev:ppc64el. 258s Preparing to unpack .../462-libglx-dev_1.7.0-3_ppc64el.deb ... 258s Unpacking libglx-dev:ppc64el (1.7.0-3) ... 258s Selecting previously unselected package libgl-dev:ppc64el. 258s Preparing to unpack .../463-libgl-dev_1.7.0-3_ppc64el.deb ... 258s Unpacking libgl-dev:ppc64el (1.7.0-3) ... 258s Selecting previously unselected package libblas-dev:ppc64el. 258s Preparing to unpack .../464-libblas-dev_3.12.1-7ubuntu1_ppc64el.deb ... 258s Unpacking libblas-dev:ppc64el (3.12.1-7ubuntu1) ... 258s Selecting previously unselected package liblapack-dev:ppc64el. 258s Preparing to unpack .../465-liblapack-dev_3.12.1-7ubuntu1_ppc64el.deb ... 258s Unpacking liblapack-dev:ppc64el (3.12.1-7ubuntu1) ... 259s Selecting previously unselected package libfftw3-long3:ppc64el. 259s Preparing to unpack .../466-libfftw3-long3_3.3.10-2fakesync1build2_ppc64el.deb ... 259s Unpacking libfftw3-long3:ppc64el (3.3.10-2fakesync1build2) ... 259s Selecting previously unselected package libfftw3-bin. 259s Preparing to unpack .../467-libfftw3-bin_3.3.10-2fakesync1build2_ppc64el.deb ... 259s Unpacking libfftw3-bin (3.3.10-2fakesync1build2) ... 259s Selecting previously unselected package libfftw3-dev:ppc64el. 259s Preparing to unpack .../468-libfftw3-dev_3.3.10-2fakesync1build2_ppc64el.deb ... 259s Unpacking libfftw3-dev:ppc64el (3.3.10-2fakesync1build2) ... 259s Selecting previously unselected package libgfortran-15-dev:ppc64el. 259s Preparing to unpack .../469-libgfortran-15-dev_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking libgfortran-15-dev:ppc64el (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package gfortran-15-powerpc64le-linux-gnu. 259s Preparing to unpack .../470-gfortran-15-powerpc64le-linux-gnu_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking gfortran-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package gfortran-15. 259s Preparing to unpack .../471-gfortran-15_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking gfortran-15 (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package gfortran-powerpc64le-linux-gnu. 259s Preparing to unpack .../472-gfortran-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 259s Unpacking gfortran-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 259s Selecting previously unselected package gfortran. 259s Preparing to unpack .../473-gfortran_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 259s Unpacking gfortran (4:15.2.0-4ubuntu1) ... 259s Selecting previously unselected package libstdc++-15-dev:ppc64el. 259s Preparing to unpack .../474-libstdc++-15-dev_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking libstdc++-15-dev:ppc64el (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package g++-15-powerpc64le-linux-gnu. 259s Preparing to unpack .../475-g++-15-powerpc64le-linux-gnu_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking g++-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package g++-15. 259s Preparing to unpack .../476-g++-15_15.2.0-12ubuntu1_ppc64el.deb ... 259s Unpacking g++-15 (15.2.0-12ubuntu1) ... 259s Selecting previously unselected package g++-powerpc64le-linux-gnu. 259s Preparing to unpack .../477-g++-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 259s Unpacking g++-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 259s Selecting previously unselected package g++. 259s Preparing to unpack .../478-g++_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 259s Unpacking g++ (4:15.2.0-4ubuntu1) ... 259s Selecting previously unselected package octave-dev. 259s Preparing to unpack .../479-octave-dev_10.3.0-3_ppc64el.deb ... 259s Unpacking octave-dev (10.3.0-3) ... 260s Selecting previously unselected package dh-octave. 260s Preparing to unpack .../480-dh-octave_1.14.0_all.deb ... 260s Unpacking dh-octave (1.14.0) ... 260s Selecting previously unselected package libfontenc1:ppc64el. 260s Preparing to unpack .../481-libfontenc1_1%3a1.1.8-1build2_ppc64el.deb ... 260s Unpacking libfontenc1:ppc64el (1:1.1.8-1build2) ... 260s Selecting previously unselected package libunwind8:ppc64el. 260s Preparing to unpack .../482-libunwind8_1.8.3-0ubuntu1_ppc64el.deb ... 260s Unpacking libunwind8:ppc64el (1.8.3-0ubuntu1) ... 260s Selecting previously unselected package libxt6t64:ppc64el. 260s Preparing to unpack .../483-libxt6t64_1%3a1.2.1-1.3_ppc64el.deb ... 260s Unpacking libxt6t64:ppc64el (1:1.2.1-1.3) ... 260s Selecting previously unselected package libxmu6:ppc64el. 260s Preparing to unpack .../484-libxmu6_2%3a1.1.3-4_ppc64el.deb ... 260s Unpacking libxmu6:ppc64el (2:1.1.3-4) ... 260s Selecting previously unselected package libxaw7:ppc64el. 260s Preparing to unpack .../485-libxaw7_2%3a1.0.16-1build1_ppc64el.deb ... 260s Unpacking libxaw7:ppc64el (2:1.0.16-1build1) ... 260s Selecting previously unselected package libxfont2:ppc64el. 260s Preparing to unpack .../486-libxfont2_1%3a2.0.6-2_ppc64el.deb ... 260s Unpacking libxfont2:ppc64el (1:2.0.6-2) ... 260s Selecting previously unselected package libxkbfile1:ppc64el. 260s Preparing to unpack .../487-libxkbfile1_1%3a1.1.0-1build5_ppc64el.deb ... 260s Unpacking libxkbfile1:ppc64el (1:1.1.0-1build5) ... 260s Selecting previously unselected package libxrandr2:ppc64el. 260s Preparing to unpack .../488-libxrandr2_2%3a1.5.4-1build1_ppc64el.deb ... 260s Unpacking libxrandr2:ppc64el (2:1.5.4-1build1) ... 260s Selecting previously unselected package octave-io:ppc64el. 260s Preparing to unpack .../489-octave-io_2.7.0-3_ppc64el.deb ... 260s Unpacking octave-io:ppc64el (2.7.0-3) ... 260s Selecting previously unselected package octave-statistics-common. 260s Preparing to unpack .../490-octave-statistics-common_1.7.6-2_all.deb ... 260s Unpacking octave-statistics-common (1.7.6-2) ... 260s Selecting previously unselected package octave-statistics. 260s Preparing to unpack .../491-octave-statistics_1.7.6-2_ppc64el.deb ... 260s Unpacking octave-statistics (1.7.6-2) ... 260s Selecting previously unselected package x11-xkb-utils. 260s Preparing to unpack .../492-x11-xkb-utils_7.7+9build1_ppc64el.deb ... 260s Unpacking x11-xkb-utils (7.7+9build1) ... 260s Selecting previously unselected package xserver-common. 260s Preparing to unpack .../493-xserver-common_2%3a21.1.21-1ubuntu1_all.deb ... 260s Unpacking xserver-common (2:21.1.21-1ubuntu1) ... 260s Selecting previously unselected package xvfb. 260s Preparing to unpack .../494-xvfb_2%3a21.1.21-1ubuntu1_ppc64el.deb ... 260s Unpacking xvfb (2:21.1.21-1ubuntu1) ... 260s Setting up libconfig-inifiles-perl (3.000003-4) ... 260s Setting up libapt-pkg-perl (0.1.43) ... 260s Setting up libhwy1t64:ppc64el (1.3.0-2) ... 260s Setting up libmodule-pluggable-perl (5.2-5) ... 260s Setting up libgraphite2-3:ppc64el (1.3.14-11ubuntu1) ... 260s Setting up libstring-escape-perl (2010.002-3) ... 260s Setting up libgnutls-openssl27t64:ppc64el (3.8.10-3ubuntu1) ... 260s Setting up libxcb-dri3-0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up liblcms2-2:ppc64el (2.17-1) ... 260s Setting up libberkeleydb-perl:ppc64el (0.66-2) ... 260s Setting up libpixman-1-0:ppc64el (0.46.4-1) ... 260s Setting up libsharpyuv0:ppc64el (1.5.0-0.1build1) ... 260s Setting up libaom3:ppc64el (3.13.1-2) ... 260s Setting up liblingua-en-inflect-perl (1.905-2) ... 260s Setting up libx11-xcb1:ppc64el (2:1.8.12-1build1) ... 260s Setting up libfile-which-perl (1.27-2) ... 260s Setting up libdouble-conversion3:ppc64el (3.4.0-1) ... 260s Setting up libsafe-isa-perl (1.000010-1build1) ... 260s Setting up libtask-weaken-perl (1.06-2) ... 260s Setting up libunicode-utf8-perl (0.63-1) ... 260s Setting up libset-intspan-perl (1.19-3) ... 260s Setting up libxcb-xfixes0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libogg0:ppc64el (1.3.6-2) ... 260s Setting up libmouse-perl:ppc64el (2.6.1-1) ... 260s Setting up libzstd-dev:ppc64el (1.5.7+dfsg-3) ... 260s Setting up liblerc4:ppc64el (4.0.0+ds-5ubuntu2) ... 260s Setting up libpod-pom-perl (2.01-4) ... 260s Setting up libxpm4:ppc64el (1:3.5.17-1build3) ... 260s Setting up hdf5-helpers (1.14.6+repack-2) ... 260s Setting up libwmflite-0.2-7:ppc64el (0.2.13-2) ... 260s Setting up libregexp-pattern-perl (0.2.14-2) ... 260s Setting up libdata-messagepack-perl (1.02-3) ... 260s Setting up libclass-inspector-perl (1.36-3) ... 260s Setting up libxcb-xinput0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libxrender1:ppc64el (1:0.9.12-1) ... 260s Setting up libdynaloader-functions-perl (0.004-2) ... 260s Setting up libdatrie1:ppc64el (0.2.14-1) ... 260s Setting up libtext-glob-perl (0.11-3) ... 260s Setting up libclass-method-modifiers-perl (2.15-1) ... 260s Setting up liblist-compare-perl (0.55-2) ... 260s Setting up libxcb-render0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libclone-perl:ppc64el (0.47-1) ... 260s Setting up libarchive-zip-perl (1.68-1) ... 260s Setting up libsub-identify-perl (0.14-4) ... 260s Setting up libcpanel-json-xs-perl:ppc64el (4.40-1) ... 260s Setting up libglvnd0:ppc64el (1.7.0-3) ... 260s Setting up libio-stringy-perl (2.113-2) ... 260s Setting up libhtml-tagset-perl (3.24-1) ... 260s Setting up libts0t64:ppc64el (1.22-1.1build2) ... 260s Setting up liblog-any-perl (1.718-1build1) ... 260s Setting up libyaml-pp-perl (0.39.0-1) ... 260s Setting up libxcb-glx0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libdevel-size-perl (0.85-1) ... 260s Setting up unzip (6.0-29ubuntu1) ... 260s Setting up libdebhelper-perl (13.28ubuntu1) ... 260s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 260s Setting up libconvert-binhex-perl (1.125-3) ... 260s Setting up liblwp-mediatypes-perl (6.04-2) ... 260s Setting up libyaml-libyaml-perl (0.904.0+ds-1) ... 260s Setting up fonts-freefont-otf (20211204+svn4273-4build1) ... 260s Setting up libio-interactive-perl (1.027-1) ... 260s Setting up libxcb-keysyms1:ppc64el (0.4.1-1build1) ... 260s Setting up libxcb-shape0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up x11-common (1:7.7+24ubuntu1) ... 260s Setting up libtry-tiny-perl (0.32-1) ... 260s Setting up libdeflate0:ppc64el (1.23-2) ... 260s Setting up perl-openssl-defaults:ppc64el (7build4) ... 260s Setting up libmldbm-perl (2.05-4) ... 260s Setting up linux-libc-dev:ppc64el (6.18.0-9.9) ... 260s Setting up libxml-namespacesupport-perl (1.12-2) ... 260s Setting up m4 (1.4.20-2) ... 260s Setting up libevent-2.1-7t64:ppc64el (2.1.12-stable-10build1) ... 260s Setting up libclone-choose-perl (0.010-2) ... 260s Setting up libqhull-r8.0:ppc64el (2020.2-8) ... 260s Setting up libxcb-render-util0:ppc64el (0.3.10-1build1) ... 260s Setting up libtime-moment-perl (0.46-1) ... 260s Setting up libencode-locale-perl (1.05-3) ... 260s Setting up libxcb-shm0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libxcb-icccm4:ppc64el (0.4.2-1build1) ... 260s Setting up texinfo-lib (7.2-5) ... 260s Setting up libtext-wrapper-perl (1.05-4) ... 260s Setting up libmpg123-0t64:ppc64el (1.33.3-2) ... 260s Setting up libgomp1:ppc64el (15.2.0-12ubuntu1) ... 260s Setting up libconfig-tiny-perl (2.30-1) ... 260s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 260s Setting up libunwind8:ppc64el (1.8.3-0ubuntu1) ... 260s Setting up liblist-utilsby-perl (0.12-2) ... 260s Setting up libyaml-tiny-perl (1.76-1) ... 260s Setting up libjbig0:ppc64el (2.1-6.1ubuntu3) ... 260s Setting up octave-common (10.3.0-3) ... 260s Setting up libregexp-common-perl (2024080801-1) ... 260s Setting up libpcre2-16-0:ppc64el (10.46-1) ... 260s Setting up libaec0:ppc64el (1.1.5-1) ... 260s Setting up libnet-netmask-perl (2.0003-1build1) ... 260s Setting up libopengl0:ppc64el (1.7.0-3) ... 260s Setting up libsub-install-perl (0.929-1) ... 260s Setting up libxcb-util1:ppc64el (0.4.1-1build1) ... 260s Setting up libpsl-dev:ppc64el (0.21.2-1.1build2) ... 260s Setting up libxxf86vm1:ppc64el (1:1.1.4-2) ... 260s Setting up libindirect-perl (0.39-2build5) ... 260s Setting up libfyaml0:ppc64el (0.9.3-1) ... 260s Setting up libxcb-xkb1:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up libxcb-image0:ppc64el (0.4.0-2build2) ... 260s Setting up libnumber-compare-perl (0.03-3) ... 260s Setting up libxcb-present0:ppc64el (1.17.0-2ubuntu1) ... 260s Setting up liberror-perl (0.17030-1) ... 260s Setting up libasound2-data (1.2.15.3-1ubuntu1) ... 260s Setting up patchutils (0.4.3-1) ... 260s Setting up tex-common (6.20) ... 261s update-language: texlive-base not installed and configured, doing nothing! 261s Setting up libjson-maybexs-perl (1.004008-1) ... 261s Setting up libxml-sax-base-perl (1.09-3) ... 261s Setting up libio-string-perl (1.08-4) ... 261s Setting up libreadonly-perl (2.050-3) ... 261s Setting up libboolean-perl (0.46-3) ... 261s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 261s Setting up xtrans-dev (1.6.0-1build1) ... 261s Setting up libfontenc1:ppc64el (1:1.1.8-1build2) ... 261s Setting up autotools-dev (20240727.1) ... 261s Setting up libblas3:ppc64el (3.12.1-7ubuntu1) ... 261s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/blas/libblas.so.3 to provide /usr/lib/powerpc64le-linux-gnu/libblas.so.3 (libblas.so.3-powerpc64le-linux-gnu) in auto mode 261s Setting up libclass-data-inheritable-perl (0.10-1) ... 261s Setting up libunbound8:ppc64el (1.24.2-1ubuntu1) ... 261s Setting up libpkgconf3:ppc64el (1.8.1-4build1) ... 261s Setting up libgmpxx4ldbl:ppc64el (2:6.3.0+dfsg-5ubuntu1) ... 261s Setting up libalgorithm-c3-perl (0.11-2) ... 261s Setting up rpcsvc-proto (1.4.3-1build1) ... 261s Setting up libasound2t64:ppc64el (1.2.15.3-1ubuntu1) ... 261s Setting up liblog-log4perl-perl (1.57-1) ... 261s Setting up libtext-reform-perl (1.20-5) ... 261s Setting up libclass-tiny-perl (1.008-2) ... 261s Setting up libgnutls-dane0t64:ppc64el (3.8.10-3ubuntu1) ... 261s Setting up libfile-find-rule-perl (0.35-1build1) ... 261s Setting up libxfixes3:ppc64el (1:6.0.0-2build2) ... 261s Setting up libxcb-sync1:ppc64el (1.17.0-2ubuntu1) ... 261s Setting up libipc-system-simple-perl (1.30-2) ... 261s Setting up libio-tiecombine-perl (1.005-3) ... 261s Setting up libnet-domain-tld-perl (1.75-4) ... 261s Setting up libgssrpc4t64:ppc64el (1.22.1-2) ... 261s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 261s Setting up libldap-dev:ppc64el (2.6.10+dfsg-1ubuntu5) ... 261s Setting up aglfn (1.7+git20191031.4036a9c-2build1) ... 261s Setting up libstring-format-perl (1.18-1build1) ... 261s Setting up libxcb-cursor0:ppc64el (0.1.5-1build1) ... 261s Setting up lzip (1.25-4) ... 261s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 261s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 261s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 261s Setting up libavahi-common-data:ppc64el (0.8-17ubuntu2) ... 261s Setting up libopus0:ppc64el (1.6.1-1) ... 261s Setting up t1utils (1.41-4build4) ... 261s Setting up libquadmath0:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libxinerama1:ppc64el (2:1.1.4-3build2) ... 261s Setting up diffstat (1.68-1) ... 261s Setting up libimagequant0:ppc64el (2.18.0-1build1) ... 261s Setting up libxkbcommon-x11-0:ppc64el (1.12.3-1) ... 261s Setting up libssl-dev:ppc64el (3.5.3-1ubuntu2) ... 261s Setting up libmpc3:ppc64el (1.3.1-2) ... 261s Setting up libvorbis0a:ppc64el (1.3.7-3build1) ... 261s Setting up libvariable-magic-perl (0.64-1build1) ... 261s Setting up libio-html-perl (1.004-3) ... 261s Setting up libxrandr2:ppc64el (2:1.5.4-1build1) ... 261s Setting up libtext-template-perl (1.61-1) ... 261s Setting up libpod-parser-perl (1.67-1) ... 261s Setting up autopoint (0.23.2-1) ... 261s Setting up libb-hooks-op-check-perl:ppc64el (0.22-3build2) ... 261s Setting up libflac14:ppc64el (1.5.0+ds-5) ... 261s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 261s Setting up pkgconf-bin (1.8.1-4build1) ... 261s Setting up libjpeg-turbo8:ppc64el (2.1.5-4ubuntu2) ... 261s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 261s Setting up libltdl7:ppc64el (2.5.4-9) ... 261s Setting up libidn2-dev:ppc64el (2.3.8-4) ... 261s Setting up libfftw3-double3:ppc64el (3.3.10-2fakesync1build2) ... 261s Setting up libb-keywords-perl (1.29-1) ... 261s Setting up libparams-util-perl (1.102-3build1) ... 261s Setting up libgfortran5:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libvulkan1:ppc64el (1.4.335.0-1) ... 261s Setting up libtime-duration-perl (1.21-2) ... 261s Setting up autoconf (2.72-3.1ubuntu1) ... 261s Setting up libtext-xslate-perl:ppc64el (3.5.9-2build1) ... 261s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 261s Setting up libwebp7:ppc64el (1.5.0-0.1build1) ... 261s Setting up libarray-intspan-perl (2.004-2) ... 261s Setting up libcapture-tiny-perl (0.50-1) ... 261s Setting up libtimedate-perl (2.3300-2) ... 261s Setting up libexporter-lite-perl (0.09-2) ... 261s Setting up libubsan1:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libsub-name-perl:ppc64el (0.28-1) ... 261s Setting up dwz (0.16-2) ... 261s Setting up libdata-validate-domain-perl (0.15-1) ... 261s Setting up libproc-processtable-perl:ppc64el (0.637-1) ... 261s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 261s Setting up libmtdev1t64:ppc64el (1.1.7-1build1) ... 261s Setting up libduktape207:ppc64el (2.7.0+tests-0ubuntu4) ... 261s Setting up libasyncns0:ppc64el (0.8-7) ... 261s Setting up libxshmfence1:ppc64el (1.3.3-1build1) ... 261s Setting up libcrypt-dev:ppc64el (1:4.5.1-1) ... 261s Setting up libxcb-randr0:ppc64el (1.17.0-2ubuntu1) ... 261s Setting up libpath-tiny-perl (0.148-1) ... 261s Setting up libasan8:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up lzop (1.04-2build4) ... 261s Setting up libjson-perl (4.10000-1) ... 261s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 261s Setting up librole-tiny-perl (2.002004-1) ... 261s Setting up libintl-perl (1.35-1) ... 261s Setting up debugedit (1:5.2-3build1) ... 261s Setting up libipc-run3-perl (0.049-1) ... 261s Setting up libmd4c0:ppc64el (0.5.2-2build1) ... 261s Setting up libregexp-wildcards-perl (1.05-3) ... 261s Setting up libmousex-strictconstructor-perl (0.02-3) ... 261s Setting up libfile-sharedir-perl (1.118-3) ... 261s Setting up libsub-uplevel-perl (0.2800-3) ... 261s Setting up libsuitesparseconfig7:ppc64el (1:7.12.1+dfsg-1) ... 261s Setting up liblua5.4-0:ppc64el (5.4.8-1) ... 261s Setting up libaliased-perl (0.34-3) ... 261s Setting up libharfbuzz0b:ppc64el (12.3.2-1) ... 261s Setting up libthai-data (0.1.30-1) ... 261s Setting up xorg-sgml-doctools (1:1.11-1.1build1) ... 261s Setting up libstrictures-perl (2.000006-1build1) ... 261s Setting up libsub-quote-perl (2.006009-1ubuntu1) ... 261s Setting up libdevel-stacktrace-perl (2.0500-1) ... 261s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 261s Setting up libpod-spell-perl (1.27-1) ... 261s Setting up libtext-autoformat-perl (1.750000-2) ... 261s Setting up libglu1-mesa:ppc64el (9.0.2-1.1build2) ... 261s Setting up libtoml-tiny-perl (0.20-1) ... 261s Setting up libstemmer0d:ppc64el (3.0.1-1) ... 261s Setting up libxkbfile1:ppc64el (1:1.1.0-1build5) ... 261s Setting up libsort-versions-perl (1.62-3) ... 261s Setting up libtsan2:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libexporter-tiny-perl (1.006003-1) ... 261s Setting up libterm-readkey-perl (2.38-2build5) ... 261s Setting up libisl23:ppc64el (0.27-1build1) ... 261s Setting up libtext-unidecode-perl (1.30-3) ... 261s Setting up libde265-0:ppc64el (1.0.16-1build1) ... 261s Setting up libc-dev-bin (2.42-2ubuntu5) ... 261s Setting up libfont-ttf-perl (1.06-2) ... 261s Setting up libfile-homedir-perl (1.006-2) ... 261s Setting up libsamplerate0:ppc64el (0.2.2-4build2) ... 261s Setting up libtasn1-6-dev:ppc64el (4.21.0-2) ... 261s Setting up libwebpmux3:ppc64el (1.5.0-0.1build1) ... 261s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 261s Setting up libperlio-gzip-perl (0.20-1build5) ... 261s Setting up libjxl0.11:ppc64el (0.11.1-6ubuntu1) ... 261s Setting up libxfont2:ppc64el (1:2.0.6-2) ... 261s Setting up libhtml-html5-entities-perl (0.004-3) ... 261s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 261s Setting up libsereal-decoder-perl (5.004+ds-1build5) ... 261s Setting up libmarkdown2:ppc64el (2.2.7-2.1build1) ... 261s Setting up libcc1-0:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up liburi-perl (5.34-2build1) ... 261s Setting up libnet-ipv6addr-perl (1.02-1) ... 261s Setting up libbrotli-dev:ppc64el (1.1.0-2build6) ... 261s Setting up liblsan0:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up perltidy (20250105-1build1) ... 261s Setting up libp11-kit-dev:ppc64el (0.25.10-1) ... 261s Setting up libmp3lame0:ppc64el (3.100-6build2) ... 261s Setting up libblas-dev:ppc64el (3.12.1-7ubuntu1) ... 261s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/blas/libblas.so to provide /usr/lib/powerpc64le-linux-gnu/libblas.so (libblas.so-powerpc64le-linux-gnu) in auto mode 261s Setting up libsz2:ppc64el (1.1.5-1) ... 261s Setting up libitm1:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libvorbisenc2:ppc64el (1.3.7-3build1) ... 261s Setting up libkadm5clnt-mit12:ppc64el (1.22.1-2) ... 261s Setting up libdata-validate-ip-perl (0.31-1) ... 261s Setting up libwacom-common (2.16.1-1) ... 261s Setting up libmousex-nativetraits-perl (1.09-3) ... 261s Setting up libemail-address-xs-perl (1.05-1build5) ... 261s Setting up libwayland-client0:ppc64el (1.24.0-2) ... 261s Setting up libnet-ssleay-perl:ppc64el (1.94-3) ... 261s Setting up libjpeg8:ppc64el (8c-2ubuntu11) ... 261s Setting up automake (1:1.18.1-3build1) ... 261s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 261s Setting up libb2-1:ppc64el (0.98.1-1.1build2) ... 261s Setting up x11proto-dev (2025.1-1) ... 261s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 261s Setting up gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 261s Setting up libice6:ppc64el (2:1.1.1-1build1) ... 261s Setting up libqt6core6t64:ppc64el (6.9.2+dfsg-3ubuntu2) ... 261s Setting up libhttp-date-perl (6.06-1) ... 261s Setting up mesa-libgallium:ppc64el (25.3.3-1ubuntu1) ... 261s Setting up liblapack3:ppc64el (3.12.1-7ubuntu1) ... 261s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/powerpc64le-linux-gnu/liblapack.so.3 (liblapack.so.3-powerpc64le-linux-gnu) in auto mode 261s Setting up libproxy1v5:ppc64el (0.5.12-1) ... 261s Setting up libfile-basedir-perl (0.09-2) ... 261s Setting up gettext (0.23.2-1) ... 261s Setting up libarpack2t64:ppc64el (3.9.1-6) ... 261s Setting up libfftw3-single3:ppc64el (3.3.10-2fakesync1build2) ... 261s Setting up libgcc-15-dev:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libgmp-dev:ppc64el (2:6.3.0+dfsg-5ubuntu1) ... 261s Setting up libamd3:ppc64el (1:7.12.1+dfsg-1) ... 261s Setting up libfile-listing-perl (6.16-1) ... 261s Setting up libxau-dev:ppc64el (1:1.0.11-1build1) ... 261s Setting up nettle-dev:ppc64el (3.10.2-1) ... 261s Setting up libkdb5-10t64:ppc64el (1.22.1-2) ... 261s Setting up libgbm1:ppc64el (25.3.3-1ubuntu1) ... 261s Setting up libcolamd3:ppc64el (1:7.12.1+dfsg-1) ... 261s Setting up libwacom9:ppc64el (2.16.1-1) ... 261s Setting up fontconfig-config (2.17.1-3ubuntu1) ... 261s Setting up liblist-moreutils-perl (0.430-2) ... 261s Setting up libxcursor1:ppc64el (1:1.2.3-1build1) ... 261s Setting up libpod-constants-perl (0.19-2) ... 261s Setting up libgl1-mesa-dri:ppc64el (25.3.3-1ubuntu1) ... 261s Setting up libhash-merge-perl (0.302-1) ... 261s Setting up libsoftware-copyright-perl (0.015-1) ... 261s Setting up libaec-dev:ppc64el (1.1.5-1) ... 261s Setting up libavahi-common3:ppc64el (0.8-17ubuntu2) ... 261s Setting up libcxsparse4:ppc64el (1:7.12.1+dfsg-1) ... 261s Setting up libfftw3-long3:ppc64el (3.3.10-2fakesync1build2) ... 261s Setting up libnet-http-perl (6.24-1build1) ... 261s Setting up libpath-iterator-rule-perl (1.015-2) ... 261s Setting up libtext-markdown-discount-perl (0.18-1) ... 261s Setting up libappstream5:ppc64el (1.1.1-1) ... 261s Setting up libexception-class-perl (1.45-1) ... 261s Setting up libclass-c3-perl (0.35-2) ... 261s Setting up libqrupdate1:ppc64el (1.1.5-3) ... 261s Setting up libdevel-callchecker-perl:ppc64el (0.009-2) ... 261s Setting up libgfortran-15-dev:ppc64el (15.2.0-12ubuntu1) ... 261s Setting up libxml-sax-perl (1.02+dfsg-4) ... 261s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 261s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 261s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 262s Setting up libcamd3:ppc64el (1:7.12.1+dfsg-1) ... 262s Setting up pkgconf:ppc64el (1.8.1-4build1) ... 262s Setting up libinput-bin (1.30.1-1) ... 262s Setting up libxs-parse-sublike-perl:ppc64el (0.41-1) ... 262s Setting up intltool-debian (0.35.0+20060710.6build1) ... 262s Setting up libthai0:ppc64el (0.1.30-1) ... 262s Setting up libxdmcp-dev:ppc64el (1:1.1.5-2) ... 262s Setting up cpp-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 262s Setting up libegl-mesa0:ppc64el (25.3.3-1ubuntu1) ... 262s Setting up libdata-validate-uri-perl (0.07-3) ... 262s Setting up libxs-parse-keyword-perl (0.49-1) ... 262s Setting up libtest-exception-perl (0.43-3) ... 262s Setting up appstream (1.1.1-1) ... 262s ✔ Metadata cache was updated successfully. 262s Setting up libqt6xml6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 262s Setting up libglpk40:ppc64el (5.0-2) ... 262s Setting up libqt6sql6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 262s Setting up libstring-copyright-perl (0.003014-1) ... 262s Setting up libppi-perl (1.284-1) ... 262s Setting up liblapack-dev:ppc64el (3.12.1-7ubuntu1) ... 262s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/lapack/liblapack.so to provide /usr/lib/powerpc64le-linux-gnu/liblapack.so (liblapack.so-powerpc64le-linux-gnu) in auto mode 262s Setting up libdata-optlist-perl (0.114-1) ... 262s Setting up libccolamd3:ppc64el (1:7.12.1+dfsg-1) ... 262s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 262s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 262s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 262s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 262s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 262s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 262s Setting up libwww-robotrules-perl (6.02-1build1) ... 262s Setting up libsyntax-keyword-try-perl (0.31-1) ... 262s Setting up libjack-jackd2-0:ppc64el (1.9.22~dfsg-5) ... 262s Setting up libhdf5-310:ppc64el (1.14.6+repack-2) ... 262s Setting up cpp-15 (15.2.0-12ubuntu1) ... 262s Setting up libtiff6:ppc64el (4.7.0-3ubuntu3) ... 262s Setting up libhtml-parser-perl:ppc64el (3.83-1build1) ... 262s Setting up libppix-regexp-perl (0.091-1) ... 262s Setting up libkadm5srv-mit12:ppc64el (1.22.1-2) ... 262s Setting up libegl1:ppc64el (1.7.0-3) ... 262s Setting up libc6-dev:ppc64el (2.42-2ubuntu5) ... 262s Setting up libqt6core5compat6:ppc64el (6.9.2-3build1) ... 262s Setting up libfontconfig1:ppc64el (2.17.1-3ubuntu1) ... 262s Setting up libsndfile1:ppc64el (1.2.2-4) ... 262s Setting up libmro-compat-perl (0.15-2) ... 262s Setting up libhdf5-fortran-310:ppc64el (1.14.6+repack-2) ... 262s Setting up libsm6:ppc64el (2:1.2.6-1) ... 262s Setting up libavahi-client3:ppc64el (0.8-17ubuntu2) ... 262s Setting up libio-socket-ssl-perl (2.098-1) ... 262s Setting up cpp-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 262s Setting up libsub-exporter-perl (0.990-1) ... 262s Setting up libqt6dbus6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 262s Setting up libppix-quotelike-perl (0.023-1) ... 262s Setting up libhttp-message-perl (7.01-1ubuntu1) ... 262s Setting up libhtml-form-perl (6.13-1build1) ... 262s Setting up libhdf5-cpp-310:ppc64el (1.14.6+repack-2) ... 262s Setting up libiterator-perl (0.03+ds1-2) ... 262s Setting up libgnutls28-dev:ppc64el (3.8.10-3ubuntu1) ... 262s Setting up libinput10:ppc64el (1.30.1-1) ... 262s Setting up libnghttp2-dev:ppc64el (1.64.0-1.1ubuntu1) ... 262s Setting up libhdf5-hl-310:ppc64el (1.14.6+repack-2) ... 262s Setting up libhttp-negotiate-perl (6.01-2) ... 262s Setting up fontconfig (2.17.1-3ubuntu1) ... 264s Regenerating fonts cache... done. 264s Setting up libjpeg-turbo8-dev:ppc64el (2.1.5-4ubuntu2) ... 264s Setting up libcarp-assert-more-perl (2.9.0-1) ... 264s Setting up libcholmod5:ppc64el (1:7.12.1+dfsg-1) ... 264s Setting up libxft2:ppc64el (2.3.6-1build2) ... 264s Setting up libncurses-dev:ppc64el (6.6+20251231-1) ... 264s Setting up libppix-utils-perl (0.003-2) ... 264s Setting up libglx-mesa0:ppc64el (25.3.3-1ubuntu1) ... 264s Setting up libxcb1-dev:ppc64el (1.17.0-2ubuntu1) ... 264s Setting up libiterator-util-perl (0.02+ds1-2) ... 264s Setting up libglx0:ppc64el (1.7.0-3) ... 264s Setting up libhttp-cookies-perl (6.11-1) ... 264s Setting up libspqr4:ppc64el (1:7.12.1+dfsg-1) ... 264s Setting up libpulse0:ppc64el (1:17.0+dfsg1-2ubuntu4) ... 264s Setting up gcc-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 264s Setting up libfftw3-bin (3.3.10-2fakesync1build2) ... 264s Setting up po-debconf (1.0.22) ... 264s Setting up libhtml-tree-perl (5.07-3) ... 264s Setting up libparams-classify-perl:ppc64el (0.015-2build6) ... 264s Setting up libpango-1.0-0:ppc64el (1.57.0-1) ... 264s Setting up libcgi-pm-perl (4.71-1build1) ... 264s Setting up libx11-dev:ppc64el (2:1.8.12-1build1) ... 264s Setting up libreadline-dev:ppc64el (8.3-3) ... 264s Setting up libcairo2:ppc64el (1.18.4-3) ... 264s Setting up libobject-pad-perl (0.823-2) ... 264s Setting up gcc-15 (15.2.0-12ubuntu1) ... 264s Setting up libgl1:ppc64el (1.7.0-3) ... 264s Setting up libstdc++-15-dev:ppc64el (15.2.0-12ubuntu1) ... 264s Setting up libqt6gui6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up libnet-smtp-ssl-perl (1.04-2) ... 264s Setting up gcc-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 264s Setting up libmodule-runtime-perl (0.018-1) ... 264s Setting up libmailtools-perl (2.22-1) ... 264s Setting up libconfig-model-perl (2.155-1) ... 264s Setting up libxt6t64:ppc64el (1:1.2.1-1.3) ... 264s Setting up comerr-dev:ppc64el (2.1-1.47.2-3ubuntu2) ... 264s Setting up gfortran-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 264s Setting up texinfo (7.2-5) ... 264s Setting up zlib1g-dev:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 264s Setting up libumfpack6:ppc64el (1:7.12.1+dfsg-1) ... 264s Setting up libconst-fast-perl (0.014-2) ... 264s Setting up libqt6network6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up cpp (4:15.2.0-4ubuntu1) ... 264s Setting up libdata-section-perl (0.200008-1) ... 264s Setting up libglx-dev:ppc64el (1.7.0-3) ... 264s Setting up libpangoft2-1.0-0:ppc64el (1.57.0-1) ... 264s Setting up libjpeg8-dev:ppc64el (8c-2ubuntu11) ... 264s Setting up libdata-dpath-perl (0.60-1) ... 264s Setting up libfltk1.3t64:ppc64el (1.3.11-3) ... 264s Setting up libfftw3-dev:ppc64el (3.3.10-2fakesync1build2) ... 264s Setting up libcups2t64:ppc64el (2.4.16-1ubuntu1) ... 264s Setting up libgl-dev:ppc64el (1.7.0-3) ... 264s Setting up libstring-rewriteprefix-perl (0.009-1) ... 264s Setting up gfortran-15 (15.2.0-12ubuntu1) ... 264s Setting up libpangocairo-1.0-0:ppc64el (1.57.0-1) ... 264s Setting up krb5-multidev:ppc64el (1.22.1-2) ... 264s Setting up libhdf5-hl-cpp-310:ppc64el (1.14.6+repack-2) ... 264s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 264s Setting up g++-15-powerpc64le-linux-gnu (15.2.0-12ubuntu1) ... 264s Setting up libhdf5-hl-fortran-310:ppc64el (1.14.6+repack-2) ... 264s Setting up libportaudio2:ppc64el (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 264s Setting up libxmu6:ppc64el (2:1.1.3-4) ... 264s Setting up libtool (2.5.4-9) ... 264s Setting up libmodule-implementation-perl (0.09-2) ... 264s Setting up libpackage-stash-perl (0.40-1) ... 264s Setting up libimport-into-perl (1.002005-2) ... 264s Setting up libmoo-perl (2.005005-1) ... 264s Setting up libqt6opengl6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up libjpeg-dev:ppc64el (8c-2ubuntu11) ... 264s Setting up liblist-someutils-perl (0.59-1) ... 264s Setting up libxaw7:ppc64el (2:1.0.16-1build1) ... 264s Setting up libmime-tools-perl (5.515-1) ... 264s Setting up libsoftware-license-perl (0.104007-1) ... 264s Setting up libclass-load-perl (0.25-2) ... 264s Setting up gcc (4:15.2.0-4ubuntu1) ... 264s Setting up libgl2ps1.4:ppc64el (1.4.2+dfsg1-4) ... 264s Setting up libqt6widgets6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up dh-autoreconf (21) ... 264s Setting up libfltk-gl1.3t64:ppc64el (1.3.11-3) ... 264s Setting up libkrb5-dev:ppc64el (1.22.1-2) ... 264s Setting up gfortran-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 264s Setting up librtmp-dev:ppc64el (2.4+20151223.gitfa8646d.1-3) ... 264s Setting up libssh2-1-dev:ppc64el (1.11.1-1build1) ... 264s Setting up libmoox-aliases-perl (0.001006-2) ... 264s Setting up libparams-validate-perl:ppc64el (1.31-2build4) ... 264s Setting up libqt6openglwidgets6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up libb-hooks-endofscope-perl (0.28-2) ... 264s Setting up libperl-critic-perl (1.156-1) ... 264s Setting up g++-15 (15.2.0-12ubuntu1) ... 264s Setting up g++-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 264s Setting up libqt6printsupport6:ppc64el (6.9.2+dfsg-3ubuntu2) ... 264s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 264s Setting up x11-xkb-utils (7.7+9build1) ... 264s Setting up libqt6help6:ppc64el (6.9.2-5) ... 264s Setting up libqscintilla2-qt6-15:ppc64el (2.14.1+dfsg-2) ... 264s Setting up debhelper (13.28ubuntu1) ... 264s Setting up gfortran (4:15.2.0-4ubuntu1) ... 264s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 264s 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 264s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 264s 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 264s Setting up libcurl4-openssl-dev:ppc64el (8.18.0-1ubuntu1) ... 264s Setting up libhdf5-dev (1.14.6+repack-2) ... 264s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/powerpc64le-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 264s Setting up libnamespace-clean-perl (0.27-2) ... 264s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 264s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 264s Setting up g++ (4:15.2.0-4ubuntu1) ... 264s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 264s Setting up xserver-common (2:21.1.21-1ubuntu1) ... 264s Setting up licensecheck (3.3.9-1ubuntu2) ... 264s Setting up libapp-cmd-perl (0.338-1) ... 264s Setting up xvfb (2:21.1.21-1ubuntu1) ... 264s Setting up cme (1.044-2) ... 264s Setting up libheif-plugin-aomdec:ppc64el (1.21.2-1) ... 264s Setting up libwww-perl (6.81-1build1) ... 264s Setting up libheif1:ppc64el (1.21.2-1) ... 264s Setting up libparse-debcontrol-perl (2.005-6) ... 264s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 264s Setting up libwww-mechanize-perl (2.20-1ubuntu1) ... 264s Setting up libgd3:ppc64el (2.3.3-13ubuntu1) ... 264s Setting up gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 264s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 264s Setting up liblwp-protocol-https-perl (6.14-1) ... 264s Setting up libheif-plugin-libde265:ppc64el (1.21.2-1) ... 264s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 264s Setting up lintian (2.127.0ubuntu1) ... 264s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 264s Setting up libconfig-model-dpkg-perl (3.016) ... 264s Setting up dh-octave-autopkgtest (1.14.0) ... 264s Setting up octave (10.3.0-3) ... 264s Setting up octave-dev (10.3.0-3) ... 264s Setting up octave-io:ppc64el (2.7.0-3) ... 264s Setting up octave-statistics-common (1.7.6-2) ... 264s Setting up octave-statistics (1.7.6-2) ... 264s Setting up dh-octave (1.14.0) ... 264s Processing triggers for libc-bin (2.42-2ubuntu5) ... 265s Processing triggers for man-db (2.13.1-1) ... 268s Processing triggers for udev (259-1ubuntu3) ... 268s Processing triggers for install-info (7.2-5) ... 295s autopkgtest [08:53:42]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 295s autopkgtest [08:53:42]: test command1: [----------------------- 296s Checking package... 297s Run the unit tests... 298s Checking m files ... 298s [inst/slicesample.m] 298s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/slicesample.m 298s ***** demo 298s ## Define function to sample 298s d = 2; 298s mu = [-1; 2]; 298s rand ("seed", 5) # for reproducibility 298s Sigma = rand (d); 298s Sigma = (Sigma + Sigma'); 298s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 298s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 298s 298s ## Inputs 298s start = ones (1,2); 298s nsamples = 500; 298s K = 500; 298s m = 10; 298s rande ("seed", 4); rand ("seed", 5) # for reproducibility 298s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 298s figure; 298s hold on; 298s plot (smpl(:,1), smpl(:,2), 'x'); 298s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 298s z = reshape (pdf ([x(:), y(:)]), size(x)); 298s mesh (x, y, z, "facecolor", "None"); 298s 298s ## Using sample points to find the volume of half a sphere with radius of .5 298s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 298s int = mean (f (smpl) ./ pdf (smpl)); 298s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 298s trueerr = abs (2/3*pi*.25^(3/2)-int); 298s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 298s fprintf ("Monte Carlo integral error estimate %f\n", errest); 298s fprintf ("The actual error %f\n", trueerr); 298s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 298s ***** demo 298s ## Integrate truncated normal distribution to find normalization constant 298s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 298s nsamples = 1e3; 298s rande ("seed", 4); rand ("seed", 5) # for reproducibility 298s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 298s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 298s x = linspace (-3, 3, 1000); 298s area (x, f(x)); 298s xlabel ("x"); 298s ylabel ("f(x)"); 298s int = mean (f (smpl) ./ pdf (smpl)); 298s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 298s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 298s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 298s fprintf("Monte Carlo integral error estimate %f\n", errest); 298s fprintf("The actual error %f\n", trueerr); 298s ***** test 298s start = 0.5; 298s nsamples = 1e3; 298s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 298s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 298s assert (mean (smpl, 1), 1, .15); 298s assert (var (smpl, 1), 1, .25); 300s ***** error slicesample (); 300s ***** error slicesample (1); 300s ***** error slicesample (1, 1); 300s 4 tests, 4 passed, 0 known failure, 0 skipped 300s [inst/dist_wrap/makedist.m] 300s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/makedist.m 300s ***** test 300s pd = makedist ("beta"); 300s assert (class (pd), "BetaDistribution"); 300s assert (pd.a, 1); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("beta", "a", 5); 300s assert (pd.a, 5); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("beta", "b", 5); 300s assert (pd.a, 1); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("beta", "a", 3, "b", 5); 300s assert (pd.a, 3); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("binomial"); 300s assert (class (pd), "BinomialDistribution"); 300s assert (pd.N, 1); 300s assert (pd.p, 0.5); 300s ***** test 300s pd = makedist ("binomial", "N", 5); 300s assert (pd.N, 5); 300s assert (pd.p, 0.5); 300s ***** test 300s pd = makedist ("binomial", "p", 0.2); 300s assert (pd.N, 1); 300s assert (pd.p, 0.2); 300s ***** test 300s pd = makedist ("binomial", "N", 3, "p", 0.3); 300s assert (pd.N, 3); 300s assert (pd.p, 0.3); 300s ***** test 300s pd = makedist ("birnbaumsaunders"); 300s assert (class (pd), "BirnbaumSaundersDistribution"); 300s assert (pd.beta, 1); 300s assert (pd.gamma, 1); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "beta", 5); 300s assert (pd.beta, 5); 300s assert (pd.gamma, 1); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "gamma", 5); 300s assert (pd.beta, 1); 300s assert (pd.gamma, 5); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 300s assert (pd.beta, 3); 300s assert (pd.gamma, 5); 300s ***** test 300s pd = makedist ("burr"); 300s assert (class (pd), "BurrDistribution"); 300s assert (pd.alpha, 1); 300s assert (pd.c, 1); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "k", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 1); 300s assert (pd.k, 5); 300s ***** test 300s pd = makedist ("burr", "c", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 5); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "alpha", 3, "c", 5); 300s assert (pd.alpha, 3); 300s assert (pd.c, 5); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "k", 3, "c", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 5); 300s assert (pd.k, 3); 300s ***** test 300s pd = makedist ("exponential"); 300s assert (class (pd), "ExponentialDistribution"); 300s assert (pd.mu, 1); 300s ***** test 300s pd = makedist ("exponential", "mu", 5); 300s assert (pd.mu, 5); 300s ***** test 300s pd = makedist ("extremevalue"); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("extremevalue", "mu", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("ev", "sigma", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("ev", "mu", -3, "sigma", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("gamma"); 300s assert (class (pd), "GammaDistribution"); 300s assert (pd.a, 1); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("gamma", "a", 5); 300s assert (pd.a, 5); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("gamma", "b", 5); 300s assert (pd.a, 1); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("gamma", "a", 3, "b", 5); 300s assert (pd.a, 3); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue"); 300s assert (class (pd), "GeneralizedExtremeValueDistribution"); 300s assert (pd.k, 0); 300s assert (pd.sigma, 1); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "k", 5); 300s assert (pd.k, 5); 300s assert (pd.sigma, 1); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 300s assert (pd.k, 0); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 300s assert (pd.k, 3); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 300s assert (pd.k, 0); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 3); 300s ***** test 300s pd = makedist ("GeneralizedPareto"); 300s assert (class (pd), "GeneralizedParetoDistribution"); 300s assert (pd.k, 1); 300s assert (pd.sigma, 1); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "k", 5); 300s assert (pd.k, 5); 300s assert (pd.sigma, 1); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "sigma", 5); 300s assert (pd.k, 1); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 300s assert (pd.k, 3); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 300s assert (pd.k, 1); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 3); 300s ***** test 300s pd = makedist ("HalfNormal"); 300s assert (class (pd), "HalfNormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("HalfNormal", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("HalfNormal", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("InverseGaussian"); 300s assert (class (pd), "InverseGaussianDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("InverseGaussian", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("InverseGaussian", "lambda", 5); 300s assert (pd.mu, 1); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 300s assert (pd.mu, 3); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("logistic"); 300s assert (class (pd), "LogisticDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("logistic", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("logistic", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("logistic", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("loglogistic"); 300s assert (class (pd), "LoglogisticDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("loglogistic", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("loglogistic", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Lognormal"); 300s assert (class (pd), "LognormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Lognormal", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Lognormal", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Loguniform"); 300s assert (class (pd), "LoguniformDistribution"); 300s assert (pd.Lower, 1); 300s assert (pd.Upper, 4); 300s ***** test 300s pd = makedist ("Loguniform", "Lower", 2); 300s assert (pd.Lower, 2); 300s assert (pd.Upper, 4); 300s ***** test 300s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 300s assert (pd.Lower, 1); 300s assert (pd.Upper, 3); 300s ***** test 300s pd = makedist ("Multinomial"); 300s assert (class (pd), "MultinomialDistribution"); 300s assert (pd.Probabilities, [0.5, 0.5]); 300s ***** test 300s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 300s assert (class (pd), "MultinomialDistribution"); 300s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 300s ***** test 300s pd = makedist ("Nakagami"); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.omega, 1); 300s ***** test 300s pd = makedist ("Nakagami", "mu", 5); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.omega, 1); 300s ***** test 300s pd = makedist ("Nakagami", "omega", 0.3); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.omega, 0.3); 300s ***** test 300s pd = makedist ("NegativeBinomial"); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 1); 300s assert (pd.P, 0.5); 300s ***** test 300s pd = makedist ("NegativeBinomial", "R", 5); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 5); 300s assert (pd.P, 0.5); 300s ***** test 300s pd = makedist ("NegativeBinomial", "p", 0.3); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 1); 300s assert (pd.P, 0.3); 300s ***** test 300s pd = makedist ("Normal"); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Normal", "mu", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Normal", "sigma", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Normal", "mu", -3, "sigma", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("PiecewiseLinear"); 300s assert (class (pd), "PiecewiseLinearDistribution"); 300s assert (pd.x, [0; 1]); 300s assert (pd.Fx, [0; 1]); 300s ***** test 300s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 300s assert (pd.x, [0; 1; 2]); 300s assert (pd.Fx, [0; 0.5; 1]); 300s ***** test 300s pd = makedist ("Poisson"); 300s assert (class (pd), "PoissonDistribution"); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("Poisson", "lambda", 5); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("Rayleigh"); 300s assert (class (pd), "RayleighDistribution"); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rayleigh", "sigma", 5); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Rician"); 300s assert (class (pd), "RicianDistribution"); 300s assert (pd.s, 1); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rician", "s", 3); 300s assert (pd.s, 3); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rician", "sigma", 3); 300s assert (pd.s, 1); 300s assert (pd.sigma, 3); 300s ***** test 300s pd = makedist ("Rician", "s", 2, "sigma", 3); 300s assert (pd.s, 2); 300s assert (pd.sigma, 3); 300s ***** warning 300s pd = makedist ("stable"); 300s assert (class (pd), "double"); 300s assert (isempty (pd), true); 300s ***** test 300s pd = makedist ("tlocationscale"); 300s assert (class (pd), "tLocationScaleDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "sigma", 2); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 1); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 300s assert (pd.mu, -2); 300s assert (pd.sigma, 3); 300s assert (pd.nu, 1); 300s ***** test 300s pd = makedist ("Triangular"); 300s assert (class (pd), "TriangularDistribution"); 300s assert (pd.A, 0); 300s assert (pd.B, 0.5); 300s assert (pd.C, 1); 300s ***** test 300s pd = makedist ("Triangular", "A", -2); 300s assert (pd.A, -2); 300s assert (pd.B, 0.5); 300s assert (pd.C, 1); 300s ***** test 300s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 300s assert (pd.A, 0.5); 300s assert (pd.B, 0.9); 300s assert (pd.C, 1); 300s ***** test 300s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 300s assert (pd.A, 1); 300s assert (pd.B, 2); 300s assert (pd.C, 5); 300s ***** test 300s pd = makedist ("Uniform"); 300s assert (class (pd), "UniformDistribution"); 300s assert (pd.Lower, 0); 300s assert (pd.Upper, 1); 300s ***** test 300s pd = makedist ("Uniform", "Lower", -2); 300s assert (pd.Lower, -2); 300s assert (pd.Upper, 1); 300s ***** test 300s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 300s assert (pd.Lower, 1); 300s assert (pd.Upper, 3); 300s ***** test 300s pd = makedist ("Weibull"); 300s assert (class (pd), "WeibullDistribution"); 300s assert (pd.lambda, 1); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("Weibull", "lambda", 3); 300s assert (pd.lambda, 3); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("Weibull", "lambda", 3, "k", 2); 300s assert (pd.lambda, 3); 300s assert (pd.k, 2); 300s ***** error makedist (1) 300s ***** error makedist (["as";"sd"]) 300s ***** error makedist ("some") 300s ***** error ... 300s makedist ("Beta", "a") 300s ***** error ... 300s makedist ("Beta", "a", 1, "Q", 23) 300s ***** error ... 300s makedist ("Binomial", "N", 1, "Q", 23) 300s ***** error ... 300s makedist ("BirnbaumSaunders", "N", 1) 300s ***** error ... 300s makedist ("Burr", "lambda", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("extremevalue", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("exponential", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Gamma", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("HalfNormal", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Logistic", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Loglogistic", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Lognormal", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Loguniform", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Multinomial", "k", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Nakagami", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Normal", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Poisson", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Rician", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Stable", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Triangular", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Uniform", "mu", 1, "sdfs", 34) 300s ***** error ... 300s makedist ("Weibull", "mu", 1, "sdfs", 34) 300s 131 tests, 131 passed, 0 known failure, 0 skipped 300s [inst/dist_wrap/cdf.m] 300s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/cdf.m 300s ***** shared x 300s x = [1:5]; 300s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 300s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 300s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 300s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 300s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 300s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 300s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 301s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 301s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 301s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 301s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 301s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 301s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 301s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 301s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 301s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 301s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 301s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 301s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 301s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 301s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 301s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 301s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 301s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 301s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 301s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 301s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 301s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 301s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 301s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 301s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 301s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 301s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 301s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 301s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 301s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 301s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 301s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 301s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 301s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 301s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 301s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 301s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 301s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 301s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 301s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 301s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 301s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 301s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 301s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 301s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 302s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 302s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 302s ***** error cdf (1) 302s ***** error cdf ({"beta"}) 302s ***** error cdf ("beta", {[1 2 3 4 5]}) 302s ***** error cdf ("beta", "text") 302s ***** error cdf ("beta", 1+i) 302s ***** error ... 302s cdf ("Beta", x, "a", 2) 302s ***** error ... 302s cdf ("Beta", x, 5, "") 302s ***** error ... 302s cdf ("Beta", x, 5, {2}) 302s ***** error cdf ("chi2", x) 302s ***** error cdf ("Beta", x, 5) 302s ***** error cdf ("Burr", x, 5) 302s ***** error cdf ("Burr", x, 5, 2) 302s 86 tests, 86 passed, 0 known failure, 0 skipped 302s [inst/dist_wrap/fitdist.m] 302s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/fitdist.m 302s ***** test 302s x = betarnd (1, 1, 100, 1); 302s pd = fitdist (x, "Beta"); 302s [phat, pci] = betafit (x); 302s assert ([pd.a, pd.b], phat); 302s assert (paramci (pd), pci); 302s ***** test 302s x1 = betarnd (1, 1, 100, 1); 302s x2 = betarnd (5, 2, 100, 1); 302s pd = fitdist ([x1; x2], "Beta", "By", [ones(100, 1); 2*ones(100, 1)]); 302s [phat, pci] = betafit (x1); 302s assert ([pd{1}.a, pd{1}.b], phat); 302s assert (paramci (pd{1}), pci); 302s [phat, pci] = betafit (x2); 302s assert ([pd{2}.a, pd{2}.b], phat); 302s assert (paramci (pd{2}), pci); 302s ***** warning ... 302s fitdist ([betarnd(1, 1, 100, 1); nan(100, 1)], "Beta", ... 302s "By", [ones(100, 1); 2*ones(100, 1)]); 302s ***** test 302s N = 1; 302s x = binornd (N, 0.5, 100, 1); 302s pd = fitdist (x, "binomial"); 302s [phat, pci] = binofit (sum (x), numel (x)); 302s assert ([pd.N, pd.p], [N, phat]); 302s assert (paramci (pd), pci); 302s ***** test 302s N = 3; 302s x = binornd (N, 0.4, 100, 1); 302s pd = fitdist (x, "binomial", "ntrials", N); 302s [phat, pci] = binofit (sum (x), numel (x) * N); 302s assert ([pd.N, pd.p], [N, phat]); 302s assert (paramci (pd), pci); 302s ***** test 302s N = 1; 302s x1 = binornd (N, 0.5, 100, 1); 302s x2 = binornd (N, 0.7, 100, 1); 302s pd = fitdist ([x1; x2], "binomial", "By", [ones(100, 1); 2*ones(100, 1)]); 302s [phat, pci] = binofit (sum (x1), numel (x1)); 302s assert ([pd{1}.N, pd{1}.p], [N, phat]); 302s assert (paramci (pd{1}), pci); 302s [phat, pci] = binofit (sum (x2), numel (x2)); 302s assert ([pd{2}.N, pd{2}.p], [N, phat]); 302s assert (paramci (pd{2}), pci); 302s ***** warning ... 302s fitdist ([binornd(1, 0.5, 100, 1); nan(100, 1)], "binomial", ... 302s "By", [ones(100, 1); 2*ones(100, 1)]); 302s ***** test 302s N = 5; 302s x1 = binornd (N, 0.5, 100, 1); 302s x2 = binornd (N, 0.8, 100, 1); 302s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 302s "By", [ones(100, 1); 2*ones(100, 1)]); 302s [phat, pci] = binofit (sum (x1), numel (x1) * N); 302s assert ([pd{1}.N, pd{1}.p], [N, phat]); 302s assert (paramci (pd{1}), pci); 302s [phat, pci] = binofit (sum (x2), numel (x2) * N); 302s assert ([pd{2}.N, pd{2}.p], [N, phat]); 302s assert (paramci (pd{2}), pci); 302s ***** warning ... 302s fitdist ([binornd(5, 0.5, 100, 1); nan(100, 1)], "binomial", "ntrials", 5, ... 302s "By", [ones(100, 1); 2*ones(100, 1)]); 302s ***** test 302s x = bisarnd (1, 1, 100, 1); 302s pd = fitdist (x, "BirnbaumSaunders"); 302s [phat, pci] = bisafit (x); 302s assert ([pd.beta, pd.gamma], phat); 302s assert (paramci (pd), pci); 303s ***** test 303s x1 = bisarnd (1, 1, 100, 1); 303s x2 = bisarnd (5, 2, 100, 1); 303s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 303s [phat, pci] = bisafit (x1); 303s assert ([pd{1}.beta, pd{1}.gamma], phat); 303s assert (paramci (pd{1}), pci); 303s [phat, pci] = bisafit (x2); 303s assert ([pd{2}.beta, pd{2}.gamma], phat); 303s assert (paramci (pd{2}), pci); 303s ***** warning ... 303s fitdist ([bisarnd(1, 1, 100, 1); nan(100, 1)], "bisa", ... 303s "By", [ones(100, 1); 2*ones(100, 1)]); 303s ***** test 303s x = burrrnd (1, 2, 1, 100, 1); 303s pd = fitdist (x, "Burr"); 303s [phat, pci] = burrfit (x); 303s assert ([pd.alpha, pd.c, pd.k], phat); 303s assert (paramci (pd), pci); 304s ***** test 304s rand ("seed", 4); # for reproducibility 304s x1 = burrrnd (1, 2, 1, 100, 1); 304s rand ("seed", 3); # for reproducibility 304s x2 = burrrnd (1, 0.5, 2, 100, 1); 304s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 304s [phat, pci] = burrfit (x1); 304s assert ([pd{1}.alpha, pd{1}.c, pd{1}.k], phat); 304s assert (paramci (pd{1}), pci); 304s [phat, pci] = burrfit (x2); 304s assert ([pd{2}.alpha, pd{2}.c, pd{2}.k], phat); 304s assert (paramci (pd{2}), pci); 305s ***** warning ... 305s fitdist ([burrrnd(1, 2, 1, 100, 1); nan(100, 1)], "burr", ... 305s "By", [ones(100, 1); 2*ones(100, 1)]); 305s ***** test 305s x = exprnd (1, 100, 1); 305s pd = fitdist (x, "exponential"); 305s [muhat, muci] = expfit (x); 305s assert ([pd.mu], muhat); 305s assert (paramci (pd), muci); 305s ***** test 305s x1 = exprnd (1, 100, 1); 305s x2 = exprnd (5, 100, 1); 305s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 305s [muhat, muci] = expfit (x1); 305s assert ([pd{1}.mu], muhat); 305s assert (paramci (pd{1}), muci); 305s [muhat, muci] = expfit (x2); 305s assert ([pd{2}.mu], muhat); 305s assert (paramci (pd{2}), muci); 305s ***** warning ... 305s fitdist ([exprnd(1, 100, 1); nan(100, 1)], "exponential", ... 305s "By", [ones(100, 1); 2*ones(100, 1)]); 305s ***** test 305s x = evrnd (1, 1, 100, 1); 305s pd = fitdist (x, "ev"); 305s [phat, pci] = evfit (x); 305s assert ([pd.mu, pd.sigma], phat); 305s assert (paramci (pd), pci); 305s ***** test 305s x1 = evrnd (1, 1, 100, 1); 305s x2 = evrnd (5, 2, 100, 1); 305s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 305s [phat, pci] = evfit (x1); 305s assert ([pd{1}.mu, pd{1}.sigma], phat); 305s assert (paramci (pd{1}), pci); 305s [phat, pci] = evfit (x2); 305s assert ([pd{2}.mu, pd{2}.sigma], phat); 305s assert (paramci (pd{2}), pci); 305s ***** warning ... 305s fitdist ([evrnd(1, 1, 100, 1); nan(100, 1)], "extremevalue", ... 305s "By", [ones(100, 1); 2*ones(100, 1)]); 305s ***** test 305s x = gamrnd (1, 1, 100, 1); 305s pd = fitdist (x, "Gamma"); 305s [phat, pci] = gamfit (x); 305s assert ([pd.a, pd.b], phat); 305s assert (paramci (pd), pci); 305s ***** test 305s x1 = gamrnd (1, 1, 100, 1); 305s x2 = gamrnd (5, 2, 100, 1); 305s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 305s [phat, pci] = gamfit (x1); 305s assert ([pd{1}.a, pd{1}.b], phat); 305s assert (paramci (pd{1}), pci); 305s [phat, pci] = gamfit (x2); 305s assert ([pd{2}.a, pd{2}.b], phat); 305s assert (paramci (pd{2}), pci); 306s ***** warning ... 306s fitdist ([gamrnd(1, 1, 100, 1); nan(100, 1)], "Gamma", ... 306s "By", [ones(100, 1); 2*ones(100, 1)]); 306s ***** test 306s rand ("seed", 4); # for reproducibility 306s x = gevrnd (-0.5, 1, 2, 1000, 1); 306s pd = fitdist (x, "generalizedextremevalue"); 306s [phat, pci] = gevfit (x); 306s assert ([pd.k, pd.sigma, pd.mu], phat); 306s assert (paramci (pd), pci); 306s ***** test 306s rand ("seed", 5); # for reproducibility 306s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 306s rand ("seed", 9); # for reproducibility 306s x2 = gevrnd (0, 1, -4, 1000, 1); 306s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 306s [phat, pci] = gevfit (x1); 306s assert ([pd{1}.k, pd{1}.sigma, pd{1}.mu], phat); 306s assert (paramci (pd{1}), pci); 306s [phat, pci] = gevfit (x2); 306s assert ([pd{2}.k, pd{2}.sigma, pd{2}.mu], phat); 306s assert (paramci (pd{2}), pci); 307s ***** warning ... 307s fitdist ([gevrnd(-0.5, 1, 2, 1000, 1); nan(1000, 1)], "gev", ... 307s "By", [ones(1000, 1); 2*ones(1000, 1)]); 307s ***** test 307s x = gprnd (1, 1, 1, 100, 1); 307s pd = fitdist (x, "GeneralizedPareto"); 307s [phat, pci] = gpfit (x, 1); 307s assert ([pd.k, pd.sigma, pd.theta], phat); 307s assert (paramci (pd), pci); 307s ***** test 307s x = gprnd (1, 1, 2, 100, 1); 307s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 307s [phat, pci] = gpfit (x, 2); 307s assert ([pd.k, pd.sigma, pd.theta], phat); 307s assert (paramci (pd), pci); 307s ***** test 307s x1 = gprnd (1, 1, 1, 100, 1); 307s x2 = gprnd (0, 2, 1, 100, 1); 307s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 307s [phat, pci] = gpfit (x1, 1); 307s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 307s assert (paramci (pd{1}), pci); 307s [phat, pci] = gpfit (x2, 1); 307s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 307s assert (paramci (pd{2}), pci); 308s ***** warning ... 308s fitdist ([gprnd(1, 1, 1, 100, 1); nan(100, 1)], "gp", ... 308s "By", [ones(100, 1); 2*ones(100, 1)]); 308s ***** test 308s x1 = gprnd (3, 2, 2, 100, 1); 308s x2 = gprnd (2, 3, 2, 100, 1); 308s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 308s "By", [ones(100,1); 2*ones(100,1)]); 308s [phat, pci] = gpfit (x1, 2); 308s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 308s assert (paramci (pd{1}), pci); 308s [phat, pci] = gpfit (x2, 2); 308s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 308s assert (paramci (pd{2}), pci); 308s ***** warning ... 308s fitdist ([gprnd(3, 2, 2, 100, 1); nan(100, 1)], "gp", "theta", 2, ... 308s "By", [ones(100, 1); 2*ones(100, 1)]); 308s ***** test 308s x = hnrnd (0, 1, 100, 1); 308s pd = fitdist (x, "HalfNormal"); 308s [phat, pci] = hnfit (x, 0); 308s assert ([pd.mu, pd.sigma], phat); 308s assert (paramci (pd), pci); 308s ***** test 308s x = hnrnd (1, 1, 100, 1); 308s pd = fitdist (x, "HalfNormal", "mu", 1); 308s [phat, pci] = hnfit (x, 1); 308s assert ([pd.mu, pd.sigma], phat); 308s assert (paramci (pd), pci); 308s ***** test 308s x1 = hnrnd (0, 1, 100, 1); 308s x2 = hnrnd (0, 2, 100, 1); 308s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 308s [phat, pci] = hnfit (x1, 0); 308s assert ([pd{1}.mu, pd{1}.sigma], phat); 308s assert (paramci (pd{1}), pci); 308s [phat, pci] = hnfit (x2, 0); 308s assert ([pd{2}.mu, pd{2}.sigma], phat); 308s assert (paramci (pd{2}), pci); 309s ***** warning ... 309s fitdist ([hnrnd(0, 1, 100, 1); nan(100, 1)], "HalfNormal", ... 309s "By", [ones(100, 1); 2*ones(100, 1)]); 309s ***** test 309s x1 = hnrnd (2, 1, 100, 1); 309s x2 = hnrnd (2, 2, 100, 1); 309s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 309s "By", [ones(100,1); 2*ones(100,1)]); 309s [phat, pci] = hnfit (x1, 2); 309s assert ([pd{1}.mu, pd{1}.sigma], phat); 309s assert (paramci (pd{1}), pci); 309s [phat, pci] = hnfit (x2, 2); 309s assert ([pd{2}.mu, pd{2}.sigma], phat); 309s assert (paramci (pd{2}), pci); 309s ***** warning ... 309s fitdist ([hnrnd(2, 1, 100, 1); nan(100, 1)], "HalfNormal", "mu", 2, ... 309s "By", [ones(100, 1); 2*ones(100, 1)]); 309s ***** test 309s x = invgrnd (1, 1, 100, 1); 309s pd = fitdist (x, "InverseGaussian"); 309s [phat, pci] = invgfit (x); 309s assert ([pd.mu, pd.lambda], phat); 309s assert (paramci (pd), pci); 309s ***** test 309s x1 = invgrnd (1, 1, 100, 1); 309s x2 = invgrnd (5, 2, 100, 1); 309s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 309s [phat, pci] = invgfit (x1); 309s assert ([pd{1}.mu, pd{1}.lambda], phat); 309s assert (paramci (pd{1}), pci); 309s [phat, pci] = invgfit (x2); 309s assert ([pd{2}.mu, pd{2}.lambda], phat); 309s assert (paramci (pd{2}), pci); 309s ***** warning ... 309s fitdist ([invgrnd(1, 1, 100, 1); nan(100, 1)], "InverseGaussian", ... 309s "By", [ones(100, 1); 2*ones(100, 1)]); 310s ***** test 310s x = logirnd (1, 1, 100, 1); 310s pd = fitdist (x, "logistic"); 310s [phat, pci] = logifit (x); 310s assert ([pd.mu, pd.sigma], phat); 310s assert (paramci (pd), pci); 310s ***** test 310s x1 = logirnd (1, 1, 100, 1); 310s x2 = logirnd (5, 2, 100, 1); 310s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 310s [phat, pci] = logifit (x1); 310s assert ([pd{1}.mu, pd{1}.sigma], phat); 310s assert (paramci (pd{1}), pci); 310s [phat, pci] = logifit (x2); 310s assert ([pd{2}.mu, pd{2}.sigma], phat); 310s assert (paramci (pd{2}), pci); 310s ***** warning ... 310s fitdist ([logirnd(1, 1, 100, 1); nan(100, 1)], "logistic", ... 310s "By", [ones(100, 1); 2*ones(100, 1)]); 310s ***** test 310s x = loglrnd (1, 1, 100, 1); 310s pd = fitdist (x, "loglogistic"); 310s [phat, pci] = loglfit (x); 310s assert ([pd.mu, pd.sigma], phat); 310s assert (paramci (pd), pci); 310s ***** test 310s x1 = loglrnd (1, 1, 100, 1); 310s x2 = loglrnd (5, 2, 100, 1); 310s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 310s [phat, pci] = loglfit (x1); 310s assert ([pd{1}.mu, pd{1}.sigma], phat); 310s assert (paramci (pd{1}), pci); 310s [phat, pci] = loglfit (x2); 310s assert ([pd{2}.mu, pd{2}.sigma], phat); 310s assert (paramci (pd{2}), pci); 311s ***** warning ... 311s fitdist ([loglrnd(1, 1, 100, 1); nan(100, 1)], "loglogistic", ... 311s "By", [ones(100, 1); 2*ones(100, 1)]); 311s ***** test 311s x = lognrnd (1, 1, 100, 1); 311s pd = fitdist (x, "lognormal"); 311s [phat, pci] = lognfit (x); 311s assert ([pd.mu, pd.sigma], phat); 311s assert (paramci (pd), pci); 311s ***** test 311s x1 = lognrnd (1, 1, 100, 1); 311s x2 = lognrnd (5, 2, 100, 1); 311s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 311s [phat, pci] = lognfit (x1); 311s assert ([pd{1}.mu, pd{1}.sigma], phat); 311s assert (paramci (pd{1}), pci); 311s [phat, pci] = lognfit (x2); 311s assert ([pd{2}.mu, pd{2}.sigma], phat); 311s assert (paramci (pd{2}), pci); 312s ***** warning ... 312s fitdist ([lognrnd(1, 1, 100, 1); nan(100, 1)], "lognormal", ... 312s "By", [ones(100, 1); 2*ones(100, 1)]); 313s ***** test 313s x = nakarnd (2, 0.5, 100, 1); 313s pd = fitdist (x, "Nakagami"); 313s [phat, pci] = nakafit (x); 313s assert ([pd.mu, pd.omega], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = nakarnd (2, 0.5, 100, 1); 313s x2 = nakarnd (5, 0.8, 100, 1); 313s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = nakafit (x1); 313s assert ([pd{1}.mu, pd{1}.omega], phat); 313s assert (paramci (pd{1}), pci); 313s [phat, pci] = nakafit (x2); 313s assert ([pd{2}.mu, pd{2}.omega], phat); 313s assert (paramci (pd{2}), pci); 313s ***** warning ... 313s fitdist ([nakarnd(2, 0.5, 100, 1); nan(100, 1)], "Nakagami", ... 313s "By", [ones(100, 1); 2*ones(100, 1)]); 313s ***** test 313s randp ("seed", 123); 313s randg ("seed", 321); 313s x = nbinrnd (2, 0.5, 100, 1); 313s pd = fitdist (x, "negativebinomial"); 313s [phat, pci] = nbinfit (x); 313s assert ([pd.R, pd.P], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s randp ("seed", 345); 313s randg ("seed", 543); 313s x1 = nbinrnd (2, 0.5, 100, 1); 313s randp ("seed", 432); 313s randg ("seed", 234); 313s x2 = nbinrnd (5, 0.8, 100, 1); 313s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = nbinfit (x1); 313s assert ([pd{1}.R, pd{1}.P], phat); 313s assert (paramci (pd{1}), pci); 313s [phat, pci] = nbinfit (x2); 313s assert ([pd{2}.R, pd{2}.P], phat); 313s assert (paramci (pd{2}), pci); 313s ***** warning ... 313s fitdist ([nbinrnd(2, 0.5, 100, 1); nan(100, 1)], "nbin", ... 313s "By", [ones(100, 1); 2*ones(100, 1)]); 313s ***** test 313s x = normrnd (1, 1, 100, 1); 313s pd = fitdist (x, "normal"); 313s [muhat, sigmahat, muci, sigmaci] = normfit (x); 313s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 313s assert (paramci (pd), [muci, sigmaci]); 313s ***** test 313s x1 = normrnd (1, 1, 100, 1); 313s x2 = normrnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 313s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 313s assert ([pd{1}.mu, pd{1}.sigma], [muhat, sigmahat]); 313s assert (paramci (pd{1}), [muci, sigmaci]); 313s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 313s assert ([pd{2}.mu, pd{2}.sigma], [muhat, sigmahat]); 313s assert (paramci (pd{2}), [muci, sigmaci]); 314s ***** warning ... 314s fitdist ([normrnd(1, 1, 100, 1); nan(100, 1)], "normal", ... 314s "By", [ones(100, 1); 2*ones(100, 1)]); 314s ***** test 314s x = poissrnd (1, 100, 1); 314s pd = fitdist (x, "poisson"); 314s [phat, pci] = poissfit (x); 314s assert (pd.lambda, phat); 314s assert (paramci (pd), pci); 314s ***** test 314s x1 = poissrnd (1, 100, 1); 314s x2 = poissrnd (5, 100, 1); 314s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = poissfit (x1); 314s assert (pd{1}.lambda, phat); 314s assert (paramci (pd{1}), pci); 314s [phat, pci] = poissfit (x2); 314s assert (pd{2}.lambda, phat); 314s assert (paramci (pd{2}), pci); 315s ***** warning ... 315s fitdist ([poissrnd(1, 100, 1); nan(100, 1)], "poisson", ... 315s "By", [ones(100, 1); 2*ones(100, 1)]); 315s ***** test 315s x = raylrnd (1, 100, 1); 315s pd = fitdist (x, "rayleigh"); 315s [phat, pci] = raylfit (x); 315s assert (pd.sigma, phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = raylrnd (1, 100, 1); 315s x2 = raylrnd (5, 100, 1); 315s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = raylfit (x1); 315s assert (pd{1}.sigma, phat); 315s assert (paramci (pd{1}), pci); 315s [phat, pci] = raylfit (x2); 315s assert (pd{2}.sigma, phat); 315s assert (paramci (pd{2}), pci); 315s ***** warning ... 315s fitdist ([raylrnd(1, 100, 1); nan(100, 1)], "rayleigh", ... 315s "By", [ones(100, 1); 2*ones(100, 1)]); 315s ***** test 315s x = ricernd (1, 1, 100, 1); 315s pd = fitdist (x, "rician"); 315s [phat, pci] = ricefit (x); 315s assert ([pd.s, pd.sigma], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = ricernd (1, 1, 100, 1); 315s x2 = ricernd (5, 2, 100, 1); 315s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = ricefit (x1); 315s assert ([pd{1}.s, pd{1}.sigma], phat); 315s assert (paramci (pd{1}), pci); 315s [phat, pci] = ricefit (x2); 315s assert ([pd{2}.s, pd{2}.sigma], phat); 315s assert (paramci (pd{2}), pci); 316s ***** warning ... 316s fitdist ([ricernd(1, 1, 100, 1); nan(100, 1)], "rician", ... 316s "By", [ones(100, 1); 2*ones(100, 1)]); 316s ***** warning ... 316s fitdist ([1 2 3 4 5], "Stable"); 316s ***** test 316s x = tlsrnd (0, 1, 1, 100, 1); 316s pd = fitdist (x, "tlocationscale"); 316s [phat, pci] = tlsfit (x); 316s assert ([pd.mu, pd.sigma, pd.nu], phat); 316s assert (paramci (pd), pci); 316s ***** test 316s x1 = tlsrnd (0, 1, 1, 100, 1); 316s x2 = tlsrnd (5, 2, 1, 100, 1); 316s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 316s [phat, pci] = tlsfit (x1); 316s assert ([pd{1}.mu, pd{1}.sigma, pd{1}.nu], phat); 316s assert (paramci (pd{1}), pci); 316s [phat, pci] = tlsfit (x2); 316s assert ([pd{2}.mu, pd{2}.sigma, pd{2}.nu], phat); 316s assert (paramci (pd{2}), pci); 317s ***** warning ... 317s fitdist ([tlsrnd(0, 1, 1, 100, 1); nan(100, 1)], "tlocationscale", ... 317s "By", [ones(100, 1); 2*ones(100, 1)]); 317s ***** test 317s x = [1 2 3 4 5]; 317s pd = fitdist (x, "weibull"); 317s [phat, pci] = wblfit (x); 317s assert ([pd.lambda, pd.k], phat); 317s assert (paramci (pd), pci); 317s ***** test 317s x = [1 2 3 4 5 6 7 8 9 10]; 317s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 317s [phat, pci] = wblfit (x(1:5)); 317s assert ([pd{1}.lambda, pd{1}.k], phat); 317s assert (paramci (pd{1}), pci); 317s [phat, pci] = wblfit (x(6:10)); 317s assert ([pd{2}.lambda, pd{2}.k], phat); 317s assert (paramci (pd{2}), pci); 318s ***** warning ... 318s fitdist ([1 2 3 4 5 NaN NaN NaN NaN NaN], "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 318s ***** error fitdist (1) 318s ***** error fitdist (1, ["as";"sd"]) 318s ***** error fitdist (1, "some") 318s ***** error ... 318s fitdist (ones (2), "normal") 318s ***** error ... 318s fitdist ([i, 2, 3], "normal") 318s ***** error ... 318s fitdist (["a", "s", "d"], "normal") 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "By") 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", i) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "ntrials", 0) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "options", 0) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 318s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 318s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 318s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 318s ***** error ... 318s fitdist (nan (100,1), "normal"); 318s ***** error ... 318s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 318s ***** error ... 318s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 318s ***** error ... 318s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 318s 103 tests, 103 passed, 0 known failure, 0 skipped 318s [inst/dist_wrap/random.m] 318s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/random.m 318s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 318s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 318s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 318s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 318s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 318s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 318s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 318s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 318s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 318s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 318s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 318s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 318s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 318s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 318s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 318s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 318s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 318s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 318s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 318s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 318s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 318s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 318s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 318s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 318s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 318s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 318s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 318s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 318s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 318s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 318s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 318s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 318s ***** error random (1) 318s ***** error random ({"beta"}) 318s ***** error ... 318s random ("Beta", "a", 2) 318s ***** error ... 318s random ("Beta", 5, "") 318s ***** error ... 318s random ("Beta", 5, {2}) 318s ***** error ... 318s random ("Beta", "a", 2, 2, 10) 318s ***** error ... 318s random ("Beta", 5, "", 2, 10) 318s ***** error ... 318s random ("Beta", 5, {2}, 2, 10) 318s ***** error ... 318s random ("Beta", 5, "", 2, 10) 318s ***** error random ("chi2") 318s ***** error random ("Beta", 5) 318s ***** error random ("Burr", 5) 318s ***** error random ("Burr", 5, 2) 318s 87 tests, 87 passed, 0 known failure, 0 skipped 318s [inst/dist_wrap/icdf.m] 318s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/icdf.m 318s ***** shared p 318s p = [0.05:0.05:0.5]; 318s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 318s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 318s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 318s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 318s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 318s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 318s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 318s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 318s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 318s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 318s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 318s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 318s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 318s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 318s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 318s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 318s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 318s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 318s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 318s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 319s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 319s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 319s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 319s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 319s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 319s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 319s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 319s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 319s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 319s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 319s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 319s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 319s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 319s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 319s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 319s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 319s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 319s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 319s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 319s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 319s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 319s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 319s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 319s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 319s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 319s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 319s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 319s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 319s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 320s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 321s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 321s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 322s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 322s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 322s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 322s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 322s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 322s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 322s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 323s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 325s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 325s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 325s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 325s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 325s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 325s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 325s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 325s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 325s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 325s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 325s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 329s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 333s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 333s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 333s ***** error icdf (1) 333s ***** error icdf ({"beta"}) 333s ***** error icdf ("beta", {[1 2 3 4 5]}) 333s ***** error icdf ("beta", "text") 333s ***** error icdf ("beta", 1+i) 333s ***** error ... 333s icdf ("Beta", p, "a", 2) 333s ***** error ... 333s icdf ("Beta", p, 5, "") 333s ***** error ... 333s icdf ("Beta", p, 5, {2}) 333s ***** error icdf ("chi2", p) 333s ***** error icdf ("Beta", p, 5) 333s ***** error icdf ("Burr", p, 5) 333s ***** error icdf ("Burr", p, 5, 2) 333s 86 tests, 86 passed, 0 known failure, 0 skipped 333s [inst/dist_wrap/pdf.m] 333s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/pdf.m 333s ***** shared x 333s x = [1:5]; 333s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 333s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 333s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 333s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 333s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 333s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 333s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 333s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 333s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 333s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 333s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 333s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 333s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 333s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 333s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 333s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 333s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 333s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 336s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 336s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 336s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 336s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 336s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 336s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 336s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 336s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 336s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 336s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 336s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 336s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 336s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 336s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 336s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 336s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 336s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 336s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 336s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 336s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 336s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 336s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 336s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 336s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 336s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 336s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 336s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 336s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 336s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 336s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 336s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 336s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 336s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 336s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 336s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 336s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 336s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 336s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 336s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 336s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 336s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 336s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 336s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 336s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 336s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 336s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 336s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 336s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 336s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 336s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 336s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 336s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 336s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 336s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 336s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 336s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 336s ***** error pdf (1) 336s ***** error pdf ({"beta"}) 336s ***** error pdf ("beta", {[1 2 3 4 5]}) 336s ***** error pdf ("beta", "text") 336s ***** error pdf ("beta", 1+i) 336s ***** error ... 336s pdf ("Beta", x, "a", 2) 336s ***** error ... 336s pdf ("Beta", x, 5, "") 336s ***** error ... 336s pdf ("Beta", x, 5, {2}) 336s ***** error pdf ("chi2", x) 336s ***** error pdf ("Beta", x, 5) 336s ***** error pdf ("Burr", x, 5) 336s ***** error pdf ("Burr", x, 5, 2) 336s 86 tests, 86 passed, 0 known failure, 0 skipped 336s [inst/dist_wrap/mle.m] 336s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_wrap/mle.m 336s ***** error mle (ones (2)) 336s ***** error mle ("text") 336s ***** error mle ([1, 2, 3, i, 5]) 336s ***** error ... 336s mle ([1:50], "distribution") 336s ***** error ... 336s mle ([1:50], "censoring", logical ([1,0,1,0])) 336s ***** error ... 336s mle ([1:50], "frequency", [1,0,1,0]) 336s ***** error ... 336s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 336s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 336s ***** error mle ([1:50], "alpha", 1) 336s ***** error mle ([1:50], "alpha", -1) 336s ***** error mle ([1:50], "alpha", i) 336s ***** error ... 336s mle ([1:50], "ntrials", -1) 336s ***** error ... 336s mle ([1:50], "ntrials", [20, 50]) 336s ***** error ... 336s mle ([1:50], "ntrials", [20.3]) 336s ***** error ... 336s mle ([1:50], "ntrials", 3i) 336s ***** error ... 336s mle ([1:50], "options", 4) 336s ***** error ... 336s mle ([1:50], "options", struct ("x", 3)) 336s ***** error mle ([1:50], "NAME", "value") 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 2 1 0], "distribution", "bernoulli") 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "bino") 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 -1 0], "distribution", "gp") 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 -1 0], "distribution", "hn") 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 336s ***** error ... 336s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 338s ***** error ... 338s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 338s ***** error ... 338s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 338s ***** error mle ([1:50], "distribution", "value") 338s ***** error ... 338s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 338s 36 tests, 36 passed, 0 known failure, 0 skipped 338s [inst/glmval.m] 338s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/glmval.m 338s ***** demo 338s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 338s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 338s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 338s b = glmfit (x, [y n], "binomial", "Link", "probit"); 338s yfit = glmval (b, x, "probit", "Size", n); 338s plot (x, y./n, 'o', x, yfit ./ n, '-') 338s ***** error glmval () 338s ***** error glmval (1) 338s ***** error glmval (1, 2) 338s ***** error ... 338s glmval ("asd", [1; 1; 1], 'probit') 338s ***** error ... 338s glmval ([], [1; 1; 1], 'probit') 338s ***** error ... 338s glmval ([0.1; 0.3; 0.4], [], 'probit') 338s ***** error ... 338s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {'log'}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), NaN) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), [1, 2]) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), [1i]) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), true) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 338s ***** error ... 338s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 338s ***** error ... 338s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 338s ***** error ... 338s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 338s 57 tests, 57 passed, 0 known failure, 0 skipped 338s [inst/Classification/ClassificationNeuralNetwork.m] 338s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationNeuralNetwork.m 338s ***** error ... 338s ClassificationNeuralNetwork () 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2)) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", {1}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 338s "Activations", {"sigmoid", "unsupported_type"}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 338s ***** error ... 338s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 338s ***** error ... 338s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 338s ***** error ... 338s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 338s ***** shared x, y, objST, Mdl 338s load fisheriris 338s x = meas; 338s y = grp2idx (species); 338s Mdl = fitcnet (x, y, "IterationLimit", 100); 338s ***** error ... 338s Mdl.ScoreTransform = "a"; 338s ***** error ... 338s predict (Mdl) 338s ***** error ... 338s predict (Mdl, []) 338s ***** error ... 338s predict (Mdl, 1) 338s ***** test 338s CVMdl = crossval (Mdl, "KFold", 5); 338s assert (class (CVMdl), "ClassificationPartitionedModel") 338s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 338s assert (CVMdl.KFold == 5) 338s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 338s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 338s ***** test 338s CVMdl = crossval (Mdl, "HoldOut", 0.2); 338s assert (class (CVMdl), "ClassificationPartitionedModel") 338s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 338s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 338s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 338s ***** error ... 338s crossval (Mdl, "KFold") 338s ***** error ... 338s crossval (Mdl, "KFold", 5, "leaveout", 'on') 338s ***** error ... 338s crossval (Mdl, "KFold", 'a') 338s ***** error ... 338s crossval (Mdl, "KFold", 1) 338s ***** error ... 338s crossval (Mdl, "KFold", -1) 338s ***** error ... 338s crossval (Mdl, "KFold", 11.5) 338s ***** error ... 338s crossval (Mdl, "KFold", [1,2]) 338s ***** error ... 338s crossval (Mdl, "Holdout", 'a') 338s ***** error ... 338s crossval (Mdl, "Holdout", 11.5) 338s ***** error ... 338s crossval (Mdl, "Holdout", -1) 338s ***** error ... 338s crossval (Mdl, "Holdout", 0) 338s ***** error ... 338s crossval (Mdl, "Holdout", 1) 338s ***** error ... 338s crossval (Mdl, "Leaveout", 1) 338s ***** error ... 338s crossval (Mdl, "CVPartition", 1) 338s ***** error ... 338s crossval (Mdl, "CVPartition", 'a') 338s ***** error ... 338s crossval (Mdl, "some", "some") 338s 58 tests, 58 passed, 0 known failure, 0 skipped 338s [inst/Classification/CompactClassificationNeuralNetwork.m] 338s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/CompactClassificationNeuralNetwork.m 338s ***** demo 338s ## Create a neural network classifier and its compact version 338s # and compare their size 338s 338s load fisheriris 338s X = meas; 338s Y = species; 338s 338s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 338s CMdl = crossval (Mdl) 338s ***** error ... 338s CompactClassificationDiscriminant (1) 338s ***** shared x, y, CMdl 338s load fisheriris 338s x = meas; 338s y = grp2idx (species); 338s Mdl = fitcnet (x, y, "IterationLimit", 100); 338s CMdl = compact (Mdl); 338s ***** error ... 338s predict (CMdl) 338s ***** error ... 338s predict (CMdl, []) 338s ***** error ... 338s predict (CMdl, 1) 338s ***** error ... 338s CMdl.ScoreTransform = "a"; 338s 5 tests, 5 passed, 0 known failure, 0 skipped 338s [inst/Classification/ClassificationPartitionedModel.m] 338s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationPartitionedModel.m 338s ***** demo 338s 338s load fisheriris 338s x = meas; 338s y = species; 338s 338s ## Create a KNN classifier model 338s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 338s 338s ## Create a partition for 5-fold cross-validation 338s partition = cvpartition (y, "KFold", 5); 338s 338s ## Create the ClassificationPartitionedModel object 338s cvModel = crossval (obj, 'cvPartition', partition) 338s ***** demo 338s 338s load fisheriris 338s x = meas; 338s y = species; 338s 338s ## Create a KNN classifier model 338s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 338s 338s ## Create the ClassificationPartitionedModel object 338s cvModel = crossval (obj); 338s 338s ## Predict the class labels for the observations not used for training 338s [label, score, cost] = kfoldPredict (cvModel); 338s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 338s sum (strcmp (label, y)) / numel (y) *100, ... 338s sum (strcmp (label, y)), numel (y)) 338s ***** test 338s load fisheriris 338s a = fitcdiscr (meas, species, "gamma", 0.3); 338s cvModel = crossval (a, "KFold", 5); 338s assert (class (cvModel), "ClassificationPartitionedModel"); 338s assert (cvModel.NumObservations, 150); 338s assert (numel (cvModel.Trained), 5); 338s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 338s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 338s assert (cvModel.KFold, 5); 338s ***** test 338s load fisheriris 338s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 338s cvModel = crossval (a, "HoldOut", 0.3); 338s assert (class (cvModel), "ClassificationPartitionedModel"); 338s assert ({cvModel.X, cvModel.Y}, {meas, species}); 338s assert (cvModel.NumObservations, 150); 338s assert (numel (cvModel.Trained), 1); 338s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 338s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 338s ***** test 338s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 338s y = ["a"; "a"; "b"; "b"]; 338s a = fitcgam (x, y, "Interactions", "all"); 338s cvModel = crossval (a, "KFold", 2); 338s assert (class (cvModel), "ClassificationPartitionedModel"); 338s assert (cvModel.NumObservations, 4); 338s assert (numel (cvModel.Trained), 2); 338s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 338s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 338s assert (cvModel.KFold, 2); 353s ***** test 353s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 353s y = ["a"; "a"; "b"; "b"]; 353s a = fitcgam (x, y); 353s cvModel = crossval (a, "LeaveOut", "on"); 353s assert (class (cvModel), "ClassificationPartitionedModel"); 353s assert ({cvModel.X, cvModel.Y}, {x, y}); 353s assert (cvModel.NumObservations, 4); 353s assert (numel (cvModel.Trained), 4); 353s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 353s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 364s ***** test 364s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 364s y = ["a"; "a"; "b"; "b"]; 364s a = fitcknn (x, y); 364s partition = cvpartition (y, "KFold", 2); 364s cvModel = ClassificationPartitionedModel (a, partition); 364s assert (class (cvModel), "ClassificationPartitionedModel"); 364s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 364s assert (cvModel.NumObservations, 4); 364s assert (cvModel.ModelParameters.NumNeighbors, 1); 364s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 364s assert (cvModel.ModelParameters.Distance, "euclidean"); 364s assert (! cvModel.ModelParameters.Standardize); 364s ***** test 364s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 364s y = ["a"; "a"; "b"; "b"]; 364s a = fitcknn (x, y, "NSMethod", "exhaustive"); 364s partition = cvpartition (y, "HoldOut", 0.2); 364s cvModel = ClassificationPartitionedModel (a, partition); 364s assert (class (cvModel), "ClassificationPartitionedModel"); 364s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 364s assert ({cvModel.X, cvModel.Y}, {x, y}); 364s assert (cvModel.NumObservations, 4); 364s assert (cvModel.ModelParameters.NumNeighbors, 1); 364s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 364s assert (cvModel.ModelParameters.Distance, "euclidean"); 364s assert (! cvModel.ModelParameters.Standardize); 364s ***** test 364s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 364s y = ["a"; "a"; "b"; "b"]; 364s k = 2; 364s a = fitcknn (x, y, "NumNeighbors" ,k); 364s partition = cvpartition (numel (y), "LeaveOut"); 364s cvModel = ClassificationPartitionedModel (a, partition); 364s assert (class (cvModel), "ClassificationPartitionedModel"); 364s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 364s assert ({cvModel.X, cvModel.Y}, {x, y}); 364s assert (cvModel.NumObservations, 4); 364s assert (cvModel.ModelParameters.NumNeighbors, k); 364s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 364s assert (cvModel.ModelParameters.Distance, "euclidean"); 364s assert (! cvModel.ModelParameters.Standardize); 364s ***** test 364s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 364s y = {"a"; "a"; "b"; "b"}; 364s a = fitcnet (x, y, "IterationLimit", 50); 364s cvModel = crossval (a, "KFold", 2); 364s assert (class (cvModel), "ClassificationPartitionedModel"); 364s assert (cvModel.NumObservations, 4); 364s assert (numel (cvModel.Trained), 2); 364s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 364s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 364s assert (cvModel.KFold, 2); 364s ***** test 364s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 364s y = {"a"; "a"; "b"; "b"}; 364s a = fitcnet (x, y, "LayerSizes", [5, 3]); 364s cvModel = crossval (a, "LeaveOut", "on"); 364s assert (class (cvModel), "ClassificationPartitionedModel"); 364s assert ({cvModel.X, cvModel.Y}, {x, y}); 364s assert (cvModel.NumObservations, 4); 364s assert (numel (cvModel.Trained), 4); 364s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 364s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 364s ***** test 364s load fisheriris 364s inds = ! strcmp (species, 'setosa'); 364s x = meas(inds, 3:4); 364s y = grp2idx (species(inds)); 364s SVMModel = fitcsvm (x,y); 364s CVMdl = crossval (SVMModel, "KFold", 5); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (CVMdl.KFold == 5) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 364s ***** test 364s load fisheriris 364s inds = ! strcmp (species, 'setosa'); 364s x = meas(inds, 3:4); 364s y = grp2idx (species(inds)); 364s obj = fitcsvm (x, y); 364s CVMdl = crossval (obj, "HoldOut", 0.2); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 364s ***** test 364s load fisheriris 364s inds = ! strcmp (species, 'setosa'); 364s x = meas(inds, 3:4); 364s y = grp2idx (species(inds)); 364s obj = fitcsvm (x, y); 364s CVMdl = crossval (obj, "LeaveOut", 'on'); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 365s ***** error ... 365s ClassificationPartitionedModel () 365s ***** error ... 365s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 365s ***** error ... 365s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 365s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 366s ***** error ... 366s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 366s ones (4,1)), 'Holdout') 366s ***** test 366s load fisheriris 366s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 366s cvModel = crossval (a, "Kfold", 4); 366s [label, score, cost] = kfoldPredict (cvModel); 366s assert (class(cvModel), "ClassificationPartitionedModel"); 366s assert ({cvModel.X, cvModel.Y}, {meas, species}); 366s assert (cvModel.NumObservations, 150); 366s ***** # assert (label, {"b"; "b"; "a"; "a"}); 366s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 366s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 366s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 366s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 366s ***** test 366s x = ones(4, 11); 366s y = {"a"; "a"; "b"; "b"}; 366s k = 3; 366s a = fitcknn (x, y, "NumNeighbors", k); 366s partition = cvpartition (numel (y), "LeaveOut"); 366s cvModel = ClassificationPartitionedModel (a, partition); 366s [label, score, cost] = kfoldPredict (cvModel); 366s assert (class(cvModel), "ClassificationPartitionedModel"); 366s assert ({cvModel.X, cvModel.Y}, {x, y}); 366s assert (cvModel.NumObservations, 4); 366s assert (cvModel.ModelParameters.NumNeighbors, k); 366s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 366s assert (cvModel.ModelParameters.Distance, "euclidean"); 366s assert (! cvModel.ModelParameters.Standardize); 366s assert (label, {"b"; "b"; "a"; "a"}); 366s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 366s 0.6667, 0.3333], 1e-4); 366s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 366s 0.3333, 0.6667], 1e-4); 366s ***** error ... 366s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 366s ***** error ... 366s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 369s 20 tests, 20 passed, 0 known failure, 0 skipped 369s [inst/Classification/ConfusionMatrixChart.m] 369s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ConfusionMatrixChart.m 369s ***** demo 369s ## Create a simple ConfusionMatrixChart Object 369s 369s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 369s NormalizedValues = cm.NormalizedValues 369s ClassLabels = cm.ClassLabels 369s ***** test 369s hf = figure ("visible", "off"); 369s unwind_protect 369s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 369s assert (isa (cm, "ConfusionMatrixChart"), true); 369s unwind_protect_cleanup 369s close (hf); 369s end_unwind_protect 369s warning: using the gnuplot graphics toolkit is discouraged 369s 369s The gnuplot graphics toolkit is not actively maintained and has a number 369s of limitations that are unlikely to be fixed. Communication with gnuplot 369s uses a one-directional pipe and limited information is passed back to the 369s Octave interpreter so most changes made interactively in the plot window 369s will not be reflected in the graphics properties managed by Octave. For 369s example, if the plot window is closed with a mouse click, Octave will not 369s be notified and will not update its internal list of open figure windows. 369s The qt toolkit is recommended instead. 370s 1 test, 1 passed, 0 known failure, 0 skipped 370s [inst/Classification/CompactClassificationDiscriminant.m] 370s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/CompactClassificationDiscriminant.m 370s ***** demo 370s ## Create a discriminant analysis classifier and its compact version 370s # and compare their size 370s 370s load fisheriris 370s X = meas; 370s Y = species; 370s 370s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 370s CMdl = crossval (Mdl) 370s ***** test 370s load fisheriris 370s x = meas; 370s y = species; 370s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 370s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 370s CMdl = compact (Mdl); 370s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 370s 0.092721, 0.115388, 0.055244, 0.032710; ... 370s 0.167514, 0.055244, 0.185188, 0.042665; ... 370s 0.038401, 0.032710, 0.042665, 0.041882]; 370s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 370s 5.9360, 2.7700, 4.2600, 1.3260; ... 370s 6.5880, 2.9740, 5.5520, 2.0260]; 370s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 370s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 370s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 370s assert (class (CMdl), "CompactClassificationDiscriminant"); 370s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 370s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 370s assert (CMdl.ClassNames, unique (species)) 370s assert (CMdl.Sigma, sigma, 1e-6) 370s assert (CMdl.Mu, mu, 1e-14) 370s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 370s assert (CMdl.PredictorNames, PredictorNames) 370s ***** test 370s load fisheriris 370s x = meas; 370s y = species; 370s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 370s CMdl = compact (Mdl); 370s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 370s 0.046361, 0.115388, 0.027622, 0.016355; ... 370s 0.083757, 0.027622, 0.185188, 0.021333; ... 370s 0.019201, 0.016355, 0.021333, 0.041882]; 370s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 370s 5.9360, 2.7700, 4.2600, 1.3260; ... 370s 6.5880, 2.9740, 5.5520, 2.0260]; 370s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 370s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 370s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 370s assert (class (CMdl), "CompactClassificationDiscriminant"); 370s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 370s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 370s assert (CMdl.ClassNames, unique (species)) 370s assert (CMdl.Sigma, sigma, 1e-6) 370s assert (CMdl.Mu, mu, 1e-14) 370s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 370s ***** error ... 370s CompactClassificationDiscriminant (1) 370s ***** test 370s load fisheriris 370s x = meas; 370s y = species; 370s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 370s CMdl = compact (Mdl); 370s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 370s assert (label, {'versicolor'}) 370s assert (score, [0, 0.9999, 0.0001], 1e-4) 370s assert (cost, [1, 0.0001, 0.9999], 1e-4) 370s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 370s assert (label, {'versicolor'}) 370s assert (score, [0, 0.6368, 0.3632], 1e-4) 370s assert (cost, [1, 0.3632, 0.6368], 1e-4) 370s ***** test 370s load fisheriris 370s x = meas; 370s y = species; 370s xc = [min(x); mean(x); max(x)]; 370s Mdl = fitcdiscr (x, y); 370s CMdl = compact (Mdl); 370s [label, score, cost] = predict (CMdl, xc); 370s l = {'setosa'; 'versicolor'; 'virginica'}; 370s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 370s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 370s assert (label, l) 370s assert (score, s, 1e-4) 370s assert (cost, c, 1e-4) 370s ***** shared MODEL 370s X = rand (10,2); 370s Y = [ones(5,1);2*ones(5,1)]; 370s MODEL = compact (ClassificationDiscriminant (X, Y)); 370s ***** error ... 370s predict (MODEL) 370s ***** error ... 370s predict (MODEL, []) 370s ***** error ... 370s predict (MODEL, 1) 370s ***** test 370s load fisheriris 370s model = fitcdiscr (meas, species); 370s x = mean (meas); 370s y = {'versicolor'}; 370s L = loss (model, x, y); 370s assert (L, 0) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6]; 370s y = {'A'; 'B'; 'A'}; 370s model = fitcdiscr (x, y, "Gamma", 0.4); 370s x_test = [1, 6; 3, 3]; 370s y_test = {'A'; 'B'}; 370s L = loss (model, x_test, y_test); 370s assert (L, 0.3333, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6; 7, 8]; 370s y = ['1'; '2'; '3'; '1']; 370s model = fitcdiscr (x, y, "gamma" , 0.5); 370s x_test = [3, 3]; 370s y_test = ['1']; 370s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 370s assert (L, 0.2423, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6; 7, 8]; 370s y = ['1'; '2'; '3'; '1']; 370s model = fitcdiscr (x, y, "gamma" , 0.5); 370s x_test = [3, 3; 5, 7]; 370s y_test = ['1'; '2']; 370s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 370s assert (L, 0.3333, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6; 7, 8]; 370s y = ['1'; '2'; '3'; '1']; 370s model = fitcdiscr (x, y, "gamma" , 0.5); 370s x_test = [3, 3; 5, 7]; 370s y_test = ['1'; '2']; 370s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 370s assert (L, 0.5886, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6; 7, 8]; 370s y = ['1'; '2'; '3'; '1']; 370s model = fitcdiscr (x, y, "gamma" , 0.5); 370s x_test = [3, 3; 5, 7]; 370s y_test = ['1'; '2']; 370s W = [1; 2]; 370s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 370s assert (L, 0.5107, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6]; 370s y = {'A'; 'B'; 'A'}; 370s model = fitcdiscr (x, y, "gamma" , 0.5); 370s x_with_nan = [1, 2; NaN, 4]; 370s y_test = {'A'; 'B'}; 370s L = loss (model, x_with_nan, y_test); 370s assert (L, 0.3333, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6]; 370s y = {'A'; 'B'; 'A'}; 370s model = fitcdiscr (x, y); 370s x_with_nan = [1, 2; NaN, 4]; 370s y_test = {'A'; 'B'}; 370s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 370s assert (isnan (L)) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6]; 370s y = {'A'; 'B'; 'A'}; 370s model = fitcdiscr (x, y); 370s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 370s L = loss (model, x, y, 'LossFun', customLossFun); 370s assert (L, 0.8889, 1e-4) 370s ***** test 370s x = [1, 2; 3, 4; 5, 6]; 370s y = [1; 2; 1]; 370s model = fitcdiscr (x, y); 370s L = loss (model, x, y, 'LossFun', 'classiferror'); 370s assert (L, 0.3333, 1e-4) 370s ***** error ... 370s loss (MODEL) 370s ***** error ... 370s loss (MODEL, ones (4,2)) 370s ***** error ... 370s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 370s ***** error ... 370s loss (MODEL, ones (4,2), ones (3,1)) 370s ***** error ... 370s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 370s ***** error ... 370s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 370s load fisheriris 370s mdl = fitcdiscr (meas, species); 370s X = mean (meas); 370s Y = {'versicolor'}; 370s m = margin (mdl, X, Y); 370s assert (m, 1, 1e-6) 370s ***** test 370s X = [1, 2; 3, 4; 5, 6]; 370s Y = [1; 2; 1]; 370s mdl = fitcdiscr (X, Y, "gamma", 0.5); 370s m = margin (mdl, X, Y); 370s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 370s ***** error ... 370s margin (MODEL) 370s ***** error ... 370s margin (MODEL, ones (4,2)) 370s ***** error ... 370s margin (MODEL, ones (4,2), ones (3,1)) 370s 28 tests, 28 passed, 0 known failure, 0 skipped 370s [inst/Classification/ClassificationSVM.m] 370s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationSVM.m 370s ***** demo 370s ## Create a Support Vector Machine classifier and determine margin for test 370s ## data. 370s load fisheriris 370s rng(1); ## For reproducibility 370s 370s ## Select indices of the non-setosa species 370s inds = !strcmp(species, 'setosa'); 370s 370s ## Select features and labels for non-setosa species 370s X = meas(inds, 3:4); 370s Y = grp2idx(species(inds)); 370s 370s ## Convert labels to +1 and -1 370s unique_classes = unique(Y); 370s Y(Y == unique_classes(1)) = -1; 370s Y(Y == unique_classes(2)) = 1; 370s 370s ## Partition data for training and testing 370s cv = cvpartition(Y, 'HoldOut', 0.15); 370s X_train = X(training(cv), :); 370s Y_train = Y(training(cv)); 370s X_test = X(test(cv), :); 370s Y_test = Y(test(cv)); 370s 370s ## Train the SVM model 370s CVSVMModel = fitcsvm(X_train, Y_train); 370s 370s ## Calculate margins 370s m = margin(CVSVMModel, X_test, Y_test); 370s disp(m); 370s ***** demo 370s ## Create a Support Vector Machine classifier and determine loss for test 370s ## data. 370s load fisheriris 370s rng(1); ## For reproducibility 370s 370s ## Select indices of the non-setosa species 370s inds = !strcmp(species, 'setosa'); 370s 370s ## Select features and labels for non-setosa species 370s X = meas(inds, 3:4); 370s Y = grp2idx(species(inds)); 370s 370s ## Convert labels to +1 and -1 370s unique_classes = unique(Y); 370s Y(Y == unique_classes(1)) = -1; 370s Y(Y == unique_classes(2)) = 1; 370s 370s ## Randomly partition the data into training and testing sets 370s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 370s 370s X_train = X(training(cv), :); 370s Y_train = Y(training(cv)); 370s 370s X_test = X(test(cv), :); 370s Y_test = Y(test(cv)); 370s 370s ## Train the SVM model 370s SVMModel = fitcsvm(X_train, Y_train); 370s 370s ## Calculate loss 370s 370s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 370s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 370s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 370s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 370s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 370s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 370s ***** test 370s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 370s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 370s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 370s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 370s assert (class (a), "ClassificationSVM"); 370s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 370s assert ({a.X, a.Y}, {x, y}) 370s assert (a.NumObservations, 5) 370s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 370s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 370s ***** test 370s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 370s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 370s a = ClassificationSVM (x, y); 370s assert (class (a), "ClassificationSVM"); 370s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 370s assert (a.ModelParameters.BoxConstraint, 1) 370s assert (a.ClassNames, [1; -1]) 370s assert (a.ModelParameters.KernelOffset, 0) 370s ***** test 370s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 370s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 370s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 370s "KernelOffset", 2); 370s assert (class (a), "ClassificationSVM"); 370s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 370s assert (a.ModelParameters.BoxConstraint, 2) 370s assert (a.ModelParameters.KernelOffset, 2) 370s ***** test 370s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 370s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 370s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 370s "PolynomialOrder", 3); 370s assert (class (a), "ClassificationSVM"); 370s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 370s assert (a.ModelParameters.PolynomialOrder, 3) 370s ***** error ClassificationSVM () 370s ***** error ... 370s ClassificationSVM (ones(10,2)) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (5,1)) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", {1}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 370s ***** error ... 370s ClassificationSVM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 370s ***** error ... 370s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 370s ***** error ... 370s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 370s ***** error ... 370s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 370s ***** error ... 370s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 370s ***** error ... 370s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 370s ***** error ... 370s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 370s ***** error ... 370s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 370s ***** shared x, y, x_train, x_test, y_train, y_test, objST 370s load fisheriris 370s inds = ! strcmp (species, 'setosa'); 370s x = meas(inds, 3:4); 370s y = grp2idx (species(inds)); 370s ***** test 370s xc = [min(x); mean(x); max(x)]; 370s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 370s assert (isempty (obj.Alpha), true) 370s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 370s [label, score] = predict (obj, xc); 370s assert (label, [1; 2; 2]); 370s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 370s assert (score(:,1), -score(:,2), eps) 370s obj = fitPosterior (obj); 370s [label, probs] = predict (obj, xc); 370s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 3e-2); 370s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 371s ***** test 371s obj = fitcsvm (x, y); 371s assert (isempty (obj.Beta), true) 371s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 371s assert (numel (obj.Alpha), 24) 371s assert (obj.Bias, -14.415, 1e-3) 371s xc = [min(x); mean(x); max(x)]; 371s label = predict (obj, xc); 371s assert (label, [1; 2; 2]); 371s ***** error ... 371s predict (ClassificationSVM (ones (40,2), ones (40,1))) 371s ***** error ... 371s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 371s ***** error ... 371s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 371s ***** test 371s objST = fitcsvm (x, y); 371s objST.ScoreTransform = "a"; 371s ***** error ... 371s [labels, scores] = predict (objST, x); 371s ***** error ... 371s [labels, scores] = resubPredict (objST); 371s ***** test 371s rand ("seed", 1); 371s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 371s 'Tolerance', 1e-7); 371s obj = CVSVMModel.Trained{1}; 371s testInds = test (CVSVMModel.Partition); 371s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 371s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 371s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 371s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 371s assert (computed_margin, expected_margin, 1e-4); 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 371s ***** error ... 371s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 371s ***** test 371s rand ("seed", 1); 371s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 371s obj = CVSVMModel.Trained{1}; 371s testInds = test (CVSVMModel.Partition); 371s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 371s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 371s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 371s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 371s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 371s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 371s assert (L1, 2.8711, 1e-4); 371s assert (L2, 0.5333, 1e-4); 371s assert (L3, 10.9685, 1e-4); 371s assert (L4, 1.9827, 1e-4); 371s assert (L5, 1.5849, 1e-4); 371s assert (L6, 7.6739, 1e-4); 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones(2,1), "LossFun") 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "LossFun", 1) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "LossFun", "some") 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "Weights", ['a','b']) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "Weights", 'a') 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "Weights", [1,2,3]) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "Weights", 3) 371s ***** error ... 371s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 371s ones (2,1), "some", "some") 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 371s ***** error ... 371s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 371s ***** test 371s SVMModel = fitcsvm (x, y); 371s CVMdl = crossval (SVMModel, "KFold", 5); 371s assert (class (CVMdl), "ClassificationPartitionedModel") 371s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 371s assert (CVMdl.KFold == 5) 371s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 371s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 371s ***** test 371s obj = fitcsvm (x, y); 371s CVMdl = crossval (obj, "HoldOut", 0.2); 371s assert (class (CVMdl), "ClassificationPartitionedModel") 371s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 371s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 371s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 371s ***** test 371s obj = fitcsvm (x, y); 371s CVMdl = crossval (obj, "LeaveOut", 'on'); 371s assert (class (CVMdl), "ClassificationPartitionedModel") 371s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 371s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 371s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 372s "KFold", 5, "leaveout", 'on') 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 372s ***** error ... 372s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 372s 115 tests, 115 passed, 0 known failure, 0 skipped 372s [inst/Classification/ClassificationKNN.m] 373s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationKNN.m 373s ***** demo 373s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 373s ## Evaluate some model predictions on new data. 373s 373s load fisheriris 373s x = meas; 373s y = species; 373s xc = [min(x); mean(x); max(x)]; 373s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 373s [label, score, cost] = predict (obj, xc) 373s ***** demo 373s load fisheriris 373s x = meas; 373s y = species; 373s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 373s 373s ## Create a cross-validated model 373s CVMdl = crossval (obj) 373s ***** demo 373s load fisheriris 373s x = meas; 373s y = species; 373s covMatrix = cov (x); 373s 373s ## Fit the k-NN model using the 'mahalanobis' distance 373s ## and the custom covariance matrix 373s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 373s 'Cov', covMatrix); 373s 373s ## Create a partition model using cvpartition 373s Partition = cvpartition (size (x, 1), 'kfold', 12); 373s 373s ## Create cross-validated model using 'cvPartition' name-value argument 373s CVMdl = crossval (obj, 'cvPartition', Partition) 373s 373s ## Access the trained model from first fold of cross-validation 373s CVMdl.Trained{1} 373s ***** demo 373s X = [1, 2; 3, 4; 5, 6]; 373s Y = {'A'; 'B'; 'A'}; 373s model = fitcknn (X, Y); 373s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 373s ## Calculate loss using custom loss function 373s L = loss (model, X, Y, 'LossFun', customLossFun) 373s ***** demo 373s X = [1, 2; 3, 4; 5, 6]; 373s Y = {'A'; 'B'; 'A'}; 373s model = fitcknn (X, Y); 373s ## Calculate loss using 'mincost' loss function 373s L = loss (model, X, Y, 'LossFun', 'mincost') 373s ***** demo 373s X = [1, 2; 3, 4; 5, 6]; 373s Y = ['1'; '2'; '3']; 373s model = fitcknn (X, Y); 373s X_test = [3, 3; 5, 7]; 373s Y_test = ['1'; '2']; 373s ## Specify custom Weights 373s W = [1; 2]; 373s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 373s ***** demo 373s load fisheriris 373s mdl = fitcknn (meas, species); 373s X = mean (meas); 373s Y = {'versicolor'}; 373s m = margin (mdl, X, Y) 373s ***** demo 373s X = [1, 2; 4, 5; 7, 8; 3, 2]; 373s Y = [2; 1; 3; 2]; 373s ## Train the model 373s mdl = fitcknn (X, Y); 373s ## Specify Vars and Labels 373s Vars = 1; 373s Labels = 2; 373s ## Calculate partialDependence 373s [pd, x, y] = partialDependence (mdl, Vars, Labels); 373s ***** demo 373s X = [1, 2; 4, 5; 7, 8; 3, 2]; 373s Y = [2; 1; 3; 2]; 373s ## Train the model 373s mdl = fitcknn (X, Y); 373s ## Specify Vars and Labels 373s Vars = 1; 373s Labels = 1; 373s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 373s ## Calculate partialDependence using queryPoints 373s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 373s queryPoints) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s k = 10; 373s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = ones (4, 11); 373s y = ["a"; "a"; "b"; "b"]; 373s k = 10; 373s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s k = 10; 373s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s k = 10; 373s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s weights = ones (4,1); 373s a = ClassificationKNN (x, y, "Standardize", 1); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.Standardize}, {true}) 373s assert ({a.Sigma}, {std(x, [], 1)}) 373s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s weights = ones (4,1); 373s a = ClassificationKNN (x, y, "Standardize", false); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.Standardize}, {false}) 373s assert ({a.Sigma}, {[]}) 373s assert ({a.Mu}, {[]}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s s = ones (1, 3); 373s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.DistParameter}, {s}) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 373s assert (class (a), "ClassificationKNN"); 373s assert (a.DistParameter, 5) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 373s "NSMethod", "exhaustive"); 373s assert (class (a), "ClassificationKNN"); 373s assert (a.DistParameter, 5) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 373s assert (class (a), "ClassificationKNN"); 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 373s assert ({a.BucketSize}, {20}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y, "IncludeTies", true); 373s assert (class (a), "ClassificationKNN"); 373s assert (a.IncludeTies, true); 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y); 373s assert (class (a), "ClassificationKNN"); 373s assert (a.IncludeTies, false); 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s a = ClassificationKNN (x, y); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Prior, [0.5; 0.5]) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s prior = [0.5; 0.5]; 373s a = ClassificationKNN (x, y, "Prior", "empirical"); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Prior, prior) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "a"; "b"]; 373s prior = [0.75; 0.25]; 373s a = ClassificationKNN (x, y, "Prior", "empirical"); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Prior, prior) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "a"; "b"]; 373s prior = [0.5; 0.5]; 373s a = ClassificationKNN (x, y, "Prior", "uniform"); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Prior, prior) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s cost = eye (2); 373s a = ClassificationKNN (x, y, "Cost", cost); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Cost, [1, 0; 0, 1]) 373s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 373s y = ["a"; "a"; "b"; "b"]; 373s cost = eye (2); 373s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 373s assert (class (a), "ClassificationKNN") 373s assert (a.Cost, [1, 0; 0, 1]) 373s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 373s assert ({a.BucketSize}, {50}) 373s ***** test 373s x = [1, 2; 3, 4; 5,6; 5, 8]; 373s y = {'9'; '9'; '6'; '7'}; 373s a = ClassificationKNN (x, y); 373s assert (a.Prior, [0.25; 0.25; 0.5]) 373s ***** test 373s load fisheriris 373s x = meas; 373s y = species; 373s ClassNames = {'setosa', 'versicolor', 'virginica'}; 373s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 373s assert (a.ClassNames, ClassNames') 373s ***** error ClassificationKNN () 373s ***** error ... 373s ClassificationKNN (ones(4, 1)) 373s ***** error ... 373s ClassificationKNN (ones (4,2), ones (1,4)) 373s ***** error ... 373s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 373s ***** error ... 373s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 373s ***** error ... 373s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", {1}) 373s ***** error ... 373s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 373s ***** error ... 373s ClassificationKNN (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 373s ***** error ... 373s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 373s ***** error ... 373s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 373s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 373s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 373s ***** error ... 373s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 373s ***** error ... 373s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 373s ***** error ... 373s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 373s ***** shared x, y 373s load fisheriris 373s x = meas; 373s y = species; 373s ***** test 373s xc = [min(x); mean(x); max(x)]; 373s obj = fitcknn (x, y, "NumNeighbors", 5); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"setosa"; "versicolor"; "virginica"}) 373s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 373s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 373s ***** test 373s xc = [min(x); mean(x); max(x)]; 373s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"; "versicolor"; "virginica"}) 373s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 373s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 373s ***** test 373s xc = [min(x); mean(x); max(x)]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 373s [l, s, c] = predict (obj, xc); 373s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 373s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 373s ***** test 373s xc = [min(x); mean(x); max(x)]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"setosa"; "versicolor"; "virginica"}) 373s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 373s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 373s ***** test 373s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 373s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 373s obj = fitcknn (x, y, "NumNeighbors", 5); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 373s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 373s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 5); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 0.6, 0.4], 1e-4) 373s assert (c, [1, 0.4, 0.6], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 0.5, 0.5], 1e-4) 373s assert (c, [1, 0.5, 0.5], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"setosa"}) 373s assert (s, [0.9, 0.1, 0], 1e-4) 373s assert (c, [0.1, 0.9, 1], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 373s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"setosa"}) 373s assert (s, [0.8, 0.2, 0], 1e-4) 373s assert (c, [0.2, 0.8, 1], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 1, 0], 1e-4) 373s assert (c, [1, 0, 1], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 0.7, 0.3], 1e-4) 373s assert (c, [1, 0.3, 0.7], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 0.6, 0.4], 1e-4) 373s assert (c, [1, 0.4, 0.6], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"virginica"}) 373s assert (s, [0, 0.1, 0.9], 1e-4) 373s assert (c, [1, 0.9, 0.1], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"virginica"}) 373s assert (s, [0, 0.1, 0.9], 1e-4) 373s assert (c, [1, 0.9, 0.1], 1e-4) 373s ***** test 373s xc = [5, 3, 5, 1.45]; 373s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 373s [l, s, c] = predict (obj, xc); 373s assert (l, {"versicolor"}) 373s assert (s, [0, 1, 0], 1e-4) 373s assert (c, [1, 0, 1], 1e-4) 374s ***** test 374s xc = [5, 3, 5, 1.45]; 374s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 374s [l, s, c] = predict (obj, xc); 374s assert (l, {"setosa"}) 374s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 374s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 374s ***** test 374s xc = [5, 3, 5, 1.45]; 374s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 374s [l, s, c] = predict (obj, xc); 374s assert (l, {"setosa"}) 374s assert (s, [0.8, 0.2, 0], 1e-4) 374s assert (c, [0.2, 0.8, 1], 1e-4) 374s ***** test 374s xc = [min(x); mean(x); max(x)]; 374s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 374s [l, s, c] = predict (obj, xc); 374s assert (l, {"setosa"; "versicolor"; "virginica"}) 374s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 374s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 374s ***** test 374s xc = [min(x); mean(x); max(x)]; 374s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 374s [l, s, c] = predict (obj, xc); 374s assert (l, {"setosa";"setosa";"setosa"}) 374s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 374s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 374s ***** error ... 374s predict (ClassificationKNN (ones (4,2), ones (4,1))) 374s ***** error ... 374s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 374s ***** error ... 374s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 374s ***** test 374s load fisheriris 374s model = fitcknn (meas, species, 'NumNeighbors', 5); 374s X = mean (meas); 374s Y = {'versicolor'}; 374s L = loss (model, X, Y); 374s assert (L, 0) 374s ***** test 374s load fisheriris 374s model = fitcknn (meas, species, 'NumNeighbors', 5); 374s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 374s assert (L, 0.1413, 1e-4) 374s ***** test 374s load fisheriris 374s model = fitcknn (meas, species); 374s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 374s assert (L, 0.1269, 1e-4) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = {'A'; 'B'; 'A'}; 374s model = fitcknn (X, Y); 374s X_test = [1, 6; 3, 3]; 374s Y_test = {'A'; 'B'}; 374s L = loss (model, X_test, Y_test); 374s assert (abs (L - 0.6667) > 1e-5) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = {'A'; 'B'; 'A'}; 374s model = fitcknn (X, Y); 374s X_with_nan = [1, 2; NaN, 4]; 374s Y_test = {'A'; 'B'}; 374s L = loss (model, X_with_nan, Y_test); 374s assert (abs (L - 0.3333) < 1e-4) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = {'A'; 'B'; 'A'}; 374s model = fitcknn (X, Y); 374s X_with_nan = [1, 2; NaN, 4]; 374s Y_test = {'A'; 'B'}; 374s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 374s assert (isnan (L)) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = {'A'; 'B'; 'A'}; 374s model = fitcknn (X, Y); 374s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 374s L = loss (model, X, Y, 'LossFun', customLossFun); 374s assert (L, 0) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = [1; 2; 1]; 374s model = fitcknn (X, Y); 374s L = loss (model, X, Y, 'LossFun', 'classiferror'); 374s assert (L, 0) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = [true; false; true]; 374s model = fitcknn (X, Y); 374s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 374s assert (abs (L - 0.1269) < 1e-4) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = ['1'; '2'; '1']; 374s model = fitcknn (X, Y); 374s L = loss (model, X, Y, 'LossFun', 'classiferror'); 374s assert (L, 0) 374s ***** test 374s X = [1, 2; 3, 4; 5, 6]; 374s Y = ['1'; '2'; '3']; 374s model = fitcknn (X, Y); 374s X_test = [3, 3]; 374s Y_test = ['1']; 374s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 374s assert (L, 1) 375s ***** test 375s X = [1, 2; 3, 4; 5, 6]; 375s Y = ['1'; '2'; '3']; 375s model = fitcknn (X, Y); 375s X_test = [3, 3; 5, 7]; 375s Y_test = ['1'; '2']; 375s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 375s assert (L, 1) 375s ***** test 375s X = [1, 2; 3, 4; 5, 6]; 375s Y = ['1'; '2'; '3']; 375s model = fitcknn (X, Y); 375s X_test = [3, 3; 5, 7]; 375s Y_test = ['1'; '2']; 375s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 375s assert (L, 1) 375s ***** test 375s X = [1, 2; 3, 4; 5, 6]; 375s Y = ['1'; '2'; '3']; 375s model = fitcknn (X, Y); 375s X_test = [3, 3; 5, 7]; 375s Y_test = ['1'; '2']; 375s W = [1; 2]; 375s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 375s assert (abs (L - 0.6931) < 1e-4) 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1))) 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 375s ***** error ... 375s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 375s ***** error ... 375s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 375s ones (4,1), 'LossFun') 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 375s ones (4,1), 'LossFun', 'a') 375s ***** error ... 375s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 375s ones (4,1), 'Weights', 'w') 375s ***** test 375s load fisheriris 375s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 375s X = mean (meas); 375s Y = {'versicolor'}; 375s m = margin (mdl, X, Y); 375s assert (m, 1) 375s ***** test 375s X = [1, 2; 3, 4; 5, 6]; 375s Y = [1; 2; 3]; 375s mdl = fitcknn (X, Y); 375s m = margin (mdl, X, Y); 375s assert (m, [1; 1; 1]) 375s ***** test 375s X = [7, 8; 9, 10]; 375s Y = ['1'; '2']; 375s mdl = fitcknn (X, Y); 375s m = margin (mdl, X, Y); 375s assert (m, [1; 1]) 375s ***** test 375s X = [11, 12]; 375s Y = {'1'}; 375s mdl = fitcknn (X, Y); 375s m = margin (mdl, X, Y); 375s assert (isnan (m)) 375s ***** test 375s X = [1, 2; 3, 4; 5, 6]; 375s Y = [1; 2; 3]; 375s mdl = fitcknn (X, Y); 375s X1 = [15, 16]; 375s Y1 = [1]; 375s m = margin (mdl, X1, Y1); 375s assert (m, -1) 375s ***** error ... 375s margin (ClassificationKNN (ones (4,2), ones (4,1))) 375s ***** error ... 375s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 375s ***** error ... 375s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 375s ***** error ... 375s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 375s ***** error ... 375s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 375s ***** shared X, Y, mdl 375s X = [1, 2; 4, 5; 7, 8; 3, 2]; 375s Y = [2; 1; 3; 2]; 375s mdl = fitcknn (X, Y); 375s ***** test 375s Vars = 1; 375s Labels = 2; 375s [pd, x, y] = partialDependence (mdl, Vars, Labels); 375s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 375s 0.5000, 0.5000]; 375s assert (pd, pdm) 375s ***** test 375s Vars = 1; 375s Labels = 2; 375s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 375s 'NumObservationsToSample', 5); 375s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 375s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 375s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 375s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 375s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 375s assert (abs (pdm - pd) < 1) 376s ***** test 376s Vars = 1; 376s Labels = 2; 376s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 376s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 376s 0.5000, 0.5000]; 376s assert (pd, pdm) 377s ***** test 377s Vars = [1, 2]; 377s Labels = 1; 377s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 377s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 377s queryPoints, 'UseParallel', true); 377s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 377s assert (pd, pdm) 377s ***** test 377s Vars = 1; 377s Labels = [1; 2]; 377s [pd, x, y] = partialDependence (mdl, Vars, Labels); 377s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 377s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 377s 0.5000, 0.5000, 0.5000]; 377s assert (pd, pdm) 377s ***** test 377s Vars = [1, 2]; 377s Labels = [1; 2]; 377s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 377s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 377s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 377s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 377s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 377s assert (pd, pdm) 378s ***** test 378s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 378s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 378s X = [X1, double(X2)]; 378s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 378s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 378s Vars = 1; 378s Labels = 1; 378s [pd, x, y] = partialDependence (mdl, Vars, Labels); 378s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 378s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 378s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 378s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 378s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 378s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 378s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 378s 0.7500, 0.7500, 0.7500]; 378s assert (pd, pdm) 379s ***** test 379s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 379s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 379s X = [X1, double(X2)]; 379s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 379s predictorNames = {'Feature1', 'Feature2'}; 379s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 379s Vars = 'Feature1'; 379s Labels = 1; 379s [pd, x, y] = partialDependence (mdl, Vars, Labels); 379s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 379s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 379s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 379s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 379s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 379s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 379s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 379s 0.7500, 0.7500, 0.7500]; 379s assert (pd, pdm) 380s ***** test 380s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 380s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 380s X = [X1, double(X2)]; 380s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 380s predictorNames = {'Feature1', 'Feature2'}; 380s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 380s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 380s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 380s new_X = [new_X1, double(new_X2)]; 380s Vars = 'Feature1'; 380s Labels = 1; 380s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 380s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 380s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 380s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 380s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 380s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 380s 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]; 380s assert (pd, pdm) 381s ***** error ... 381s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 381s ***** error ... 381s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 381s ***** error ... 381s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 381s ones (4,1), 'NumObservationsToSample') 381s ***** error ... 381s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 381s ones (4,1), 2) 381s ***** shared x, y, obj 381s load fisheriris 381s x = meas; 381s y = species; 381s covMatrix = cov (x); 381s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 381s 'mahalanobis', 'Cov', covMatrix); 381s ***** test 381s CVMdl = crossval (obj); 381s assert (class (CVMdl), "ClassificationPartitionedModel") 381s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 381s assert (CVMdl.KFold == 10) 381s assert (CVMdl.ModelParameters.NumNeighbors == 5) 381s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 381s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 381s assert (!CVMdl.ModelParameters.Standardize) 381s ***** test 381s CVMdl = crossval (obj, "KFold", 5); 381s assert (class (CVMdl), "ClassificationPartitionedModel") 381s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 381s assert (CVMdl.KFold == 5) 381s assert (CVMdl.ModelParameters.NumNeighbors == 5) 381s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 381s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 381s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 381s ***** test 381s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 381s CVMdl = crossval (obj, "HoldOut", 0.2); 381s assert (class (CVMdl), "ClassificationPartitionedModel") 381s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 381s assert (CVMdl.ModelParameters.NumNeighbors == 5) 381s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 381s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 381s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 381s ***** test 381s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 381s CVMdl = crossval (obj, "LeaveOut", 'on'); 381s assert (class (CVMdl), "ClassificationPartitionedModel") 381s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 381s assert (CVMdl.ModelParameters.NumNeighbors == 10) 381s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 381s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 381s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 382s ***** test 382s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 382s partition = cvpartition (y, 'KFold', 3); 382s CVMdl = crossval (obj, 'cvPartition', partition); 382s assert (class (CVMdl), "ClassificationPartitionedModel") 382s assert (CVMdl.KFold == 3) 382s assert (CVMdl.ModelParameters.NumNeighbors == 10) 382s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 382s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 382s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 382s ***** error ... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 382s ***** error... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 382s ***** error ... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 382s ***** error ... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 382s ***** error ... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 382s ***** error ... 382s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 382s 165 tests, 165 passed, 0 known failure, 0 skipped 382s [inst/Classification/CompactClassificationSVM.m] 382s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/CompactClassificationSVM.m 382s ***** demo 382s ## Create a support vectors machine classifier and its compact version 382s # and compare their size 382s 382s load fisheriris 382s X = meas; 382s Y = species; 382s 382s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 382s CMdl = crossval (Mdl) 382s ***** error ... 382s CompactClassificationSVM (1) 382s ***** shared x, y, CMdl 382s load fisheriris 382s inds = ! strcmp (species, 'setosa'); 382s x = meas(inds, 3:4); 382s y = grp2idx (species(inds)); 382s ***** test 382s xc = [min(x); mean(x); max(x)]; 382s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 382s CMdl = compact (Mdl); 382s assert (isempty (CMdl.Alpha), true) 382s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 382s [label, score] = predict (CMdl, xc); 382s assert (label, [1; 2; 2]); 382s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 382s assert (score(:,1), -score(:,2), eps) 382s ***** test 382s Mdl = fitcsvm (x, y); 382s CMdl = compact (Mdl); 382s assert (isempty (CMdl.Beta), true) 382s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 382s assert (numel (CMdl.Alpha), 24) 382s assert (CMdl.Bias, -14.415, 1e-3) 382s xc = [min(x); mean(x); max(x)]; 382s label = predict (CMdl, xc); 382s assert (label, [1; 2; 2]); 382s ***** error ... 382s predict (CMdl) 382s ***** error ... 382s predict (CMdl, []) 382s ***** error ... 382s predict (CMdl, 1) 382s ***** test 382s CMdl.ScoreTransform = "a"; 382s ***** error ... 382s [labels, scores] = predict (CMdl, x); 382s ***** test 382s rand ("seed", 1); 382s C = cvpartition (y, 'HoldOut', 0.15); 382s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 382s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 382s CMdl = compact (Mdl); 382s testInds = test (C); 382s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 382s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 382s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 382s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 382s assert (computed_margin, expected_margin, 1e-4); 382s ***** error ... 382s margin (CMdl) 382s ***** error ... 382s margin (CMdl, zeros (2)) 382s ***** error ... 382s margin (CMdl, [], 1) 382s ***** error ... 382s margin (CMdl, 1, 1) 382s ***** error ... 382s margin (CMdl, [1, 2], []) 382s ***** error ... 382s margin (CMdl, [1, 2], [1; 2]) 382s ***** test 382s rand ("seed", 1); 382s C = cvpartition (y, 'HoldOut', 0.15); 382s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 382s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 382s CMdl = compact (Mdl); 382s testInds = test (C); 382s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 382s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 382s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 382s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 382s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 382s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 382s assert (L1, 2.8711, 1e-4); 382s assert (L2, 0.5333, 1e-4); 382s assert (L3, 10.9685, 1e-4); 382s assert (L4, 1.9827, 1e-4); 382s assert (L5, 1.5849, 1e-4); 382s assert (L6, 7.6739, 1e-4); 382s ***** error ... 382s loss (CMdl) 382s ***** error ... 382s loss (CMdl, zeros (2)) 382s ***** error ... 382s loss (CMdl, [1, 2], 1, "LossFun") 382s ***** error ... 382s loss (CMdl, [], zeros (2)) 382s ***** error ... 382s loss (CMdl, 1, zeros (2)) 382s ***** error ... 382s loss (CMdl, [1, 2], []) 382s ***** error ... 382s loss (CMdl, [1, 2], [1; 2]) 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "LossFun", 1) 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "LossFun", "some") 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "Weights", 'a') 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 383s ***** error ... 383s loss (CMdl, [1, 2], 1, "some", "some") 383s 29 tests, 29 passed, 0 known failure, 0 skipped 383s [inst/Classification/CompactClassificationGAM.m] 383s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/CompactClassificationGAM.m 383s ***** demo 383s ## Create a generalized additive model classifier and its compact version 383s # and compare their size 383s 383s load fisheriris 383s X = meas; 383s Y = species; 383s 383s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 383s CMdl = crossval (Mdl) 383s ***** test 383s Mdl = CompactClassificationGAM (); 383s assert (class (Mdl), "CompactClassificationGAM") 383s ***** test 383s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 383s y = [0; 0; 1; 1]; 383s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 383s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 383s CMdl = compact (Mdl); 383s assert (class (CMdl), "CompactClassificationGAM"); 383s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 383s assert (CMdl.ClassNames, {'0'; '1'}) 383s assert (CMdl.PredictorNames, PredictorNames) 383s assert (CMdl.BaseModel.Intercept, 0) 385s ***** test 385s load fisheriris 385s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 385s X = meas(inds, :); 385s Y = species(inds, :)'; 385s Y = strcmp (Y, 'virginica')'; 385s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 385s CMdl = compact (Mdl); 385s assert (class (CMdl), "CompactClassificationGAM"); 385s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 385s assert (CMdl.ClassNames, {'0'; '1'}) 385s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 385s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 385s assert (CMdl.ModelwInt.Intercept, 0) 392s ***** test 392s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 392s Y = [0; 1; 0; 1; 1]; 392s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 392s CMdl = compact (Mdl); 392s assert (class (CMdl), "CompactClassificationGAM"); 392s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 392s assert (CMdl.ClassNames, {'0'; '1'}) 392s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 392s assert (CMdl.Knots, [4, 4, 4]) 392s assert (CMdl.Order, [3, 3, 3]) 392s assert (CMdl.DoF, [7, 7, 7]) 392s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 394s ***** error ... 394s CompactClassificationGAM (1) 394s ***** test 394s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 394s y = [1; 0; 1; 0; 1]; 394s Mdl = fitcgam (x, y, "interactions", "all"); 394s CMdl = compact (Mdl); 394s l = {'0'; '0'; '0'; '0'; '0'}; 394s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 394s 0.4259, 0.5741; 0.3760, 0.6240]; 394s [labels, scores] = predict (CMdl, x); 394s assert (class (CMdl), "CompactClassificationGAM"); 394s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 394s assert (CMdl.ClassNames, {'1'; '0'}) 394s assert (CMdl.PredictorNames, {'x1', 'x2'}) 394s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 394s assert (labels, l) 394s assert (scores, s, 1e-1) 398s ***** test 398s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 398s y = [0; 0; 1; 1]; 398s interactions = [false, true, false; true, false, true; false, true, false]; 398s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 398s CMdl = compact (Mdl); 398s [label, score] = predict (CMdl, x, "includeinteractions", true); 398s l = {'0'; '0'; '1'; '1'}; 398s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 398s assert (class (CMdl), "CompactClassificationGAM"); 398s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 398s assert (CMdl.ClassNames, {'0'; '1'}) 398s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 398s assert (CMdl.ModelwInt.Intercept, 0) 398s assert (label, l) 398s assert (score, s, 1e-1) 405s ***** shared CMdl 405s Mdl = fitcgam (ones (4,2), ones (4,1)); 405s CMdl = compact (Mdl); 406s ***** error ... 406s predict (CMdl) 406s ***** error ... 406s predict (CMdl, []) 406s ***** error ... 406s predict (CMdl, 1) 406s 10 tests, 10 passed, 0 known failure, 0 skipped 406s [inst/Classification/ClassificationGAM.m] 406s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationGAM.m 406s ***** demo 406s ## Train a GAM classifier for binary classification 406s ## using specific data and plot the decision boundaries. 406s 406s ## Define specific data 406s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 406s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 406s Y = [0; 0; 0; 0; 0; ... 406s 1; 1; 1; 1; 1]; 406s 406s ## Train the GAM model 406s obj = fitcgam (X, Y, "Interactions", "all") 406s 406s ## Create a grid of values for prediction 406s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 406s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 406s [x1G, x2G] = meshgrid (x1, x2); 406s XGrid = [x1G(:), x2G(:)]; 406s [labels, score] = predict (obj, XGrid); 406s ***** test 406s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 406s y = [0; 0; 1; 1]; 406s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 406s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 406s assert (class (a), "ClassificationGAM"); 406s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 406s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 406s assert (a.ClassNames, {'0'; '1'}) 406s assert (a.PredictorNames, PredictorNames) 406s assert (a.BaseModel.Intercept, 0) 409s ***** test 409s load fisheriris 409s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 409s X = meas(inds, :); 409s Y = species(inds, :)'; 409s Y = strcmp (Y, 'virginica')'; 409s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 409s assert (class (a), "ClassificationGAM"); 409s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 409s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 409s assert (a.ClassNames, {'0'; '1'}) 409s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 409s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 409s assert (a.ModelwInt.Intercept, 0) 419s ***** test 419s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 419s Y = [0; 1; 0; 1; 1]; 419s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 419s assert (class (a), "ClassificationGAM"); 419s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 419s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 419s assert (a.ClassNames, {'0'; '1'}) 419s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 419s assert (a.Knots, [4, 4, 4]) 419s assert (a.Order, [3, 3, 3]) 419s assert (a.DoF, [7, 7, 7]) 419s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 419s ***** error ClassificationGAM () 419s ***** error ... 419s ClassificationGAM (ones(4, 1)) 419s ***** error ... 419s ClassificationGAM (ones (4,2), ones (1,4)) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 419s ***** error ... 419s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 419s ***** error ... 419s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", {1}) 419s ***** error ... 419s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 419s ***** error ... 419s ClassificationGAM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 419s ***** error ... 419s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 419s ***** error ... 419s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 419s ***** error ... 419s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 419s y = [1; 0; 1; 0; 1]; 419s a = ClassificationGAM (x, y, "interactions", "all"); 419s l = {'0'; '0'; '0'; '0'; '0'}; 419s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 419s 0.4259, 0.5741; 0.3760, 0.6240]; 419s [labels, scores] = predict (a, x); 419s assert (class (a), "ClassificationGAM"); 419s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 419s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 419s assert (a.ClassNames, {'1'; '0'}) 419s assert (a.PredictorNames, {'x1', 'x2'}) 419s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 419s assert (labels, l) 419s assert (scores, s, 1e-1) 422s ***** test 422s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 422s y = [0; 0; 1; 1]; 422s interactions = [false, true, false; true, false, true; false, true, false]; 422s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 422s [label, score] = predict (a, x, "includeinteractions", true); 422s l = {'0'; '0'; '1'; '1'}; 422s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 422s assert (class (a), "ClassificationGAM"); 422s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 422s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 422s assert (a.ClassNames, {'0'; '1'}) 422s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 422s assert (a.ModelwInt.Intercept, 0) 422s assert (label, l) 422s assert (score, s, 1e-1) 429s ***** error ... 429s predict (ClassificationGAM (ones (4,2), ones (4,1))) 430s ***** error ... 430s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 432s ***** error ... 432s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 433s ***** shared x, y, obj 433s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6]; 433s y = [0; 0; 1; 1; 0]; 433s obj = fitcgam (x, y); 436s ***** test 436s CVMdl = crossval (obj); 436s assert (class (CVMdl), "ClassificationPartitionedModel") 436s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 436s assert (CVMdl.KFold == 4) 436s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 436s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 436s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 436s warning: called from 436s cvpartition at line 764 column 19 436s crossval at line 792 column 9 436s __test__ at line 3 column 2 436s test at line 685 column 11 436s /tmp/tmp.vpN5xdrKMr at line 158 column 2 436s 451s ***** test 451s CVMdl = crossval (obj, "KFold", 2); 451s assert (class (CVMdl), "ClassificationPartitionedModel") 451s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 451s assert (CVMdl.KFold == 2) 451s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 451s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 451s ***** test 451s CVMdl = crossval (obj, "HoldOut", 0.2); 451s assert (class (CVMdl), "ClassificationPartitionedModel") 451s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 451s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 451s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 452s ***** test 452s partition = cvpartition (y, 'KFold', 3); 452s CVMdl = crossval (obj, 'cvPartition', partition); 452s assert (class (CVMdl), "ClassificationPartitionedModel") 452s assert (CVMdl.KFold == 3) 452s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 452s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 452s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 452s warning: called from 452s cvpartition at line 764 column 19 452s __test__ at line 3 column 2 452s test at line 685 column 11 452s /tmp/tmp.vpN5xdrKMr at line 158 column 2 452s 459s ***** error ... 459s crossval (obj, "kfold") 459s ***** error... 459s crossval (obj, "kfold", 12, "holdout", 0.2) 459s ***** error ... 459s crossval (obj, "kfold", 'a') 459s ***** error ... 459s crossval (obj, "holdout", 2) 459s ***** error ... 459s crossval (obj, "leaveout", 1) 459s ***** error ... 459s crossval (obj, "cvpartition", 1) 459s 35 tests, 35 passed, 0 known failure, 0 skipped 459s [inst/Classification/ClassificationDiscriminant.m] 459s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Classification/ClassificationDiscriminant.m 459s ***** demo 459s ## Create discriminant classifier 459s ## Evaluate some model predictions on new data. 459s 459s load fisheriris 459s x = meas; 459s y = species; 459s xc = [min(x); mean(x); max(x)]; 459s obj = fitcdiscr (x, y); 459s [label, score, cost] = predict (obj, xc); 459s ***** demo 459s load fisheriris 459s model = fitcdiscr (meas, species); 459s X = mean (meas); 459s Y = {'versicolor'}; 459s ## Compute loss for discriminant model 459s L = loss (model, X, Y) 459s ***** demo 459s load fisheriris 459s mdl = fitcdiscr (meas, species); 459s X = mean (meas); 459s Y = {'versicolor'}; 459s ## Margin for discriminant model 459s m = margin (mdl, X, Y) 459s ***** demo 459s load fisheriris 459s x = meas; 459s y = species; 459s obj = fitcdiscr (x, y, "gamma", 0.4); 459s ## Cross-validation for discriminant model 459s CVMdl = crossval (obj) 459s ***** test 459s load fisheriris 459s x = meas; 459s y = species; 459s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 459s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 459s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 459s 0.092721, 0.115388, 0.055244, 0.032710; ... 459s 0.167514, 0.055244, 0.185188, 0.042665; ... 459s 0.038401, 0.032710, 0.042665, 0.041882]; 459s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 459s 5.9360, 2.7700, 4.2600, 1.3260; ... 459s 6.5880, 2.9740, 5.5520, 2.0260]; 459s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 459s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 459s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 459s assert (class (Mdl), "ClassificationDiscriminant"); 459s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 459s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 459s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 459s assert (Mdl.ClassNames, unique (species)) 459s assert (Mdl.Sigma, sigma, 1e-6) 459s assert (Mdl.Mu, mu, 1e-14) 459s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 459s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 459s assert (Mdl.PredictorNames, PredictorNames) 459s ***** test 459s load fisheriris 459s x = meas; 459s y = species; 459s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 459s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 459s 0.046361, 0.115388, 0.027622, 0.016355; ... 459s 0.083757, 0.027622, 0.185188, 0.021333; ... 459s 0.019201, 0.016355, 0.021333, 0.041882]; 459s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 459s 5.9360, 2.7700, 4.2600, 1.3260; ... 459s 6.5880, 2.9740, 5.5520, 2.0260]; 459s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 459s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 459s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 459s assert (class (Mdl), "ClassificationDiscriminant"); 459s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 459s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 459s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 459s assert (Mdl.ClassNames, unique (species)) 459s assert (Mdl.Sigma, sigma, 1e-6) 459s assert (Mdl.Mu, mu, 1e-14) 459s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 459s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 459s ***** shared X, Y, MODEL 459s X = rand (10,2); 459s Y = [ones(5,1);2*ones(5,1)]; 459s MODEL = ClassificationDiscriminant (X, Y); 459s ***** error ClassificationDiscriminant () 459s ***** error ... 459s ClassificationDiscriminant (ones(4, 1)) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "prior") 459s ***** error ... 459s ClassificationDiscriminant (ones (4,2), ones (1,4)) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "ResponseName", 1) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "ClassNames", {1}) 459s ***** error ... 459s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 459s ***** error ... 459s ClassificationDiscriminant ([1;2;3;4;5], ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 459s ***** error ... 459s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 459s ***** error ... 459s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 459s ***** error ... 459s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "Cost", "string") 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 459s ***** error ... 459s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 459s ***** error ... 459s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 459s ***** error ... 459s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 459s ***** error ... 459s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 459s ***** error ... 459s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 459s ***** test 459s load fisheriris 459s x = meas; 459s y = species; 459s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 459s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 459s assert (label, {'versicolor'}) 459s assert (score, [0, 0.9999, 0.0001], 1e-4) 459s assert (cost, [1, 0.0001, 0.9999], 1e-4) 459s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 459s assert (label, {'versicolor'}) 459s assert (score, [0, 0.6368, 0.3632], 1e-4) 459s assert (cost, [1, 0.3632, 0.6368], 1e-4) 459s ***** test 459s load fisheriris 459s x = meas; 459s y = species; 459s xc = [min(x); mean(x); max(x)]; 459s Mdl = fitcdiscr (x, y); 459s [label, score, cost] = predict (Mdl, xc); 459s l = {'setosa'; 'versicolor'; 'virginica'}; 459s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 459s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 459s assert (label, l) 459s assert (score, s, 1e-4) 459s assert (cost, c, 1e-4) 459s ***** error ... 459s predict (MODEL) 459s ***** error ... 459s predict (MODEL, []) 459s ***** error ... 459s predict (MODEL, 1) 459s ***** test 459s load fisheriris 459s model = fitcdiscr (meas, species); 459s x = mean (meas); 459s y = {'versicolor'}; 459s L = loss (model, x, y); 459s assert (L, 0) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6]; 459s y = {'A'; 'B'; 'A'}; 459s model = fitcdiscr (x, y, "Gamma", 0.4); 459s x_test = [1, 6; 3, 3]; 459s y_test = {'A'; 'B'}; 459s L = loss (model, x_test, y_test); 459s assert (L, 0.3333, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6; 7, 8]; 459s y = ['1'; '2'; '3'; '1']; 459s model = fitcdiscr (x, y, "gamma" , 0.5); 459s x_test = [3, 3]; 459s y_test = ['1']; 459s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 459s assert (L, 0.2423, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6; 7, 8]; 459s y = ['1'; '2'; '3'; '1']; 459s model = fitcdiscr (x, y, "gamma" , 0.5); 459s x_test = [3, 3; 5, 7]; 459s y_test = ['1'; '2']; 459s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 459s assert (L, 0.3333, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6; 7, 8]; 459s y = ['1'; '2'; '3'; '1']; 459s model = fitcdiscr (x, y, "gamma" , 0.5); 459s x_test = [3, 3; 5, 7]; 459s y_test = ['1'; '2']; 459s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 459s assert (L, 0.5886, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6; 7, 8]; 459s y = ['1'; '2'; '3'; '1']; 459s model = fitcdiscr (x, y, "gamma" , 0.5); 459s x_test = [3, 3; 5, 7]; 459s y_test = ['1'; '2']; 459s W = [1; 2]; 459s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 459s assert (L, 0.5107, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6]; 459s y = {'A'; 'B'; 'A'}; 459s model = fitcdiscr (x, y, "gamma" , 0.5); 459s x_with_nan = [1, 2; NaN, 4]; 459s y_test = {'A'; 'B'}; 459s L = loss (model, x_with_nan, y_test); 459s assert (L, 0.3333, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6]; 459s y = {'A'; 'B'; 'A'}; 459s model = fitcdiscr (x, y); 459s x_with_nan = [1, 2; NaN, 4]; 459s y_test = {'A'; 'B'}; 459s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 459s assert (isnan (L)) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6]; 459s y = {'A'; 'B'; 'A'}; 459s model = fitcdiscr (x, y); 459s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 459s L = loss (model, x, y, 'LossFun', customLossFun); 459s assert (L, 0.8889, 1e-4) 459s ***** test 459s x = [1, 2; 3, 4; 5, 6]; 459s y = [1; 2; 1]; 459s model = fitcdiscr (x, y); 459s L = loss (model, x, y, 'LossFun', 'classiferror'); 459s assert (L, 0.3333, 1e-4) 459s ***** error ... 459s loss (MODEL) 459s ***** error ... 459s loss (MODEL, ones (4,2)) 459s ***** error ... 459s loss (MODEL, [], zeros (2)) 459s ***** error ... 459s loss (MODEL, 1, zeros (2)) 459s ***** error ... 459s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 459s ***** error ... 459s loss (MODEL, ones (4,2), ones (3,1)) 459s ***** error ... 459s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 459s ***** error ... 459s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 459s load fisheriris 459s mdl = fitcdiscr (meas, species); 459s X = mean (meas); 459s Y = {'versicolor'}; 459s m = margin (mdl, X, Y); 459s assert (m, 1, 1e-6) 459s ***** test 459s X = [1, 2; 3, 4; 5, 6]; 459s Y = [1; 2; 1]; 459s mdl = fitcdiscr (X, Y, "gamma", 0.5); 459s m = margin (mdl, X, Y); 459s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 459s ***** error ... 459s margin (MODEL) 459s ***** error ... 459s margin (MODEL, ones (4,2)) 459s ***** error ... 459s margin (MODEL, [], zeros (2)) 459s ***** error ... 459s margin (MODEL, 1, zeros (2)) 459s ***** error ... 459s margin (MODEL, ones (4,2), ones (3,1)) 459s ***** shared x, y, obj 459s load fisheriris 459s x = meas; 459s y = species; 459s obj = fitcdiscr (x, y, "gamma", 0.4); 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 (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 459s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 460s ***** test 460s CVMdl = crossval (obj, "KFold", 3); 460s assert (class (CVMdl), "ClassificationPartitionedModel") 460s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 460s assert (CVMdl.KFold == 3) 460s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 460s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 460s ***** test 460s CVMdl = crossval (obj, "HoldOut", 0.2); 460s assert (class (CVMdl), "ClassificationPartitionedModel") 460s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 460s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 460s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 460s ***** test 460s CVMdl = crossval (obj, "LeaveOut", 'on'); 460s assert (class (CVMdl), "ClassificationPartitionedModel") 460s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 460s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 460s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 463s ***** test 463s partition = cvpartition (y, 'KFold', 3); 463s CVMdl = crossval (obj, 'cvPartition', partition); 463s assert (class (CVMdl), "ClassificationPartitionedModel") 463s assert (CVMdl.KFold == 3) 463s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 463s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 463s ***** error ... 463s crossval (obj, "kfold") 463s ***** error... 463s crossval (obj, "kfold", 12, "holdout", 0.2) 463s ***** error ... 463s crossval (obj, "kfold", 'a') 463s ***** error ... 463s crossval (obj, "holdout", 2) 463s ***** error ... 463s crossval (obj, "leaveout", 1) 463s ***** error ... 463s crossval (obj, "cvpartition", 1) 463s 67 tests, 67 passed, 0 known failure, 0 skipped 463s [inst/hmmestimate.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hmmestimate.m 463s ***** test 463s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 463s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 463s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 463s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 463s [transprobest, outprobest] = hmmestimate (sequence, states); 463s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 463s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 463s assert (transprobest, expectedtransprob, 0.001); 463s assert (outprobest, expectedoutprob, 0.001); 463s ***** test 463s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 463s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 463s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 463s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 463s "Two", "One", "One", "One", "One", "One", "One"}; 463s symbols = {"A", "B", "C"}; 463s statenames = {"One", "Two"}; 463s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 463s symbols, "statenames", statenames); 463s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 463s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 463s assert (transprobest, expectedtransprob, 0.001); 463s assert (outprobest, expectedoutprob, 0.001); 463s ***** test 463s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 463s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 463s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 463s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 463s pseudotransitions = [8, 2; 4, 6]; 463s pseudoemissions = [2, 4, 4; 7, 2, 1]; 463s [transprobest, outprobest] = hmmestimate (sequence, states, ... 463s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 463s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 463s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 463s 0.823529, 0.117647, 0.058824]; 463s assert (transprobest, expectedtransprob, 0.001); 463s assert (outprobest, expectedoutprob, 0.001); 463s 3 tests, 3 passed, 0 known failure, 0 skipped 463s [inst/ttest.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ttest.m 463s ***** test 463s x = 8:0.1:12; 463s [h, pval, ci] = ttest (x, 10); 463s assert (h, 0) 463s assert (pval, 1, 10*eps) 463s assert (ci, [9.6219 10.3781], 1E-5) 463s [h, pval, ci0] = ttest (x, 0); 463s assert (h, 1) 463s assert (pval, 0) 463s assert (ci0, ci, 2e-15) 463s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 463s assert (h, 0) 463s assert (pval, 0.5, 10*eps) 463s assert (ci, [9.68498 Inf], 1E-5) 463s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 463s ***** error ttest ([8:0.1:12], 10, "tail", 25); 463s 3 tests, 3 passed, 0 known failure, 0 skipped 463s [inst/qrandn.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/qrandn.m 463s ***** demo 463s z = qrandn (-5, 5e6); 463s [c x] = hist (z,linspace(-1.5,1.5,200),1); 463s figure(1) 463s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 463s 463s z = qrandn (-0.14286, 5e6); 463s [c x] = hist (z,linspace(-2,2,200),1); 463s figure(2) 463s plot(x,c,"r."); axis tight; axis([-2,2]); 463s 463s z = qrandn (2.75, 5e6); 463s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 463s figure(3) 463s semilogy(x,c,"r."); axis tight; axis([-100,100]); 463s 463s # --------- 463s # Figures from the reference paper. 463s ***** error qrandn ([1 2], 1) 463s ***** error qrandn (4, 1) 463s ***** error qrandn (3, 1) 463s ***** error qrandn (2.5, 1, 2, 3) 463s ***** error qrandn (2.5) 463s ***** test 463s q = 1.5; 463s s = [2, 3]; 463s z = qrandn (q, s); 463s assert (isnumeric (z) && isequal (size (z), s)); 463s 6 tests, 6 passed, 0 known failure, 0 skipped 463s [inst/silhouette.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/silhouette.m 463s ***** demo 463s load fisheriris; 463s X = meas(:,3:4); 463s cidcs = kmeans (X, 3, "Replicates", 5); 463s silhouette (X, cidcs); 463s y_labels(cidcs([1 51 101])) = unique (species); 463s set (gca, "yticklabel", y_labels); 463s title ("Fisher's iris data"); 463s ***** error silhouette (); 463s ***** error silhouette ([1 2; 1 1]); 463s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 463s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 463s 4 tests, 4 passed, 0 known failure, 0 skipped 463s [inst/tiedrank.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/tiedrank.m 463s ***** test 463s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 463s assert (r, [1, 2.5, 4, 5, 2.5]); 463s assert (tieadj, 3); 463s ***** test 463s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 463s assert (r, [1; 2.5; 4; 5; 2.5]); 463s assert (tieadj, 3); 463s ***** test 463s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 463s assert (r, [1, 2.5, 4, 5, 2.5]); 463s assert (tieadj, [1; 0; 18]); 463s ***** test 463s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 463s assert (r, [1, 2.5, 2, 1, 2.5]); 463s assert (tieadj, 3); 463s ***** test 463s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 463s assert (r, [1, 2.5, 2, 1, 2.5]); 463s assert (tieadj, [1; 0; 18]); 463s ***** error tiedrank (ones (2)) 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], "A") 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], [true, true]) 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], 0, "A") 463s ***** error ... 463s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 463s 12 tests, 12 passed, 0 known failure, 0 skipped 463s [inst/fishertest.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fishertest.m 463s ***** demo 463s ## A Fisher's exact test example 463s 463s x = [3, 1; 1, 3] 463s [h, p, stats] = fishertest(x) 463s ***** assert (fishertest ([3, 4; 5, 7]), false); 463s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 463s ***** test 463s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 463s assert (pval, 1, 1e-14); 463s assert (stats.OddsRatio, 1.05); 463s CI = [0.159222057151289, 6.92429189601808]; 463s assert (stats.ConfidenceInterval, CI, 1e-14) 463s ***** test 463s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 463s assert (pval, 0.08080808080808080, 1e-14); 463s assert (stats.OddsRatio, 0); 463s assert (stats.ConfidenceInterval, [-Inf, Inf]) 463s ***** error fishertest (); 463s ***** error fishertest (1, 2, 3, 4, 5, 6); 463s ***** error ... 463s fishertest (ones (2, 2, 2)); 463s ***** error ... 463s fishertest ([1, 2; -3, 4]); 463s ***** error ... 463s fishertest ([1, 2; 3, 4+i]); 463s ***** error ... 463s fishertest ([1, 2; 3, 4.2]); 463s ***** error ... 463s fishertest ([NaN, 2; 3, 4]); 463s ***** error ... 463s fishertest ([1, Inf; 3, 4]); 463s ***** error ... 463s fishertest (ones (2) * 1e8); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "alpha", 0); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "alpha", 1.2); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "alpha", "val"); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "tail", "val"); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 463s ***** error ... 463s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 463s 19 tests, 19 passed, 0 known failure, 0 skipped 463s [inst/crossval.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/crossval.m 463s ***** demo 463s ## Determine the optimal number of clusters using cross-validation 463s 463s ## Declare a function to compute the sum of squared distances 463s ## between data points and a varying number of clusters. 463s function D = dist2clusters (X, Y, k) 463s [Z, Zmu, Zstd] = zscore (X); 463s [~, C] = kmeans (Z, k); 463s ZY = (Y - Zmu) ./ Zstd; 463s d = pdist2 (C, ZY, 'euclidean', 'Smallest', 1); 463s D = sum (d .^ 2); 463s endfunction 463s 463s load fisheriris 463s for k = 1:8 463s fcn = @(X, Y) dist2clusters (X, Y, k); 463s distances = crossval (fcn, meas); 463s cvdist(k) = sum (distances); 463s endfor 463s 463s plot(cvdist) 463s xlabel('Number of Clusters') 463s ylabel('CV Sum of Squared Distances') 463s xlim ([1,8]); 463s ***** test 463s function yfit = regf (Xtrain, ytrain, Xtest) 463s b = regress (ytrain, Xtrain); 463s yfit = Xtest * b; 463s endfunction 463s 463s load carsmall 463s data = [Acceleration Horsepower Weight MPG]; 463s data(any(isnan(data),2),:) = []; 463s 463s y = data(:,4); 463s X = [ones(length(y),1) data(:,1:3)]; 463s rand ("seed", 3); 463s cvMSE = crossval('mse',X,y,'Predfun',@regf); 463s assert (cvMSE, 18.720, 1e-3); 463s ***** error ... 463s crossval ('fe', rand (10, 1), rand (10, 1), 1); 463s ***** error ... 463s crossval ('mse', rand (10, 1), rand (10, 1), 1); 463s ***** error ... 463s crossval ('mse', rand (10, 1), 'Predfun', @(x,y) x + y); 463s ***** error ... 463s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y) sum (x + y)); 463s ***** error ... 463s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y,z) sum (x + y)); 463s ***** error crossval (@(x) x); 463s ***** error ... 463s crossval (@(x) x, rand (10, 3), rand (10, 1)); 463s ***** error ... 463s crossval (@(x,y) [x, y], rand (10, 3), rand (10, 1)); 463s ***** error crossval ({1}, 1, 1); 463s ***** error ... 463s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Holdout', 0.1, 'Leaveout', true) 463s ***** error ... 463s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Partition', cvpartition (10, 'Leaveout'), 'Stratify', true) 463s 12 tests, 12 passed, 0 known failure, 0 skipped 463s [inst/regression_ttest.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/regression_ttest.m 463s ***** error regression_ttest (); 463s ***** error regression_ttest (1); 463s ***** error ... 463s regression_ttest ([1 2 NaN]', [2 3 4]'); 463s ***** error ... 463s regression_ttest ([1 2 Inf]', [2 3 4]'); 463s ***** error ... 463s regression_ttest ([1 2 3+i]', [2 3 4]'); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 NaN]'); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 Inf]'); 463s ***** error ... 463s regression_ttest ([1 2 3]', [3 4 3+i]'); 463s ***** error ... 463s regression_ttest ([1 2 3]', [3 4 4 5]'); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 463s ***** error ... 463s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 463s 16 tests, 16 passed, 0 known failure, 0 skipped 463s [inst/kstest.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/kstest.m 463s ***** demo 463s ## Use the stock return data set to test the null hypothesis that the data 463s ## come from a standard normal distribution against the alternative 463s ## hypothesis that the population CDF of the data is larger that the 463s ## standard normal CDF. 463s 463s load stockreturns; 463s x = stocks(:,2); 463s [h, p, k, c] = kstest (x, "Tail", "larger") 463s 463s ## Compute the empirical CDF and plot against the standard normal CDF 463s [f, x_values] = ecdf (x); 463s h1 = plot (x_values, f); 463s hold on; 463s h2 = plot (x_values, normcdf (x_values), 'r--'); 463s set (h1, "LineWidth", 2); 463s set (h2, "LineWidth", 2); 463s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 463s "Location", "southeast"); 463s title ("Empirical CDF of stock return data against standard normal CDF") 463s ***** error kstest () 463s ***** error kstest (ones (2, 4)) 463s ***** error kstest ([2, 3, 5, 3+3i]) 463s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "tail") 463s ***** error ... 463s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "tail", 0) 463s ***** error ... 463s kstest ([2,3,4,5,6], "tail", "whatever") 463s ***** error ... 463s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 463s ***** error ... 463s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 463s ***** error ... 463s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5, 'resubstitution')) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 463s ***** error ... 463s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 463s ***** test 463s load examgrades 463s [h, p] = kstest (grades(:,1)); 463s assert (h, true); 463s assert (p, 7.58603305206105e-107, 1e-14); 463s ***** test 463s load examgrades 463s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 463s assert (h, false); 463s assert (p, 0.5612, 1e-4); 463s ***** test 463s load examgrades 463s x = grades(:,1); 463s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 463s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 463s assert (h, true); 463s assert (p, 0.0021, 1e-4); 463s ***** test 463s load stockreturns 463s x = stocks(:,3); 463s [h,p,k,c] = kstest (x, "Tail", "larger"); 463s assert (h, true); 463s assert (p, 5.085438806199252e-05, 1e-14); 463s assert (k, 0.2197, 1e-4); 463s assert (c, 0.1207, 1e-4); 463s 21 tests, 21 passed, 0 known failure, 0 skipped 463s [inst/pdist2.m] 463s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/pdist2.m 463s ***** shared x, y, xx 463s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 463s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 463s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 463s ***** test 463s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 463s assert (pdist2 (x, y), d); 463s ***** test 463s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 463s 3.4641, 2.2361, 3.3166, 5.4772]; 463s i = [3, 1, 1, 1; 2, 3, 3, 2]; 463s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 463s 3.4641, 2.2361, 3.3166, 5.4772]; 463s i = [1, 2, 2, 3;2, 1, 1, 2]; 463s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s yy = [1 2 3;5 6 7;9 5 1]; 463s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 463s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 463s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 463s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s yy = [1 2 3;5 6 7;9 5 1]; 463s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 463s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 463s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s yy = [1 2 3;5 6 7;9 5 1]; 463s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 463s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 463s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 463s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 463s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 463s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 463s ***** test 463s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 463s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 463s i = [2, 2, 2; 3, 4, 4]; 463s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 463s i = [1, 1, 3; 4, 3, 1]; 463s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 463s assert ({D, I}, {d, i}, 1e-4); 463s ***** test 463s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 463s assert (pdist2 (x, y, "cityblock"), d); 463s ***** test 463s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 463s assert (pdist2 (x, y, "chebychev"), d); 463s ***** test 463s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 463s assert (pdist2 (x, y, "cosine"), d, 1e-4); 463s ***** test 463s yy = [1 2 3;5 6 7;9 5 1]; 463s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 463s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 463s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 463s assert ({D, I}, {d, i}, eps); 463s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 463s assert ({D, I}, {d, i}, eps); 463s ***** test 463s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 463s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 463s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 463s assert ({D, I}, {d, i}, eps); 463s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 463s assert ({D, I}, {d, i}, eps); 463s ***** test 463s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 463s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 463s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 463s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 463s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 463s assert ({D, I}, {d, i}); 463s ***** warning ... 463s pdist2 (xx, xx, "mahalanobis"); 463s ***** error pdist2 (1) 463s ***** error ... 463s pdist2 (ones (4, 5), ones (4)) 463s ***** error ... 463s pdist2 (ones (4, 2, 3), ones (3, 2)) 463s ***** error ... 463s pdist2 (ones (3), ones (3), "euclidean", "Largest") 463s ***** error ... 463s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 463s ***** error ... 463s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 463s ***** error ... 463s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 463s ***** error ... 463s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 463s ***** error ... 463s pdist2 (ones (3), ones (3), "seuclidean", 3) 463s ***** error ... 463s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 463s ***** error ... 463s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 463s ***** error ... 463s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 463s ***** error ... 463s pdist2 (ones (3), eye (3), "minkowski", 0) 463s ***** error ... 463s pdist2 (ones (3), eye (3), "minkowski", -5) 463s ***** error ... 463s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 463s ***** error ... 463s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 463s ***** error ... 463s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 463s 33 tests, 33 passed, 0 known failure, 0 skipped 463s [inst/chi2test.m] 464s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/chi2test.m 464s ***** error chi2test (); 464s ***** error chi2test ([1, 2, 3, 4, 5]); 464s ***** error chi2test ([1, 2; 2, 1+3i]); 464s ***** error chi2test ([NaN, 6; 34, 12]); 464s ***** error ... 464s p = chi2test (ones (3, 3), "mutual", []); 464s ***** error ... 464s p = chi2test (ones (3, 3, 3), "testtype", 2); 464s ***** error ... 464s p = chi2test (ones (3, 3, 3), "mutual"); 464s ***** error ... 464s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 464s ***** error ... 464s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 464s ***** error ... 464s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 464s ***** warning p = chi2test (ones (2)); 464s ***** warning p = chi2test (ones (3, 2)); 464s ***** warning p = chi2test (0.4 * ones (3)); 464s ***** test 464s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 464s p = chi2test (x); 464s assert (p, 0.017787, 1e-6); 464s ***** test 464s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 464s [p, chisq] = chi2test (x); 464s assert (chisq, 11.9421, 1e-4); 464s ***** test 464s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 464s [p, chisq, df] = chi2test (x); 464s assert (df, 4); 464s ***** test 464s ***** shared x 464s x(:,:,1) = [59, 32; 9,16]; 464s x(:,:,2) = [55, 24;12,33]; 464s x(:,:,3) = [107,80;17,56];%! 464s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 464s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 464s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 464s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 464s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 464s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 464s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 464s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 464s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 464s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 464s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 464s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 464s ***** test 464s [pval, chisq, df, E] = chi2test (x); 464s assert (chisq, 64.0982, 1e-4); 464s assert (df, 7); 464s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 464s ***** test 464s [pval, chisq, df, E] = chi2test (x, "joint", 2); 464s assert (chisq, 56.0943, 1e-4); 464s assert (df, 5); 464s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 464s ***** test 464s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 464s assert (chisq, 146.6058, 1e-4); 464s assert (df, 9); 464s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 464s ***** test 464s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 464s assert (chisq, 52.2509, 1e-4); 464s assert (df, 3); 464s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 464s ***** test 464s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 464s assert (chisq, 1.6034, 1e-4); 464s assert (df, 2); 464s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 464s 34 tests, 34 passed, 0 known failure, 0 skipped 464s [inst/wblplot.m] 464s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/wblplot.m 464s ***** demo 464s x = [16 34 53 75 93 120]; 464s wblplot (x); 464s ***** demo 464s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 464s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 464s [h, p] = wblplot (x, c); 464s p 464s ***** demo 464s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 464s [h, p] = wblplot (x, [], [], 0.05); 464s p 464s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 464s ***** demo 464s x = [46 64 83 105 123 150 150]; 464s c = [0 0 0 0 0 0 1]; 464s f = [1 1 1 1 1 1 4]; 464s wblplot (x, c, f, 0.05); 464s ***** demo 464s x = [46 64 83 105 123 150 150]; 464s c = [0 0 0 0 0 0 1]; 464s f = [1 1 1 1 1 1 4]; 464s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 464s wblplot (x - 30.92, c, f, 0.05); 464s ***** test 464s hf = figure ("visible", "off"); 464s unwind_protect 464s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 464s [h, p] = wblplot (x, [], [], 0.05); 464s assert (numel (h), 4) 464s assert (p(1), 146.2545, 1E-4) 464s assert (p(2), 1.1973, 1E-4) 464s assert (p(3), 0.9999, 5E-5) 464s unwind_protect_cleanup 464s close (hf); 464s end_unwind_protect 465s 1 test, 1 passed, 0 known failure, 0 skipped 465s [inst/logistic_regression.m] 465s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/logistic_regression.m 465s ***** test 465s # Output compared to following MATLAB commands 465s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 465s # P = mnrval(B,X) 465s X = [1.489381332449196, 1.1534152241851305; ... 465s 1.8110085304863965, 0.9449666896938425; ... 465s -0.04453299665130296, 0.34278203449678646; ... 465s -0.36616019468850347, 1.130254275908322; ... 465s 0.15339143291005095, -0.7921044310668951; ... 465s -1.6031878794469698, -1.8343471035233376; ... 465s -0.14349521143198166, -0.6762996896828459; ... 465s -0.4403818557740143, -0.7921044310668951; ... 465s -0.7372685001160434, -0.027793137932169563; ... 465s -0.11875465773681024, 0.5512305689880763]; 465s Y = [1,1,1,1,1,0,0,0,0,0]'; 465s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 465s ***** test 465s # Output compared to following MATLAB commands 465s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 465s load carbig 465s X = [Acceleration Displacement Horsepower Weight]; 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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, ... 465s 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]'; 465s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 465s assert (DEV, 433.197174495549, 1e-05); 465s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 465s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 465s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 465s assert (SLOPE(1), 0.104762463756714, 1e-05); 465s assert (SLOPE(2), 0.0103357623191891, 1e-05); 465s assert (SLOPE(3), 0.0645199313242276, 1e-05); 465s assert (SLOPE(4), 0.00166377028388103, 1e-05); 465s 2 tests, 2 passed, 0 known failure, 0 skipped 465s [inst/fitrgam.m] 465s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitrgam.m 465s ***** demo 465s # Train a RegressionGAM Model for synthetic values 465s 465s f1 = @(x) cos (3 *x); 465s f2 = @(x) x .^ 3; 465s 465s # generate x1 and x2 for f1 and f2 465s x1 = 2 * rand (50, 1) - 1; 465s x2 = 2 * rand (50, 1) - 1; 465s 465s # calculate y 465s y = f1(x1) + f2(x2); 465s 465s # add noise 465s y = y + y .* 0.2 .* rand (50,1); 465s X = [x1, x2]; 465s 465s # create an object 465s a = fitrgam (X, y, "tol", 1e-3) 465s ***** test 465s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 465s y = [1; 2; 3; 4]; 465s a = fitrgam (x, y); 465s assert ({a.X, a.Y}, {x, y}) 465s assert ({a.BaseModel.Intercept}, {2.5000}) 465s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 465s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 465s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 465s assert ({a.Formula}, {[]}) 465s ***** test 465s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 465s y = [1; 2; 3; 4]; 465s pnames = {"A", "B", "C", "D"}; 465s formula = "Y ~ A + B + C + D + A:C"; 465s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 465s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 465s assert ({a.IntMatrix}, {intMat}) 465s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 465s assert ({a.Formula}, {formula}) 465s ***** error fitrgam () 465s ***** error fitrgam (ones(10,2)) 465s ***** error 465s fitrgam (ones (4,2), ones (4, 1), "K") 465s ***** error 465s fitrgam (ones (4,2), ones (3, 1)) 465s ***** error 465s fitrgam (ones (4,2), ones (3, 1), "K", 2) 465s 7 tests, 7 passed, 0 known failure, 0 skipped 465s [inst/isoutlier.m] 465s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/isoutlier.m 465s ***** demo 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s TF = isoutlier (A, "mean") 465s ***** demo 465s ## Use a moving detection method to detect local outliers in a sine wave 465s 465s x = -2*pi:0.1:2*pi; 465s A = sin(x); 465s A(47) = 0; 465s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 465s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 465s plot (time, A) 465s hold on 465s plot (time(TF), A(TF), "x") 465s datetick ('x', 20, 'keepticks') 465s legend ("Original Data", "Outlier Data") 465s ***** demo 465s ## Locate an outlier in a vector of data and visualize the outlier 465s 465s x = 1:10; 465s A = [60 59 49 49 58 100 61 57 48 58]; 465s [TF, L, U, C] = isoutlier (A); 465s plot (x, A); 465s hold on 465s plot (x(TF), A(TF), "x"); 465s xlim ([1,10]); 465s line ([1,10], [L, L], "Linestyle", ":"); 465s text (1.1, L-2, "Lower Threshold"); 465s line ([1,10], [U, U], "Linestyle", ":"); 465s text (1.1, U-2, "Upper Threshold"); 465s line ([1,10], [C, C], "Linestyle", ":"); 465s text (1.1, C-3, "Center Value"); 465s legend ("Original Data", "Outlier Data"); 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 465s assert (isoutlier (A, "median"), ... 465s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "mean"); 465s assert (L, -109.2459044922864, 1e-12) 465s assert (U, 264.9792378256198, 1e-12) 465s assert (C, 77.8666666666666, 1e-12) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "median"); 465s assert (L, 50.104386688966386, 1e-12) 465s assert (U, 67.895613311033610, 1e-12) 465s assert (C, 59) 465s ***** test 465s A = magic(5) + diag(200*ones(1,5)); 465s T = logical (eye (5)); 465s assert (isoutlier (A, 2), T) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 465s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 465s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 465s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 465s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 465s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 465s assert (L, l, 1e-4) 465s assert (U, u, 1e-4) 465s assert (C, c) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 465s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 465s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 465s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 465s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 465s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 465s assert (L, l, 1e-4) 465s assert (U, u, 1e-4) 465s assert (C, c) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "movmean", 5); 465s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 465s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 465s 52.5979, 51.0627]; 465s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 465s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 465s 66.9373]; 465s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 465s 60.6, 59.8, 59.25, 59]; 465s assert (L, l, 1e-4) 465s assert (U, u, 1e-4) 465s assert (C, c, 1e-4) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 465s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 465s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 465s 52.5979, 51.0627]; 465s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 465s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 465s 66.9373]; 465s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 465s 60.6, 59.8, 59.25, 59]; 465s assert (L, l, 1e-4) 465s assert (U, u, 1e-4) 465s assert (C, c, 1e-4) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "gesd"); 465s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 34.235977035439944, 1e-12) 465s assert (U, 89.764022964560060, 1e-12) 465s assert (C, 62) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 465s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 31.489256770616173, 1e-12) 465s assert (U, 92.510743229383820, 1e-12) 465s assert (C, 62) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 465s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 23.976664158788935, 1e-12) 465s assert (U, 100.02333584121110, 1e-12) 465s assert (C, 62) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "grubbs"); 465s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 54.642809574646606, 1e-12) 465s assert (U, 63.511036579199555, 1e-12) 465s assert (C, 59.076923076923080, 1e-12) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 465s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 54.216083184201850, 1e-12) 465s assert (U, 63.937762969644310, 1e-12) 465s assert (C, 59.076923076923080, 1e-12) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 465s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 465s assert (L, 57) 465s assert (U, 100) 465s assert (C, 78.5) 465s ***** test 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 465s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 465s assert (L, 57.5) 465s assert (U, 62) 465s assert (C, 59.75) 465s ***** shared A 465s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 465s ***** error ... 465s isoutlier (A, "movmedian", 0); 465s ***** error ... 465s isoutlier (A, "movmedian", []); 465s ***** error ... 465s isoutlier (A, "movmedian", [2 3 4]); 465s ***** error ... 465s isoutlier (A, "movmedian", 1.4); 465s ***** error ... 465s isoutlier (A, "movmedian", [0 1]); 465s ***** error ... 465s isoutlier (A, "movmedian", [2 -1]); 465s ***** error ... 465s isoutlier (A, "movmedian", {2 3}); 465s ***** error ... 465s isoutlier (A, "movmedian", "char"); 465s 465s ***** error ... 465s isoutlier (A, "movmean", 0); 465s ***** error ... 465s isoutlier (A, "movmean", []); 465s ***** error ... 465s isoutlier (A, "movmean", [2 3 4]); 465s ***** error ... 465s isoutlier (A, "movmean", 1.4); 465s ***** error ... 465s isoutlier (A, "movmean", [0 1]); 465s ***** error ... 465s isoutlier (A, "movmean", [2 -1]); 465s ***** error ... 465s isoutlier (A, "movmean", {2 3}); 465s ***** error ... 465s isoutlier (A, "movmean", "char"); 465s 465s ***** error ... 465s isoutlier (A, "percentiles", [-1 90]); 465s ***** error ... 465s isoutlier (A, "percentiles", [10 -90]); 465s ***** error ... 465s isoutlier (A, "percentiles", [90]); 465s ***** error ... 465s isoutlier (A, "percentiles", [90 20]); 466s ***** error ... 466s isoutlier (A, "percentiles", [90 20]); 466s ***** error ... 466s isoutlier (A, "percentiles", [10 20 90]); 466s ***** error ... 466s isoutlier (A, "percentiles", {10 90}); 466s ***** error ... 466s isoutlier (A, "percentiles", "char"); 466s 466s ***** error ... 466s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "SamplePoints", 15); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 466s 466s ***** error ... 466s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 466s ***** error ... 466s isoutlier (A, "gesd", "ThresholdFactor", 3); 466s ***** error ... 466s isoutlier (A, "grubbs", "ThresholdFactor", 3); 466s 466s ***** error ... 466s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 466s ***** error ... 466s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 466s 466s ***** error ... 466s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 466s ***** error isoutlier (A, {1}); 466s ***** error isoutlier (A, true); 466s ***** error isoutlier (A, false); 466s ***** error isoutlier (A, 0); 466s ***** error isoutlier (A, [1 2]); 466s ***** error isoutlier (A, -2); 466s 59 tests, 59 passed, 0 known failure, 0 skipped 466s [inst/fitcgam.m] 466s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitcgam.m 466s ***** demo 466s ## Train a GAM classifier for binary classification 466s ## using specific data and plot the decision boundaries. 466s 466s ## Define specific data 466s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 466s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 466s Y = [0; 0; 0; 0; 0; ... 466s 1; 1; 1; 1; 1]; 466s 466s ## Train the GAM model 466s obj = fitcgam (X, Y, "Interactions", "all"); 466s 466s ## Create a grid of values for prediction 466s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 466s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 466s [x1G, x2G] = meshgrid (x1, x2); 466s XGrid = [x1G(:), x2G(:)]; 466s pred = predict (obj, XGrid); 466s 466s ## Plot decision boundaries and data points 466s predNumeric = str2double (pred); 466s gidx = predNumeric > 0.5; 466s 466s figure 466s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 466s hold on 466s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 466s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 466s xlabel("Feature 1"); 466s ylabel("Feature 2"); 466s title("Generalized Additive Model (GAM) Decision Boundary"); 466s legend({"Class 1 Region", "Class 0 Region", ... 466s "Class 1 Samples", "Class 0 Samples"}, ... 466s "location", "northwest") 466s axis tight 466s hold off 466s ***** test 466s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 466s y = [0; 0; 1; 1]; 466s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 466s a = fitcgam (x, y, "PredictorNames", PredictorNames); 466s assert (class (a), "ClassificationGAM"); 466s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 466s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 466s assert (a.ClassNames, {'0'; '1'}) 466s assert (a.PredictorNames, PredictorNames) 466s assert (a.BaseModel.Intercept, 0) 468s ***** test 468s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 468s y = [1; 0; 1; 0; 1]; 468s a = fitcgam (x, y, "interactions", "all"); 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) 471s ***** test 471s load fisheriris 471s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 471s X = meas(inds, :); 471s Y = species(inds, :)'; 471s Y = strcmp (Y, 'virginica')'; 471s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 471s assert (class (a), "ClassificationGAM"); 471s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 471s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 471s assert (a.ClassNames, {'0'; '1'}) 471s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 471s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 471s assert (a.ModelwInt.Intercept, 0) 479s ***** error fitcgam () 479s ***** error fitcgam (ones (4,1)) 479s ***** error 479s fitcgam (ones (4,2), ones (4, 1), "K") 479s ***** error 479s fitcgam (ones (4,2), ones (3, 1)) 479s ***** error 479s fitcgam (ones (4,2), ones (3, 1), "K", 2) 479s 8 tests, 8 passed, 0 known failure, 0 skipped 479s [inst/hist3.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hist3.m 479s ***** demo 479s X = [ 479s 1 1 479s 1 1 479s 1 10 479s 1 10 479s 5 5 479s 5 5 479s 5 5 479s 5 5 479s 5 5 479s 7 3 479s 7 3 479s 7 3 479s 10 10 479s 10 10]; 479s hist3 (X) 479s ***** test 479s N_exp = [ 0 0 0 5 20 479s 0 0 10 15 0 479s 0 15 10 0 0 479s 20 5 0 0 0]; 479s 479s n = 100; 479s x = [1:n]'; 479s y = [n:-1:1]'; 479s D = [x y]; 479s N = hist3 (D, [4 5]); 479s assert (N, N_exp); 479s ***** test 479s N_exp = [0 0 0 0 1 479s 0 0 0 0 1 479s 0 0 0 0 1 479s 1 1 1 1 93]; 479s 479s n = 100; 479s x = [1:n]'; 479s y = [n:-1:1]'; 479s D = [x y]; 479s C{1} = [1 1.7 3 4]; 479s C{2} = [1:5]; 479s N = hist3 (D, C); 479s assert (N, N_exp); 479s ***** test 479s D = [1 1; 3 1; 3 3; 3 1]; 479s [c, nn] = hist3 (D, {0:4, 0:4}); 479s exp_c = zeros (5); 479s exp_c([7 9 19]) = [1 2 1]; 479s assert (c, exp_c); 479s assert (nn, {0:4, 0:4}); 479s ***** test 479s for i = 10 479s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 479s endfor 479s ***** test 479s edge_1 = linspace (0, 10, 10); 479s edge_2 = linspace (0, 50, 10); 479s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 479s exp_c = zeros (10, 10); 479s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 479s assert (c, exp_c); 479s 479s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 479s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 479s ***** shared X 479s X = [ 479s 5 2 479s 5 3 479s 1 4 479s 5 3 479s 4 4 479s 1 2 479s 2 3 479s 3 3 479s 5 4 479s 5 3]; 479s ***** test 479s N = zeros (10); 479s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 479s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 479s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 479s ***** test 479s N = zeros (5, 7); 479s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 479s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 479s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 479s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 479s ***** test 479s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 479s C = {(2:5), (2.5:1:4.5)}; 479s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 479s ***** test 479s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 479s C = {(1.2:3.2), (0:5)}; 479s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 479s assert (nthargout ([1 2], @hist3, X, C), {N C}) 479s ***** test 479s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 479s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 479s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 479s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 479s assert (C, C_exp, eps*10^2) 479s ***** test 479s Xv = repmat ([1:10]', [1 2]); 479s 479s ## Test Centers 479s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 479s 479s N_exp = eye (6); 479s N_exp([1 end]) = 3; 479s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 479s 479s N_exp = zeros (8, 6); 479s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 479s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 479s 479s ## Test Edges 479s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 479s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 479s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 479s 479s N_exp = zeros (14); 479s N_exp(3:12, 3:12) = eye (10); 479s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 479s 479s ## Test for Nbins 479s assert (hist3 (Xv), eye (10)) 479s assert (hist3 (Xv, [10 10]), eye (10)) 479s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 479s assert (hist3 (Xv, [5 5]), eye (5) * 2) 479s 479s N_exp = zeros (7, 5); 479s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 479s assert (hist3 (Xv, [7 5]), N_exp) 479s ***** test # bug #51059 479s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 479s [c, nn] = hist3 (D, {0:4, 0:4}); 479s exp_c = zeros (5); 479s exp_c([7 9 19]) = [1 2 1]; 479s assert (c, exp_c) 479s assert (nn, {0:4, 0:4}) 479s ***** test 479s [c, nn] = hist3 ([1 8]); 479s exp_c = zeros (10, 10); 479s exp_c(6, 6) = 1; 479s exp_nn = {-4:5, 3:12}; 479s assert (c, exp_c) 479s assert (nn, exp_nn, eps) 479s 479s [c, nn] = hist3 ([1 8], [10 11]); 479s exp_c = zeros (10, 11); 479s exp_c(6, 6) = 1; 479s exp_nn = {-4:5, 3:13}; 479s assert (c, exp_c) 479s assert (nn, exp_nn, eps) 479s ***** test 479s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 479s exp_c = zeros (10, 10); 479s exp_c(2, 1) = 1; 479s exp_c(8, 10) = 1; 479s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 479s assert (c, exp_c) 479s assert (nn, exp_nn, eps*100) 479s ***** test 479s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 479s exp_c = zeros (10, 10); 479s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 479s assert (c, exp_c) 479s assert (nn, exp_nn, eps*100) 479s ***** test 479s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 479s exp_c = zeros (10, 10); 479s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 479s assert (c, exp_c) 479s assert (nn, exp_nn, eps*100) 479s 16 tests, 16 passed, 0 known failure, 0 skipped 479s [inst/barttest.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/barttest.m 479s ***** error barttest () 479s ***** error barttest ([2,NaN;3,4]) 479s ***** error barttest (ones (30, 4), "alpha") 479s ***** error barttest (ones (30, 4), 0) 479s ***** error barttest (ones (30, 4), 1.2) 479s ***** error barttest (ones (30, 4), [0.2, 0.05]) 479s ***** error barttest (ones (30, 1)) 479s ***** error barttest (ones (30, 1), 0.05) 479s ***** test 479s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 479s [ndim, pval, chisq] = barttest (x); 479s assert (ndim, 2); 479s assert (pval, 0); 479s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 479s ***** test 479s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 479s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 479s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 479s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 479s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 479s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 479s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 479s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 479s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 479s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 479s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 479s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 479s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 479s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 479s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 479s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 479s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 479s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 479s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 479s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 479s [ndim, pval, chisq] = barttest (x); 479s assert (ndim, 3); 479s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 479s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 479s assert (chisq, chisq_out, 1e-4); 479s 10 tests, 10 passed, 0 known failure, 0 skipped 479s [inst/pcares.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/pcares.m 479s ***** demo 479s x = [ 7 26 6 60; 479s 1 29 15 52; 479s 11 56 8 20; 479s 11 31 8 47; 479s 7 52 6 33; 479s 11 55 9 22; 479s 3 71 17 6; 479s 1 31 22 44; 479s 2 54 18 22; 479s 21 47 4 26; 479s 1 40 23 34; 479s 11 66 9 12; 479s 10 68 8 12]; 479s 479s ## As we increase the number of principal components, the norm 479s ## of the residuals matrix will decrease 479s r1 = pcares (x,1); 479s n1 = norm (r1) 479s r2 = pcares (x,2); 479s n2 = norm (r2) 479s r3 = pcares (x,3); 479s n3 = norm (r3) 479s r4 = pcares (x,4); 479s n4 = norm (r4) 479s ***** test 479s load hald 479s r1 = pcares (ingredients,1); 479s r2 = pcares (ingredients,2); 479s r3 = pcares (ingredients,3); 479s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 479s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 479s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 479s ***** error pcares (ones (20, 3)) 479s ***** error ... 479s pcares (ones (30, 2), 3) 479s 3 tests, 3 passed, 0 known failure, 0 skipped 479s [inst/factoran.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/factoran.m 479s ***** demo 479s x = [ 7 26 6 60; 479s 1 29 15 52; 479s 11 56 8 20; 479s 11 31 8 47; 479s 7 52 6 33; 479s 11 55 9 22; 479s 3 71 17 6; 479s 1 31 22 44; 479s 2 54 18 22; 479s 21 47 4 26; 479s 1 40 23 34; 479s 11 66 9 12; 479s 10 68 8 12 479s ]; 479s [loadings, specvar, fscores] = factoran (x, 2); 479s ***** test 479s x = [1, 2; 2, 1; 3, 3]; 479s [loadings, specvar, fscores] = factoran (x, 1); 479s l_out = [0.7071; 0.7071]; 479s s_out = [0.5000; 0.5000]; 479s f_out = [-0.7071; -0.7071; 1.4142]; 479s assert (loadings, l_out, 1.3e-4); 479s assert (specvar, s_out, 1.3e-4); 479s assert (fscores, f_out, 1.3e-4); 479s ***** error factoran () 479s ***** error factoran (ones (5,3), 0) 479s ***** error factoran (ones (5,3), 3) 479s ***** error factoran ({1,2}, 1) 479s ***** error factoran (ones (2,2,2), 1) 479s ***** error x=ones (3,2); x(:,2)=0; factoran (x,1) 479s 7 tests, 7 passed, 0 known failure, 0 skipped 479s [inst/fitcdiscr.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitcdiscr.m 479s ***** demo 479s ## Train a linear discriminant classifier for Gamma = 0.5 479s ## and plot the decision boundaries. 479s 479s load fisheriris 479s idx = ! strcmp (species, "setosa"); 479s X = meas(idx,3:4); 479s Y = cast (strcmpi (species(idx), "virginica"), "double"); 479s obj = fitcdiscr (X, Y, "Gamma", 0.5) 479s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 479s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 479s [x1G, x2G] = meshgrid (x1, x2); 479s XGrid = [x1G(:), x2G(:)]; 479s pred = predict (obj, XGrid); 479s gidx = logical (pred); 479s 479s figure 479s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 479s hold on 479s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 479s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 479s xlabel ("Petal length (cm)"); 479s ylabel ("Petal width (cm)"); 479s title ("Linear Discriminant Analysis Decision Boundary"); 479s legend ({"Versicolor Region", "Virginica Region", ... 479s "Sampled Versicolor", "Sampled Virginica"}, ... 479s "location", "northwest") 479s axis tight 479s hold off 479s ***** test 479s load fisheriris 479s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 479s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 479s assert (label, {'versicolor'}) 479s assert (score, [0, 0.9999, 0.0001], 1e-4) 479s assert (cost, [1, 0.0001, 0.9999], 1e-4) 479s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 479s assert (label, {'versicolor'}) 479s assert (score, [0, 0.6368, 0.3632], 1e-4) 479s assert (cost, [1, 0.3632, 0.6368], 1e-4) 479s assert (class (Mdl), "ClassificationDiscriminant"); 479s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 479s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 479s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 479s assert (Mdl.ClassNames, unique (species)) 479s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 479s 0.046361, 0.115388, 0.027622, 0.016355; ... 479s 0.083757, 0.027622, 0.185188, 0.021333; ... 479s 0.019201, 0.016355, 0.021333, 0.041882]; 479s assert (Mdl.Sigma, sigma, 1e-6) 479s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 479s 5.9360, 2.7700, 4.2600, 1.3260; ... 479s 6.5880, 2.9740, 5.5520, 2.0260]; 479s assert (Mdl.Mu, mu, 1e-14) 479s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 479s ***** error fitcdiscr () 479s ***** error fitcdiscr (ones (4,1)) 479s ***** error 479s fitcdiscr (ones (4,2), ones (4, 1), "K") 479s ***** error 479s fitcdiscr (ones (4,2), ones (3, 1)) 479s ***** error 479s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 479s 6 tests, 6 passed, 0 known failure, 0 skipped 479s [inst/squareform.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/squareform.m 479s ***** shared v, m 479s v = 1:6; 479s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 479s ***** assert (squareform (v), m) 479s ***** assert (squareform (squareform (v)), v) 479s ***** assert (squareform (m), v) 479s ***** assert (squareform (v'), m) 479s ***** assert (squareform (1), [0 1;1 0]) 479s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 479s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 479s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 479s ***** test 479s for c = {@single, @double, @uint8, @uint32, @uint64} 479s f = c{1}; 479s assert (squareform (f (v)), f (m)) 479s assert (squareform (f (m)), f (v)) 479s endfor 479s 9 tests, 9 passed, 0 known failure, 0 skipped 479s [inst/dist_fit/burrlike.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/burrlike.m 479s ***** error burrlike (3.25) 479s ***** error burrlike ([1, 2, 3], ones (2)) 479s ***** error burrlike ([1, 2, 3], [-1, 3]) 479s ***** error ... 479s burrlike ([1, 2], [1, 3, 5, 7]) 479s ***** error ... 479s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 479s ***** error ... 479s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 479s ***** error ... 479s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 479s ***** error ... 479s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 479s 8 tests, 8 passed, 0 known failure, 0 skipped 479s [inst/dist_fit/lognlike.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/lognlike.m 479s ***** test 479s x = 1:50; 479s [nlogL, avar] = lognlike ([0, 0.25], x); 479s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 479s assert (nlogL, 3962.330333301793, 1e-10); 479s assert (avar, avar_out, 1e-7); 479s ***** test 479s x = 1:50; 479s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 479s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 479s assert (nlogL, 2473.183051225747, 1e-10); 479s assert (avar, avar_out, 1e-7); 479s ***** test 479s x = 1:50; 479s [nlogL, avar] = lognlike ([0, 0.5], x); 479s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 479s assert (nlogL, 1119.072424020455, 1e-12); 479s assert (avar, avar_out, 1e-6); 479s ***** test 479s x = 1:50; 479s censor = ones (1, 50); 479s censor([2, 4, 6, 8, 12, 14]) = 0; 479s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 479s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 479s assert (nlogL, 1091.746371145497, 1e-12); 479s assert (avar, avar_out, 1e-6); 479s ***** test 479s x = 1:50; 479s censor = ones (1, 50); 479s censor([2, 4, 6, 8, 12, 14]) = 0; 479s [nlogL, avar] = lognlike ([0, 1], x, censor); 479s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 479s assert (nlogL, 349.3969104144271, 1e-12); 479s assert (avar, avar_out, 1e-6); 479s ***** error ... 479s lognlike ([12, 15]); 479s ***** error lognlike ([12, 15], ones (2)); 479s ***** error ... 479s lognlike ([12, 15, 3], [1:50]); 479s ***** error ... 479s lognlike ([12, 15], [1:50], [1, 2, 3]); 479s ***** error ... 479s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 479s 10 tests, 10 passed, 0 known failure, 0 skipped 479s [inst/dist_fit/invgfit.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/invgfit.m 479s ***** demo 479s ## Sample 3 populations from different inverse Gaussian distributions 479s rand ("seed", 5); randn ("seed", 5); # for reproducibility 479s r1 = invgrnd (1, 0.2, 2000, 1); 479s rand ("seed", 2); randn ("seed", 2); # for reproducibility 479s r2 = invgrnd (1, 3, 2000, 1); 479s rand ("seed", 7); randn ("seed", 7); # for reproducibility 479s r3 = invgrnd (3, 1, 2000, 1); 479s r = [r1, r2, r3]; 479s 479s ## Plot them normalized and fix their colors 479s hist (r, [0.1:0.1:3.2], 9); 479s h = findobj (gca, "Type", "patch"); 479s set (h(1), "facecolor", "c"); 479s set (h(2), "facecolor", "g"); 479s set (h(3), "facecolor", "r"); 479s ylim ([0, 3]); 479s xlim ([0, 3]); 479s hold on 479s 479s ## Estimate their MU and LAMBDA parameters 479s mu_lambdaA = invgfit (r(:,1)); 479s mu_lambdaB = invgfit (r(:,2)); 479s mu_lambdaC = invgfit (r(:,3)); 479s 479s ## Plot their estimated PDFs 479s x = [0:0.1:3]; 479s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 479s plot (x, y, "-pr"); 479s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 479s plot (x, y, "-sg"); 479s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 479s plot (x, y, "-^c"); 479s hold off 479s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 479s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 479s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 479s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 479s mu_lambdaA(1), mu_lambdaA(2)), ... 479s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 479s mu_lambdaB(1), mu_lambdaB(2)), ... 479s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 479s mu_lambdaC(1), mu_lambdaC(2))}) 479s title ("Three population samples from different inverse Gaussian distributions") 479s hold off 479s ***** test 479s paramhat = invgfit ([1:50]); 479s paramhat_out = [25.5, 19.6973]; 479s assert (paramhat, paramhat_out, 1e-4); 479s ***** test 479s paramhat = invgfit ([1:5]); 479s paramhat_out = [3, 8.1081]; 479s assert (paramhat, paramhat_out, 1e-4); 479s ***** error invgfit (ones (2,5)); 479s ***** error invgfit ([-1 2 3 4]); 479s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 479s ***** error invgfit ([1, 2, 3, 4, 5], 0); 479s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 479s ***** error ... 479s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 479s ***** error ... 479s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 479s ***** error ... 479s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 479s ***** error ... 479s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 479s ***** error ... 479s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 479s 12 tests, 12 passed, 0 known failure, 0 skipped 479s [inst/dist_fit/evfit.m] 479s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/evfit.m 479s ***** demo 479s ## Sample 3 populations from different extreme value distributions 479s rand ("seed", 1); # for reproducibility 479s r1 = evrnd (2, 5, 400, 1); 479s rand ("seed", 12); # for reproducibility 479s r2 = evrnd (-5, 3, 400, 1); 479s rand ("seed", 13); # for reproducibility 479s r3 = evrnd (14, 8, 400, 1); 479s r = [r1, r2, r3]; 479s 479s ## Plot them normalized and fix their colors 479s hist (r, 25, 0.4); 479s h = findobj (gca, "Type", "patch"); 479s set (h(1), "facecolor", "c"); 479s set (h(2), "facecolor", "g"); 479s set (h(3), "facecolor", "r"); 479s ylim ([0, 0.28]) 479s xlim ([-30, 30]); 479s hold on 479s 479s ## Estimate their MU and SIGMA parameters 479s mu_sigmaA = evfit (r(:,1)); 479s mu_sigmaB = evfit (r(:,2)); 479s mu_sigmaC = evfit (r(:,3)); 479s 479s ## Plot their estimated PDFs 479s x = [min(r(:)):max(r(:))]; 479s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 479s plot (x, y, "-pr"); 479s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 479s plot (x, y, "-sg"); 479s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 479s plot (x, y, "-^c"); 479s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 479s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 479s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 479s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 479s mu_sigmaA(1), mu_sigmaA(2)), ... 479s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 479s mu_sigmaB(1), mu_sigmaB(2)), ... 479s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 479s mu_sigmaC(1), mu_sigmaC(2))}) 479s title ("Three population samples from different extreme value distributions") 479s hold off 479s ***** test 479s x = 1:50; 479s [paramhat, paramci] = evfit (x); 479s paramhat_out = [32.6811, 13.0509]; 479s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 479s assert (paramhat, paramhat_out, 1e-4); 479s assert (paramci, paramci_out, 1e-4); 479s ***** test 479s x = 1:50; 479s [paramhat, paramci] = evfit (x, 0.01); 479s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 479s assert (paramci, paramci_out, 1e-4); 480s ***** error evfit (ones (2,5)); 480s ***** error evfit (single (ones (1,5))); 480s ***** error evfit ([1, 2, 3, 4, NaN]); 480s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 480s ***** error 480s evfit ([1 2 3], 0.05, [], [1 5]) 480s ***** error 480s evfit ([1 2 3], 0.05, [], [1 5 -1]) 480s ***** error ... 480s evfit ([1:10], 0.05, [], [], 5) 480s 9 tests, 9 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/normlike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/normlike.m 480s ***** error normlike ([12, 15]); 480s ***** error normlike ([12, 15], ones (2)); 480s ***** error ... 480s normlike ([12, 15, 3], [1:50]); 480s ***** error ... 480s normlike ([12, 15], [1:50], [1, 2, 3]); 480s ***** error ... 480s normlike ([12, 15], [1:50], [], [1, 2, 3]); 480s ***** error ... 480s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 480s ***** test 480s x = 1:50; 480s [nlogL, avar] = normlike ([2.3, 1.2], x); 480s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 480s assert (nlogL, 13014.95883783327, 1e-10); 480s assert (avar, avar_out, 1e-4); 480s ***** test 480s x = 1:50; 480s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 480s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 480s assert (nlogL, 2854.802587833265, 1e-10); 480s assert (avar, avar_out, 1e-4); 480s ***** test 480s x = 1:50; 480s [nlogL, avar] = normlike ([21, 15], x); 480s avar_out = [5.460474308300396, -1.600790513833993; ... 480s -1.600790513833993, 2.667984189723321]; 480s assert (nlogL, 206.738325604233, 1e-12); 480s assert (avar, avar_out, 1e-14); 480s ***** test 480s x = 1:50; 480s censor = ones (1, 50); 480s censor([2, 4, 6, 8, 12, 14]) = 0; 480s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 480s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 480s assert (nlogL, Inf); 480s assert (avar, [NaN, NaN; NaN, NaN]); 480s ***** test 480s x = 1:50; 480s censor = ones (1, 50); 480s censor([2, 4, 6, 8, 12, 14]) = 0; 480s [nlogL, avar] = normlike ([21, 15], x, censor); 480s avar_out = [24.4824488866131, -10.6649544179636; ... 480s -10.6649544179636, 6.22827849965737]; 480s assert (nlogL, 86.9254371829733, 1e-12); 480s assert (avar, avar_out, 8e-14); 480s 11 tests, 11 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/hnlike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/hnlike.m 480s ***** test 480s x = 1:20; 480s paramhat = hnfit (x, 0); 480s [nlogL, acov] = hnlike (paramhat, x); 480s assert (nlogL, 64.179177404891300, 1e-14); 480s ***** test 480s x = 1:20; 480s paramhat = hnfit (x, 0); 480s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 480s assert (nlogL, 64.179177404891300, 1e-14); 480s ***** error ... 480s hnlike ([12, 15]); 480s ***** error hnlike ([12, 15, 3], [1:50]); 480s ***** error hnlike ([3], [1:50]); 480s ***** error ... 480s hnlike ([0, 3], ones (2)); 480s ***** error ... 480s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 480s ***** error ... 480s hnlike ([1, 2], ones (10, 1), ones (8,1)) 480s ***** error ... 480s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 480s 9 tests, 9 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/nbinlike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/nbinlike.m 480s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 480s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 480s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 480s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 480s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 480s ***** error nbinlike (3.25) 480s ***** error nbinlike ([5, 0.2], ones (2)) 480s ***** error nbinlike ([5, 0.2], [-1, 3]) 480s ***** error ... 480s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 480s ***** error nbinlike ([-5, 0.2], [1:15]) 480s ***** error nbinlike ([0, 0.2], [1:15]) 480s ***** error nbinlike ([5, 1.2], [3, 5]) 480s ***** error nbinlike ([5, -0.2], [3, 5]) 480s ***** error ... 480s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 480s ***** error ... 480s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 480s ***** error ... 480s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 480s 16 tests, 16 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/explike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/explike.m 480s ***** test 480s x = 12; 480s beta = 5; 480s [L, V] = explike (beta, x); 480s expected_L = 4.0094; 480s expected_V = 6.5789; 480s assert (L, expected_L, 0.001); 480s assert (V, expected_V, 0.001); 480s ***** test 480s x = 1:5; 480s beta = 2; 480s [L, V] = explike (beta, x); 480s expected_L = 10.9657; 480s expected_V = 0.4; 480s assert (L, expected_L, 0.001); 480s assert (V, expected_V, 0.001); 480s ***** error explike () 480s ***** error explike (2) 480s ***** error explike ([12, 3], [1:50]) 480s ***** error explike (3, ones (10, 2)) 480s ***** error ... 480s explike (3, [1:50], [1, 2, 3]) 480s ***** error ... 480s explike (3, [1:50], [], [1, 2, 3]) 480s 8 tests, 8 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/betafit.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/betafit.m 480s ***** demo 480s ## Sample 2 populations from different Beta distributions 480s randg ("seed", 1); # for reproducibility 480s r1 = betarnd (2, 5, 500, 1); 480s randg ("seed", 2); # for reproducibility 480s r2 = betarnd (2, 2, 500, 1); 480s r = [r1, r2]; 480s 480s ## Plot them normalized and fix their colors 480s hist (r, 12, 15); 480s h = findobj (gca, "Type", "patch"); 480s set (h(1), "facecolor", "c"); 480s set (h(2), "facecolor", "g"); 480s hold on 480s 480s ## Estimate their shape parameters 480s a_b_A = betafit (r(:,1)); 480s a_b_B = betafit (r(:,2)); 480s 480s ## Plot their estimated PDFs 480s x = [min(r(:)):0.01:max(r(:))]; 480s y = betapdf (x, a_b_A(1), a_b_A(2)); 480s plot (x, y, "-pr"); 480s y = betapdf (x, a_b_B(1), a_b_B(2)); 480s plot (x, y, "-sg"); 480s ylim ([0, 4]) 480s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 480s "Normalized HIST of sample 2 with α=2 and β=2", ... 480s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 480s a_b_A(1), a_b_A(2)), ... 480s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 480s a_b_B(1), a_b_B(2))}) 480s title ("Two population samples from different Beta distributions") 480s hold off 480s ***** test 480s x = 0.01:0.02:0.99; 480s [paramhat, paramci] = betafit (x); 480s paramhat_out = [1.0199, 1.0199]; 480s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 480s assert (paramhat, paramhat_out, 1e-4); 480s assert (paramci, paramci_out, 1e-4); 480s ***** test 480s x = 0.01:0.02:0.99; 480s [paramhat, paramci] = betafit (x, 0.01); 480s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 480s assert (paramci, paramci_out, 1e-4); 480s ***** test 480s x = 0.00:0.02:1; 480s [paramhat, paramci] = betafit (x); 480s paramhat_out = [0.0875, 0.1913]; 480s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 480s assert (paramhat, paramhat_out, 1e-4); 480s assert (paramci, paramci_out, 1e-4); 480s ***** error betafit ([0.2, 0.5+i]); 480s ***** error betafit (ones (2,2) * 0.5); 480s ***** error betafit ([0.5, 1.2]); 480s ***** error betafit ([0.1, 0.1]); 480s ***** error betafit ([0.01:0.1:0.99], 1.2); 480s ***** error ... 480s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 480s ***** error ... 480s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 480s ***** error ... 480s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 480s ***** error ... 480s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 480s ***** error ... 480s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 480s 13 tests, 13 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/normfit.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/normfit.m 480s ***** demo 480s ## Sample 3 populations from 3 different normal distributions 480s randn ("seed", 1); # for reproducibility 480s r1 = normrnd (2, 5, 5000, 1); 480s randn ("seed", 2); # for reproducibility 480s r2 = normrnd (5, 2, 5000, 1); 480s randn ("seed", 3); # for reproducibility 480s r3 = normrnd (9, 4, 5000, 1); 480s r = [r1, r2, r3]; 480s 480s ## Plot them normalized and fix their colors 480s hist (r, 15, 0.4); 480s h = findobj (gca, "Type", "patch"); 480s set (h(1), "facecolor", "c"); 480s set (h(2), "facecolor", "g"); 480s set (h(3), "facecolor", "r"); 480s hold on 480s 480s ## Estimate their mu and sigma parameters 480s [muhat, sigmahat] = normfit (r); 480s 480s ## Plot their estimated PDFs 480s x = [min(r(:)):max(r(:))]; 480s y = normpdf (x, muhat(1), sigmahat(1)); 480s plot (x, y, "-pr"); 480s y = normpdf (x, muhat(2), sigmahat(2)); 480s plot (x, y, "-sg"); 480s y = normpdf (x, muhat(3), sigmahat(3)); 480s plot (x, y, "-^c"); 480s ylim ([0, 0.5]) 480s xlim ([-20, 20]) 480s hold off 480s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 480s "Normalized HIST of sample 2 with mu=5, σ=2", ... 480s "Normalized HIST of sample 3 with mu=9, σ=4", ... 480s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 480s muhat(1), sigmahat(1)), ... 480s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 480s muhat(2), sigmahat(2)), ... 480s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 480s muhat(3), sigmahat(3))}, "location", "northwest") 480s title ("Three population samples from different normal distributions") 480s hold off 480s ***** test 480s load lightbulb 480s idx = find (lightbulb(:,2) == 0); 480s censoring = lightbulb(idx,3) == 1; 480s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 480s assert (muHat, 9496.59586737857, 1e-11); 480s assert (sigmaHat, 3064.021012796456, 2e-12); 480s ***** test 480s randn ("seed", 234); 480s x = normrnd (3, 5, [1000, 1]); 480s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 480s assert (muCI(1) < 3); 480s assert (muCI(2) > 3); 480s assert (sigmaCI(1) < 5); 480s assert (sigmaCI(2) > 5); 480s ***** error ... 480s normfit (ones (3,3,3)) 480s ***** error ... 480s normfit (ones (20,3), [], zeros (20,1)) 480s ***** error normfit (ones (20,1), 0) 480s ***** error normfit (ones (20,1), -0.3) 480s ***** error normfit (ones (20,1), 1.2) 480s ***** error normfit (ones (20,1), [0.05 0.1]) 480s ***** error normfit (ones (20,1), 0.02+i) 480s ***** error ... 480s normfit (ones (20,1), [], zeros(15,1)) 480s ***** error ... 480s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 480s ***** error ... 480s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 480s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 480s 13 tests, 13 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/ricelike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/ricelike.m 480s ***** test 480s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 480s assert (nlogL, 204.5230311010569, 1e-12); 480s ***** test 480s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 480s assert (nlogL, 8.65562164930058, 1e-12); 480s ***** error ricelike (3.25) 480s ***** error ricelike ([5, 0.2], ones (2)) 480s ***** error ... 480s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 480s ***** error ... 480s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 480s ***** error ... 480s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 480s ***** error ... 480s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 480s ***** error ... 480s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 480s 9 tests, 9 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/logllike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/logllike.m 480s ***** test 480s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 480s assert (nlogL, 211.2965, 1e-4); 480s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 480s ***** test 480s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 480s assert (nlogL, 9.2206, 1e-4); 480s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 480s ***** error logllike (3.25) 480s ***** error logllike ([5, 0.2], ones (2)) 480s ***** error ... 480s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 480s ***** error ... 480s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 480s ***** error ... 480s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 480s ***** error ... 480s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 480s 8 tests, 8 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/wbllike.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/wbllike.m 480s ***** test 480s x = 1:50; 480s [nlogL, acov] = wbllike ([2.3, 1.2], x); 480s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 480s assert (nlogL, 945.9589180651594, 1e-12); 480s assert (acov, avar_out, 1e-4); 480s ***** test 480s x = 1:50; 480s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 480s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 480s assert (nlogL, 424.9879809704742, 6e-14); 480s assert (acov, avar_out, 1e-4); 480s ***** test 480s x = 1:50; 480s [nlogL, acov] = wbllike ([21, 15], x); 480s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 480s assert (nlogL, 1635190.328991511, 1e-8); 480s assert (acov, avar_out, 1e-8); 480s ***** error wbllike ([12, 15]); 480s ***** error wbllike ([12, 15, 3], [1:50]); 480s ***** error wbllike ([12, 3], ones (10, 2)); 480s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 480s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 480s ***** error ... 480s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 480s 9 tests, 9 passed, 0 known failure, 0 skipped 480s [inst/dist_fit/loglfit.m] 480s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/loglfit.m 480s ***** demo 480s ## Sample 3 populations from different log-logistic distributions 480s rand ("seed", 5) # for reproducibility 480s r1 = loglrnd (0, 1, 2000, 1); 480s rand ("seed", 2) # for reproducibility 480s r2 = loglrnd (0, 0.5, 2000, 1); 480s rand ("seed", 7) # for reproducibility 480s r3 = loglrnd (0, 0.125, 2000, 1); 480s r = [r1, r2, r3]; 480s 480s ## Plot them normalized and fix their colors 480s hist (r, [0.05:0.1:2.5], 10); 480s h = findobj (gca, "Type", "patch"); 480s set (h(1), "facecolor", "c"); 480s set (h(2), "facecolor", "g"); 480s set (h(3), "facecolor", "r"); 480s ylim ([0, 3.5]); 480s xlim ([0, 2.0]); 480s hold on 480s 480s ## Estimate their MU and LAMBDA parameters 480s a_bA = loglfit (r(:,1)); 480s a_bB = loglfit (r(:,2)); 480s a_bC = loglfit (r(:,3)); 480s 480s ## Plot their estimated PDFs 480s x = [0.01:0.1:2.01]; 480s y = loglpdf (x, a_bA(1), a_bA(2)); 480s plot (x, y, "-pr"); 480s y = loglpdf (x, a_bB(1), a_bB(2)); 480s plot (x, y, "-sg"); 480s y = loglpdf (x, a_bC(1), a_bC(2)); 480s plot (x, y, "-^c"); 480s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 480s "Normalized HIST of sample 2 with α=1 and β=2", ... 480s "Normalized HIST of sample 3 with α=1 and β=8", ... 480s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 480s a_bA(1), a_bA(2)), ... 480s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 480s a_bB(1), a_bB(2)), ... 480s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 480s a_bC(1), a_bC(2))}) 480s title ("Three population samples from different log-logistic distributions") 480s hold off 480s ***** test 480s [paramhat, paramci] = loglfit ([1:50]); 480s paramhat_out = [3.09717, 0.468525]; 480s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 480s assert (paramhat, paramhat_out, 1e-5); 480s assert (paramci, paramci_out, 1e-5); 481s ***** test 481s paramhat = loglfit ([1:5]); 481s paramhat_out = [1.01124, 0.336449]; 481s assert (paramhat, paramhat_out, 1e-5); 481s ***** test 481s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 481s paramhat_out = [1.01124, 0.336449]; 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** test 481s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 481s paramhat_out = loglfit ([1:5, 5]); 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** error loglfit (ones (2,5)); 481s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 481s ***** error loglfit ([1, 2, 3, 4, 5], 0); 481s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 481s ***** error ... 481s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 481s ***** error ... 481s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 481s ***** error ... 481s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 481s ***** error ... 481s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 481s ***** error ... 481s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 481s 13 tests, 13 passed, 0 known failure, 0 skipped 481s [inst/dist_fit/betalike.m] 481s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/betalike.m 481s ***** test 481s x = 0.01:0.02:0.99; 481s [nlogL, avar] = betalike ([2.3, 1.2], x); 481s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 481s assert (nlogL, 17.873477715879040, 3e-14); 481s assert (avar, avar_out, 1e-7); 481s ***** test 481s x = 0.01:0.02:0.99; 481s [nlogL, avar] = betalike ([1, 4], x); 481s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 481s assert (nlogL, 79.648061114839550, 1e-13); 481s assert (avar, avar_out, 1e-7); 481s ***** test 481s x = 0.00:0.02:1; 481s [nlogL, avar] = betalike ([1, 4], x); 481s avar_out = [0.00000801564765, 0.00000131397245; ... 481s 0.00000131397245, 0.00070827639442]; 481s assert (nlogL, 573.2008434477486, 1e-10); 481s assert (avar, avar_out, 1e-14); 481s ***** error ... 481s betalike ([12, 15]); 481s ***** error betalike ([12, 15, 3], [1:50]); 481s ***** error ... 481s betalike ([12, 15], ones (10, 1), ones (8,1)) 481s ***** error ... 481s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 481s ***** error ... 481s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 481s 8 tests, 8 passed, 0 known failure, 0 skipped 481s [inst/dist_fit/unifit.m] 481s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/unifit.m 481s ***** demo 481s ## Sample 2 populations from different continuous uniform distributions 481s rand ("seed", 5); # for reproducibility 481s r1 = unifrnd (2, 5, 2000, 1); 481s rand ("seed", 6); # for reproducibility 481s r2 = unifrnd (3, 9, 2000, 1); 481s r = [r1, r2]; 481s 481s ## Plot them normalized and fix their colors 481s hist (r, 0:0.5:10, 2); 481s h = findobj (gca, "Type", "patch"); 481s set (h(1), "facecolor", "c"); 481s set (h(2), "facecolor", "g"); 481s hold on 481s 481s ## Estimate their probability of success 481s a_bA = unifit (r(:,1)); 481s a_bB = unifit (r(:,2)); 481s 481s ## Plot their estimated PDFs 481s x = [0:10]; 481s y = unifpdf (x, a_bA(1), a_bA(2)); 481s plot (x, y, "-pg"); 481s y = unifpdf (x, a_bB(1), a_bB(2)); 481s plot (x, y, "-sc"); 481s xlim ([1, 10]) 481s ylim ([0, 0.5]) 481s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 481s "Normalized HIST of sample 2 with a=3 and b=9", ... 481s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 481s a_bA(1), a_bA(2)), ... 481s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 481s a_bB(1), a_bB(2))}) 481s title ("Two population samples from different continuous uniform distributions") 481s hold off 481s ***** test 481s x = 0:5; 481s [paramhat, paramci] = unifit (x); 481s assert (paramhat, [0, 5]); 481s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 481s ***** test 481s x = 0:5; 481s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 481s assert (paramhat, [0, 5]); 481s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 481s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 481s ***** error unifit () 481s ***** error unifit (-1, [1 2 3 3]) 481s ***** error unifit (1, 0) 481s ***** error unifit (1, 1.2) 481s ***** error unifit (1, [0.02 0.05]) 481s ***** error ... 481s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 481s ***** error ... 481s unifit ([1.5, 0.2], [], [1, -1]) 481s ***** error ... 481s unifit ([1.5, 0.2], [], [1, 1, 1]) 481s 11 tests, 11 passed, 0 known failure, 0 skipped 481s [inst/dist_fit/logifit.m] 481s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/logifit.m 481s ***** demo 481s ## Sample 3 populations from different logistic distributions 481s rand ("seed", 5) # for reproducibility 481s r1 = logirnd (2, 1, 2000, 1); 481s rand ("seed", 2) # for reproducibility 481s r2 = logirnd (5, 2, 2000, 1); 481s rand ("seed", 7) # for reproducibility 481s r3 = logirnd (9, 4, 2000, 1); 481s r = [r1, r2, r3]; 481s 481s ## Plot them normalized and fix their colors 481s hist (r, [-6:20], 1); 481s h = findobj (gca, "Type", "patch"); 481s set (h(1), "facecolor", "c"); 481s set (h(2), "facecolor", "g"); 481s set (h(3), "facecolor", "r"); 481s ylim ([0, 0.3]); 481s xlim ([-5, 20]); 481s hold on 481s 481s ## Estimate their MU and LAMBDA parameters 481s mu_sA = logifit (r(:,1)); 481s mu_sB = logifit (r(:,2)); 481s mu_sC = logifit (r(:,3)); 481s 481s ## Plot their estimated PDFs 481s x = [-5:0.5:20]; 481s y = logipdf (x, mu_sA(1), mu_sA(2)); 481s plot (x, y, "-pr"); 481s y = logipdf (x, mu_sB(1), mu_sB(2)); 481s plot (x, y, "-sg"); 481s y = logipdf (x, mu_sC(1), mu_sC(2)); 481s plot (x, y, "-^c"); 481s hold off 481s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 481s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 481s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 481s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 481s mu_sA(1), mu_sA(2)), ... 481s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 481s mu_sB(1), mu_sB(2)), ... 481s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 481s mu_sC(1), mu_sC(2))}) 481s title ("Three population samples from different logistic distributions") 481s hold off 481s ***** test 481s paramhat = logifit ([1:50]); 481s paramhat_out = [25.5, 8.7724]; 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** test 481s paramhat = logifit ([1:5]); 481s paramhat_out = [3, 0.8645]; 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** test 481s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 481s paramhat_out = [3, 0.8645]; 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** test 481s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 481s paramhat_out = logifit ([1:5, 5]); 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** error logifit (ones (2,5)); 481s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 481s ***** error logifit ([1, 2, 3, 4, 5], 0); 481s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 481s ***** error ... 481s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 481s ***** error ... 481s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 481s ***** error ... 481s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 481s ***** error ... 481s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 481s ***** error ... 481s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 481s 13 tests, 13 passed, 0 known failure, 0 skipped 481s [inst/dist_fit/gumbellike.m] 481s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gumbellike.m 481s ***** test 481s x = 1:50; 481s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 481s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 481s assert (nlogL, 3.242264755689906e+17, 1e-14); 481s assert (avar, avar_out, 1e-3); 481s ***** test 481s x = 1:50; 481s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 481s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 481s assert (nlogL, 481898704.0472211, 1e-6); 481s assert (avar, avar_out, 1e-3); 481s ***** test 481s x = 1:50; 481s [nlogL, avar] = gumbellike ([21, 15], x); 481s avar_out = [11.73913876598908, -5.9546128523121216; ... 481s -5.954612852312121, 3.708060045170236]; 481s assert (nlogL, 223.7612479380652, 1e-13); 481s assert (avar, avar_out, 1e-14); 481s ***** error gumbellike ([12, 15]); 481s ***** error gumbellike ([12, 15, 3], [1:50]); 481s ***** error gumbellike ([12, 3], ones (10, 2)); 481s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 481s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 481s 8 tests, 8 passed, 0 known failure, 0 skipped 481s [inst/dist_fit/bisafit.m] 481s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/bisafit.m 481s ***** demo 481s ## Sample 3 populations from different Birnbaum-Saunders distributions 481s rand ("seed", 5); # for reproducibility 481s r1 = bisarnd (1, 0.5, 2000, 1); 481s rand ("seed", 2); # for reproducibility 481s r2 = bisarnd (2, 0.3, 2000, 1); 481s rand ("seed", 7); # for reproducibility 481s r3 = bisarnd (4, 0.5, 2000, 1); 481s r = [r1, r2, r3]; 481s 481s ## Plot them normalized and fix their colors 481s hist (r, 80, 4.2); 481s h = findobj (gca, "Type", "patch"); 481s set (h(1), "facecolor", "c"); 481s set (h(2), "facecolor", "g"); 481s set (h(3), "facecolor", "r"); 481s ylim ([0, 1.1]); 481s xlim ([0, 8]); 481s hold on 481s 481s ## Estimate their α and β parameters 481s beta_gammaA = bisafit (r(:,1)); 481s beta_gammaB = bisafit (r(:,2)); 481s beta_gammaC = bisafit (r(:,3)); 481s 481s ## Plot their estimated PDFs 481s x = [0:0.1:8]; 481s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 481s plot (x, y, "-pr"); 481s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 481s plot (x, y, "-sg"); 481s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 481s plot (x, y, "-^c"); 481s hold off 481s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 481s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 481s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 481s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 481s beta_gammaA(1), beta_gammaA(2)), ... 481s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 481s beta_gammaB(1), beta_gammaB(2)), ... 481s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 481s beta_gammaC(1), beta_gammaC(2))}) 481s title ("Three population samples from different Birnbaum-Saunders distributions") 481s hold off 481s ***** test 481s paramhat = bisafit ([1:50]); 481s paramhat_out = [16.2649, 1.0156]; 481s assert (paramhat, paramhat_out, 1e-4); 481s ***** test 481s paramhat = bisafit ([1:5]); 481s paramhat_out = [2.5585, 0.5839]; 481s assert (paramhat, paramhat_out, 1e-4); 482s ***** error bisafit (ones (2,5)); 482s ***** error bisafit ([-1 2 3 4]); 482s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 482s ***** error bisafit ([1, 2, 3, 4, 5], 0); 482s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 482s ***** error ... 482s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 482s ***** error ... 482s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 482s ***** error ... 482s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 482s ***** error ... 482s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 482s ***** error ... 482s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 482s 12 tests, 12 passed, 0 known failure, 0 skipped 482s [inst/dist_fit/burrfit.m] 482s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/burrfit.m 482s ***** demo 482s ## Sample 3 populations from different Burr type XII distributions 482s rand ("seed", 4); # for reproducibility 482s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 482s rand ("seed", 2); # for reproducibility 482s r2 = burrrnd (1, 3, 1, 10000, 1); 482s rand ("seed", 9); # for reproducibility 482s r3 = burrrnd (0.5, 2, 3, 10000, 1); 482s r = [r1, r2, r3]; 482s 482s ## Plot them normalized and fix their colors 482s hist (r, [0.1:0.2:20], [18, 5, 3]); 482s h = findobj (gca, "Type", "patch"); 482s set (h(1), "facecolor", "c"); 482s set (h(2), "facecolor", "g"); 482s set (h(3), "facecolor", "r"); 482s ylim ([0, 3]); 482s xlim ([0, 5]); 482s hold on 482s 482s ## Estimate their α and β parameters 482s lambda_c_kA = burrfit (r(:,1)); 482s lambda_c_kB = burrfit (r(:,2)); 482s lambda_c_kC = burrfit (r(:,3)); 482s 482s ## Plot their estimated PDFs 482s x = [0.01:0.15:15]; 482s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 482s plot (x, y, "-pr"); 482s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 482s plot (x, y, "-sg"); 482s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 482s plot (x, y, "-^c"); 482s hold off 482s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 482s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 482s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 482s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 482s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 482s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 482s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 482s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 482s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 482s title ("Three population samples from different Burr type XII distributions") 482s hold off 482s ***** test 482s l = 1; c = 2; k = 3; 482s r = burrrnd (l, c, k, 100000, 1); 482s lambda_c_kA = burrfit (r); 482s assert (lambda_c_kA(1), l, 0.2); 482s assert (lambda_c_kA(2), c, 0.2); 482s assert (lambda_c_kA(3), k, 0.3); 484s ***** test 484s l = 0.5; c = 1; k = 3; 484s r = burrrnd (l, c, k, 100000, 1); 484s lambda_c_kA = burrfit (r); 484s assert (lambda_c_kA(1), l, 0.2); 484s assert (lambda_c_kA(2), c, 0.2); 484s assert (lambda_c_kA(3), k, 0.3); 486s ***** test 486s l = 1; c = 3; k = 1; 486s r = burrrnd (l, c, k, 100000, 1); 486s lambda_c_kA = burrfit (r); 486s assert (lambda_c_kA(1), l, 0.2); 486s assert (lambda_c_kA(2), c, 0.2); 486s assert (lambda_c_kA(3), k, 0.3); 488s ***** test 488s l = 3; c = 2; k = 1; 488s r = burrrnd (l, c, k, 100000, 1); 488s lambda_c_kA = burrfit (r); 488s assert (lambda_c_kA(1), l, 0.2); 488s assert (lambda_c_kA(2), c, 0.2); 488s assert (lambda_c_kA(3), k, 0.3); 490s ***** test 490s l = 4; c = 2; k = 4; 490s r = burrrnd (l, c, k, 100000, 1); 490s lambda_c_kA = burrfit (r); 490s assert (lambda_c_kA(1), l, 0.2); 490s assert (lambda_c_kA(2), c, 0.2); 490s assert (lambda_c_kA(3), k, 0.3); 493s ***** error burrfit (ones (2,5)); 493s ***** error burrfit ([-1 2 3 4]); 493s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 493s ***** error burrfit ([1, 2, 3, 4, 5], 0); 493s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 493s ***** error ... 493s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 493s ***** error ... 493s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 493s ***** error 493s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 493s ***** error 493s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 493s ***** error ... 493s burrfit ([1:10], 0.05, [], [], 5) 493s 15 tests, 15 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/nbinfit.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/nbinfit.m 493s ***** demo 493s ## Sample 2 populations from different negative binomial distributions 493s randp ("seed", 5); randg ("seed", 5); # for reproducibility 493s r1 = nbinrnd (2, 0.15, 5000, 1); 493s randp ("seed", 8); randg ("seed", 8); # for reproducibility 493s r2 = nbinrnd (5, 0.2, 5000, 1); 493s r = [r1, r2]; 493s 493s ## Plot them normalized and fix their colors 493s hist (r, [0:51], 1); 493s h = findobj (gca, "Type", "patch"); 493s set (h(1), "facecolor", "c"); 493s set (h(2), "facecolor", "g"); 493s hold on 493s 493s ## Estimate their probability of success 493s r_psA = nbinfit (r(:,1)); 493s r_psB = nbinfit (r(:,2)); 493s 493s ## Plot their estimated PDFs 493s x = [0:40]; 493s y = nbinpdf (x, r_psA(1), r_psA(2)); 493s plot (x, y, "-pg"); 493s x = [min(r(:,2)):max(r(:,2))]; 493s y = nbinpdf (x, r_psB(1), r_psB(2)); 493s plot (x, y, "-sc"); 493s ylim ([0, 0.1]) 493s xlim ([0, 50]) 493s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 493s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 493s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 493s r_psA(1), r_psA(2)), ... 493s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 493s r_psB(1), r_psB(2))}) 493s title ("Two population samples from negative different binomial distributions") 493s hold off 493s ***** test 493s [paramhat, paramci] = nbinfit ([1:50]); 493s assert (paramhat, [2.420857, 0.086704], 1e-6); 493s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 493s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 493s ***** test 493s [paramhat, paramci] = nbinfit ([1:20]); 493s assert (paramhat, [3.588233, 0.254697], 1e-6); 493s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 493s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 493s ***** test 493s [paramhat, paramci] = nbinfit ([1:10]); 493s assert (paramhat, [8.8067, 0.6156], 1e-4); 493s assert (paramci(:,1), [0; 30.7068], 1e-4); 493s assert (paramci(:,2), [0.0217; 1], 1e-4); 493s ***** test 493s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 493s assert (paramhat, [8.8067, 0.6156], 1e-4); 493s assert (paramci(:,1), [0; 30.7068], 1e-4); 493s assert (paramci(:,2), [0.0217; 1], 1e-4); 493s ***** test 493s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 493s assert (paramhat, [8.8067, 0.6156], 1e-4); 493s assert (paramci(:,1), [0; 30.7068], 1e-4); 493s assert (paramci(:,2), [0.0217; 1], 1e-4); 493s ***** error nbinfit ([-1 2 3 3]) 493s ***** error nbinfit (ones (2)) 493s ***** error nbinfit ([1 2 1.2 3]) 493s ***** error nbinfit ([1 2 3], 0) 493s ***** error nbinfit ([1 2 3], 1.2) 493s ***** error nbinfit ([1 2 3], [0.02 0.05]) 493s ***** error ... 493s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 493s ***** error ... 493s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 493s ***** error ... 493s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 493s ***** error ... 493s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 493s ***** error ... 493s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 493s 16 tests, 16 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/invglike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/invglike.m 493s ***** test 493s nlogL = invglike ([25.5, 19.6973], [1:50]); 493s assert (nlogL, 219.1516, 1e-4); 493s ***** test 493s nlogL = invglike ([3, 8.1081], [1:5]); 493s assert (nlogL, 9.0438, 1e-4); 493s ***** error invglike (3.25) 493s ***** error invglike ([5, 0.2], ones (2)) 493s ***** error invglike ([5, 0.2], [-1, 3]) 493s ***** error ... 493s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 493s ***** error ... 493s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 493s ***** error ... 493s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 493s ***** error ... 493s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 493s 9 tests, 9 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/rayllike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/rayllike.m 493s ***** test 493s x = [1 3 2 4 5 4 3 4]; 493s [nlogL, acov] = rayllike (3.25, x); 493s assert (nlogL, 14.7442, 1e-4) 493s ***** test 493s x = [1 2 3 4 5]; 493s f = [1 1 2 3 1]; 493s [nlogL, acov] = rayllike (3.25, x, [], f); 493s assert (nlogL, 14.7442, 1e-4) 493s ***** test 493s x = [1 2 3 4 5 6]; 493s f = [1 1 2 3 1 0]; 493s [nlogL, acov] = rayllike (3.25, x, [], f); 493s assert (nlogL, 14.7442, 1e-4) 493s ***** test 493s x = [1 2 3 4 5 6]; 493s c = [0 0 0 0 0 1]; 493s f = [1 1 2 3 1 0]; 493s [nlogL, acov] = rayllike (3.25, x, c, f); 493s assert (nlogL, 14.7442, 1e-4) 493s ***** error rayllike (1) 493s ***** error rayllike ([1 2 3], [1 2]) 493s ***** error ... 493s rayllike (3.25, ones (10, 2)) 493s ***** error ... 493s rayllike (3.25, [1 2 3 -4 5]) 493s ***** error ... 493s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 493s ***** error ... 493s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 493s ***** error ... 493s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 493s ***** error ... 493s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 493s ***** error ... 493s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 493s 13 tests, 13 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/evlike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/evlike.m 493s ***** test 493s x = 1:50; 493s [nlogL, acov] = evlike ([2.3, 1.2], x); 493s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 493s assert (nlogL, 3.242264755689906e+17, 1e-14); 493s assert (acov, avar_out, 1e-3); 493s ***** test 493s x = 1:50; 493s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 493s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 493s assert (nlogL, 481898704.0472211, 1e-6); 493s assert (acov, avar_out, 1e-3); 493s ***** test 493s x = 1:50; 493s [nlogL, acov] = evlike ([21, 15], x); 493s avar_out = [11.73913876598908, -5.9546128523121216; ... 493s -5.954612852312121, 3.708060045170236]; 493s assert (nlogL, 223.7612479380652, 1e-13); 493s assert (acov, avar_out, 1e-14); 493s ***** error evlike ([12, 15]) 493s ***** error evlike ([12, 15, 3], [1:50]) 493s ***** error evlike ([12, 3], ones (10, 2)) 493s ***** error ... 493s evlike ([12, 15], [1:50], [1, 2, 3]) 493s ***** error ... 493s evlike ([12, 15], [1:50], [], [1, 2, 3]) 493s 8 tests, 8 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/bisalike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/bisalike.m 493s ***** test 493s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 493s assert (nlogL, 215.5905, 1e-4); 493s ***** test 493s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 493s assert (nlogL, 8.9950, 1e-4); 493s ***** error bisalike (3.25) 493s ***** error bisalike ([5, 0.2], ones (2)) 493s ***** error bisalike ([5, 0.2], [-1, 3]) 493s ***** error ... 493s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 493s ***** error ... 493s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 493s ***** error ... 493s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 493s ***** error ... 493s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 493s 9 tests, 9 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/gpfit.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gpfit.m 493s ***** demo 493s ## Sample 2 populations from different generalized Pareto distributions 493s ## Assume location parameter θ is known 493s theta = 0; 493s rand ("seed", 5); # for reproducibility 493s r1 = gprnd (1, 2, theta, 20000, 1); 493s rand ("seed", 2); # for reproducibility 493s r2 = gprnd (3, 1, theta, 20000, 1); 493s r = [r1, r2]; 493s 493s ## Plot them normalized and fix their colors 493s hist (r, [0.1:0.2:100], 5); 493s h = findobj (gca, "Type", "patch"); 493s set (h(1), "facecolor", "r"); 493s set (h(2), "facecolor", "c"); 493s ylim ([0, 1]); 493s xlim ([0, 5]); 493s hold on 493s 493s ## Estimate their α and β parameters 493s k_sigmaA = gpfit (r(:,1), theta); 493s k_sigmaB = gpfit (r(:,2), theta); 493s 493s ## Plot their estimated PDFs 493s x = [0.01, 0.1:0.2:18]; 493s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 493s plot (x, y, "-pc"); 493s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 493s plot (x, y, "-sr"); 493s hold off 493s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 493s "Normalized HIST of sample 2 with k=2 and σ=2", ... 493s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 493s k_sigmaA(1), k_sigmaA(2)), ... 493s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 493s k_sigmaB(1), k_sigmaB(2))}) 493s title ("Two population samples from different generalized Pareto distributions") 493s text (2, 0.7, "Known location parameter θ = 0") 493s hold off 493s ***** test 493s k = 0.8937; sigma = 1.3230; theta = 1; 493s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 493s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 493s [hat, ci] = gpfit (x, theta); 493s assert (hat, [k, sigma, theta], 1e-4); 493s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 493s ***** error gpfit () 493s ***** error gpfit (1) 493s ***** error gpfit ([0.2, 0.5+i], 0); 493s ***** error gpfit (ones (2,2) * 0.5, 0); 493s ***** error ... 493s gpfit ([0.5, 1.2], [0, 1]); 493s ***** error ... 493s gpfit ([0.5, 1.2], 5+i); 493s ***** error ... 493s gpfit ([1:5], 2); 493s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 493s ***** error gpfit ([0.01:0.1:0.99], 0, i); 493s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 493s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 493s ***** error 493s gpfit ([1 2 3], 0, [], [1 5]) 493s ***** error 493s gpfit ([1 2 3], 0, [], [1 5 -1]) 493s ***** error ... 493s gpfit ([1:10], 1, 0.05, [], 5) 493s 15 tests, 15 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/nakalike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/nakalike.m 493s ***** test 493s nlogL = nakalike ([0.735504, 858.5], [1:50]); 493s assert (nlogL, 202.8689, 1e-4); 493s ***** test 493s nlogL = nakalike ([1.17404, 11], [1:5]); 493s assert (nlogL, 8.6976, 1e-4); 493s ***** test 493s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 493s assert (nlogL, 8.6976, 1e-4); 493s ***** test 493s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 493s assert (nlogL, 8.6976, 1e-4); 493s ***** error nakalike (3.25) 493s ***** error nakalike ([5, 0.2], ones (2)) 493s ***** error ... 493s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 493s ***** error ... 493s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 493s ***** error ... 493s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 493s ***** error ... 493s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 493s ***** error ... 493s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 493s 11 tests, 11 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/binolike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/binolike.m 493s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 493s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 493s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 493s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 493s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 493s ***** test 493s [nlogL, acov] = binolike ([3, 0.333], 3); 493s assert (acov(4), 0.0740, 1e-4) 493s ***** error binolike (3.25) 493s ***** error binolike ([5, 0.2], ones (2)) 493s ***** error ... 493s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 493s ***** error binolike ([1.5, 0.2], 1) 493s ***** error binolike ([-1, 0.2], 1) 493s ***** error binolike ([Inf, 0.2], 1) 493s ***** error binolike ([5, 1.2], [3, 5]) 493s ***** error binolike ([5, -0.2], [3, 5]) 493s ***** error ... 493s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 493s ***** error ... 493s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 493s ***** error binolike ([5, 0.2], [-1, 3]) 493s ***** error binolike ([5, 0.2], [3, 5, 7]) 493s 18 tests, 18 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/tlslike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/tlslike.m 493s ***** test 493s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 493s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 493s acov_out = [0.2525, 0.0670, 0.0288; ... 493s 0.0670, 0.5724, 0.1786; ... 493s 0.0288, 0.1786, 0.1789]; 493s assert (nlogL, 17.9979636579, 1e-10); 493s assert (acov, acov_out, 1e-4); 493s ***** error tlslike ([12, 15, 1]); 493s ***** error tlslike ([12, 15], [1:50]); 493s ***** error tlslike ([12, 3, 1], ones (10, 2)); 493s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 493s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 493s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 493s 7 tests, 7 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/logilike.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/logilike.m 493s ***** test 493s nlogL = logilike ([25.5, 8.7725], [1:50]); 493s assert (nlogL, 206.6769, 1e-4); 493s ***** test 493s nlogL = logilike ([3, 0.8645], [1:5]); 493s assert (nlogL, 9.0699, 1e-4); 493s ***** error logilike (3.25) 493s ***** error logilike ([5, 0.2], ones (2)) 493s ***** error ... 493s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 493s ***** error ... 493s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 493s ***** error ... 493s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 493s ***** error ... 493s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 493s 8 tests, 8 passed, 0 known failure, 0 skipped 493s [inst/dist_fit/lognfit.m] 493s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/lognfit.m 493s ***** demo 493s ## Sample 3 populations from 3 different log-normal distributions 493s randn ("seed", 1); # for reproducibility 493s r1 = lognrnd (0, 0.25, 1000, 1); 493s randn ("seed", 2); # for reproducibility 493s r2 = lognrnd (0, 0.5, 1000, 1); 493s randn ("seed", 3); # for reproducibility 493s r3 = lognrnd (0, 1, 1000, 1); 493s r = [r1, r2, r3]; 493s 493s ## Plot them normalized and fix their colors 493s hist (r, 30, 2); 493s h = findobj (gca, "Type", "patch"); 493s set (h(1), "facecolor", "c"); 493s set (h(2), "facecolor", "g"); 493s set (h(3), "facecolor", "r"); 493s hold on 493s 493s ## Estimate their mu and sigma parameters 493s mu_sigmaA = lognfit (r(:,1)); 493s mu_sigmaB = lognfit (r(:,2)); 493s mu_sigmaC = lognfit (r(:,3)); 493s 493s ## Plot their estimated PDFs 493s x = [0:0.1:6]; 493s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 493s plot (x, y, "-pr"); 493s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 493s plot (x, y, "-sg"); 493s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 493s plot (x, y, "-^c"); 493s ylim ([0, 2]) 493s xlim ([0, 6]) 493s hold off 493s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 493s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 493s "Normalized HIST of sample 3 with mu=0, σ=1", ... 493s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 493s mu_sigmaA(1), mu_sigmaA(2)), ... 493s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 493s mu_sigmaB(1), mu_sigmaB(2)), ... 493s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 493s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 493s title ("Three population samples from different log-normal distributions") 493s hold off 493s ***** test 493s randn ("seed", 1); 493s x = lognrnd (3, 5, [1000, 1]); 493s [paramhat, paramci] = lognfit (x, 0.01); 493s assert (paramci(1,1) < 3); 493s assert (paramci(1,2) > 3); 493s assert (paramci(2,1) < 5); 493s assert (paramci(2,2) > 5); 494s ***** error ... 494s lognfit (ones (20,3)) 494s ***** error ... 494s lognfit ({1, 2, 3, 4, 5}) 494s ***** error ... 494s lognfit ([-1, 2, 3, 4, 5]) 494s ***** error lognfit (ones (20,1), 0) 494s ***** error lognfit (ones (20,1), -0.3) 494s ***** error lognfit (ones (20,1), 1.2) 494s ***** error lognfit (ones (20,1), [0.05, 0.1]) 494s ***** error lognfit (ones (20,1), 0.02+i) 494s ***** error ... 494s lognfit (ones (20,1), [], zeros(15,1)) 494s ***** error ... 494s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 494s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 494s 12 tests, 12 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/gamlike.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gamlike.m 494s ***** test 494s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 494s assert (nlogL, 19.4426, 1e-4); 494s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 494s ***** test 494s [nlogL, acov] = gamlike([2, 3], [5:45]); 494s assert (nlogL, 305.8070, 1e-4); 494s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 494s ***** test 494s [nlogL, acov] = gamlike([2, 13], [5:45]); 494s assert (nlogL, 163.2261, 1e-4); 494s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 494s ***** error ... 494s gamlike ([12, 15]) 494s ***** error gamlike ([12, 15, 3], [1:50]) 494s ***** error gamlike ([12, 3], ones (10, 2)) 494s ***** error ... 494s gamlike ([12, 15], [1:50], [1, 2, 3]) 494s ***** error ... 494s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 494s 8 tests, 8 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/poissfit.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/poissfit.m 494s ***** demo 494s ## Sample 3 populations from 3 different Poisson distributions 494s randp ("seed", 2); # for reproducibility 494s r1 = poissrnd (1, 1000, 1); 494s randp ("seed", 2); # for reproducibility 494s r2 = poissrnd (4, 1000, 1); 494s randp ("seed", 3); # for reproducibility 494s r3 = poissrnd (10, 1000, 1); 494s r = [r1, r2, r3]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, [0:20], 1); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s set (h(3), "facecolor", "r"); 494s hold on 494s 494s ## Estimate their lambda parameter 494s lambdahat = poissfit (r); 494s 494s ## Plot their estimated PDFs 494s x = [0:20]; 494s y = poisspdf (x, lambdahat(1)); 494s plot (x, y, "-pr"); 494s y = poisspdf (x, lambdahat(2)); 494s plot (x, y, "-sg"); 494s y = poisspdf (x, lambdahat(3)); 494s plot (x, y, "-^c"); 494s xlim ([0, 20]) 494s ylim ([0, 0.4]) 494s legend ({"Normalized HIST of sample 1 with λ=1", ... 494s "Normalized HIST of sample 2 with λ=4", ... 494s "Normalized HIST of sample 3 with λ=10", ... 494s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 494s lambdahat(1)), ... 494s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 494s lambdahat(2)), ... 494s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 494s lambdahat(3))}) 494s title ("Three population samples from different Poisson distributions") 494s hold off 494s ***** test 494s x = [1 3 2 4 5 4 3 4]; 494s [lhat, lci] = poissfit (x); 494s assert (lhat, 3.25) 494s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 494s ***** test 494s x = [1 3 2 4 5 4 3 4]; 494s [lhat, lci] = poissfit (x, 0.01); 494s assert (lhat, 3.25) 494s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 494s ***** test 494s x = [1 2 3 4 5]; 494s f = [1 1 2 3 1]; 494s [lhat, lci] = poissfit (x, [], f); 494s assert (lhat, 3.25) 494s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 494s ***** test 494s x = [1 2 3 4 5]; 494s f = [1 1 2 3 1]; 494s [lhat, lci] = poissfit (x, 0.01, f); 494s assert (lhat, 3.25) 494s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 494s ***** error poissfit ([1 2 -1 3]) 494s ***** error poissfit ([1 2 3], 0) 494s ***** error poissfit ([1 2 3], 1.2) 494s ***** error poissfit ([1 2 3], [0.02 0.05]) 494s ***** error 494s poissfit ([1 2 3], [], [1 5]) 494s ***** error 494s poissfit ([1 2 3], [], [1 5 -1]) 494s 10 tests, 10 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/raylfit.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/raylfit.m 494s ***** demo 494s ## Sample 3 populations from 3 different Rayleigh distributions 494s rand ("seed", 2); # for reproducibility 494s r1 = raylrnd (1, 1000, 1); 494s rand ("seed", 2); # for reproducibility 494s r2 = raylrnd (2, 1000, 1); 494s rand ("seed", 3); # for reproducibility 494s r3 = raylrnd (4, 1000, 1); 494s r = [r1, r2, r3]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, [0.5:0.5:10.5], 2); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s set (h(3), "facecolor", "r"); 494s hold on 494s 494s ## Estimate their lambda parameter 494s sigmaA = raylfit (r(:,1)); 494s sigmaB = raylfit (r(:,2)); 494s sigmaC = raylfit (r(:,3)); 494s 494s ## Plot their estimated PDFs 494s x = [0:0.1:10]; 494s y = raylpdf (x, sigmaA); 494s plot (x, y, "-pr"); 494s y = raylpdf (x, sigmaB); 494s plot (x, y, "-sg"); 494s y = raylpdf (x, sigmaC); 494s plot (x, y, "-^c"); 494s xlim ([0, 10]) 494s ylim ([0, 0.7]) 494s legend ({"Normalized HIST of sample 1 with σ=1", ... 494s "Normalized HIST of sample 2 with σ=2", ... 494s "Normalized HIST of sample 3 with σ=4", ... 494s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 494s sigmaA), ... 494s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 494s sigmaB), ... 494s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 494s sigmaC)}) 494s title ("Three population samples from different Rayleigh distributions") 494s hold off 494s ***** test 494s x = [1 3 2 4 5 4 3 4]; 494s [shat, sci] = raylfit (x); 494s assert (shat, 2.4495, 1e-4) 494s assert (sci, [1.8243; 3.7279], 1e-4) 494s ***** test 494s x = [1 3 2 4 5 4 3 4]; 494s [shat, sci] = raylfit (x, 0.01); 494s assert (shat, 2.4495, 1e-4) 494s assert (sci, [1.6738; 4.3208], 1e-4) 494s ***** test 494s x = [1 2 3 4 5]; 494s f = [1 1 2 3 1]; 494s [shat, sci] = raylfit (x, [], [], f); 494s assert (shat, 2.4495, 1e-4) 494s assert (sci, [1.8243; 3.7279], 1e-4) 494s ***** test 494s x = [1 2 3 4 5]; 494s f = [1 1 2 3 1]; 494s [shat, sci] = raylfit (x, 0.01, [], f); 494s assert (shat, 2.4495, 1e-4) 494s assert (sci, [1.6738; 4.3208], 1e-4) 494s ***** test 494s x = [1 2 3 4 5 6]; 494s c = [0 0 0 0 0 1]; 494s f = [1 1 2 3 1 1]; 494s [shat, sci] = raylfit (x, 0.01, c, f); 494s assert (shat, 2.4495, 1e-4) 494s assert (sci, [1.6738; 4.3208], 1e-4) 494s ***** error raylfit (ones (2,5)); 494s ***** error raylfit ([1 2 -1 3]) 494s ***** error raylfit ([1 2 3], 0) 494s ***** error raylfit ([1 2 3], 1.2) 494s ***** error raylfit ([1 2 3], [0.02 0.05]) 494s ***** error ... 494s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 494s ***** error ... 494s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 494s ***** error ... 494s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 494s ***** error ... 494s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 494s ***** error 494s raylfit ([1 2 3], [], [], [1 5]) 494s ***** error 494s raylfit ([1 2 3], [], [], [1 5 -1]) 494s 16 tests, 16 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/poisslike.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/poisslike.m 494s ***** test 494s x = [1 3 2 4 5 4 3 4]; 494s [nlogL, avar] = poisslike (3.25, x); 494s assert (nlogL, 13.9533, 1e-4) 494s ***** test 494s x = [1 2 3 4 5]; 494s f = [1 1 2 3 1]; 494s [nlogL, avar] = poisslike (3.25, x, f); 494s assert (nlogL, 13.9533, 1e-4) 494s ***** error poisslike (1) 494s ***** error poisslike ([1 2 3], [1 2]) 494s ***** error ... 494s poisslike (3.25, ones (10, 2)) 494s ***** error ... 494s poisslike (3.25, [1 2 3 -4 5]) 494s ***** error ... 494s poisslike (3.25, ones (10, 1), ones (8,1)) 494s ***** error ... 494s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 494s 8 tests, 8 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/expfit.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/expfit.m 494s ***** demo 494s ## Sample 3 populations from 3 different exponential distributions 494s rande ("seed", 1); # for reproducibility 494s r1 = exprnd (2, 4000, 1); 494s rande ("seed", 2); # for reproducibility 494s r2 = exprnd (5, 4000, 1); 494s rande ("seed", 3); # for reproducibility 494s r3 = exprnd (12, 4000, 1); 494s r = [r1, r2, r3]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, 48, 0.52); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s set (h(3), "facecolor", "r"); 494s hold on 494s 494s ## Estimate their mu parameter 494s muhat = expfit (r); 494s 494s ## Plot their estimated PDFs 494s x = [0:max(r(:))]; 494s y = exppdf (x, muhat(1)); 494s plot (x, y, "-pr"); 494s y = exppdf (x, muhat(2)); 494s plot (x, y, "-sg"); 494s y = exppdf (x, muhat(3)); 494s plot (x, y, "-^c"); 494s ylim ([0, 0.6]) 494s xlim ([0, 40]) 494s legend ({"Normalized HIST of sample 1 with μ=2", ... 494s "Normalized HIST of sample 2 with μ=5", ... 494s "Normalized HIST of sample 3 with μ=12", ... 494s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 494s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 494s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 494s title ("Three population samples from different exponential distributions") 494s hold off 494s ***** assert (expfit (1), 1) 494s ***** assert (expfit (1:3), 2) 494s ***** assert (expfit ([1:3]'), 2) 494s ***** assert (expfit (1:3, []), 2) 494s ***** assert (expfit (1:3, [], [], []), 2) 494s ***** assert (expfit (magic (3)), [5 5 5]) 494s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 494s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 494s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 494s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 494s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 494s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 494s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 494s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 494s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 494s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 494s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 494s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 494s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 494s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 494s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 494s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 494s [1.75 4.75 7.75]) 494s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 494s [1.75 4.75 7.75]) 494s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 494s [3.5 19/3 31/3]) 494s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 494s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 494s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 494s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 494s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 494s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 494s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 494s 1000*eps) 494s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 494s [0.953017262058213; 7.337731146400207], 1000*eps) 494s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 494s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 494s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 494s 1000*eps) 494s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 494s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 494s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 494s 1000*eps) 494s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 494s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 494s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 494s 1000*eps) 494s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 494s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 494s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 494s 1000*eps) 494s ***** test 494s x = reshape (1:8, [4 2]); 494s x(4) = NaN; 494s [muhat,muci] = expfit (x); 494s assert ({muhat, muci}, {[NaN, 6.5], ... 494s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 494s ***** test 494s x = magic (3); 494s censor = [0 1 0; 0 1 0; 0 1 0]; 494s freq = [1 1 0; 1 1 0; 1 1 0]; 494s [muhat,muci] = expfit (x, [], censor, freq); 494s assert ({muhat, muci}, {[5 NaN NaN], ... 494s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 494s ***** error expfit () 494s ***** error expfit (1,2,3,4,5) 494s ***** error [a b censor] = expfit (1) 494s ***** error expfit (1, [1 2]) 494s ***** error expfit ([-1 2 3 4 5]) 494s ***** error expfit ([1:5], [], "test") 494s ***** error expfit ([1:5], [], [], "test") 494s ***** error expfit ([1:5], [], [0 0 0 0]) 494s ***** error expfit ([1:5], [], [], [1 1 1 1]) 494s 47 tests, 47 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/binofit.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/binofit.m 494s ***** demo 494s ## Sample 2 populations from different binomial distributions 494s rand ("seed", 1); # for reproducibility 494s r1 = binornd (50, 0.15, 1000, 1); 494s rand ("seed", 2); # for reproducibility 494s r2 = binornd (100, 0.5, 1000, 1); 494s r = [r1, r2]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, 23, 0.35); 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 probability of success 494s pshatA = binofit (r(:,1), 50); 494s pshatB = binofit (r(:,2), 100); 494s 494s ## Plot their estimated PDFs 494s x = [min(r(:,1)):max(r(:,1))]; 494s y = binopdf (x, 50, mean (pshatA)); 494s plot (x, y, "-pg"); 494s x = [min(r(:,2)):max(r(:,2))]; 494s y = binopdf (x, 100, mean (pshatB)); 494s plot (x, y, "-sc"); 494s ylim ([0, 0.2]) 494s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 494s "Normalized HIST of sample 2 with ps=0.50", ... 494s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 494s mean (pshatA)), ... 494s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 494s mean (pshatB))}) 494s title ("Two population samples from different binomial distributions") 494s hold off 494s ***** test 494s x = 0:3; 494s [pshat, psci] = binofit (x, 3); 494s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 494s assert (psci(1,:), [0, 0.7076], 1e-4); 494s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 494s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 494s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 494s ***** error ... 494s binofit ([1 2 3 4]) 494s ***** error ... 494s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 494s ***** error binofit (ones(2), [1, 2, 3, 3]) 494s ***** error ... 494s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 494s ***** error ... 494s binofit ([1, 4, 3, 2], [5, 5, 5]) 494s ***** error ... 494s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 494s ***** error binofit ([1, 2, 1], 3, 1.2); 494s ***** error binofit ([1, 2, 1], 3, 0); 494s ***** error binofit ([1, 2, 1], 3, "alpha"); 494s 10 tests, 10 passed, 0 known failure, 0 skipped 494s [inst/dist_fit/ricefit.m] 494s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/ricefit.m 494s ***** demo 494s ## Sample 3 populations from different Gamma distributions 494s randg ("seed", 5); # for reproducibility 494s randp ("seed", 6); 494s r1 = ricernd (1, 2, 3000, 1); 494s randg ("seed", 2); # for reproducibility 494s randp ("seed", 8); 494s r2 = ricernd (2, 4, 3000, 1); 494s randg ("seed", 7); # for reproducibility 494s randp ("seed", 9); 494s r3 = ricernd (7.5, 1, 3000, 1); 494s r = [r1, r2, r3]; 494s 494s ## Plot them normalized and fix their colors 494s hist (r, 75, 4); 494s h = findobj (gca, "Type", "patch"); 494s set (h(1), "facecolor", "c"); 494s set (h(2), "facecolor", "g"); 494s set (h(3), "facecolor", "r"); 494s ylim ([0, 0.7]); 494s xlim ([0, 12]); 494s hold on 494s 494s ## Estimate their α and β parameters 494s s_sigmaA = ricefit (r(:,1)); 494s s_sigmaB = ricefit (r(:,2)); 494s s_sigmaC = ricefit (r(:,3)); 494s 494s ## Plot their estimated PDFs 494s x = [0.01,0.1:0.2:18]; 494s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 494s plot (x, y, "-pr"); 494s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 494s plot (x, y, "-sg"); 494s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 494s plot (x, y, "-^c"); 494s hold off 494s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 494s "Normalized HIST of sample 2 with s=2 and σ=4", ... 494s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 494s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 494s s_sigmaA(1), s_sigmaA(2)), ... 494s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 494s s_sigmaB(1), s_sigmaB(2)), ... 494s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 494s s_sigmaC(1), s_sigmaC(2))}) 494s title ("Three population samples from different Rician distributions") 494s hold off 494s ***** test 494s [paramhat, paramci] = ricefit ([1:50]); 494s assert (paramhat, [15.3057, 17.6668], 1e-4); 494s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 494s ***** test 494s [paramhat, paramci] = ricefit ([1:50], 0.01); 494s assert (paramhat, [15.3057, 17.6668], 1e-4); 494s 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); 495s ***** assert (class (ricefit (single ([1:50]))), "single") 495s ***** error ricefit (ones (2)) 495s ***** error ricefit ([1:50], 1) 495s ***** error ricefit ([1:50], -1) 495s ***** error ricefit ([1:50], {0.05}) 495s ***** error ricefit ([1:50], "k") 495s ***** error ricefit ([1:50], i) 495s ***** error ricefit ([1:50], [0.01 0.02]) 495s ***** error ricefit ([1:50], [], [1 1]) 495s ***** error ricefit ([1:50], [], [], [1 1]) 495s ***** error ... 495s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 495s ***** error ricefit ([1 2 3 -4]) 495s ***** error ricefit ([1 2 0], [], [1 0 0]) 495s 19 tests, 19 passed, 0 known failure, 0 skipped 495s [inst/dist_fit/gumbelfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gumbelfit.m 498s ***** demo 498s ## Sample 3 populations from different Gumbel distributions 498s rand ("seed", 1); # for reproducibility 498s r1 = gumbelrnd (2, 5, 400, 1); 498s rand ("seed", 11); # for reproducibility 498s r2 = gumbelrnd (-5, 3, 400, 1); 498s rand ("seed", 16); # for reproducibility 498s r3 = gumbelrnd (14, 8, 400, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 25, 0.32); 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.28]) 498s xlim ([-11, 50]); 498s hold on 498s 498s ## Estimate their MU and BETA parameters 498s mu_betaA = gumbelfit (r(:,1)); 498s mu_betaB = gumbelfit (r(:,2)); 498s mu_betaC = gumbelfit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [min(r(:)):max(r(:))]; 498s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 498s plot (x, y, "-pr"); 498s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 498s plot (x, y, "-sg"); 498s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 498s plot (x, y, "-^c"); 498s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 498s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 498s "Normalized HIST of sample 3 with μ=14 and β=8", ... 498s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 498s mu_betaA(1), mu_betaA(2)), ... 498s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 498s mu_betaB(1), mu_betaB(2)), ... 498s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 498s mu_betaC(1), mu_betaC(2))}) 498s title ("Three population samples from different Gumbel distributions") 498s hold off 498s ***** test 498s x = 1:50; 498s [paramhat, paramci] = gumbelfit (x); 498s paramhat_out = [18.3188, 13.0509]; 498s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 498s assert (paramhat, paramhat_out, 1e-4); 498s assert (paramci, paramci_out, 1e-4); 498s ***** test 498s x = 1:50; 498s [paramhat, paramci] = gumbelfit (x, 0.01); 498s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 498s assert (paramci, paramci_out, 1e-4); 498s ***** error gumbelfit (ones (2,5)); 498s ***** error ... 498s gumbelfit (single (ones (1,5))); 498s ***** error ... 498s gumbelfit ([1, 2, 3, 4, NaN]); 498s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 498s ***** error ... 498s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 498s ***** error 498s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 498s ***** error ... 498s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 10 tests, 10 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/wblfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/wblfit.m 498s ***** demo 498s ## Sample 3 populations from 3 different Weibull distributions 498s rande ("seed", 1); # for reproducibility 498s r1 = wblrnd(2, 4, 2000, 1); 498s rande ("seed", 2); # for reproducibility 498s r2 = wblrnd(5, 2, 2000, 1); 498s rande ("seed", 5); # for reproducibility 498s r3 = wblrnd(1, 5, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 30, [2.5 2.1 3.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, 2]); 498s xlim ([0, 10]); 498s hold on 498s 498s ## Estimate their lambda parameter 498s lambda_kA = wblfit (r(:,1)); 498s lambda_kB = wblfit (r(:,2)); 498s lambda_kC = wblfit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [0:0.1:15]; 498s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 498s plot (x, y, "-pr"); 498s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 498s plot (x, y, "-sg"); 498s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 498s plot (x, y, "-^c"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 498s "Normalized HIST of sample 2 with λ=5 and k=2", ... 498s "Normalized HIST of sample 3 with λ=1 and k=5", ... 498s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 498s lambda_kA(1), lambda_kA(2)), ... 498s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 498s lambda_kB(1), lambda_kB(2)), ... 498s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 498s lambda_kC(1), lambda_kC(2))}) 498s title ("Three population samples from different Weibull distributions") 498s hold off 498s ***** test 498s x = 1:50; 498s [paramhat, paramci] = wblfit (x); 498s paramhat_out = [28.3636, 1.7130]; 498s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 498s assert (paramhat, paramhat_out, 1e-4); 498s assert (paramci, paramci_out, 1e-4); 498s ***** test 498s x = 1:50; 498s [paramhat, paramci] = wblfit (x, 0.01); 498s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 498s assert (paramci, paramci_out, 1e-4); 498s ***** error wblfit (ones (2,5)); 498s ***** error wblfit ([-1 2 3 4]); 498s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 498s ***** error wblfit ([1, 2, 3, 4, 5], 0); 498s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error ... 498s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 13 tests, 13 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gplike.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gplike.m 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 [nlogL, acov] = gplike ([k, sigma, theta], x); 498s assert (nlogL, 21.736, 1e-3); 498s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 498s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 498s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 498s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 498s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 498s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 498s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 498s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 498s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 498s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 498s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 498s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 498s ***** error gplike () 498s ***** error gplike (1) 498s ***** error gplike ([1, 2, 0], []) 498s ***** error gplike ([1, 2, 0], ones (2)) 498s ***** error gplike (2, [1:10]) 498s ***** error gplike ([2, 3], [1:10]) 498s ***** error ... 498s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 498s ***** error ... 498s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 498s 20 tests, 20 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gevfit_lmom.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gevfit_lmom.m 498s ***** xtest <31070> 498s data = 1:50; 498s [pfit, pci] = gevfit_lmom (data); 498s expected_p = [-0.28 15.01 20.22]'; 498s assert (pfit, expected_p, 0.1); 498s 1 test, 1 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gevlike.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/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/gamfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gamfit.m 498s ***** demo 498s ## Sample 3 populations from different Gamma distributions 498s randg ("seed", 5); # for reproducibility 498s r1 = gamrnd (1, 2, 2000, 1); 498s randg ("seed", 2); # for reproducibility 498s r2 = gamrnd (2, 2, 2000, 1); 498s randg ("seed", 7); # for reproducibility 498s r3 = gamrnd (7.5, 1, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 75, 4); 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.62]); 498s xlim ([0, 12]); 498s hold on 498s 498s ## Estimate their α and β parameters 498s a_bA = gamfit (r(:,1)); 498s a_bB = gamfit (r(:,2)); 498s a_bC = gamfit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [0.01,0.1:0.2:18]; 498s y = gampdf (x, a_bA(1), a_bA(2)); 498s plot (x, y, "-pr"); 498s y = gampdf (x, a_bB(1), a_bB(2)); 498s plot (x, y, "-sg"); 498s y = gampdf (x, a_bC(1), a_bC(2)); 498s plot (x, y, "-^c"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 498s "Normalized HIST of sample 2 with α=2 and β=2", ... 498s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 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 Gamma distributions") 498s hold off 498s ***** shared x 498s 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]; 498s ***** test 498s [paramhat, paramci] = gamfit (x); 498s assert (paramhat, [3.4248, 0.9752], 1e-4); 498s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 498s ***** test 498s [paramhat, paramci] = gamfit (x, 0.01); 498s assert (paramhat, [3.4248, 0.9752], 1e-4); 498s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 498s ***** test 498s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 498s [paramhat, paramci] = gamfit (x, [], [], freq); 498s assert (paramhat, [3.3025, 1.0615], 1e-4); 498s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 498s ***** test 498s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 498s assert (paramhat, [4.4484, 0.9689], 1e-4); 498s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 498s ***** test 498s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 498s assert (paramhat, [4.4484, 0.9689], 1e-4); 498s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 498s ***** test 498s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 498s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 498s assert (paramhat, [4.7537, 0.9308], 1e-4); 498s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 498s ***** test 498s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 498s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 498s [paramhat, paramci] = gamfit (x, [], cens, freq); 498s assert (paramhat, [3.4736, 1.0847], 1e-4); 498s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 498s ***** test 498s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 498s assert (paramhat, [Inf, 0]); 498s assert (paramci, [Inf, 0; Inf, 0]); 498s ***** test 498s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 498s assert (paramhat, [NaN, NaN]); 498s assert (paramci, [NaN, NaN; NaN, NaN]); 498s ***** test 498s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 498s assert (paramhat, [Inf, 0]); 498s assert (paramci, [Inf, 0; Inf, 0]); 498s ***** assert (class (gamfit (single (x))), "single") 498s ***** error gamfit (ones (2)) 498s ***** error gamfit (x, 1) 498s ***** error gamfit (x, -1) 498s ***** error gamfit (x, {0.05}) 498s ***** error gamfit (x, "a") 498s ***** error gamfit (x, i) 498s ***** error gamfit (x, [0.01 0.02]) 498s ***** error 498s gamfit ([1 2 3], 0.05, [], [1 5]) 498s ***** error 498s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 498s ***** error ... 498s gamfit ([1:10], 0.05, [], [], 5) 498s ***** error gamfit ([1 2 3 -4]) 498s ***** error ... 498s gamfit ([1 2 0], [], [1 0 0]) 498s 23 tests, 23 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/tlsfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/tlsfit.m 498s ***** demo 498s ## Sample 3 populations from 3 different location-scale T distributions 498s randn ("seed", 1); # for reproducibility 498s randg ("seed", 2); # for reproducibility 498s r1 = tlsrnd (-4, 3, 1, 2000, 1); 498s randn ("seed", 3); # for reproducibility 498s randg ("seed", 4); # for reproducibility 498s r2 = tlsrnd (0, 3, 1, 2000, 1); 498s randn ("seed", 5); # for reproducibility 498s randg ("seed", 6); # for reproducibility 498s r3 = tlsrnd (5, 5, 4, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [-21:21], [1, 1, 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.25]); 498s xlim ([-20, 20]); 498s hold on 498s 498s ## Estimate their lambda parameter 498s mu_sigma_nuA = tlsfit (r(:,1)); 498s mu_sigma_nuB = tlsfit (r(:,2)); 498s mu_sigma_nuC = tlsfit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [-20:0.1:20]; 498s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 498s plot (x, y, "-pr"); 498s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 498s plot (x, y, "-sg"); 498s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 498s plot (x, y, "-^c"); 498s hold off 498s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 498s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 498s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 498s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 498s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 498s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 498s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 498s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 498s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 498s title ("Three population samples from different location-scale T distributions") 498s hold off 498s ***** test 498s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 498s [paramhat, paramci] = tlsfit (x); 498s paramhat_out = [0.035893, 0.862711, 0.649261]; 498s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 498s assert (paramhat, paramhat_out, 1e-6); 498s assert (paramci, paramci_out, 1e-5); 498s ***** test 498s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 498s [paramhat, paramci] = tlsfit (x, 0.01); 498s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 498s assert (paramci, paramci_out, 1e-4); 498s ***** error tlsfit (ones (2,5)); 498s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 498s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 498s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 498s ***** error ... 498s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 12 tests, 12 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/hnfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/hnfit.m 498s ***** demo 498s ## Sample 2 populations from different half-normal distributions 498s rand ("seed", 1); # for reproducibility 498s r1 = hnrnd (0, 5, 5000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = hnrnd (0, 2, 5000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [0.5:20], 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 shape parameters 498s mu_sigmaA = hnfit (r(:,1), 0); 498s mu_sigmaB = hnfit (r(:,2), 0); 498s 498s ## Plot their estimated PDFs 498s x = [0:0.2:10]; 498s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 498s plot (x, y, "-pr"); 498s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 498s plot (x, y, "-sg"); 498s xlim ([0, 10]) 498s ylim ([0, 0.5]) 498s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 498s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 498s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 498s mu_sigmaA(1), mu_sigmaA(2)), ... 498s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 498s mu_sigmaB(1), mu_sigmaB(2))}) 498s title ("Two population samples from different half-normal distributions") 498s hold off 498s ***** test 498s x = 1:20; 498s [paramhat, paramci] = hnfit (x, 0); 498s assert (paramhat, [0, 11.9791], 1e-4); 498s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 498s ***** test 498s x = 1:20; 498s [paramhat, paramci] = hnfit (x, 0, 0.01); 498s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 498s ***** error hnfit () 498s ***** error hnfit (1) 498s ***** error hnfit ([0.2, 0.5+i], 0); 498s ***** error hnfit (ones (2,2) * 0.5, 0); 498s ***** error ... 498s hnfit ([0.5, 1.2], [0, 1]); 498s ***** error ... 498s hnfit ([0.5, 1.2], 5+i); 498s ***** error ... 498s hnfit ([1:5], 2); 498s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 498s ***** error hnfit ([0.01:0.1:0.99], 0, i); 498s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 498s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 498s ***** error 498s hnfit ([1 2 3], 0, [], [1 5]) 498s ***** error 498s hnfit ([1 2 3], 0, [], [1 5 -1]) 498s 15 tests, 15 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/geofit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/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/nakafit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/nakafit.m 498s ***** demo 498s ## Sample 3 populations from different Nakagami distributions 498s randg ("seed", 5) # for reproducibility 498s r1 = nakarnd (0.5, 1, 2000, 1); 498s randg ("seed", 2) # for reproducibility 498s r2 = nakarnd (5, 1, 2000, 1); 498s randg ("seed", 7) # for reproducibility 498s r3 = nakarnd (2, 2, 2000, 1); 498s r = [r1, r2, r3]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, [0.05:0.1:3.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, 2.5]); 498s xlim ([0, 3.0]); 498s hold on 498s 498s ## Estimate their MU and LAMBDA parameters 498s mu_omegaA = nakafit (r(:,1)); 498s mu_omegaB = nakafit (r(:,2)); 498s mu_omegaC = nakafit (r(:,3)); 498s 498s ## Plot their estimated PDFs 498s x = [0.01:0.1:3.01]; 498s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 498s plot (x, y, "-pr"); 498s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 498s plot (x, y, "-sg"); 498s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 498s plot (x, y, "-^c"); 498s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 498s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 498s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 498s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 498s mu_omegaA(1), mu_omegaA(2)), ... 498s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 498s mu_omegaB(1), mu_omegaB(2)), ... 498s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 498s mu_omegaC(1), mu_omegaC(2))}) 498s title ("Three population samples from different Nakagami distributions") 498s hold off 498s ***** test 498s paramhat = nakafit ([1:50]); 498s paramhat_out = [0.7355, 858.5]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = nakafit ([1:5]); 498s paramhat_out = [1.1740, 11]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 498s paramhat_out = [1.1740, 11]; 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** test 498s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 498s paramhat_out = nakafit ([1:5, 5]); 498s assert (paramhat, paramhat_out, 1e-4); 498s ***** error nakafit (ones (2,5)); 498s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 498s ***** error nakafit ([1, 2, 3, 4, 5], 0); 498s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 498s ***** error ... 498s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 498s 15 tests, 15 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/gevfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fit/gevfit.m 498s ***** demo 498s ## Sample 2 populations from 2 different exponential distributions 498s rand ("seed", 1); # for reproducibility 498s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 498s rand ("seed", 2); # for reproducibility 498s r2 = gevrnd (0, 1, -4, 5000, 1); 498s r = [r1, r2]; 498s 498s ## Plot them normalized and fix their colors 498s hist (r, 50, 5); 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 k, sigma, and mu parameters 498s k_sigma_muA = gevfit (r(:,1)); 498s k_sigma_muB = gevfit (r(:,2)); 498s 498s ## Plot their estimated PDFs 498s x = [-10:0.5:20]; 498s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 498s plot (x, y, "-pr"); 498s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 498s plot (x, y, "-sg"); 498s ylim ([0, 0.7]) 498s xlim ([-7, 5]) 498s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 498s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 498s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 498s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 498s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 498s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 498s title ("Two population samples from different exponential distributions") 498s hold off 498s ***** test 498s x = 1:50; 498s [pfit, pci] = gevfit (x); 498s pfit_out = [-0.4407, 15.1923, 21.5309]; 498s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 498s assert (pfit, pfit_out, 1e-3); 498s assert (pci, pci_out, 1e-3); 498s ***** test 498s x = 1:2:50; 498s [pfit, pci] = gevfit (x); 498s pfit_out = [-0.4434, 15.2024, 21.0532]; 498s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 498s assert (pfit, pfit_out, 1e-3); 498s assert (pci, pci_out, 1e-3); 498s ***** error gevfit (ones (2,5)); 498s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 498s ***** error gevfit ([1, 2, 3, 4, 5], 0); 498s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 498s ***** error ... 498s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 498s ***** error ... 498s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 498s ***** error ... 498s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 498s ***** error ... 498s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 498s ***** error ... 498s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 498s 11 tests, 11 passed, 0 known failure, 0 skipped 498s [inst/dist_fit/unidfit.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/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/nanmin.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/nanmin.m 498s ***** demo 498s ## Find the column minimum values and their indices 498s ## for matrix data with missing values. 498s 498s x = magic (3); 498s x([1, 6:9]) = NaN 498s [y, ind] = nanmin (x) 498s ***** demo 498s ## Find the minimum of all the values in an array, ignoring missing values. 498s ## Create a 2-by-5-by-3 array x with some missing values. 498s 498s x = reshape (1:30, [2, 5, 3]); 498s x([10:12, 25]) = NaN 498s 498s ## Find the minimum of the elements of x. 498s 498s y = nanmin (x, [], 'all') 498s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 498s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 498s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 498s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 498s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 498s ***** shared x, y 498s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 498s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 498s y = x; 498s y(2,3,1) = 0.51; 498s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 498s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 498s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 498s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 498s ***** assert (nanmin (x, [], 'all'), -2.95) 498s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 498s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 498s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 498s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 498s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 498s ***** test 498s xx = repmat ([1:20;6:25], [5 2 6 3]); 498s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 498s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 498s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 498s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 498s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 498s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 498s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 498s ***** assert (nanmin (magic (3), [], 3), magic (3)) 498s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 498s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 498s ***** assert (nanmin (ones (2), 3), ones (2,2)) 498s ***** error ... 498s nanmin (y, [], [1, 1, 2]) 498s ***** error ... 498s [v, idx] = nanmin(x, y, [1 2]) 498s 24 tests, 24 passed, 0 known failure, 0 skipped 498s [inst/vartest2.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/vartest2.m 498s ***** error vartest2 (); 498s ***** error vartest2 (ones (20,1)); 498s ***** error ... 498s vartest2 (rand (20,1), 5); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 498s ***** error ... 498s vartest2 (rand (20,1), rand (25,1)*2, "some"); 498s ***** test 498s load carsmall 498s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 498s assert (h, 0); 498s assert (pval, 0.6288022362718455, 1e-13); 498s assert (ci, [0.4139; 1.7193], 1e-4); 498s assert (stat.fstat, 0.8384, 1e-4); 498s assert (stat.df1, 30); 498s assert (stat.df2, 33); 498s ***** test 498s load carsmall 498s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 498s "tail", "left"); 498s assert (h, 0); 498s assert (pval, 0.314401118135922, 1e-13); 498s assert (ci, [0; 1.5287], 1e-4); 498s assert (stat.fstat, 0.8384, 1e-4); 498s assert (stat.df1, 30); 498s assert (stat.df2, 33); 498s ***** test 498s load carsmall 498s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 498s "tail", "right"); 498s assert (h, 0); 498s assert (pval, 0.685598881864077, 1e-13); 498s assert (ci, [0.4643; Inf], 1e-4); 498s assert (stat.fstat, 0.8384, 1e-4); 498s assert (stat.df1, 30); 498s assert (stat.df2, 33); 498s 16 tests, 16 passed, 0 known failure, 0 skipped 498s [inst/einstein.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/einstein.m 498s ***** demo 498s einstein (0.4, 0.6) 498s ***** demo 498s einstein (0.2, 0.5) 498s ***** demo 498s einstein (0.6, 0.1) 498s ***** test 498s hf = figure ("visible", "off"); 498s unwind_protect 498s tiles = einstein (0.4, 0.6); 498s assert (isstruct (tiles), true); 498s unwind_protect_cleanup 498s close (hf); 498s end_unwind_protect 498s ***** error einstein 498s ***** error einstein (0.5) 498s ***** error einstein (0, 0.9) 498s ***** error einstein (0.4, 1) 498s ***** error einstein (-0.4, 1) 498s 6 tests, 6 passed, 0 known failure, 0 skipped 498s [inst/ridge.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ridge.m 498s ***** demo 498s ## Perform ridge regression for a range of ridge parameters and observe 498s ## how the coefficient estimates change based on the acetylene dataset. 498s 498s load acetylene 498s 498s X = [x1, x2, x3]; 498s 498s x1x2 = x1 .* x2; 498s x1x3 = x1 .* x3; 498s x2x3 = x2 .* x3; 498s 498s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 498s 498s k = 0:1e-5:5e-3; 498s 498s b = ridge (y, D, k); 498s 498s figure 498s plot (k, b, "LineWidth", 2) 498s ylim ([-100, 100]) 498s grid on 498s xlabel ("Ridge Parameter") 498s ylabel ("Standardized Coefficient") 498s title ("Ridge Trace") 498s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 498s 498s ***** demo 498s 498s load carbig 498s X = [Acceleration Weight Displacement Horsepower]; 498s y = MPG; 498s 498s n = length(y); 498s 498s rand("seed",1); % For reproducibility 498s 498s c = cvpartition(n,'HoldOut',0.3); 498s idxTrain = training(c,1); 498s idxTest = ~idxTrain; 498s 498s idxTrain = training(c,1); 498s idxTest = ~idxTrain; 498s 498s k = 5; 498s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 498s 498s % Predict MPG values for the test data using the model. 498s yhat = b(1) + X(idxTest,:)*b(2:end); 498s scatter(y(idxTest),yhat) 498s 498s hold on 498s plot(y(idxTest),y(idxTest),"r") 498s xlabel('Actual MPG') 498s ylabel('Predicted MPG') 498s hold off 498s 498s ***** test 498s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 498s assert (b, [0.5533; 0.5533], 1e-4); 498s ***** test 498s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 498s assert (b, [0.4841; 0.4841], 1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0); 498s assert (b,[10.2273;1.97128;-0.601818],1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0.0005); 498s assert (b,[10.2233;1.9712;-0.6056],1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0.001); 498s assert (b,[10.2194;1.9711;-0.6094],1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0.002); 498s assert (b,[10.2116;1.9709;-0.6169],1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0.005); 498s assert (b,[10.1882;1.9704;-0.6393],1e-4); 498s ***** test 498s load acetylene 498s x = [x1, x2, x3]; 498s b = ridge (y, x, 0.01); 498s assert (b,[10.1497;1.9695;-0.6761],1e-4); 498s ***** error ridge (1) 498s ***** error ridge (1, 2) 498s ***** error ridge (ones (3), ones (3), 2) 498s ***** error ridge ([1, 2], ones (2), 2) 498s ***** error ridge ([], ones (3), 2) 498s ***** error ridge (ones (5,1), [], 2) 498s ***** error ... 498s ridge ([1; 2; 3; 4; 5], ones (3), 3) 498s ***** error ... 498s ridge ([1; 2; 3], ones (3), 3, 2) 498s ***** error ... 498s ridge ([1; 2; 3], ones (3), 3, "some") 498s 17 tests, 17 passed, 0 known failure, 0 skipped 498s [inst/procrustes.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/procrustes.m 498s ***** demo 498s ## Create some random points in two dimensions 498s n = 10; 498s randn ("seed", 1); 498s X = normrnd (0, 1, [n, 2]); 498s 498s ## Those same points, rotated, scaled, translated, plus some noise 498s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 498s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 498s 498s ## Conform Y to X, plot original X and Y, and transformed Y 498s [d, Z] = procrustes (X, Y); 498s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 498s ***** demo 498s ## Find Procrustes distance and plot superimposed shape 498s 498s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 498s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 498s plot (X(:,1),X(:,2),"x"); 498s hold on 498s plot (Y(:,1),Y(:,2),"o"); 498s xlim ([0 100]); 498s ylim ([0 100]); 498s legend ("Target shape (X)", "Source shape (Y)"); 498s [d, Z] = procrustes (X, Y) 498s plot (Z(:,1), Z(:,2), "s"); 498s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 498s hold off 498s ***** demo 498s ## Apply Procrustes transformation to larger set of points 498s 498s ## Create matrices with landmark points for two triangles 498s X = [5, 0; 5, 5; 8, 5]; # target 498s Y = [0, 0; 1, 0; 1, 1]; # source 498s 498s ## Create a matrix with more points on the source triangle 498s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 498s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 498s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 498s 498s ## Plot both shapes, including the larger set of points for the source shape 498s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 498s hold on 498s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 498s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 498s xlim ([-1 10]); 498s ylim ([-1 6]); 498s legend ("Target shape (X)", "Source shape (Y)", ... 498s "More points on Y", "Location", "northwest"); 498s hold off 498s 498s ## Obtain the Procrustes transformation 498s [d, Z, transform] = procrustes (X, Y) 498s 498s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 498s ## on the source shape onto the target shape, and then visualize the results. 498s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 498s figure 498s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 498s hold on 498s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 498s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 498s xlim ([-1 10]); 498s ylim ([-1 6]); 498s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 498s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 498s legend ("Target shape (X)", "Source shape (Y)", ... 498s "More points on Y", "Transformed source shape (Z)", ... 498s "Transformed additional points", "Location", "northwest"); 498s hold off 498s ***** demo 498s ## Compare shapes without reflection 498s 498s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 498s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 498s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 498s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 498s plot (T(:,1), T(:,2), "x-"); 498s hold on 498s plot (S(:,1), S(:,2), "o-"); 498s legend ("Target shape (d)", "Source shape (b)"); 498s hold off 498s d_false = procrustes (T, S, "reflection", false); 498s printf ("Procrustes distance without reflection: %f\n", d_false); 498s d_true = procrustes (T, S, "reflection", true); 498s printf ("Procrustes distance with reflection: %f\n", d_true); 498s d_best = procrustes (T, S, "reflection", "best"); 498s printf ("Procrustes distance with best fit: %f\n", d_true); 498s ***** error procrustes (); 498s ***** error procrustes (1, 2, 3, 4, 5, 6); 498s ***** error ... 498s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 498s ***** error ... 498s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 498s ***** error ... 498s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 498s ***** error ... 498s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (11, 3)); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 4)); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), true); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 498s ***** error ... 498s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 498s 15 tests, 15 passed, 0 known failure, 0 skipped 498s [inst/confusionchart.m] 498s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/confusionchart.m 498s ***** demo 498s close all 498s ## Setting the chart properties 498s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 498s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 498s confusionchart (Yt, Yp, "Title", ... 498s "Demonstration with summaries","Normalization",... 498s "absolute","ColumnSummary", "column-normalized","RowSummary",... 498s "row-normalized") 498s ***** demo 498s close all 498s ## Cellstr as inputs 498s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 498s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 498s m = confusionmat (Yt, Yp); 498s confusionchart (m, {"Positive", "Negative"}); 498s hold off 498s ***** demo 498s close all 498s ## Editing the object properties 498s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 498s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 498s cm = confusionchart (Yt, Yp); 498s cm.Title = "This is an example with a green diagonal"; 498s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 498s hold off 498s ***** demo 498s close all 498s ## Confusion chart in a uipanel 498s h = uipanel (); 498s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 498s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 498s cm = confusionchart (h, Yt, Yp); 498s hold off 498s ***** demo 498s close all 498s ## Sorting classes 498s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 498s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 498s cm = confusionchart (Yt, Yp, "Title", ... 498s "Classes are sorted in ascending order"); 498s cm = confusionchart (Yt, Yp, "Title", ... 498s "Classes are sorted according to clusters"); 498s sortClasses (cm, "cluster"); 498s ***** shared visibility_setting 498s visibility_setting = get (0, "DefaultFigureVisible"); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ()", "Invalid call"); 498s set (0, "DefaultFigureVisible", visibility_setting); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 498s set (0, "DefaultFigureVisible", visibility_setting); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 498s set (0, "DefaultFigureVisible", visibility_setting); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 498s set (0, "DefaultFigureVisible", visibility_setting); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 498s ".* YLabel .* string"); 498s set (0, "DefaultFigureVisible", visibility_setting); 498s ***** test 498s set (0, "DefaultFigureVisible", "off"); 498s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 498s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 499s ".* FontName .* string"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 499s ".* FontSize .* numeric"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 499s ".* DiagonalColor .* color"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 499s ".* OffDiagonalColor .* color"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 499s ".* invalid .* Normalization"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 499s ".* invalid .* ColumnSummary"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 499s ".* invalid .* RowSummary"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 499s ".* invalid .* GridVisible"); 499s set (0, "DefaultFigureVisible", visibility_setting); 499s ***** test 499s set (0, "DefaultFigureVisible", "off"); 499s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 499s ".* invalid .* HandleVisibility"); 499s set (0, "DefaultFigureVisible", visibility_setting); 500s ***** test 500s set (0, "DefaultFigureVisible", "off"); 500s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 500s ".* invalid .* OuterPosition"); 500s set (0, "DefaultFigureVisible", visibility_setting); 500s ***** test 500s set (0, "DefaultFigureVisible", "off"); 500s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 500s ".* invalid .* Position"); 500s set (0, "DefaultFigureVisible", visibility_setting); 500s ***** test 500s set (0, "DefaultFigureVisible", "off"); 500s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 500s set (0, "DefaultFigureVisible", visibility_setting); 500s 18 tests, 18 passed, 0 known failure, 0 skipped 500s [inst/trimmean.m] 500s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/trimmean.m 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s out = trimmean (x, 10, [1, 2]); 500s assert (out(1,1,1), 10.3889, 1e-4); 500s assert (out(1,1,2), 29.6111, 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s out = trimmean (x, 10, 1); 500s assert (out(:,:,1), [-17.6, 8, 13, 18]); 500s assert (out(:,:,2), [23, 28, 33, 10.6]); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, 1); 500s assert (out(:,:,1), [-23, 8, 13, 18]); 500s assert (out(:,:,2), [23, 28, 33, 3.75]); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s out = trimmean (x, 10, 2); 500s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 500s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, 2); 500s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 500s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s out = trimmean (x, 10, [1, 2, 3]); 500s assert (out, trimmean (x, 10, "all")); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, [1, 2]); 500s assert (out(1,1,1), 10.7647, 1e-4); 500s assert (out(1,1,2), 29.1176, 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, [1, 3]); 500s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, [2, 3]); 500s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, [1, 2, 3]); 500s assert (out, trimmean (x, 10, "all")); 500s ***** test 500s x = reshape (1:40, [5, 4, 2]); 500s x([3, 37]) = -100; 500s x([4, 38]) = NaN; 500s out = trimmean (x, 10, [2, 3, 5]); 500s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 500s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 500s ***** assert (trimmean ([], 10), NaN) 500s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 500s ***** error trimmean (1) 500s ***** error trimmean (1,2,3,4,5) 500s ***** error trimmean ([1 2 3 4], -10) 500s ***** error trimmean ([1 2 3 4], 100) 500s ***** error trimmean ([1 2 3 4], 10, "flag") 500s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 500s ***** error ... 500s trimmean ([1 2 3 4], 10, -1) 500s ***** error ... 500s trimmean ([1 2 3 4], 10, "floor", -1) 500s ***** error ... 500s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 500s ***** error ... 500s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 500s 26 tests, 26 passed, 0 known failure, 0 skipped 500s [inst/knnsearch.m] 500s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/knnsearch.m 500s ***** demo 500s ## find 10 nearest neighbour of a point using different distance metrics 500s ## and compare the results by plotting 500s load fisheriris 500s X = meas(:,3:4); 500s Y = species; 500s point = [5, 1.45]; 500s 500s ## calculate 10 nearest-neighbours by minkowski distance 500s [id, d] = knnsearch (X, point, "K", 10); 500s 500s ## calculate 10 nearest-neighbours by minkowski distance 500s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 500s 500s ## calculate 10 nearest-neighbours by chebychev distance 500s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 500s 500s ## plotting the results 500s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 500s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 500s xlabel("Petal length (cm)"); 500s ylabel("Petal width (cm)"); 500s 500s line (point(1), point(2), "marker", "X", "color", "k", ... 500s "linewidth", 2, "displayname", "query point") 500s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 500s "linestyle", "none", "markersize", 10, "displayname", "euclidean") 500s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 500s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 500s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 500s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 500s xlim ([4.5 5.5]); 500s ylim ([1 2]); 500s axis square; 500s ***** demo 500s ## knnsearch on iris dataset using kdtree method 500s load fisheriris 500s X = meas(:,3:4); 500s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 500s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 500s 500s ## new point to be predicted 500s point = [5 1.45]; 500s 500s line (point(1), point(2), "marker", "X", "color", "k", ... 500s "linewidth", 2, "displayname", "query point") 500s 500s ## knnsearch using kdtree method 500s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 500s 500s ## plotting predicted neighbours 500s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 500s "linestyle", "none", "markersize", 10, ... 500s "displayname", "nearest neighbour") 500s xlim ([4 6]) 500s ylim ([1 3]) 500s axis square 500s ## details of predicted labels 500s tabulate (species(idx)) 500s 500s ctr = point - d(end); 500s diameter = 2 * d(end); 500s ## Draw a circle around the 10 nearest neighbors. 500s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 500s 500s ## here only 8 neighbours are plotted instead of 10 since the dataset 500s ## contains duplicate values 500s ***** shared X, Y 500s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 500s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * sqrt (2)); 500s ***** test 500s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 500s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * sqrt (2)); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 500s assert (iscell (idx), true); 500s assert (iscell (D), true) 500s assert (idx {1}, [1]); 500s assert (idx {2}', [1, 2]); 500s assert (D{1}, ones (1, 1) * sqrt (2)); 500s assert (D{2}', ones (1, 2) * sqrt (2)); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 500s assert (idx, [1, 2; 1, 2]); 500s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * sqrt (2)); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 500s assert (idx, [1, 2; 1, 2]); 500s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 500s ***** test 500s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 500s yy = [2, 4; 2, 6]; 500s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 500s assert (idx, [3; 2]); 500s assert (D, [0; 3.162277660168377], 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * sqrt (2)); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 500s assert (idx, [1; 1]); 500s assert (D, [2; 2]); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 500s assert (idx, [1; 1]); 500s assert (D, [1; 1]); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 500s assert (idx, [2; 3]); 500s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 500s assert (idx, [1; 1]); 500s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 500s assert (idx, [1; 1]); 500s assert (D, [0.5; 0.5]); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 500s assert (idx, [1; 1]); 500s assert (D, [0.5; 0.5]); 500s ***** test 500s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 500s assert (idx, [1, 2; 1, 2]); 500s assert (D, [0.5, 1; 0.5, 0.5]); 500s ***** test 500s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 500s b = [1, 1]; 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 500s assert (iscell (idx), true); 500s assert (iscell (D), true) 500s assert (cell2mat (idx)', [4, 2, 3, 6, 1, 5, 7, 9]); 500s assert (cell2mat (D)', [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 500s ***** test 500s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 500s b = [1, 1]; 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 500s assert (iscell (idx), true); 500s assert (iscell (D), true) 500s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 500s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 500s ***** test 500s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 500s b = [1, 1]; 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 500s assert (iscell (idx), false); 500s assert (iscell (D), false) 500s assert (idx, [4, 2, 3, 6, 1]); 500s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 500s ***** test 500s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 500s b = [1, 1]; 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 500s assert (iscell (idx), false); 500s assert (iscell (D), false) 500s assert (idx, [4, 2, 3, 6, 1]); 500s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 500s ***** test 500s load fisheriris 500s a = meas; 500s b = min(meas); 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 500s assert (idx, [42, 9, 14, 39, 13]); 500s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874], 1e-4); 500s ***** test 500s load fisheriris 500s a = meas; 500s b = mean(meas); 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 500s assert (idx, [65, 83, 89, 72, 100]); 500s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625], 1e-4); 500s ***** test 500s load fisheriris 500s a = meas; 500s b = max(meas); 500s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 500s assert (idx, [118, 132, 110, 106, 136]); 500s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 500s 500s ***** test 500s load fisheriris 500s a = meas; 500s b = max(meas); 500s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 500s assert (iscell (idx), true); 500s assert (iscell (D), true); 500s assert (cell2mat (idx)', [118, 132, 110, 106, 136]); 500s assert (cell2mat (D)', [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 500s ***** error knnsearch (1) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (4)) 500s ***** error ... 500s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "P", -2) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 500s ***** error ... 500s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 500s 42 tests, 42 passed, 0 known failure, 0 skipped 500s [inst/bar3.m] 500s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/bar3.m 500s ***** demo 500s ## Plotting 5 bars in the same series. 500s 500s z = [50; 40; 30; 20; 10]; 500s bar3 (z); 500s ***** demo 500s ## Plotting 5 bars in different groups. 500s 500s z = [50, 40, 30, 20, 10]; 500s bar3 (z); 500s ***** demo 500s ## A 3D bar graph with each series corresponding to a column in z. 500s 500s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 500s bar3 (z); 500s ***** demo 500s ## Specify y-axis locations as tick names. y must be a column vector! 500s 500s y = [1950, 1960, 1970, 1980, 1990]'; 500s z = [16, 8, 4, 2, 1]'; 500s bar3 (y, z); 500s ***** demo 500s ## Plot 3 series as a grouped plot without any space between the grouped bars 500s 500s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 500s bar3 (z, 1, 'grouped'); 500s ***** demo 500s ## Plot a stacked style 3D bar graph 500s 500s z = [19, 30, 21, 30; 40, 16, 32, 12]; 500s b = bar3 (z, 0.5, 'stacked'); 500s ***** error bar3 ("A") 500s ***** error bar3 ({2,3,4,5}) 500s ***** error ... 500s bar3 ([1,2,3]', ones (2)) 500s ***** error ... 500s bar3 ([1:5], 1.2) 500s ***** error ... 500s bar3 ([1:5]', ones (5), 1.2) 500s ***** error ... 500s bar3 ([1:5]', ones (5), [0.8, 0.7]) 500s ***** error ... 500s bar3 (ones (5), 'width') 500s ***** error ... 500s bar3 (ones (5), 'width', 1.2) 500s ***** error ... 500s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 500s ***** error ... 500s bar3 (ones (5), 'color') 500s ***** error ... 500s bar3 (ones (5), 'color', [0.8, 0.8]) 500s ***** error ... 500s bar3 (ones (5), 'color', "brown") 500s ***** error ... 500s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 500s ***** error ... 500s bar3 (ones (5), 'xlabel') 500s ***** error ... 500s bar3 (ones (5), 'xlabel', 4) 500s ***** error ... 500s bar3 (ones (5), 'ylabel') 500s ***** error ... 500s bar3 (ones (5), 'ylabel', 4) 500s ***** error bar3 (ones (5), 'this', 4) 500s ***** error ... 500s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 500s ***** error ... 500s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 500s 20 tests, 20 passed, 0 known failure, 0 skipped 500s [inst/normalise_distribution.m] 500s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/normalise_distribution.m 500s ***** test 500s v = normalise_distribution ([1 2 3], [], 1); 500s assert (v, [0 0 0]) 500s ***** test 500s v = normalise_distribution ([1 2 3], [], 2); 500s assert (v, norminv ([1 3 5] / 6), 3 * eps) 500s ***** test 500s v = normalise_distribution ([1 2 3]', [], 2); 500s assert (v, [0 0 0]') 500s ***** test 500s v = normalise_distribution ([1 2 3]', [], 1); 500s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 500s ***** test 500s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 500s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 500s ***** test 500s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 500s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 500s ***** test 500s A = randn ( 10 ); 500s N = normalise_distribution (A, @normcdf); 500s assert (A, N, 10000 * eps) 500s ***** test 500s A = exprnd (1, 100); 500s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 500s assert (mean (vec (N)), 0, 0.1) 500s assert (std (vec (N)), 1, 0.1) 501s ***** test 501s A = rand (1000,1); 501s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 501s assert (mean (vec (N)), 0, 0.2) 501s assert (std (vec (N)), 1, 0.1) 501s ***** test 501s A = [rand(1000,1), randn(1000, 1)]; 501s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 501s assert (mean (N), [0, 0], 0.2) 501s assert (std (N), [1, 1], 0.1) 501s ***** test 501s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 501s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 501s assert (mean (N, 2), [0, 0, 0]', 0.2); 501s assert (std (N, [], 2), [1, 1, 1]', 0.1); 501s ***** xtest 501s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 501s N = normalise_distribution (A); 501s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 501s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 501s ***** test 501s ***** error normalise_distribution (zeros (3, 4), ... 501s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 501s 14 tests, 14 passed, 0 known failure, 0 skipped 501s [inst/cdfplot.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cdfplot.m 501s ***** demo 501s x = randn(100,1); 501s cdfplot (x); 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 501s [hCDF, stats] = cdfplot (x); 501s assert (stats.min, 2); 501s assert (stats.max, 6); 501s assert (stats.median, 3.5); 501s assert (stats.std, 1.35400640077266, 1e-14); 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s x = randn(100,1); 501s cdfplot (x); 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 501s ***** error cdfplot (); 501s ***** error cdfplot ([x',x']); 501s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 501s 5 tests, 5 passed, 0 known failure, 0 skipped 501s [inst/mcnemar_test.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/mcnemar_test.m 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 501s assert (h, 1); 501s assert (pval, 3.8151e-06, 1e-10); 501s assert (chisq, 21.356, 1e-3); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 501s assert (h, 1); 501s assert (pval, 0.034690, 1e-6); 501s assert (isempty (chisq), true); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 501s assert (h, 0); 501s assert (pval, 0.034690, 1e-6); 501s assert (isempty (chisq), true); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 501s assert (h, 1); 501s assert (pval, 0.034690, 1e-6); 501s assert (isempty (chisq), true); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 501s assert (h, 1); 501s assert (pval, 0.033006, 1e-6); 501s assert (chisq, 4.5455, 1e-4); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 501s assert (h, 0); 501s assert (pval, 0.052479, 1e-6); 501s assert (isempty (chisq), true); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 501s assert (h, 0); 501s assert (pval, 0.055009, 1e-6); 501s assert (chisq, 3.6818, 1e-4); 501s ***** test 501s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 501s assert (h, 1); 501s assert (pval, 0.055009, 1e-6); 501s assert (chisq, 3.6818, 1e-4); 501s ***** error mcnemar_test (59, 6, 16, 80) 501s ***** error mcnemar_test (ones (3, 3)) 501s ***** error ... 501s mcnemar_test ([59,6;16,-80]) 501s ***** error ... 501s mcnemar_test ([59,6;16,4.5]) 501s ***** error ... 501s mcnemar_test ([59,6;16,80], {""}) 501s ***** error ... 501s mcnemar_test ([59,6;16,80], -0.2) 501s ***** error ... 501s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 501s ***** error ... 501s mcnemar_test ([59,6;16,80], 1) 501s ***** error ... 501s mcnemar_test ([59,6;16,80], "") 501s 17 tests, 17 passed, 0 known failure, 0 skipped 501s [inst/geomean.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/geomean.m 501s ***** test 501s x = [0:10]; 501s y = [x;x+5;x+10]; 501s assert (geomean (x), 0); 501s m = [0 9.462942809849169 14.65658770861967]; 501s assert (geomean (y, 2), m', 4e-14); 501s assert (geomean (y, "all"), 0); 501s y(2,4) = NaN; 501s m(2) = 9.623207231679554; 501s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 501s assert (geomean (y', "omitnan"), m, 4e-14); 501s z = y + 20; 501s assert (geomean (z, "all"), NaN); 501s assert (geomean (z, "all", "includenan"), NaN); 501s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 501s m = [24.79790781765634 NaN 34.85638839503932]; 501s assert (geomean (z'), m, 4e-14); 501s assert (geomean (z', "includenan"), m, 4e-14); 501s m(2) = 30.02181156156319; 501s assert (geomean (z', "omitnan"), m, 4e-14); 501s assert (geomean (z, 2, "omitnan"), m', 4e-14); 501s ***** test 501s x = repmat ([1:20;6:25], [5 2 6 3]); 501s assert (size (geomean (x, [3 2])), [10 1 1 3]); 501s assert (size (geomean (x, [1 2])), [1 1 6 3]); 501s assert (size (geomean (x, [1 2 4])), [1 1 6]); 501s assert (size (geomean (x, [1 4 3])), [1 40]); 501s assert (size (geomean (x, [1 2 3 4])), [1 1]); 501s ***** test 501s x = repmat ([1:20;6:25], [5 2 6 3]); 501s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 501s assert (geomean (x, [3 2]), m, 4e-13); 501s x(2,5,6,3) = NaN; 501s m(2,3) = NaN; 501s assert (geomean (x, [3 2]), m, 4e-13); 501s m(2,3) = 14.3292729579901; 501s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 501s ***** error geomean ("char") 501s ***** error geomean ([1 -1 3]) 501s ***** error ... 501s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 501s ***** error ... 501s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 501s ***** error ... 501s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 501s 8 tests, 8 passed, 0 known failure, 0 skipped 501s [inst/ppplot.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ppplot.m 501s ***** test 501s hf = figure ("visible", "off"); 501s unwind_protect 501s 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]); 501s unwind_protect_cleanup 501s close (hf); 501s end_unwind_protect 501s ***** error ppplot () 501s ***** error ppplot (ones (2,2)) 501s ***** error ppplot (1, 2) 501s ***** error ppplot ([1 2 3 4], 2) 501s 5 tests, 5 passed, 0 known failure, 0 skipped 501s [inst/plsregress.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/plsregress.m 501s ***** demo 501s ## Perform Partial Least-Squares Regression 501s 501s ## Load the spectra data set and use the near infrared (NIR) spectral 501s ## intensities (NIR) as the predictor and the corresponding octave 501s ## ratings (octave) as the response. 501s load spectra 501s 501s ## Perform PLS regression with 10 components 501s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 501s 501s ## Plot the percentage of explained variance in the response variable 501s ## (PCTVAR) as a function of the number of components. 501s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 501s xlim ([1, 10]); 501s xlabel ("Number of PLS components"); 501s ylabel ("Percentage of Explained Variance in octane"); 501s title ("Explained Variance per PLS components"); 501s 501s ## Compute the fitted response and display the residuals. 501s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 501s residuals = octane - octane_fitted; 501s figure 501s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 501s xlabel ("Observations"); 501s ylabel ("Residuals"); 501s title ("Residuals in octane's fitted response"); 501s ***** demo 501s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 501s 501s ## Load the spectra data set and use the near infrared (NIR) spectral 501s ## intensities (NIR) as the predictor and the corresponding octave 501s ## ratings (octave) as the response. Variables with a VIP score greater than 501s ## 1 are considered important for the projection of the PLS regression model. 501s load spectra 501s 501s ## Perform PLS regression with 10 components 501s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 501s plsregress (NIR, octane, 10); 501s 501s ## Calculate the normalized PLS weights 501s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 501s 501s ## Calculate the VIP scores for 10 components 501s nobs = size (xload, 1); 501s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 501s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 501s 501s ## Find variables with a VIP score greater than or equal to 1 501s VIPidx = find (VIPscore >= 1); 501s 501s ## Plot the VIP scores 501s scatter (1:length (VIPscore), VIPscore, "xb"); 501s hold on 501s scatter (VIPidx, VIPscore (VIPidx), "xr"); 501s plot ([1, length(VIPscore)], [1, 1], "--k"); 501s hold off 501s axis ("tight"); 501s xlabel ("Predictor Variables"); 501s ylabel ("VIP scores"); 501s title ("VIP scores for each predictor variable with 10 components"); 501s ***** test 501s load spectra 501s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 501s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 501s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 501s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 501s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 501s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 501s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 501s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 501s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 501s assert (xload(1,:), xload1_out, 1e-4); 501s assert (yload, yload_out, 1e-4); 501s assert (xscore(1,:), xscore1_out, 1e-4); 501s assert (yscore(1,:), yscore1_out, 1e-4); 501s ***** test 501s load spectra 501s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 501s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 501s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 501s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 501s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 501s assert (xload(1,:), xload1_out, 1e-4); 501s assert (yload, yload_out, 1e-4); 501s assert (xscore(1,:), xscore1_out, 1e-4); 501s assert (yscore(1,:), yscore1_out, 1e-4); 501s ***** error 501s plsregress (1) 501s ***** error plsregress (1, "asd") 501s ***** error plsregress (1, {1,2,3}) 501s ***** error plsregress ("asd", 1) 501s ***** error plsregress ({1,2,3}, 1) 501s ***** error ... 501s plsregress (ones (20,3), ones (15,1)) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 0) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), -5) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3.2) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), [2, 3]) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 4) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 501s ***** error ... 501s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 501s ***** error plsregress (1, 2) 501s 24 tests, 24 passed, 0 known failure, 0 skipped 501s [inst/Regression/RegressionGAM.m] 501s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Regression/RegressionGAM.m 501s ***** demo 501s ## Train a RegressionGAM Model for synthetic values 501s f1 = @(x) cos (3 * x); 501s f2 = @(x) x .^ 3; 501s x1 = 2 * rand (50, 1) - 1; 501s x2 = 2 * rand (50, 1) - 1; 501s y = f1(x1) + f2(x2); 501s y = y + y .* 0.2 .* rand (50,1); 501s X = [x1, x2]; 501s a = fitrgam (X, y, "tol", 1e-3) 501s ***** demo 501s ## Declare two different functions 501s f1 = @(x) cos (3 * x); 501s f2 = @(x) x .^ 3; 501s 501s ## Generate 80 samples for f1 and f2 501s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 501s X1 = f1 (x); 501s X2 = f2 (x); 501s 501s ## Create a synthetic response by adding noise 501s rand ("seed", 3); 501s Ytrue = X1 + X2; 501s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 501s 501s ## Assemble predictor data 501s X = [X1, X2]; 501s 501s ## Train the GAM and test on the same data 501s a = fitrgam (X, Y, "order", [5, 5]); 501s [ypred, ySDsd, yInt] = predict (a, X); 501s 501s ## Plot the results 501s figure 501s [sortedY, indY] = sort (Ytrue); 501s plot (sortedY, "r-"); 501s xlim ([0, 80]); 501s hold on 501s plot (ypred(indY), "g+") 501s plot (yInt(indY,1), "k:") 501s plot (yInt(indY,2), "k:") 501s xlabel ("Predictor samples"); 501s ylabel ("Response"); 501s title ("actual vs predicted values for function f1(x) = cos (3x) "); 501s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 501s 501s ## Use 30% Holdout partitioning for training and testing data 501s C = cvpartition (80, "HoldOut", 0.3); 501s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 501s 501s ## Plot the results 501s figure 501s [sortedY, indY] = sort (Ytrue(test(C))); 501s plot (sortedY, 'r-'); 501s xlim ([0, sum(test(C))]); 501s hold on 501s plot (ypred(indY), "g+") 501s plot (yInt(indY,1),'k:') 501s plot (yInt(indY,2),'k:') 501s xlabel ("Predictor samples"); 501s ylabel ("Response"); 501s title ("actual vs predicted values for function f1(x) = cos (3x) "); 501s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 501s ***** test 501s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 501s y = [1; 2; 3; 4]; 501s a = RegressionGAM (x, y); 501s assert ({a.X, a.Y}, {x, y}) 501s assert ({a.BaseModel.Intercept}, {2.5000}) 501s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 501s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 501s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 501s assert ({a.Formula}, {[]}) 501s ***** test 501s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 501s y = [1; 2; 3; 4]; 501s pnames = {"A", "B", "C", "D"}; 501s formula = "Y ~ A + B + C + D + A:C"; 501s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 501s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 501s assert ({a.IntMatrix}, {intMat}) 501s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 501s assert ({a.Formula}, {formula}) 501s ***** error RegressionGAM () 501s ***** error RegressionGAM (ones(10,2)) 501s ***** error ... 501s RegressionGAM (ones(10,2), ones (5,1)) 501s ***** error ... 501s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 501s ***** error ... 501s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 501s ***** error 501s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 501s ***** error 501s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 501s ***** error ... 501s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 501s ***** error ... 501s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 501s ***** error ... 501s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 502s ***** error ... 502s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 502s ***** error ... 502s predict (RegressionGAM (ones(10,1), ones(10,1))) 502s ***** error ... 502s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 502s ***** error ... 502s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 502s 39 tests, 39 passed, 0 known failure, 0 skipped 502s [inst/cluster.m] 502s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cluster.m 502s ***** error cluster () 502s ***** error cluster ([1 1], "Cutoff", 1) 502s ***** error cluster ([1 2 1], "Bogus", 1) 502s ***** error cluster ([1 2 1], "Cutoff", -1) 502s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 502s ***** test 502s 6 tests, 6 passed, 0 known failure, 0 skipped 502s [inst/hotelling_t2test.m] 502s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hotelling_t2test.m 502s ***** error hotelling_t2test (); 502s ***** error ... 502s hotelling_t2test (1); 502s ***** error ... 502s hotelling_t2test (ones(2,2,2)); 502s ***** error ... 502s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 502s ***** error ... 502s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 502s ***** error ... 502s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 502s ***** error ... 502s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 502s ***** error ... 502s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 502s ***** error ... 502s hotelling_t2test (ones(20,1), [0, 0]); 502s ***** error ... 502s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 502s ***** error ... 502s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 502s ***** test 502s randn ("seed", 1); 502s x = randn (50000, 5); 502s [h, pval, stats] = hotelling_t2test (x); 502s assert (h, 0); 502s assert (stats.df1, 5); 502s assert (stats.df2, 49995); 502s ***** test 502s randn ("seed", 1); 502s x = randn (50000, 5); 502s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 502s assert (h, 1); 502s assert (stats.df1, 5); 502s assert (stats.df2, 49995); 502s 13 tests, 13 passed, 0 known failure, 0 skipped 502s [inst/signtest.m] 502s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/signtest.m 502s ***** test 502s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 502s assert (pval, 1.091701889420221e-218, 1e-14); 502s assert (h, 1); 502s assert (stats.zval, -31.5437631079266, 1e-14); 502s ***** test 502s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 502s assert (pval, 0.6875000000000006, 1e-14); 502s assert (h, 0); 502s assert (stats.zval, NaN); 502s assert (stats.sign, 4); 502s ***** test 502s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 502s assert (pval, 0.6830913983096086, 1e-14); 502s assert (h, 0); 502s assert (stats.zval, 0.4082482904638631, 1e-14); 502s assert (stats.sign, 4); 502s ***** error signtest (ones (2)) 502s ***** error ... 502s signtest ([1, 2, 3, 4], ones (2)) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [1, 2, 3]) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'tail') 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'alpha', 0) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'alpha', "a") 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'tail', "some") 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'method', 0.01) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'method', "some") 502s ***** error ... 502s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 502s 20 tests, 20 passed, 0 known failure, 0 skipped 502s [inst/randsample.m] 502s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/randsample.m 502s ***** test 502s n = 20; 502s k = 5; 502s x = randsample(n, k); 502s assert (size(x), [1 k]); 502s x = randsample(n, k, true); 502s assert (size(x), [1 k]); 502s x = randsample(n, k, false); 502s assert (size(x), [1 k]); 502s x = randsample(n, k, true, ones(n, 1)); 502s assert (size(x), [1 k]); 502s x = randsample(1:n, k); 502s assert (size(x), [1 k]); 502s x = randsample(1:n, k, true); 502s assert (size(x), [1 k]); 502s x = randsample(1:n, k, false); 502s assert (size(x), [1 k]); 502s x = randsample(1:n, k, true, ones(n, 1)); 502s assert (size(x), [1 k]); 502s x = randsample((1:n)', k); 502s assert (size(x), [k 1]); 502s x = randsample((1:n)', k, true); 502s assert (size(x), [k 1]); 502s x = randsample((1:n)', k, false); 502s assert (size(x), [k 1]); 502s x = randsample((1:n)', k, true, ones(n, 1)); 502s assert (size(x), [k 1]); 502s n = 10; 502s k = 100; 502s x = randsample(n, k, true, 1:n); 502s assert (size(x), [1 k]); 502s x = randsample((1:n)', k, true); 502s assert (size(x), [k 1]); 502s x = randsample(k, k, false, 1:k); 502s assert (size(x), [1 k]); 502s 1 test, 1 passed, 0 known failure, 0 skipped 502s [inst/boxplot.m] 502s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/boxplot.m 502s ***** demo 502s axis ([0, 3]); 502s randn ("seed", 1); # for reproducibility 502s girls = randn (10, 1) * 5 + 140; 502s randn ("seed", 2); # for reproducibility 502s boys = randn (13, 1) * 8 + 135; 502s boxplot ({girls, boys}); 502s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 502s title ("Grade 3 heights"); 502s ***** demo 502s randn ("seed", 7); # for reproducibility 502s A = randn (10, 1) * 5 + 140; 502s randn ("seed", 8); # for reproducibility 502s B = randn (25, 1) * 8 + 135; 502s randn ("seed", 9); # for reproducibility 502s C = randn (20, 1) * 6 + 165; 502s data = [A; B; C]; 502s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 502s labels = {"Team A", "Team B", "Team C"}; 502s pos = [2, 1, 3]; 502s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 502s "OutlierTags", "on", "BoxStyle", "filled"); 502s title ("Example of Group splitting with paired vectors"); 502s ***** demo 502s randn ("seed", 1); # for reproducibility 502s data = randn (100, 9); 502s boxplot (data, "notch", "on", "boxstyle", "filled", ... 502s "colors", "ygcwkmb", "whisker", 1.2); 502s title ("Example of different colors specified with characters"); 502s ***** demo 502s randn ("seed", 5); # for reproducibility 502s data = randn (100, 13); 502s colors = [0.7 0.7 0.7; ... 502s 0.0 0.4 0.9; ... 502s 0.7 0.4 0.3; ... 502s 0.7 0.1 0.7; ... 502s 0.8 0.7 0.4; ... 502s 0.1 0.8 0.5; ... 502s 0.9 0.9 0.2]; 502s boxplot (data, "notch", "on", "boxstyle", "filled", ... 502s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 502s title ("Example of different colors specified as RGB values"); 502s ***** error boxplot ("a") 502s ***** error boxplot ({[1 2 3], "a"}) 502s ***** error boxplot ([1 2 3], 1, {2, 3}) 502s ***** error boxplot ([1 2 3], {"a", "b"}) 502s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 502s ***** error boxplot ([1:10], "notch", i) 502s ***** error boxplot ([1:10], "notch", {}) 502s ***** error boxplot (1, "symbol", 1) 502s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 502s ***** error boxplot (1, "orientation", {}) 502s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 502s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 502s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 502s ***** error boxplot (3, "OutlierTags", {}) 502s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 502s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 502s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 502s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 502s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 502s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 502s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 502s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 502s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 502s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 502s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 502s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 502s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 502s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 502s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 502s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 502s ***** error boxplot (rand (3, 3), [1 2]) 502s ***** test 502s hf = figure ("visible", "off"); 502s unwind_protect 502s [a, b] = boxplot (rand (10, 3)); 502s assert (size (a), [7, 3]); 502s assert (numel (b.box), 3); 502s assert (numel (b.whisker), 12); 502s assert (numel (b.median), 3); 502s unwind_protect_cleanup 502s close (hf); 502s end_unwind_protect 502s ***** test 502s hf = figure ("visible", "off"); 502s unwind_protect 502s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 502s assert (numel (b.box_fill), 3); 502s unwind_protect_cleanup 502s close (hf); 502s end_unwind_protect 503s ***** test 503s hf = figure ("visible", "off"); 503s unwind_protect 503s hold on 503s [a, b] = boxplot (rand (10, 3)); 503s assert (ishold, true); 503s unwind_protect_cleanup 503s close (hf); 503s end_unwind_protect 503s 34 tests, 34 passed, 0 known failure, 0 skipped 503s [inst/anova1.m] 503s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/anova1.m 503s ***** demo 503s x = meshgrid (1:6); 503s randn ("seed", 15); # for reproducibility 503s x = x + normrnd (0, 1, 6, 6); 503s anova1 (x, [], 'off'); 503s ***** demo 503s x = meshgrid (1:6); 503s randn ("seed", 15); # for reproducibility 503s x = x + normrnd (0, 1, 6, 6); 503s [p, atab] = anova1(x); 503s ***** demo 503s x = ones (50, 4) .* [-2, 0, 1, 5]; 503s randn ("seed", 13); # for reproducibility 503s x = x + normrnd (0, 2, 50, 4); 503s groups = {"A", "B", "C", "D"}; 503s anova1 (x, groups); 503s ***** demo 503s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 503s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 503s anova1 (y(:), g(:), "on", "unequal"); 503s ***** test 503s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 503s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 503s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 503s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 503s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 503s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 503s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 503s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 503s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 503s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 503s group = [1:10] .* ones (10,10); 503s group = group(:); 503s [p, tbl] = anova1 (data, group, "off"); 503s assert (p, 0.022661, 1e-6); 503s assert (tbl{2,5}, 2.2969, 1e-4); 503s assert (tbl{2,3}, 9, 0); 503s assert (tbl{4,2}, 0.003903, 1e-6); 503s data = reshape (data, 10, 10); 503s [p, tbl, stats] = anova1 (data, [], "off"); 503s assert (p, 0.022661, 1e-6); 503s assert (tbl{2,5}, 2.2969, 1e-4); 503s assert (tbl{2,3}, 9, 0); 503s assert (tbl{4,2}, 0.003903, 1e-6); 503s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 503s N = 10 * ones (1, 10); 503s assert (stats.means, means, 1e-6); 503s assert (length (stats.gnames), 10, 0); 503s assert (stats.n, N, 0); 503s ***** test 503s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 503s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 503s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 503s assert (p, 0.00004163, 1e-6); 503s assert (tbl{2,5}, 22.573418, 1e-6); 503s assert (tbl{2,3}, 2, 0); 503s assert (tbl{3,3}, 14, 0); 503s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 503s assert (p, 0.00208877, 1e-8); 503s assert (tbl{2,5}, 15.523192, 1e-6); 503s assert (tbl{2,3}, 2, 0); 503s assert (tbl{2,4}, 7.5786897, 1e-6); 503s 2 tests, 2 passed, 0 known failure, 0 skipped 503s [inst/binotest.m] 503s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/binotest.m 503s ***** demo 503s % flip a coin 1000 times, showing 475 heads 503s % Hypothesis: coin is fair, i.e. p=1/2 503s [h,p_val,ci] = binotest(475,1000,0.5) 503s % Result: h = 0 : null hypothesis not rejected, coin could be fair 503s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 503s % 0.444 <= p <= 0.506 with 95% confidence 503s ***** demo 503s % flip a coin 100 times, showing 65 heads 503s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 503s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 503s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 503s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 503s % 0 <= p <= 0.76 with 99% confidence 503s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 503s [h,p_val,ci] = binotest (51,235,1/6); 503s assert (p_val, 0.0437, 0.00005) 503s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 503s assert (p_val, 0.027, 0.0005) 503s 1 test, 1 passed, 0 known failure, 0 skipped 503s [inst/pdist.m] 503s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/pdist.m 503s ***** shared xy, t, eucl, x 503s xy = [0 1; 0 2; 7 6; 5 6]; 503s t = 1e-3; 503s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 503s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 503s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 503s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 503s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 503s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 503s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 503s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 503s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 503s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 503s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 503s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 503s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 503s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 503s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 503s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 503s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 503s ***** assert (pdist (x, "euclidean"), ... 503s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 503s ***** assert (pdist (x, eucl), ... 503s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 503s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 503s ***** assert (pdist (x, "seuclidean"), ... 503s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 503s ***** warning ... 503s pdist (x, "mahalanobis"); 503s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 503s ***** assert (pdist (x, "minkowski"), ... 503s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 503s ***** assert (pdist (x, "minkowski", 3), ... 503s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 503s ***** assert (pdist (x, "cosine"), ... 503s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 503s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 503s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 503s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 503s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 503s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 503s 29 tests, 29 passed, 0 known failure, 0 skipped 503s [inst/pca.m] 503s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/pca.m 503s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 503s ***** test 503s x=[7 4 3 503s 4 1 8 503s 6 3 5 503s 8 6 1 503s 8 5 7 503s 7 2 9 503s 5 3 3 503s 9 5 8 503s 7 4 5 503s 8 2 2]; 503s R = corrcoef (x); 503s [V, lambda] = eig (R); 503s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 503s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 503s ***** 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 503s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 503s F = zscore(x)*B; 503s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 503s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 503s ***** test 503s x=[1,2,3;2,1,3]'; 503s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 503s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 503s m(:,1) = m(:,1)*sign(COEFF(1,1)); 503s m(:,2) = m(:,2)*sign(COEFF(1,2)); 503s ***** assert(COEFF,m(1:2,:),10*eps); 503s ***** assert(SCORE,-m,10*eps); 503s ***** assert(latent,[1.5;.5],10*eps); 503s ***** assert(tsquare,[4;4;4]/3,10*eps); 503s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 503s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 503s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 503s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 503s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 503s !!!!! known failure 503s ASSERT errors for: assert (tsquare,([1.5; 0.5; 1.5]),10 * eps) 503s 503s Location | Observed | Expected | Reason 503s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 503s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 503s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 503s ***** test 503s x=x'; 503s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 503s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 503s m(:,1) = m(:,1)*sign(COEFF(1,1)); 503s m(:,2) = m(:,2)*sign(COEFF(1,2)); 503s m(:,3) = m(:,3)*sign(COEFF(3,3)); 503s ***** assert(COEFF,m,10*eps); 503s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 503s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 503s ***** assert(latent,[1;0;0],10*eps); 503s ***** assert(tsquare,[0.5;0.5],10*eps) 503s ***** test 503s [COEFF,SCORE,latent,tsquare] = pca(x); 503s ***** assert(COEFF,m(:, 1),10*eps); 503s ***** assert(SCORE,-m(1:2,1),10*eps); 503s ***** assert(latent,[1],10*eps); 503s ***** assert(tsquare,[0.5;0.5],10*eps) 503s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 503s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 503s ***** error pca([1 2; 3 4], "NumComponents", -4) 503s ***** error pca([1 2; 3 4], "Rows", 1) 503s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 503s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 503s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 503s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 503s ***** error pca([1 2; 3 4], "XXX", 1) 503s 32 tests, 31 passed, 1 known failure, 0 skipped 503s [inst/rangesearch.m] 503s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/rangesearch.m 503s ***** demo 503s ## Generate 1000 random 2D points from each of five distinct multivariate 503s ## normal distributions that form five separate classes 503s N = 1000; 503s d = 10; 503s randn ("seed", 5); 503s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 503s randn ("seed", 6); 503s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 503s randn ("seed", 7); 503s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 503s randn ("seed", 8); 503s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 503s randn ("seed", 8); 503s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 503s X = [X1; X2; X3; X4; X5]; 503s 503s ## For each point in X, find the points in X that are within a radius d 503s ## away from the points in X. 503s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 503s 503s ## Select the first point in X (corresponding to the first class) and find 503s ## its nearest neighbors within the radius d. Display these points in 503s ## one color and the remaining points in a different color. 503s x = X(1,:); 503s nearestPoints = X (Idx{1},:); 503s nonNearestIdx = true (size (X, 1), 1); 503s nonNearestIdx(Idx{1}) = false; 503s 503s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 503s hold on 503s scatter (nearestPoints(:,1),nearestPoints(:,2)) 503s scatter (x(1), x(2), "black", "filled") 503s hold off 503s 503s ## Select the last point in X (corresponding to the fifth class) and find 503s ## its nearest neighbors within the radius d. Display these points in 503s ## one color and the remaining points in a different color. 503s x = X(end,:); 503s nearestPoints = X (Idx{1},:); 503s nonNearestIdx = true (size (X, 1), 1); 503s nonNearestIdx(Idx{1}) = false; 503s 503s figure 503s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 503s hold on 503s scatter (nearestPoints(:,1),nearestPoints(:,2)) 503s scatter (x(1), x(2), "black", "filled") 503s hold off 503s ***** shared x, y, X, Y 503s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 503s y = [2, 3, 4; 1, 4, 3]; 503s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 503s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 503s ***** test 503s [idx, D] = rangesearch (x, y, 4); 503s assert (idx, {[1; 4; 2]; [1; 4]}); 503s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 503s assert (idx, {[1, 4, 2]; [1, 4]}); 503s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 503s assert (idx, {[1; 4; 2]; [1; 4]}); 503s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 503s assert (idx, {[1; 4; 2]; [1; 4]}); 503s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 503s assert (idx, {[1; 2; 4]; [1; 4]}); 503s assert (D, {[1.7321; 3.4641; 3.3166]; [2; 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 503s "SortIndices", false); 503s assert (idx, {[1, 2, 4]; [1, 4]}); 503s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 503s ***** test 503s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 503s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 503s assert (idx, {[1, 4, 2]; [1, 4]}); 503s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 503s ***** test 503s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 503s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 503s "NSMethod", "exhaustive"); 503s assert (idx, {[1, 4, 2]; [1, 4]}); 503s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 503s "NSMethod", "exhaustive"); 503s assert (idx, {[1, 4, 2]; [1, 4]}); 503s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 503s "NSMethod", "exhaustive", "SortIndices", false); 503s assert (idx, {[1, 2, 4]; [1, 4]}); 503s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (X, Y, 4); 503s assert (idx, {[1; 2]; [1; 2; 3]}); 503s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 503s ***** test 503s [idx, D] = rangesearch (X, Y, 2); 503s assert (idx, {[1]; [1; 2]}); 503s assert (D, {[1.4142]; [1.4142; 1.4142]}, 1e-4); 503s ***** test 503s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 503s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 503s assert (idx, {[1, 2]; [1, 2, 3]}); 503s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 504s ***** test 504s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 504s assert (idx, {[1; 2]; [1; 2; 3]}); 504s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 504s ***** test 504s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 504s "NSMethod", "exhaustive"); 504s assert (idx, {[1, 2]; [1, 2, 3]}); 504s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 504s ***** error rangesearch (1) 504s ***** error rangesearch (ones (4, 5)) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (4)) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (4), 1) 504s ***** error ... 504s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "P", -2) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 504s ***** error ... 504s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 504s 33 tests, 33 passed, 0 known failure, 0 skipped 504s [inst/qqplot.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/qqplot.m 504s ***** test 504s hf = figure ("visible", "off"); 504s unwind_protect 504s 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]); 504s unwind_protect_cleanup 504s close (hf); 504s end_unwind_protect 504s ***** error qqplot () 504s ***** error qqplot ({1}) 504s ***** error qqplot (ones (2,2)) 504s ***** error qqplot (1, "foobar") 504s ***** error qqplot ([1 2 3], "foobar") 504s 6 tests, 6 passed, 0 known failure, 0 skipped 504s [inst/princomp.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/princomp.m 504s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 504s ***** test 504s x=[7 4 3 504s 4 1 8 504s 6 3 5 504s 8 6 1 504s 8 5 7 504s 7 2 9 504s 5 3 3 504s 9 5 8 504s 7 4 5 504s 8 2 2]; 504s R = corrcoef (x); 504s [V, lambda] = eig (R); 504s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 504s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 504s ## contribution of first 2 PCs to each original variable 504s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 504s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 504s F = zscore(x)*B; 504s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 504s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 504s ***** test 504s x=[1,2,3;2,1,3]'; 504s [COEFF,SCORE,latent,tsquare] = princomp(x); 504s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 504s m(:,1) = m(:,1)*sign(COEFF(1,1)); 504s m(:,2) = m(:,2)*sign(COEFF(1,2)); 504s ***** assert(COEFF,m(1:2,:),10*eps); 504s ***** assert(SCORE,-m,10*eps); 504s ***** assert(latent,[1.5;.5],10*eps); 504s ***** assert(tsquare,[4;4;4]/3,10*eps); 504s ***** test 504s x=x'; 504s [COEFF,SCORE,latent,tsquare] = princomp(x); 504s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 504s m(:,1) = m(:,1)*sign(COEFF(1,1)); 504s m(:,2) = m(:,2)*sign(COEFF(1,2)); 504s m(:,3) = m(:,3)*sign(COEFF(3,3)); 504s ***** assert(COEFF,m,10*eps); 504s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 504s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 504s ***** assert(latent,[1;0;0],10*eps); 504s ***** assert(tsquare,[0.5;0.5],10*eps) 504s ***** test 504s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 504s ***** assert(COEFF,m(:, 1),10*eps); 504s ***** assert(SCORE,-m(1:2,1),10*eps); 504s ***** assert(latent,[1],10*eps); 504s ***** assert(tsquare,[0.5;0.5],10*eps) 504s 19 tests, 19 passed, 0 known failure, 0 skipped 504s [inst/ismissing.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ismissing.m 504s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 504s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 504s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 504s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 504s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 504s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 504s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 504s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 504s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 504s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 504s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 504s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 504s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 504s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 504s ***** assert (ismissing (double (NaN)), true) 504s ***** assert (ismissing (single (NaN)), true) 504s ***** assert (ismissing (' '), true) 504s ***** assert (ismissing ({''}), true) 504s ***** assert (ismissing ({' '}), false) 504s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 504s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 504s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 504s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 504s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 504s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 504s ***** assert (ismissing ({'123', '', 123}), [false false false]) 504s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 504s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 504s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 504s ***** assert (ismissing ({1, 2, 3}), [false false false]) 504s ***** assert (ismissing ([struct struct struct]), [false false false]) 504s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 504s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 504s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 504s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 504s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 504s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 504s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 504s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 504s ***** assert (ismissing ([]), logical([])) 504s ***** assert (ismissing (''), logical([])) 504s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 504s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 504s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 504s ***** error ismissing () 504s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 504s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 504s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 504s ***** error ismissing (struct, 1) 504s 49 tests, 49 passed, 0 known failure, 0 skipped 504s [inst/clusterdata.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/clusterdata.m 504s ***** demo 504s randn ("seed", 1) # for reproducibility 504s r1 = randn (10, 2) * 0.25 + 1; 504s randn ("seed", 5) # for reproducibility 504s r2 = randn (20, 2) * 0.5 - 1; 504s X = [r1; r2]; 504s 504s wnl = warning ("off", "Octave:linkage_savemem", "local"); 504s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 504s scatter (X(:,1), X(:,2), 36, T, "filled"); 504s ***** error ... 504s clusterdata () 504s ***** error ... 504s clusterdata (1) 504s ***** error clusterdata ([1 1], "Bogus", 1) 504s ***** error clusterdata ([1 1], "Depth", 1) 504s 4 tests, 4 passed, 0 known failure, 0 skipped 504s [inst/inconsistent.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/inconsistent.m 504s ***** error inconsistent () 504s ***** error inconsistent ([1 2 1], 2, 3) 504s ***** error inconsistent (ones (2, 2)) 504s ***** error inconsistent ([1 2 1], -1) 504s ***** error inconsistent ([1 2 1], 1.3) 504s ***** error inconsistent ([1 2 1], [1 1]) 504s ***** error inconsistent (ones (2, 3)) 504s ***** test 504s load fisheriris; 504s Z = linkage(meas, 'average', 'chebychev'); 504s assert (cond (inconsistent (Z)), 39.9, 1e-3); 504s 8 tests, 8 passed, 0 known failure, 0 skipped 504s [inst/nansum.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/nansum.m 504s ***** demo 504s ## Find the column sums for a matrix with missing values., 504s 504s x = magic (3); 504s x([1, 4, 7:9]) = NaN 504s s = nansum (x) 504s ***** demo 504s ## Find the row sums for a matrix with missing values., 504s 504s x = magic (3); 504s x([1, 4, 7:9]) = NaN 504s s = nansum (x, 2) 504s ***** demo 504s ## Find the sum of all the values in a multidimensional array 504s ## with missing values. 504s 504s x = reshape (1:30, [2, 5, 3]); 504s x([10:12, 25]) = NaN 504s s = nansum (x, "all") 504s ***** demo 504s ## Find the sum of a multidimensional array with missing values over 504s ## multiple dimensions. 504s 504s x = reshape (1:30, [2, 5, 3]); 504s x([10:12, 25]) = NaN 504s s = nansum (x, [2, 3]) 504s ***** assert (nansum ([]), 0) 504s ***** assert (nansum (NaN), 0) 504s ***** assert (nansum (NaN(3)), [0, 0, 0]) 504s ***** assert (nansum ([2 4 NaN 7]), 13) 504s ***** assert (nansum ([2 4 NaN Inf]), Inf) 504s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 504s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 504s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 504s ***** test 504s x = magic(3); 504s x([1 6:9]) = NaN; 504s assert (nansum (x), [7, 6, 0]) 504s assert (nansum (x, 2), [1; 8; 4]) 504s ***** test 504s x = reshape(1:24, [2, 4, 3]); 504s x([5:6, 20]) = NaN; 504s assert (nansum (x, "all"), 269) 504s ***** test 504s x = reshape(1:24,[2, 4, 3]); 504s x([5:6, 20]) = NaN; 504s assert (squeeze (nansum (x, [1, 2])), [25; 100; 144]) 504s assert (nansum (x, [2, 3]), [139; 130]) 504s ***** error nansum ({3}) 504s ***** error nansum (ones (3), 0) 504s ***** error nansum (ones (3), 1.5) 504s ***** error nansum (ones (3), 1.5) 504s ***** error ... 504s nansum (ones (3, 3, 3), [2, 2.5]) 504s ***** error ... 504s nansum (ones (3, 3, 3), [-1, 2]) 504s ***** error ... 504s nansum (ones (3, 3, 3), [2, 2, 3]) 504s 18 tests, 18 passed, 0 known failure, 0 skipped 504s [inst/regression_ftest.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/regression_ftest.m 504s ***** error regression_ftest (); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 504s ***** error ... 504s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 504s ***** error ... 504s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 504s 18 tests, 18 passed, 0 known failure, 0 skipped 504s [inst/cholcov.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cholcov.m 504s ***** demo 504s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 504s T = cholcov (C1) 504s C2 = T'*T 504s ***** test 504s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 504s T = cholcov (C1); 504s assert (C1, T'*T, 1e-15 * ones (size (C1))); 504s 1 test, 1 passed, 0 known failure, 0 skipped 504s [inst/dist_obj/PiecewiseLinearDistribution.m] 504s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/PiecewiseLinearDistribution.m 504s ***** demo 504s ## Generate a data set of 5000 random samples from a Beta distribution with 504s ## parameters a = 2 and b = 5 scaled to [0,10]. 504s ## Compute empirical CDF, subsample, create PiecewiseLinearDistribution, 504s ## and plot the PDF superimposed on a histogram of the data. 504s 504s randg ("seed", 2); 504s data = betarnd (2, 5, 5000, 1) * 10; 504s [f, x] = ecdf (data); 504s f = f(1:5:end); 504s x = x(1:5:end); 504s pd = PiecewiseLinearDistribution (x, f); 504s [counts, centers] = hist (data, 50); 504s bin_width = centers(2) - centers(1); 504s bar (centers, counts / (sum (counts) * bin_width), 1); 504s hold on 504s vals = min (data):0.1:max (data); 504s y = pdf (pd, vals); 504s plot (vals, y, "-r", "LineWidth", 2) 504s hold off 504s title ("Piecewise Linear approximation to scaled Beta(2,5) data") 504s legend ("Histogram", "Piecewise PDF") 504s ***** shared pd, t 504s load patients 504s [f, x] = ecdf (Weight); 504s f = f(1:5:end); 504s x = x(1:5:end); 504s pd = PiecewiseLinearDistribution (x, f); 504s t = truncate (pd, 130, 180); 504s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 504s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 504s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 504s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 504s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 504s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 504s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 504s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 504s ***** assert (iqr (pd), 50.0833, 1e-4); 504s ***** assert (iqr (t), 36.8077, 1e-4); 504s ***** assert (mean (pd), 153.61, 1e-10); 504s ***** assert (mean (t), 152.311, 1e-3); 512s ***** assert (median (pd), 142, 1e-10); 512s ***** assert (median (t), 141.9462, 1e-4); 512s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0004], 6e-3); 512s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 512s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 512s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 512s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 512s ***** assert (any (random (t, 1000, 1) < 130), false); 512s ***** assert (any (random (t, 1000, 1) > 180), false); 512s ***** assert (std (pd), 26.5196, 1e-4); 512s ***** assert (std (t), 18.2941, 1e-4); 526s ***** assert (var (pd), 703.2879, 1e-4); 526s ***** assert (var (t), 334.6757, 1e-4); 541s ***** error ... 541s PiecewiseLinearDistribution ([0, i], [0, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 1], [0, i]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0], [1]) 541s ***** error ... 541s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 541s ***** error ... 541s cdf (PiecewiseLinearDistribution, 2, "uper") 541s ***** error ... 541s cdf (PiecewiseLinearDistribution, 2, 3) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Parent") 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "PlotType", 12) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Discrete", {true}) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Parent", 12) 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "Parent", "hax") 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 541s ***** error ... 541s plot (PiecewiseLinearDistribution, "PlotType", "probability") 541s ***** error ... 541s truncate (PiecewiseLinearDistribution) 541s ***** error ... 541s truncate (PiecewiseLinearDistribution, 2) 541s ***** error ... 541s truncate (PiecewiseLinearDistribution, 4, 2) 541s ***** shared pd 541s pd = PiecewiseLinearDistribution (); 541s pd(2) = PiecewiseLinearDistribution (); 541s ***** error cdf (pd, 1) 541s ***** error icdf (pd, 0.5) 541s ***** error iqr (pd) 541s ***** error mean (pd) 541s ***** error median (pd) 541s ***** error pdf (pd, 1) 541s ***** error plot (pd) 541s ***** error random (pd) 541s ***** error std (pd) 541s ***** error ... 541s truncate (pd, 2, 4) 541s ***** error var (pd) 541s 63 tests, 63 passed, 0 known failure, 0 skipped 541s [inst/dist_obj/InverseGaussianDistribution.m] 541s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/InverseGaussianDistribution.m 541s ***** shared pd, t 541s pd = InverseGaussianDistribution (1, 1); 541s t = truncate (pd, 2, 4); 541s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 541s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 541s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 541s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 541s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 541s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 541s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 541s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 541s ***** assert (iqr (pd), 0.8643, 1e-4); 541s ***** assert (iqr (t), 0.8222, 1e-4); 541s ***** assert (mean (pd), 1); 541s ***** assert (mean (t), 2.6953, 1e-4); 541s ***** assert (median (pd), 0.6758, 1e-4); 541s ***** assert (median (t), 2.5716, 1e-4); 541s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 541s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 541s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 541s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 541s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 541s ***** assert (any (random (t, 1000, 1) < 2), false); 541s ***** assert (any (random (t, 1000, 1) > 4), false); 541s ***** assert (std (pd), 1); 541s ***** assert (std (t), 0.5332, 1e-4); 541s ***** assert (var (pd), 1); 541s ***** assert (var (t), 0.2843, 1e-4); 541s ***** error ... 541s InverseGaussianDistribution(0, 1) 541s ***** error ... 541s InverseGaussianDistribution(Inf, 1) 541s ***** error ... 541s InverseGaussianDistribution(i, 1) 541s ***** error ... 541s InverseGaussianDistribution("a", 1) 541s ***** error ... 541s InverseGaussianDistribution([1, 2], 1) 541s ***** error ... 541s InverseGaussianDistribution(NaN, 1) 541s ***** error ... 541s InverseGaussianDistribution(1, 0) 541s ***** error ... 541s InverseGaussianDistribution(1, -1) 541s ***** error ... 541s InverseGaussianDistribution(1, Inf) 541s ***** error ... 541s InverseGaussianDistribution(1, i) 541s ***** error ... 541s InverseGaussianDistribution(1, "a") 541s ***** error ... 541s InverseGaussianDistribution(1, [1, 2]) 541s ***** error ... 541s InverseGaussianDistribution(1, NaN) 541s ***** error ... 541s cdf (InverseGaussianDistribution, 2, "uper") 541s ***** error ... 541s cdf (InverseGaussianDistribution, 2, 3) 541s ***** shared x 541s x = invgrnd (1, 1, [1, 100]); 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 542s "alpha", {0.05}) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), ... 542s "parameter", {"mu", "lambda", "param"}) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 542s "parameter", {"mu", "lambda", "param"}) 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 542s "parameter", "param") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 542s ***** error ... 542s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 542s "parameter", "mu", "NAME", "value") 542s ***** error ... 542s plot (InverseGaussianDistribution, "Parent") 542s ***** error ... 542s plot (InverseGaussianDistribution, "PlotType", 12) 542s ***** error ... 542s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 542s ***** error ... 542s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 542s ***** error ... 542s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 542s ***** error ... 542s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 542s ***** error ... 542s plot (InverseGaussianDistribution, "Discrete", {true}) 542s ***** error ... 542s plot (InverseGaussianDistribution, "Parent", 12) 542s ***** error ... 542s plot (InverseGaussianDistribution, "Parent", "hax") 542s ***** error ... 542s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 542s ***** error ... 542s plot (InverseGaussianDistribution, "PlotType", "probability") 542s ***** error ... 542s proflik (InverseGaussianDistribution, 2) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 3) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), {1}) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 542s ***** error ... 542s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 542s ***** error ... 542s truncate (InverseGaussianDistribution) 542s ***** error ... 542s truncate (InverseGaussianDistribution, 2) 542s ***** error ... 542s truncate (InverseGaussianDistribution, 4, 2) 542s ***** shared pd 542s pd = InverseGaussianDistribution(1, 1); 542s pd(2) = InverseGaussianDistribution(1, 3); 542s ***** error cdf (pd, 1) 542s ***** error icdf (pd, 0.5) 542s ***** error iqr (pd) 542s ***** error mean (pd) 542s ***** error median (pd) 542s ***** error negloglik (pd) 542s ***** error paramci (pd) 542s ***** error pdf (pd, 1) 542s ***** error plot (pd) 542s ***** error proflik (pd, 2) 542s ***** error random (pd) 542s ***** error std (pd) 542s ***** error ... 542s truncate (pd, 2, 4) 542s ***** error var (pd) 542s 96 tests, 96 passed, 0 known failure, 0 skipped 542s [inst/dist_obj/BinomialDistribution.m] 542s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/BinomialDistribution.m 542s ***** shared pd, t, t_inf 542s pd = BinomialDistribution (5, 0.5); 542s t = truncate (pd, 2, 4); 542s t_inf = truncate (pd, 2, Inf); 542s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 542s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 542s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 542s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 542s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 542s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 542s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 542s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 542s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 542s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 542s ***** assert (iqr (pd), 1); 542s ***** assert (iqr (t), 1); 542s ***** assert (mean (pd), 2.5, 1e-10); 542s ***** assert (mean (t), 2.8, 1e-10); 542s ***** assert (mean (t_inf), 2.8846, 1e-4); 542s ***** assert (median (pd), 2.5); 542s ***** assert (median (t), 3); 542s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 542s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 542s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 542s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 542s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 542s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 542s ***** assert (any (random (t, 1000, 1) < 2), false); 542s ***** assert (any (random (t, 1000, 1) > 4), false); 542s ***** assert (std (pd), 1.1180, 1e-4); 542s ***** assert (std (t), 0.7483, 1e-4); 542s ***** assert (std (t_inf), 0.8470, 1e-4); 542s ***** assert (var (pd), 1.2500, 1e-4); 542s ***** assert (var (t), 0.5600, 1e-4); 542s ***** assert (var (t_inf), 0.7175, 1e-4); 542s ***** error ... 542s BinomialDistribution(Inf, 0.5) 542s ***** error ... 542s BinomialDistribution(i, 0.5) 542s ***** error ... 542s BinomialDistribution("a", 0.5) 543s ***** error ... 543s BinomialDistribution([1, 2], 0.5) 543s ***** error ... 543s BinomialDistribution(NaN, 0.5) 543s ***** error ... 543s BinomialDistribution(1, 1.01) 543s ***** error ... 543s BinomialDistribution(1, -0.01) 543s ***** error ... 543s BinomialDistribution(1, Inf) 543s ***** error ... 543s BinomialDistribution(1, i) 543s ***** error ... 543s BinomialDistribution(1, "a") 543s ***** error ... 543s BinomialDistribution(1, [1, 2]) 543s ***** error ... 543s BinomialDistribution(1, NaN) 543s ***** error ... 543s cdf (BinomialDistribution, 2, "uper") 543s ***** error ... 543s cdf (BinomialDistribution, 2, 3) 543s ***** shared x 543s rand ("seed", 2); 543s x = binornd (5, 0.5, [1, 100]); 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 543s "alpha", {0.05}) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), ... 543s "parameter", {"N", "p", "param"}) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 543s "parameter", {"N", "p", "param"}) 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 543s "parameter", "param") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 543s "NAME", "value") 543s ***** error ... 543s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 543s "parameter", "p", "NAME", "value") 543s ***** error ... 543s plot (BinomialDistribution, "Parent") 543s ***** error ... 543s plot (BinomialDistribution, "PlotType", 12) 543s ***** error ... 543s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 543s ***** error ... 543s plot (BinomialDistribution, "PlotType", "pdfcdf") 543s ***** error ... 543s plot (BinomialDistribution, "Discrete", "pdfcdf") 543s ***** error ... 543s plot (BinomialDistribution, "Discrete", [1, 0]) 543s ***** error ... 543s plot (BinomialDistribution, "Discrete", {true}) 543s ***** error ... 543s plot (BinomialDistribution, "Parent", 12) 543s ***** error ... 543s plot (BinomialDistribution, "Parent", "hax") 543s ***** error ... 543s plot (BinomialDistribution, "invalidNAME", "pdf") 543s ***** error ... 543s plot (BinomialDistribution, "PlotType", "probability") 543s ***** error ... 543s proflik (BinomialDistribution, 2) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 3) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), {1}) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 543s ***** error ... 543s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 543s ***** error ... 543s truncate (BinomialDistribution) 543s ***** error ... 543s truncate (BinomialDistribution, 2) 543s ***** error ... 543s truncate (BinomialDistribution, 4, 2) 543s ***** shared pd 543s pd = BinomialDistribution(1, 0.5); 543s pd(2) = BinomialDistribution(1, 0.6); 543s ***** error cdf (pd, 1) 543s ***** error icdf (pd, 0.5) 543s ***** error iqr (pd) 543s ***** error mean (pd) 543s ***** error median (pd) 543s ***** error negloglik (pd) 543s ***** error paramci (pd) 543s ***** error pdf (pd, 1) 543s ***** error plot (pd) 543s ***** error proflik (pd, 2) 543s ***** error random (pd) 543s ***** error std (pd) 543s ***** error ... 543s truncate (pd, 2, 4) 543s ***** error var (pd) 543s 102 tests, 102 passed, 0 known failure, 0 skipped 543s [inst/dist_obj/HalfNormalDistribution.m] 543s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/HalfNormalDistribution.m 543s ***** shared pd, t 543s pd = HalfNormalDistribution (0, 1); 543s t = truncate (pd, 2, 4); 543s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 543s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 543s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 543s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 543s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 543s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 543s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 543s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 543s ***** assert (iqr (pd), 0.8317, 1e-4); 543s ***** assert (iqr (t), 0.4111, 1e-4); 543s ***** assert (mean (pd), 0.7979, 1e-4); 543s ***** assert (mean (t), 2.3706, 1e-4); 543s ***** assert (median (pd), 0.6745, 1e-4); 543s ***** assert (median (t), 2.2771, 1e-4); 543s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 543s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 543s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 543s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 543s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 543s ***** assert (any (random (t, 1000, 1) < 2), false); 543s ***** assert (any (random (t, 1000, 1) > 4), false); 543s ***** assert (std (pd), 0.6028, 1e-4); 543s ***** assert (std (t), 0.3310, 1e-4); 543s ***** assert (var (pd), 0.3634, 1e-4); 543s ***** assert (var (t), 0.1096, 1e-4); 543s ***** error ... 543s HalfNormalDistribution(Inf, 1) 543s ***** error ... 543s HalfNormalDistribution(i, 1) 543s ***** error ... 543s HalfNormalDistribution("a", 1) 543s ***** error ... 543s HalfNormalDistribution([1, 2], 1) 543s ***** error ... 543s HalfNormalDistribution(NaN, 1) 543s ***** error ... 543s HalfNormalDistribution(1, 0) 543s ***** error ... 543s HalfNormalDistribution(1, -1) 543s ***** error ... 543s HalfNormalDistribution(1, Inf) 543s ***** error ... 543s HalfNormalDistribution(1, i) 543s ***** error ... 543s HalfNormalDistribution(1, "a") 543s ***** error ... 543s HalfNormalDistribution(1, [1, 2]) 543s ***** error ... 543s HalfNormalDistribution(1, NaN) 543s ***** error ... 543s cdf (HalfNormalDistribution, 2, "uper") 543s ***** error ... 543s cdf (HalfNormalDistribution, 2, 3) 543s ***** shared x 543s x = hnrnd (1, 1, [1, 100]); 543s ***** error ... 543s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 544s "alpha", {0.05}) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), ... 544s "parameter", {"mu", "sigma", "param"}) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 544s "parameter", {"mu", "sigma", "param"}) 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 544s "parameter", "param") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 544s "NAME", "value") 544s ***** error ... 544s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 544s "parameter", "sigma", "NAME", "value") 544s ***** error ... 544s plot (HalfNormalDistribution, "Parent") 544s ***** error ... 544s plot (HalfNormalDistribution, "PlotType", 12) 544s ***** error ... 544s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 544s ***** error ... 544s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 544s ***** error ... 544s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 544s ***** error ... 544s plot (HalfNormalDistribution, "Discrete", [1, 0]) 544s ***** error ... 544s plot (HalfNormalDistribution, "Discrete", {true}) 544s ***** error ... 544s plot (HalfNormalDistribution, "Parent", 12) 544s ***** error ... 544s plot (HalfNormalDistribution, "Parent", "hax") 544s ***** error ... 544s plot (HalfNormalDistribution, "invalidNAME", "pdf") 544s ***** error ... 544s plot (HalfNormalDistribution, "PlotType", "probability") 544s ***** error ... 544s proflik (HalfNormalDistribution, 2) 544s ***** error ... 544s proflik (HalfNormalDistribution.fit (x, 1), 3) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), {1}) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 1) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 545s ***** error ... 545s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 545s "Display", "on") 545s ***** error ... 545s truncate (HalfNormalDistribution) 545s ***** error ... 545s truncate (HalfNormalDistribution, 2) 545s ***** error ... 545s truncate (HalfNormalDistribution, 4, 2) 545s ***** shared pd 545s pd = HalfNormalDistribution(1, 1); 545s pd(2) = HalfNormalDistribution(1, 3); 545s ***** error cdf (pd, 1) 545s ***** error icdf (pd, 0.5) 545s ***** error iqr (pd) 545s ***** error mean (pd) 545s ***** error median (pd) 545s ***** error negloglik (pd) 545s ***** error paramci (pd) 545s ***** error pdf (pd, 1) 545s ***** error plot (pd) 545s ***** error proflik (pd, 2) 545s ***** error random (pd) 545s ***** error std (pd) 545s ***** error ... 545s truncate (pd, 2, 4) 545s ***** error var (pd) 545s 96 tests, 96 passed, 0 known failure, 0 skipped 545s [inst/dist_obj/LoguniformDistribution.m] 545s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/LoguniformDistribution.m 545s ***** demo 545s ## Generate a data set of 5000 random samples from a Log-uniform distribution with 545s ## parameters Lower = 1 and Upper = 10. Plot a PDF of the distribution superimposed 545s ## on a histogram of the data. 545s 545s pd_fixed = makedist ("Loguniform", "Lower", 1, "Upper", 10); 545s rand ("seed", 2); 545s data = random (pd_fixed, 5000, 1); 545s plot (pd_fixed) 545s hold on 545s hist (data, 50) 545s hold off 545s msg = "Log-uniform distribution with Lower = %0.2f and Upper = %0.2f"; 545s title (sprintf (msg, pd_fixed.Lower, pd_fixed.Upper)) 545s ***** shared pd, t 545s pd = LoguniformDistribution (1, 4); 545s t = truncate (pd, 2, 4); 545s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 545s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 545s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 545s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 545s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 546s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 546s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 546s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 546s ***** assert (iqr (pd), 1.4142, 1e-4); 546s ***** assert (iqr (t), 0.9852, 1e-4); 546s ***** assert (mean (pd), 2.1640, 1e-4); 546s ***** assert (mean (t), 2.8854, 1e-4); 546s ***** assert (median (pd), 2); 546s ***** assert (median (t), 2.8284, 1e-4); 546s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 546s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 546s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 546s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 546s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 546s ***** assert (any (random (pd, 1000, 1) < 1), false); 546s ***** assert (any (random (pd, 1000, 1) > 4), false); 546s ***** assert (any (random (t, 1000, 1) < 2), false); 546s ***** assert (any (random (t, 1000, 1) > 4), false); 546s ***** assert (std (pd), 0.8527, 1e-4); 546s ***** assert (std (t), 0.5751, 1e-4); 546s ***** assert (var (pd), 0.7270, 1e-4); 546s ***** assert (var (t), 0.3307, 1e-4); 546s ***** error ... 546s LoguniformDistribution (i, 1) 546s ***** error ... 546s LoguniformDistribution (Inf, 1) 546s ***** error ... 546s LoguniformDistribution ([1, 2], 1) 546s ***** error ... 546s LoguniformDistribution ("a", 1) 546s ***** error ... 546s LoguniformDistribution (NaN, 1) 546s ***** error ... 546s LoguniformDistribution (1, i) 546s ***** error ... 546s LoguniformDistribution (1, Inf) 546s ***** error ... 546s LoguniformDistribution (1, [1, 2]) 546s ***** error ... 546s LoguniformDistribution (1, "a") 546s ***** error ... 546s LoguniformDistribution (1, NaN) 546s ***** error ... 546s LoguniformDistribution (2, 1) 546s ***** error ... 546s cdf (LoguniformDistribution, 2, "uper") 546s ***** error ... 546s cdf (LoguniformDistribution, 2, 3) 546s ***** error ... 546s plot (LoguniformDistribution, "Parent") 546s ***** error ... 546s plot (LoguniformDistribution, "PlotType", 12) 546s ***** error ... 546s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 546s ***** error ... 546s plot (LoguniformDistribution, "PlotType", "pdfcdf") 546s ***** error ... 546s plot (LoguniformDistribution, "Discrete", "pdfcdf") 546s ***** error ... 546s plot (LoguniformDistribution, "Discrete", [1, 0]) 546s ***** error ... 546s plot (LoguniformDistribution, "Discrete", {true}) 546s ***** error ... 546s plot (LoguniformDistribution, "Parent", 12) 546s ***** error ... 546s plot (LoguniformDistribution, "Parent", "hax") 546s ***** error ... 546s plot (LoguniformDistribution, "invalidNAME", "pdf") 546s ***** error ... 546s plot (LoguniformDistribution, "PlotType", "probability") 546s ***** error ... 546s truncate (LoguniformDistribution) 546s ***** error ... 546s truncate (LoguniformDistribution, 2) 546s ***** error ... 546s truncate (LoguniformDistribution, 4, 2) 546s ***** shared pd 546s pd = LoguniformDistribution(1, 4); 546s pd(2) = LoguniformDistribution(2, 5); 546s ***** error cdf (pd, 1) 546s ***** error icdf (pd, 0.5) 546s ***** error iqr (pd) 546s ***** error mean (pd) 546s ***** error median (pd) 546s ***** error pdf (pd, 1) 546s ***** error plot (pd) 546s ***** error random (pd) 546s ***** error std (pd) 546s ***** error ... 546s truncate (pd, 2, 4) 546s ***** error var (pd) 546s 65 tests, 65 passed, 0 known failure, 0 skipped 546s [inst/dist_obj/ExponentialDistribution.m] 546s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/ExponentialDistribution.m 546s ***** shared pd, t 546s pd = ExponentialDistribution (1); 546s t = truncate (pd, 2, 4); 546s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 546s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 546s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 546s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 546s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 546s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 546s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 546s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 546s ***** assert (iqr (pd), 1.0986, 1e-4); 546s ***** assert (iqr (t), 0.8020, 1e-4); 546s ***** assert (mean (pd), 1); 546s ***** assert (mean (t), 2.6870, 1e-4); 546s ***** assert (median (pd), 0.6931, 1e-4); 546s ***** assert (median (t), 2.5662, 1e-4); 546s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 546s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 546s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 546s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 546s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 546s ***** assert (any (random (t, 1000, 1) < 2), false); 546s ***** assert (any (random (t, 1000, 1) > 4), false); 546s ***** assert (std (pd), 1); 546s ***** assert (std (t), 0.5253, 1e-4); 546s ***** assert (var (pd), 1); 546s ***** assert (var (t), 0.2759, 1e-4); 546s ***** error ... 546s ExponentialDistribution(0) 546s ***** error ... 546s ExponentialDistribution(-1) 546s ***** error ... 546s ExponentialDistribution(Inf) 546s ***** error ... 546s ExponentialDistribution(i) 546s ***** error ... 546s ExponentialDistribution("a") 546s ***** error ... 546s ExponentialDistribution([1, 2]) 546s ***** error ... 546s ExponentialDistribution(NaN) 546s ***** error ... 546s cdf (ExponentialDistribution, 2, "uper") 546s ***** error ... 546s cdf (ExponentialDistribution, 2, 3) 546s ***** shared x 546s x = exprnd (1, [100, 1]); 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 0) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 1) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", "") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 546s "alpha", {0.05}) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 546s "parameter", {"mu", "param"}) 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "parameter", "param") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "NAME", "value") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 546s ***** error ... 546s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 546s "parameter", "mu", "NAME", "value") 546s ***** error ... 546s plot (ExponentialDistribution, "Parent") 546s ***** error ... 546s plot (ExponentialDistribution, "PlotType", 12) 546s ***** error ... 546s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 546s ***** error ... 546s plot (ExponentialDistribution, "PlotType", "pdfcdf") 546s ***** error ... 546s plot (ExponentialDistribution, "Discrete", "pdfcdf") 546s ***** error ... 546s plot (ExponentialDistribution, "Discrete", [1, 0]) 546s ***** error ... 546s plot (ExponentialDistribution, "Discrete", {true}) 546s ***** error ... 546s plot (ExponentialDistribution, "Parent", 12) 546s ***** error ... 546s plot (ExponentialDistribution, "Parent", "hax") 546s ***** error ... 546s plot (ExponentialDistribution, "invalidNAME", "pdf") 546s ***** error ... 546s plot (ExponentialDistribution, "PlotType", "probability") 546s ***** error ... 546s proflik (ExponentialDistribution, 2) 546s ***** error ... 546s proflik (ExponentialDistribution.fit (x), 3) 546s ***** error ... 546s proflik (ExponentialDistribution.fit (x), [1, 2]) 546s ***** error ... 546s proflik (ExponentialDistribution.fit (x), {1}) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display") 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 547s ***** error ... 547s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 547s ***** error ... 547s truncate (ExponentialDistribution) 547s ***** error ... 547s truncate (ExponentialDistribution, 2) 547s ***** error ... 547s truncate (ExponentialDistribution, 4, 2) 547s ***** shared pd 547s pd = ExponentialDistribution(1); 547s pd(2) = ExponentialDistribution(3); 547s ***** error cdf (pd, 1) 547s ***** error icdf (pd, 0.5) 547s ***** error iqr (pd) 547s ***** error mean (pd) 547s ***** error median (pd) 547s ***** error negloglik (pd) 547s ***** error paramci (pd) 547s ***** error pdf (pd, 1) 547s ***** error plot (pd) 547s ***** error proflik (pd, 2) 547s ***** error random (pd) 547s ***** error std (pd) 547s ***** error ... 547s truncate (pd, 2, 4) 547s ***** error var (pd) 547s 90 tests, 90 passed, 0 known failure, 0 skipped 547s [inst/dist_obj/PoissonDistribution.m] 547s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/PoissonDistribution.m 547s ***** demo 547s ## Generate a data set of 5000 random samples from a Poisson distribution with 547s ## parameter lambda = 5. Fit a Poisson distribution to this data and plot 547s ## a PDF of the fitted distribution superimposed on a histogram of the data. 547s 547s pd_fixed = makedist ("Poisson", "lambda", 5) 547s rand ("seed", 2); 547s data = random (pd_fixed, 5000, 1); 547s pd_fitted = fitdist (data, "Poisson") 547s plot (pd_fitted) 547s msg = "Fitted Poisson distribution with lambda = %0.2f"; 547s title (sprintf (msg, pd_fitted.lambda)) 547s ***** shared pd, t, t_inf 547s pd = PoissonDistribution; 547s t = truncate (pd, 2, 4); 547s t_inf = truncate (pd, 2, Inf); 547s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 547s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 547s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 547s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 547s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 547s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 547s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 547s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 547s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 547s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 547s ***** assert (iqr (pd), 2); 547s ***** assert (iqr (t), 1); 547s ***** assert (mean (pd), 1); 547s ***** assert (mean (t), 2.3529, 1e-4); 547s ***** assert (mean (t_inf), 2.3922, 1e-4); 547s ***** assert (median (pd), 1); 547s ***** assert (median (t), 2); 547s ***** assert (median (t_inf), 2); 547s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 547s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 547s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 547s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 547s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 547s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 547s ***** assert (any (random (t, 1000, 1) < 2), false); 547s ***** assert (any (random (t, 1000, 1) > 4), false); 547s ***** assert (std (pd), 1); 547s ***** assert (std (t), 0.5882, 1e-4); 547s ***** assert (std (t_inf), 0.6738, 1e-4); 547s ***** assert (var (pd), 1); 547s ***** assert (var (t), 0.3460, 1e-4); 547s ***** assert (var (t_inf), 0.4540, 1e-4); 547s ***** error ... 547s PoissonDistribution(0) 547s ***** error ... 547s PoissonDistribution(-1) 547s ***** error ... 547s PoissonDistribution(Inf) 547s ***** error ... 547s PoissonDistribution(i) 547s ***** error ... 547s PoissonDistribution("a") 547s ***** error ... 547s PoissonDistribution([1, 2]) 547s ***** error ... 547s PoissonDistribution(NaN) 547s ***** error ... 547s cdf (PoissonDistribution, 2, "uper") 547s ***** error ... 547s cdf (PoissonDistribution, 2, 3) 547s ***** shared x 547s x = poissrnd (1, [1, 100]); 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 0) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 1) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", "") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 547s "parameter", {"lambda", "param"}) 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "parameter", "param") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "NAME", "value") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 547s ***** error ... 547s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 547s "parameter", "lambda", "NAME", "value") 547s ***** error ... 547s plot (PoissonDistribution, "Parent") 547s ***** error ... 547s plot (PoissonDistribution, "PlotType", 12) 547s ***** error ... 547s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 547s ***** error ... 547s plot (PoissonDistribution, "PlotType", "pdfcdf") 547s ***** error ... 547s plot (PoissonDistribution, "Discrete", "pdfcdf") 547s ***** error ... 547s plot (PoissonDistribution, "Discrete", [1, 0]) 547s ***** error ... 547s plot (PoissonDistribution, "Discrete", {true}) 547s ***** error ... 547s plot (PoissonDistribution, "Parent", 12) 547s ***** error ... 547s plot (PoissonDistribution, "Parent", "hax") 547s ***** error ... 547s plot (PoissonDistribution, "invalidNAME", "pdf") 547s ***** error ... 547s plot (PoissonDistribution, "PlotType", "probability") 547s ***** error ... 547s proflik (PoissonDistribution, 2) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 3) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), [1, 2]) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), {1}) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, ones (2)) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display") 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 547s ***** error ... 547s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 547s ***** error ... 547s truncate (PoissonDistribution) 547s ***** error ... 547s truncate (PoissonDistribution, 2) 547s ***** error ... 547s truncate (PoissonDistribution, 4, 2) 547s ***** shared pd 547s pd = PoissonDistribution(1); 547s pd(2) = PoissonDistribution(3); 547s ***** error cdf (pd, 1) 547s ***** error icdf (pd, 0.5) 547s ***** error iqr (pd) 547s ***** error mean (pd) 547s ***** error median (pd) 547s ***** error negloglik (pd) 547s ***** error paramci (pd) 547s ***** error pdf (pd, 1) 547s ***** error plot (pd) 547s ***** error proflik (pd, 2) 547s ***** error random (pd) 547s ***** error std (pd) 547s ***** error ... 547s truncate (pd, 2, 4) 547s ***** error var (pd) 547s 97 tests, 97 passed, 0 known failure, 0 skipped 547s [inst/dist_obj/LoglogisticDistribution.m] 547s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/LoglogisticDistribution.m 547s ***** demo 547s ## Generate a data set of 5000 random samples from a Log-logistic 547s ## distribution with parameters mu = 0 and sigma = 1. Fit a Log-logistic 547s ## distribution to this data and plot a PDF of the fitted distribution 547s ## superimposed on a histogram of the data. 547s 547s pd_fixed = makedist ("Loglogistic", "mu", 0, "sigma", 1) 547s rand ("seed", 2); 547s data = random (pd_fixed, 5000, 1); 547s pd_fitted = fitdist (data, "Loglogistic") 547s plot (pd_fitted) 547s msg = "Fitted Log-logistic distribution with mu = %0.2f and sigma = %0.2f"; 547s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 547s ***** shared pd, t 547s pd = LoglogisticDistribution; 547s t = truncate (pd, 2, 4); 547s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 547s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 547s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 547s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 547s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 547s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 547s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 547s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 547s ***** assert (iqr (pd), 2.6667, 1e-4); 547s ***** assert (iqr (t), 0.9524, 1e-4); 547s ***** assert (mean (pd), Inf); 547s ***** assert (mean (t), 2.8312, 1e-4); 547s ***** assert (median (pd), 1, 1e-4); 547s ***** assert (median (t), 2.75, 1e-4); 547s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 547s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 547s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 547s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 547s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 547s ***** assert (any (random (t, 1000, 1) < 2), false); 547s ***** assert (any (random (t, 1000, 1) > 4), false); 547s ***** assert (std (pd), Inf); 547s ***** assert (std (t), 0.5674, 1e-4); 547s ***** assert (var (pd), Inf); 547s ***** assert (var (t), 0.3220, 1e-4); 547s ***** error ... 547s LoglogisticDistribution(Inf, 1) 547s ***** error ... 547s LoglogisticDistribution(i, 1) 547s ***** error ... 547s LoglogisticDistribution("a", 1) 547s ***** error ... 547s LoglogisticDistribution([1, 2], 1) 548s ***** error ... 548s LoglogisticDistribution(NaN, 1) 548s ***** error ... 548s LoglogisticDistribution(1, 0) 548s ***** error ... 548s LoglogisticDistribution(1, -1) 548s ***** error ... 548s LoglogisticDistribution(1, Inf) 548s ***** error ... 548s LoglogisticDistribution(1, i) 548s ***** error ... 548s LoglogisticDistribution(1, "a") 548s ***** error ... 548s LoglogisticDistribution(1, [1, 2]) 548s ***** error ... 548s LoglogisticDistribution(1, NaN) 548s ***** error ... 548s cdf (LoglogisticDistribution, 2, "uper") 548s ***** error ... 548s cdf (LoglogisticDistribution, 2, 3) 548s ***** shared x 548s x = loglrnd (1, 1, [1, 100]); 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", "") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 548s "parameter", {"mu", "sigma", "param"}) 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 548s ***** error ... 548s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 548s "parameter", "mu", "NAME", "value") 549s ***** error ... 549s plot (LoglogisticDistribution, "Parent") 549s ***** error ... 549s plot (LoglogisticDistribution, "PlotType", 12) 549s ***** error ... 549s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 549s ***** error ... 549s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 549s ***** error ... 549s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 549s ***** error ... 549s plot (LoglogisticDistribution, "Discrete", [1, 0]) 549s ***** error ... 549s plot (LoglogisticDistribution, "Discrete", {true}) 549s ***** error ... 549s plot (LoglogisticDistribution, "Parent", 12) 549s ***** error ... 549s plot (LoglogisticDistribution, "Parent", "hax") 549s ***** error ... 549s plot (LoglogisticDistribution, "invalidNAME", "pdf") 549s ***** error ... 549s plot (LoglogisticDistribution, "PlotType", "probability") 549s ***** error ... 549s proflik (LoglogisticDistribution, 2) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 3) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), [1, 2]) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), {1}) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display") 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 549s ***** error ... 549s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 550s ***** error ... 550s truncate (LoglogisticDistribution) 550s ***** error ... 550s truncate (LoglogisticDistribution, 2) 550s ***** error ... 550s truncate (LoglogisticDistribution, 4, 2) 550s ***** shared pd 550s pd = LoglogisticDistribution(1, 1); 550s pd(2) = LoglogisticDistribution(1, 3); 550s ***** error cdf (pd, 1) 550s ***** error icdf (pd, 0.5) 550s ***** error iqr (pd) 550s ***** error mean (pd) 550s ***** error median (pd) 550s ***** error negloglik (pd) 550s ***** error paramci (pd) 550s ***** error pdf (pd, 1) 550s ***** error plot (pd) 550s ***** error proflik (pd, 2) 550s ***** error random (pd) 550s ***** error std (pd) 550s ***** error ... 550s truncate (pd, 2, 4) 550s ***** error var (pd) 550s 95 tests, 95 passed, 0 known failure, 0 skipped 550s [inst/dist_obj/RicianDistribution.m] 550s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/RicianDistribution.m 550s ***** demo 550s ## Generate a data set of 5000 random samples from a Rician distribution with 550s ## parameters s = 2 and sigma = 1. Fit a Rician distribution to this data and 550s ## plot a PDF of the fitted distribution superimposed on a histogram of the data. 550s 550s pd_fixed = makedist ("Rician", "s", 2, "sigma", 1) 550s rand ("seed", 2); 550s data = random (pd_fixed, 5000, 1); 550s pd_fitted = fitdist (data, "Rician") 550s plot (pd_fitted) 550s msg = "Fitted Rician distribution with s = %0.2f and sigma = %0.2f"; 550s title (sprintf (msg, pd_fitted.s, pd_fitted.sigma)) 550s ***** shared pd, t 550s pd = RicianDistribution; 550s t = truncate (pd, 2, 4); 550s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 550s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 550s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 550s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 550s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 550s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 550s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 550s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 550s ***** assert (iqr (pd), 1.0890, 1e-4); 550s ***** assert (iqr (t), 0.5928, 1e-4); 550s ***** assert (mean (pd), 1.5486, 1e-4); 550s ***** assert (mean (t), 2.5380, 1e-4); 550s ***** assert (median (pd), 1.4755, 1e-4); 551s ***** assert (median (t), 2.4341, 1e-4); 551s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 551s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 551s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 551s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 551s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 551s ***** assert (any (random (t, 1000, 1) < 2), false); 551s ***** assert (any (random (t, 1000, 1) > 4), false); 551s ***** assert (std (pd), 0.7758, 1e-4); 551s ***** assert (std (t), 0.4294, 1e-4); 551s ***** assert (var (pd), 0.6019, 1e-4); 551s ***** assert (var (t), 0.1844, 1e-4); 551s ***** error ... 551s RicianDistribution(-eps, 1) 551s ***** error ... 551s RicianDistribution(-1, 1) 551s ***** error ... 551s RicianDistribution(Inf, 1) 551s ***** error ... 551s RicianDistribution(i, 1) 551s ***** error ... 551s RicianDistribution("a", 1) 551s ***** error ... 551s RicianDistribution([1, 2], 1) 551s ***** error ... 551s RicianDistribution(NaN, 1) 551s ***** error ... 551s RicianDistribution(1, 0) 551s ***** error ... 551s RicianDistribution(1, -1) 551s ***** error ... 551s RicianDistribution(1, Inf) 551s ***** error ... 551s RicianDistribution(1, i) 551s ***** error ... 551s RicianDistribution(1, "a") 551s ***** error ... 551s RicianDistribution(1, [1, 2]) 551s ***** error ... 551s RicianDistribution(1, NaN) 551s ***** error ... 551s cdf (RicianDistribution, 2, "uper") 551s ***** error ... 551s cdf (RicianDistribution, 2, 3) 551s ***** shared x 551s x = gevrnd (1, 1, 1, [1, 100]); 551s ***** error ... 551s paramci (RicianDistribution.fit (x), "alpha") 551s ***** error ... 551s paramci (RicianDistribution.fit (x), "alpha", 0) 551s ***** error ... 551s paramci (RicianDistribution.fit (x), "alpha", 1) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", "") 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 556s "parameter", {"s", "sigma", "param"}) 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "parameter", "param") 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "NAME", "value") 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 556s ***** error ... 556s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 556s "NAME", "value") 556s ***** error ... 556s plot (RicianDistribution, "Parent") 556s ***** error ... 556s plot (RicianDistribution, "PlotType", 12) 556s ***** error ... 556s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 556s ***** error ... 556s plot (RicianDistribution, "PlotType", "pdfcdf") 556s ***** error ... 556s plot (RicianDistribution, "Discrete", "pdfcdf") 556s ***** error ... 556s plot (RicianDistribution, "Discrete", [1, 0]) 556s ***** error ... 556s plot (RicianDistribution, "Discrete", {true}) 556s ***** error ... 556s plot (RicianDistribution, "Parent", 12) 556s ***** error ... 556s plot (RicianDistribution, "Parent", "hax") 556s ***** error ... 556s plot (RicianDistribution, "invalidNAME", "pdf") 556s ***** error ... 556s plot (RicianDistribution, "PlotType", "probability") 556s ***** error ... 556s proflik (RicianDistribution, 2) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 3) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), [1, 2]) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), {1}) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, ones (2)) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display") 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display", 1) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 556s ***** error ... 556s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 556s ***** error ... 556s truncate (RicianDistribution) 556s ***** error ... 556s truncate (RicianDistribution, 2) 556s ***** error ... 556s truncate (RicianDistribution, 4, 2) 556s ***** shared pd 556s pd = RicianDistribution(1, 1); 556s pd(2) = RicianDistribution(1, 3); 556s ***** error cdf (pd, 1) 556s ***** error icdf (pd, 0.5) 556s ***** error iqr (pd) 556s ***** error mean (pd) 556s ***** error median (pd) 556s ***** error negloglik (pd) 556s ***** error paramci (pd) 556s ***** error pdf (pd, 1) 556s ***** error plot (pd) 556s ***** error proflik (pd, 2) 556s ***** error random (pd) 556s ***** error std (pd) 556s ***** error ... 556s truncate (pd, 2, 4) 556s ***** error var (pd) 556s 97 tests, 97 passed, 0 known failure, 0 skipped 556s [inst/dist_obj/tLocationScaleDistribution.m] 556s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/tLocationScaleDistribution.m 556s ***** demo 556s ## Generate a data set of 5000 random samples from a t Location-Scale distribution 556s ## with parameters mu = 0, sigma = 1, and nu = 5. Fit a t Location-Scale 556s ## distribution to this data and plot a PDF of the fitted distribution 556s ## superimposed on a histogram of the data. 556s 556s pd_fixed = makedist ("tLocationScale", "mu", 0, "sigma", 1, "nu", 5); 556s rand ("seed", 2); 556s data = random (pd_fixed, 5000, 1); 556s pd_fitted = fitdist (data, "tLocationScale"); 556s plot (pd_fitted); 556s msg = "Fitted t Location-Scale distribution with mu = %0.2f, sigma = %0.2f, nu = %0.2f"; 556s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma, pd_fitted.nu)); 556s ***** shared pd, t 556s pd = tLocationScaleDistribution; 556s t = truncate (pd, 2, 4); 556s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 556s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 556s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 556s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 556s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 556s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 556s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 556s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 556s ***** assert (iqr (pd), 1.4534, 1e-4); 556s ***** assert (iqr (t), 0.7139, 1e-4); 556s ***** assert (mean (pd), 0, eps); 556s ***** assert (mean (t), 2.6099, 1e-4); 556s ***** assert (median (pd), 0, eps); 556s ***** assert (median (t), 2.4758, 1e-4); 556s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 556s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 556s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 556s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 556s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 556s ***** assert (any (random (t, 1000, 1) < 2), false); 556s ***** assert (any (random (t, 1000, 1) > 4), false); 556s ***** assert (std (pd), 1.2910, 1e-4); 556s ***** assert (std (t), 0.4989, 1e-4); 556s ***** assert (var (pd), 1.6667, 1e-4); 556s ***** assert (var (t), 0.2489, 1e-4); 556s ***** error ... 556s tLocationScaleDistribution(i, 1, 1) 556s ***** error ... 556s tLocationScaleDistribution(Inf, 1, 1) 556s ***** error ... 556s tLocationScaleDistribution([1, 2], 1, 1) 556s ***** error ... 556s tLocationScaleDistribution("a", 1, 1) 556s ***** error ... 556s tLocationScaleDistribution(NaN, 1, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, 0, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, -1, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, Inf, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, i, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, "a", 1) 556s ***** error ... 556s tLocationScaleDistribution(0, [1, 2], 1) 556s ***** error ... 556s tLocationScaleDistribution(0, NaN, 1) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, 0) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, -1) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, Inf) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, i) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, "a") 556s ***** error ... 556s tLocationScaleDistribution(0, 1, [1, 2]) 556s ***** error ... 556s tLocationScaleDistribution(0, 1, NaN) 556s ***** error ... 556s cdf (tLocationScaleDistribution, 2, "uper") 556s ***** error ... 556s cdf (tLocationScaleDistribution, 2, 3) 556s ***** shared x 556s x = tlsrnd (0, 1, 1, [1, 100]); 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha") 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 556s "alpha", {0.05}) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), ... 556s "parameter", {"mu", "sigma", "nu", "param"}) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 556s "parameter", {"mu", "sigma", "nu", "param"}) 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 556s "parameter", "param") 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 556s ***** error ... 556s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 557s ***** error ... 557s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 557s "parameter", "mu", "NAME", "value") 557s ***** error ... 557s plot (tLocationScaleDistribution, "Parent") 557s ***** error ... 557s plot (tLocationScaleDistribution, "PlotType", 12) 557s ***** error ... 557s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 557s ***** error ... 557s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 557s ***** error ... 557s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 557s ***** error ... 557s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 557s ***** error ... 557s plot (tLocationScaleDistribution, "Discrete", {true}) 557s ***** error ... 557s plot (tLocationScaleDistribution, "Parent", 12) 557s ***** error ... 557s plot (tLocationScaleDistribution, "Parent", "hax") 557s ***** error ... 557s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 557s ***** error ... 557s plot (tLocationScaleDistribution, "PlotType", "probability") 557s ***** error ... 557s proflik (tLocationScaleDistribution, 2) 557s ***** error ... 557s proflik (tLocationScaleDistribution.fit (x), 4) 557s ***** error ... 557s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 557s ***** error ... 557s proflik (tLocationScaleDistribution.fit (x), {1}) 557s ***** error ... 557s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 557s ***** error ... 557s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 558s ***** error ... 558s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 559s ***** error ... 559s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 559s ***** error ... 559s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 559s ***** error ... 559s truncate (tLocationScaleDistribution) 559s ***** error ... 559s truncate (tLocationScaleDistribution, 2) 559s ***** error ... 559s truncate (tLocationScaleDistribution, 4, 2) 559s ***** shared pd 559s pd = tLocationScaleDistribution (0, 1, 1); 559s pd(2) = tLocationScaleDistribution (0, 1, 3); 559s ***** error cdf (pd, 1) 559s ***** error icdf (pd, 0.5) 559s ***** error iqr (pd) 559s ***** error mean (pd) 559s ***** error median (pd) 559s ***** error negloglik (pd) 559s ***** error paramci (pd) 559s ***** error pdf (pd, 1) 559s ***** error plot (pd) 559s ***** error proflik (pd, 2) 559s ***** error random (pd) 559s ***** error std (pd) 559s ***** error ... 559s truncate (pd, 2, 4) 559s ***** error var (pd) 559s 102 tests, 102 passed, 0 known failure, 0 skipped 559s [inst/dist_obj/BurrDistribution.m] 559s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/BurrDistribution.m 559s ***** demo 559s ## Generate a data set of 5000 random samples from a Burr type XII 559s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 559s ## XII distribution to this data and plot a PDF of the fitted distribution 559s ## superimposed on a histogram of the data 559s 559s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 559s rand ("seed", 21); 559s data = random (pd, 5000, 1); 559s pd = fitdist (data, "Burr") 559s plot (pd) 559s msg = strcat (["Fitted Burr type XII distribution with"], ... 559s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 559s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 559s ***** shared pd, t 559s pd = BurrDistribution; 559s t = truncate (pd, 2, 4); 559s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 559s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 559s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 559s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 559s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 559s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 559s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 559s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 559s ***** assert (iqr (pd), 2.6667, 1e-4); 559s ***** assert (iqr (t), 0.9524, 1e-4); 559s ***** assert (mean (pd), Inf); 559s ***** assert (mean (t), 2.8312, 1e-4); 559s ***** assert (median (pd), 1, 1e-4); 559s ***** assert (median (t), 2.75, 1e-4); 559s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 559s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 559s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 559s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 559s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 559s ***** assert (any (random (t, 1000, 1) < 2), false); 559s ***** assert (any (random (t, 1000, 1) > 4), false); 559s ***** assert (std (pd), Inf); 559s ***** assert (std (t), 0.5674, 1e-4); 559s ***** assert (var (pd), Inf); 559s ***** assert (var (t), 0.3220, 1e-4); 559s ***** error ... 559s BurrDistribution(0, 1, 1) 559s ***** error ... 559s BurrDistribution(-1, 1, 1) 559s ***** error ... 559s BurrDistribution(Inf, 1, 1) 559s ***** error ... 559s BurrDistribution(i, 1, 1) 559s ***** error ... 559s BurrDistribution("a", 1, 1) 559s ***** error ... 559s BurrDistribution([1, 2], 1, 1) 559s ***** error ... 559s BurrDistribution(NaN, 1, 1) 559s ***** error ... 559s BurrDistribution(1, 0, 1) 559s ***** error ... 559s BurrDistribution(1, -1, 1) 559s ***** error ... 559s BurrDistribution(1, Inf, 1) 559s ***** error ... 559s BurrDistribution(1, i, 1) 559s ***** error ... 559s BurrDistribution(1, "a", 1) 559s ***** error ... 559s BurrDistribution(1, [1, 2], 1) 559s ***** error ... 559s BurrDistribution(1, NaN, 1) 559s ***** error ... 559s BurrDistribution(1, 1, 0) 559s ***** error ... 559s BurrDistribution(1, 1, -1) 559s ***** error ... 559s BurrDistribution(1, 1, Inf) 559s ***** error ... 559s BurrDistribution(1, 1, i) 559s ***** error ... 559s BurrDistribution(1, 1, "a") 559s ***** error ... 559s BurrDistribution(1, 1, [1, 2]) 559s ***** error ... 559s BurrDistribution(1, 1, NaN) 559s ***** error ... 559s cdf (BurrDistribution, 2, "uper") 559s ***** error ... 559s cdf (BurrDistribution, 2, 3) 559s ***** shared x 559s rand ("seed", 4); 559s x = burrrnd (1, 1, 1, [1, 100]); 559s ***** error ... 559s paramci (BurrDistribution.fit (x), "alpha") 559s ***** error ... 559s paramci (BurrDistribution.fit (x), "alpha", 0) 559s ***** error ... 559s paramci (BurrDistribution.fit (x), "alpha", 1) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "alpha", "") 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 560s "parameter", {"alpha", "c", "k", "param"}) 560s ***** error ... 560s paramci (BurrDistribution.fit (x), "parameter", "param") 561s ***** error ... 561s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 561s ***** error ... 561s paramci (BurrDistribution.fit (x), "NAME", "value") 561s ***** error ... 561s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 561s ***** error ... 561s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 561s "NAME", "value") 561s ***** error ... 561s plot (BurrDistribution, "Parent") 561s ***** error ... 561s plot (BurrDistribution, "PlotType", 12) 561s ***** error ... 561s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 561s ***** error ... 561s plot (BurrDistribution, "PlotType", "pdfcdf") 561s ***** error ... 561s plot (BurrDistribution, "Discrete", "pdfcdf") 561s ***** error ... 561s plot (BurrDistribution, "Discrete", [1, 0]) 561s ***** error ... 561s plot (BurrDistribution, "Discrete", {true}) 561s ***** error ... 561s plot (BurrDistribution, "Parent", 12) 561s ***** error ... 561s plot (BurrDistribution, "Parent", "hax") 561s ***** error ... 561s plot (BurrDistribution, "invalidNAME", "pdf") 561s ***** error ... 561s plot (BurrDistribution, "PlotType", "probability") 561s ***** error ... 561s proflik (BurrDistribution, 2) 561s ***** error ... 561s proflik (BurrDistribution.fit (x), 4) 561s ***** error ... 561s proflik (BurrDistribution.fit (x), [1, 2]) 561s ***** error ... 561s proflik (BurrDistribution.fit (x), {1}) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, ones (2)) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display") 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display", 1) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 562s ***** error ... 562s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 563s ***** error ... 563s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 563s ***** error ... 563s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 563s ***** error ... 563s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 563s ***** error ... 563s truncate (BurrDistribution) 563s ***** error ... 563s truncate (BurrDistribution, 2) 563s ***** error ... 563s truncate (BurrDistribution, 4, 2) 563s ***** shared pd 563s pd = BurrDistribution(1, 1, 1); 563s pd(2) = BurrDistribution(1, 3, 1); 563s ***** error cdf (pd, 1) 563s ***** error icdf (pd, 0.5) 563s ***** error iqr (pd) 563s ***** error mean (pd) 563s ***** error median (pd) 563s ***** error negloglik (pd) 563s ***** error paramci (pd) 563s ***** error pdf (pd, 1) 563s ***** error plot (pd) 563s ***** error proflik (pd, 2) 563s ***** error random (pd) 563s ***** error std (pd) 563s ***** error ... 563s truncate (pd, 2, 4) 563s ***** error var (pd) 563s 104 tests, 104 passed, 0 known failure, 0 skipped 563s [inst/dist_obj/NormalDistribution.m] 563s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/NormalDistribution.m 563s ***** demo 563s ## Generate a data set of 5000 random samples from a Normal distribution with 563s ## parameters mu = 0 and sigma = 1. Fit a Normal distribution to this data and plot 563s ## a PDF of the fitted distribution superimposed on a histogram of the data. 563s 563s pd_fixed = makedist ("Normal", "mu", 0, "sigma", 1) 563s randn ("seed", 2); 563s data = random (pd_fixed, 5000, 1); 563s pd_fitted = fitdist (data, "Normal") 563s plot (pd_fitted) 563s msg = "Fitted Normal distribution with mu = %0.2f and sigma = %0.2f"; 563s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 563s ***** shared pd, t 563s pd = NormalDistribution; 563s t = truncate (pd, -2, 2); 563s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 563s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 563s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 563s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 563s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 563s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 563s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 563s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 563s ***** assert (iqr (pd), 1.3490, 1e-4); 563s ***** assert (iqr (t), 1.2782, 1e-4); 563s ***** assert (mean (pd), 0); 563s ***** assert (mean (t), 0, 3e-16); 563s ***** assert (median (pd), 0); 563s ***** assert (median (t), 0, 3e-16); 563s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 563s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 563s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 563s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 563s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 563s ***** assert (any (random (t, 1000, 1) < -2), false); 563s ***** assert (any (random (t, 1000, 1) > 2), false); 563s ***** assert (std (pd), 1); 563s ***** assert (std (t), 0.8796, 1e-4); 563s ***** assert (var (pd), 1); 563s ***** assert (var (t), 0.7737, 1e-4); 563s ***** error ... 563s NormalDistribution(Inf, 1) 563s ***** error ... 563s NormalDistribution(i, 1) 563s ***** error ... 563s NormalDistribution("a", 1) 563s ***** error ... 563s NormalDistribution([1, 2], 1) 563s ***** error ... 563s NormalDistribution(NaN, 1) 563s ***** error ... 563s NormalDistribution(1, 0) 563s ***** error ... 563s NormalDistribution(1, -1) 563s ***** error ... 563s NormalDistribution(1, Inf) 563s ***** error ... 563s NormalDistribution(1, i) 563s ***** error ... 563s NormalDistribution(1, "a") 563s ***** error ... 563s NormalDistribution(1, [1, 2]) 563s ***** error ... 563s NormalDistribution(1, NaN) 563s ***** error ... 563s cdf (NormalDistribution, 2, "uper") 563s ***** error ... 563s cdf (NormalDistribution, 2, 3) 563s ***** shared x 563s x = normrnd (1, 1, [1, 100]); 563s ***** error ... 563s paramci (NormalDistribution.fit (x), "alpha") 563s ***** error ... 563s paramci (NormalDistribution.fit (x), "alpha", 0) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "alpha", 1) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "alpha", "") 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 564s ***** error ... 564s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 564s "parameter", {"mu", "sigma", "param"}) 565s ***** error ... 565s paramci (NormalDistribution.fit (x), "parameter", "param") 565s ***** error ... 565s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 565s ***** error ... 565s paramci (NormalDistribution.fit (x), "NAME", "value") 565s ***** error ... 565s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 565s ***** error ... 565s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 565s "NAME", "value") 565s ***** error ... 565s plot (NormalDistribution, "Parent") 565s ***** error ... 565s plot (NormalDistribution, "PlotType", 12) 565s ***** error ... 565s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 565s ***** error ... 565s plot (NormalDistribution, "PlotType", "pdfcdf") 565s ***** error ... 565s plot (NormalDistribution, "Discrete", "pdfcdf") 565s ***** error ... 565s plot (NormalDistribution, "Discrete", [1, 0]) 565s ***** error ... 565s plot (NormalDistribution, "Discrete", {true}) 565s ***** error ... 565s plot (NormalDistribution, "Parent", 12) 565s ***** error ... 565s plot (NormalDistribution, "Parent", "hax") 565s ***** error ... 565s plot (NormalDistribution, "invalidNAME", "pdf") 565s ***** error ... 565s plot (NormalDistribution, "PlotType", "probability") 565s ***** error ... 565s proflik (NormalDistribution, 2) 565s ***** error ... 565s proflik (NormalDistribution.fit (x), 3) 565s ***** error ... 565s proflik (NormalDistribution.fit (x), [1, 2]) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), {1}) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, ones (2)) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, "Display") 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, "Display", 1) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 566s ***** error ... 566s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 567s ***** error ... 567s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 567s ***** error ... 567s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 567s ***** error ... 567s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 567s ***** error ... 567s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 567s ***** error ... 567s truncate (NormalDistribution) 567s ***** error ... 567s truncate (NormalDistribution, 2) 567s ***** error ... 567s truncate (NormalDistribution, 4, 2) 567s ***** shared pd 567s pd = NormalDistribution(1, 1); 567s pd(2) = NormalDistribution(1, 3); 567s ***** error cdf (pd, 1) 567s ***** error icdf (pd, 0.5) 567s ***** error iqr (pd) 567s ***** error mean (pd) 567s ***** error median (pd) 567s ***** error negloglik (pd) 567s ***** error paramci (pd) 567s ***** error pdf (pd, 1) 567s ***** error plot (pd) 567s ***** error proflik (pd, 2) 567s ***** error random (pd) 567s ***** error std (pd) 567s ***** error ... 567s truncate (pd, 2, 4) 567s ***** error var (pd) 567s 95 tests, 95 passed, 0 known failure, 0 skipped 567s [inst/dist_obj/UniformDistribution.m] 567s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/UniformDistribution.m 567s ***** demo 567s ## Generate a data set of 5000 random samples from a Uniform distribution with 567s ## parameters Lower = 0 and Upper = 10. Create a Uniform distribution with these 567s ## parameters and plot its PDF superimposed on a histogram of the data. 567s 567s pd = makedist ("Uniform", "Lower", 0, "Upper", 10); 567s rand ("seed", 21); 567s data = random (pd, 5000, 1); 567s 567s x = linspace (pd.Lower - 1, pd.Upper + 1, 500); 567s y = pdf (pd, x); 567s plot (x, y, 'r-', 'LineWidth', 2); 567s hold on; 567s 567s [counts, centers] = hist (data, 50); 567s bin_width = centers(2) - centers(1); 567s normalized_counts = counts / (sum (counts) * bin_width); 567s bar (centers, normalized_counts, 1); 567s 567s msg = "Uniform distribution with Lower = %0.2f and Upper = %0.2f"; 567s title (sprintf (msg, pd.Lower, pd.Upper)); 567s legend ("PDF", "Histogram", "location", "northeast"); 567s 567s hold off; 567s ***** shared pd, t 567s pd = UniformDistribution (0, 5); 567s t = truncate (pd, 2, 4); 567s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 567s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 567s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 567s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 567s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 567s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 567s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 567s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 567s ***** assert (iqr (pd), 2.5, 1e-14); 567s ***** assert (iqr (t), 1, 1e-14); 567s ***** assert (mean (pd), 2.5, 1e-14); 567s ***** assert (mean (t), 3, 1e-14); 567s ***** assert (median (pd), 2.5, 1e-14); 567s ***** assert (median (t), 3, 1e-14); 567s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 567s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 567s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 567s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 567s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 567s ***** assert (any (random (t, 1000, 1) < 2), false); 567s ***** assert (any (random (t, 1000, 1) > 4), false); 567s ***** assert (std (pd), 1.4434, 1e-4); 567s ***** assert (std (t), 0.5774, 1e-4); 567s ***** assert (var (pd), 2.0833, 1e-4); 567s ***** assert (var (t), 0.3333, 1e-4); 567s ***** error ... 567s UniformDistribution (i, 1) 567s ***** error ... 567s UniformDistribution (Inf, 1) 567s ***** error ... 567s UniformDistribution ([1, 2], 1) 567s ***** error ... 567s UniformDistribution ("a", 1) 567s ***** error ... 567s UniformDistribution (NaN, 1) 567s ***** error ... 567s UniformDistribution (1, i) 567s ***** error ... 567s UniformDistribution (1, Inf) 567s ***** error ... 567s UniformDistribution (1, [1, 2]) 567s ***** error ... 567s UniformDistribution (1, "a") 567s ***** error ... 567s UniformDistribution (1, NaN) 567s ***** error ... 567s UniformDistribution (2, 1) 567s ***** error ... 567s cdf (UniformDistribution, 2, "uper") 567s ***** error ... 567s cdf (UniformDistribution, 2, 3) 567s ***** error ... 567s plot (UniformDistribution, "Parent") 567s ***** error ... 567s plot (UniformDistribution, "PlotType", 12) 567s ***** error ... 567s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 567s ***** error ... 567s plot (UniformDistribution, "PlotType", "pdfcdf") 567s ***** error ... 567s plot (UniformDistribution, "Discrete", "pdfcdf") 567s ***** error ... 567s plot (UniformDistribution, "Discrete", [1, 0]) 567s ***** error ... 567s plot (UniformDistribution, "Discrete", {true}) 567s ***** error ... 567s plot (UniformDistribution, "Parent", 12) 567s ***** error ... 567s plot (UniformDistribution, "Parent", "hax") 567s ***** error ... 567s plot (UniformDistribution, "invalidNAME", "pdf") 567s ***** error ... 567s plot (UniformDistribution, "PlotType", "probability") 567s ***** error ... 567s truncate (UniformDistribution) 567s ***** error ... 567s truncate (UniformDistribution, 2) 567s ***** error ... 567s truncate (UniformDistribution, 4, 2) 567s ***** shared pd 567s pd = UniformDistribution (0, 1); 567s pd(2) = UniformDistribution (0, 2); 567s ***** error cdf (pd, 1) 567s ***** error icdf (pd, 0.5) 567s ***** error iqr (pd) 567s ***** error mean (pd) 567s ***** error median (pd) 567s ***** error pdf (pd, 1) 567s ***** error plot (pd) 567s ***** error random (pd) 567s ***** error std (pd) 567s ***** error ... 567s truncate (pd, 2, 4) 567s ***** error var (pd) 567s 63 tests, 63 passed, 0 known failure, 0 skipped 567s [inst/dist_obj/MultinomialDistribution.m] 567s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/MultinomialDistribution.m 567s ***** demo 567s ## Generate a data set of 5000 random samples from a Multinomial distribution 567s ## with parameters Probabilities = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]. Create 567s ## the distribution and plot the PDF superimposed on a histogram of the data. 567s 567s probs = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]; 567s pd = makedist ("Multinomial", "Probabilities", probs); 567s rand ("seed", 2); 567s data = random (pd, 5000, 1); 567s hist (data, length (probs)); 567s hold on 567s x = 1:length (probs); 567s y = pdf (pd, x) * 5000; 567s stem (x, y, "r", "LineWidth", 2); 567s hold off 567s msg = "Multinomial distribution with Probabilities = [%s]"; 567s probs_str = num2str (probs, "%0.1f "); 567s title (sprintf (msg, probs_str)) 567s ***** shared pd, t 567s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 567s t = truncate (pd, 2, 4); 567s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 567s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 567s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 567s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 567s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 567s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 567s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 567s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 567s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 567s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 567s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 567s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 567s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 567s ***** assert (iqr (pd), 2); 567s ***** assert (iqr (t), 2); 567s ***** assert (mean (pd), 3.3, 1e-14); 567s ***** assert (mean (t), 3, eps); 567s ***** assert (median (pd), 3); 567s ***** assert (median (t), 3); 567s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 567s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 567s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 567s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 567s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 567s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 567s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 567s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 567s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 567s ***** assert (std (pd), 1.4177, 1e-4); 567s ***** assert (std (t), 0.7559, 1e-4); 567s ***** assert (var (pd), 2.0100, 1e-4); 567s ***** assert (var (t), 0.5714, 1e-4); 568s ***** error ... 568s MultinomialDistribution(0) 568s ***** error ... 568s MultinomialDistribution(-1) 568s ***** error ... 568s MultinomialDistribution(Inf) 568s ***** error ... 568s MultinomialDistribution(i) 568s ***** error ... 568s MultinomialDistribution("a") 568s ***** error ... 568s MultinomialDistribution([1, 2]) 568s ***** error ... 568s MultinomialDistribution(NaN) 568s ***** error ... 568s cdf (MultinomialDistribution, 2, "uper") 568s ***** error ... 568s cdf (MultinomialDistribution, 2, 3) 568s ***** error ... 568s cdf (MultinomialDistribution, i) 568s ***** error ... 568s plot (MultinomialDistribution, "Parent") 568s ***** error ... 568s plot (MultinomialDistribution, "PlotType", 12) 568s ***** error ... 568s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 568s ***** error ... 568s plot (MultinomialDistribution, "PlotType", "pdfcdf") 568s ***** error ... 568s plot (MultinomialDistribution, "Discrete", "pdfcdf") 568s ***** error ... 568s plot (MultinomialDistribution, "Discrete", [1, 0]) 568s ***** error ... 568s plot (MultinomialDistribution, "Discrete", {true}) 568s ***** error ... 568s plot (MultinomialDistribution, "Parent", 12) 568s ***** error ... 568s plot (MultinomialDistribution, "Parent", "hax") 568s ***** error ... 568s plot (MultinomialDistribution, "invalidNAME", "pdf") 568s ***** error ... 568s plot (MultinomialDistribution, "PlotType", "probability") 568s ***** error ... 568s truncate (MultinomialDistribution) 568s ***** error ... 568s truncate (MultinomialDistribution, 2) 568s ***** error ... 568s truncate (MultinomialDistribution, 4, 2) 568s ***** shared pd 568s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 568s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 568s ***** error cdf (pd, 1) 568s ***** error icdf (pd, 0.5) 568s ***** error iqr (pd) 568s ***** error mean (pd) 568s ***** error median (pd) 568s ***** error pdf (pd, 1) 568s ***** error plot (pd) 568s ***** error random (pd) 568s ***** error std (pd) 568s ***** error ... 568s truncate (pd, 2, 4) 568s ***** error var (pd) 568s 64 tests, 64 passed, 0 known failure, 0 skipped 568s [inst/dist_obj/LognormalDistribution.m] 568s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/LognormalDistribution.m 568s ***** demo 568s ## Generate a data set of 5000 random samples from a Lognormal distribution with 568s ## parameters mu = 0 and sigma = 1. Fit a Lognormal distribution to this data and plot 568s ## a PDF of the fitted distribution superimposed on a histogram of the data. 568s 568s pd_fixed = makedist ("Lognormal", "mu", 0, "sigma", 1) 568s randn ("seed", 2); 568s data = random (pd_fixed, 5000, 1); 568s pd_fitted = fitdist (data, "Lognormal") 568s plot (pd_fitted) 568s msg = "Fitted Lognormal distribution with mu = %0.2f and sigma = %0.2f"; 568s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 568s ***** shared pd, t 568s pd = LognormalDistribution; 568s t = truncate (pd, 2, 4); 568s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 568s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 568s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 568s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 568s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 568s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 568s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 568s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 568s ***** assert (iqr (pd), 1.4536, 1e-4); 568s ***** assert (iqr (t), 0.8989, 1e-4); 568s ***** assert (mean (pd), 1.6487, 1e-4); 568s ***** assert (mean (t), 2.7692, 1e-4); 568s ***** assert (median (pd), 1, 1e-4); 568s ***** assert (median (t), 2.6653, 1e-4); 568s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 568s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 568s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 568s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 568s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 568s ***** assert (any (random (t, 1000, 1) < 2), false); 568s ***** assert (any (random (t, 1000, 1) > 4), false); 568s ***** assert (std (pd), 2.1612, 1e-4); 568s ***** assert (std (t), 0.5540, 1e-4); 568s ***** assert (var (pd), 4.6708, 1e-4); 568s ***** assert (var (t), 0.3069, 1e-4); 568s ***** error ... 568s LognormalDistribution(Inf, 1) 568s ***** error ... 568s LognormalDistribution(i, 1) 568s ***** error ... 568s LognormalDistribution("a", 1) 568s ***** error ... 568s LognormalDistribution([1, 2], 1) 568s ***** error ... 568s LognormalDistribution(NaN, 1) 568s ***** error ... 568s LognormalDistribution(1, 0) 568s ***** error ... 568s LognormalDistribution(1, -1) 568s ***** error ... 568s LognormalDistribution(1, Inf) 568s ***** error ... 568s LognormalDistribution(1, i) 568s ***** error ... 568s LognormalDistribution(1, "a") 568s ***** error ... 568s LognormalDistribution(1, [1, 2]) 568s ***** error ... 568s LognormalDistribution(1, NaN) 568s ***** error ... 568s cdf (LognormalDistribution, 2, "uper") 568s ***** error ... 568s cdf (LognormalDistribution, 2, 3) 568s ***** shared x 568s randn ("seed", 1); 568s x = lognrnd (1, 1, [1, 100]); 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha") 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha", 0) 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha", 1) 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha", "") 568s ***** error ... 568s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 569s "parameter", {"mu", "sigma", "param"}) 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "parameter", "param") 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "NAME", "value") 569s ***** error ... 569s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 570s ***** error ... 570s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 570s "NAME", "value") 570s ***** error ... 570s plot (LognormalDistribution, "Parent") 570s ***** error ... 570s plot (LognormalDistribution, "PlotType", 12) 570s ***** error ... 570s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 570s ***** error ... 570s plot (LognormalDistribution, "PlotType", "pdfcdf") 570s ***** error ... 570s plot (LognormalDistribution, "Discrete", "pdfcdf") 570s ***** error ... 570s plot (LognormalDistribution, "Discrete", [1, 0]) 570s ***** error ... 570s plot (LognormalDistribution, "Discrete", {true}) 570s ***** error ... 570s plot (LognormalDistribution, "Parent", 12) 570s ***** error ... 570s plot (LognormalDistribution, "Parent", "hax") 570s ***** error ... 570s plot (LognormalDistribution, "invalidNAME", "pdf") 570s ***** error ... 570s plot (LognormalDistribution, "PlotType", "probability") 570s ***** error ... 570s proflik (LognormalDistribution, 2) 570s ***** error ... 570s proflik (LognormalDistribution.fit (x), 3) 570s ***** error ... 570s proflik (LognormalDistribution.fit (x), [1, 2]) 570s ***** error ... 570s proflik (LognormalDistribution.fit (x), {1}) 570s ***** error ... 570s proflik (LognormalDistribution.fit (x), 1, ones (2)) 570s ***** error ... 570s proflik (LognormalDistribution.fit (x), 1, "Display") 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 571s ***** error ... 571s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 572s ***** error ... 572s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 572s ***** error ... 572s truncate (LognormalDistribution) 572s ***** error ... 572s truncate (LognormalDistribution, 2) 572s ***** error ... 572s truncate (LognormalDistribution, 4, 2) 572s ***** shared pd 572s pd = LognormalDistribution(1, 1); 572s pd(2) = LognormalDistribution(1, 3); 572s ***** error cdf (pd, 1) 572s ***** error icdf (pd, 0.5) 572s ***** error iqr (pd) 572s ***** error mean (pd) 572s ***** error median (pd) 572s ***** error negloglik (pd) 572s ***** error paramci (pd) 572s ***** error pdf (pd, 1) 572s ***** error plot (pd) 572s ***** error proflik (pd, 2) 572s ***** error random (pd) 572s ***** error std (pd) 572s ***** error ... 572s truncate (pd, 2, 4) 572s ***** error var (pd) 572s 95 tests, 95 passed, 0 known failure, 0 skipped 572s [inst/dist_obj/LogisticDistribution.m] 572s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/LogisticDistribution.m 572s ***** shared pd, t 572s pd = LogisticDistribution (0, 1); 572s t = truncate (pd, 2, 4); 572s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 572s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 572s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 572s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 572s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 572s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 572s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 572s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 572s ***** assert (iqr (pd), 2.1972, 1e-4); 572s ***** assert (iqr (t), 0.8286, 1e-4); 572s ***** assert (mean (pd), 0, 1e-4); 572s ***** assert (mean (t), 2.7193, 1e-4); 572s ***** assert (median (pd), 0); 572s ***** assert (median (t), 2.6085, 1e-4); 572s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 572s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 572s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 572s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 572s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 572s ***** assert (any (random (t, 1000, 1) < 2), false); 572s ***** assert (any (random (t, 1000, 1) > 4), false); 572s ***** assert (std (pd), 1.8138, 1e-4); 572s ***** assert (std (t), 0.5320, 1e-4); 572s ***** assert (var (pd), 3.2899, 1e-4); 572s ***** assert (var (t), 0.2830, 1e-4); 572s ***** error ... 572s LogisticDistribution(Inf, 1) 572s ***** error ... 572s LogisticDistribution(i, 1) 572s ***** error ... 572s LogisticDistribution("a", 1) 572s ***** error ... 572s LogisticDistribution([1, 2], 1) 572s ***** error ... 572s LogisticDistribution(NaN, 1) 572s ***** error ... 572s LogisticDistribution(1, 0) 572s ***** error ... 572s LogisticDistribution(1, -1) 572s ***** error ... 572s LogisticDistribution(1, Inf) 572s ***** error ... 572s LogisticDistribution(1, i) 572s ***** error ... 572s LogisticDistribution(1, "a") 572s ***** error ... 572s LogisticDistribution(1, [1, 2]) 572s ***** error ... 572s LogisticDistribution(1, NaN) 572s ***** error ... 572s cdf (LogisticDistribution, 2, "uper") 572s ***** error ... 572s cdf (LogisticDistribution, 2, 3) 572s ***** shared x 572s x = logirnd (1, 1, [1, 100]); 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha") 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", 0) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", 1) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", "") 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 572s ***** error ... 572s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 572s "parameter", {"mu", "sigma", "param"}) 573s ***** error ... 573s paramci (LogisticDistribution.fit (x), "parameter", "param") 573s ***** error ... 573s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 573s ***** error ... 573s paramci (LogisticDistribution.fit (x), "NAME", "value") 573s ***** error ... 573s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 573s ***** error ... 573s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 573s "NAME", "value") 573s ***** error ... 573s plot (LogisticDistribution, "Parent") 573s ***** error ... 573s plot (LogisticDistribution, "PlotType", 12) 573s ***** error ... 573s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 573s ***** error ... 573s plot (LogisticDistribution, "PlotType", "pdfcdf") 573s ***** error ... 573s plot (LogisticDistribution, "Discrete", "pdfcdf") 573s ***** error ... 573s plot (LogisticDistribution, "Discrete", [1, 0]) 573s ***** error ... 573s plot (LogisticDistribution, "Discrete", {true}) 573s ***** error ... 573s plot (LogisticDistribution, "Parent", 12) 573s ***** error ... 573s plot (LogisticDistribution, "Parent", "hax") 573s ***** error ... 573s plot (LogisticDistribution, "invalidNAME", "pdf") 573s ***** error ... 573s plot (LogisticDistribution, "PlotType", "probability") 573s ***** error ... 573s proflik (LogisticDistribution, 2) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 3) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), [1, 2]) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), {1}) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, ones (2)) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, "Display") 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 573s ***** error ... 573s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 574s ***** error ... 574s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 574s ***** error ... 574s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 574s ***** error ... 574s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 574s ***** error ... 574s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 574s ***** error ... 574s truncate (LogisticDistribution) 574s ***** error ... 574s truncate (LogisticDistribution, 2) 574s ***** error ... 574s truncate (LogisticDistribution, 4, 2) 574s ***** shared pd 574s pd = LogisticDistribution(1, 1); 574s pd(2) = LogisticDistribution(1, 3); 574s ***** error cdf (pd, 1) 574s ***** error icdf (pd, 0.5) 574s ***** error iqr (pd) 574s ***** error mean (pd) 574s ***** error median (pd) 574s ***** error negloglik (pd) 574s ***** error paramci (pd) 574s ***** error pdf (pd, 1) 574s ***** error plot (pd) 574s ***** error proflik (pd, 2) 574s ***** error random (pd) 574s ***** error std (pd) 574s ***** error ... 574s truncate (pd, 2, 4) 574s ***** error var (pd) 574s 95 tests, 95 passed, 0 known failure, 0 skipped 574s [inst/dist_obj/RayleighDistribution.m] 574s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/RayleighDistribution.m 574s ***** demo 574s ## Generate a data set of 5000 random samples from a Rayleigh distribution with 574s ## parameter sigma = 2. Fit a Rayleigh distribution to this data and plot 574s ## a PDF of the fitted distribution superimposed on a histogram of the data. 574s 574s pd_fixed = makedist ("Rayleigh", "sigma", 2) 574s rand ("seed", 2); 574s data = random (pd_fixed, 5000, 1); 574s pd_fitted = fitdist (data, "Rayleigh") 574s plot (pd_fitted) 574s msg = "Fitted Rayleigh distribution with sigma = %0.2f"; 574s title (sprintf (msg, pd_fitted.sigma)) 574s ***** shared pd, t 574s pd = RayleighDistribution; 574s t = truncate (pd, 2, 4); 574s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 574s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 574s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 574s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 574s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 574s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 574s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 574s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 574s ***** assert (iqr (pd), 0.9066, 1e-4); 574s ***** assert (iqr (t), 0.4609, 1e-4); 574s ***** assert (mean (pd), 1.2533, 1e-4); 574s ***** assert (mean (t), 2.4169, 1e-4); 574s ***** assert (median (pd), 1.1774, 1e-4); 574s ***** assert (median (t), 2.3198, 1e-4); 574s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 574s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 574s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 574s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 574s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 574s ***** assert (any (random (t, 1000, 1) < 2), false); 574s ***** assert (any (random (t, 1000, 1) > 4), false); 574s ***** assert (std (pd), 0.6551, 1e-4); 574s ***** assert (std (t), 0.3591, 1e-4); 574s ***** assert (var (pd), 0.4292, 1e-4); 574s ***** assert (var (t), 0.1290, 1e-4); 574s ***** error ... 574s RayleighDistribution(0) 574s ***** error ... 574s RayleighDistribution(-1) 574s ***** error ... 574s RayleighDistribution(Inf) 574s ***** error ... 574s RayleighDistribution(i) 574s ***** error ... 574s RayleighDistribution("a") 574s ***** error ... 574s RayleighDistribution([1, 2]) 574s ***** error ... 574s RayleighDistribution(NaN) 574s ***** error ... 574s cdf (RayleighDistribution, 2, "uper") 574s ***** error ... 574s cdf (RayleighDistribution, 2, 3) 574s ***** shared x 574s x = raylrnd (1, [1, 100]); 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha") 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", 0) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", 1) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", "") 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 574s "parameter", {"sigma", "param"}) 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "parameter", "param") 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "NAME", "value") 574s ***** error ... 574s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 575s ***** error ... 575s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 575s "parameter", "sigma", "NAME", "value") 575s ***** error ... 575s plot (RayleighDistribution, "Parent") 575s ***** error ... 575s plot (RayleighDistribution, "PlotType", 12) 575s ***** error ... 575s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 575s ***** error ... 575s plot (RayleighDistribution, "PlotType", "pdfcdf") 575s ***** error ... 575s plot (RayleighDistribution, "Discrete", "pdfcdf") 575s ***** error ... 575s plot (RayleighDistribution, "Discrete", [1, 0]) 575s ***** error ... 575s plot (RayleighDistribution, "Discrete", {true}) 575s ***** error ... 575s plot (RayleighDistribution, "Parent", 12) 575s ***** error ... 575s plot (RayleighDistribution, "Parent", "hax") 575s ***** error ... 575s plot (RayleighDistribution, "invalidNAME", "pdf") 575s ***** error ... 575s plot (RayleighDistribution, "PlotType", "probability") 575s ***** error ... 575s proflik (RayleighDistribution, 2) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 3) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), [1, 2]) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), {1}) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, ones (2)) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display") 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 575s ***** error ... 575s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 575s ***** error ... 575s truncate (RayleighDistribution) 575s ***** error ... 575s truncate (RayleighDistribution, 2) 575s ***** error ... 575s truncate (RayleighDistribution, 4, 2) 575s ***** shared pd 575s pd = RayleighDistribution(1); 575s pd(2) = RayleighDistribution(3); 575s ***** error cdf (pd, 1) 575s ***** error icdf (pd, 0.5) 575s ***** error iqr (pd) 575s ***** error mean (pd) 575s ***** error median (pd) 575s ***** error negloglik (pd) 575s ***** error paramci (pd) 575s ***** error pdf (pd, 1) 575s ***** error plot (pd) 575s ***** error proflik (pd, 2) 575s ***** error random (pd) 575s ***** error std (pd) 575s ***** error ... 575s truncate (pd, 2, 4) 575s ***** error var (pd) 575s 90 tests, 90 passed, 0 known failure, 0 skipped 575s [inst/dist_obj/BetaDistribution.m] 575s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/BetaDistribution.m 575s ***** demo 575s ## Generate a data set of 5000 random samples from a Beta distribution with 575s ## parameters a = 2 and b = 5. Fit a Beta distribution to this data and plot 575s ## a PDF of the fitted distribution superimposed on a histogram of the data. 575s 575s pd_fixed = makedist ("Beta", "a", 2, "b", 5) 575s randg ("seed", 2); 575s data = random (pd_fixed, 5000, 1); 575s pd_fitted = fitdist (data, "Beta") 575s plot (pd_fitted) 575s msg = "Fitted Beta distribution with a = %0.2f and b = %0.2f"; 575s title (sprintf (msg, pd_fitted.a, pd_fitted.b)) 575s ***** shared pd, t 575s pd = BetaDistribution; 575s t = truncate (pd, 0.2, 0.8); 575s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 575s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 575s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 575s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 575s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 575s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 575s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 575s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 575s ***** assert (iqr (pd), 0.5, 1e-4); 575s ***** assert (iqr (t), 0.3, 1e-4); 575s ***** assert (mean (pd), 0.5); 575s ***** assert (mean (t), 0.5, 1e-6); 575s ***** assert (median (pd), 0.5); 575s ***** assert (median (t), 0.5, 1e-6); 575s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 575s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 575s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 575s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 575s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 575s ***** assert (any (random (t, 1000, 1) < 0.2), false); 575s ***** assert (any (random (t, 1000, 1) > 0.8), false); 575s ***** assert (std (pd), 0.2887, 1e-4); 575s ***** assert (std (t), 0.1732, 1e-4); 579s ***** assert (var (pd), 0.0833, 1e-4); 579s ***** assert (var (t), 0.0300, 1e-4); 579s ***** error ... 579s BetaDistribution(0, 1) 579s ***** error ... 579s BetaDistribution(Inf, 1) 579s ***** error ... 579s BetaDistribution(i, 1) 579s ***** error ... 579s BetaDistribution("a", 1) 579s ***** error ... 579s BetaDistribution([1, 2], 1) 579s ***** error ... 579s BetaDistribution(NaN, 1) 579s ***** error ... 579s BetaDistribution(1, 0) 579s ***** error ... 579s BetaDistribution(1, -1) 579s ***** error ... 579s BetaDistribution(1, Inf) 579s ***** error ... 579s BetaDistribution(1, i) 579s ***** error ... 579s BetaDistribution(1, "a") 579s ***** error ... 579s BetaDistribution(1, [1, 2]) 579s ***** error ... 579s BetaDistribution(1, NaN) 579s ***** error ... 579s cdf (BetaDistribution, 2, "uper") 579s ***** error ... 579s cdf (BetaDistribution, 2, 3) 579s ***** shared x 579s randg ("seed", 1); 579s x = betarnd (1, 1, [100, 1]); 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 0) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 1) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", "") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 579s "parameter", {"a", "b", "param"}) 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "parameter", "param") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "NAME", "value") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 579s ***** error ... 579s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 579s "NAME", "value") 579s ***** error ... 579s plot (BetaDistribution, "Parent") 579s ***** error ... 579s plot (BetaDistribution, "PlotType", 12) 579s ***** error ... 579s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 579s ***** error ... 579s plot (BetaDistribution, "PlotType", "pdfcdf") 579s ***** error ... 579s plot (BetaDistribution, "Discrete", "pdfcdf") 579s ***** error ... 579s plot (BetaDistribution, "Discrete", [1, 0]) 579s ***** error ... 579s plot (BetaDistribution, "Discrete", {true}) 579s ***** error ... 579s plot (BetaDistribution, "Parent", 12) 579s ***** error ... 579s plot (BetaDistribution, "Parent", "hax") 579s ***** error ... 579s plot (BetaDistribution, "invalidNAME", "pdf") 579s ***** error ... 579s plot (BetaDistribution, "PlotType", "probability") 579s ***** error ... 579s proflik (BetaDistribution, 2) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 3) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), [1, 2]) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), {1}) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, ones (2)) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display") 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display", 1) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 579s ***** error ... 579s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 579s ***** error ... 579s truncate (BetaDistribution) 579s ***** error ... 579s truncate (BetaDistribution, 2) 579s ***** error ... 579s truncate (BetaDistribution, 4, 2) 579s ***** shared pd 579s pd = BetaDistribution(1, 1); 579s pd(2) = BetaDistribution(1, 3); 579s ***** error cdf (pd, 1) 579s ***** error icdf (pd, 0.5) 579s ***** error iqr (pd) 579s ***** error mean (pd) 579s ***** error median (pd) 579s ***** error negloglik (pd) 579s ***** error paramci (pd) 579s ***** error pdf (pd, 1) 579s ***** error plot (pd) 579s ***** error proflik (pd, 2) 579s ***** error random (pd) 579s ***** error std (pd) 579s ***** error ... 579s truncate (pd, 2, 4) 579s ***** error var (pd) 579s 96 tests, 96 passed, 0 known failure, 0 skipped 579s [inst/dist_obj/WeibullDistribution.m] 579s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/WeibullDistribution.m 579s ***** demo 579s ## Generate a data set of 5000 random samples from a Weibull distribution with 579s ## parameters lambda = 1 and k = 2. Fit a Weibull distribution to this data and plot 579s ## a PDF of the fitted distribution superimposed on a histogram of a data. 579s 579s pd_fixed = makedist ("Weibull", "lambda", 1, "k", 2) 579s rand ("seed", 2); 579s data = random (pd_fixed, 5000, 1); 579s pd_fitted = fitdist (data, "Weibull") 579s plot (pd_fitted) 579s msg = "Fitted Weibull distribution with lambda = %0.2f and k = %0.2f"; 579s title (sprintf (msg, pd_fitted.lambda, pd_fitted.k)) 579s ***** shared pd, t 579s pd = WeibullDistribution; 579s t = truncate (pd, 2, 4); 579s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 579s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 579s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 579s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 579s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 579s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 579s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 579s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 579s ***** assert (iqr (pd), 1.0986, 1e-4); 579s ***** assert (iqr (t), 0.8020, 1e-4); 579s ***** assert (mean (pd), 1, 1e-14); 579s ***** assert (mean (t), 2.6870, 1e-4); 579s ***** assert (median (pd), 0.6931, 1e-4); 579s ***** assert (median (t), 2.5662, 1e-4); 579s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 579s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 579s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 579s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 579s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 579s ***** assert (any (random (t, 1000, 1) < 2), false); 579s ***** assert (any (random (t, 1000, 1) > 4), false); 579s ***** assert (std (pd), 1, 1e-14); 579s ***** assert (std (t), 0.5253, 1e-4); 579s ***** assert (var (pd), 1, 1e-14); 579s ***** assert (var (t), 0.2759, 1e-4); 579s ***** error ... 579s WeibullDistribution(0, 1) 579s ***** error ... 579s WeibullDistribution(-1, 1) 579s ***** error ... 579s WeibullDistribution(Inf, 1) 579s ***** error ... 579s WeibullDistribution(i, 1) 579s ***** error ... 579s WeibullDistribution("a", 1) 579s ***** error ... 579s WeibullDistribution([1, 2], 1) 579s ***** error ... 579s WeibullDistribution(NaN, 1) 579s ***** error ... 579s WeibullDistribution(1, 0) 579s ***** error ... 579s WeibullDistribution(1, -1) 579s ***** error ... 579s WeibullDistribution(1, Inf) 579s ***** error ... 579s WeibullDistribution(1, i) 579s ***** error ... 579s WeibullDistribution(1, "a") 579s ***** error ... 579s WeibullDistribution(1, [1, 2]) 579s ***** error ... 579s WeibullDistribution(1, NaN) 579s ***** error ... 579s cdf (WeibullDistribution, 2, "uper") 579s ***** error ... 579s cdf (WeibullDistribution, 2, 3) 579s ***** shared x 579s x = wblrnd (1, 1, [1, 100]); 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 0) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 1) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", "") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 579s "parameter", {"lambda", "k", "param"}) 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "parameter", "param") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "NAME", "value") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 579s ***** error ... 579s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 579s "NAME", "value") 579s ***** error ... 579s plot (WeibullDistribution, "Parent") 579s ***** error ... 579s plot (WeibullDistribution, "PlotType", 12) 579s ***** error ... 579s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 579s ***** error ... 579s plot (WeibullDistribution, "PlotType", "pdfcdf") 579s ***** error ... 579s plot (WeibullDistribution, "Discrete", "pdfcdf") 579s ***** error ... 579s plot (WeibullDistribution, "Discrete", [1, 0]) 579s ***** error ... 579s plot (WeibullDistribution, "Discrete", {true}) 579s ***** error ... 579s plot (WeibullDistribution, "Parent", 12) 579s ***** error ... 579s plot (WeibullDistribution, "Parent", "hax") 579s ***** error ... 579s plot (WeibullDistribution, "invalidNAME", "pdf") 579s ***** error ... 579s plot (WeibullDistribution, "PlotType", "probability") 579s ***** error ... 579s proflik (WeibullDistribution, 2) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 3) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), [1, 2]) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), {1}) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, ones (2)) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display") 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 579s ***** error ... 579s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 579s ***** error ... 579s truncate (WeibullDistribution) 579s ***** error ... 579s truncate (WeibullDistribution, 2) 579s ***** error ... 579s truncate (WeibullDistribution, 4, 2) 579s ***** shared pd 579s pd = WeibullDistribution(1, 1); 579s pd(2) = WeibullDistribution(1, 3); 579s ***** error cdf (pd, 1) 579s ***** error icdf (pd, 0.5) 579s ***** error iqr (pd) 579s ***** error mean (pd) 579s ***** error median (pd) 579s ***** error negloglik (pd) 579s ***** error paramci (pd) 579s ***** error pdf (pd, 1) 579s ***** error plot (pd) 579s ***** error proflik (pd, 2) 579s ***** error random (pd) 579s ***** error std (pd) 579s ***** error ... 579s truncate (pd, 2, 4) 579s ***** error var (pd) 579s 97 tests, 97 passed, 0 known failure, 0 skipped 579s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 579s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 579s ***** shared pd, t 579s pd = GeneralizedExtremeValueDistribution; 579s t = truncate (pd, 2, 4); 579s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 579s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 579s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 579s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 579s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 579s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 579s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 579s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 579s ***** assert (iqr (pd), 1.5725, 1e-4); 579s ***** assert (iqr (t), 0.8164, 1e-4); 579s ***** assert (mean (pd), 0.5772, 1e-4); 579s ***** assert (mean (t), 2.7043, 1e-4); 579s ***** assert (median (pd), 0.3665, 1e-4); 579s ***** assert (median (t), 2.5887, 1e-4); 579s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 579s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 579s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 579s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 579s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 579s ***** assert (any (random (t, 1000, 1) < 2), false); 579s ***** assert (any (random (t, 1000, 1) > 4), false); 579s ***** assert (std (pd), 1.2825, 1e-4); 579s ***** assert (std (t), 0.5289, 1e-4); 579s ***** assert (var (pd), 1.6449, 1e-4); 579s ***** assert (var (t), 0.2798, 1e-4); 579s ***** error ... 579s GeneralizedExtremeValueDistribution(Inf, 1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(i, 1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution("a", 1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(NaN, 1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 0, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, -1, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, Inf, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, i, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, "a", 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, NaN, 1) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 1, Inf) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 1, i) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 1, "a") 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 579s ***** error ... 579s GeneralizedExtremeValueDistribution(1, 1, NaN) 579s ***** error ... 579s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 579s ***** error ... 579s cdf (GeneralizedExtremeValueDistribution, 2, 3) 579s ***** shared x 579s x = gevrnd (1, 1, 1, [1, 100]); 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 579s "parameter", "sigma", "alpha", {0.05}) 579s ***** error ... 579s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 579s "parameter", {"k", "sigma", "mu", "param"}) 580s ***** error ... 580s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 580s "parameter", {"k", "sigma", "mu", "param"}) 580s ***** error ... 580s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 580s ***** error ... 580s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 580s "parameter", "param") 580s ***** error ... 580s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 580s ***** error ... 580s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 580s "NAME", "value") 581s ***** error ... 581s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 581s "parameter", "sigma", "NAME", "value") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Parent") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 581s ***** error ... 581s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 581s ***** error ... 581s proflik (GeneralizedExtremeValueDistribution, 2) 581s ***** error ... 581s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 581s ***** error ... 581s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 581s ***** error ... 581s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 582s ***** error ... 582s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 582s ***** error ... 582s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 582s ***** error ... 582s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 582s ***** error ... 582s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 582s ***** error ... 582s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 583s ***** error ... 583s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 583s "Display", ["on"; "on"]) 583s ***** error ... 583s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 583s ***** error ... 583s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 583s ***** error ... 583s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 584s ***** error ... 584s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 584s "Display", "on") 584s ***** error ... 584s truncate (GeneralizedExtremeValueDistribution) 584s ***** error ... 584s truncate (GeneralizedExtremeValueDistribution, 2) 584s ***** error ... 584s truncate (GeneralizedExtremeValueDistribution, 4, 2) 584s ***** shared pd 584s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 584s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 584s ***** error cdf (pd, 1) 584s ***** error icdf (pd, 0.5) 584s ***** error iqr (pd) 584s ***** error mean (pd) 584s ***** error median (pd) 584s ***** error negloglik (pd) 584s ***** error paramci (pd) 584s ***** error pdf (pd, 1) 584s ***** error plot (pd) 584s ***** error proflik (pd, 2) 584s ***** error random (pd) 584s ***** error std (pd) 584s ***** error ... 584s truncate (pd, 2, 4) 584s ***** error var (pd) 584s 100 tests, 100 passed, 0 known failure, 0 skipped 584s [inst/dist_obj/GammaDistribution.m] 584s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/GammaDistribution.m 584s ***** shared pd, t 584s pd = GammaDistribution (1, 1); 584s t = truncate (pd, 2, 4); 584s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 584s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 584s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 584s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 584s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 584s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 584s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 584s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 584s ***** assert (iqr (pd), 1.0986, 1e-4); 584s ***** assert (iqr (t), 0.8020, 1e-4); 584s ***** assert (mean (pd), 1); 584s ***** assert (mean (t), 2.6870, 1e-4); 584s ***** assert (median (pd), 0.6931, 1e-4); 584s ***** assert (median (t), 2.5662, 1e-4); 584s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 584s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 584s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 584s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 584s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 584s ***** assert (any (random (t, 1000, 1) < 2), false); 584s ***** assert (any (random (t, 1000, 1) > 4), false); 584s ***** assert (std (pd), 1); 584s ***** assert (std (t), 0.5253, 1e-4); 584s ***** assert (var (pd), 1); 584s ***** assert (var (t), 0.2759, 1e-4); 584s ***** error ... 584s GammaDistribution(0, 1) 584s ***** error ... 584s GammaDistribution(Inf, 1) 584s ***** error ... 584s GammaDistribution(i, 1) 584s ***** error ... 584s GammaDistribution("a", 1) 584s ***** error ... 584s GammaDistribution([1, 2], 1) 584s ***** error ... 584s GammaDistribution(NaN, 1) 584s ***** error ... 584s GammaDistribution(1, 0) 584s ***** error ... 584s GammaDistribution(1, -1) 584s ***** error ... 584s GammaDistribution(1, Inf) 584s ***** error ... 584s GammaDistribution(1, i) 584s ***** error ... 584s GammaDistribution(1, "a") 584s ***** error ... 584s GammaDistribution(1, [1, 2]) 584s ***** error ... 584s GammaDistribution(1, NaN) 584s ***** error ... 584s cdf (GammaDistribution, 2, "uper") 584s ***** error ... 584s cdf (GammaDistribution, 2, 3) 584s ***** shared x 584s x = gamrnd (1, 1, [100, 1]); 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha") 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", 0) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", 1) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", "") 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 584s "parameter", {"a", "b", "param"}) 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "parameter", "param") 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "NAME", "value") 584s ***** error ... 584s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 585s ***** error ... 585s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 585s "NAME", "value") 585s ***** error ... 585s plot (GammaDistribution, "Parent") 585s ***** error ... 585s plot (GammaDistribution, "PlotType", 12) 585s ***** error ... 585s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 585s ***** error ... 585s plot (GammaDistribution, "PlotType", "pdfcdf") 585s ***** error ... 585s plot (GammaDistribution, "Discrete", "pdfcdf") 585s ***** error ... 585s plot (GammaDistribution, "Discrete", [1, 0]) 585s ***** error ... 585s plot (GammaDistribution, "Discrete", {true}) 585s ***** error ... 585s plot (GammaDistribution, "Parent", 12) 585s ***** error ... 585s plot (GammaDistribution, "Parent", "hax") 585s ***** error ... 585s plot (GammaDistribution, "invalidNAME", "pdf") 585s ***** error ... 585s plot (GammaDistribution, "PlotType", "probability") 585s ***** error ... 585s proflik (GammaDistribution, 2) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 3) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), [1, 2]) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), {1}) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, ones (2)) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display") 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display", 1) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 585s ***** error ... 585s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 585s ***** error ... 585s truncate (GammaDistribution) 585s ***** error ... 585s truncate (GammaDistribution, 2) 585s ***** error ... 585s truncate (GammaDistribution, 4, 2) 585s ***** shared pd 585s pd = GammaDistribution(1, 1); 585s pd(2) = GammaDistribution(1, 3); 585s ***** error cdf (pd, 1) 585s ***** error icdf (pd, 0.5) 585s ***** error iqr (pd) 585s ***** error mean (pd) 585s ***** error median (pd) 585s ***** error negloglik (pd) 585s ***** error paramci (pd) 585s ***** error pdf (pd, 1) 585s ***** error plot (pd) 585s ***** error proflik (pd, 2) 585s ***** error random (pd) 585s ***** error std (pd) 585s ***** error ... 585s truncate (pd, 2, 4) 585s ***** error var (pd) 585s 96 tests, 96 passed, 0 known failure, 0 skipped 585s [inst/dist_obj/TriangularDistribution.m] 585s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/TriangularDistribution.m 585s ***** demo 585s ## Generate a data set of 5000 random samples from a Triangular distribution 585s ## with parameters A = 0, B = 1, C = 2. Fit a Triangular distribution to 585s ## this data and plot a PDF of the fitted distribution superimposed on a 585s ## histogram of the data. 585s 585s pd_fixed = makedist ("Triangular", "A", 0, "B", 1, "C", 2); 585s rand ("seed", 2); 585s data = random (pd_fixed, 5000, 1); 585s A = min (data); 585s C = mean (data); 585s B = max (data); 585s 585s [counts, centers] = hist (data, 50); 585s bin_width = centers(2) - centers(1); 585s normalized_counts = counts / (sum (counts) * bin_width); 585s bar (centers, normalized_counts, 1); 585s hold on; 585s 585s x = linspace (A, B, 100); 585s y = (2 * (x - A) / (C - A) .* (x <= C)) + (2 * (B - x) / (B - C) .* (x > C)); 585s 585s plot (x, y, 'r-', 'LineWidth', 2); 585s 585s msg = sprintf ("Fitted Triangular distribution with A = %0.2f, C = %0.2f, B = %0.2f", A, C, B); 585s title (msg); 585s 585s hold off; 585s ***** shared pd, t 585s pd = TriangularDistribution (0, 3, 5); 585s t = truncate (pd, 2, 4); 585s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 585s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 585s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 585s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 585s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 585s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 585s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 585s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 585s ***** assert (iqr (pd), 1.4824, 1e-4); 585s ***** assert (iqr (t), 0.8678, 1e-4); 585s ***** assert (mean (pd), 2.6667, 1e-4); 585s ***** assert (mean (t), 2.9649, 1e-4); 585s ***** assert (median (pd), 2.7386, 1e-4); 585s ***** assert (median (t), 2.9580, 1e-4); 585s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 585s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 585s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 585s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 585s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 585s ***** assert (any (random (t, 1000, 1) < 2), false); 585s ***** assert (any (random (t, 1000, 1) > 4), false); 585s ***** assert (std (pd), 1.0274, 1e-4); 585s ***** assert (std (t), 0.5369, 1e-4); 585s ***** assert (var (pd), 1.0556, 1e-4); 585s ***** assert (var (t), 0.2882, 1e-4); 585s ***** error ... 585s TriangularDistribution (i, 1, 2) 585s ***** error ... 585s TriangularDistribution (Inf, 1, 2) 585s ***** error ... 585s TriangularDistribution ([1, 2], 1, 2) 585s ***** error ... 585s TriangularDistribution ("a", 1, 2) 585s ***** error ... 585s TriangularDistribution (NaN, 1, 2) 585s ***** error ... 585s TriangularDistribution (1, i, 2) 585s ***** error ... 585s TriangularDistribution (1, Inf, 2) 585s ***** error ... 585s TriangularDistribution (1, [1, 2], 2) 585s ***** error ... 585s TriangularDistribution (1, "a", 2) 585s ***** error ... 585s TriangularDistribution (1, NaN, 2) 585s ***** error ... 585s TriangularDistribution (1, 2, i) 585s ***** error ... 585s TriangularDistribution (1, 2, Inf) 585s ***** error ... 585s TriangularDistribution (1, 2, [1, 2]) 585s ***** error ... 585s TriangularDistribution (1, 2, "a") 585s ***** error ... 585s TriangularDistribution (1, 2, NaN) 585s ***** error ... 585s TriangularDistribution (1, 1, 1) 585s ***** error ... 585s TriangularDistribution (1, 0.5, 2) 585s ***** error ... 585s cdf (TriangularDistribution, 2, "uper") 585s ***** error ... 585s cdf (TriangularDistribution, 2, 3) 585s ***** error ... 585s plot (TriangularDistribution, "Parent") 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", 12) 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", "pdfcdf") 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", "pdfcdf") 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", [1, 0]) 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", {true}) 585s ***** error ... 585s plot (TriangularDistribution, "Parent", 12) 585s ***** error ... 585s plot (TriangularDistribution, "Parent", "hax") 585s ***** error ... 585s plot (TriangularDistribution, "invalidNAME", "pdf") 585s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 585s plot (TriangularDistribution, "PlotType", "probability") 585s ***** error ... 585s truncate (TriangularDistribution) 585s ***** error ... 585s truncate (TriangularDistribution, 2) 585s ***** error ... 585s truncate (TriangularDistribution, 4, 2) 585s ***** shared pd 585s pd = TriangularDistribution (0, 1, 2); 585s pd(2) = TriangularDistribution (0, 1, 2); 585s ***** error cdf (pd, 1) 585s ***** error icdf (pd, 0.5) 585s ***** error iqr (pd) 585s ***** error mean (pd) 585s ***** error median (pd) 585s ***** error pdf (pd, 1) 585s ***** error plot (pd) 585s ***** error random (pd) 585s ***** error std (pd) 585s ***** error ... 585s truncate (pd, 2, 4) 585s ***** error var (pd) 585s 69 tests, 69 passed, 0 known failure, 0 skipped 585s [inst/dist_obj/BirnbaumSaundersDistribution.m] 585s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/BirnbaumSaundersDistribution.m 585s ***** demo 585s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 585s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 585s ## distribution to this data and plot a PDF of the fitted distribution 585s ## superimposed on a histogram of the data. 585s 585s pd_fixed = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 585s randg ("seed", 21); 585s data = random (pd_fixed, 5000, 1); 585s pd_fitted = fitdist (data, "BirnbaumSaunders") 585s plot (pd_fitted) 585s msg = "Fitted Birnbaum-Saunders distribution with beta = %0.2f and gamma = %0.2f"; 585s title (sprintf (msg, pd_fitted.beta, pd_fitted.gamma)) 585s ***** shared pd, t 585s pd = BirnbaumSaundersDistribution; 585s t = truncate (pd, 2, 4); 585s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 585s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 585s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 585s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 585s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 585s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 585s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 585s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 585s ***** assert (iqr (pd), 1.4236, 1e-4); 585s ***** assert (iqr (t), 0.8968, 1e-4); 585s ***** assert (mean (pd), 1.5, eps); 585s ***** assert (mean (t), 2.7723, 1e-4); 585s ***** assert (median (pd), 1, 1e-4); 585s ***** assert (median (t), 2.6711, 1e-4); 585s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 585s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 585s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 585s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 585s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 585s ***** assert (any (random (t, 1000, 1) < 2), false); 585s ***** assert (any (random (t, 1000, 1) > 4), false); 585s ***** assert (std (pd), 1.5, eps); 585s ***** assert (std (t), 0.5528, 1e-4); 585s ***** assert (var (pd), 2.25, eps); 585s ***** assert (var (t), 0.3056, 1e-4); 585s ***** error ... 585s BirnbaumSaundersDistribution(0, 1) 585s ***** error ... 585s BirnbaumSaundersDistribution(Inf, 1) 585s ***** error ... 585s BirnbaumSaundersDistribution(i, 1) 585s ***** error ... 585s BirnbaumSaundersDistribution("beta", 1) 585s ***** error ... 585s BirnbaumSaundersDistribution([1, 2], 1) 585s ***** error ... 585s BirnbaumSaundersDistribution(NaN, 1) 585s ***** error ... 585s BirnbaumSaundersDistribution(1, 0) 585s ***** error ... 585s BirnbaumSaundersDistribution(1, -1) 585s ***** error ... 585s BirnbaumSaundersDistribution(1, Inf) 585s ***** error ... 585s BirnbaumSaundersDistribution(1, i) 585s ***** error ... 585s BirnbaumSaundersDistribution(1, "beta") 586s ***** error ... 586s BirnbaumSaundersDistribution(1, [1, 2]) 586s ***** error ... 586s BirnbaumSaundersDistribution(1, NaN) 586s ***** error ... 586s cdf (BirnbaumSaundersDistribution, 2, "uper") 586s ***** error ... 586s cdf (BirnbaumSaundersDistribution, 2, 3) 586s ***** shared x 586s rand ("seed", 5); 586s x = bisarnd (1, 1, [100, 1]); 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 586s "beta", "alpha", {0.05}) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), ... 586s "parameter", {"beta", "gamma", "param"}) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 586s "parameter", {"beta", "gamma", "param"}) 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 586s "parameter", "param") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 586s "NAME", "value") 586s ***** error ... 586s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 586s "parameter", "beta", "NAME", "value") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Parent") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "PlotType", 12) 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Parent", 12) 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "Parent", "hax") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 587s ***** error ... 587s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution, 2) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 3) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 587s ***** error ... 587s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 588s ***** error ... 588s truncate (BirnbaumSaundersDistribution) 588s ***** error ... 588s truncate (BirnbaumSaundersDistribution, 2) 588s ***** error ... 588s truncate (BirnbaumSaundersDistribution, 4, 2) 588s ***** shared pd 588s pd = BirnbaumSaundersDistribution(1, 1); 588s pd(2) = BirnbaumSaundersDistribution(1, 3); 588s ***** error cdf (pd, 1) 588s ***** error icdf (pd, 0.5) 588s ***** error iqr (pd) 588s ***** error mean (pd) 588s ***** error median (pd) 588s ***** error negloglik (pd) 588s ***** error paramci (pd) 588s ***** error pdf (pd, 1) 588s ***** error plot (pd) 588s ***** error proflik (pd, 2) 588s ***** error random (pd) 588s ***** error std (pd) 588s ***** error ... 588s truncate (pd, 2, 4) 588s ***** error var (pd) 588s 96 tests, 96 passed, 0 known failure, 0 skipped 588s [inst/dist_obj/ExtremeValueDistribution.m] 588s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/ExtremeValueDistribution.m 588s ***** shared pd, t 588s pd = ExtremeValueDistribution (0, 1); 588s t = truncate (pd, 2, 4); 588s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 588s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 588s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 588s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 588s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 588s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 588s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 588s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 588s ***** assert (iqr (pd), 1.5725, 1e-4); 588s ***** assert (iqr (t), 0.1338, 1e-4); 588s ***** assert (mean (pd), -0.5772, 1e-4); 588s ***** assert (mean (t), 2.1206, 1e-4); 588s ***** assert (median (pd), -0.3665, 1e-4); 588s ***** assert (median (t), 2.0897, 1e-4); 588s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 588s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 588s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 588s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 588s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 588s ***** assert (any (random (t, 1000, 1) < 2), false); 588s ***** assert (any (random (t, 1000, 1) > 4), false); 588s ***** assert (std (pd), 1.2825, 1e-4); 588s ***** assert (std (t), 0.1091, 1e-4); 588s ***** assert (var (pd), 1.6449, 1e-4); 588s ***** assert (var (t), 0.0119, 1e-4); 588s ***** error ... 588s ExtremeValueDistribution(Inf, 1) 588s ***** error ... 588s ExtremeValueDistribution(i, 1) 588s ***** error ... 588s ExtremeValueDistribution("a", 1) 588s ***** error ... 588s ExtremeValueDistribution([1, 2], 1) 588s ***** error ... 588s ExtremeValueDistribution(NaN, 1) 588s ***** error ... 588s ExtremeValueDistribution(1, 0) 588s ***** error ... 588s ExtremeValueDistribution(1, -1) 588s ***** error ... 588s ExtremeValueDistribution(1, Inf) 588s ***** error ... 588s ExtremeValueDistribution(1, i) 588s ***** error ... 588s ExtremeValueDistribution(1, "a") 588s ***** error ... 588s ExtremeValueDistribution(1, [1, 2]) 588s ***** error ... 588s ExtremeValueDistribution(1, NaN) 588s ***** error ... 588s cdf (ExtremeValueDistribution, 2, "uper") 588s ***** error ... 588s cdf (ExtremeValueDistribution, 2, 3) 588s ***** shared x 588s rand ("seed", 1); 588s x = evrnd (1, 1, [1000, 1]); 588s ***** error ... 588s paramci (ExtremeValueDistribution.fit (x), "alpha") 588s ***** error ... 588s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), ... 589s "parameter", "mu", "alpha", {0.05}) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), ... 589s "parameter", {"mu", "sigma", "param"}) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 589s "parameter", {"mu", "sigma", "param"}) 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 589s "parameter", "param") 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 589s ***** error ... 589s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 589s "parameter", "mu", "NAME", "value") 589s ***** error ... 589s plot (ExtremeValueDistribution, "Parent") 589s ***** error ... 589s plot (ExtremeValueDistribution, "PlotType", 12) 589s ***** error ... 589s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 589s ***** error ... 589s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 589s ***** error ... 589s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 589s ***** error ... 589s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 589s ***** error ... 589s plot (ExtremeValueDistribution, "Discrete", {true}) 589s ***** error ... 589s plot (ExtremeValueDistribution, "Parent", 12) 589s ***** error ... 589s plot (ExtremeValueDistribution, "Parent", "hax") 589s ***** error ... 589s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 589s ***** error ... 589s plot (ExtremeValueDistribution, "PlotType", "probability") 589s ***** error ... 589s proflik (ExtremeValueDistribution, 2) 589s ***** error ... 589s proflik (ExtremeValueDistribution.fit (x), 3) 589s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), {1}) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 601s ***** error ... 601s truncate (ExtremeValueDistribution) 601s ***** error ... 601s truncate (ExtremeValueDistribution, 2) 601s ***** error ... 601s truncate (ExtremeValueDistribution, 4, 2) 601s ***** shared pd 601s pd = ExtremeValueDistribution(1, 1); 601s pd(2) = ExtremeValueDistribution(1, 3); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 95 tests, 95 passed, 0 known failure, 0 skipped 601s [inst/dist_obj/NakagamiDistribution.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/NakagamiDistribution.m 601s ***** demo 601s ## Generate a data set of 5000 random samples from a Nakagami distribution with 601s ## parameters mu = 1 and omega = 1. Fit a Nakagami distribution to this data and plot 601s ## a PDF of the fitted distribution superimposed on a histogram of the data. 601s 601s pd_fixed = makedist ("Nakagami", "mu", 1, "omega", 1) 601s rand ("seed", 2); 601s data = random (pd_fixed, 5000, 1); 601s pd_fitted = fitdist (data, "Nakagami") 601s plot (pd_fitted) 601s msg = "Fitted Nakagami distribution with mu = %0.2f and omega = %0.2f"; 601s title (sprintf (msg, pd_fitted.mu, pd_fitted.omega)) 601s ***** shared pd, t 601s pd = NakagamiDistribution; 601s t = truncate (pd, 2, 4); 601s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 601s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 601s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 601s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 601s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 601s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 601s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 601s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 601s ***** assert (iqr (pd), 0.6411, 1e-4); 601s ***** assert (iqr (t), 0.2502, 1e-4); 601s ***** assert (mean (pd), 0.8862, 1e-4); 601s ***** assert (mean (t), 2.2263, 1e-4); 601s ***** assert (median (pd), 0.8326, 1e-4); 601s ***** assert (median (t), 2.1664, 1e-4); 601s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 601s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 601s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 601s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 601s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 601s ***** assert (any (random (t, 1000, 1) < 2), false); 601s ***** assert (any (random (t, 1000, 1) > 4), false); 601s ***** assert (std (pd), 0.4633, 1e-4); 601s ***** assert (std (t), 0.2083, 1e-4); 601s ***** assert (var (pd), 0.2146, 1e-4); 601s ***** assert (var (t), 0.0434, 1e-4); 601s ***** error ... 601s NakagamiDistribution(Inf, 1) 601s ***** error ... 601s NakagamiDistribution(i, 1) 601s ***** error ... 601s NakagamiDistribution("a", 1) 601s ***** error ... 601s NakagamiDistribution([1, 2], 1) 601s ***** error ... 601s NakagamiDistribution(NaN, 1) 601s ***** error ... 601s NakagamiDistribution(1, 0) 601s ***** error ... 601s NakagamiDistribution(1, -1) 601s ***** error ... 601s NakagamiDistribution(1, Inf) 601s ***** error ... 601s NakagamiDistribution(1, i) 601s ***** error ... 601s NakagamiDistribution(1, "a") 601s ***** error ... 601s NakagamiDistribution(1, [1, 2]) 601s ***** error ... 601s NakagamiDistribution(1, NaN) 601s ***** error ... 601s cdf (NakagamiDistribution, 2, "uper") 601s ***** error ... 601s cdf (NakagamiDistribution, 2, 3) 601s ***** shared x 601s x = nakarnd (1, 0.5, [1, 100]); 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 0) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 1) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", "") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 601s "parameter", {"mu", "omega", "param"}) 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "parameter", "param") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "NAME", "value") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 601s ***** error ... 601s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 601s "NAME", "value") 601s ***** error ... 601s plot (NakagamiDistribution, "Parent") 601s ***** error ... 601s plot (NakagamiDistribution, "PlotType", 12) 601s ***** error ... 601s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 601s ***** error ... 601s plot (NakagamiDistribution, "PlotType", "pdfcdf") 601s ***** error ... 601s plot (NakagamiDistribution, "Discrete", "pdfcdf") 601s ***** error ... 601s plot (NakagamiDistribution, "Discrete", [1, 0]) 601s ***** error ... 601s plot (NakagamiDistribution, "Discrete", {true}) 601s ***** error ... 601s plot (NakagamiDistribution, "Parent", 12) 601s ***** error ... 601s plot (NakagamiDistribution, "Parent", "hax") 601s ***** error ... 601s plot (NakagamiDistribution, "invalidNAME", "pdf") 601s ***** error ... 601s plot (NakagamiDistribution, "PlotType", "probability") 601s ***** error ... 601s proflik (NakagamiDistribution, 2) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 3) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), [1, 2]) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), {1}) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display") 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 601s ***** error ... 601s truncate (NakagamiDistribution) 601s ***** error ... 601s truncate (NakagamiDistribution, 2) 601s ***** error ... 601s truncate (NakagamiDistribution, 4, 2) 601s ***** shared pd 601s pd = NakagamiDistribution(1, 0.5); 601s pd(2) = NakagamiDistribution(1, 0.6); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 95 tests, 95 passed, 0 known failure, 0 skipped 601s [inst/dist_obj/NegativeBinomialDistribution.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/NegativeBinomialDistribution.m 601s ***** demo 601s ## Generate a data set of 5000 random samples from a Negative Binomial 601s ## distribution with parameters R = 5 and P = 0.5. Fit a Negative Binomial 601s ## distribution to this data and plot a PDF of the fitted distribution 601s ## superimposed on a histogram of the data. 601s 601s pd_fixed = makedist ("NegativeBinomial", "R", 5, "P", 0.5) 601s rand ("seed", 2); 601s data = random (pd_fixed, 5000, 1); 601s pd_fitted = fitdist (data, "NegativeBinomial") 601s plot (pd_fitted) 601s msg = "Fitted Negative Binomial distribution with R = %0.2f and P = %0.2f"; 601s title (sprintf (msg, pd_fitted.R, pd_fitted.P)) 601s ***** shared pd, t, t_inf 601s pd = NegativeBinomialDistribution (5, 0.5); 601s t = truncate (pd, 2, 4); 601s t_inf = truncate (pd, 2, Inf); 601s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 601s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 601s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 601s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 601s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 601s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 601s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 601s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 601s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 601s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 601s ***** assert (iqr (pd), 4); 601s ***** assert (iqr (t), 2); 601s ***** assert (mean (pd), 5); 601s ***** assert (mean (t), 3.0500, 1e-4); 601s ***** assert (mean (t_inf), 5.5263, 1e-4); 601s ***** assert (median (pd), 4); 601s ***** assert (median (t), 3); 601s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 601s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 601s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 601s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 601s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 601s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 601s ***** assert (any (random (t, 1000, 1) < 2), false); 601s ***** assert (any (random (t, 1000, 1) > 4), false); 601s ***** assert (std (pd), 3.1623, 1e-4); 601s ***** assert (std (t), 0.8047, 1e-4); 601s ***** assert (std (t_inf), 2.9445, 1e-4); 601s ***** assert (var (pd), 10); 601s ***** assert (var (t), 0.6475, 1e-4); 601s ***** assert (var (t_inf), 8.6704, 1e-4); 601s ***** error ... 601s NegativeBinomialDistribution(Inf, 1) 601s ***** error ... 601s NegativeBinomialDistribution(i, 1) 601s ***** error ... 601s NegativeBinomialDistribution("a", 1) 601s ***** error ... 601s NegativeBinomialDistribution([1, 2], 1) 601s ***** error ... 601s NegativeBinomialDistribution(NaN, 1) 601s ***** error ... 601s NegativeBinomialDistribution(1, 0) 601s ***** error ... 601s NegativeBinomialDistribution(1, -1) 601s ***** error ... 601s NegativeBinomialDistribution(1, Inf) 601s ***** error ... 601s NegativeBinomialDistribution(1, i) 601s ***** error ... 601s NegativeBinomialDistribution(1, "a") 601s ***** error ... 601s NegativeBinomialDistribution(1, [1, 2]) 601s ***** error ... 601s NegativeBinomialDistribution(1, NaN) 601s ***** error ... 601s NegativeBinomialDistribution(1, 1.2) 601s ***** error ... 601s cdf (NegativeBinomialDistribution, 2, "uper") 601s ***** error ... 601s cdf (NegativeBinomialDistribution, 2, 3) 601s ***** shared x 601s x = nbinrnd (1, 0.5, [1, 100]); 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 601s "alpha", {0.05}) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), ... 601s "parameter", {"R", "P", "param"}) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 601s "parameter", {"R", "P", "param"}) 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 601s "parameter", "param") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 601s "NAME", "value") 601s ***** error ... 601s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 601s "parameter", "R", "NAME", "value") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Parent") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "PlotType", 12) 601s ***** error ... 601s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 601s ***** error ... 601s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Discrete", {true}) 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Parent", 12) 601s ***** error ... 601s plot (NegativeBinomialDistribution, "Parent", "hax") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 601s ***** error ... 601s plot (NegativeBinomialDistribution, "PlotType", "probability") 601s ***** error ... 601s proflik (NegativeBinomialDistribution, 2) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 3) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), {1}) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 601s ***** error ... 601s truncate (NegativeBinomialDistribution) 601s ***** error ... 601s truncate (NegativeBinomialDistribution, 2) 601s ***** error ... 601s truncate (NegativeBinomialDistribution, 4, 2) 601s ***** shared pd 601s pd = NegativeBinomialDistribution(1, 0.5); 601s pd(2) = NegativeBinomialDistribution(1, 0.6); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 102 tests, 102 passed, 0 known failure, 0 skipped 601s [inst/dist_obj/GeneralizedParetoDistribution.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_obj/GeneralizedParetoDistribution.m 601s ***** shared pd, t 601s pd = GeneralizedParetoDistribution (1, 1, 1); 601s t = truncate (pd, 2, 4); 601s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 601s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 601s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 601s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 601s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 601s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 601s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 601s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 601s ***** assert (iqr (pd), 2.6667, 1e-4); 601s ***** assert (iqr (t), 0.9143, 1e-4); 601s ***** assert (mean (pd), Inf); 601s ***** assert (mean (t), 2.7726, 1e-4); 601s ***** assert (median (pd), 2); 601s ***** assert (median (t), 2.6667, 1e-4); 601s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 601s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 601s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 601s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 601s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 601s ***** assert (any (random (t, 1000, 1) < 2), false); 601s ***** assert (any (random (t, 1000, 1) > 4), false); 601s ***** assert (std (pd), Inf); 601s ***** assert (std (t), 0.5592, 1e-4); 601s ***** assert (var (pd), Inf); 601s ***** assert (var (t), 0.3128, 1e-4); 601s ***** error ... 601s GeneralizedParetoDistribution(Inf, 1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(i, 1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution("a", 1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution([1, 2], 1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(NaN, 1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, 0, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, -1, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, Inf, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, i, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, "a", 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, [1, 2], 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, NaN, 1) 601s ***** error ... 601s GeneralizedParetoDistribution(1, 1, Inf) 601s ***** error ... 601s GeneralizedParetoDistribution(1, 1, i) 601s ***** error ... 601s GeneralizedParetoDistribution(1, 1, "a") 601s ***** error ... 601s GeneralizedParetoDistribution(1, 1, [1, 2]) 601s ***** error ... 601s GeneralizedParetoDistribution(1, 1, NaN) 601s ***** error ... 601s cdf (GeneralizedParetoDistribution, 2, "uper") 601s ***** error ... 601s cdf (GeneralizedParetoDistribution, 2, 3) 601s ***** shared x 601s x = gprnd (1, 1, 1, [1, 100]); 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 601s "parameter", "sigma", "alpha", {0.05}) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 601s "parameter", {"k", "sigma", "param"}) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 601s "parameter", {"k", "sigma", "param"}) 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 601s "parameter", "param") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 601s "NAME", "value") 601s ***** error ... 601s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 601s "parameter", "sigma", "NAME", "value") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Parent") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "PlotType", 12) 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Discrete", {true}) 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Parent", 12) 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "Parent", "hax") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 601s ***** error ... 601s plot (GeneralizedParetoDistribution, "PlotType", "probability") 601s ***** error ... 601s proflik (GeneralizedParetoDistribution, 2) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 601s "Display", ["on"; "on"]) 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 601s ***** error ... 601s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 601s "Display", "on") 601s ***** error ... 601s truncate (GeneralizedParetoDistribution) 601s ***** error ... 601s truncate (GeneralizedParetoDistribution, 2) 601s ***** error ... 601s truncate (GeneralizedParetoDistribution, 4, 2) 601s ***** shared pd 601s pd = GeneralizedParetoDistribution(1, 1, 1); 601s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 601s ***** error cdf (pd, 1) 601s ***** error icdf (pd, 0.5) 601s ***** error iqr (pd) 601s ***** error mean (pd) 601s ***** error median (pd) 601s ***** error negloglik (pd) 601s ***** error paramci (pd) 601s ***** error pdf (pd, 1) 601s ***** error plot (pd) 601s ***** error proflik (pd, 2) 601s ***** error random (pd) 601s ***** error std (pd) 601s ***** error ... 601s truncate (pd, 2, 4) 601s ***** error var (pd) 601s 100 tests, 100 passed, 0 known failure, 0 skipped 601s [inst/vartestn.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/vartestn.m 601s ***** demo 601s ## Test the null hypothesis that the variances are equal across the five 601s ## columns of data in the students’ exam grades matrix, grades. 601s 601s load examgrades 601s vartestn (grades) 601s ***** demo 601s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 601s ## equal across different model years. 601s 601s load carsmall 601s vartestn (MPG, Model_Year) 601s ***** demo 601s ## Use Levene’s test to test the null hypothesis that the variances in miles 601s ## per gallon (MPG) are equal across different model years. 601s 601s load carsmall 601s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 601s ***** demo 601s ## Test the null hypothesis that the variances are equal across the five 601s ## columns of data in the students’ exam grades matrix, grades, using the 601s ## Brown-Forsythe test. Suppress the display of the summary table of 601s ## statistics and the box plot. 601s 601s load examgrades 601s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 601s ***** error vartestn (); 601s ***** error vartestn (1); 601s ***** error ... 601s vartestn ([1, 2, 3, 4, 5, 6, 7]); 601s ***** error ... 601s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 601s ***** error ... 601s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 601s ***** error ... 601s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 601s ***** error ... 601s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 601s ***** error ... 601s vartestn (ones (50,3), "Display", "some"); 601s ***** error ... 601s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 601s ***** error ... 601s vartestn (ones (50,3), [], "som"); 601s ***** error ... 601s vartestn (ones (50,3), [], "some", "some"); 601s ***** error ... 601s vartestn (ones (50,3), [1, 2], "Display", "off"); 601s ***** test 601s load examgrades 601s [p, stat] = vartestn (grades, "Display", "off"); 601s assert (p, 7.908647337018238e-08, 1e-14); 601s assert (stat.chisqstat, 38.7332, 1e-4); 601s assert (stat.df, 4); 601s ***** test 601s load examgrades 601s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 601s assert (p, 9.523239714592791e-07, 1e-14); 601s assert (stat.fstat, 8.5953, 1e-4); 601s assert (stat.df, [4, 595]); 601s ***** test 601s load examgrades 601s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 601s assert (p, 7.219514351897161e-07, 1e-14); 601s assert (stat.fstat, 8.7503, 1e-4); 601s assert (stat.df, [4, 595]); 601s ***** test 601s load examgrades 601s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 601s assert (p, 1.312093241723211e-06, 1e-14); 601s assert (stat.fstat, 8.4160, 1e-4); 601s assert (stat.df, [4, 595]); 601s ***** test 601s load examgrades 601s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 601s assert (p, 8.235660885480556e-07, 1e-14); 601s assert (stat.fstat, 8.6766, 1e-4); 601s assert (stat.df, [4, 595]); 601s 17 tests, 17 passed, 0 known failure, 0 skipped 601s [inst/nanmean.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/nanmean.m 601s ***** demo 601s ## Find the column means for a matrix with missing values., 601s 601s x = magic (3); 601s x([1, 4, 7:9]) = NaN 601s y = nanmean (x) 601s ***** demo 601s ## Find the row means for a matrix with missing values., 601s 601s x = magic (3); 601s x([1, 4, 7:9]) = NaN 601s y = nanmean (x, 2) 601s ***** demo 601s ## Find the mean of all the values in a multidimensional array 601s ## with missing values. 601s 601s x = reshape (1:30, [2, 5, 3]); 601s x([10:12, 25]) = NaN 601s y = nanmean (x, "all") 601s ***** demo 601s ## Find the mean of a multidimensional array with missing values over 601s ## multiple dimensions. 601s 601s x = reshape (1:30, [2, 5, 3]); 601s x([10:12, 25]) = NaN 601s y = nanmean (x, [2, 3]) 601s ***** assert (nanmean ([]), NaN) 601s ***** assert (nanmean (NaN), NaN) 601s ***** assert (nanmean (NaN(3)), [NaN, NaN, NaN]) 601s ***** assert (nanmean ([3 2 NaN 7]), 4) 601s ***** assert (nanmean ([2 4 NaN Inf]), Inf) 601s ***** assert (nanmean ([1 NaN 3; NaN 4 6; 7 8 NaN]), [4 6 4.5]) 601s ***** assert (nanmean ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [2; 5.5; 7.5]) 601s ***** assert (nanmean (uint8 ([2 4 1 7])), 3.5) 601s ***** test 601s x = magic(3); 601s x([1 6:9]) = NaN; 601s assert (nanmean (x), [3.5, 3, NaN]) 601s assert (nanmean (x, 2), [1; 4; 4]) 601s ***** test 601s x = reshape(1:24, [2, 4, 3]); 601s x([5:6, 20]) = NaN; 601s assert (nanmean (x, "all"), 269/21) 601s ***** test 601s x = reshape(1:24,[2, 4, 3]); 601s x([5:6, 20]) = NaN; 601s assert (squeeze (nanmean (x, [1, 2])), [25/6; 100/8; 144/7]) 601s assert (nanmean (x, [2, 3]), [139/11; 13]) 601s 11 tests, 11 passed, 0 known failure, 0 skipped 601s [inst/combnk.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/combnk.m 601s ***** demo 601s c = combnk (1:5, 2); 601s disp ("All pairs of integers between 1 and 5:"); 601s disp (c); 601s ***** test 601s c = combnk (1:3, 2); 601s assert (c, [1, 2; 1, 3; 2, 3]); 601s ***** test 601s c = combnk (1:3, 6); 601s assert (isempty (c)); 601s ***** test 601s c = combnk ({1, 2, 3}, 2); 601s assert (c, {1, 2; 1, 3; 2, 3}); 601s ***** test 601s c = combnk ("hello", 2); 601s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 601s 4 tests, 4 passed, 0 known failure, 0 skipped 601s [inst/signrank.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/signrank.m 601s ***** test 601s load gradespaired.mat 601s [p, h, stats] = signrank (gradespaired(:,1), ... 601s gradespaired(:,2), 'tail', 'left'); 601s assert (p, 0.0047, 1e-4); 601s assert (h, true); 601s assert (stats.zval, -2.5982, 1e-4); 601s assert (stats.signedrank, 2017.5); 601s ***** test 601s load ('gradespaired.mat'); 601s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 601s 'tail', 'left', 'method', 'exact'); 601s assert (p, 0.0045, 1e-4); 601s assert (h, true); 601s assert (stats.zval, NaN); 601s assert (stats.signedrank, 2017.5); 601s ***** test 601s load mileage 601s [p, h, stats] = signrank (mileage(:,2), 33); 601s assert (p, 0.0312, 1e-4); 601s assert (h, true); 601s assert (stats.zval, NaN); 601s assert (stats.signedrank, 21); 601s ***** test 601s load mileage 601s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 601s assert (p, 0.0156, 1e-4); 601s assert (h, true); 601s assert (stats.zval, NaN); 601s assert (stats.signedrank, 21); 601s ***** test 601s load mileage 601s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 601s 'alpha', 0.01, 'method', 'approximate'); 601s assert (p, 0.0180, 1e-4); 601s assert (h, false); 601s assert (stats.zval, 2.0966, 1e-4); 601s assert (stats.signedrank, 21); 601s ***** error signrank (ones (2)) 601s ***** error ... 601s signrank ([1, 2, 3, 4], ones (2)) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [1, 2, 3]) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'tail') 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'alpha', 0) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'alpha', "a") 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'tail', "some") 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'method', 0.01) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'method', "some") 601s ***** error ... 601s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 601s 22 tests, 22 passed, 0 known failure, 0 skipped 601s [inst/bar3h.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/bar3h.m 601s ***** demo 601s ## Plotting 5 bars in the same series. 601s 601s y = [50; 40; 30; 20; 10]; 601s bar3h (y); 601s ***** demo 601s ## Plotting 5 bars in different groups. 601s 601s y = [50, 40, 30, 20, 10]; 601s bar3h (y); 601s ***** demo 601s ## A 3D bar graph with each series corresponding to a column in y. 601s 601s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 601s bar3h (y); 601s ***** demo 601s ## Specify z-axis locations as tick names. z must be a column vector! 601s 601s z = [1950, 1960, 1970, 1980, 1990]'; 601s y = [16, 8, 4, 2, 1]'; 601s bar3h (z, y); 601s ***** demo 601s ## Plot 3 series as a grouped plot without any space between the grouped bars 601s 601s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 601s bar3h (y, 1, 'grouped'); 601s ***** demo 601s ## Plot a stacked style 3D bar graph 601s 601s y = [19, 30, 21, 30; 40, 16, 32, 12]; 601s b = bar3h (y, 0.5, 'stacked'); 601s ***** error bar3h ("A") 601s ***** error bar3h ({2,3,4,5}) 601s ***** error ... 601s bar3h ([1,2,3]', ones (2)) 601s ***** error ... 601s bar3h ([1:5], 1.2) 601s ***** error ... 601s bar3h ([1:5]', ones (5), 1.2) 601s ***** error ... 601s bar3h ([1:5]', ones (5), [0.8, 0.7]) 601s ***** error ... 601s bar3h (ones (5), 'width') 601s ***** error ... 601s bar3h (ones (5), 'width', 1.2) 601s ***** error ... 601s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 601s ***** error ... 601s bar3h (ones (5), 'color') 601s ***** error ... 601s bar3h (ones (5), 'color', [0.8, 0.8]) 601s ***** error ... 601s bar3h (ones (5), 'color', "brown") 601s ***** error ... 601s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 601s ***** error ... 601s bar3h (ones (5), 'xlabel') 601s ***** error ... 601s bar3h (ones (5), 'xlabel', 4) 601s ***** error ... 601s bar3h (ones (5), 'zlabel') 601s ***** error ... 601s bar3h (ones (5), 'zlabel', 4) 601s ***** error bar3h (ones (5), 'this', 4) 601s ***** error ... 601s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 601s ***** error ... 601s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 601s 20 tests, 20 passed, 0 known failure, 0 skipped 601s [inst/levene_test.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/levene_test.m 601s ***** error levene_test () 601s ***** error ... 601s levene_test (1, 2, 3, 4, 5); 601s ***** error levene_test (randn (50, 2), 0); 601s ***** error ... 601s levene_test (randn (50, 2), [1, 2, 3]); 601s ***** error ... 601s levene_test (randn (50, 1), ones (55, 1)); 601s ***** error ... 601s levene_test (randn (50, 1), ones (50, 2)); 601s ***** error ... 601s levene_test (randn (50, 2), [], 1.2); 601s ***** error ... 601s levene_test (randn (50, 2), "some_string"); 601s ***** error ... 601s levene_test (randn (50, 2), [], "alpha"); 601s ***** error ... 601s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 601s ***** error ... 601s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 601s ***** error ... 601s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 601s ***** warning ... 601s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades); 601s assert (h, 1); 601s assert (pval, 9.523239714592791e-07, 1e-14); 601s assert (W, 8.59529, 1e-5); 601s assert (df, [4, 595]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 601s assert (h, 1); 601s assert (pval, 9.523239714592791e-07, 1e-14); 601s assert (W, 8.59529, 1e-5); 601s assert (df, [4, 595]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades, [], "median"); 601s assert (h, 1); 601s assert (pval, 1.312093241723211e-06, 1e-14); 601s assert (W, 8.415969, 1e-6); 601s assert (df, [4, 595]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades(:,[1:3])); 601s assert (h, 1); 601s assert (pval, 0.004349390980463497, 1e-14); 601s assert (W, 5.52139, 1e-5); 601s assert (df, [2, 357]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 601s assert (h, 1); 601s assert (pval, 0.004355216763951453, 1e-14); 601s assert (W, 5.52001, 1e-5); 601s assert (df, [2, 357]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 601s assert (h, 0); 601s assert (pval, 0.1807494957440653, 2e-14); 601s assert (W, 1.80200, 1e-5); 601s assert (df, [1, 238]); 601s ***** test 601s load examgrades 601s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 601s assert (h, 0); 601s assert (pval, 0.1978225622063785, 2e-14); 601s assert (W, 1.66768, 1e-5); 601s assert (df, [1, 238]); 601s 20 tests, 20 passed, 0 known failure, 0 skipped 601s [inst/confusionmat.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/confusionmat.m 601s ***** test 601s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 601s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 601s 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; ... 601s 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]; 601s assert (confusionmat (Yt, Yp), C) 601s 1 test, 1 passed, 0 known failure, 0 skipped 601s [inst/Clustering/cvpartition.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/cvpartition.m 601s ***** test 601s custom = [1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 1, 3]'; 601s cv = cvpartition ('CustomPartition', custom); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 15); 601s assert (cv.NumTestSets, 3); 601s assert (cv.TrainSize, [10, 9, 11]); 601s assert (cv.TestSize, [5, 6, 4]); 601s assert (cv.IsCustom, true); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s idx = training (cv, 1); 601s assert (idx, custom != 1); 601s idx = test (cv, 1); 601s assert (idx, custom == 1); 601s idx = training (cv, 2); 601s assert (idx, custom != 2); 601s idx = test (cv, 2); 601s assert (idx, custom == 2); 601s idx = training (cv, 3); 601s assert (idx, custom != 3); 601s idx = test (cv, 3); 601s assert (idx, custom == 3); 601s idx1 = training (cv, 'all'); 601s idx2 = test (cv, 'all'); 601s assert (idx1, ! idx2); 601s ***** test 601s custom = logical ([1, 1, 1, 0, 0, 0, 1, 0, 1, 1])'; 601s cv = cvpartition ('CustomPartition', custom); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 4); 601s assert (cv.TestSize, 6); 601s assert (cv.IsCustom, true); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s idx = training (cv, 1); 601s assert (idx, custom != 1); 601s assert (idx, training (cv, 'all')); 601s idx = test (cv, 1); 601s assert (idx, custom == 1); 601s assert (idx, test (cv, 'all')); 601s ***** test 601s custom = logical ([1, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 1]); 601s cv = cvpartition ('CustomPartition', custom); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 4); 601s assert (cv.NumTestSets, 3); 601s assert (cv.TrainSize, [2, 3, 3]); 601s assert (cv.TestSize, [2, 1, 1]); 601s assert (cv.IsCustom, true); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s idx = training (cv, 1); 601s assert (idx, custom(:,1) == false); 601s idx = test (cv, 1); 601s assert (idx, custom(:,1) == true); 601s idx = training (cv, 2); 601s assert (idx, custom(:,2) == false); 601s idx = test (cv, 2); 601s assert (idx, custom(:,2) == true); 601s assert (! custom, training (cv, 'all')); 601s assert (custom, test (cv, 'all')); 601s ***** test 601s cv = cvpartition ('CustomPartition', [1:8]); 601s assert (cv.Type, 'leaveout'); 601s assert (cv.NumObservations, 8); 601s assert (cv.NumTestSets, 8); 601s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 601s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 601s assert (cv.IsCustom, true); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 7); 601s assert (sum (training (cv, 'all')), cv.TrainSize); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 1); 601s assert (sum (test (cv, 'all')), cv.TestSize); 601s assert (! training (cv, 'all'), test (cv, 'all')); 601s ***** test 601s cv = cvpartition ('CustomPartition', logical (eye (8))); 601s assert (cv.Type, 'leaveout'); 601s assert (cv.NumObservations, 8); 601s assert (cv.NumTestSets, 8); 601s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 601s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 601s assert (cv.IsCustom, true); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 7); 601s assert (sum (training (cv, 'all')), cv.TrainSize); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 1); 601s assert (sum (test (cv, 'all')), cv.TestSize); 601s assert (! training (cv, 'all'), test (cv, 'all')); 601s ***** test 601s cv = cvpartition (10, 'resubstitution'); 601s assert (cv.Type, 'resubstitution'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 10); 601s assert (cv.TestSize, 10); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 10); 601s assert (training (cv, 'all'), logical (ones (10, 1))); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 10); 601s assert (test (cv, 'all'), logical (ones (10, 1))); 601s assert (test (cv), training (cv)); 601s ***** test 601s cv = cvpartition (10, 'leaveout'); 601s assert (cv.Type, 'leaveout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 10); 601s assert (cv.TrainSize, ones (1, 10) * 9); 601s assert (cv.TestSize, ones (1, 10)); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 9); 601s assert (training (cv, 'all'), ! logical (eye (10))); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 1); 601s assert (test (cv, 'all'), logical (eye (10))); 601s assert (test (cv), ! training (cv)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s ***** test 601s rand ('seed', 5); # for reproducibility 601s cv = cvpartition (10, 'holdout', 0.3); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 7); 601s assert (cv.TestSize, 3); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 7); 601s assert (training (cv, 'all'), logical ([1, 0, 1, 1, 0, 1, 1, 1, 0, 1])'); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 3); 601s assert (test (cv, 'all'), logical ([0, 1, 0, 0, 1, 0, 0, 0, 1, 0])'); 601s assert (test (cv), ! training (cv)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s ***** test 601s cv = cvpartition (10, 'holdout', 4); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 6); 601s assert (cv.TestSize, 4); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (class (training (cv, 1)), 'logical'); 601s assert (sum (training (cv, 1)), 6); 601s assert (class (test (cv, 1)), 'logical'); 601s assert (sum (test (cv, 1)), 4); 601s assert (test (cv), ! training (cv)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s ***** test 601s cv = cvpartition (5, 'kfold'); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 5); 601s assert (cv.NumTestSets, 5); 601s ***** test 601s cv = cvpartition (20, 'kfold'); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 20); 601s assert (cv.NumTestSets, 10); 601s ***** test 601s cv = cvpartition (10, 'kfold', 5); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 5); 601s assert (cv.TrainSize, [8, 8, 8, 8, 8]); 601s assert (cv.TestSize, [2, 2, 2, 2, 2]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [10, 5]); 601s ***** test 601s grpvar = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 5, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 5); 601s assert (cv.TrainSize, [10, 10, 10, 8, 10]); 601s assert (cv.TestSize, [2, 2, 2, 4, 2]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 5]); 601s assert (sum (test (cv, 'all')), [2, 2, 2, 4, 2]); 601s assert (sum (training (cv, 'all')), [10, 10, 10, 8, 10]); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 3, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 3); 601s assert (cv.TrainSize, [9, 10, 5]); 601s assert (cv.TestSize, [3, 2, 7]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 3]); 601s assert (sum (test (cv, 'all')), [3, 2, 7]); 601s assert (sum (training (cv, 'all')), [9, 10, 5]); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [6, 6]); 601s assert (cv.TestSize, [6, 6]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 2]); 601s assert (sum (test (cv, 'all')), [6, 6]); 601s assert (sum (training (cv, 'all')), [6, 6]); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, NaN, 2, 3, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 11); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [6, 5]); 601s assert (cv.TestSize, [5, 6]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [11, 2]); 601s assert (sum (test (cv, 'all')), [5, 6]); 601s assert (sum (training (cv, 'all')), [6, 5]); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [5, 7]); 601s assert (cv.TestSize, [7, 5]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 2]); 601s assert (sum (test (cv, 'all')), [7, 5]); 601s assert (sum (training (cv, 'all')), [5, 7]); 601s assert (test (cv, 1)', grpvar == 2); 601s assert (test (cv, 2)', grpvar != 2); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [7, 5]); 601s assert (cv.TestSize, [5, 7]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 2]); 601s assert (sum (test (cv, 'all')), [5, 7]); 601s assert (sum (training (cv, 'all')), [7, 5]); 601s assert (test (cv, 1)', grpvar == 2); 601s assert (test (cv, 2)', grpvar != 2); 601s ***** test 601s grpvar = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3]; 601s rand ('seed', 5); 601s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 12); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [7, 5]); 601s assert (cv.TestSize, [5, 7]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, true); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (size (test (cv, 'all')), [12, 2]); 601s assert (sum (test (cv, 'all')), [5, 7]); 601s assert (sum (training (cv, 'all')), [7, 5]); 601s assert (test (cv, 1)', grpvar == 3); 601s assert (test (cv, 2)', grpvar != 3); 601s ***** test 601s rand ('seed', 5); 601s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 3); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 7); 601s assert (cv.TestSize, 3); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, true); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv), logical ([0, 0, 0, 0, 1, 0, 1, 0, 0, 1])'); 601s ***** test 601s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 4); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 6); 601s assert (cv.TestSize, 4); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, true); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (sum (test (cv)(1:5)), 2); 601s assert (sum (test (cv)(6:10)), 2); 601s ***** test 601s grpvar = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2]; 601s rand ('seed', 5); 601s cv = cvpartition (grpvar, 'holdout', 4, 'Stratify', false); 601s assert (cv.Type, 'holdout'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 1); 601s assert (cv.TrainSize, 6); 601s assert (cv.TestSize, 4); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (sum (test (cv)(1:5)), 3); 601s assert (sum (test (cv)(6:10)), 1); 601s ***** test 601s cv = cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [5, 5]); 601s assert (cv.TestSize, [5, 5]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, true); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (sum (test (cv, 1)(1:5)), 3); 601s assert (sum (test (cv, 2)(1:5)), 2); 601s assert (sum (test (cv, 1)(6:10)), 2); 601s assert (sum (test (cv, 2)(6:10)), 3); 601s ***** test 601s grpvar = [1 1 1 1 1 2 2 2 2 1]; 601s rand ('seed', 5); 601s cv = cvpartition (grpvar, 'kfold', 2, 'Stratify', false); 601s assert (cv.Type, 'kfold'); 601s assert (cv.NumObservations, 10); 601s assert (cv.NumTestSets, 2); 601s assert (cv.TrainSize, [5, 5]); 601s assert (cv.TestSize, [5, 5]); 601s assert (cv.IsCustom, false); 601s assert (cv.IsGrouped, false); 601s assert (cv.IsStratified, false); 601s assert (test (cv, 1), ! training (cv, 1)); 601s assert (test (cv, 'all'), ! training (cv, 'all')); 601s assert (sum (test (cv, 1)(1:5)), 4); 601s assert (sum (test (cv, 2)(1:5)), 1); 601s assert (sum (test (cv, 1)(6:10)), 1); 601s assert (sum (test (cv, 2)(6:10)), 4); 601s ***** error cvpartition (2) 601s ***** error cvpartition (1, 2, 3, 4, 5, 6) 601s ***** error ... 601s cvpartition ("CustomPartition", 'a') 601s ***** error ... 601s cvpartition ("CustomPartition", [2, 3; 2, 3]) 601s ***** error ... 601s cvpartition ("CustomPartition", false (3, 3, 3)) 601s ***** error ... 601s cvpartition ("CustomPartition", [false, true; true, true; true, false]) 601s ***** error ... 601s cvpartition ("CustomPartition", false (3, 5)) 601s ***** error ... 601s cvpartition (-20, "LeaveOut") 601s ***** error ... 601s cvpartition (20.5, "LeaveOut") 601s ***** error ... 601s cvpartition (20, "HoldOut", [0.2, 0.3]) 601s ***** error ... 601s cvpartition (20, "HoldOut", 'a') 601s ***** error ... 601s cvpartition (20, "HoldOut", 0) 601s ***** error ... 601s cvpartition (20, "HoldOut", -0.1) 601s ***** error ... 601s cvpartition (20, "HoldOut", 21) 601s ***** error ... 601s cvpartition (20, "kfold", [2, 3]) 601s ***** error ... 601s cvpartition (20, "kfold", 'a') 601s ***** error ... 601s cvpartition (20, "kfold", 2.5) 601s ***** error ... 601s cvpartition (20, "kfold", 21) 601s ***** error ... 601s cvpartition (10, "kfold", 3, "Group") 601s ***** error ... 601s cvpartition (10, "kfold", 3, "GroupingVariables") 601s ***** error ... 601s cvpartition (10, "kfold", 3, "GroupingVariables", ones (3, 3, 3)) 601s ***** error ... 601s cvpartition (10, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}) 601s ***** warning ... 601s cvpartition (5, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}); 601s ***** error ... 601s cvpartition (20, "some") 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "strat") 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify") 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", [true, true]) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", 'no') 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a') 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a', "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3]) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3], "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 0) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 0, "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1, "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2, "stratify", false) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 6) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "holdout", 6, "stratify", false) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a') 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a', "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3]) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3], "stratify", false) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 0) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 0, "stratify", true) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5, "stratify", true) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 5) 601s ***** error ...\ 601s cvpartition ([1, 1, 1, 2, 2], "kfold", 5, "stratify", true) 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "leaveout") 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "resubstitution") 601s ***** error ... 601s cvpartition ([1, 1, 1, 2, 2], "some") 601s ***** error ... 601s cvpartition ({1, 1; 2, 2}, "kfold") 601s ***** error ... 601s repartition (cvpartition ('CustomPartition', [1,1,2,2,3,3])) 601s ***** error ... 601s repartition (cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2, 'Stratify', true), 'legacy') 601s ***** error ... 601s repartition (cvpartition (20, 'Leaveout', 0.2), 'legacy') 601s ***** error ... 601s repartition (cvpartition (20, 'Leaveout', 0.2), 'asd') 601s ***** error ... 601s repartition (cvpartition (20, 'Leaveout', 0.2), 2+i) 601s ***** error ... 601s repartition (cvpartition (20, 'KFold', 5), [34, 56; 2, 3]) 601s ***** error ... 601s test (cvpartition (20, "kfold"), 2, 3) 601s ***** error ... 601s test (cvpartition (20, "kfold"), 0) 601s ***** error ... 601s test (cvpartition (20, "kfold"), 1.5) 601s ***** error ... 601s test (cvpartition (20, "kfold"), [1, 1.5]) 601s ***** error ... 601s test (cvpartition (20, "kfold"), [2, 3; 2, 3]) 601s ***** error ... 601s test (cvpartition (20, "kfold"), 21) 601s ***** error ... 601s test (cvpartition (20, "kfold"), [18, 21]) 601s ***** error ... 601s training (cvpartition (20, "kfold"), 2, 3) 601s ***** error ... 601s training (cvpartition (20, "kfold"), 0) 601s ***** error ... 601s training (cvpartition (20, "kfold"), 1.5) 601s ***** error ... 601s training (cvpartition (20, "kfold"), [1, 1.5]) 601s ***** error ... 601s training (cvpartition (20, "kfold"), [2, 3; 2, 3]) 601s ***** error ... 601s training (cvpartition (20, "kfold"), 21) 601s ***** error ... 601s training (cvpartition (20, "kfold"), [18, 21]) 601s 98 tests, 98 passed, 0 known failure, 0 skipped 601s [inst/Clustering/hnswSearcher.m] 601s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/hnswSearcher.m 601s ***** demo 601s ## Create an hnswSearcher with Euclidean distance 601s X = [1, 2; 3, 4; 5, 6]; 601s obj = hnswSearcher (X); 601s ## Find the nearest neighbor to [2, 3] 601s Y = [2, 3]; 601s [idx, D] = knnsearch (obj, Y, "K", 1); 601s disp ("Nearest neighbor index:"); 601s disp (idx); 601s disp ("Distance:"); 601s disp (D); 601s ***** demo 601s ## Create an hnswSearcher with Minkowski distance (P=3) 601s X = [0, 0; 1, 0; 2, 0]; 601s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 601s ## Find the nearest neighbor to [1, 0] 601s Y = [1, 0]; 601s [idx, D] = knnsearch (obj, Y, "K", 1); 601s disp ("Nearest neighbor index:"); 601s disp (idx); 601s disp ("Distance:"); 601s disp (D); 601s ***** test 601s load fisheriris 601s X = meas; 601s obj = hnswSearcher (X, "Distance", "chebychev"); 601s Y = X(30:35,:); 601s [idx, D] = knnsearch (obj, Y, "K", 4); 601s assert (idx, [[30 31 4 12]; [31 30 10 35]; [32 21 37 28]; [33 47 20 34]; ... 601s [34 16 33 15]; [35 10 26 2]]) 601s assert (D, [[0 0.1000 0.1000 0.2000]; [0 0.1000 0.1000 0.1000]; [0 0.2000 ... 601s 0.2000 0.2000]; [0 0.3000 0.3000 0.3000]; [0 0.2000 0.3000 ... 601s 0.3000]; [0 0.1000 0.1000 0.1000]], 5e-15) 605s ***** test 605s load fisheriris 605s X = meas; 605s C = cov (X); 605s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 605s Y = X(120:125,:); 605s [idx, D] = knnsearch (obj, Y, "K", 2); 605s assert (idx(1, :), [120 82]) 605s assert (idx(4, :), [123 106]) 605s assert (idx(5, :), [124 127]) 605s assert (idx(6, :), [125 57]) 605s assert (D(1, :), [0 0.7734], 1e-4) 605s assert (D(4, :), [0 0.8452], 1e-4) 605s assert (D(5, :), [0 0.4152], 1e-4) 605s assert (D(6, :), [0 0.7322], 1e-4) 617s ***** test 617s ## Basic constructor with default Euclidean 617s X = [1, 2; 3, 4; 5, 6]; 617s obj = hnswSearcher (X); 617s assert (obj.X, X); 617s assert (obj.Distance, "euclidean"); 617s assert (isempty (obj.DistParameter)); 617s ***** test 617s ## Minkowski distance with custom P 617s X = [0, 0; 1, 1; 2, 2]; 617s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 617s assert (obj.Distance, "minkowski"); 617s assert (obj.DistParameter, 3); 617s ***** test 617s ## Seuclidean distance with custom Scale 617s X = [1, 2; 3, 4; 5, 6]; 617s S = [1, 2]; 617s obj = hnswSearcher (X, "Distance", "seuclidean", "Scale", S); 617s assert (obj.Distance, "seuclidean"); 617s assert (obj.DistParameter, S); 617s ***** test 617s ## Mahalanobis distance with custom Cov 617s X = [1, 2; 3, 4; 5, 6]; 617s C = [1, 0; 0, 1]; 617s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 617s assert (obj.Distance, "mahalanobis"); 617s assert (obj.DistParameter, C); 617s ***** test 617s ## knnsearch with Euclidean distance 617s X = [1, 2; 3, 4; 5, 6]; 617s obj = hnswSearcher (X); 617s Y = [2, 3]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [2])); 617s assert (abs (D - sqrt(2)) < 1e-2); 617s ***** test 617s ## knnsearch with Cityblock distance 617s X = [0, 0; 1, 1; 2, 2]; 617s obj = hnswSearcher (X, "Distance", "cityblock"); 617s Y = [1, 0]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [1, 2])); 617s assert (abs (D - 1) < 1e-2); 617s ***** test 617s ## knnsearch with Chebychev distance 617s X = [1, 1; 2, 3; 4, 2]; 617s obj = hnswSearcher (X, "Distance", "chebychev"); 617s Y = [2, 2]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [1, 2])); 617s assert (abs (D - 1) < 1e-2); 617s ***** test 617s ## knnsearch with Minkowski P=3 617s X = [0, 0; 1, 0; 2, 0]; 617s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 617s Y = [1, 0]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [2])); 617s assert (abs (D - 0) < 1e-2); 617s ***** test 617s ## Diverse dataset with Euclidean 617s X = [0, 10; 5, 5; 10, 0]; 617s obj = hnswSearcher (X); 617s Y = [5, 5]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [2])); 617s assert (abs (D - 0) < 1e-2); 617s ***** test 617s ## High-dimensional data with Cityblock 617s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 617s obj = hnswSearcher (X, "Distance", "cityblock"); 617s Y = [4, 5, 6]; 617s [idx, D] = knnsearch (obj, Y, "K", 1); 617s assert (ismember (idx, [2])); 617s assert (abs (D - 0) < 1e-2); 617s ***** error ... 617s hnswSearcher () 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance") 617s ***** error ... 617s hnswSearcher ([]) 617s ***** error ... 617s hnswSearcher ("abc") 617s ***** error ... 617s hnswSearcher ([1; Inf; 3]) 617s ***** error ... 617s hnswSearcher (ones(3,2), "foo", "bar") 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "invalid") 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", 1) 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", [1, 2; 3, 4]) 617s ***** error ... 617s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 617s ***** error ... 617s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 0) 617s ***** error ... 617s hnswSearcher (ones(3,2), "TrainSetSize", -1) 617s ***** error ... 617s hnswSearcher (ones(3,2), "TrainSetSize", 4) 617s ***** error ... 617s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 200, "TrainSetSize", 100) 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2))) 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K") 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), []) 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), "abc") 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), ones(3,3)) 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K", 0) 617s ***** error ... 617s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "foo", "bar") 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj(1) 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj{1} 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.invalid 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj(1) = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj{1} = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.X = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.HNSWGraph = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.Distance = "invalid" 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.Distance = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 617s ***** error ... 617s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 617s ***** error ... 617s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.DistParameter = 1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.MaxNumLinksPerNode = 0 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.TrainSetSize = -1 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.efSearch = 1.5 617s ***** error ... 617s obj = hnswSearcher (ones(3,2)); obj.invalid = 1 617s 54 tests, 54 passed, 0 known failure, 0 skipped 617s [inst/Clustering/DaviesBouldinEvaluation.m] 617s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/DaviesBouldinEvaluation.m 617s ***** test 617s load fisheriris 617s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 617s assert (class (eva), "DaviesBouldinEvaluation"); 617s 1 test, 1 passed, 0 known failure, 0 skipped 617s [inst/Clustering/ClusterCriterion.m] 617s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/ClusterCriterion.m 617s ***** error ... 617s ClusterCriterion ("1", "kmeans", [1:6]) 617s ***** error ... 617s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 617s ***** error ... 617s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 617s ***** error ... 617s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 617s 4 tests, 4 passed, 0 known failure, 0 skipped 617s [inst/Clustering/CalinskiHarabaszEvaluation.m] 617s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/CalinskiHarabaszEvaluation.m 617s ***** test 617s load fisheriris 617s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 617s assert (class (eva), "CalinskiHarabaszEvaluation"); 618s 1 test, 1 passed, 0 known failure, 0 skipped 618s [inst/Clustering/GapEvaluation.m] 618s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/GapEvaluation.m 618s ***** test 618s load fisheriris 618s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 618s "referencedistribution", "uniform"); 618s assert (class (eva), "GapEvaluation"); 624s 1 test, 1 passed, 0 known failure, 0 skipped 624s [inst/Clustering/SilhouetteEvaluation.m] 624s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/SilhouetteEvaluation.m 624s ***** test 624s load fisheriris 624s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 624s assert (class (eva), "SilhouetteEvaluation"); 625s 1 test, 1 passed, 0 known failure, 0 skipped 625s [inst/Clustering/KDTreeSearcher.m] 625s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/KDTreeSearcher.m 625s ***** demo 625s ## Demo to verify implementation using fisheriris dataset 625s load fisheriris 625s numSamples = size (meas, 1); 625s queryIndices = [1, 23, 46, 63, 109]; 625s dataIndices = ~ismember (1:numSamples, queryIndices); 625s queryPoints = meas(queryIndices, :); 625s dataPoints = meas(dataIndices, :); 625s searchRadius = 0.3; 625s kdTree = KDTreeSearcher (dataPoints, 'Distance', 'minkowski') 625s nearestNeighbors = knnsearch (kdTree, queryPoints, "K", 2) 625s neighborsInRange = rangesearch (kdTree, queryPoints, searchRadius) 625s ***** demo 625s ## Create a KDTreeSearcher with Euclidean distance 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = KDTreeSearcher (X); 625s ## Find the nearest neighbor to [2, 3] 625s Y = [2, 3]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s disp ("Nearest neighbor index:"); 625s disp (idx); 625s disp ("Distance:"); 625s disp (D); 625s ## Find all points within radius 2 625s [idx, D] = rangesearch (obj, Y, 2); 625s disp ("Indices within radius:"); 625s disp (idx); 625s disp ("Distances:"); 625s disp (D); 625s ***** demo 625s ## Create a KDTreeSearcher with Minkowski distance (P=3) 625s X = [0, 0; 1, 0; 2, 0]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s ## Find the nearest neighbor to [1, 0] 625s Y = [1, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s disp ("Nearest neighbor index:"); 625s disp (idx); 625s disp ("Distance:"); 625s disp (D); 625s ***** demo 625s rng(42); 625s disp('Demonstrating KDTreeSearcher'); 625s 625s n = 100; 625s mu1 = [0.3, 0.3]; 625s mu2 = [0.7, 0.7]; 625s sigma = 0.1; 625s X1 = mu1 + sigma * randn (n / 2, 2); 625s X2 = mu2 + sigma * randn (n / 2, 2); 625s X = [X1; X2]; 625s 625s obj = KDTreeSearcher(X); 625s 625s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 625s 625s K = 5; 625s [idx, D] = knnsearch (obj, Y, "K", K); 625s 625s disp ('For the first query point:'); 625s disp (['Query point: ', num2str(Y(1,:))]); 625s disp ('Indices of nearest neighbors:'); 625s disp (idx(1,:)); 625s disp ('Distances:'); 625s disp (D(1,:)); 625s 625s figure; 625s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); # Training points 625s hold on; 625s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); # Query points 625s for i = 1:size (Y, 1) 625s query = Y(i,:); 625s neighbors = X(idx(i,:), :); 625s for j = 1:K 625s plot ([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 625s endfor 625s endfor 625s hold off; 625s title ('K Nearest Neighbors with KDTreeSearcher'); 625s xlabel ('X1'); 625s ylabel ('X2'); 625s 625s r = 0.15; 625s [idx, D] = rangesearch (obj, Y, r); 625s 625s disp ('For the first query point in rangesearch:'); 625s disp (['Query point: ', num2str(Y(1,:))]); 625s disp ('Indices of points within radius:'); 625s disp (idx{1}); 625s disp ('Distances:'); 625s disp (D{1}); 625s 625s figure; 625s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); 625s hold on; 625s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); 625s theta = linspace (0, 2 * pi, 100); 625s for i = 1:size (Y, 1) 625s center = Y(i,:); 625s x_circle = center(1) + r * cos (theta); 625s y_circle = center(2) + r * sin (theta); 625s plot (x_circle, y_circle, 'g-'); 625s ## Highlight points within radius 625s if (! isempty (idx{i})) 625s in_radius = X(idx{i}, :); 625s scatter (in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 625s endif 625s endfor 625s hold off 625s title ('Points within Radius with KDTreeSearcher'); 625s xlabel ('X1'); 625s ylabel ('X2'); 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X); 625s Y = X(1:5,:); 625s [idx, D] = knnsearch (obj, Y, "K", 3); 625s assert (idx, [[1, 18, 5]; [2, 35, 46]; [3, 48, 4]; [4, 48, 30]; [5, 38, 1]]) 625s assert (D, [[0, 0.1000, 0.1414]; [0, 0.1414, 0.1414]; [0, 0.1414, 0.2449]; 625s [0, 0.1414, 0.1732]; [0, 0.1414, 0.1414]], 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = X(10:15,:); 625s [idx, D] = knnsearch (obj, Y, "K", 2); 625s assert (idx, [[10, 35]; [11, 49]; [12, 30]; [13, 2]; [14, 39]; [15, 34]]) 625s assert (D, [[0, 0.1000]; [0, 0.1000]; [0, 0.2080]; [0, 0.1260]; [0, 0.2154]; 625s [0, 0.3503]], 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = X(20:25,:); 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, [20; 21; 22; 23; 24; 25]) 625s assert (D, [0; 0; 0; 0; 0; 0]) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = X(30:35,:); 625s [idx, D] = knnsearch (obj, Y, "K", 4); 625s assert (idx, [[30, 31, 4, 12]; [31, 30, 10, 35]; [32, 21, 37, 28]; 625s [33, 20, 34, 47]; [34, 16, 15, 33]; [35, 10, 2, 26]]) 625s assert (D, [[0, 0.1000, 0.1000, 0.2000]; [0, 0.1000, 0.1000, 0.1000]; 625s [0, 0.2000, 0.2000, 0.2000]; [0, 0.3000, 0.3000, 0.3000]; 625s [0, 0.2000, 0.3000, 0.3000]; [0, 0.1000, 0.1000, 0.1000]], 5e-15) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "BucketSize", 20); 625s Y = X(40:45,:); 625s [idx, D] = knnsearch (obj, Y, "K", 2); 625s assert (idx, [[40, 8]; [41, 18]; [42, 9]; [43, 39]; [44, 27]; [45, 47]]) 625s assert (D, [[0, 0.1000]; [0, 0.1414]; [0, 0.6245]; [0, 0.2000]; [0, 0.2236]; 625s [0, 0.3606]], 4.7e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X); 625s Y = X(50:55,:); 625s [idx, D] = knnsearch (obj, Y, "K", 3, "IncludeTies", true); 625s assert (idx, {[50; 8; 40]; [51; 53; 87]; [52; 57; 76]; [53; 51; 87]; [54; ... 625s 90; 81]; [55; 59; 76]}) 625s assert (D, {[0; 0.1414; 0.1732]; [0; 0.2646; 0.3317]; [0; 0.2646; 0.3162]; 625s [0; 0.2646; 0.2828]; [0; 0.2000; 0.3000]; [0; 0.2449; 0.3162]}, 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X); 625s Y = X(60:65,:); 625s [idx, D] = rangesearch (obj, Y, 0.4); 625s assert (idx, {[60; 90]; [61; 94]; [62; 97; 79; 96; 100; 89; 98; 72]; [63]; 625s [64; 92; 74; 79]; [65]}) 625s assert (D, {[0; 0.3873]; [0; 0.3606]; 625s [0; 0.3000; 0.3317; 0.3606; 0.3606; 0.3742; 0.3873; 0.4000]; [0]; 625s [0; 0.1414; 0.2236; 0.2449]; [0]}, 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = X(70:72,:); 625s [idx, D] = rangesearch (obj, Y, 1.0); 625s assert (idx, {[70; 81; 90; 82; 83; 93; 54; 68; 95; 80; 91; 100; 60; 65; ... 625s 89; 63]; [71; 139; 128; 150; 127; 57; 86; 64; 79; 92; 124]; 625s [72; 100; 98; 83; 93; 97; 75; 68; 62; 89; 95; 74; 56; 90; ... 625s 79; 92; 96; 64; 63; 65]}) 625s assert (D, {[0; 0.3000; 0.4000; 0.5000; 0.5000; 0.5000; 0.6000; 0.7000; ... 625s 0.7000; 0.7000; 0.8000; 0.8000; 0.9000; 0.9000; 0.9000; 0.9000]; 625s [0; 0.3000; 0.5000; 0.5000; 0.7000; 0.8000; 0.8000; 1.0000; ... 625s 1.0000; 1.0000; 1]; [0; 0.5000; 0.5000; 0.6000; 0.6000; ... 625s 0.7000; 0.7000; 0.8000; 0.8000; 0.8000; 0.8000; 0.8000; ... 625s 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 1.0000; 1]}, 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = X(80:85,:); 625s [idx, D] = rangesearch (obj, Y, 0.8); 625s assert (idx, {[80; 82; 81; 65; 70; 83; 93; 90; 54; 63; 68; 72; 100; 60; ... 625s 89; 99; 95; 94; 97; 96]; [81; 82; 70; 54; 90; 93; 80; 83; ... 625s 60; 68; 95; 100; 65; 63; 97; 61; 91; 94; 89; 96; 72; 58; ... 625s 62; 56]; [82; 81; 70; 80; 54; 90; 93; 83; 68; 60; 65; 63; ... 625s 100; 95; 94; 61; 58; 97; 89; 72; 96; 91; 99]; [83; 93; ... 625s 100; 68; 70; 72; 95; 90; 97; 65; 89; 96; 81; 82; 80; 62; ... 625s 54; 98; 63; 91; 56; 60; 79; 67; 75; 88; 85; 92; 69]; [84; ... 625s 134; 102; 143; 150; 124; 128; 73; 127; 139; 147; 64; 112; ... 625s 114; 120; 74; 135; 122; 71; 92; 104; 138; 148; 117; 79; ... 625s 55; 56; 57; 67; 111; 129; 69; 78; 59; 52; 133; 85; 88; ... 625s 87]; [85; 67; 56; 97; 95; 89; 96; 91; 100; 62; 71; 122; ... 625s 79; 60; 107; 90; 139; 93; 68; 86; 83; 92; 64; 150; 102; ... 625s 143; 74; 114; 70; 128; 84; 54; 72]}) 625s assert (D, {[0; 0.2884; 0.3530; 0.3826; 0.4062; 0.4198; 0.5117; 0.5440; 0.5718; 625s 0.6000; 0.6018; 0.6073; 0.6308; 0.6333; 0.6753; 0.7000; 0.7192; 625s 0.7230; 0.7350; 0.7459]; 625s [0; 0.1260; 0.1442; 0.2571; 0.2571; 0.3530; 0.3530; 0.3826; 0.4344; 625s 0.4344; 0.4642; 0.4747; 0.5217; 0.5217; 0.5896; 0.6009; 0.6082; 625s 0.6316; 0.6316; 0.6611; 0.6664; 0.6993; 0.7417; 0.7507]; 625s [0; 0.1260; 0.2224; 0.2884; 0.3803; 0.3803; 0.4121; 0.4121; 0.4905; 625s 0.5013; 0.5360; 0.5429; 0.5463; 0.5646; 0.5749; 0.5819; 0.6542; 625s 0.6581; 0.6753; 0.6938; 0.7094; 0.7107; 0.7423]; 625s [0; 0.1260; 0.2224; 0.2520; 0.2571; 0.3107; 0.3302; 0.3332; 0.3332; 625s 0.3530; 0.3530; 0.3803; 0.3826; 0.4121; 0.4198; 0.4344; 0.4531; 625s 0.5155; 0.5217; 0.5348; 0.6028; 0.6073; 0.6374; 0.6527; 0.6611; 625s 0.6804; 0.6938; 0.7399; 0.7560]; 625s [0; 0.3072; 0.3271; 0.3271; 0.3302; 0.3503; 0.3530; 0.3530; 0.3530; 625s 0.3958; 0.3979; 0.4327; 0.4626; 0.4642; 0.5027; 0.5066; 0.5130; 625s 0.5155; 0.5440; 0.5440; 0.5518; 0.5848; 0.6009; 0.6073; 0.6082; 625s 0.6316; 0.6471; 0.6746; 0.6753; 0.6797; 0.6804; 0.7047; 0.7192; 625s 0.7218; 0.7405; 0.7405; 0.7719; 0.7725; 0.7786]; 625s [0; 0.2000; 0.3503; 0.3979; 0.4121; 0.4309; 0.4327; 0.4531; 0.4747; 625s 0.5337; 0.5718; 0.5896; 0.6009; 0.6316; 0.6366; 0.6374; 0.6463; 625s 0.6542; 0.6542; 0.6550; 0.6938; 0.7014; 0.7067; 0.7166; 0.7186; 625s 0.7186; 0.7281; 0.7380; 0.7447; 0.7571; 0.7719; 0.7813; 0.7851]}, 5e-5) 625s ***** test 625s load fisheriris 625s X = meas; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = X(90,:); 625s [idx, D] = rangesearch (obj, Y, 0.7); 625s assert (idx, {[90; 70; 54; 81; 95; 60; 83; 93; 100; 68; 82; 65; 97; 91; ... 625s 56; 61; 62; 63; 67; 79; 80; 85; 89; 96; 72; 92; 107]}) 625s assert (D, {[0; 0.2000; 0.2000; 0.2000; 0.2000; 0.3000; 0.3000; 0.3000; ... 625s 0.3000; 0.3000; 0.3000; 0.4000; 0.4000; 0.4000; 0.5000; ... 625s 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; ... 625s 0.5000; 0.5000; 0.6000; 0.6000; 0.6000]}, 5e-16) 625s ***** test 625s ## Constructor with single-point dataset 625s X = [0, 0]; 625s obj = KDTreeSearcher (X); 625s assert (obj.X, X); 625s assert (obj.Distance, "euclidean"); 625s assert (isempty (obj.DistParameter)); 625s assert (obj.BucketSize, 50); 625s ***** test 625s ## Constructor with duplicate points 625s X = [0, 0; 0, 0; 1, 0]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s assert (obj.X, X); 625s assert (obj.Distance, "cityblock"); 625s ***** test 625s ## Constructor with 3D data 625s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s assert (obj.X, X); 625s assert (obj.DistParameter, 3); 625s ***** test 625s ## knnsearch with grid, K = 1 625s X = [0, 0; 0, 1; 1, 0; 1, 1]; 625s obj = KDTreeSearcher (X, "Distance", "euclidean"); 625s Y = [0.5, 0.5]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s D_true = pdist2 (X, Y, "euclidean"); 625s assert (D, min (D_true), 1e-10); 625s assert (any (idx == find (D_true == min (D_true)))); 625s ***** test 625s ## knnsearch with IncludeTies, all points equidistant 625s X = [0, 0; 0, 1; 1, 0; 1, 1]; 625s obj = KDTreeSearcher (X); 625s Y = [0.5, 0.5]; 625s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 625s D_true = pdist2 (X, Y, "euclidean"); 625s expected_idx = find (D_true == min (D_true)); 625s assert (sort (idx{1}(:)), sort (expected_idx)); 625s assert (D{1}(:)', repmat (min (D_true), 1, 4), 1e-10); 625s ***** test 625s ## rangesearch with line dataset 625s X = [0, 0; 1, 0; 2, 0; 3, 0]; 625s obj = KDTreeSearcher (X); 625s Y = [1.5, 0]; 625s r = 1; 625s [idx, D] = rangesearch (obj, Y, r); 625s D_true = pdist2 (X, Y, "euclidean"); 625s expected_idx = find (D_true <= r); 625s assert (sort (idx{1}(:)), sort (expected_idx)); 625s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 625s ***** test 625s ## knnsearch with duplicates 625s X = [0, 0; 0, 0; 1, 0]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = [0, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 625s assert (sort (idx{1}(:))', [1, 2]); 625s assert (D{1}', [0, 0], 1e-10); 625s ***** test 625s ## rangesearch with 3D data 625s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = [0, 0, 0]; 625s r = 1; 625s [idx, D] = rangesearch (obj, Y, r); 625s assert (sort (idx{1}(:))', [1, 2, 3]); 625s assert (D{1}', [0, 1, 1], 1e-10); 625s ***** test 625s ## knnsearch with P = 2 (Euclidean equivalent) 625s X = [0, 0; 1, 1]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 2); 625s Y = [0, 1]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 1); 625s assert (D, 1, 1e-10); 625s ***** test 625s ## rangesearch with P = 3 625s X = [0, 0; 1, 0; 0, 1]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = [0.5, 0.5]; 625s r = 0.8; 625s [idx, D] = rangesearch (obj, Y, r); 625s D_true = pdist2 (X, Y, "minkowski", 3); 625s expected_idx = find (D_true <= r); 625s assert (sort (idx{1}(:)), sort (expected_idx)); 625s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 625s ***** test 625s ## knnsearch with P = 4, random data 625s X = rand (5, 2); 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 4); 625s Y = rand (1, 2); 625s [idx, D] = knnsearch (obj, Y, "K", 3); 625s D_true = pdist2 (X, Y, "minkowski", 4); 625s [sorted_D, sort_idx] = sort (D_true); 625s assert (idx', sort_idx(1:3)); 625s assert (D', sorted_D(1:3), 1e-10); 625s ***** test 625s ## knnsearch with all same points 625s X = [1, 1; 1, 1; 1, 1]; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = [1, 1]; 625s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 625s assert (sort (idx{1}(:))', [1, 2, 3]); 625s assert (D{1}', [0, 0, 0], 1e-10); 625s ***** test 625s ## rangesearch with grid 625s X = [0, 0; 0, 1; 1, 0; 1, 1]; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = [0.5, 0.5]; 625s r = 0.5; 625s [idx, D] = rangesearch (obj, Y, r); 625s D_true = pdist2 (X, Y, "chebychev"); 625s expected_idx = find (D_true <= r); 625s assert (sort (idx{1}(:)), sort (expected_idx)); 625s assert (D{1}, D_true(expected_idx), 1e-10); 625s ***** test 625s ## Changing Distance and verifying search 625s X = [0,0; 1,0]; 625s obj = KDTreeSearcher(X, "Distance", "euclidean"); 625s Y = [0,1]; 625s [idx, D] = knnsearch(obj, Y, "K", 1); 625s assert(D, 1, 1e-10); 625s obj.Distance = "chebychev"; 625s [idx, D] = knnsearch(obj, Y, "K", 1); 625s assert(D, 1, 1e-10); 625s ***** test 625s ## Changing DistParameter for minkowski 625s X = [0,0; 1,0]; 625s obj = KDTreeSearcher(X, "Distance", "minkowski", "P", 1); 625s Y = [0,1]; 625s [idx, D] = knnsearch(obj, Y, "K", 1); 625s assert(D, 1, 1e-10); 625s obj.DistParameter = 3; 625s [idx, D] = knnsearch(obj, Y, "K", 1); 625s assert(D, 1, 1e-10); 625s ***** test 625s ## Different BucketSize values 625s X = rand(20,2); 625s obj1 = KDTreeSearcher(X, "BucketSize", 5); 625s obj2 = KDTreeSearcher(X, "BucketSize", 15); 625s Y = rand(1,2); 625s [idx1, D1] = knnsearch(obj1, Y, "K", 3); 625s [idx2, D2] = knnsearch(obj2, Y, "K", 3); 625s assert(idx1, idx2); 625s assert(D1, D2, 1e-10); 625s ***** test 625s ## Basic constructor with default Euclidean 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = KDTreeSearcher (X); 625s assert (obj.X, X); 625s assert (obj.Distance, "euclidean"); 625s assert (isempty (obj.DistParameter)); 625s assert (obj.BucketSize, 50); 625s ***** test 625s ## Minkowski distance with custom P 625s X = [0, 0; 1, 1; 2, 2]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s assert (obj.Distance, "minkowski"); 625s assert (obj.DistParameter, 3); 625s ***** test 625s ## Cityblock distance 625s X = [0, 0; 1, 0; 0, 1]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s assert (obj.Distance, "cityblock"); 625s assert (isempty (obj.DistParameter)); 625s ***** test 625s ## Chebychev distance 625s X = [1, 1; 2, 3; 4, 2]; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s assert (obj.Distance, "chebychev"); 625s assert (isempty (obj.DistParameter)); 625s ***** test 625s ## knnsearch with Euclidean distance 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = KDTreeSearcher (X); 625s Y = [2, 3]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 1); 625s assert (D, sqrt(2), 1e-10); 625s ***** test 625s ## knnsearch with Cityblock distance 625s X = [0, 0; 1, 1; 2, 2]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = [1, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (ismember (idx, [1, 2])); 625s assert (D, 1, 1e-10); 625s ***** test 625s ## knnsearch with Chebychev distance 625s X = [1, 1; 2, 3; 4, 2]; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = [2, 2]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (ismember (idx, [1, 2])); 625s assert (D, 1, 1e-10); 625s ***** test 625s ## knnsearch with Minkowski P=3 625s X = [0, 0; 1, 0; 2, 0]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = [1, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 2); 625s assert (D, 0, 1e-10); 625s ***** test 625s ## knnsearch with IncludeTies 625s X = [0, 0; 1, 0; 0, 1]; 625s obj = KDTreeSearcher (X); 625s Y = [0.5, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 625s assert (iscell (idx)); 625s assert (sort (idx{1}(:))', [1, 2]); 625s assert (sort (D{1}(:)), [0.5; 0.5], 1e-10); 625s ***** test 625s ## rangesearch with Euclidean 625s X = [1, 1; 2, 2; 3, 3]; 625s obj = KDTreeSearcher (X); 625s Y = [0, 0]; 625s [idx, D] = rangesearch (obj, Y, 2); 625s assert (idx{1}, [1]); 625s assert (D{1}, [sqrt(2)], 1e-10); 625s ***** test 625s ## rangesearch with Cityblock 625s X = [0, 0; 1, 1; 2, 2]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = [0, 0]; 625s [idx, D] = rangesearch (obj, Y, 1); 625s assert (idx{1}, [1]); 625s assert (D{1}, [0], 1e-10); 625s ***** test 625s ## rangesearch with Chebychev 625s X = [1, 1; 2, 3; 4, 2]; 625s obj = KDTreeSearcher (X, "Distance", "chebychev"); 625s Y = [2, 2]; 625s [idx, D] = rangesearch (obj, Y, 1); 625s assert (sort (idx{1}(:))', [1, 2]); 625s assert (sort (D{1}(:))', [1, 1], 1e-10); 625s ***** test 625s ## rangesearch with Minkowski P=3 625s X = [0, 0; 1, 0; 2, 0]; 625s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = [1, 0]; 625s [idx, D] = rangesearch (obj, Y, 1); 625s assert (sort (idx{1}(:))', [1, 2, 3]); 625s assert (sort (D{1}(:))', [0, 1, 1], 1e-10); 625s ***** test 625s ## Diverse dataset with Euclidean 625s X = [0, 10; 5, 5; 10, 0]; 625s obj = KDTreeSearcher (X); 625s Y = [5, 5]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 2); 625s assert (D, 0, 1e-10); 625s ***** test 625s ## High-dimensional data with Cityblock 625s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 625s obj = KDTreeSearcher (X, "Distance", "cityblock"); 625s Y = [4, 5, 6]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 2); 625s assert (D, 0, 1e-10); 625s ***** error ... 625s KDTreeSearcher () 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "Distance") 625s ***** error ... 625s KDTreeSearcher ("abc") 625s ***** error ... 625s KDTreeSearcher ([1; Inf; 3]) 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "foo", "bar") 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "Distance", "invalid") 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "Distance", 1) 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 625s ***** error ... 625s KDTreeSearcher (ones(3,2), "BucketSize", 0) 625s ***** error ... 625s KDTreeSearcher(ones(3,2), "BucketSize", -1) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2))) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies") 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), "abc", "K", 1) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,3), "K", 1) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 0) 625s ***** error ... 625s obj = KDTreeSearcher(ones(3,2)); knnsearch(obj, ones(1,2), "K", Inf) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "foo", "bar") 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies", 1) 625s ***** error ... 625s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "SortIndices", 1) 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2))) 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), "abc", 1) 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,3), 1) 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), -1) 625s ***** error ... 625s obj = KDTreeSearcher(ones(3,2)); rangesearch(obj, ones(1,2), Inf) 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 625s ***** error ... 625s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj(1) 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj{1} 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.invalid 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj(1) = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj{1} = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.X.Y = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.X = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.KDTree = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.Distance = "invalid" 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.Distance = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.DistParameter = 1 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.BucketSize = 0 625s ***** error ... 625s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = -1 625s ***** error ... 625s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = 1.5 625s ***** error ... 625s obj = KDTreeSearcher (ones(3,2)); obj.invalid = 1 625s 84 tests, 84 passed, 0 known failure, 0 skipped 625s [inst/Clustering/ExhaustiveSearcher.m] 625s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/Clustering/ExhaustiveSearcher.m 625s ***** demo 625s ## Demo to verify implementation using fisheriris dataset 625s load fisheriris 625s rng('default'); 625s numSamples = size (meas, 1); 625s queryIndices = [20, 95, 123, 136, 138]; 625s dataPoints = meas(~ismember (1:numSamples, queryIndices), :); 625s queryPoints = meas(queryIndices, :); 625s searchModel = ExhaustiveSearcher (dataPoints, 'Distance', 'mahalanobis') 625s mahalanobisParam = searchModel.DistParameter 625s searchRadius = 3; 625s nearestNeighbors = knnsearch (searchModel, queryPoints, "K", 2) 625s neighborsInRange = rangesearch (searchModel, queryPoints, searchRadius) 625s ***** demo 625s ## Create an ExhaustiveSearcher with Euclidean distance 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = ExhaustiveSearcher (X); 625s ## Find the nearest neighbor to [2, 3] 625s Y = [2, 3]; 625s [idx, D] = knnsearch (obj, Y); 625s disp ("Nearest neighbor index:"); disp (idx); 625s disp ("Distance:"); disp (D); 625s ## Find all points within radius 2 625s [idx, D] = rangesearch (obj, Y, 2); 625s disp ("Indices within radius:"); disp (idx); 625s disp ("Distances:"); disp (D); 625s ***** demo 625s ## Create an ExhaustiveSearcher with Minkowski distance (P=1) 625s X = [0, 0; 1, 0; 0, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 625s ## Find the 2 nearest neighbors to [0.5, 0.5] 625s Y = [0.5, 0.5]; 625s [idx, D] = knnsearch (obj, Y, "K", 2); 625s disp ("Nearest neighbor indices:"); disp (idx); 625s disp ("Distances:"); disp (D); 625s ***** demo 625s rng(42); 625s disp('Demonstrating ExhaustiveSearcher'); 625s 625s n = 100; 625s mu1 = [0.3, 0.3]; 625s mu2 = [0.7, 0.7]; 625s sigma = 0.1; 625s X1 = mu1 + sigma * randn(n/2, 2); 625s X2 = mu2 + sigma * randn(n/2, 2); 625s X = [X1; X2]; 625s 625s obj = ExhaustiveSearcher(X); 625s 625s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 625s 625s K = 5; 625s [idx, D] = knnsearch(obj, Y, "K", K); 625s 625s disp('For the first query point:'); 625s disp(['Query point: ', num2str(Y(1,:))]); 625s disp('Indices of nearest neighbors:'); 625s disp(idx(1,:)); 625s disp('Distances:'); 625s disp(D(1,:)); 625s 625s figure; 625s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); % Training points 625s hold on; 625s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); % Query points 625s for i = 1:size(Y,1) 625s query = Y(i,:); 625s neighbors = X(idx(i,:), :); 625s for j = 1:K 625s plot([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 625s end 625s end 625s hold off; 625s title('K Nearest Neighbors with ExhaustiveSearcher'); 625s xlabel('X1'); 625s ylabel('X2'); 625s 625s r = 0.15; 625s [idx, D] = rangesearch(obj, Y, r); 625s 625s disp('For the first query point in rangesearch:'); 625s disp(['Query point: ', num2str(Y(1,:))]); 625s disp('Indices of points within radius:'); 625s disp(idx{1}); 625s disp('Distances:'); 625s disp(D{1}); 625s 625s figure; 625s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); 625s hold on; 625s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); 625s theta = linspace(0, 2*pi, 100); 625s for i = 1:size(Y,1) 625s center = Y(i,:); 625s x_circle = center(1) + r * cos(theta); 625s y_circle = center(2) + r * sin(theta); 625s plot(x_circle, y_circle, 'g-'); 625s % Highlight points within radius 625s if ~isempty(idx{i}) 625s in_radius = X(idx{i}, :); 625s scatter(in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 625s end 625s end 625s hold off; 625s title('Points within Radius with ExhaustiveSearcher'); 625s xlabel('X1'); 625s ylabel('X2'); 625s ***** test 625s ## Basic constructor with default Euclidean 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = ExhaustiveSearcher (X); 625s assert (obj.X, X) 625s assert (obj.Distance, "euclidean") 625s assert (isempty (obj.DistParameter)) 625s ***** test 625s ## Minkowski distance with custom P 625s X = [1, 2; 3, 4]; 625s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 625s assert (obj.Distance, "minkowski") 625s assert (obj.DistParameter, 3) 625s ***** test 625s ## Seuclidean distance with custom Scale 625s X = [1, 2; 3, 4; 5, 6]; 625s S = [1, 2]; 625s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 625s assert (obj.Distance, "seuclidean") 625s assert (obj.DistParameter, S) 625s ***** test 625s ## Mahalanobis distance with custom Cov 625s X = [1, 2; 3, 4; 5, 6]; 625s C = [1, 0; 0, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 625s assert (obj.Distance, "mahalanobis") 625s assert (obj.DistParameter, C) 625s ***** test 625s ## knnsearch with Euclidean distance 625s X = [1, 2; 3, 4; 5, 6]; 625s obj = ExhaustiveSearcher (X); 625s Y = [2, 3]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 1) 625s assert (D, sqrt(2), 1e-10) 625s ***** test 625s ## knnsearch with Cityblock distance 625s X = [0, 0; 1, 1; 2, 2]; 625s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 625s Y = [1, 0]; 625s [idx, D] = knnsearch (obj, Y, "K", 1); 625s assert (idx, 1) 625s assert (D, 1, 1e-10) 625s ***** test 625s ## knnsearch with Chebychev distance 625s X = [1, 1; 2, 3; 4, 2]; 625s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 625s Y = [2, 2]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 1) 625s assert (D, 1, 1e-10) 625s ***** test 625s ## knnsearch with Cosine distance 625s X = [1, 0; 0, 1; 1, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 625s Y = [1, 0.5]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 3) 625s assert (D < 0.1, true) 625s ***** test 625s ## knnsearch with Minkowski P=1 (Manhattan) 625s X = [0, 0; 1, 0; 0, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 625s Y = [0.5, 0.5]; 625s [idx, D] = knnsearch (obj, Y, "K", 2, "IncludeTies", true); 625s assert (iscell (idx)) 625s assert (idx{1}, [1, 2, 3]) 625s assert (D{1}, [1, 1, 1], 1e-10) 625s ***** test 625s ## rangesearch with Seuclidean 625s X = [1, 1; 2, 2; 3, 3]; 625s S = [1, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 625s Y = [0, 0]; 625s [idx, D] = rangesearch (obj, Y, 2); 625s assert (idx{1}, [1]) 625s assert (D{1}, [sqrt(2)], 1e-10) 625s ***** test 625s ## rangesearch with Mahalanobis 625s X = [1, 1; 2, 2; 3, 3]; 625s C = [1, 0; 0, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 625s Y = [0, 0]; 625s [idx, D] = rangesearch (obj, Y, 3, "SortIndices", false); 625s assert (idx{1}, [1, 2]) 625s assert (D{1}, [sqrt(2), sqrt(8)], 1e-10) 625s ***** test 625s ## rangesearch with Hamming distance 625s X = [0, 1; 1, 0; 1, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "hamming"); 625s Y = [0, 0]; 625s [idx, D] = rangesearch (obj, Y, 0.5); 625s assert (idx{1}, [1, 2]) 625s assert (D{1}, [0.5, 0.5], 1e-10) 625s ***** test 625s ## Custom distance function 625s X = [1, 2; 3, 4]; 625s custom_dist = @(x, y) sum(abs(x - y)); 625s obj = ExhaustiveSearcher (X, "Distance", custom_dist); 625s Y = [2, 3]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 1) 625s assert (D, 2, 1e-10) 625s ***** test 625s ## Euclidean with high-dimensional data 625s X = [1, 2, 3; 4, 5, 6; 7, 8, 9; 10, 11, 12]; 625s obj = ExhaustiveSearcher (X); 625s Y = [5, 6, 7]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 2) 625s assert (D, sqrt(3), 1e-10) 625s ***** test 625s ## Minkowski P=3 with scaled data 625s X = [0, 1; 2, 3; 4, 5] * 10; 625s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 625s Y = [20, 30]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 2) 625s assert (D, 0, 1e-10) 625s ***** test 625s ## Seuclidean with custom scales on diverse data 625s X = [1, 10; 2, 20; 3, 30]; 625s S = [1, 5]; 625s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 625s Y = [1.5, 15]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 1) 625s assert (D, sqrt((0.5/1)^2 + (5/5)^2), 1e-10) 625s ***** test 625s ## Mahalanobis with correlated data 625s X = [1, 1; 2, 1.5; 3, 2]; 625s C = [1, 0.5; 0.5, 1]; 625s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 625s Y = [2, 1.5]; 625s [idx, D] = knnsearch (obj, Y); 625s assert (idx, 2) 625s assert (D, 0, 1e-10) 626s ***** test 626s ## Cityblock with sparse data 626s X = [0, 0, 1; 1, 0, 0; 0, 1, 0]; 626s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 626s Y = [0, 0, 0]; 626s [idx, D] = rangesearch (obj, Y, 1); 626s assert (idx{1}, [1, 2, 3]) 626s assert (D{1}, [1, 1, 1], 1e-10) 626s ***** test 626s ## Chebychev with extreme values 626s X = [0, 100; 50, 50; 100, 0]; 626s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 626s Y = [60, 60]; 626s [idx, D] = knnsearch (obj, Y); 626s assert (idx, 2) 626s assert (D, 10, 1e-10) 626s ***** test 626s ## Cosine with normalized data 626s X = [1, 0; 0, 1; 1/sqrt(2), 1/sqrt(2)]; 626s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 626s Y = [1, 1]; 626s [idx, D] = knnsearch (obj, Y); 626s assert (idx, 3) 626s assert (D < 0.1, true) 626s ***** test 626s ## Correlation with time-series-like data 626s X = [1, 2, 3; 2, 4, 6; 1, 1, 1]; 626s obj = ExhaustiveSearcher (X, "Distance", "correlation"); 626s Y = [1.5, 3, 4.5]; 626s [idx, D] = knnsearch (obj, Y); 626s assert (idx, 1) 626s assert (D < 0.1, true) 626s ***** test 626s ## Spearman with ranked data 626s X = [1, 2, 3; 3, 2, 1; 2, 1, 3]; 626s obj = ExhaustiveSearcher (X, "Distance", "spearman"); 626s Y = [1, 2, 3]; 626s [idx, D] = knnsearch (obj, Y); 626s assert (idx, 1) 626s assert (D, 0, 1e-10) 626s ***** test 626s ## Jaccard with binary sparse data 626s X = [1, 0, 0; 0, 1, 0; 1, 1, 0]; 626s obj = ExhaustiveSearcher (X, "Distance", "jaccard"); 626s Y = [1, 0, 0]; 626s [idx, D] = knnsearch (obj, Y); 626s assert (idx, 1) 626s assert (D, 0, 1e-10) 626s ***** test 626s obj = ExhaustiveSearcher (ones(3,2)); 626s assert (obj.X, ones(3,2)) 626s assert (obj.Distance, "euclidean") 626s assert (isempty (obj.DistParameter)) 626s ***** test 626s obj = ExhaustiveSearcher (ones(3,2)); 626s obj.Distance = "minkowski"; 626s assert (obj.Distance, "minkowski") 626s ***** test 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); 626s obj.DistParameter = 3; 626s assert (obj.DistParameter, 3) 626s ***** test 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); 626s obj.DistParameter = [1, 2]; 626s assert (obj.DistParameter, [1, 2]) 626s ***** test 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); 626s obj.DistParameter = eye(2); 626s assert (obj.DistParameter, eye(2)) 626s ***** error ... 626s ExhaustiveSearcher () 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance") 626s ***** error ... 626s ExhaustiveSearcher ("abc") 626s ***** error ... 626s ExhaustiveSearcher ([1; Inf; 3]) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "foo", "bar") 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", "invalid") 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", @(x) x) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", 1) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 626s ***** error ... 626s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2))) 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies") 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), "abc") 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,3)) 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "K", 0) 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "foo", "bar") 626s ***** error ... 626s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies", 1) 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2))) 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), "abc", 1) 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,3), 1) 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), -1) 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 626s ***** error ... 626s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj(1) 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj{1} 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj(1) = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj{1} = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.X.Y = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.X = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = "invalid" 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x) x 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x, y) [1; 1] 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2), "Distance", "euclidean"); obj.DistParameter = 1 626s ***** error ... 626s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid = 1 626s 73 tests, 73 passed, 0 known failure, 0 skipped 626s [inst/fillmissing.m] 626s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fillmissing.m 626s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 626s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 626s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 626s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 626s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 626s ***** test 626s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 626s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 626s assert (fillmissing (x, "constant", 99), y); 626s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 626s assert (fillmissing (x, "constant", [94:99]), y); 626s assert (fillmissing (x, "constant", [94:99]'), y); 626s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 626s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 626s assert (fillmissing (x, "constant", [94:99], 1), y); 626s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 626s assert (fillmissing (x, "constant", [96:99], 2), y); 626s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 626s assert (fillmissing (x, "constant", [94:99], 3), y); 626s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 626s assert (fillmissing (x, "constant", [88:99], 99), y); 626s ***** test 626s x = reshape ([1:24], 4, 3, 2); 626s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s y = x; 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 626s assert (fillmissing (x, "constant", [94:99], 1), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 626s assert (fillmissing (x, "constant", [92:99], 2), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 626s assert (fillmissing (x, "constant", [88:99], 3), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 626s assert (fillmissing (x, "constant", [76:99], 99), y); 626s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 626s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 626s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 626s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 626s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 626s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 626s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 626s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 626s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 626s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 626s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 626s ***** test 626s x = reshape ([1:24], 3, 4, 2); 626s y = x; 626s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 626s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 626s y([8]) = 99; 626s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 626s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 626s y = x; 626s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 626s y([6, 18, 20, 21]) = 99; 626s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 626s y(y == 99) = 88; 626s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 626s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 626s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 626s y([8]) = 94; 626s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 626s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 626s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 626s y = x; 626s y(isnan (y)) = 88; 626s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 626s y = x; 626s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 626s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 626s y = x; 626s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 626s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 626s y = x; 626s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 626s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 626s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 626s ***** test 626s x = reshape ([1:24],4,3,2); 626s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s y = x; 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 626s assert (fillmissing (x, "constant", [94:99], 1), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 626s assert (fillmissing (x, "constant", [92:99], 2), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 626s assert (fillmissing (x, "constant", [88:99], 3), y); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 626s assert (fillmissing (x, "constant", [76:99], 99), y); 626s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 626s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 626s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 626s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 626s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 626s ***** test 626s x = reshape ([1:24], 4, 3, 2); 626s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s y = x; 626s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 626s assert (fillmissing (x, "next", 1), y); 626s y = x; 626s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 626s assert (fillmissing (x, "next", 2), y); 626s y = x; 626s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 626s assert (fillmissing (x, "next", 3), y); 626s assert (fillmissing (x, "next", 99), x); 626s y = x; 626s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 626s assert (fillmissing (x, "previous", 1), y); 626s y = x; 626s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 626s assert (fillmissing (x, "previous", 2), y); 626s y = x; 626s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 626s assert (fillmissing (x, "previous", 3), y); 626s assert (fillmissing (x, "previous", 99), x); 626s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 626s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 626s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 626s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 626s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 626s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 626s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 626s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 626s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 626s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 626s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 626s ***** test 626s x = reshape ([1:24], 3, 4, 2); 626s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 626s y = x; 626s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 626s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 626s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 626s y = x; 626s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 626s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 626s y = x; 626s y([16, 19, 21]) = [4, 7, 9]; 626s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 626s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 626s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 626s y = x; 626s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 626s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 626s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 626s y = x; 626s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 626s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 626s y = x; 626s y([2, 5]) = [14, 17]; 626s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 626s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 626s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 626s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 626s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 626s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 626s ***** test 626s x = reshape ([1:24], 4, 3, 2); 626s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s y = x; 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 626s assert (fillmissing (x, "nearest", 1), y); 626s y = x; 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 626s assert (fillmissing (x, "nearest", 2), y); 626s y = x; 626s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 626s assert (fillmissing (x, "nearest", 3), y); 626s assert (fillmissing (x, "nearest", 99), x); 626s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 626s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 626s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 626s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 626s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 626s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 626s ***** test 626s x = reshape ([1:24], 3, 4, 2); 626s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 626s y = x; 626s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 626s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 626s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 626s y = x; 626s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 626s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 626s y = x; 626s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 626s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 626s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 626s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 626s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 626s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 626s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 626s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 626s ***** test 626s x = reshape ([1:24], 4, 3, 2); 626s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 626s y = reshape ([1:24], 4, 3, 2); 626s y([1, 9, 14, 19, 22, 23]) = NaN; 626s assert (fillmissing (x, "linear", 2), y); 626s y = reshape ([1:24], 4, 3, 2); 626s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 626s assert (fillmissing (x, "linear", 3), y); 626s assert (fillmissing (x, "linear", 99), x); 626s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 626s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 626s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 626s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 626s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 626s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 626s ***** test 626s x = reshape ([1:24], 3, 4, 2); 626s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 626s y = x; 626s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 626s y(8) = 8; 626s assert (fillmissing (x, "linear", "endvalues", 0), y); 626s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 626s y = x; 626s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 626s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 626s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 626s y = x; 626s y(isnan(y)) = 0; 626s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 626s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 626s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 626s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 626s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 626s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 626s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 626s ***** test 626s x = reshape ([1:24], 3, 4, 2); 626s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 626s y = x; 626s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 626s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 626s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 626s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 626s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 626s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 627s ***** test <60965> 627s x = reshape ([1:24], 3, 4, 2); 627s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 627s y = x; 627s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 627s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 627s !!!!! known bug: https://octave.org/testfailure/?60965 627s interp1: invalid METHOD 'makima' 627s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 627s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 627s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 627s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 627s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 627s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 627s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 627s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 627s ***** 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]) 627s ***** test 627s x = reshape ([1:24], 3, 4, 2); 627s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 627s y = x; 627s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 627s assert (fillmissing (x, "movmean", 3), y); 627s assert (fillmissing (x, "movmean", [1, 1]), y); 627s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 627s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 627s y = x; 627s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 627s assert (fillmissing (x, "movmean", 3, 2), y); 627s assert (fillmissing (x, "movmean", [1, 1], 2), y); 627s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 627s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 627s y([1, 18]) = NaN; 627s y(6) = 9; 627s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 627s y = x; 627s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 627s y(8) = 8; 627s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 627s y = x; 627s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 627s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 627s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 627s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 627s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 627s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 627s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 627s ***** 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]) 627s ***** test 627s x = reshape ([1:24], 3, 4, 2); 627s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 627s y = x; 627s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 627s assert (fillmissing (x, "movmedian", 3), y); 627s assert (fillmissing (x, "movmedian", [1, 1]), y); 627s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 627s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 627s y = x; 627s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 627s assert (fillmissing (x, "movmedian", 3, 2), y); 627s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 627s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 627s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 627s y([1,18]) = NaN; 627s y(6) = 9; 627s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 627s y = x; 627s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 627s y(8) = 8; 627s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 627s y = x; 627s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 627s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 627s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 627s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 627s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 627s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 627s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 627s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 627s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 627s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 627s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 627s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 627s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 627s ***** function A = testfcn (x, y, z) 627s if (isempty (y)) 627s A = z; 627s elseif (numel (y) == 1) 627s A = repelem (x(1), numel(z)); 627s else 627s A = interp1 (y, x, z, "linear", "extrap"); 627s endif 627s ***** endfunction 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 627s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 627s ***** 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] 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 627s ***** 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]' 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 627s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 627s ***** 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) 627s ***** 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] 627s ***** test 627s ***** function A = testfcn (x, y, z) 627s if (isempty (y)) 627s A = z; 627s elseif (numel (y) == 1) 627s A = repelem (x(1), numel(z)); 627s else 627s A = interp1 (y, x, z, "linear", "extrap"); 627s endif 627s ***** endfunction 627s x = reshape ([1:24], 3, 4, 2); 627s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 627s y = x; 627s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 627s assert (fillmissing (x, @testfcn, 3), y); 627s assert (fillmissing (x, @testfcn, [1, 1]), y); 627s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 627s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 627s y= x; 627s y(isnan (x)) = 99; 627s y(8) = 8; 627s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 627s y = x; 627s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 627s assert (fillmissing (x, @testfcn, 3, 2), y); 627s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 627s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 627s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 627s y(1) = NaN; 627s y([6, 18, 21]) = [9, 24, 24]; 627s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 627s y = x; 627s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 627s y(8) = 8; 627s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 627s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 627s y(8) = 99; 627s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 627s y([6, 18, 20, 21]) = 99; 627s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 627s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 627s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 627s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 627s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 627s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 627s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 627s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 627s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 627s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 627s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 627s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 627s ***** 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]) 627s ***** test 627s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 627s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 627s y = x; 627s y([4, 7, 12]) = 0; 627s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 627s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 627s y = x; 627s y([5, 7, 12]) = 0; 627s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 627s y = x; 627s y([4, 5, 7]) = 0; 627s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 627s ***** test 627s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 627s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 627s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 627s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 627s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 627s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 627s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 627s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 627s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 627s ***** test 627s x = [NaN, 2, 3]; 627s [~, idx] = fillmissing (x, "previous"); 627s assert (idx, logical ([0, 0, 0])); 627s [~, idx] = fillmissing (x, "movmean", 1); 627s assert (idx, logical ([0, 0, 0])); 627s x = [1:3; 4:6; 7:9]; 627s x([2, 4, 7, 9]) = NaN; 627s [~, idx] = fillmissing (x, "linear"); 627s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 627s [~, idx] = fillmissing (x, "movmean", 2); 627s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 627s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 627s assert (A, [1, 2, 3, 3, NaN]); 627s assert (idx, logical ([0, 0, 0, 1, 0])); 627s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 627s assert (A, [1, 2, 3, 3, NaN]); 627s assert (idx, logical ([0, 0, 0, 1, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 627s assert (A, [1, 2, 3, 3, NaN]); 627s assert (idx, logical ([0, 0, 0, 1, 0])); 627s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 627s assert (A, [1, 2, 1, 4, 1]); 627s assert (idx, logical ([0, 1, 0, 1, 0])); 627s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 627s assert (A, [1, NaN, 1, NaN, 1]); 627s assert (idx, logical ([0, 0, 0, 0, 0])); 627s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 627s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 627s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 627s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 627s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 627s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 627s ***** test 627s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 627s assert (idx, logical ([0, 0, 0, 0, 0])); 627s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 627s assert (idx, logical ([0, 1, 1, 1, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 627s assert (A, [1, 2, 2, NaN, NaN]); 627s assert (idx, logical ([0, 0, 1, 0, 0])); 627s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 627s assert (A, [1, 1, 1, 1, 1]); 627s assert (idx, logical ([0, 1, 0, 1, 1])); 627s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 627s assert (A, [1, NaN, 1, NaN, NaN]); 627s assert (idx, logical ([0, 0, 0, 0, 0])); 627s ***** test 627s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 627s assert (A, [1, 3, 5]); 627s assert (idx, logical ([0, 1, 0])); 627s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 627s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 627s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 627s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 627s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 627s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 627s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 627s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 627s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 627s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 627s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 627s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 627s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 628s ***** test 628s [A, idx] = fillmissing (" a b c", "constant", " "); 628s assert (A, " a b c"); 628s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 628s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 628s assert (A, {"foo", "", "bar", ""}); 628s assert (idx, logical ([0, 0, 0, 0])); 628s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 628s assert (A, {"foo", "", "bar", ""}); 628s assert (idx, logical ([0, 0, 0, 0])); 628s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 628s assert (A, "afaoaoa"); 628s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 628s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 628s assert (A, " f o o "); 628s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 628s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 628s assert (A, {"a", "foo", "a"}); 628s assert (idx, logical ([1, 0, 1])); 628s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 628s assert (A, {"", "foo", ""}); 628s assert (idx, logical ([0, 0, 0])); 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 628s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 628s ***** 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])) 628s ***** 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])) 628s ***** test 628s x = logical ([1, 0, 1, 0, 1]); 628s [~, idx] = fillmissing (x, "constant", true); 628s assert (idx, logical ([0, 0, 0, 0, 0])); 628s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([0, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 0])); 628s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 628s assert (idx, logical ([0, 0, 0, 0, 0])) 628s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])) 628s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([0, 0, 1, 0, 1])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 628s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 628s ***** 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])) 628s ***** 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])) 628s ***** test 628s x = int32 ([1, 2, 3, 4, 5]); 628s [~, idx] = fillmissing (x, "constant", 0); 628s assert (idx, logical ([0, 0, 0, 0, 0])); 628s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 628s assert (idx, logical ([0, 0, 1, 0, 0])); 628s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([0, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 0])); 628s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 628s assert (idx, logical ([0, 0, 0, 0, 0])); 628s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([1, 0, 1, 0, 1])); 628s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 628s assert (idx, logical ([0, 0, 1, 0, 1])); 628s ***** test 628s [A, idx] = fillmissing ([struct, struct], "constant", 1); 628s assert (A, [struct, struct]) 628s assert (idx, [false, false]) 628s ***** error fillmissing () 628s ***** error fillmissing (1) 628s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 628s ***** error fillmissing (1, 2) 628s ***** error fillmissing (1, "foo") 628s ***** error fillmissing (1, @(x) x, 1) 628s ***** error fillmissing (1, @(x,y) x+y, 1) 628s ***** error fillmissing ("a b c", "linear") 628s ***** error fillmissing ({"a", "b"}, "linear") 628s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 628s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 628s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 628s ***** error fillmissing (1, "constant", []) 628s ***** error fillmissing (1, "constant", "a") 628s ***** error fillmissing ("a", "constant", 1) 628s ***** error fillmissing ("a", "constant", {"foo"}) 628s ***** error fillmissing ({"foo"}, "constant", 1) 628s ***** error fillmissing (1, "movmean") 628s ***** error fillmissing (1, "movmedian") 628s ***** error fillmissing (1, "constant", 1, 0) 628s ***** error fillmissing (1, "constant", 1, -1) 628s ***** error fillmissing (1, "constant", 1, [1, 2]) 628s ***** error fillmissing (1, "constant", 1, "samplepoints") 628s ***** error fillmissing (1, "constant", 1, "foo") 628s ***** error fillmissing (1, "constant", 1, 1, "foo") 628s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 628s ***** error fillmissing ("foo", "next", "endvalues", 1) 628s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 628s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 628s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 628s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 628s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 628s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 628s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 628s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 628s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 628s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 628s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 628s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 628s ***** error fillmissing (true, "linear", "missinglocations", true) 628s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 628s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 628s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 628s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 628s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 628s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 628s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 628s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 628s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 628s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 628s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 628s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 628s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 628s ***** error fillmissing (1, @(x,y,z) x+y+z) 628s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 628s 380 tests, 379 passed, 0 known failure, 1 skipped 628s [inst/regress.m] 628s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/regress.m 628s ***** test 628s % Longley data from the NIST Statistical Reference Dataset 628s Z = [ 60323 83.0 234289 2356 1590 107608 1947 628s 61122 88.5 259426 2325 1456 108632 1948 628s 60171 88.2 258054 3682 1616 109773 1949 628s 61187 89.5 284599 3351 1650 110929 1950 628s 63221 96.2 328975 2099 3099 112075 1951 628s 63639 98.1 346999 1932 3594 113270 1952 628s 64989 99.0 365385 1870 3547 115094 1953 628s 63761 100.0 363112 3578 3350 116219 1954 628s 66019 101.2 397469 2904 3048 117388 1955 628s 67857 104.6 419180 2822 2857 118734 1956 628s 68169 108.4 442769 2936 2798 120445 1957 628s 66513 110.8 444546 4681 2637 121950 1958 628s 68655 112.6 482704 3813 2552 123366 1959 628s 69564 114.2 502601 3931 2514 125368 1960 628s 69331 115.7 518173 4806 2572 127852 1961 628s 70551 116.9 554894 4007 2827 130081 1962 ]; 628s % Results certified by NIST using 500 digit arithmetic 628s % b and standard error in b 628s V = [ -3482258.63459582 890420.383607373 628s 15.0618722713733 84.9149257747669 628s -0.358191792925910E-01 0.334910077722432E-01 628s -2.02022980381683 0.488399681651699 628s -1.03322686717359 0.214274163161675 628s -0.511041056535807E-01 0.226073200069370 628s 1829.15146461355 455.478499142212 ]; 628s Rsq = 0.995479004577296; 628s F = 330.285339234588; 628s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 628s alpha = 0.05; 628s [b, bint, r, rint, stats] = regress (y, X, alpha); 628s assert(b,V(:,1),4e-6); 628s assert(stats(1),Rsq,1e-12); 628s assert(stats(2),F,3e-8); 628s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 628s warning: matrix singular to machine precision, rcond = 3.50566e-20 628s warning: called from 628s regress at line 131 column 5 628s __test__ at line 33 column 3 628s test at line 685 column 11 628s /tmp/tmp.vpN5xdrKMr at line 1374 column 2 628s 628s 1 test, 1 passed, 0 known failure, 0 skipped 628s [inst/cl_multinom.m] 628s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cl_multinom.m 628s ***** demo 628s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 628s ***** error cl_multinom (); 628s ***** error cl_multinom (1, 2, 3, 4, 5); 628s ***** error ... 628s cl_multinom (1, 2, 3, 4); 628s ***** error ... 628s cl_multinom (1, 2, 3, "some string"); 628s 4 tests, 4 passed, 0 known failure, 0 skipped 628s [inst/linkage.m] 628s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/linkage.m 628s ***** shared x, t 628s x = reshape (mod (magic (6),5), [], 3); 628s t = 1e-6; 628s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 628s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 628s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 628s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 628s lastwarn(); # Clear last warning before the test 628s ***** warning linkage (pdist (x), "centroid"); 628s ***** test 628s warning off Octave:clustering 628s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 628s warning on Octave:clustering 628s ***** warning linkage (pdist (x), "median"); 628s ***** test 628s warning off Octave:clustering 628s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 628s warning on Octave:clustering 628s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 628s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 628s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 628s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 628s 12 tests, 12 passed, 0 known failure, 0 skipped 628s [inst/fitlm.m] 628s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitlm.m 628s ***** demo 628s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 628s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 628s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 628s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 628s 25.694 ]'; 628s 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]'; 628s 628s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 628s ***** demo 628s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 628s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 628s brands = {'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'}; 628s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 628s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 628s 628s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 628s "CategoricalVars",[1,2],"display","on"); 628s ***** test 628s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 628s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 628s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 628s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 628s 25.694 ]'; 628s 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]'; 628s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 628s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 628s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 628s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 628s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 628s assert (TAB{2,2}, 10, 1e-04); 628s assert (TAB{3,2}, 7.99999999999999, 1e-09); 628s assert (TAB{4,2}, 8.99999999999999, 1e-09); 628s assert (TAB{5,2}, 11.0001428571429, 1e-09); 628s assert (TAB{6,2}, 19.0001111111111, 1e-09); 628s assert (TAB{2,3}, 1.01775379540949, 1e-09); 628s assert (TAB{3,3}, 1.64107868458008, 1e-09); 628s assert (TAB{4,3}, 1.43932122062479, 1e-09); 628s assert (TAB{5,3}, 1.48983900477565, 1e-09); 628s assert (TAB{6,3}, 1.3987687997822, 1e-09); 628s assert (TAB{2,6}, 9.82555903510687, 1e-09); 628s assert (TAB{3,6}, 4.87484242844031, 1e-09); 628s assert (TAB{4,6}, 6.25294748040552, 1e-09); 628s assert (TAB{5,6}, 7.38344399756088, 1e-09); 628s assert (TAB{6,6}, 13.5834536158296, 1e-09); 628s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 628s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 628s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 628s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 628s ***** test 628s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 628s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 628s brands = bsxfun (@times, ones(6,1), [1,2,3]); 628s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 628s 628s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 628s "categoricalvars",[1,2],"display","off"); 628s assert (TAB{2,2}, 5.66666666666667, 1e-09); 628s assert (TAB{3,2}, -1.33333333333333, 1e-09); 628s assert (TAB{4,2}, -2.16666666666667, 1e-09); 628s assert (TAB{5,2}, 1.16666666666667, 1e-09); 628s assert (TAB{6,2}, -0.333333333333334, 1e-09); 628s assert (TAB{7,2}, -0.166666666666667, 1e-09); 628s assert (TAB{2,3}, 0.215165741455965, 1e-09); 628s assert (TAB{3,3}, 0.304290309725089, 1e-09); 628s assert (TAB{4,3}, 0.304290309725089, 1e-09); 628s assert (TAB{5,3}, 0.304290309725089, 1e-09); 628s assert (TAB{6,3}, 0.43033148291193, 1e-09); 628s assert (TAB{7,3}, 0.43033148291193, 1e-09); 628s assert (TAB{2,6}, 26.3362867542108, 1e-09); 628s assert (TAB{3,6}, -4.38178046004138, 1e-09); 628s assert (TAB{4,6}, -7.12039324756724, 1e-09); 628s assert (TAB{5,6}, 3.83405790253621, 1e-09); 628s assert (TAB{6,6}, -0.774596669241495, 1e-09); 628s assert (TAB{7,6}, -0.387298334620748, 1e-09); 628s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 628s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 628s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 628s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 628s assert (TAB{6,7}, 0.453570536021938, 1e-09); 628s assert (TAB{7,7}, 0.705316781644046, 1e-09); 628s ## Test with string ids for categorical variables 628s brands = {'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'; ... 628s 'Gourmet', 'National', 'Generic'}; 628s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 628s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 628s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 628s "categoricalvars",[1,2],"display","off"); 628s ***** test 628s load carsmall 628s X = [Weight,Horsepower,Acceleration]; 628s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 628s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 628s assert (TAB{2,2}, 47.9767628118615, 1e-09); 628s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 628s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 628s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 628s assert (TAB{2,3}, 3.87851641748551, 1e-09); 628s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 628s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 628s assert (TAB{5,3}, 0.193325043113178, 1e-09); 628s assert (TAB{2,6}, 12.369874881944, 1e-09); 628s assert (TAB{3,6}, -5.80228828790225, 1e-09); 628s assert (TAB{4,6}, -1.76626492228599, 1e-09); 628s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 628s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 628s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 628s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 628s assert (TAB{5,7}, 0.952359384151778, 1e-09); 628s 3 tests, 3 passed, 0 known failure, 0 skipped 628s [inst/cmdscale.m] 628s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cmdscale.m 628s ***** shared m, n, X, D 628s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 628s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 628s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 629s 2 tests, 2 passed, 0 known failure, 0 skipped 629s [inst/fitcknn.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitcknn.m 629s ***** demo 629s ## Train a k-nearest neighbor classifier for k = 10 629s ## and plot the decision boundaries. 629s 629s load fisheriris 629s idx = ! strcmp (species, "setosa"); 629s X = meas(idx,3:4); 629s Y = cast (strcmpi (species(idx), "virginica"), "double"); 629s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 629s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 629s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 629s [x1G, x2G] = meshgrid (x1, x2); 629s XGrid = [x1G(:), x2G(:)]; 629s pred = predict (obj, XGrid); 629s gidx = logical (pred); 629s 629s figure 629s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 629s hold on 629s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 629s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 629s xlabel ("Petal length (cm)"); 629s ylabel ("Petal width (cm)"); 629s title ("5-Nearest Neighbor Classifier Decision Boundary"); 629s legend ({"Versicolor Region", "Virginica Region", ... 629s "Sampled Versicolor", "Sampled Virginica"}, ... 629s "location", "northwest") 629s axis tight 629s hold off 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y, "NSMethod", "exhaustive"); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s k = 10; 629s a = fitcknn (x, y, "NumNeighbors" ,k); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = ones (4, 11); 629s y = ["a"; "a"; "b"; "b"]; 629s k = 10; 629s a = fitcknn (x, y, "NumNeighbors" ,k); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s k = 10; 629s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s k = 10; 629s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s weights = ones (4,1); 629s a = fitcknn (x, y, "Standardize", 1); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.Standardize}, {true}) 629s assert ({a.Sigma}, {std(x, [], 1)}) 629s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s weights = ones (4,1); 629s a = fitcknn (x, y, "Standardize", false); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.Standardize}, {false}) 629s assert ({a.Sigma}, {[]}) 629s assert ({a.Mu}, {[]}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s s = ones (1, 3); 629s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.DistParameter}, {s}) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 629s assert (class (a), "ClassificationKNN"); 629s assert (a.DistParameter, 5) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 629s "NSMethod", "exhaustive"); 629s assert (class (a), "ClassificationKNN"); 629s assert (a.DistParameter, 5) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 629s assert (class (a), "ClassificationKNN"); 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 629s assert ({a.BucketSize}, {20}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y, "IncludeTies", true); 629s assert (class (a), "ClassificationKNN"); 629s assert (a.IncludeTies, true); 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y); 629s assert (class (a), "ClassificationKNN"); 629s assert (a.IncludeTies, false); 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s a = fitcknn (x, y); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Prior, [0.5; 0.5]) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s prior = [0.5; 0.5]; 629s a = fitcknn (x, y, "Prior", "empirical"); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Prior, prior) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "a"; "b"]; 629s prior = [0.75; 0.25]; 629s a = fitcknn (x, y, "Prior", "empirical"); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Prior, prior) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "a"; "b"]; 629s prior = [0.5; 0.5]; 629s a = fitcknn (x, y, "Prior", "uniform"); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Prior, prior) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s cost = eye (2); 629s a = fitcknn (x, y, "Cost", cost); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Cost, [1, 0; 0, 1]) 629s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s cost = eye (2); 629s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 629s assert (class (a), "ClassificationKNN") 629s assert (a.Cost, [1, 0; 0, 1]) 629s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 629s assert ({a.BucketSize}, {50}) 629s ***** test 629s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 629s y = ["a"; "a"; "b"; "b"]; 629s rand ("seed", 23); 629s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 629s assert (class (a), "ClassificationPartitionedModel"); 629s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 629s assert (a.ModelParameters.NSMethod, "exhaustive") 629s assert (a.ModelParameters.Distance, "euclidean") 629s assert ({a.Trained{1}.BucketSize}, {50}) 629s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 629s warning: called from 629s cvpartition at line 764 column 19 629s crossval at line 1701 column 9 629s fitcknn at line 354 column 7 629s __test__ at line 6 column 2 629s test at line 685 column 11 629s /tmp/tmp.vpN5xdrKMr at line 1414 column 2 629s 629s ***** error fitcknn () 629s ***** error fitcknn (ones (4,1)) 629s ***** error 629s fitcknn (ones (4,2), ones (4, 1), "K") 629s ***** error 629s fitcknn (ones (4,2), ones (3, 1)) 629s ***** error 629s fitcknn (ones (4,2), ones (3, 1), "K", 2) 629s ***** error 629s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 629s ***** error 629s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 629s ***** error ... 629s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 629s 29 tests, 29 passed, 0 known failure, 0 skipped 629s [inst/ttest2.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ttest2.m 629s ***** test 629s a = 1:5; 629s b = 6:10; 629s b(5) = NaN; 629s [h,p,ci,stats] = ttest2 (a,b); 629s assert (h, 1); 629s assert (p, 0.002535996080258229, 1e-14); 629s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 629s assert (stats.tstat, -4.582575694955839, 1e-14); 629s assert (stats.df, 7); 629s assert (stats.sd, 1.4638501094228, 1e-13); 629s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 629s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 629s 3 tests, 3 passed, 0 known failure, 0 skipped 629s [inst/grp2idx.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/grp2idx.m 629s ***** test 629s in = [true false false true]; 629s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 629s assert (nthargout (1:3, @grp2idx, in), out) 629s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 629s ***** test 629s assert (nthargout (1:3, @grp2idx, [false, true]), 629s {[1; 2] {"0"; "1"} [false; true]}); 629s assert (nthargout (1:3, @grp2idx, [true, false]), 629s {[1; 2] {"1"; "0"} [true; false]}); 629s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 629s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 629s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 629s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 629s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 629s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 629s [1; -3; -2; 2; -1; 3]}); 629s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 629s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 629s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 629s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 629s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 629s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 629s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 629s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 629s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 629s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 629s 10 tests, 10 passed, 0 known failure, 0 skipped 629s [inst/ztest.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ztest.m 629s ***** error ztest (); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 2, -0.5); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 629s ***** error ... 629s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 629s ***** test 629s load carsmall 629s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 629s assert (h, 0); 629s assert (pval, 1, 1e-14); 629s assert (ci, [22.094; 25.343], 1e-3); 629s ***** test 629s load carsmall 629s [h, pval, ci] = ztest (MPG, 26, 8); 629s assert (h, 1); 629s assert (pval, 0.00568359158544743, 1e-14); 629s assert (ci, [22.101; 25.335], 1e-3); 629s ***** test 629s load carsmall 629s [h, pval, ci] = ztest (MPG, 26, 4); 629s assert (h, 1); 629s assert (pval, 3.184168011941316e-08, 1e-14); 629s assert (ci, [22.909; 24.527], 1e-3); 629s ***** test 629s x = normrnd (10, 2, 100, 1); 629s [h, pval, ci] = ztest (x, 10, 2, "tail", "right"); 629s assert (isnan (pval), false); 629s assert (pval >= 0 && pval <= 1, true); 629s ***** test 629s x = normrnd (10, 2, 100, 1); 629s [h, pval, ci] = ztest (x, 10, 2, "tail", "left"); 629s assert (isnan (pval), false); 629s assert (pval >= 0 && pval <= 1, true); 629s ***** test 629s load fisheriris; 629s x = meas(:,1); 629s m = 5.8; 629s sigma = 0.8; 629s [h, pval, ci] = ztest (x, m, sigma, "tail", "right"); 629s assert (h, 0) 629s assert (pval, 0.2535, 1e-4) 629s assert (ci, [5.7359; Inf], 1e-5) 629s ***** test 629s load fisheriris; 629s x = meas(:,1); 629s m = 5.8; 629s sigma = 0.8; 629s [h, pval, ci] = ztest (x, m, sigma, "tail", "left"); 629s assert (h, 0) 629s assert (pval, 0.7465, 1e-4) 629s assert (ci, [-Inf; 5.9508], 1e-4) 629s 17 tests, 17 passed, 0 known failure, 0 skipped 629s [inst/adtest.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/adtest.m 629s ***** error adtest (); 629s ***** error adtest (ones (20,2)); 629s ***** error adtest ([1+i,0-3i]); 629s ***** error ... 629s adtest (ones (20,1), "Distribution", "normal"); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"norm", 5}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"ev", 5}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", 35); 629s ***** error ... 629s adtest (rand (20,1), "Name", "norm"); 629s ***** error ... 629s adtest (rand (20,1), "Name", {"norm", 75, 10}); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 629s ***** error ... 629s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 629s ***** error ... 629s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 629s "Asymptotic", true); 629s ***** error ... 629s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 629s "Alpha", 0.000000001); 629s ***** error ... 629s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 629s "Alpha", 0.999999999); 629s ***** error ... 629s adtest (10); 629s ***** warning ... 629s randn ("seed", 34); 629s adtest (ones (20,1), "Alpha", 0.000001); 629s ***** warning ... 629s randn ("seed", 34); 629s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 629s ***** warning ... 629s randn ("seed", 34); 629s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 629s ***** test 629s load examgrades 629s x = grades(:,1); 629s [h, pval, adstat, cv] = adtest (x); 629s assert (h, false); 629s assert (pval, 0.1854, 1e-4); 629s assert (adstat, 0.5194, 1e-4); 629s assert (cv, 0.7470, 1e-4); 629s ***** test 629s load examgrades 629s x = grades(:,1); 629s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 629s assert (h, false); 629s assert (pval, 0.071363, 1e-6); 629s ***** test 629s load examgrades 629s x = grades(:,1); 629s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 629s assert (h, false); 629s assert (pval, 0.4687, 1e-4); 629s 25 tests, 25 passed, 0 known failure, 0 skipped 629s [inst/logit.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/logit.m 629s ***** test 629s p = [0.01:0.01:0.99]; 629s assert (logit (p), log (p ./ (1-p)), 25*eps); 629s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 629s ***** error logit () 629s ***** error logit (1, 2) 629s 4 tests, 4 passed, 0 known failure, 0 skipped 629s [inst/bartlett_test.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/bartlett_test.m 629s ***** error bartlett_test () 629s ***** error ... 629s bartlett_test (1, 2, 3, 4); 629s ***** error bartlett_test (randn (50, 2), 0); 629s ***** error ... 629s bartlett_test (randn (50, 2), [1, 2, 3]); 629s ***** error ... 629s bartlett_test (randn (50, 1), ones (55, 1)); 629s ***** error ... 629s bartlett_test (randn (50, 1), ones (50, 2)); 629s ***** error ... 629s bartlett_test (randn (50, 2), [], 1.2); 629s ***** error ... 629s bartlett_test (randn (50, 2), [], "alpha"); 629s ***** error ... 629s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 629s ***** error ... 629s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 629s ***** warning ... 629s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 629s ***** test 629s load examgrades 629s [h, pval, chisq, df] = bartlett_test (grades); 629s assert (h, 1); 629s assert (pval, 7.908647337018238e-08, 1e-14); 629s assert (chisq, 38.73324, 1e-5); 629s assert (df, 4); 629s ***** test 629s load examgrades 629s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 629s assert (h, 1); 629s assert (pval, 0.01172, 1e-5); 629s assert (chisq, 8.89274, 1e-5); 629s assert (df, 2); 629s ***** test 629s load examgrades 629s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 629s assert (h, 0); 629s assert (pval, 0.88118, 1e-5); 629s assert (chisq, 0.02234, 1e-5); 629s assert (df, 1); 629s ***** test 629s load examgrades 629s grades = [grades; nan(10, 5)]; 629s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 629s assert (h, 0); 629s assert (pval, 0.88118, 1e-5); 629s assert (chisq, 0.02234, 1e-5); 629s assert (df, 1); 629s ***** test 629s load examgrades 629s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 629s assert (h, 0); 629s assert (pval, 0.01791, 1e-5); 629s assert (chisq, 5.60486, 1e-5); 629s assert (df, 1); 629s 16 tests, 16 passed, 0 known failure, 0 skipped 629s [inst/mahal.m] 629s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/mahal.m 629s ***** error mahal () 629s ***** error mahal (1, 2, 3) 629s ***** error mahal ("A", "B") 629s ***** error mahal ([1, 2], ["A", "B"]) 629s ***** error mahal (ones (2, 2, 2)) 629s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 629s ***** error mahal (ones (2, 2), ones (2, 3)) 629s ***** test 629s X = [1 0; 0 1; 1 1; 0 0]; 629s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 629s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 629s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 629s 9 tests, 9 passed, 0 known failure, 0 skipped 629s [inst/hmmviterbi.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hmmviterbi.m 630s ***** test 630s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 630s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 630s transprob = [0.8, 0.2; 0.4, 0.6]; 630s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 630s vpath = hmmviterbi (sequence, transprob, outprob); 630s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 630s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 630s assert (vpath, expected); 630s ***** test 630s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 630s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 630s transprob = [0.8, 0.2; 0.4, 0.6]; 630s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 630s symbols = {"A", "B", "C"}; 630s statenames = {"One", "Two"}; 630s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 630s "statenames", statenames); 630s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 630s "One", "One", "One", "One", "One", "One", "One", "Two", ... 630s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 630s assert (vpath, expected); 630s 2 tests, 2 passed, 0 known failure, 0 skipped 630s [inst/grpstats.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/grpstats.m 630s ***** demo 630s load carsmall; 630s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 630s n = length(m); 630s errorbar((1:n)',m,p(:,2)-m); 630s set (gca, "xtick", 1:n, "xticklabel", g); 630s title ("95% prediction intervals for mean weight by year"); 630s ***** demo 630s load carsmall; 630s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 630s {"mean", "meanci", "gname"}, 0.05) 630s [c,r] = size (m); 630s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 630s set (gca, "xtick", 1:c, "xticklabel", g); 630s title ("95% prediction intervals for mean weight by year"); 630s ***** test 630s load carsmall 630s means = grpstats (Acceleration, Origin); 630s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 630s ***** test 630s load carsmall 630s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 630s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 630s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 630s ***** test 630s load carsmall 630s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 630s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 630s ***** test 630s load carsmall 630s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 630s {"mean", "meanci", "gname"}, 0.05); 630s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 630s [1e-14, 2e-14, 1e-14]'); 630s ***** test 630s [mC, g] = grpstats ([], []); 630s assert (isempty (mC), true); 630s assert (isempty (g), true); 630s ***** error ... 630s grpstats (ones (3, 3, 3)); 630s ***** error ... 630s grpstats ([], {'A'; 'B'; 'A'; 'B'}) 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha"); 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "somename", -0.1); 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", {2, 3}, -0.1); 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha", -0.1); 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, {'mean', 'sum'}); 630s ***** error ... 630s [q, w] = grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}); 630s ***** error ... 630s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "whatever"); 630s 14 tests, 14 passed, 0 known failure, 0 skipped 630s [inst/fitgmdist.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitgmdist.m 630s ***** demo 630s ## Generate a two-cluster problem 630s C1 = randn (100, 2) + 2; 630s C2 = randn (100, 2) - 2; 630s data = [C1; C2]; 630s 630s ## Perform clustering 630s GMModel = fitgmdist (data, 2); 630s 630s ## Plot the result 630s figure 630s [heights, bins] = hist3([C1; C2]); 630s [xx, yy] = meshgrid(bins{1}, bins{2}); 630s bbins = [xx(:), yy(:)]; 630s contour (reshape (GMModel.pdf (bbins), size (heights))); 630s ***** demo 630s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 630s nbOrientations = 2; 630s initial_orientations = [38.0; 18.0]; 630s initial_weights = ones (1, nbOrientations) / nbOrientations; 630s initial_Sigma = 10 * ones (1, 1, nbOrientations); 630s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 630s "ComponentProportion", initial_weights); 630s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 630s "RegularizationValue", 0.0001) 630s ***** test 630s load fisheriris 630s classes = unique (species); 630s [~, score] = pca (meas, "NumComponents", 2); 630s options.MaxIter = 1000; 630s options.TolFun = 1e-6; 630s options.Display = "off"; 630s GMModel = fitgmdist (score, 2, "Options", options); 630s assert (isa (GMModel, "gmdistribution"), true); 630s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 630s 1 test, 1 passed, 0 known failure, 0 skipped 630s [inst/probit.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/probit.m 630s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 630s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 630s ***** error probit () 630s ***** error probit (1, 2) 630s 4 tests, 4 passed, 0 known failure, 0 skipped 630s [inst/ecdf.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ecdf.m 630s ***** demo 630s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 630s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 630s t = min (y, d); ## we observe the minimum of these times 630s censored = (y > d); ## we also observe whether the subject failed 630s 630s ## Calculate and plot the empirical cdf and confidence bounds 630s [f, x, flo, fup] = ecdf (t, "censoring", censored); 630s stairs (x, f); 630s hold on; 630s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 630s 630s ## Superimpose a plot of the known true cdf 630s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 630s hold off; 630s ***** demo 630s R = wblrnd (100, 2, 100, 1); 630s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 630s hold on 630s x = 1:1:250; 630s wblsurv = 1 - cdf ("weibull", x, 100, 2); 630s plot (x, wblsurv, "g-", "LineWidth", 2) 630s legend ("Empirical survivor function", "Lower confidence bound", ... 630s "Upper confidence bound", "Weibull survivor function", ... 630s "Location", "northeast"); 630s hold off 630s ***** error ecdf (); 630s ***** error ecdf (randi (15,2)); 630s ***** error ecdf ([3,2,4,3+2i,5]); 630s ***** error kstest ([2,3,4,5,6],"tail"); 630s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 630s ***** error kstest ([2,3,4,5,6],"function", ""); 630s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 630s ***** error kstest ([2,3,4,5,6],"tail", 0); 630s ***** error kstest ([2,3,4,5,6],"alpha", 0); 630s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 630s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 630s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 630s ***** test 630s hf = figure ("visible", "off"); 630s unwind_protect 630s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 630s [F, x, Flo, Fup] = ecdf (x); 630s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 630s assert (F, F_out, ones (10,1) * 1e-4); 630s x_out = [0 0 2 3 4 5 6 7 8 9]'; 630s assert (x, x_out); 630s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 630s assert (Flo, Flo_out, ones (10,1) * 1e-4); 630s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 630s assert (Fup, Fup_out, ones (10,1) * 1e-4); 630s unwind_protect_cleanup 630s close (hf); 630s end_unwind_protect 630s ***** test 630s hf = figure ("visible", "off"); 630s unwind_protect 630s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 630s ecdf (x); 630s unwind_protect_cleanup 630s close (hf); 630s end_unwind_protect 630s 14 tests, 14 passed, 0 known failure, 0 skipped 630s [inst/stepwisefit.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/stepwisefit.m 630s ***** test 630s % Sample data from Draper and Smith (n = 13, k = 4) 630s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 630s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 630s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 630s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 630s 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]'; 630s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 630s assert(X_use, [4 1]) 630s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 630s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 630s assert(X_use, [4 1]) 630s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 630s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 630s assert(X_use, [4 1]) 630s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 630s 1 test, 1 passed, 0 known failure, 0 skipped 630s [inst/fitcsvm.m] 630s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitcsvm.m 630s ***** demo 630s ## Use a subset of Fisher's iris data set 630s 630s load fisheriris 630s inds = ! strcmp (species, 'setosa'); 630s X = meas(inds, [3,4]); 630s Y = species(inds); 630s 630s ## Train a linear SVM classifier 630s SVMModel = fitcsvm (X, Y) 630s 630s ## Plot a scatter diagram of the data and circle the support vectors. 630s sv = SVMModel.SupportVectors; 630s figure 630s gscatter (X(:,1), X(:,2), Y) 630s hold on 630s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 630s legend ('versicolor', 'virginica', 'Support Vector') 630s hold off 630s ***** test 630s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 630s y = {"a"; "a"; "b"; "b"}; 630s a = fitcsvm (x, y); 630s assert (class (a), "ClassificationSVM"); 630s assert ({a.X, a.Y}, {x, y}) 630s assert (a.NumObservations, 4) 630s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 630s assert (a.ModelParameters.SVMtype, "c_svc") 630s assert (a.ClassNames, {"a"; "b"}) 630s ***** test 630s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 630s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 630s a = fitcsvm (x, y); 630s assert (class (a), "ClassificationSVM"); 630s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 630s assert (a.ModelParameters.BoxConstraint, 1) 630s assert (a.ModelParameters.KernelOffset, 0) 630s assert (a.ClassNames, [1; -1]) 630s ***** test 630s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 630s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 630s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 630s "KernelOffset", 2); 630s assert (class (a), "ClassificationSVM"); 630s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 630s assert (a.ModelParameters.BoxConstraint, 2) 630s assert (a.ModelParameters.KernelOffset, 2) 630s assert (isempty (a.Alpha), true) 630s assert (isempty (a.Beta), false) 630s ***** test 630s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 630s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 630s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 630s assert (class (a), "ClassificationSVM"); 630s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 630s assert (a.ModelParameters.PolynomialOrder, 3) 630s assert (isempty (a.Alpha), true) 630s assert (isempty (a.Beta), false) 630s ***** test 630s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 630s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 630s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 630s assert (class (a), "ClassificationSVM"); 630s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 630s assert (a.ModelParameters.PolynomialOrder, 3) 630s assert (isempty (a.Alpha), false) 630s assert (isempty (a.Beta), true) 630s ***** test 630s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 630s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 630s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 630s assert (class (a), "ClassificationPartitionedModel"); 630s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 630s assert (a.ModelParameters.PolynomialOrder, 3) 630s assert (isempty (a.Trained{1}.Alpha), false) 630s assert (isempty (a.Trained{1}.Beta), true) 630s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 630s warning: called from 630s cvpartition at line 764 column 19 630s crossval at line 1300 column 9 630s fitcsvm at line 284 column 7 630s __test__ at line 5 column 2 630s test at line 685 column 11 630s /tmp/tmp.vpN5xdrKMr at line 1526 column 2 630s 631s ***** error fitcsvm () 631s ***** error fitcsvm (ones (4,1)) 631s ***** error 631s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 631s ***** error 631s fitcsvm (ones (4,2), ones (3, 1)) 631s ***** error 631s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 631s ***** error 631s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 631s ***** error 631s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 631s ***** error ... 631s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 631s 14 tests, 14 passed, 0 known failure, 0 skipped 631s [inst/multcompare.m] 631s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/multcompare.m 631s ***** demo 631s 631s ## Demonstration using balanced one-way ANOVA from anova1 631s 631s x = ones (50, 4) .* [-2, 0, 1, 5]; 631s randn ("seed", 1); # for reproducibility 631s x = x + normrnd (0, 2, 50, 4); 631s groups = {"A", "B", "C", "D"}; 631s [p, tbl, stats] = anova1 (x, groups, "off"); 631s multcompare (stats); 631s ***** demo 631s 631s ## Demonstration using unbalanced one-way ANOVA example from anovan 631s 631s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 631s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 631s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 631s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 631s 25.694 ]'; 631s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 631s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 631s 631s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 631s "ControlGroup", 1, "display", "on") 631s 631s ***** demo 631s 631s ## Demonstration using factorial ANCOVA example from anovan 631s 631s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 631s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 631s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 631s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 631s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 631s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 631s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 631s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 631s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 631s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 631s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 631s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 631s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 631s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 631s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 631s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 631s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 631s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 631s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 631s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 631s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 631s 631s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 631s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 631s "sstype", "h", "display", "off", "contrasts", ... 631s {"simple","poly",""}); 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 631s "display", "on") 631s 631s ***** demo 631s 631s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 631s ## squares to account for heteroskedasticity. 631s 631s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 631s 2, 2, 2, 2, 2, 2, 2, 2, ... 631s 3, 3, 3, 3, 3, 3, 3, 3]'; 631s 631s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 631s 10, 25, 66, 43, 47, 56, 6, 39, ... 631s 11, 39, 26, 35, 25, 14, 24, 17]'; 631s 631s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 631s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 631s b = polyfit (fitted, abs (STATS.resid), 1); 631s v = polyval (b, fitted); # Variance as a function of the fitted values 631s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 631s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 631s ***** demo 631s 631s ## Demonstration of p-value adjustments to control the false discovery rate 631s ## Data from Westfall (1997) JASA. 92(437):299-306 631s 631s p = [.005708; .023544; .024193; .044895; ... 631s .048805; .221227; .395867; .693051; .775755]; 631s 631s padj = multcompare(p,'ctype','fdr') 631s ***** test 631s 631s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 631s 631s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 631s 631s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 631s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 631s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 631s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 631s 25.694 ]'; 631s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 631s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 631s 631s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 631s "display", "off"); 631s assert (C(1,6), 2.85812420217898e-05, 1e-09); 631s assert (C(2,6), 5.22936741204085e-07, 1e-09); 631s assert (C(3,6), 2.12794763209146e-08, 1e-09); 631s assert (C(4,6), 7.82091664406946e-15, 1e-09); 631s assert (C(5,6), 0.546591417210693, 1e-09); 631s assert (C(6,6), 0.0845897945254446, 1e-09); 631s assert (C(7,6), 9.47436557975328e-08, 1e-09); 631s assert (C(8,6), 0.188873478781067, 1e-09); 631s assert (C(9,6), 4.08974010364197e-08, 1e-09); 631s assert (C(10,6), 4.44427348175241e-06, 1e-09); 631s assert (M(1,1), 10, 1e-09); 631s assert (M(2,1), 18, 1e-09); 631s assert (M(3,1), 19, 1e-09); 631s assert (M(4,1), 21.0001428571429, 1e-09); 631s assert (M(5,1), 29.0001111111111, 1e-09); 631s assert (M(1,2), 1.0177537954095, 1e-09); 631s assert (M(2,2), 1.28736803631001, 1e-09); 631s assert (M(3,2), 1.0177537954095, 1e-09); 631s assert (M(4,2), 1.0880245732889, 1e-09); 631s assert (M(5,2), 0.959547480416536, 1e-09); 631s 631s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 631s "display", "off"); 631s assert (C(1,6), 4.08303457454140e-05, 1e-09); 631s assert (C(2,6), 1.04587348240817e-06, 1e-09); 631s assert (C(3,6), 1.06397381604573e-07, 1e-09); 631s assert (C(4,6), 7.82091664406946e-14, 1e-09); 631s assert (C(5,6), 5.46591417210693e-01, 1e-09); 631s assert (C(6,6), 1.05737243156806e-01, 1e-09); 631s assert (C(7,6), 2.36859139493832e-07, 1e-09); 631s assert (C(8,6), 2.09859420867852e-01, 1e-09); 631s assert (C(9,6), 1.36324670121399e-07, 1e-09); 631s assert (C(10,6), 7.40712246958735e-06, 1e-09); 631s 631s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 631s "display", "off"); 631s assert (C(1,6), 1.14324968087159e-04, 1e-09); 631s assert (C(2,6), 3.13762044722451e-06, 1e-09); 631s assert (C(3,6), 1.91515286888231e-07, 1e-09); 631s assert (C(4,6), 7.82091664406946e-14, 1e-09); 631s assert (C(5,6), 5.46591417210693e-01, 1e-09); 631s assert (C(6,6), 2.53769383576334e-01, 1e-09); 631s assert (C(7,6), 6.63205590582730e-07, 1e-09); 631s assert (C(8,6), 3.77746957562134e-01, 1e-09); 631s assert (C(9,6), 3.27179208291358e-07, 1e-09); 631s assert (C(10,6), 2.22213674087620e-05, 1e-09); 631s 631s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 631s "display", "off"); 631s assert (C(1,6), 1.14324968087159e-04, 1e-09); 631s assert (C(2,6), 3.13762044722451e-06, 1e-09); 631s assert (C(3,6), 1.91515286888231e-07, 1e-09); 631s assert (C(4,6), 7.82091664406946e-14, 1e-09); 631s assert (C(5,6), 5.46591417210693e-01, 1e-09); 631s assert (C(6,6), 2.53769383576334e-01, 1e-09); 631s assert (C(7,6), 6.63205590582730e-07, 1e-09); 631s assert (C(8,6), 3.77746957562134e-01, 1e-09); 631s assert (C(9,6), 3.27179208291358e-07, 1e-09); 631s assert (C(10,6), 2.22213674087620e-05, 1e-09); 631s 631s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 631s "display", "off"); 631s assert (C(1,6), 0.00108105386141085, 1e-09); 631s assert (C(2,6), 2.7779386789517e-05, 1e-09); 631s assert (C(3,6), 1.3599854038198e-06, 1e-09); 631s assert (C(4,6), 7.58830197867751e-13, 1e-09); 631s assert (C(5,6), 0.984039948220281, 1e-09); 631s assert (C(6,6), 0.539077018557706, 1e-09); 631s assert (C(7,6), 5.59475764460574e-06, 1e-09); 631s assert (C(8,6), 0.771173490574105, 1e-09); 631s assert (C(9,6), 2.52838425729905e-06, 1e-09); 631s assert (C(10,6), 0.000200719143889168, 1e-09); 631s 631s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 631s 631s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 631s "display", "off"); 631s assert (C(1,6), 2.85812420217898e-04, 1e-09); 631s assert (C(2,6), 5.22936741204085e-06, 1e-09); 631s assert (C(3,6), 2.12794763209146e-07, 1e-09); 631s assert (C(4,6), 7.82091664406946e-14, 1e-09); 631s assert (C(5,6), 1.00000000000000e+00, 1e-09); 631s assert (C(6,6), 8.45897945254446e-01, 1e-09); 631s assert (C(7,6), 9.47436557975328e-07, 1e-09); 631s assert (C(8,6), 1.00000000000000e+00, 1e-09); 631s assert (C(9,6), 4.08974010364197e-07, 1e-09); 631s assert (C(10,6), 4.44427348175241e-05, 1e-09); 631s 631s ## Test for anova1 ("equal")- comparison of results from Matlab 631s 631s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 631s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 2.85812420217898e-05, 1e-09); 631s assert (C(2,6), 5.22936741204085e-07, 1e-09); 631s assert (C(3,6), 2.12794763209146e-08, 1e-09); 631s assert (C(4,6), 7.82091664406946e-15, 1e-09); 631s assert (C(5,6), 0.546591417210693, 1e-09); 631s assert (C(6,6), 0.0845897945254446, 1e-09); 631s assert (C(7,6), 9.47436557975328e-08, 1e-09); 631s assert (C(8,6), 0.188873478781067, 1e-09); 631s assert (C(9,6), 4.08974010364197e-08, 1e-09); 631s assert (C(10,6), 4.44427348175241e-06, 1e-09); 631s assert (M(1,1), 10, 1e-09); 631s assert (M(2,1), 18, 1e-09); 631s assert (M(3,1), 19, 1e-09); 631s assert (M(4,1), 21.0001428571429, 1e-09); 631s assert (M(5,1), 29.0001111111111, 1e-09); 631s assert (M(1,2), 1.0177537954095, 1e-09); 631s assert (M(2,2), 1.28736803631001, 1e-09); 631s assert (M(3,2), 1.0177537954095, 1e-09); 631s assert (M(4,2), 1.0880245732889, 1e-09); 631s assert (M(5,2), 0.959547480416536, 1e-09); 631s 631s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 631s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 631s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 0.001247025266382, 1e-09); 631s assert (C(2,6), 0.000018037115146, 1e-09); 631s assert (C(3,6), 0.000002974595187, 1e-09); 631s assert (C(4,6), 0.000000000786046, 1e-09); 631s assert (C(5,6), 0.5693192886650109, 1e-09); 631s assert (C(6,6), 0.110501699029776, 1e-09); 631s assert (C(7,6), 0.000131226488700, 1e-09); 631s assert (C(8,6), 0.1912101409715992, 1e-09); 631s assert (C(9,6), 0.000005385256394, 1e-09); 631s assert (C(10,6), 0.000074089106171, 1e-09); 631s ***** test 631s 631s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 631s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 631s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 631s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 631s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 631s "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 1.49311100811177e-05, 1e-09); 631s assert (C(2,6), 2.20506904243535e-07, 1e-09); 631s assert (C(3,6), 0.00449897860490058, 1e-09); 631s assert (M(1,1), 6.25, 1e-09); 631s assert (M(2,1), 4.75, 1e-09); 631s assert (M(3,1), 4, 1e-09); 631s assert (M(1,2), 0.152145154862547, 1e-09); 631s assert (M(2,2), 0.152145154862547, 1e-09); 631s assert (M(3,2), 0.152145154862547, 1e-09); 631s ***** test 631s 631s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 631s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 631s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 631s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 631s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 631s "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 0.000020799832702, 1e-09); 631s assert (C(2,6), 0.000000035812410, 1e-09); 631s assert (C(3,6), 0.003038942449215, 1e-09); 631s ***** test 631s 631s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 631s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 631s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 631s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 631s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 631s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 631s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 631s "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 0.261031111511073, 1e-09); 631s assert (C(2,6), 0.065879755907745, 1e-09); 631s assert (C(3,6), 0.241874613529270, 1e-09); 631s ***** shared visibility_setting 631s visibility_setting = get (0, "DefaultFigureVisible"); 631s ***** test 631s set (0, "DefaultFigureVisible", "off"); 631s 631s ## Test for kruskalwallis - comparison with results from MATLAB 631s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 631s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 631s group = [1:3] .* ones (10,3); 631s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 631s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 0.000163089828959986, 1e-09); 631s assert (C(2,6), 0.630298044801257, 1e-09); 631s assert (C(3,6), 0.00100567660695682, 1e-09); 631s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 631s assert (C(1,6), 0.000489269486879958, 1e-09); 631s assert (C(2,6), 1, 1e-09); 631s assert (C(3,6), 0.00301702982087047, 1e-09); 631s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 631s assert (C(1,6), 0.000819054880289573, 1e-09); 631s assert (C(2,6), 0.890628039849261, 1e-09); 631s assert (C(3,6), 0.00447816059021654, 1e-09); 631s set (0, "DefaultFigureVisible", visibility_setting); 631s ***** test 631s set (0, "DefaultFigureVisible", "off"); 631s ## Test for friedman - comparison with results from MATLAB 631s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 631s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 631s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 631s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 0.227424558028569, 1e-09); 631s assert (C(2,6), 0.0327204848315735, 1e-09); 631s assert (C(3,6), 0.353160353315988, 1e-09); 631s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 631s assert (C(1,6), 0.682273674085708, 1e-09); 631s assert (C(2,6), 0.0981614544947206, 1e-09); 631s assert (C(3,6), 1, 1e-09); 631s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 631s assert (C(1,6), 0.482657360384373, 1e-09); 631s assert (C(2,6), 0.102266573027672, 1e-09); 631s assert (C(3,6), 0.649836502233148, 1e-09); 631s set (0, "DefaultFigureVisible", visibility_setting); 631s ***** test 631s set (0, "DefaultFigureVisible", "off"); 631s ## Test for fitlm - same comparisons as for first anovan example 631s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 631s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 631s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 631s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 631s 25.694 ]'; 631s 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]'; 631s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 631s "contrasts","simple"); 631s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 631s assert (C(1,6), 2.85812420217898e-05, 1e-09); 631s assert (C(2,6), 5.22936741204085e-07, 1e-09); 631s assert (C(3,6), 2.12794763209146e-08, 1e-09); 631s assert (C(4,6), 7.82091664406946e-15, 1e-09); 631s assert (C(5,6), 0.546591417210693, 1e-09); 631s assert (C(6,6), 0.0845897945254446, 1e-09); 631s assert (C(7,6), 9.47436557975328e-08, 1e-09); 631s assert (C(8,6), 0.188873478781067, 1e-09); 631s assert (C(9,6), 4.08974010364197e-08, 1e-09); 631s assert (C(10,6), 4.44427348175241e-06, 1e-09); 631s assert (M(1,1), 10, 1e-09); 631s assert (M(2,1), 18, 1e-09); 631s assert (M(3,1), 19, 1e-09); 631s assert (M(4,1), 21.0001428571429, 1e-09); 631s assert (M(5,1), 29.0001111111111, 1e-09); 631s assert (M(1,2), 1.0177537954095, 1e-09); 631s assert (M(2,2), 1.28736803631001, 1e-09); 631s assert (M(3,2), 1.0177537954095, 1e-09); 631s assert (M(4,2), 1.0880245732889, 1e-09); 631s assert (M(5,2), 0.959547480416536, 1e-09); 631s set (0, "DefaultFigureVisible", visibility_setting); 631s ***** test 631s ## Test p-value adjustments compared to R stats package function p.adjust 631s ## Data from Westfall (1997) JASA. 92(437):299-306 631s p = [.005708; .023544; .024193; .044895; ... 631s .048805; .221227; .395867; .693051; .775755]; 631s padj = multcompare (p); 631s assert (padj(1), 0.051372, 1e-06); 631s assert (padj(2), 0.188352, 1e-06); 631s assert (padj(3), 0.188352, 1e-06); 631s assert (padj(4), 0.269370, 1e-06); 631s assert (padj(5), 0.269370, 1e-06); 631s assert (padj(6), 0.884908, 1e-06); 631s assert (padj(7), 1.000000, 1e-06); 631s assert (padj(8), 1.000000, 1e-06); 631s assert (padj(9), 1.000000, 1e-06); 631s padj = multcompare(p,'ctype','holm'); 631s assert (padj(1), 0.051372, 1e-06); 631s assert (padj(2), 0.188352, 1e-06); 631s assert (padj(3), 0.188352, 1e-06); 631s assert (padj(4), 0.269370, 1e-06); 631s assert (padj(5), 0.269370, 1e-06); 631s assert (padj(6), 0.884908, 1e-06); 631s assert (padj(7), 1.000000, 1e-06); 631s assert (padj(8), 1.000000, 1e-06); 631s assert (padj(9), 1.000000, 1e-06); 631s padj = multcompare(p,'ctype','hochberg'); 631s assert (padj(1), 0.051372, 1e-06); 631s assert (padj(2), 0.169351, 1e-06); 631s assert (padj(3), 0.169351, 1e-06); 631s assert (padj(4), 0.244025, 1e-06); 631s assert (padj(5), 0.244025, 1e-06); 631s assert (padj(6), 0.775755, 1e-06); 631s assert (padj(7), 0.775755, 1e-06); 631s assert (padj(8), 0.775755, 1e-06); 631s assert (padj(9), 0.775755, 1e-06); 631s padj = multcompare(p,'ctype','fdr'); 631s assert (padj(1), 0.0513720, 1e-07); 631s assert (padj(2), 0.0725790, 1e-07); 631s assert (padj(3), 0.0725790, 1e-07); 631s assert (padj(4), 0.0878490, 1e-07); 631s assert (padj(5), 0.0878490, 1e-07); 631s assert (padj(6), 0.3318405, 1e-07); 631s assert (padj(7), 0.5089719, 1e-07); 631s assert (padj(8), 0.7757550, 1e-07); 631s assert (padj(9), 0.7757550, 1e-07); 631s 8 tests, 8 passed, 0 known failure, 0 skipped 631s [inst/ff2n.m] 631s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ff2n.m 631s ***** error ff2n (); 631s ***** error ff2n (2, 5); 631s ***** error ff2n (2.5); 631s ***** error ff2n (0); 631s ***** error ff2n (-3); 631s ***** error ff2n (3+2i); 631s ***** error ff2n (Inf); 631s ***** error ff2n (NaN); 631s ***** test 631s A = ff2n (3); 631s assert (A, [0, 0, 0; 0, 0, 1; 0, 1, 0; 0, 1, 1; ... 631s 1, 0, 0; 1, 0, 1; 1, 1, 0; 1, 1, 1]); 631s ***** test 631s A = ff2n (2); 631s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 631s 10 tests, 10 passed, 0 known failure, 0 skipped 631s [inst/friedman.m] 631s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/friedman.m 631s ***** demo 631s load popcorn; 631s friedman (popcorn, 3); 631s ***** demo 631s load popcorn; 631s [p, atab] = friedman (popcorn, 3, "off"); 631s disp (p); 631s ***** test 631s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 631s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 631s [p, atab] = friedman (popcorn, 3, "off"); 631s assert (p, 0.001028853354594794, 1e-14); 631s assert (atab{2,2}, 99.75, 1e-14); 631s assert (atab{2,3}, 2, 0); 631s assert (atab{2,4}, 49.875, 1e-14); 631s assert (atab{2,5}, 13.75862068965517, 1e-14); 631s assert (atab{2,6}, 0.001028853354594794, 1e-14); 631s assert (atab{3,2}, 0.08333333333333215, 1e-14); 631s assert (atab{3,4}, 0.04166666666666607, 1e-14); 631s assert (atab{4,3}, 12, 0); 631s ***** test 631s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 631s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 631s [p, atab, stats] = friedman (popcorn, 3, "off"); 631s assert (atab{5,2}, 116, 0); 631s assert (atab{5,3}, 17, 0); 631s assert (stats.source, "friedman"); 631s assert (stats.n, 2); 631s assert (stats.meanranks, [8, 4.75, 2.25], 0); 631s assert (stats.sigma, 2.692582403567252, 1e-14); 631s 2 tests, 2 passed, 0 known failure, 0 skipped 631s [inst/optimalleaforder.m] 631s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/optimalleaforder.m 631s ***** demo 631s randn ("seed", 5) # for reproducibility 631s X = randn (10, 2); 631s D = pdist (X); 631s tree = linkage(D, 'average'); 631s optimalleaforder (tree, D, 'Transformation', 'linear') 631s ***** error optimalleaforder () 631s ***** error optimalleaforder (1) 631s ***** error optimalleaforder (ones (2, 2), 1) 631s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 631s ***** error optimalleaforder ([1 2 1], [1 2 3]) 631s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 631s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 631s 7 tests, 7 passed, 0 known failure, 0 skipped 631s [inst/dist_fun/geornd.m] 631s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/geornd.m 631s ***** assert (size (geornd (0.5)), [1, 1]) 631s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 631s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 631s ***** assert (size (geornd (0.5, 3)), [3, 3]) 631s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 631s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 631s ***** assert (class (geornd (0.5)), "double") 631s ***** assert (class (geornd (single (0.5))), "single") 632s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 632s ***** assert (class (geornd (single (0))), "single") 632s ***** assert (class (geornd (single (1))), "single") 632s ***** error geornd () 632s ***** error geornd (i) 632s ***** error ... 632s geornd (1, -1) 632s ***** error ... 632s geornd (1, 1.2) 632s ***** error ... 632s geornd (1, ones (2)) 632s ***** error ... 632s geornd (1, [2 -1 2]) 632s ***** error ... 632s geornd (1, [2 0 2.5]) 632s ***** error ... 632s geornd (ones (2), ones (2)) 632s ***** error ... 632s geornd (1, 2, -1, 5) 632s ***** error ... 632s geornd (1, 2, 1.5, 5) 632s ***** error geornd (ones (2,2), 3) 632s ***** error geornd (ones (2,2), [3, 2]) 632s ***** error geornd (ones (2,2), 2, 3) 632s 24 tests, 24 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/evrnd.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/evrnd.m 632s ***** assert (size (evrnd (1, 1)), [1 1]) 632s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 632s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 632s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 632s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 632s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 632s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 632s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 632s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 632s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 632s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 632s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 632s ***** assert (class (evrnd (1, 1)), "double") 632s ***** assert (class (evrnd (1, single (1))), "single") 632s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 632s ***** assert (class (evrnd (single (1), 1)), "single") 632s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 632s ***** error evrnd () 632s ***** error evrnd (1) 632s ***** error ... 632s evrnd (ones (3), ones (2)) 632s ***** error ... 632s evrnd (ones (2), ones (3)) 632s ***** error evrnd (i, 2, 3) 632s ***** error evrnd (1, i, 3) 632s ***** error ... 632s evrnd (1, 2, -1) 632s ***** error ... 632s evrnd (1, 2, 1.2) 632s ***** error ... 632s evrnd (1, 2, ones (2)) 632s ***** error ... 632s evrnd (1, 2, [2 -1 2]) 632s ***** error ... 632s evrnd (1, 2, [2 0 2.5]) 632s ***** error ... 632s evrnd (1, 2, 2, -1, 5) 632s ***** error ... 632s evrnd (1, 2, 2, 1.5, 5) 632s ***** error ... 632s evrnd (2, ones (2), 3) 632s ***** error ... 632s evrnd (2, ones (2), [3, 2]) 632s ***** error ... 632s evrnd (2, ones (2), 3, 2) 632s 33 tests, 33 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/exppdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/exppdf.m 632s ***** demo 632s ## Plot various PDFs from the exponential distribution 632s x = 0:0.01:5; 632s y1 = exppdf (x, 2/3); 632s y2 = exppdf (x, 1.0); 632s y3 = exppdf (x, 2.0); 632s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 632s grid on 632s ylim ([0, 1.5]) 632s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 632s title ("Exponential PDF") 632s xlabel ("values in x") 632s ylabel ("density") 632s ***** shared x,y 632s x = [-1 0 0.5 1 Inf]; 632s y = gampdf (x, 1, 2); 632s ***** assert (exppdf (x, 2*ones (1,5)), y) 632s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 632s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 632s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 632s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 632s ***** error exppdf () 632s ***** error exppdf (1,2,3) 632s ***** error ... 632s exppdf (ones (3), ones (2)) 632s ***** error ... 632s exppdf (ones (2), ones (3)) 632s ***** error exppdf (i, 2) 632s ***** error exppdf (2, i) 632s 11 tests, 11 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/laplacernd.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/laplacernd.m 632s ***** assert (size (laplacernd (1, 1)), [1 1]) 632s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 632s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 632s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 632s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 632s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 632s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 632s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 632s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 632s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 632s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 632s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 632s ***** assert (class (laplacernd (1, 1)), "double") 632s ***** assert (class (laplacernd (1, single (1))), "single") 632s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 632s ***** assert (class (laplacernd (single (1), 1)), "single") 632s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 632s ***** error laplacernd () 632s ***** error laplacernd (1) 632s ***** error ... 632s laplacernd (ones (3), ones (2)) 632s ***** error ... 632s laplacernd (ones (2), ones (3)) 632s ***** error laplacernd (i, 2, 3) 632s ***** error laplacernd (1, i, 3) 632s ***** error ... 632s laplacernd (1, 2, -1) 632s ***** error ... 632s laplacernd (1, 2, 1.2) 632s ***** error ... 632s laplacernd (1, 2, ones (2)) 632s ***** error ... 632s laplacernd (1, 2, [2 -1 2]) 632s ***** error ... 632s laplacernd (1, 2, [2 0 2.5]) 632s ***** error ... 632s laplacernd (1, 2, 2, -1, 5) 632s ***** error ... 632s laplacernd (1, 2, 2, 1.5, 5) 632s ***** error ... 632s laplacernd (2, ones (2), 3) 632s ***** error ... 632s laplacernd (2, ones (2), [3, 2]) 632s ***** error ... 632s laplacernd (2, ones (2), 3, 2) 632s 33 tests, 33 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/copulacdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/copulacdf.m 632s ***** test 632s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 632s theta = [1; 2]; 632s p = copulacdf ("Clayton", x, theta); 632s expected_p = [0.1395; 0.1767]; 632s assert (p, expected_p, 0.001); 632s ***** test 632s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 632s p = copulacdf ("Gumbel", x, 2); 632s expected_p = [0.1464; 0.1464]; 632s assert (p, expected_p, 0.001); 632s ***** test 632s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 632s theta = [1; 2]; 632s p = copulacdf ("Frank", x, theta); 632s expected_p = [0.0699; 0.0930]; 632s assert (p, expected_p, 0.001); 632s ***** test 632s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 632s theta = [0.3; 0.7]; 632s p = copulacdf ("AMH", x, theta); 632s expected_p = [0.0629; 0.0959]; 632s assert (p, expected_p, 0.001); 632s ***** test 632s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 632s theta = [0.2, 0.1, 0.1, 0.05]; 632s p = copulacdf ("FGM", x, theta); 632s expected_p = [0.0558; 0.0293]; 632s assert (p, expected_p, 0.001); 632s 5 tests, 5 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/lognpdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/lognpdf.m 632s ***** demo 632s ## Plot various PDFs from the log-normal distribution 632s x = 0:0.01:5; 632s y1 = lognpdf (x, 0, 1); 632s y2 = lognpdf (x, 0, 0.5); 632s y3 = lognpdf (x, 0, 0.25); 632s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 632s grid on 632s ylim ([0, 2]) 632s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 632s "location", "northeast") 632s title ("Log-normal PDF") 632s xlabel ("values in x") 632s ylabel ("density") 632s ***** shared x, y 632s x = [-1 0 e Inf]; 632s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 632s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 632s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 632s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 632s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 632s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 632s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 632s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 632s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 632s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 632s ***** error lognpdf () 632s ***** error lognpdf (1,2,3,4) 632s ***** error lognpdf (ones (3), ones (2), ones (2)) 632s ***** error lognpdf (ones (2), ones (3), ones (2)) 632s ***** error lognpdf (ones (2), ones (2), ones (3)) 632s ***** error lognpdf (i, 2, 2) 632s ***** error lognpdf (2, i, 2) 632s ***** error lognpdf (2, 2, i) 632s 17 tests, 17 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/invgpdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/invgpdf.m 632s ***** demo 632s ## Plot various PDFs from the inverse Gaussian distribution 632s x = 0:0.001:3; 632s y1 = invgpdf (x, 1, 0.2); 632s y2 = invgpdf (x, 1, 1); 632s y3 = invgpdf (x, 1, 3); 632s y4 = invgpdf (x, 3, 0.2); 632s y5 = invgpdf (x, 3, 1); 632s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 632s grid on 632s xlim ([0, 3]) 632s ylim ([0, 3]) 632s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 632s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 632s title ("Inverse Gaussian PDF") 632s xlabel ("values in x") 632s ylabel ("density") 632s ***** shared x, y 632s x = [-Inf, -1, 0, 1/2, 1, Inf]; 632s y = [0, 0, 0, 0.8788, 0.3989, 0]; 632s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 632s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 632s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 632s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 632s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 632s ***** error invgpdf () 632s ***** error invgpdf (1) 632s ***** error invgpdf (1, 2) 632s ***** error ... 632s invgpdf (1, ones (2), ones (3)) 632s ***** error ... 632s invgpdf (ones (2), 1, ones (3)) 632s ***** error ... 632s invgpdf (ones (2), ones (3), 1) 632s ***** error invgpdf (i, 2, 3) 632s ***** error invgpdf (1, i, 3) 632s ***** error invgpdf (1, 2, i) 632s 14 tests, 14 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/fpdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/fpdf.m 632s ***** demo 632s ## Plot various PDFs from the F distribution 632s x = 0.01:0.01:4; 632s y1 = fpdf (x, 1, 1); 632s y2 = fpdf (x, 2, 1); 632s y3 = fpdf (x, 5, 2); 632s y4 = fpdf (x, 10, 1); 632s y5 = fpdf (x, 100, 100); 632s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 632s grid on 632s ylim ([0, 2.5]) 632s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 632s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 632s "df1 = 100, df2 = 100"}, "location", "northeast") 632s title ("F PDF") 632s xlabel ("values in x") 632s ylabel ("density") 632s ***** shared x, y 632s x = [-1, 0, 0.5, 1, 2]; 632s y = [0, 0, 4/9, 1/4, 1/9]; 632s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 632s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 632s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 632s ***** assert (fpdf (x, [0, NaN, Inf, 2, 2], 2), [NaN, NaN, 0.5413, y(4:5)], 1e-4) 632s ***** assert (fpdf (x, 2, [0, NaN, Inf, 2, 2]), [NaN, NaN, 0.6065, y(4:5)], 1e-4) 632s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 632s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 632s rand ("seed", 1234); # for reproducibility 632s xr = rand (10,1); 632s xr = xr(x > 0.1 & x < 0.9); 632s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 632s assert (fpdf (xr, 1, 2), yr, 5*eps); 632s ***** test 632s yy = fpdf (2, 4, Inf); 632s assert (yy, 0.1465, 1e-4) 632s ***** test 632s yy = fpdf (2, 4, 1000000000000000); 632s assert (yy, 0.1465, 1e-4) 632s ***** test 632s yy = fpdf (2, Inf, 4); 632s assert (yy, 0.1839, 1e-4) 632s ***** test 632s yy = fpdf (2, 10000000000000000, 4); 632s assert (yy, 0.1839, 1e-4) 632s ***** test 632s yy = fpdf (2, Inf, Inf); 632s assert (yy, 0) 632s ***** test 632s yy = fpdf (NaN, Inf, Inf); 632s assert (yy, NaN) 632s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 632s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 632s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 632s ***** error fpdf () 632s ***** error fpdf (1) 632s ***** error fpdf (1,2) 632s ***** error ... 632s fpdf (ones (3), ones (2), ones (2)) 632s ***** error ... 632s fpdf (ones (2), ones (3), ones (2)) 632s ***** error ... 632s fpdf (ones (2), ones (2), ones (3)) 632s ***** error fpdf (i, 2, 2) 632s ***** error fpdf (2, i, 2) 632s ***** error fpdf (2, 2, i) 632s 25 tests, 25 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/laplacecdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/laplacecdf.m 632s ***** demo 632s ## Plot various CDFs from the Laplace distribution 632s x = -10:0.01:10; 632s p1 = laplacecdf (x, 0, 1); 632s p2 = laplacecdf (x, 0, 2); 632s p3 = laplacecdf (x, 0, 4); 632s p4 = laplacecdf (x, -5, 4); 632s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 632s grid on 632s xlim ([-10, 10]) 632s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 632s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 632s title ("Laplace CDF") 632s xlabel ("values in x") 632s ylabel ("probability") 632s ***** shared x, y 632s x = [-Inf, -log(2), 0, log(2), Inf]; 632s y = [0, 1/4, 1/2, 3/4, 1]; 632s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 632s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 632s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 632s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 632s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 632s ***** error laplacecdf () 632s ***** error laplacecdf (1) 632s ***** error ... 632s laplacecdf (1, 2) 632s ***** error ... 632s laplacecdf (1, 2, 3, 4, 5) 632s ***** error laplacecdf (1, 2, 3, "tail") 632s ***** error laplacecdf (1, 2, 3, 4) 632s ***** error ... 632s laplacecdf (ones (3), ones (2), ones (2)) 632s ***** error ... 632s laplacecdf (ones (2), ones (3), ones (2)) 632s ***** error ... 632s laplacecdf (ones (2), ones (2), ones (3)) 632s ***** error laplacecdf (i, 2, 2) 632s ***** error laplacecdf (2, i, 2) 632s ***** error laplacecdf (2, 2, i) 632s 17 tests, 17 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/nctcdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nctcdf.m 632s ***** demo 632s ## Plot various CDFs from the noncentral Τ distribution 632s x = -5:0.01:5; 632s p1 = nctcdf (x, 1, 0); 632s p2 = nctcdf (x, 4, 0); 632s p3 = nctcdf (x, 1, 2); 632s p4 = nctcdf (x, 4, 2); 632s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 632s grid on 632s xlim ([-5, 5]) 632s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 632s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 632s title ("Noncentral Τ CDF") 632s xlabel ("values in x") 632s ylabel ("probability") 632s ***** demo 632s ## Compare the noncentral T CDF with MU = 1 to the T CDF 632s ## with the same number of degrees of freedom (10). 632s 632s x = -5:0.1:5; 632s p1 = nctcdf (x, 10, 1); 632s p2 = tcdf (x, 10); 632s plot (x, p1, "-", x, p2, "-") 632s grid on 632s xlim ([-5, 5]) 632s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 632s title ("Noncentral T vs T CDFs") 632s xlabel ("values in x") 632s ylabel ("probability") 632s ***** test 632s x = -2:0.1:2; 632s p = nctcdf (x, 10, 1); 632s assert (p(1), 0.003302485766631558, 1e-14); 632s assert (p(2), 0.004084668193532631, 1e-14); 632s assert (p(3), 0.005052800319478737, 1e-14); 632s assert (p(41), 0.8076115625303751, 1e-14); 632s ***** test 632s p = nctcdf (12, 10, 3); 632s assert (p, 0.9997719343243797, 1e-14); 632s ***** test 632s p = nctcdf (2, 3, 2); 632s assert (p, 0.4430757822176028, 1e-14); 632s ***** test 632s p = nctcdf (2, 3, 2, "upper"); 632s assert (p, 0.5569242177823971, 1e-14); 632s ***** test 632s p = nctcdf ([3, 6], 3, 2, "upper"); 632s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 632s ***** error nctcdf () 632s ***** error nctcdf (1) 632s ***** error nctcdf (1, 2) 632s ***** error nctcdf (1, 2, 3, "tail") 632s ***** error nctcdf (1, 2, 3, 4) 632s ***** error ... 632s nctcdf (ones (3), ones (2), ones (2)) 632s ***** error ... 632s nctcdf (ones (2), ones (3), ones (2)) 632s ***** error ... 632s nctcdf (ones (2), ones (2), ones (3)) 632s ***** error nctcdf (i, 2, 2) 632s ***** error nctcdf (2, i, 2) 632s ***** error nctcdf (2, 2, i) 632s 16 tests, 16 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/nakarnd.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nakarnd.m 632s ***** assert (size (nakarnd (1, 1)), [1 1]) 632s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 632s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 632s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 632s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 632s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 632s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 632s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 632s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 632s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 632s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 632s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 632s ***** assert (class (nakarnd (1, 1)), "double") 632s ***** assert (class (nakarnd (1, single (1))), "single") 632s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 632s ***** assert (class (nakarnd (single (1), 1)), "single") 632s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 632s ***** error nakarnd () 632s ***** error nakarnd (1) 632s ***** error ... 632s nakarnd (ones (3), ones (2)) 632s ***** error ... 632s nakarnd (ones (2), ones (3)) 632s ***** error nakarnd (i, 2, 3) 632s ***** error nakarnd (1, i, 3) 632s ***** error ... 632s nakarnd (1, 2, -1) 632s ***** error ... 632s nakarnd (1, 2, 1.2) 632s ***** error ... 632s nakarnd (1, 2, ones (2)) 632s ***** error ... 632s nakarnd (1, 2, [2 -1 2]) 632s ***** error ... 632s nakarnd (1, 2, [2 0 2.5]) 632s ***** error ... 632s nakarnd (1, 2, 2, -1, 5) 632s ***** error ... 632s nakarnd (1, 2, 2, 1.5, 5) 632s ***** error ... 632s nakarnd (2, ones (2), 3) 632s ***** error ... 632s nakarnd (2, ones (2), [3, 2]) 632s ***** error ... 632s nakarnd (2, ones (2), 3, 2) 632s 33 tests, 33 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/unidpdf.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unidpdf.m 632s ***** demo 632s ## Plot various PDFs from the discrete uniform distribution 632s x = 0:10; 632s y1 = unidpdf (x, 5); 632s y2 = unidpdf (x, 9); 632s plot (x, y1, "*b", x, y2, "*g") 632s grid on 632s xlim ([0, 10]) 632s ylim ([0, 0.25]) 632s legend ({"N = 5", "N = 9"}, "location", "northeast") 632s title ("Discrete uniform PDF") 632s xlabel ("values in x") 632s ylabel ("density") 632s ***** shared x, y 632s x = [-1 0 1 2 10 11]; 632s y = [0 0 0.1 0.1 0.1 0]; 632s ***** assert (unidpdf (x, 10*ones (1,6)), y) 632s ***** assert (unidpdf (x, 10), y) 632s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 632s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 632s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 632s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 632s ***** error unidpdf () 632s ***** error unidpdf (1) 632s ***** error ... 632s unidpdf (ones (3), ones (2)) 632s ***** error ... 632s unidpdf (ones (2), ones (3)) 632s ***** error unidpdf (i, 2) 632s ***** error unidpdf (2, i) 632s 12 tests, 12 passed, 0 known failure, 0 skipped 632s [inst/dist_fun/nakainv.m] 632s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nakainv.m 632s ***** demo 632s ## Plot various iCDFs from the Nakagami distribution 632s p = 0.001:0.001:0.999; 632s x1 = nakainv (p, 0.5, 1); 632s x2 = nakainv (p, 1, 1); 632s x3 = nakainv (p, 1, 2); 632s x4 = nakainv (p, 1, 3); 632s x5 = nakainv (p, 2, 1); 632s x6 = nakainv (p, 2, 2); 632s x7 = nakainv (p, 5, 1); 632s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 632s p, x5, "-k", p, x6, "-b", p, x7, "-c") 632s grid on 632s ylim ([0, 3]) 632s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 632s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 632s "μ = 5, ω = 1"}, "location", "northwest") 632s title ("Nakagami iCDF") 632s xlabel ("probability") 632s ylabel ("values in x") 632s ***** shared p, y 632s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 632s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 632s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 632s ***** assert (nakainv (p, 1, 1), y, eps) 632s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 632s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 632s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 632s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 632s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 632s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 632s ***** error nakainv () 632s ***** error nakainv (1) 632s ***** error nakainv (1, 2) 632s ***** error ... 632s nakainv (ones (3), ones (2), ones(2)) 632s ***** error ... 632s nakainv (ones (2), ones (3), ones(2)) 632s ***** error ... 632s nakainv (ones (2), ones (2), ones(3)) 632s ***** error nakainv (i, 4, 3) 632s ***** error nakainv (1, i, 3) 632s ***** error nakainv (1, 4, i) 633s 17 tests, 17 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/betainv.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/betainv.m 633s ***** demo 633s ## Plot various iCDFs from the Beta distribution 633s p = 0.001:0.001:0.999; 633s x1 = betainv (p, 0.5, 0.5); 633s x2 = betainv (p, 5, 1); 633s x3 = betainv (p, 1, 3); 633s x4 = betainv (p, 2, 2); 633s x5 = betainv (p, 2, 5); 633s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 633s grid on 633s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 633s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 633s title ("Beta iCDF") 633s xlabel ("probability") 633s ylabel ("values in x") 633s ***** shared p 633s p = [-1 0 0.75 1 2]; 633s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 633s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 633s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 633s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 633s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 633s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 633s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 633s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 633s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 633s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 633s ***** error betainv () 633s ***** error betainv (1) 633s ***** error betainv (1,2) 633s ***** error betainv (1,2,3,4) 633s ***** error ... 633s betainv (ones (3), ones (2), ones (2)) 633s ***** error ... 633s betainv (ones (2), ones (3), ones (2)) 633s ***** error ... 633s betainv (ones (2), ones (2), ones (3)) 633s ***** error betainv (i, 2, 2) 633s ***** error betainv (2, i, 2) 633s ***** error betainv (2, 2, i) 633s 20 tests, 20 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/wishrnd.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wishrnd.m 633s ***** assert(size (wishrnd (1,2)), [1, 1]); 633s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 633s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 633s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 633s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 633s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 633s ***** error wishrnd () 633s ***** error wishrnd (1) 633s ***** error wishrnd ([1; 1], 2) 633s 9 tests, 9 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/nbincdf.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nbincdf.m 633s ***** demo 633s ## Plot various CDFs from the negative binomial distribution 633s x = 0:50; 633s p1 = nbincdf (x, 2, 0.15); 633s p2 = nbincdf (x, 5, 0.2); 633s p3 = nbincdf (x, 4, 0.4); 633s p4 = nbincdf (x, 10, 0.3); 633s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 633s grid on 633s xlim ([0, 40]) 633s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 633s "r = 10, ps = 0.3"}, "location", "southeast") 633s title ("Negative binomial CDF") 633s xlabel ("values in x (number of failures)") 633s ylabel ("probability") 633s ***** shared x, y 633s x = [-1 0 1 2 Inf]; 633s y = [0 1/2 3/4 7/8 1]; 633s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 633s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 633s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 633s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 633s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 633s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 633s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 633s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 633s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 633s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 633s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 633s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 633s ***** error nbincdf () 633s ***** error nbincdf (1) 633s ***** error nbincdf (1, 2) 633s ***** error nbincdf (1, 2, 3, 4) 633s ***** error nbincdf (1, 2, 3, "some") 633s ***** error ... 633s nbincdf (ones (3), ones (2), ones (2)) 633s ***** error ... 633s nbincdf (ones (2), ones (3), ones (2)) 633s ***** error ... 633s nbincdf (ones (2), ones (2), ones (3)) 633s ***** error nbincdf (i, 2, 2) 633s ***** error nbincdf (2, i, 2) 633s ***** error nbincdf (2, 2, i) 633s 22 tests, 22 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/chi2rnd.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/chi2rnd.m 633s ***** assert (size (chi2rnd (2)), [1, 1]) 633s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 633s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 633s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 633s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 633s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 633s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 633s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 633s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 633s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 633s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 633s ***** assert (class (chi2rnd (2)), "double") 633s ***** assert (class (chi2rnd (single (2))), "single") 633s ***** assert (class (chi2rnd (single ([2 2]))), "single") 633s ***** error chi2rnd () 633s ***** error chi2rnd (i) 633s ***** error ... 633s chi2rnd (1, -1) 633s ***** error ... 633s chi2rnd (1, 1.2) 633s ***** error ... 633s chi2rnd (1, ones (2)) 633s ***** error ... 633s chi2rnd (1, [2 -1 2]) 633s ***** error ... 633s chi2rnd (1, [2 0 2.5]) 633s ***** error ... 633s chi2rnd (ones (2), ones (2)) 633s ***** error ... 633s chi2rnd (1, 2, -1, 5) 633s ***** error ... 633s chi2rnd (1, 2, 1.5, 5) 633s ***** error chi2rnd (ones (2,2), 3) 633s ***** error chi2rnd (ones (2,2), [3, 2]) 633s ***** error chi2rnd (ones (2,2), 2, 3) 633s 27 tests, 27 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/hygecdf.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hygecdf.m 633s ***** demo 633s ## Plot various CDFs from the hypergeometric distribution 633s x = 0:60; 633s p1 = hygecdf (x, 500, 50, 100); 633s p2 = hygecdf (x, 500, 60, 200); 633s p3 = hygecdf (x, 500, 70, 300); 633s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 633s grid on 633s xlim ([0, 60]) 633s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 633s "m = 500, k = 70, n = 300"}, "location", "southeast") 633s title ("Hypergeometric CDF") 633s xlabel ("values in x (number of successes)") 633s ylabel ("probability") 633s ***** shared x, y 633s x = [-1 0 1 2 3]; 633s y = [0 1/6 5/6 1 1]; 633s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 633s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 633s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 633s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 633s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 633s [y(5) NaN NaN NaN y(1)], 5*eps) 633s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 633s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 633s [y(5) NaN NaN NaN y(1)], 5*eps) 633s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 633s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 633s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 633s [y(5) NaN NaN NaN y(1)], 5*eps) 633s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 633s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 633s ***** test 633s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 633s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 633s ***** test 633s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 633s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 633s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 633s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 633s eps ("single")) 633s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 633s eps ("single")) 633s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 633s eps ("single")) 633s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 633s eps ("single")) 633s ***** error hygecdf () 633s ***** error hygecdf (1) 633s ***** error hygecdf (1,2) 633s ***** error hygecdf (1,2,3) 633s ***** error hygecdf (1,2,3,4,5) 633s ***** error hygecdf (1,2,3,4,"uper") 633s ***** error ... 633s hygecdf (ones (2), ones (3), 1, 1) 633s ***** error ... 633s hygecdf (1, ones (2), ones (3), 1) 633s ***** error ... 633s hygecdf (1, 1, ones (2), ones (3)) 633s ***** error hygecdf (i, 2, 2, 2) 633s ***** error hygecdf (2, i, 2, 2) 633s ***** error hygecdf (2, 2, i, 2) 633s ***** error hygecdf (2, 2, 2, i) 633s 32 tests, 32 passed, 0 known failure, 0 skipped 633s [inst/dist_fun/riceinv.m] 633s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/riceinv.m 633s ***** demo 633s ## Plot various iCDFs from the Rician distribution 633s p = 0.001:0.001:0.999; 633s x1 = riceinv (p, 0, 1); 633s x2 = riceinv (p, 0.5, 1); 633s x3 = riceinv (p, 1, 1); 633s x4 = riceinv (p, 2, 1); 633s x5 = riceinv (p, 4, 1); 633s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 633s grid on 633s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 633s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 633s title ("Rician iCDF") 633s xlabel ("probability") 633s ylabel ("values in x") 633s ***** shared p 633s p = [-1 0 0.75 1 2]; 633s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 633s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 633s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 633s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 633s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 633s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 633s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 633s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 633s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 633s ***** assert (riceinv ([p, NaN], single (1), 2), ... 633s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 633s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 633s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 634s ***** error riceinv () 634s ***** error riceinv (1) 634s ***** error riceinv (1,2) 634s ***** error riceinv (1,2,3,4) 634s ***** error ... 634s riceinv (ones (3), ones (2), ones (2)) 634s ***** error ... 634s riceinv (ones (2), ones (3), ones (2)) 634s ***** error ... 634s riceinv (ones (2), ones (2), ones (3)) 634s ***** error riceinv (i, 2, 2) 634s ***** error riceinv (2, i, 2) 634s ***** error riceinv (2, 2, i) 634s 20 tests, 20 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/fcdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/fcdf.m 634s ***** demo 634s ## Plot various CDFs from the F distribution 634s x = 0.01:0.01:4; 634s p1 = fcdf (x, 1, 2); 634s p2 = fcdf (x, 2, 1); 634s p3 = fcdf (x, 5, 2); 634s p4 = fcdf (x, 10, 1); 634s p5 = fcdf (x, 100, 100); 634s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 634s grid on 634s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 634s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 634s "df1 = 100, df2 = 100"}, "location", "southeast") 634s title ("F CDF") 634s xlabel ("values in x") 634s ylabel ("probability") 634s ***** shared x, y 634s x = [-1, 0, 0.5, 1, 2, Inf]; 634s y = [0, 0, 1/3, 1/2, 2/3, 1]; 634s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 634s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 634s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 634s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 634s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 634s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 634s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 634s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 634s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 634s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 634s ***** error fcdf () 634s ***** error fcdf (1) 634s ***** error fcdf (1, 2) 634s ***** error fcdf (1, 2, 3, 4) 634s ***** error fcdf (1, 2, 3, "tail") 634s ***** error ... 634s fcdf (ones (3), ones (2), ones (2)) 634s ***** error ... 634s fcdf (ones (2), ones (3), ones (2)) 634s ***** error ... 634s fcdf (ones (2), ones (2), ones (3)) 634s ***** error fcdf (i, 2, 2) 634s ***** error fcdf (2, i, 2) 634s ***** error fcdf (2, 2, i) 634s 21 tests, 21 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/tpdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tpdf.m 634s ***** demo 634s ## Plot various PDFs from the Student's T distribution 634s x = -5:0.01:5; 634s y1 = tpdf (x, 1); 634s y2 = tpdf (x, 2); 634s y3 = tpdf (x, 5); 634s y4 = tpdf (x, Inf); 634s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 634s grid on 634s xlim ([-5, 5]) 634s ylim ([0, 0.41]) 634s legend ({"df = 1", "df = 2", ... 634s "df = 5", 'df = \infty'}, "location", "northeast") 634s title ("Student's T PDF") 634s xlabel ("values in x") 634s ylabel ("density") 634s ***** test 634s x = rand (10,1); 634s y = 1./(pi * (1 + x.^2)); 634s assert (tpdf (x, 1), y, 5*eps); 634s ***** shared x, y 634s x = [-Inf 0 0.5 1 Inf]; 634s y = 1./(pi * (1 + x.^2)); 634s ***** assert (tpdf (x, ones (1,5)), y, eps) 634s ***** assert (tpdf (x, 1), y, eps) 634s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 634s ***** assert (tpdf (x, Inf), normpdf (x)) 634s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 634s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 634s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 634s ***** error tpdf () 634s ***** error tpdf (1) 634s ***** error ... 634s tpdf (ones (3), ones (2)) 634s ***** error ... 634s tpdf (ones (2), ones (3)) 634s ***** error tpdf (i, 2) 634s ***** error tpdf (2, i) 634s 14 tests, 14 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/geopdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/geopdf.m 634s ***** demo 634s ## Plot various PDFs from the geometric distribution 634s x = 0:10; 634s y1 = geopdf (x, 0.2); 634s y2 = geopdf (x, 0.5); 634s y3 = geopdf (x, 0.7); 634s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 634s grid on 634s ylim ([0, 0.8]) 634s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 634s title ("Geometric PDF") 634s xlabel ("values in x (number of failures)") 634s ylabel ("density") 634s ***** shared x, y 634s x = [-1 0 1 Inf]; 634s y = [0, 1/2, 1/4, NaN]; 634s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 634s ***** assert (geopdf (x, 0.5), y) 634s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 634s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 634s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 634s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 634s ***** error geopdf () 634s ***** error geopdf (1) 634s ***** error geopdf (1,2,3) 634s ***** error geopdf (ones (3), ones (2)) 634s ***** error geopdf (ones (2), ones (3)) 634s ***** error geopdf (i, 2) 634s ***** error geopdf (2, i) 634s 13 tests, 13 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/loglrnd.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/loglrnd.m 634s ***** assert (size (loglrnd (1, 1)), [1 1]) 634s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 634s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 634s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 634s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 634s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 634s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 634s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 634s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 634s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 634s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 634s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 634s ***** assert (class (loglrnd (1, 1)), "double") 634s ***** assert (class (loglrnd (1, single (1))), "single") 634s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 634s ***** assert (class (loglrnd (single (1), 1)), "single") 634s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 634s ***** error loglrnd () 634s ***** error loglrnd (1) 634s ***** error ... 634s loglrnd (ones (3), ones (2)) 634s ***** error ... 634s loglrnd (ones (2), ones (3)) 634s ***** error loglrnd (i, 2, 3) 634s ***** error loglrnd (1, i, 3) 634s ***** error ... 634s loglrnd (1, 2, -1) 634s ***** error ... 634s loglrnd (1, 2, 1.2) 634s ***** error ... 634s loglrnd (1, 2, ones (2)) 634s ***** error ... 634s loglrnd (1, 2, [2 -1 2]) 634s ***** error ... 634s loglrnd (1, 2, [2 0 2.5]) 634s ***** error ... 634s loglrnd (1, 2, 2, -1, 5) 634s ***** error ... 634s loglrnd (1, 2, 2, 1.5, 5) 634s ***** error ... 634s loglrnd (2, ones (2), 3) 634s ***** error ... 634s loglrnd (2, ones (2), [3, 2]) 634s ***** error ... 634s loglrnd (2, ones (2), 3, 2) 634s 33 tests, 33 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/bisarnd.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bisarnd.m 634s ***** assert (size (bisarnd (1, 1)), [1 1]) 634s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 634s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 634s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 634s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 634s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 634s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 634s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 634s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 634s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 634s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 634s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 634s ***** assert (class (bisarnd (1, 1)), "double") 634s ***** assert (class (bisarnd (1, single (1))), "single") 634s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 634s ***** assert (class (bisarnd (single (1), 1)), "single") 634s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 634s ***** error bisarnd () 634s ***** error bisarnd (1) 634s ***** error ... 634s bisarnd (ones (3), ones (2)) 634s ***** error ... 634s bisarnd (ones (2), ones (3)) 634s ***** error bisarnd (i, 2, 3) 634s ***** error bisarnd (1, i, 3) 634s ***** error ... 634s bisarnd (1, 2, -1) 634s ***** error ... 634s bisarnd (1, 2, 1.2) 634s ***** error ... 634s bisarnd (1, 2, ones (2)) 634s ***** error ... 634s bisarnd (1, 2, [2 -1 2]) 634s ***** error ... 634s bisarnd (1, 2, [2 0 2.5]) 634s ***** error ... 634s bisarnd (1, 2, 2, -1, 5) 634s ***** error ... 634s bisarnd (1, 2, 2, 1.5, 5) 634s ***** error ... 634s bisarnd (2, ones (2), 3) 634s ***** error ... 634s bisarnd (2, ones (2), [3, 2]) 634s ***** error ... 634s bisarnd (2, ones (2), 3, 2) 634s 33 tests, 33 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/bvtcdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bvtcdf.m 634s ***** test 634s x = [1, 2]; 634s rho = [1, 0.5; 0.5, 1]; 634s df = 4; 634s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 634s ***** test 634s x = [3, 2;2, 4;1, 5]; 634s rho = [1, 0.5; 0.5, 1]; 634s df = 4; 634s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 634s 2 tests, 2 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/poissinv.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/poissinv.m 634s ***** demo 634s ## Plot various iCDFs from the Poisson distribution 634s p = 0.001:0.001:0.999; 634s x1 = poissinv (p, 13); 634s x2 = poissinv (p, 4); 634s x3 = poissinv (p, 10); 634s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 634s grid on 634s ylim ([0, 20]) 634s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 634s title ("Poisson iCDF") 634s xlabel ("probability") 634s ylabel ("values in x (number of occurences)") 634s ***** shared p 634s p = [-1 0 0.5 1 2]; 634s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 634s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 634s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 634s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 634s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 634s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 634s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 634s ***** error poissinv () 634s ***** error poissinv (1) 634s ***** error ... 634s poissinv (ones (3), ones (2)) 634s ***** error ... 634s poissinv (ones (2), ones (3)) 634s ***** error poissinv (i, 2) 634s ***** error poissinv (2, i) 634s 13 tests, 13 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/ncfcdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncfcdf.m 634s ***** demo 634s ## Plot various CDFs from the noncentral F distribution 634s x = 0:0.01:5; 634s p1 = ncfcdf (x, 2, 5, 1); 634s p2 = ncfcdf (x, 2, 5, 2); 634s p3 = ncfcdf (x, 5, 10, 1); 634s p4 = ncfcdf (x, 10, 20, 10); 634s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 634s grid on 634s xlim ([0, 5]) 634s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 634s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 634s "location", "southeast") 634s title ("Noncentral F CDF") 634s xlabel ("values in x") 634s ylabel ("probability") 634s ***** demo 634s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 634s ## same number of numerator and denominator degrees of freedom (5, 20) 634s 634s x = 0.01:0.1:10.01; 634s p1 = ncfcdf (x, 5, 20, 10); 634s p2 = fcdf (x, 5, 20); 634s plot (x, p1, "-", x, p2, "-"); 634s grid on 634s xlim ([0, 10]) 634s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 634s title ("Noncentral F vs F CDFs") 634s xlabel ("values in x") 634s ylabel ("probability") 634s ***** test 634s x = -2:0.1:2; 634s p = ncfcdf (x, 10, 1, 3); 634s assert (p([1:21]), zeros (1, 21), 1e-76); 634s assert (p(22), 0.004530737275319753, 1e-14); 634s assert (p(30), 0.255842099135669, 1e-14); 634s assert (p(41), 0.4379890998457305, 1e-14); 634s ***** test 634s p = ncfcdf (12, 10, 3, 2); 634s assert (p, 0.9582287900447416, 1e-14); 634s ***** test 634s p = ncfcdf (2, 3, 2, 1); 634s assert (p, 0.5731985522994989, 1e-14); 634s ***** test 634s p = ncfcdf (2, 3, 2, 1, "upper"); 634s assert (p, 0.4268014477004823, 1e-14); 634s ***** test 634s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 634s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 634s ***** error ncfcdf () 634s ***** error ncfcdf (1) 634s ***** error ncfcdf (1, 2) 634s ***** error ncfcdf (1, 2, 3) 634s ***** error ncfcdf (1, 2, 3, 4, "tail") 634s ***** error ncfcdf (1, 2, 3, 4, 5) 634s ***** error ... 634s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 634s ***** error ... 634s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 634s ***** error ... 634s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 634s ***** error ... 634s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 634s ***** error ncfcdf (i, 2, 2, 2) 634s ***** error ncfcdf (2, i, 2, 2) 634s ***** error ncfcdf (2, 2, i, 2) 634s ***** error ncfcdf (2, 2, 2, i) 634s 19 tests, 19 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/gaminv.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gaminv.m 634s ***** demo 634s ## Plot various iCDFs from the Gamma distribution 634s p = 0.001:0.001:0.999; 634s x1 = gaminv (p, 1, 2); 634s x2 = gaminv (p, 2, 2); 634s x3 = gaminv (p, 3, 2); 634s x4 = gaminv (p, 5, 1); 634s x5 = gaminv (p, 9, 0.5); 634s x6 = gaminv (p, 7.5, 1); 634s x7 = gaminv (p, 0.5, 1); 634s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 634s p, x5, "-k", p, x6, "-b", p, x7, "-c") 634s ylim ([0, 20]) 634s grid on 634s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 634s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 634s "α = 0.5, β = 1"}, "location", "northwest") 634s title ("Gamma iCDF") 634s xlabel ("probability") 634s ylabel ("x") 634s ***** shared p 634s p = [-1 0 0.63212055882855778 1 2]; 634s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 634s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 634s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 634s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 634s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 634s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 634s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 634s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 634s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 634s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 634s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 634s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 634s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 634s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 634s eps ("single")) 634s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 634s eps ("single")) 634s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 634s eps ("single")) 634s ***** error gaminv () 634s ***** error gaminv (1) 634s ***** error gaminv (1,2) 634s ***** error ... 634s gaminv (ones (3), ones (2), ones (2)) 634s ***** error ... 634s gaminv (ones (2), ones (3), ones (2)) 634s ***** error ... 634s gaminv (ones (2), ones (2), ones (3)) 634s ***** error gaminv (i, 2, 2) 634s ***** error gaminv (2, i, 2) 634s ***** error gaminv (2, 2, i) 634s 25 tests, 25 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/burrcdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/burrcdf.m 634s ***** demo 634s ## Plot various CDFs from the Burr type XII distribution 634s x = 0.001:0.001:5; 634s p1 = burrcdf (x, 1, 1, 1); 634s p2 = burrcdf (x, 1, 1, 2); 634s p3 = burrcdf (x, 1, 1, 3); 634s p4 = burrcdf (x, 1, 2, 1); 634s p5 = burrcdf (x, 1, 3, 1); 634s p6 = burrcdf (x, 1, 0.5, 2); 634s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 634s x, p4, "-c", x, p5, "-m", x, p6, "-k") 634s grid on 634s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 634s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 634s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 634s "location", "southeast") 634s title ("Burr type XII CDF") 634s xlabel ("values in x") 634s ylabel ("probability") 634s ***** shared x, y 634s x = [-1, 0, 1, 2, Inf]; 634s y = [0, 0, 1/2, 2/3, 1]; 634s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 634s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 634s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 634s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 634s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 634s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 634s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 634s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 634s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 634s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 634s ***** error burrcdf () 634s ***** error burrcdf (1) 634s ***** error burrcdf (1, 2) 634s ***** error burrcdf (1, 2, 3) 634s ***** error ... 634s burrcdf (1, 2, 3, 4, 5, 6) 634s ***** error burrcdf (1, 2, 3, 4, "tail") 634s ***** error burrcdf (1, 2, 3, 4, 5) 634s ***** error ... 634s burrcdf (ones (3), ones (2), ones(2), ones(2)) 634s ***** error ... 634s burrcdf (ones (2), ones (3), ones(2), ones(2)) 634s ***** error ... 634s burrcdf (ones (2), ones (2), ones(3), ones(2)) 634s ***** error ... 634s burrcdf (ones (2), ones (2), ones(2), ones(3)) 634s ***** error burrcdf (i, 2, 3, 4) 634s ***** error burrcdf (1, i, 3, 4) 634s ***** error burrcdf (1, 2, i, 4) 634s ***** error burrcdf (1, 2, 3, i) 634s 25 tests, 25 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/cauchyrnd.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/cauchyrnd.m 634s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 634s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 634s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 634s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 634s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 634s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 634s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 634s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 634s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 634s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 634s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 634s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 634s ***** assert (class (cauchyrnd (1, 1)), "double") 634s ***** assert (class (cauchyrnd (1, single (1))), "single") 634s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 634s ***** assert (class (cauchyrnd (single (1), 1)), "single") 634s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 634s ***** error cauchyrnd () 634s ***** error cauchyrnd (1) 634s ***** error ... 634s cauchyrnd (ones (3), ones (2)) 634s ***** error ... 634s cauchyrnd (ones (2), ones (3)) 634s ***** error cauchyrnd (i, 2, 3) 634s ***** error cauchyrnd (1, i, 3) 634s ***** error ... 634s cauchyrnd (1, 2, -1) 634s ***** error ... 634s cauchyrnd (1, 2, 1.2) 634s ***** error ... 634s cauchyrnd (1, 2, ones (2)) 634s ***** error ... 634s cauchyrnd (1, 2, [2 -1 2]) 634s ***** error ... 634s cauchyrnd (1, 2, [2 0 2.5]) 634s ***** error ... 634s cauchyrnd (1, 2, 2, -1, 5) 634s ***** error ... 634s cauchyrnd (1, 2, 2, 1.5, 5) 634s ***** error ... 634s cauchyrnd (2, ones (2), 3) 634s ***** error ... 634s cauchyrnd (2, ones (2), [3, 2]) 634s ***** error ... 634s cauchyrnd (2, ones (2), 3, 2) 634s 33 tests, 33 passed, 0 known failure, 0 skipped 634s [inst/dist_fun/wblpdf.m] 634s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wblpdf.m 634s ***** demo 634s ## Plot various PDFs from the Weibul distribution 634s x = 0:0.001:2.5; 634s y1 = wblpdf (x, 1, 0.5); 634s y2 = wblpdf (x, 1, 1); 634s y3 = wblpdf (x, 1, 1.5); 634s y4 = wblpdf (x, 1, 5); 634s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 634s grid on 634s ylim ([0, 2.5]) 634s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 634s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 634s title ("Weibul PDF") 634s xlabel ("values in x") 634s ylabel ("density") 634s ***** shared x,y 634s x = [-1 0 0.5 1 Inf]; 634s y = [0, exp(-x(2:4)), NaN]; 634s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 634s ***** assert (wblpdf (x, 1, ones (1,5)), y) 634s ***** assert (wblpdf (x, ones (1,5), 1), y) 634s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 634s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 634s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 634s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 634s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 635s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 635s ***** error wblpdf () 635s ***** error wblpdf (1,2,3,4) 635s ***** error wblpdf (ones (3), ones (2), ones (2)) 635s ***** error wblpdf (ones (2), ones (3), ones (2)) 635s ***** error wblpdf (ones (2), ones (2), ones (3)) 635s ***** error wblpdf (i, 2, 2) 635s ***** error wblpdf (2, i, 2) 635s ***** error wblpdf (2, 2, i) 635s 17 tests, 17 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/wishpdf.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wishpdf.m 635s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 635s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 635s ***** 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); 635s ***** error wishpdf () 635s ***** error wishpdf (1, 2) 635s ***** error wishpdf (1, 2, 0) 635s ***** error wishpdf (1, 2) 635s 7 tests, 7 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/evinv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/evinv.m 635s ***** demo 635s ## Plot various iCDFs from the extreme value distribution 635s p = 0.001:0.001:0.999; 635s x1 = evinv (p, 0.5, 2); 635s x2 = evinv (p, 1.0, 2); 635s x3 = evinv (p, 1.5, 3); 635s x4 = evinv (p, 3.0, 4); 635s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 635s grid on 635s ylim ([-10, 10]) 635s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 635s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 635s title ("Extreme value iCDF") 635s xlabel ("probability") 635s ylabel ("values in x") 635s ***** shared p, x 635s p = [0, 0.05, 0.5 0.95]; 635s x = [-Inf, -2.9702, -0.3665, 1.0972]; 635s ***** assert (evinv (p), x, 1e-4) 635s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 635s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 635s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 635s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 635s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 635s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 635s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 635s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 635s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 635s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 635s ***** error evinv () 635s ***** error evinv (1,2,3,4,5,6) 635s ***** error ... 635s evinv (ones (3), ones (2), ones (2)) 635s ***** error ... 635s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 635s ***** error ... 635s [p, plo, pup] = evinv (1, 2, 3) 635s ***** error [p, plo, pup] = ... 635s evinv (1, 2, 3, [1, 0; 0, 1], 0) 635s ***** error [p, plo, pup] = ... 635s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 635s ***** error evinv (i, 2, 2) 635s ***** error evinv (2, i, 2) 635s ***** error evinv (2, 2, i) 635s ***** error ... 635s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 635s 22 tests, 22 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/tinv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tinv.m 635s ***** demo 635s ## Plot various iCDFs from the Student's T distribution 635s p = 0.001:0.001:0.999; 635s x1 = tinv (p, 1); 635s x2 = tinv (p, 2); 635s x3 = tinv (p, 5); 635s x4 = tinv (p, Inf); 635s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 635s grid on 635s xlim ([0, 1]) 635s ylim ([-5, 5]) 635s legend ({"df = 1", "df = 2", ... 635s "df = 5", 'df = \infty'}, "location", "northwest") 635s title ("Student's T iCDF") 635s xlabel ("probability") 635s ylabel ("values in x") 635s ***** shared p 635s p = [-1 0 0.5 1 2]; 635s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 635s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 635s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 635s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 635s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 635s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 635s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 635s ***** error tinv () 635s ***** error tinv (1) 635s ***** error ... 635s tinv (ones (3), ones (2)) 635s ***** error ... 635s tinv (ones (2), ones (3)) 635s ***** error tinv (i, 2) 635s ***** error tinv (2, i) 635s 13 tests, 13 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/logirnd.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logirnd.m 635s ***** assert (size (logirnd (1, 1)), [1 1]) 635s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 635s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 635s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 635s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 635s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 635s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 635s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 635s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 635s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 635s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 635s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 635s ***** assert (class (logirnd (1, 1)), "double") 635s ***** assert (class (logirnd (1, single (1))), "single") 635s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 635s ***** assert (class (logirnd (single (1), 1)), "single") 635s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 635s ***** error logirnd () 635s ***** error logirnd (1) 635s ***** error ... 635s logirnd (ones (3), ones (2)) 635s ***** error ... 635s logirnd (ones (2), ones (3)) 635s ***** error logirnd (i, 2, 3) 635s ***** error logirnd (1, i, 3) 635s ***** error ... 635s logirnd (1, 2, -1) 635s ***** error ... 635s logirnd (1, 2, 1.2) 635s ***** error ... 635s logirnd (1, 2, ones (2)) 635s ***** error ... 635s logirnd (1, 2, [2 -1 2]) 635s ***** error ... 635s logirnd (1, 2, [2 0 2.5]) 635s ***** error ... 635s logirnd (1, 2, 2, -1, 5) 635s ***** error ... 635s logirnd (1, 2, 2, 1.5, 5) 635s ***** error ... 635s logirnd (2, ones (2), 3) 635s ***** error ... 635s logirnd (2, ones (2), [3, 2]) 635s ***** error ... 635s logirnd (2, ones (2), 3, 2) 635s 33 tests, 33 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/cauchycdf.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/cauchycdf.m 635s ***** demo 635s ## Plot various CDFs from the Cauchy distribution 635s x = -5:0.01:5; 635s p1 = cauchycdf (x, 0, 0.5); 635s p2 = cauchycdf (x, 0, 1); 635s p3 = cauchycdf (x, 0, 2); 635s p4 = cauchycdf (x, -2, 1); 635s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 635s grid on 635s xlim ([-5, 5]) 635s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 635s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 635s title ("Cauchy CDF") 635s xlabel ("values in x") 635s ylabel ("probability") 635s ***** shared x, y 635s x = [-1 0 0.5 1 2]; 635s y = 1/pi * atan ((x-1) / 2) + 1/2; 635s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 635s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 635s ***** assert (cauchycdf (x, ones (1,5), 2), y) 635s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 635s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 635s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 635s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 635s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 635s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 635s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 635s ***** error cauchycdf () 635s ***** error cauchycdf (1) 635s ***** error ... 635s cauchycdf (1, 2) 635s ***** error ... 635s cauchycdf (1, 2, 3, 4, 5) 635s ***** error cauchycdf (1, 2, 3, "tail") 635s ***** error cauchycdf (1, 2, 3, 4) 635s ***** error ... 635s cauchycdf (ones (3), ones (2), ones (2)) 635s ***** error ... 635s cauchycdf (ones (2), ones (3), ones (2)) 635s ***** error ... 635s cauchycdf (ones (2), ones (2), ones (3)) 635s ***** error cauchycdf (i, 2, 2) 635s ***** error cauchycdf (2, i, 2) 635s ***** error cauchycdf (2, 2, i) 635s 22 tests, 22 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/chi2inv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/chi2inv.m 635s ***** demo 635s ## Plot various iCDFs from the chi-squared distribution 635s p = 0.001:0.001:0.999; 635s x1 = chi2inv (p, 1); 635s x2 = chi2inv (p, 2); 635s x3 = chi2inv (p, 3); 635s x4 = chi2inv (p, 4); 635s x5 = chi2inv (p, 6); 635s x6 = chi2inv (p, 9); 635s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 635s p, x4, "-c", p, x5, "-m", p, x6, "-y") 635s grid on 635s ylim ([0, 8]) 635s legend ({"df = 1", "df = 2", "df = 3", ... 635s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 635s title ("Chi-squared iCDF") 635s xlabel ("probability") 635s ylabel ("values in x") 635s ***** shared p 635s p = [-1 0 0.3934693402873666 1 2]; 635s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 635s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 635s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 635s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 635s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 635s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 635s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 635s ***** error chi2inv () 635s ***** error chi2inv (1) 635s ***** error chi2inv (1,2,3) 635s ***** error ... 635s chi2inv (ones (3), ones (2)) 635s ***** error ... 635s chi2inv (ones (2), ones (3)) 635s ***** error chi2inv (i, 2) 635s ***** error chi2inv (2, i) 635s 14 tests, 14 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/evpdf.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/evpdf.m 635s ***** demo 635s ## Plot various PDFs from the Extreme value distribution 635s x = -10:0.001:10; 635s y1 = evpdf (x, 0.5, 2); 635s y2 = evpdf (x, 1.0, 2); 635s y3 = evpdf (x, 1.5, 3); 635s y4 = evpdf (x, 3.0, 4); 635s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 635s grid on 635s ylim ([0, 0.2]) 635s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 635s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 635s title ("Extreme value PDF") 635s xlabel ("values in x") 635s ylabel ("density") 635s ***** shared x, y0, y1 635s x = [-5, 0, 1, 2, 3]; 635s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 635s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 635s ***** assert (evpdf (x), y0, 1e-4) 635s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 635s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 635s ***** error evpdf () 635s ***** error ... 635s evpdf (ones (3), ones (2), ones (2)) 635s ***** error evpdf (i, 2, 2) 635s ***** error evpdf (2, i, 2) 635s ***** error evpdf (2, 2, i) 635s 8 tests, 8 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/geoinv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/geoinv.m 635s ***** demo 635s ## Plot various iCDFs from the geometric distribution 635s p = 0.001:0.001:0.999; 635s x1 = geoinv (p, 0.2); 635s x2 = geoinv (p, 0.5); 635s x3 = geoinv (p, 0.7); 635s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 635s grid on 635s ylim ([0, 10]) 635s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 635s title ("Geometric iCDF") 635s xlabel ("probability") 635s ylabel ("values in x (number of failures)") 635s ***** shared p 635s p = [-1 0 0.75 1 2]; 635s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 635s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 635s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 635s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 635s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 635s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 635s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 635s ***** error geoinv () 635s ***** error geoinv (1) 635s ***** error ... 635s geoinv (ones (3), ones (2)) 635s ***** error ... 635s geoinv (ones (2), ones (3)) 635s ***** error ... 635s geoinv (i, 2) 635s ***** error ... 635s geoinv (2, i) 635s 13 tests, 13 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/vmpdf.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/vmpdf.m 635s ***** demo 635s ## Plot various PDFs from the von Mises distribution 635s x1 = [-pi:0.1:pi]; 635s y1 = vmpdf (x1, 0, 0.5); 635s y2 = vmpdf (x1, 0, 1); 635s y3 = vmpdf (x1, 0, 2); 635s y4 = vmpdf (x1, 0, 4); 635s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 635s grid on 635s xlim ([-pi, pi]) 635s ylim ([0, 0.8]) 635s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 635s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 635s title ("Von Mises PDF") 635s xlabel ("values in x") 635s ylabel ("density") 635s ***** shared x, y0, y1 635s x = [-pi:pi/2:pi]; 635s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 635s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 635s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 635s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 635s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 635s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 635s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 635s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 635s ***** error vmpdf () 635s ***** error vmpdf (1) 635s ***** error vmpdf (1, 2) 635s ***** error ... 635s vmpdf (ones (3), ones (2), ones (2)) 635s ***** error ... 635s vmpdf (ones (2), ones (3), ones (2)) 635s ***** error ... 635s vmpdf (ones (2), ones (2), ones (3)) 635s ***** error vmpdf (i, 2, 2) 635s ***** error vmpdf (2, i, 2) 635s ***** error vmpdf (2, 2, i) 635s 15 tests, 15 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/wblinv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wblinv.m 635s ***** demo 635s ## Plot various iCDFs from the Weibull distribution 635s p = 0.001:0.001:0.999; 635s x1 = wblinv (p, 1, 0.5); 635s x2 = wblinv (p, 1, 1); 635s x3 = wblinv (p, 1, 1.5); 635s x4 = wblinv (p, 1, 5); 635s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 635s ylim ([0, 2.5]) 635s grid on 635s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 635s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 635s title ("Weibull iCDF") 635s xlabel ("probability") 635s ylabel ("x") 635s ***** shared p 635s p = [-1 0 0.63212055882855778 1 2]; 635s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 635s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 635s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 635s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 635s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 635s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 635s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 635s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 635s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 635s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 635s ***** error wblinv () 635s ***** error wblinv (1,2,3,4) 635s ***** error ... 635s wblinv (ones (3), ones (2), ones (2)) 635s ***** error ... 635s wblinv (ones (2), ones (3), ones (2)) 635s ***** error ... 635s wblinv (ones (2), ones (2), ones (3)) 635s ***** error wblinv (i, 2, 2) 635s ***** error wblinv (2, i, 2) 635s ***** error wblinv (2, 2, i) 635s 18 tests, 18 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/tlsinv.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tlsinv.m 635s ***** demo 635s ## Plot various iCDFs from the location-scale Student's T distribution 635s p = 0.001:0.001:0.999; 635s x1 = tlsinv (p, 0, 1, 1); 635s x2 = tlsinv (p, 0, 2, 2); 635s x3 = tlsinv (p, 3, 2, 5); 635s x4 = tlsinv (p, -1, 3, Inf); 635s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 635s grid on 635s xlim ([0, 1]) 635s ylim ([-8, 8]) 635s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 635s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 635s "location", "southeast") 635s title ("Location-scale Student's T iCDF") 635s xlabel ("probability") 635s ylabel ("values in x") 635s ***** shared p 635s p = [-1 0 0.5 1 2]; 635s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 635s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 635s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 635s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 635s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 635s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 635s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 635s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 635s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 635s ***** error tlsinv () 635s ***** error tlsinv (1) 635s ***** error tlsinv (1, 2) 635s ***** error tlsinv (1, 2, 3) 635s ***** error ... 635s tlsinv (ones (3), ones (2), 1, 1) 635s ***** error ... 635s tlsinv (ones (2), 1, ones (3), 1) 635s ***** error ... 635s tlsinv (ones (2), 1, 1, ones (3)) 635s ***** error tlsinv (i, 2, 3, 4) 635s ***** error tlsinv (2, i, 3, 4) 635s ***** error tlsinv (2, 2, i, 4) 635s ***** error tlsinv (2, 2, 3, i) 635s 20 tests, 20 passed, 0 known failure, 0 skipped 635s [inst/dist_fun/nctpdf.m] 635s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nctpdf.m 635s ***** demo 635s ## Plot various PDFs from the noncentral T distribution 635s x = -5:0.01:10; 635s y1 = nctpdf (x, 1, 0); 635s y2 = nctpdf (x, 4, 0); 635s y3 = nctpdf (x, 1, 2); 635s y4 = nctpdf (x, 4, 2); 635s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 635s grid on 635s xlim ([-5, 10]) 635s ylim ([0, 0.4]) 635s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 635s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 635s title ("Noncentral T PDF") 635s xlabel ("values in x") 635s ylabel ("density") 635s ***** demo 635s ## Compare the noncentral T PDF with MU = 1 to the T PDF 635s ## with the same number of degrees of freedom (10). 635s 635s x = -5:0.1:5; 635s y1 = nctpdf (x, 10, 1); 635s y2 = tpdf (x, 10); 635s plot (x, y1, "-", x, y2, "-"); 635s grid on 635s xlim ([-5, 5]) 635s ylim ([0, 0.4]) 635s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 635s title ("Noncentral T vs T PDFs") 635s xlabel ("values in x") 635s ylabel ("density") 635s ***** shared x1, df, mu 635s x1 = [-Inf, 2, NaN, 4, Inf]; 635s df = [2, 0, -1, 1, 4]; 635s mu = [1, NaN, 3, -1, 2]; 635s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 635s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 635s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 635s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 635s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 636s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 636s 0.0146500727180389, 0.3082302682110299], 1e-14); 636s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 636s 0.00401787561306999, 0.0972086534042828], 1e-14); 636s ***** error nctpdf () 636s ***** error nctpdf (1) 636s ***** error nctpdf (1, 2) 636s ***** error ... 636s nctpdf (ones (3), ones (2), ones (2)) 636s ***** error ... 636s nctpdf (ones (2), ones (3), ones (2)) 636s ***** error ... 636s nctpdf (ones (2), ones (2), ones (3)) 636s ***** error nctpdf (i, 2, 2) 636s ***** error nctpdf (2, i, 2) 636s ***** error nctpdf (2, 2, i) 636s 16 tests, 16 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/raylrnd.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/raylrnd.m 636s ***** assert (size (raylrnd (2)), [1, 1]) 636s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 636s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 636s ***** assert (size (raylrnd (1, 3)), [3, 3]) 636s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 636s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 636s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 636s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 636s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 636s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 636s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 636s ***** assert (raylrnd (0, 1, 1), NaN) 636s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 636s ***** assert (class (raylrnd (2)), "double") 636s ***** assert (class (raylrnd (single (2))), "single") 636s ***** assert (class (raylrnd (single ([2 2]))), "single") 636s ***** error raylrnd () 636s ***** error raylrnd (i) 636s ***** error ... 636s raylrnd (1, -1) 636s ***** error ... 636s raylrnd (1, 1.2) 636s ***** error ... 636s raylrnd (1, ones (2)) 636s ***** error ... 636s raylrnd (1, [2 -1 2]) 636s ***** error ... 636s raylrnd (1, [2 0 2.5]) 636s ***** error ... 636s raylrnd (ones (2), ones (2)) 636s ***** error ... 636s raylrnd (1, 2, -1, 5) 636s ***** error ... 636s raylrnd (1, 2, 1.5, 5) 636s ***** error raylrnd (ones (2,2), 3) 636s ***** error raylrnd (ones (2,2), [3, 2]) 636s ***** error raylrnd (ones (2,2), 2, 3) 636s 29 tests, 29 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/trnd.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/trnd.m 636s ***** assert (size (trnd (2)), [1, 1]) 636s ***** assert (size (trnd (ones (2,1))), [2, 1]) 636s ***** assert (size (trnd (ones (2,2))), [2, 2]) 636s ***** assert (size (trnd (1, 3)), [3, 3]) 636s ***** assert (size (trnd (1, [4 1])), [4, 1]) 636s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 636s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 636s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 636s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 636s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 636s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 636s ***** assert (trnd (0, 1, 1), NaN) 636s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 636s ***** assert (class (trnd (2)), "double") 636s ***** assert (class (trnd (single (2))), "single") 636s ***** assert (class (trnd (single ([2 2]))), "single") 636s ***** error trnd () 636s ***** error trnd (i) 636s ***** error ... 636s trnd (1, -1) 636s ***** error ... 636s trnd (1, 1.2) 636s ***** error ... 636s trnd (1, ones (2)) 636s ***** error ... 636s trnd (1, [2 -1 2]) 636s ***** error ... 636s trnd (1, [2 0 2.5]) 636s ***** error ... 636s trnd (ones (2), ones (2)) 636s ***** error ... 636s trnd (1, 2, -1, 5) 636s ***** error ... 636s trnd (1, 2, 1.5, 5) 636s ***** error trnd (ones (2,2), 3) 636s ***** error trnd (ones (2,2), [3, 2]) 636s ***** error trnd (ones (2,2), 2, 3) 636s 29 tests, 29 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/burrinv.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/burrinv.m 636s ***** demo 636s ## Plot various iCDFs from the Burr type XII distribution 636s p = 0.001:0.001:0.999; 636s x1 = burrinv (p, 1, 1, 1); 636s x2 = burrinv (p, 1, 1, 2); 636s x3 = burrinv (p, 1, 1, 3); 636s x4 = burrinv (p, 1, 2, 1); 636s x5 = burrinv (p, 1, 3, 1); 636s x6 = burrinv (p, 1, 0.5, 2); 636s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 636s p, x4, "-c", p, x5, "-m", p, x6, "-k") 636s grid on 636s ylim ([0, 5]) 636s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 636s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 636s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 636s "location", "northwest") 636s title ("Burr type XII iCDF") 636s xlabel ("probability") 636s ylabel ("values in x") 636s ***** shared p, y 636s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 636s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 636s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 636s ***** assert (burrinv (p, 1, 1, 1), y, eps) 636s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 636s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 636s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 636s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 636s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 636s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 636s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 636s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 636s ***** error burrinv () 636s ***** error burrinv (1) 636s ***** error burrinv (1, 2) 636s ***** error burrinv (1, 2, 3) 636s ***** error ... 636s burrinv (1, 2, 3, 4, 5) 636s ***** error ... 636s burrinv (ones (3), ones (2), ones(2), ones(2)) 636s ***** error ... 636s burrinv (ones (2), ones (3), ones(2), ones(2)) 636s ***** error ... 636s burrinv (ones (2), ones (2), ones(3), ones(2)) 636s ***** error ... 636s burrinv (ones (2), ones (2), ones(2), ones(3)) 636s ***** error burrinv (i, 2, 3, 4) 636s ***** error burrinv (1, i, 3, 4) 636s ***** error burrinv (1, 2, i, 4) 636s ***** error burrinv (1, 2, 3, i) 636s 23 tests, 23 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/hygeinv.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hygeinv.m 636s ***** demo 636s ## Plot various iCDFs from the hypergeometric distribution 636s p = 0.001:0.001:0.999; 636s x1 = hygeinv (p, 500, 50, 100); 636s x2 = hygeinv (p, 500, 60, 200); 636s x3 = hygeinv (p, 500, 70, 300); 636s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 636s grid on 636s ylim ([0, 60]) 636s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 636s "m = 500, k = 70, n = 300"}, "location", "northwest") 636s title ("Hypergeometric iCDF") 636s xlabel ("probability") 636s ylabel ("values in p (number of successes)") 636s ***** shared p 636s p = [-1 0 0.5 1 2]; 636s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 636s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 636s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 636s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 636s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 636s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 636s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 636s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 636s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 636s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 636s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 636s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 636s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 636s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 636s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 636s ***** error hygeinv () 636s ***** error hygeinv (1) 636s ***** error hygeinv (1,2) 636s ***** error hygeinv (1,2,3) 636s ***** error ... 636s hygeinv (ones (2), ones (3), 1, 1) 636s ***** error ... 636s hygeinv (1, ones (2), ones (3), 1) 636s ***** error ... 636s hygeinv (1, 1, ones (2), ones (3)) 636s ***** error hygeinv (i, 2, 2, 2) 636s ***** error hygeinv (2, i, 2, 2) 636s ***** error hygeinv (2, 2, i, 2) 636s ***** error hygeinv (2, 2, 2, i) 636s 26 tests, 26 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/hninv.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hninv.m 636s ***** demo 636s ## Plot various iCDFs from the half-normal distribution 636s p = 0.001:0.001:0.999; 636s x1 = hninv (p, 0, 1); 636s x2 = hninv (p, 0, 2); 636s x3 = hninv (p, 0, 3); 636s x4 = hninv (p, 0, 5); 636s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 636s grid on 636s ylim ([0, 10]) 636s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 636s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 636s title ("Half-normal iCDF") 636s xlabel ("probability") 636s ylabel ("x") 636s ***** shared p, x 636s p = [0, 0.3829, 0.6827, 1]; 636s x = [0, 1/2, 1, Inf]; 636s ***** assert (hninv (p, 0, 1), x, 1e-4); 636s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 636s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 636s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 636s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 636s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 636s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 636s ***** error hninv (1) 636s ***** error hninv (1, 2) 636s ***** error ... 636s hninv (1, ones (2), ones (3)) 636s ***** error ... 636s hninv (ones (2), 1, ones (3)) 636s ***** error ... 636s hninv (ones (2), ones (3), 1) 636s ***** error hninv (i, 2, 3) 636s ***** error hninv (1, i, 3) 636s ***** error hninv (1, 2, i) 636s 15 tests, 15 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/normcdf.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/normcdf.m 636s ***** demo 636s ## Plot various CDFs from the normal distribution 636s x = -5:0.01:5; 636s p1 = normcdf (x, 0, 0.5); 636s p2 = normcdf (x, 0, 1); 636s p3 = normcdf (x, 0, 2); 636s p4 = normcdf (x, -2, 0.8); 636s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 636s grid on 636s xlim ([-5, 5]) 636s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 636s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 636s title ("Normal CDF") 636s xlabel ("values in x") 636s ylabel ("probability") 636s ***** shared x, y 636s x = [-Inf 1 2 Inf]; 636s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 636s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 636s ***** assert (normcdf (x, 1, ones (1,4)), y) 636s ***** assert (normcdf (x, ones (1,4), 1), y) 636s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 636s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 636s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 636s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 636s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 636s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 636s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 636s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 636s ***** error normcdf () 636s ***** error normcdf (1,2,3,4,5,6,7) 636s ***** error normcdf (1, 2, 3, 4, "uper") 636s ***** error ... 636s normcdf (ones (3), ones (2), ones (2)) 636s ***** error normcdf (2, 3, 4, [1, 2]) 636s ***** error ... 636s [p, plo, pup] = normcdf (1, 2, 3) 636s ***** error [p, plo, pup] = ... 636s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 636s ***** error [p, plo, pup] = ... 636s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 636s ***** error [p, plo, pup] = ... 636s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 636s ***** error normcdf (i, 2, 2) 636s ***** error normcdf (2, i, 2) 636s ***** error normcdf (2, 2, i) 636s ***** error ... 636s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 636s 24 tests, 24 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/vmrnd.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/vmrnd.m 636s ***** assert (size (vmrnd (1, 1)), [1 1]) 636s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 636s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 636s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 636s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 636s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 636s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 636s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 636s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 636s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 636s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 636s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 636s ***** assert (class (vmrnd (1, 1)), "double") 636s ***** assert (class (vmrnd (1, single (1))), "single") 636s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 636s ***** assert (class (vmrnd (single (1), 1)), "single") 636s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 636s ***** error vmrnd () 636s ***** error vmrnd (1) 636s ***** error ... 636s vmrnd (ones (3), ones (2)) 636s ***** error ... 636s vmrnd (ones (2), ones (3)) 636s ***** error vmrnd (i, 2, 3) 636s ***** error vmrnd (1, i, 3) 636s ***** error ... 636s vmrnd (1, 2, -1) 636s ***** error ... 636s vmrnd (1, 2, 1.2) 636s ***** error ... 636s vmrnd (1, 2, ones (2)) 636s ***** error ... 636s vmrnd (1, 2, [2 -1 2]) 636s ***** error ... 636s vmrnd (1, 2, [2 0 2.5]) 636s ***** error ... 636s vmrnd (1, 2, 2, -1, 5) 636s ***** error ... 636s vmrnd (1, 2, 2, 1.5, 5) 636s ***** error ... 636s vmrnd (2, ones (2), 3) 636s ***** error ... 636s vmrnd (2, ones (2), [3, 2]) 636s ***** error ... 636s vmrnd (2, ones (2), 3, 2) 636s 33 tests, 33 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/gevinv.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gevinv.m 636s ***** demo 636s ## Plot various iCDFs from the generalized extreme value distribution 636s p = 0.001:0.001:0.999; 636s x1 = gevinv (p, 1, 1, 1); 636s x2 = gevinv (p, 0.5, 1, 1); 636s x3 = gevinv (p, 1, 1, 5); 636s x4 = gevinv (p, 1, 2, 5); 636s x5 = gevinv (p, 1, 5, 5); 636s x6 = gevinv (p, 1, 0.5, 5); 636s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 636s p, x4, "-c", p, x5, "-m", p, x6, "-k") 636s grid on 636s ylim ([-1, 10]) 636s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 636s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 636s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 636s "location", "northwest") 636s title ("Generalized extreme value iCDF") 636s xlabel ("probability") 636s ylabel ("values in x") 636s ***** test 636s p = 0.1:0.1:0.9; 636s k = 0; 636s sigma = 1; 636s mu = 0; 636s x = gevinv (p, k, sigma, mu); 636s c = gevcdf(x, k, sigma, mu); 636s assert (c, p, 0.001); 636s ***** test 636s p = 0.1:0.1:0.9; 636s k = 1; 636s sigma = 1; 636s mu = 0; 636s x = gevinv (p, k, sigma, mu); 636s c = gevcdf(x, k, sigma, mu); 636s assert (c, p, 0.001); 636s ***** test 636s p = 0.1:0.1:0.9; 636s k = 0.3; 636s sigma = 1; 636s mu = 0; 636s x = gevinv (p, k, sigma, mu); 636s c = gevcdf(x, k, sigma, mu); 636s assert (c, p, 0.001); 636s ***** error gevinv () 636s ***** error gevinv (1) 636s ***** error gevinv (1, 2) 636s ***** error gevinv (1, 2, 3) 636s ***** error ... 636s gevinv (ones (3), ones (2), ones(2), ones(2)) 636s ***** error ... 636s gevinv (ones (2), ones (3), ones(2), ones(2)) 636s ***** error ... 636s gevinv (ones (2), ones (2), ones(3), ones(2)) 636s ***** error ... 636s gevinv (ones (2), ones (2), ones(2), ones(3)) 636s ***** error gevinv (i, 2, 3, 4) 636s ***** error gevinv (1, i, 3, 4) 636s ***** error gevinv (1, 2, i, 4) 636s ***** error gevinv (1, 2, 3, i) 636s 15 tests, 15 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/expinv.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/expinv.m 636s ***** demo 636s ## Plot various iCDFs from the exponential distribution 636s p = 0.001:0.001:0.999; 636s x1 = expinv (p, 2/3); 636s x2 = expinv (p, 1.0); 636s x3 = expinv (p, 2.0); 636s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 636s grid on 636s ylim ([0, 5]) 636s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 636s title ("Exponential iCDF") 636s xlabel ("probability") 636s ylabel ("values in x") 636s ***** shared p 636s p = [-1 0 0.3934693402873666 1 2]; 636s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 636s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 636s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 636s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 636s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 636s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 636s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 636s ***** error expinv () 636s ***** error expinv (1, 2 ,3 ,4 ,5) 636s ***** error ... 636s expinv (ones (3), ones (2)) 636s ***** error ... 636s expinv (2, 3, [1, 2]) 636s ***** error ... 636s [x, xlo, xup] = expinv (1, 2) 636s ***** error [x, xlo, xup] = ... 636s expinv (1, 2, 3, 0) 636s ***** error [x, xlo, xup] = ... 636s expinv (1, 2, 3, 1.22) 636s ***** error [x, xlo, xup] = ... 636s expinv (1, 2, 3, [0.05, 0.1]) 636s ***** error expinv (i, 2) 636s ***** error expinv (2, i) 636s ***** error ... 636s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 636s 18 tests, 18 passed, 0 known failure, 0 skipped 636s [inst/dist_fun/invgcdf.m] 636s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/invgcdf.m 636s ***** demo 636s ## Plot various CDFs from the inverse Gaussian distribution 636s x = 0:0.001:3; 636s p1 = invgcdf (x, 1, 0.2); 636s p2 = invgcdf (x, 1, 1); 636s p3 = invgcdf (x, 1, 3); 636s p4 = invgcdf (x, 3, 0.2); 636s p5 = invgcdf (x, 3, 1); 636s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 636s grid on 636s xlim ([0, 3]) 636s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 636s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 636s title ("Inverse Gaussian CDF") 636s xlabel ("values in x") 636s ylabel ("probability") 636s ***** shared x, p1, p1u, y2, y2u, y3, y3u 636s x = [-Inf, -1, 0, 1/2, 1, Inf]; 636s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 636s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 636s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 637s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 637s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 637s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 637s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 637s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 637s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 637s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 637s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 637s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 637s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 637s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 637s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 637s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 637s ***** error invgcdf () 637s ***** error invgcdf (1) 637s ***** error invgcdf (1, 2) 637s ***** error invgcdf (1, 2, 3, "tail") 637s ***** error invgcdf (1, 2, 3, 5) 637s ***** error ... 637s invgcdf (ones (3), ones (2), ones(2)) 637s ***** error ... 637s invgcdf (ones (2), ones (3), ones(2)) 637s ***** error ... 637s invgcdf (ones (2), ones (2), ones(3)) 637s ***** error invgcdf (i, 2, 3) 637s ***** error invgcdf (1, i, 3) 637s ***** error invgcdf (1, 2, i) 637s 25 tests, 25 passed, 0 known failure, 0 skipped 637s [inst/dist_fun/plrnd.m] 637s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/plrnd.m 637s ***** shared x, Fx 637s x = [0, 1, 3, 4, 7, 10]; 637s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 637s ***** assert (size (plrnd (x, Fx)), [1, 1]) 637s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 637s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 637s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 637s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 637s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 637s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 637s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 637s ***** assert (class (plrnd (x, Fx)), "double") 637s ***** assert (class (plrnd (x, single (Fx))), "single") 637s ***** assert (class (plrnd (single (x), Fx)), "single") 637s ***** error plrnd () 637s ***** error plrnd (1) 637s ***** error ... 637s plrnd ([0, 1, 2], [0, 1]) 637s ***** error ... 637s plrnd ([0], [1]) 637s ***** error ... 637s plrnd ([0, 1, 2], [0, 1, 1.5]) 637s ***** error ... 637s plrnd ([0, 1, 2], [0, i, 1]) 637s ***** error ... 637s plrnd ([0, i, 2], [0, 0.5, 1]) 637s ***** error ... 637s plrnd ([0, i, 2], [0, 0.5i, 1]) 637s ***** error ... 637s plrnd (x, Fx, -1) 637s ***** error ... 637s plrnd (x, Fx, 1.2) 637s ***** error ... 637s plrnd (x, Fx, ones (2)) 637s ***** error ... 637s plrnd (x, Fx, [2 -1 2]) 637s ***** error ... 637s plrnd (x, Fx, [2 0 2.5]) 637s ***** error ... 637s plrnd (x, Fx, 2, -1, 5) 637s ***** error ... 637s plrnd (x, Fx, 2, 1.5, 5) 637s 26 tests, 26 passed, 0 known failure, 0 skipped 637s [inst/dist_fun/nakapdf.m] 637s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nakapdf.m 637s ***** demo 637s ## Plot various PDFs from the Nakagami distribution 637s x = 0:0.01:3; 637s y1 = nakapdf (x, 0.5, 1); 637s y2 = nakapdf (x, 1, 1); 637s y3 = nakapdf (x, 1, 2); 637s y4 = nakapdf (x, 1, 3); 637s y5 = nakapdf (x, 2, 1); 637s y6 = nakapdf (x, 2, 2); 637s y7 = nakapdf (x, 5, 1); 637s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 637s x, y5, "-k", x, y6, "-b", x, y7, "-c") 637s grid on 637s xlim ([0, 3]) 637s ylim ([0, 2]) 637s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 637s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 637s "μ = 5, ω = 1"}, "location", "northeast") 637s title ("Nakagami PDF") 637s xlabel ("values in x") 637s ylabel ("density") 637s ***** shared x, y 637s x = [-1, 0, 1, 2, Inf]; 637s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 637s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 637s ***** assert (nakapdf (x, 1, 1), y, eps) 637s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 637s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 637s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 637s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 637s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 637s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 637s ***** error nakapdf () 637s ***** error nakapdf (1) 637s ***** error nakapdf (1, 2) 637s ***** error ... 637s nakapdf (ones (3), ones (2), ones(2)) 637s ***** error ... 637s nakapdf (ones (2), ones (3), ones(2)) 637s ***** error ... 637s nakapdf (ones (2), ones (2), ones(3)) 637s ***** error nakapdf (i, 4, 3) 637s ***** error nakapdf (1, i, 3) 637s ***** error nakapdf (1, 4, i) 637s 17 tests, 17 passed, 0 known failure, 0 skipped 637s [inst/dist_fun/vmcdf.m] 637s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/vmcdf.m 637s ***** demo 637s ## Plot various CDFs from the von Mises distribution 637s x1 = [-pi:0.1:pi]; 637s p1 = vmcdf (x1, 0, 0.5); 637s p2 = vmcdf (x1, 0, 1); 637s p3 = vmcdf (x1, 0, 2); 637s p4 = vmcdf (x1, 0, 4); 637s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 637s grid on 637s xlim ([-pi, pi]) 637s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 637s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 637s title ("Von Mises CDF") 637s xlabel ("values in x") 637s ylabel ("probability") 637s ***** shared x, p0, p1 637s x = [-pi:pi/2:pi]; 637s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 637s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 637s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 637s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 637s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 637s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 637s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 637s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 637s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 637s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 637s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 637s ***** error vmcdf () 637s ***** error vmcdf (1) 637s ***** error vmcdf (1, 2) 637s ***** error vmcdf (1, 2, 3, "tail") 637s ***** error vmcdf (1, 2, 3, 4) 637s ***** error ... 637s vmcdf (ones (3), ones (2), ones (2)) 637s ***** error ... 637s vmcdf (ones (2), ones (3), ones (2)) 637s ***** error ... 637s vmcdf (ones (2), ones (2), ones (3)) 637s ***** error vmcdf (i, 2, 2) 637s ***** error vmcdf (2, i, 2) 637s ***** error vmcdf (2, 2, i) 637s 20 tests, 20 passed, 0 known failure, 0 skipped 637s [inst/dist_fun/unifpdf.m] 637s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unifpdf.m 637s ***** demo 637s ## Plot various PDFs from the continuous uniform distribution 637s x = 0:0.001:10; 637s y1 = unifpdf (x, 2, 5); 637s y2 = unifpdf (x, 3, 9); 637s plot (x, y1, "-b", x, y2, "-g") 637s grid on 637s xlim ([0, 10]) 637s ylim ([0, 0.4]) 637s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 637s title ("Continuous uniform PDF") 637s xlabel ("values in x") 637s ylabel ("density") 637s ***** shared x, y 637s x = [-1 0 0.5 1 2] + 1; 637s y = [0 1 1 1 0]; 637s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 637s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 637s ***** assert (unifpdf (x, ones (1,5), 2), y) 637s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 637s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 637s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 637s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 637s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 637s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 637s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 637s ***** error unifpdf () 637s ***** error unifpdf (1) 637s ***** error unifpdf (1, 2) 637s ***** error ... 637s unifpdf (ones (3), ones (2), ones (2)) 637s ***** error ... 637s unifpdf (ones (2), ones (3), ones (2)) 637s ***** error ... 637s unifpdf (ones (2), ones (2), ones (3)) 637s ***** error unifpdf (i, 2, 2) 637s ***** error unifpdf (2, i, 2) 637s ***** error unifpdf (2, 2, i) 637s 19 tests, 19 passed, 0 known failure, 0 skipped 637s [inst/dist_fun/gampdf.m] 637s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gampdf.m 637s ***** demo 637s ## Plot various PDFs from the Gamma distribution 637s x = 0:0.01:20; 637s y1 = gampdf (x, 1, 2); 637s y2 = gampdf (x, 2, 2); 637s y3 = gampdf (x, 3, 2); 637s y4 = gampdf (x, 5, 1); 637s y5 = gampdf (x, 9, 0.5); 637s y6 = gampdf (x, 7.5, 1); 637s y7 = gampdf (x, 0.5, 1); 637s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 637s x, y5, "-k", x, y6, "-b", x, y7, "-c") 637s grid on 637s ylim ([0,0.5]) 637s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 637s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 637s "α = 0.5, β = 1"}, "location", "northeast") 637s title ("Gamma PDF") 637s xlabel ("values in x") 637s ylabel ("density") 637s ***** shared x, y 637s x = [-1 0 0.5 1 Inf]; 637s y = [0 exp(-x(2:end))]; 637s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 637s ***** assert (gampdf (x, 1, ones (1,5)), y) 638s ***** assert (gampdf (x, ones (1,5), 1), y) 638s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN 0 y(5)]) 638s ***** assert (gampdf (x, [0 Inf NaN Inf 1], 1), [NaN 0 NaN 0 y(5)]) 638s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 638s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 638s ***** assert (gampdf (2, Inf, 4), 0) 638s ***** assert (gampdf (2, 4, Inf), 0) 638s ***** assert (gampdf (2, Inf, Inf), 0) 638s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 638s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 638s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 638s ***** error gampdf () 638s ***** error gampdf (1) 638s ***** error gampdf (1,2) 638s ***** error ... 638s gampdf (ones (3), ones (2), ones (2)) 638s ***** error ... 638s gampdf (ones (2), ones (3), ones (2)) 638s ***** error ... 638s gampdf (ones (2), ones (2), ones (3)) 638s ***** error gampdf (i, 2, 2) 638s ***** error gampdf (2, i, 2) 638s ***** error gampdf (2, 2, i) 638s 22 tests, 22 passed, 0 known failure, 0 skipped 638s [inst/dist_fun/gppdf.m] 638s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gppdf.m 638s ***** demo 638s ## Plot various PDFs from the generalized Pareto distribution 638s x = 0:0.001:5; 638s y1 = gppdf (x, 1, 1, 0); 638s y2 = gppdf (x, 5, 1, 0); 638s y3 = gppdf (x, 20, 1, 0); 638s y4 = gppdf (x, 1, 2, 0); 638s y5 = gppdf (x, 5, 2, 0); 638s y6 = gppdf (x, 20, 2, 0); 638s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 638s x, y4, "-c", x, y5, "-m", x, y6, "-k") 638s grid on 638s xlim ([0, 5]) 638s ylim ([0, 1]) 638s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 638s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 638s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 638s "location", "northeast") 638s title ("Generalized Pareto PDF") 638s xlabel ("values in x") 638s ylabel ("density") 638s ***** shared x, y1, y2, y3 638s x = [-Inf, -1, 0, 1/2, 1, Inf]; 638s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 638s y2 = [0, 0, 1, 4/9, 1/4, 0]; 638s y3 = [0, 0, 1, 1, 1, 0]; 638s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 638s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 638s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 638s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 638s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 638s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 638s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 638s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 638s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 638s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 638s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 638s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 638s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 638s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 638s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 638s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 638s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 638s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 638s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 638s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 638s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 638s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 638s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 638s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 638s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 638s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 638s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 638s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 638s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 638s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 638s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 638s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 638s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 638s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 638s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 638s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 638s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 638s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 638s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 638s ***** error gpcdf () 638s ***** error gpcdf (1) 638s ***** error gpcdf (1, 2) 638s ***** error gpcdf (1, 2, 3) 638s ***** error ... 638s gpcdf (ones (3), ones (2), ones(2), ones(2)) 638s ***** error ... 638s gpcdf (ones (2), ones (3), ones(2), ones(2)) 638s ***** error ... 638s gpcdf (ones (2), ones (2), ones(3), ones(2)) 638s ***** error ... 638s gpcdf (ones (2), ones (2), ones(2), ones(3)) 638s ***** error gpcdf (i, 2, 3, 4) 638s ***** error gpcdf (1, i, 3, 4) 638s ***** error gpcdf (1, 2, i, 4) 638s ***** error gpcdf (1, 2, 3, i) 638s 51 tests, 51 passed, 0 known failure, 0 skipped 638s [inst/dist_fun/loglpdf.m] 638s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/loglpdf.m 638s ***** demo 638s ## Plot various PDFs from the log-logistic distribution 638s x = 0.001:0.001:2; 638s y1 = loglpdf (x, log (1), 1/0.5); 638s y2 = loglpdf (x, log (1), 1); 638s y3 = loglpdf (x, log (1), 1/2); 638s y4 = loglpdf (x, log (1), 1/4); 638s y5 = loglpdf (x, log (1), 1/8); 638s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 638s grid on 638s ylim ([0,3]) 638s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 638s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 638s title ("Log-logistic PDF") 638s xlabel ("values in x") 638s ylabel ("density") 638s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 638s ***** shared out1, out2 638s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 638s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 638s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 638s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 638s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 638s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 638s ***** assert (class (loglpdf (1, single (2), 3)), "single") 638s ***** assert (class (loglpdf (1, 2, single (3))), "single") 638s ***** error loglpdf (1) 638s ***** error loglpdf (1, 2) 638s ***** error ... 638s loglpdf (1, ones (2), ones (3)) 638s ***** error ... 638s loglpdf (ones (2), 1, ones (3)) 638s ***** error ... 638s loglpdf (ones (2), ones (3), 1) 638s ***** error loglpdf (i, 2, 3) 638s ***** error loglpdf (1, i, 3) 638s ***** error loglpdf (1, 2, i) 638s 14 tests, 14 passed, 0 known failure, 0 skipped 638s [inst/dist_fun/vminv.m] 638s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/vminv.m 638s ***** demo 638s ## Plot various iCDFs from the von Mises distribution 638s 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]; 638s x1 = vminv (p1, 0, 0.5); 638s x2 = vminv (p1, 0, 1); 638s x3 = vminv (p1, 0, 2); 638s x4 = vminv (p1, 0, 4); 638s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 638s grid on 638s ylim ([-pi, pi]) 638s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 638s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 638s title ("Von Mises iCDF") 638s xlabel ("probability") 638s ylabel ("values in x") 638s ***** shared x, p0, p1 638s x = [-pi:pi/2:pi]; 638s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 638s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 638s ***** assert (vminv (p0, 0, 1), x, 5e-5) 638s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 639s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 639s ***** error vminv () 639s ***** error vminv (1) 639s ***** error vminv (1, 2) 639s ***** error ... 639s vminv (ones (3), ones (2), ones (2)) 639s ***** error ... 639s vminv (ones (2), ones (3), ones (2)) 639s ***** error ... 639s vminv (ones (2), ones (2), ones (3)) 639s ***** error vminv (i, 2, 2) 639s ***** error vminv (2, i, 2) 639s ***** error vminv (2, 2, i) 639s 12 tests, 12 passed, 0 known failure, 0 skipped 639s [inst/dist_fun/binoinv.m] 639s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/binoinv.m 639s ***** demo 639s ## Plot various iCDFs from the binomial distribution 639s p = 0.001:0.001:0.999; 639s x1 = binoinv (p, 20, 0.5); 639s x2 = binoinv (p, 20, 0.7); 639s x3 = binoinv (p, 40, 0.5); 639s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 639s grid on 639s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 639s "n = 40, ps = 0.5"}, "location", "southeast") 639s title ("Binomial iCDF") 639s xlabel ("probability") 639s ylabel ("values in x (number of successes)") 639s ***** shared p 639s p = [-1 0 0.5 1 2]; 639s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 639s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 639s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 639s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 639s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 639s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 639s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 639s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 639s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 639s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 639s ***** shared x, tol 639s x = magic (3) + 1; 639s tol = 1; 639s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 639s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 639s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 639s ***** error binoinv () 639s ***** error binoinv (1) 639s ***** error binoinv (1,2) 639s ***** error binoinv (1,2,3,4) 639s ***** error ... 639s binoinv (ones (3), ones (2), ones (2)) 639s ***** error ... 639s binoinv (ones (2), ones (3), ones (2)) 639s ***** error ... 639s binoinv (ones (2), ones (2), ones (3)) 639s ***** error binoinv (i, 2, 2) 639s ***** error binoinv (2, i, 2) 639s ***** error binoinv (2, 2, i) 639s 23 tests, 23 passed, 0 known failure, 0 skipped 639s [inst/dist_fun/binopdf.m] 639s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/binopdf.m 639s ***** demo 639s ## Plot various PDFs from the binomial distribution 639s x = 0:40; 639s y1 = binopdf (x, 20, 0.5); 639s y2 = binopdf (x, 20, 0.7); 639s y3 = binopdf (x, 40, 0.5); 639s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 639s grid on 639s ylim ([0, 0.25]) 639s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 639s "n = 40, ps = 0.5"}, "location", "northeast") 639s title ("Binomial PDF") 639s xlabel ("values in x (number of successes)") 639s ylabel ("density") 639s ***** shared x, y 639s x = [-1 0 1 2 3]; 639s y = [0 1/4 1/2 1/4 0]; 639s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 639s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 639s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 639s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 639s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 639s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 639s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 639s ***** assert (binopdf (1, 1, 1), 1) 639s ***** assert (binopdf (0, 3, 0), 1) 639s ***** assert (binopdf (2, 2, 1), 1) 640s ***** assert (binopdf (1, 2, 1), 0) 640s ***** assert (binopdf (0, 1.1, 0), NaN) 640s ***** assert (binopdf (1, 2, -1), NaN) 640s ***** assert (binopdf (1, 2, 1.5), NaN) 640s ***** assert (binopdf ([], 1, 1), []) 640s ***** assert (binopdf (1, [], 1), []) 640s ***** assert (binopdf (1, 1, []), []) 640s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 640s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 640s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 640s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 640s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 640s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 640s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 640s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 640s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 640s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 640s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 640s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 640s ***** error binopdf () 640s ***** error binopdf (1) 640s ***** error binopdf (1, 2) 640s ***** error binopdf (1, 2, 3, 4) 640s ***** error ... 640s binopdf (ones (3), ones (2), ones (2)) 640s ***** error ... 640s binopdf (ones (2), ones (3), ones (2)) 640s ***** error ... 640s binopdf (ones (2), ones (2), ones (3)) 640s ***** error binopdf (i, 2, 2) 640s ***** error binopdf (2, i, 2) 640s ***** error binopdf (2, 2, i) 640s 39 tests, 39 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/poissrnd.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/poissrnd.m 640s ***** assert (size (poissrnd (2)), [1, 1]) 640s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 640s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 640s ***** assert (size (poissrnd (1, 3)), [3, 3]) 640s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 640s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 640s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 640s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 640s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 640s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 640s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 640s ***** assert (poissrnd (0, 1, 1), 0) 640s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 640s ***** assert (class (poissrnd (2)), "double") 640s ***** assert (class (poissrnd (single (2))), "single") 640s ***** assert (class (poissrnd (single ([2 2]))), "single") 640s ***** error poissrnd () 640s ***** error poissrnd (i) 640s ***** error ... 640s poissrnd (1, -1) 640s ***** error ... 640s poissrnd (1, 1.2) 640s ***** error ... 640s poissrnd (1, ones (2)) 640s ***** error ... 640s poissrnd (1, [2 -1 2]) 640s ***** error ... 640s poissrnd (1, [2 0 2.5]) 640s ***** error ... 640s poissrnd (ones (2), ones (2)) 640s ***** error ... 640s poissrnd (1, 2, -1, 5) 640s ***** error ... 640s poissrnd (1, 2, 1.5, 5) 640s ***** error poissrnd (ones (2,2), 3) 640s ***** error poissrnd (ones (2,2), [3, 2]) 640s ***** error poissrnd (ones (2,2), 2, 3) 640s 29 tests, 29 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/binornd.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/binornd.m 640s ***** assert (size (binornd (2, 1/2)), [1 1]) 640s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 640s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 640s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 640s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 640s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 640s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 640s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 640s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 640s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 640s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 640s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 640s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 640s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 640s ***** assert (class (binornd (1, 1)), "double") 640s ***** assert (class (binornd (1, single (0))), "single") 640s ***** assert (class (binornd (1, single ([0, 0]))), "single") 640s ***** assert (class (binornd (1, single (1), 2)), "single") 640s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 640s ***** assert (class (binornd (single (1), 1, 2)), "single") 640s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 640s ***** error binornd () 640s ***** error binornd (1) 640s ***** error ... 640s binornd (ones (3), ones (2)) 640s ***** error ... 640s binornd (ones (2), ones (3)) 640s ***** error binornd (i, 2) 640s ***** error binornd (1, i) 640s ***** error ... 640s binornd (1, 1/2, -1) 640s ***** error ... 640s binornd (1, 1/2, 1.2) 640s ***** error ... 640s binornd (1, 1/2, ones (2)) 640s ***** error ... 640s binornd (1, 1/2, [2 -1 2]) 640s ***** error ... 640s binornd (1, 1/2, [2 0 2.5]) 640s ***** error ... 640s binornd (1, 1/2, 2, -1, 5) 640s ***** error ... 640s binornd (1, 1/2, 2, 1.5, 5) 640s ***** error ... 640s binornd (2, 1/2 * ones (2), 3) 640s ***** error ... 640s binornd (2, 1/2 * ones (2), [3, 2]) 640s ***** error ... 640s binornd (2, 1/2 * ones (2), 3, 2) 640s ***** error ... 640s binornd (2 * ones (2), 1/2, 3) 640s ***** error ... 640s binornd (2 * ones (2), 1/2, [3, 2]) 640s ***** error ... 640s binornd (2 * ones (2), 1/2, 3, 2) 640s 40 tests, 40 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/burrpdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/burrpdf.m 640s ***** demo 640s ## Plot various PDFs from the Burr type XII distribution 640s x = 0.001:0.001:3; 640s y1 = burrpdf (x, 1, 1, 1); 640s y2 = burrpdf (x, 1, 1, 2); 640s y3 = burrpdf (x, 1, 1, 3); 640s y4 = burrpdf (x, 1, 2, 1); 640s y5 = burrpdf (x, 1, 3, 1); 640s y6 = burrpdf (x, 1, 0.5, 2); 640s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 640s x, y4, "-c", x, y5, "-m", x, y6, "-k") 640s grid on 640s ylim ([0, 2]) 640s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 640s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 640s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 640s "location", "northeast") 640s title ("Burr type XII PDF") 640s xlabel ("values in x") 640s ylabel ("density") 640s ***** shared x, y 640s x = [-1, 0, 1, 2, Inf]; 640s y = [0, 1, 1/4, 1/9, 0]; 640s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 640s ***** assert (burrpdf (x, 1, 1, 1), y) 640s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 640s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 640s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 640s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 640s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 640s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 640s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 640s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 640s ***** error burrpdf () 640s ***** error burrpdf (1) 640s ***** error burrpdf (1, 2) 640s ***** error burrpdf (1, 2, 3) 640s ***** error ... 640s burrpdf (1, 2, 3, 4, 5) 640s ***** error ... 640s burrpdf (ones (3), ones (2), ones(2), ones(2)) 640s ***** error ... 640s burrpdf (ones (2), ones (3), ones(2), ones(2)) 640s ***** error ... 640s burrpdf (ones (2), ones (2), ones(3), ones(2)) 640s ***** error ... 640s burrpdf (ones (2), ones (2), ones(2), ones(3)) 640s ***** error burrpdf (i, 2, 3, 4) 640s ***** error burrpdf (1, i, 3, 4) 640s ***** error burrpdf (1, 2, i, 4) 640s ***** error burrpdf (1, 2, 3, i) 640s 23 tests, 23 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/gamcdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gamcdf.m 640s ***** demo 640s ## Plot various CDFs from the Gamma distribution 640s x = 0:0.01:20; 640s p1 = gamcdf (x, 1, 2); 640s p2 = gamcdf (x, 2, 2); 640s p3 = gamcdf (x, 3, 2); 640s p4 = gamcdf (x, 5, 1); 640s p5 = gamcdf (x, 9, 0.5); 640s p6 = gamcdf (x, 7.5, 1); 640s p7 = gamcdf (x, 0.5, 1); 640s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 640s x, p5, "-k", x, p6, "-b", x, p7, "-c") 640s grid on 640s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 640s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 640s "α = 0.5, β = 1"}, "location", "southeast") 640s title ("Gamma CDF") 640s xlabel ("values in x") 640s ylabel ("probability") 640s ***** shared x, y, u 640s x = [-1, 0, 0.5, 1, 2, Inf]; 640s y = [0, gammainc(x(2:end), 1)]; 640s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 640s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 640s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 640s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 640s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 640s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 640s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 640s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 640s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 640s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 640s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 640s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 640s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 640s ***** error gamcdf () 640s ***** error gamcdf (1) 640s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 640s ***** error gamcdf (1, 2, 3, "uper") 640s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 640s ***** error gamcdf (2, 3, 4, [1, 2]) 640s ***** error ... 640s [p, plo, pup] = gamcdf (1, 2, 3) 640s ***** error ... 640s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 640s ***** error [p, plo, pup] = ... 640s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 640s ***** error [p, plo, pup] = ... 640s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 640s ***** error [p, plo, pup] = ... 640s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 640s ***** error ... 640s gamcdf (ones (3), ones (2), ones (2)) 640s ***** error ... 640s gamcdf (ones (2), ones (3), ones (2)) 640s ***** error ... 640s gamcdf (ones (2), ones (2), ones (3)) 640s ***** error gamcdf (i, 2, 2) 640s ***** error gamcdf (2, i, 2) 640s ***** error gamcdf (2, 2, i) 640s ***** error ... 640s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 640s 30 tests, 30 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/copulapdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/copulapdf.m 640s ***** test 640s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 640s theta = [1; 2]; 640s y = copulapdf ("Clayton", x, theta); 640s expected_p = [0.9872; 0.7295]; 640s assert (y, expected_p, 0.001); 640s ***** test 640s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 640s y = copulapdf ("Gumbel", x, 2); 640s expected_p = [0.9468; 0.9468]; 640s assert (y, expected_p, 0.001); 640s ***** test 640s x = [0.2, 0.6; 0.2, 0.6]; 640s theta = [1; 2]; 640s y = copulapdf ("Frank", x, theta); 640s expected_p = [0.9378; 0.8678]; 640s assert (y, expected_p, 0.001); 640s ***** test 640s x = [0.2, 0.6; 0.2, 0.6]; 640s theta = [0.3; 0.7]; 640s y = copulapdf ("AMH", x, theta); 640s expected_p = [0.9540; 0.8577]; 640s assert (y, expected_p, 0.001); 640s 4 tests, 4 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/nakacdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nakacdf.m 640s ***** demo 640s ## Plot various CDFs from the Nakagami distribution 640s x = 0:0.01:3; 640s p1 = nakacdf (x, 0.5, 1); 640s p2 = nakacdf (x, 1, 1); 640s p3 = nakacdf (x, 1, 2); 640s p4 = nakacdf (x, 1, 3); 640s p5 = nakacdf (x, 2, 1); 640s p6 = nakacdf (x, 2, 2); 640s p7 = nakacdf (x, 5, 1); 640s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 640s x, p5, "-k", x, p6, "-b", x, p7, "-c") 640s grid on 640s xlim ([0, 3]) 640s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 640s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 640s "μ = 5, ω = 1"}, "location", "southeast") 640s title ("Nakagami CDF") 640s xlabel ("values in x") 640s ylabel ("probability") 640s ***** shared x, y 640s x = [-1, 0, 1, 2, Inf]; 640s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 640s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 640s ***** assert (nakacdf (x, 1, 1), y, eps) 640s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 640s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 640s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 640s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 640s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 640s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 640s ***** error nakacdf () 640s ***** error nakacdf (1) 640s ***** error nakacdf (1, 2) 640s ***** error nakacdf (1, 2, 3, "tail") 640s ***** error nakacdf (1, 2, 3, 4) 640s ***** error ... 640s nakacdf (ones (3), ones (2), ones (2)) 640s ***** error ... 640s nakacdf (ones (2), ones (3), ones (2)) 640s ***** error ... 640s nakacdf (ones (2), ones (2), ones (3)) 640s ***** error nakacdf (i, 2, 2) 640s ***** error nakacdf (2, i, 2) 640s ***** error nakacdf (2, 2, i) 640s 19 tests, 19 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/gamrnd.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gamrnd.m 640s ***** assert (size (gamrnd (1, 1)), [1 1]) 640s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 640s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 640s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 640s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 640s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 640s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 640s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 640s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 640s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 640s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 640s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 640s ***** assert (class (gamrnd (1, 1)), "double") 640s ***** assert (class (gamrnd (1, single (1))), "single") 640s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 640s ***** assert (class (gamrnd (single (1), 1)), "single") 640s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 640s ***** error gamrnd () 640s ***** error gamrnd (1) 640s ***** error ... 640s gamrnd (ones (3), ones (2)) 640s ***** error ... 640s gamrnd (ones (2), ones (3)) 640s ***** error gamrnd (i, 2, 3) 640s ***** error gamrnd (1, i, 3) 640s ***** error ... 640s gamrnd (1, 2, -1) 640s ***** error ... 640s gamrnd (1, 2, 1.2) 640s ***** error ... 640s gamrnd (1, 2, ones (2)) 640s ***** error ... 640s gamrnd (1, 2, [2 -1 2]) 640s ***** error ... 640s gamrnd (1, 2, [2 0 2.5]) 640s ***** error ... 640s gamrnd (1, 2, 2, -1, 5) 640s ***** error ... 640s gamrnd (1, 2, 2, 1.5, 5) 640s ***** error ... 640s gamrnd (2, ones (2), 3) 640s ***** error ... 640s gamrnd (2, ones (2), [3, 2]) 640s ***** error ... 640s gamrnd (2, ones (2), 3, 2) 640s 33 tests, 33 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/mvnpdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvnpdf.m 640s ***** demo 640s mu = [1, -1]; 640s sigma = [0.9, 0.4; 0.4, 0.3]; 640s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 640s x = [X1(:), X2(:)]; 640s p = mvnpdf (x, mu, sigma); 640s surf (X1, X2, reshape (p, 25, 25)); 640s ***** error y = mvnpdf (); 640s ***** error y = mvnpdf ([]); 640s ***** error y = mvnpdf (ones (3,3,3)); 640s ***** error ... 640s y = mvnpdf (ones (10, 2), [4, 2, 3]); 640s ***** error ... 640s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 640s ***** error ... 640s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 640s ***** shared x, mu, sigma 640s x = [1, 2, 5, 4, 6]; 640s mu = [2, 0, -1, 1, 4]; 640s sigma = [2, 2, 2, 2, 2]; 640s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 640s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 640s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 640s 9 tests, 9 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/betacdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/betacdf.m 640s ***** demo 640s ## Plot various CDFs from the Beta distribution 640s x = 0:0.005:1; 640s p1 = betacdf (x, 0.5, 0.5); 640s p2 = betacdf (x, 5, 1); 640s p3 = betacdf (x, 1, 3); 640s p4 = betacdf (x, 2, 2); 640s p5 = betacdf (x, 2, 5); 640s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 640s grid on 640s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 640s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 640s title ("Beta CDF") 640s xlabel ("values in x") 640s ylabel ("probability") 640s ***** shared x, y, x1, x2 640s x = [-1 0 0.5 1 2]; 640s y = [0 0 0.75 1 1]; 640s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 640s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 640s ***** assert (betacdf (x, ones (1, 5), 2), y) 640s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 640s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 640s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 640s x1 = [0.1:0.2:0.9]; 640s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 640s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 640s 1e-14); 640s x2 = [1, 2, 3]; 640s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 640s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 640s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 640s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 640s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 640s ***** error betacdf () 640s ***** error betacdf (1) 640s ***** error betacdf (1, 2) 640s ***** error betacdf (1, 2, 3, 4, 5) 640s ***** error betacdf (1, 2, 3, "tail") 640s ***** error betacdf (1, 2, 3, 4) 640s ***** error ... 640s betacdf (ones (3), ones (2), ones (2)) 640s ***** error ... 640s betacdf (ones (2), ones (3), ones (2)) 640s ***** error ... 640s betacdf (ones (2), ones (2), ones (3)) 640s ***** error betacdf (i, 2, 2) 640s ***** error betacdf (2, i, 2) 640s ***** error betacdf (2, 2, i) 640s 25 tests, 25 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/tricdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tricdf.m 640s ***** demo 640s ## Plot various CDFs from the triangular distribution 640s x = 0.001:0.001:10; 640s p1 = tricdf (x, 3, 4, 6); 640s p2 = tricdf (x, 1, 2, 5); 640s p3 = tricdf (x, 2, 3, 9); 640s p4 = tricdf (x, 2, 5, 9); 640s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 640s grid on 640s xlim ([0, 10]) 640s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 640s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 640s "location", "southeast") 640s title ("Triangular CDF") 640s xlabel ("values in x") 640s ylabel ("probability") 640s ***** shared x, y 640s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 640s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 640s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 640s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 640s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 640s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 640s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 640s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 640s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 640s [y(1:2), NaN, y(4:7)], eps) 640s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 640s [y(1:2), NaN, y(4:7)], eps) 640s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 640s [y(1:2), NaN, y(4:7)], eps) 640s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 640s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 640s single ([y, NaN]), eps("single")) 640s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 640s single ([y, NaN]), eps("single")) 640s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 640s single ([y, NaN]), eps("single")) 640s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 640s single ([y, NaN]), eps("single")) 640s ***** error tricdf () 640s ***** error tricdf (1) 640s ***** error tricdf (1, 2) 640s ***** error tricdf (1, 2, 3) 640s ***** error ... 640s tricdf (1, 2, 3, 4, 5, 6) 640s ***** error tricdf (1, 2, 3, 4, "tail") 640s ***** error tricdf (1, 2, 3, 4, 5) 640s ***** error ... 640s tricdf (ones (3), ones (2), ones(2), ones(2)) 640s ***** error ... 640s tricdf (ones (2), ones (3), ones(2), ones(2)) 640s ***** error ... 640s tricdf (ones (2), ones (2), ones(3), ones(2)) 640s ***** error ... 640s tricdf (ones (2), ones (2), ones(2), ones(3)) 640s ***** error tricdf (i, 2, 3, 4) 640s ***** error tricdf (1, i, 3, 4) 640s ***** error tricdf (1, 2, i, 4) 640s ***** error tricdf (1, 2, 3, i) 640s 29 tests, 29 passed, 0 known failure, 0 skipped 640s [inst/dist_fun/plcdf.m] 640s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/plcdf.m 640s ***** demo 640s ## Plot various CDFs from the Piecewise linear distribution 640s data = 0:0.01:10; 640s x1 = [0, 1, 3, 4, 7, 10]; 640s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 640s x2 = [0, 2, 5, 6, 7, 8]; 640s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 640s p1 = plcdf (data, x1, Fx1); 640s p2 = plcdf (data, x2, Fx2); 640s plot (data, p1, "-b", data, p2, "g") 640s grid on 640s ylim ([0, 1]) 640s xlim ([0, 10]) 640s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 640s title ("Piecewise linear CDF") 640s xlabel ("values in data") 640s ylabel ("probability") 640s ***** test 640s data = 0:0.2:1; 640s p = plcdf (data, [0, 1], [0, 1]); 640s assert (p, data); 640s ***** test 640s data = 0:0.2:1; 640s p = plcdf (data, [0, 2], [0, 1]); 640s assert (p, 0.5 * data); 640s ***** test 640s data = 0:0.2:1; 640s p = plcdf (data, [0, 1], [0, 0.5]); 640s assert (p, 0.5 * data); 640s ***** test 640s data = 0:0.2:1; 640s p = plcdf (data, [0, 0.5], [0, 1]); 640s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 640s ***** test 640s data = 0:0.2:1; 640s p = plcdf (data, [0, 1], [0, 1], "upper"); 640s assert (p, 1 - data); 641s ***** error plcdf () 641s ***** error plcdf (1) 641s ***** error plcdf (1, 2) 641s ***** error plcdf (1, 2, 3, "uper") 641s ***** error plcdf (1, 2, 3, 4) 641s ***** error ... 641s plcdf (1, [0, 1, 2], [0, 1]) 641s ***** error ... 641s plcdf (1, [0], [1]) 641s ***** error ... 641s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 641s ***** error ... 641s plcdf (1, [0, 1, 2], [0, i, 1]) 641s ***** error ... 641s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 641s ***** error ... 641s plcdf (1, [0, i, 2], [0, 0.5, 1]) 641s ***** error ... 641s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 641s 17 tests, 17 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/betarnd.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/betarnd.m 641s ***** assert (size (betarnd (2, 1/2)), [1 1]) 641s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 641s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 641s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 641s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 641s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 641s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 641s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 641s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 641s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 641s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 641s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 641s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 641s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 641s ***** assert (class (betarnd (1, 1)), "double") 641s ***** assert (class (betarnd (1, single (0))), "single") 641s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 641s ***** assert (class (betarnd (1, single (1), 2)), "single") 641s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 641s ***** assert (class (betarnd (single (1), 1, 2)), "single") 641s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 641s ***** error betarnd () 641s ***** error betarnd (1) 641s ***** error ... 641s betarnd (ones (3), ones (2)) 641s ***** error ... 641s betarnd (ones (2), ones (3)) 641s ***** error betarnd (i, 2) 641s ***** error betarnd (1, i) 641s ***** error ... 641s betarnd (1, 1/2, -1) 641s ***** error ... 641s betarnd (1, 1/2, 1.2) 641s ***** error ... 641s betarnd (1, 1/2, ones (2)) 641s ***** error ... 641s betarnd (1, 1/2, [2 -1 2]) 641s ***** error ... 641s betarnd (1, 1/2, [2 0 2.5]) 641s ***** error ... 641s betarnd (1, 1/2, 2, -1, 5) 641s ***** error ... 641s betarnd (1, 1/2, 2, 1.5, 5) 641s ***** error ... 641s betarnd (2, 1/2 * ones (2), 3) 641s ***** error ... 641s betarnd (2, 1/2 * ones (2), [3, 2]) 641s ***** error ... 641s betarnd (2, 1/2 * ones (2), 3, 2) 641s ***** error ... 641s betarnd (2 * ones (2), 1/2, 3) 641s ***** error ... 641s betarnd (2 * ones (2), 1/2, [3, 2]) 641s ***** error ... 641s betarnd (2 * ones (2), 1/2, 3, 2) 641s 40 tests, 40 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/lognrnd.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/lognrnd.m 641s ***** assert (size (lognrnd (1, 1)), [1 1]) 641s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 641s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 641s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 641s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 641s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 641s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 641s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 641s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 641s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 641s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 641s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 641s ***** assert (class (lognrnd (1, 1)), "double") 641s ***** assert (class (lognrnd (1, single (1))), "single") 641s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 641s ***** assert (class (lognrnd (single (1), 1)), "single") 641s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 641s ***** error lognrnd () 641s ***** error lognrnd (1) 641s ***** error ... 641s lognrnd (ones (3), ones (2)) 641s ***** error ... 641s lognrnd (ones (2), ones (3)) 641s ***** error lognrnd (i, 2, 3) 641s ***** error lognrnd (1, i, 3) 641s ***** error ... 641s lognrnd (1, 2, -1) 641s ***** error ... 641s lognrnd (1, 2, 1.2) 641s ***** error ... 641s lognrnd (1, 2, ones (2)) 641s ***** error ... 641s lognrnd (1, 2, [2 -1 2]) 641s ***** error ... 641s lognrnd (1, 2, [2 0 2.5]) 641s ***** error ... 641s lognrnd (1, 2, 2, -1, 5) 641s ***** error ... 641s lognrnd (1, 2, 2, 1.5, 5) 641s ***** error ... 641s lognrnd (2, ones (2), 3) 641s ***** error ... 641s lognrnd (2, ones (2), [3, 2]) 641s ***** error ... 641s lognrnd (2, ones (2), 3, 2) 641s 33 tests, 33 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/ncx2pdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncx2pdf.m 641s ***** demo 641s ## Plot various PDFs from the noncentral chi-squared distribution 641s x = 0:0.1:10; 641s y1 = ncx2pdf (x, 2, 1); 641s y2 = ncx2pdf (x, 2, 2); 641s y3 = ncx2pdf (x, 2, 3); 641s y4 = ncx2pdf (x, 4, 1); 641s y5 = ncx2pdf (x, 4, 2); 641s y6 = ncx2pdf (x, 4, 3); 641s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 641s x, y4, "-m", x, y5, "-c", x, y6, "-y") 641s grid on 641s xlim ([0, 10]) 641s ylim ([0, 0.32]) 641s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 641s "df = 2, λ = 3", "df = 4, λ = 1", ... 641s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 641s title ("Noncentral chi-squared PDF") 641s xlabel ("values in x") 641s ylabel ("density") 641s ***** demo 641s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 641s ## chi-squared PDF with the same number of degrees of freedom (4). 641s 641s x = 0:0.1:10; 641s y1 = ncx2pdf (x, 4, 2); 641s y2 = chi2pdf (x, 4); 641s plot (x, y1, "-", x, y2, "-"); 641s grid on 641s xlim ([0, 10]) 641s ylim ([0, 0.32]) 641s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 641s title ("Noncentral chi-squared vs chi-squared PDFs") 641s xlabel ("values in x") 641s ylabel ("density") 641s ***** shared x1, df, d1 641s x1 = [-Inf, 2, NaN, 4, Inf]; 641s df = [2, 0, -1, 1, 4]; 641s d1 = [1, NaN, 3, -1, 2]; 641s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 641s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 641s 0.06160064323277038, 0], 1e-14); 641s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 641s 0.09631299762429098, 0], 1e-14); 641s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 641s 0.08430464047296625, 0], 1e-14); 641s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 641s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 641s NaN, 0.1076346446244688], 1e-14); 641s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 641s NaN, 0.1192317192431485], 1e-14); 641s ***** error ncx2pdf () 641s ***** error ncx2pdf (1) 641s ***** error ncx2pdf (1, 2) 641s ***** error ... 641s ncx2pdf (ones (3), ones (2), ones (2)) 641s ***** error ... 641s ncx2pdf (ones (2), ones (3), ones (2)) 641s ***** error ... 641s ncx2pdf (ones (2), ones (2), ones (3)) 641s ***** error ncx2pdf (i, 2, 2) 641s ***** error ncx2pdf (2, i, 2) 641s ***** error ncx2pdf (2, 2, i) 641s 16 tests, 16 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/exprnd.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/exprnd.m 641s ***** assert (size (exprnd (2)), [1, 1]) 641s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 641s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 641s ***** assert (size (exprnd (1, 3)), [3, 3]) 641s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 641s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 641s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 641s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 641s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 641s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 641s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 641s ***** assert (class (exprnd (2)), "double") 641s ***** assert (class (exprnd (single (2))), "single") 641s ***** assert (class (exprnd (single ([2 2]))), "single") 641s ***** error exprnd () 641s ***** error exprnd (i) 641s ***** error ... 641s exprnd (1, -1) 641s ***** error ... 641s exprnd (1, 1.2) 641s ***** error ... 641s exprnd (1, ones (2)) 641s ***** error ... 641s exprnd (1, [2 -1 2]) 641s ***** error ... 641s exprnd (1, [2 0 2.5]) 641s ***** error ... 641s exprnd (ones (2), ones (2)) 641s ***** error ... 641s exprnd (1, 2, -1, 5) 641s ***** error ... 641s exprnd (1, 2, 1.5, 5) 641s ***** error exprnd (ones (2,2), 3) 641s ***** error exprnd (ones (2,2), [3, 2]) 641s ***** error exprnd (ones (2,2), 2, 3) 641s 27 tests, 27 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/unifcdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unifcdf.m 641s ***** demo 641s ## Plot various CDFs from the continuous uniform distribution 641s x = 0:0.1:10; 641s p1 = unifcdf (x, 2, 5); 641s p2 = unifcdf (x, 3, 9); 641s plot (x, p1, "-b", x, p2, "-g") 641s grid on 641s xlim ([0, 10]) 641s ylim ([0, 1]) 641s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 641s title ("Continuous uniform CDF") 641s xlabel ("values in x") 641s ylabel ("probability") 641s ***** shared x, y 641s x = [-1 0 0.5 1 2] + 1; 641s y = [0 0 0.5 1 1]; 641s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 641s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 641s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 641s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 641s ***** assert (unifcdf (x, ones (1,5), 2), y) 641s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 641s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 641s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 641s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 641s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 641s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 641s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 641s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 641s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 641s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 641s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 641s ***** error unifcdf () 641s ***** error unifcdf (1) 641s ***** error unifcdf (1, 2) 641s ***** error unifcdf (1, 2, 3, 4) 641s ***** error unifcdf (1, 2, 3, "tail") 641s ***** error ... 641s unifcdf (ones (3), ones (2), ones (2)) 641s ***** error ... 641s unifcdf (ones (2), ones (3), ones (2)) 641s ***** error ... 641s unifcdf (ones (2), ones (2), ones (3)) 641s ***** error unifcdf (i, 2, 2) 641s ***** error unifcdf (2, i, 2) 641s ***** error unifcdf (2, 2, i) 641s 27 tests, 27 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/geocdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/geocdf.m 641s ***** demo 641s ## Plot various CDFs from the geometric distribution 641s x = 0:10; 641s p1 = geocdf (x, 0.2); 641s p2 = geocdf (x, 0.5); 641s p3 = geocdf (x, 0.7); 641s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 641s grid on 641s xlim ([0, 10]) 641s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 641s title ("Geometric CDF") 641s xlabel ("values in x (number of failures)") 641s ylabel ("probability") 641s ***** test 641s p = geocdf ([1, 2, 3, 4], 0.25); 641s assert (p(1), 0.4375000000, 1e-14); 641s assert (p(2), 0.5781250000, 1e-14); 641s assert (p(3), 0.6835937500, 1e-14); 641s assert (p(4), 0.7626953125, 1e-14); 641s ***** test 641s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 641s assert (p(1), 0.5625000000, 1e-14); 641s assert (p(2), 0.4218750000, 1e-14); 641s assert (p(3), 0.3164062500, 1e-14); 641s assert (p(4), 0.2373046875, 1e-14); 641s ***** shared x, p 641s x = [-1 0 1 Inf]; 641s p = [0 0.5 0.75 1]; 641s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 641s ***** assert (geocdf (x, 0.5), p) 641s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 641s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 641s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 641s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 641s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 641s ***** error geocdf () 641s ***** error geocdf (1) 641s ***** error ... 641s geocdf (ones (3), ones (2)) 641s ***** error ... 641s geocdf (ones (2), ones (3)) 641s ***** error geocdf (i, 2) 641s ***** error geocdf (2, i) 641s ***** error geocdf (2, 3, "tail") 641s ***** error geocdf (2, 3, 5) 641s 17 tests, 17 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/expcdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/expcdf.m 641s ***** demo 641s ## Plot various CDFs from the exponential distribution 641s x = 0:0.01:5; 641s p1 = expcdf (x, 2/3); 641s p2 = expcdf (x, 1.0); 641s p3 = expcdf (x, 2.0); 641s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 641s grid on 641s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 641s title ("Exponential CDF") 641s xlabel ("values in x") 641s ylabel ("probability") 641s ***** shared x, p 641s x = [-1 0 0.5 1 Inf]; 641s p = [0, 1 - exp(-x(2:end)/2)]; 641s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 641s ***** assert (expcdf (x, 2), p, 1e-16) 641s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 641s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 641s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 641s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 641s ***** test 641s [p, plo, pup] = expcdf (1, 2, 3); 641s assert (p, 0.39346934028737, 1e-14); 641s assert (plo, 0.08751307220484, 1e-14); 641s assert (pup, 0.93476821257933, 1e-14); 641s ***** test 641s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 641s assert (p, 0.39346934028737, 1e-14); 641s assert (plo, 0.14466318041675, 1e-14); 641s assert (pup, 0.79808291849140, 1e-14); 641s ***** test 641s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 641s assert (p, 0.60653065971263, 1e-14); 641s assert (plo, 0.20191708150860, 1e-14); 641s assert (pup, 0.85533681958325, 1e-14); 641s ***** error expcdf () 641s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 641s ***** error expcdf (1, 2, 3, 4, "uper") 641s ***** error ... 641s expcdf (ones (3), ones (2)) 641s ***** error ... 641s expcdf (2, 3, [1, 2]) 641s ***** error ... 641s [p, plo, pup] = expcdf (1, 2) 641s ***** error [p, plo, pup] = ... 641s expcdf (1, 2, 3, 0) 641s ***** error [p, plo, pup] = ... 641s expcdf (1, 2, 3, 1.22) 641s ***** error [p, plo, pup] = ... 641s expcdf (1, 2, 3, "alpha", "upper") 641s ***** error expcdf (i, 2) 641s ***** error expcdf (2, i) 641s ***** error ... 641s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 641s 21 tests, 21 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/triinv.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/triinv.m 641s ***** demo 641s ## Plot various iCDFs from the triangular distribution 641s p = 0.001:0.001:0.999; 641s x1 = triinv (p, 3, 6, 4); 641s x2 = triinv (p, 1, 5, 2); 641s x3 = triinv (p, 2, 9, 3); 641s x4 = triinv (p, 2, 9, 5); 641s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 641s grid on 641s ylim ([0, 10]) 641s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 641s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 641s "location", "northwest") 641s title ("Triangular CDF") 641s xlabel ("probability") 641s ylabel ("values in x") 641s ***** shared p, y 641s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 641s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 641s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 641s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 641s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 641s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 641s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 641s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 641s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 641s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 641s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 641s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 641s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 641s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 641s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 641s ***** error triinv () 641s ***** error triinv (1) 641s ***** error triinv (1, 2) 641s ***** error triinv (1, 2, 3) 641s ***** error ... 641s triinv (1, 2, 3, 4, 5) 641s ***** error ... 641s triinv (ones (3), ones (2), ones(2), ones(2)) 641s ***** error ... 641s triinv (ones (2), ones (3), ones(2), ones(2)) 641s ***** error ... 641s triinv (ones (2), ones (2), ones(3), ones(2)) 641s ***** error ... 641s triinv (ones (2), ones (2), ones(2), ones(3)) 641s ***** error triinv (i, 2, 3, 4) 641s ***** error triinv (1, i, 3, 4) 641s ***** error triinv (1, 2, i, 4) 641s ***** error triinv (1, 2, 3, i) 641s 26 tests, 26 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/logicdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logicdf.m 641s ***** demo 641s ## Plot various CDFs from the logistic distribution 641s x = -5:0.01:20; 641s p1 = logicdf (x, 5, 2); 641s p2 = logicdf (x, 9, 3); 641s p3 = logicdf (x, 9, 4); 641s p4 = logicdf (x, 6, 2); 641s p5 = logicdf (x, 2, 1); 641s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 641s grid on 641s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 641s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 641s title ("Logistic CDF") 641s xlabel ("values in x") 641s ylabel ("probability") 641s ***** shared x, y 641s x = [-Inf -log(3) 0 log(3) Inf]; 641s y = [0, 1/4, 1/2, 3/4, 1]; 641s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 641s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1], eps) 641s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 641s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 641s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 641s ***** error logicdf () 641s ***** error logicdf (1) 641s ***** error ... 641s logicdf (1, 2) 641s ***** error logicdf (1, 2, 3, "tail") 641s ***** error logicdf (1, 2, 3, 4) 641s ***** error ... 641s logicdf (1, ones (2), ones (3)) 641s ***** error ... 641s logicdf (ones (2), 1, ones (3)) 641s ***** error ... 641s logicdf (ones (2), ones (3), 1) 641s ***** error logicdf (i, 2, 3) 641s ***** error logicdf (1, i, 3) 641s ***** error logicdf (1, 2, i) 641s 16 tests, 16 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/mvnrnd.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvnrnd.m 641s ***** error mvnrnd () 641s ***** error mvnrnd ([2, 3, 4]) 641s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 641s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 641s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 641s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 641s 6 tests, 6 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/unidcdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unidcdf.m 641s ***** demo 641s ## Plot various CDFs from the discrete uniform distribution 641s x = 0:10; 641s p1 = unidcdf (x, 5); 641s p2 = unidcdf (x, 9); 641s plot (x, p1, "*b", x, p2, "*g") 641s grid on 641s xlim ([0, 10]) 641s ylim ([0, 1]) 641s legend ({"N = 5", "N = 9"}, "location", "southeast") 641s title ("Discrete uniform CDF") 641s xlabel ("values in x") 641s ylabel ("probability") 641s ***** shared x, y 641s x = [0 1 2.5 10 11]; 641s y = [0, 0.1 0.2 1.0 1.0]; 641s ***** assert (unidcdf (x, 10*ones (1,5)), y) 641s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 641s ***** assert (unidcdf (x, 10), y) 641s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 641s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 641s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 641s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 641s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 641s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 641s ***** error unidcdf () 641s ***** error unidcdf (1) 641s ***** error unidcdf (1, 2, 3) 641s ***** error unidcdf (1, 2, "tail") 641s ***** error ... 641s unidcdf (ones (3), ones (2)) 641s ***** error ... 641s unidcdf (ones (2), ones (3)) 641s ***** error unidcdf (i, 2) 641s ***** error unidcdf (2, i) 641s 17 tests, 17 passed, 0 known failure, 0 skipped 641s [inst/dist_fun/ncfpdf.m] 641s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncfpdf.m 641s ***** demo 641s ## Plot various PDFs from the noncentral F distribution 641s x = 0:0.01:5; 641s y1 = ncfpdf (x, 2, 5, 1); 641s y2 = ncfpdf (x, 2, 5, 2); 641s y3 = ncfpdf (x, 5, 10, 1); 641s y4 = ncfpdf (x, 10, 20, 10); 641s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 641s grid on 641s xlim ([0, 5]) 641s ylim ([0, 0.8]) 641s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 641s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 641s "location", "northeast") 641s title ("Noncentral F PDF") 641s xlabel ("values in x") 641s ylabel ("density") 641s ***** demo 641s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 641s ## same number of numerator and denominator degrees of freedom (5, 20) 641s 641s x = 0.01:0.1:10.01; 641s y1 = ncfpdf (x, 5, 20, 10); 641s y2 = fpdf (x, 5, 20); 641s plot (x, y1, "-", x, y2, "-"); 641s grid on 641s xlim ([0, 10]) 641s ylim ([0, 0.8]) 641s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 641s title ("Noncentral F vs F PDFs") 641s xlabel ("values in x") 641s ylabel ("density") 641s ***** shared x1, df1, df2, lambda 641s x1 = [-Inf, 2, NaN, 4, Inf]; 641s df1 = [2, 0, -1, 1, 4]; 641s df2 = [2, 4, 5, 6, 8]; 641s lambda = [1, NaN, 3, -1, 2]; 641s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 641s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 641s 0.05607937264237208, NaN], 1e-14); 641s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 641s 0.080125760971946518, NaN], 1e-14); 641s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 641s 0.0715902008258656, NaN], 1e-14); 641s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 641s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 641s NaN, 0.2152571783045893], 1e-14); 641s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 641s NaN, 0.05560846335398539], 1e-14); 641s ***** error ncfpdf () 641s ***** error ncfpdf (1) 641s ***** error ncfpdf (1, 2) 641s ***** error ncfpdf (1, 2, 3) 641s ***** error ... 641s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 641s ***** error ... 641s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 641s ***** error ... 641s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 641s ***** error ... 641s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 641s ***** error ncfpdf (i, 2, 2, 2) 642s ***** error ncfpdf (2, i, 2, 2) 642s ***** error ncfpdf (2, 2, i, 2) 642s ***** error ncfpdf (2, 2, 2, i) 642s 19 tests, 19 passed, 0 known failure, 0 skipped 642s [inst/dist_fun/ricernd.m] 642s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ricernd.m 642s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 642s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 642s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 642s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 642s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 642s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 642s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 642s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 642s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 642s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 642s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 642s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 642s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 642s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 642s ***** assert (class (ricernd (1, 1)), "double") 642s ***** assert (class (ricernd (1, single (0))), "single") 642s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 642s ***** assert (class (ricernd (1, single (1), 2)), "single") 642s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 642s ***** assert (class (ricernd (single (1), 1, 2)), "single") 642s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 642s ***** error ricernd () 642s ***** error ricernd (1) 642s ***** error ... 642s ricernd (ones (3), ones (2)) 642s ***** error ... 642s ricernd (ones (2), ones (3)) 642s ***** error ricernd (i, 2) 642s ***** error ricernd (1, i) 642s ***** error ... 642s ricernd (1, 1/2, -1) 642s ***** error ... 642s ricernd (1, 1/2, 1.2) 642s ***** error ... 642s ricernd (1, 1/2, ones (2)) 642s ***** error ... 642s ricernd (1, 1/2, [2 -1 2]) 642s ***** error ... 642s ricernd (1, 1/2, [2 0 2.5]) 642s ***** error ... 642s ricernd (1, 1/2, 2, -1, 5) 642s ***** error ... 642s ricernd (1, 1/2, 2, 1.5, 5) 642s ***** error ... 642s ricernd (2, 1/2 * ones (2), 3) 642s ***** error ... 642s ricernd (2, 1/2 * ones (2), [3, 2]) 642s ***** error ... 642s ricernd (2, 1/2 * ones (2), 3, 2) 642s ***** error ... 642s ricernd (2 * ones (2), 1/2, 3) 642s ***** error ... 642s ricernd (2 * ones (2), 1/2, [3, 2]) 642s ***** error ... 642s ricernd (2 * ones (2), 1/2, 3, 2) 642s 40 tests, 40 passed, 0 known failure, 0 skipped 642s [inst/dist_fun/chi2cdf.m] 642s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/chi2cdf.m 642s ***** demo 642s ## Plot various CDFs from the chi-squared distribution 642s x = 0:0.01:8; 642s p1 = chi2cdf (x, 1); 642s p2 = chi2cdf (x, 2); 642s p3 = chi2cdf (x, 3); 642s p4 = chi2cdf (x, 4); 642s p5 = chi2cdf (x, 6); 642s p6 = chi2cdf (x, 9); 642s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 642s x, p4, "-c", x, p5, "-m", x, p6, "-y") 642s grid on 642s xlim ([0, 8]) 642s legend ({"df = 1", "df = 2", "df = 3", ... 642s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 642s title ("Chi-squared CDF") 642s xlabel ("values in x") 642s ylabel ("probability") 642s ***** shared x, p, u 642s x = [-1, 0, 0.5, 1, 2]; 642s p = [0, (1 - exp (-x(2:end) / 2))]; 642s u = [1, 0, NaN, 0.606530659712633, 0.367879441171442]; 642s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 642s ***** assert (chi2cdf (x, 2), p, eps) 642s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [0, 1, NaN, p(4:5)], eps) 642s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), u, 3 * eps) 642s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 642s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 642s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 642s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 642s ***** error chi2cdf () 642s ***** error chi2cdf (1) 642s ***** error chi2cdf (1, 2, 3, 4) 642s ***** error chi2cdf (1, 2, 3) 642s ***** error chi2cdf (1, 2, "uper") 642s ***** error ... 642s chi2cdf (ones (3), ones (2)) 642s ***** error ... 642s chi2cdf (ones (2), ones (3)) 642s ***** error chi2cdf (i, 2) 642s ***** error chi2cdf (2, i) 642s 17 tests, 17 passed, 0 known failure, 0 skipped 642s [inst/dist_fun/invgrnd.m] 642s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/invgrnd.m 642s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 642s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 642s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 642s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 642s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 642s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 642s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 642s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 642s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 642s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 642s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 642s ***** test 642s r = invgrnd (1, [1, 0, -1]); 642s assert (r([2:3]), [NaN, NaN]) 642s ***** assert (class (invgrnd (1, 0)), "double") 642s ***** assert (class (invgrnd (1, single (0))), "single") 642s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 642s ***** assert (class (invgrnd (1, single (1))), "single") 642s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 642s ***** assert (class (invgrnd (single (1), 1)), "single") 642s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 642s ***** error invgrnd () 642s ***** error invgrnd (1) 642s ***** error ... 642s invgrnd (ones (3), ones (2)) 642s ***** error ... 642s invgrnd (ones (2), ones (3)) 642s ***** error invgrnd (i, 2, 3) 642s ***** error invgrnd (1, i, 3) 642s ***** error ... 642s invgrnd (1, 2, -1) 642s ***** error ... 642s invgrnd (1, 2, 1.2) 642s ***** error ... 642s invgrnd (1, 2, ones (2)) 642s ***** error ... 642s invgrnd (1, 2, [2 -1 2]) 642s ***** error ... 642s invgrnd (1, 2, [2 0 2.5]) 642s ***** error ... 642s invgrnd (1, 2, 2, -1, 5) 642s ***** error ... 642s invgrnd (1, 2, 2, 1.5, 5) 642s ***** error ... 642s invgrnd (2, ones (2), 3) 642s ***** error ... 642s invgrnd (2, ones (2), [3, 2]) 642s ***** error ... 642s invgrnd (2, ones (2), 3, 2) 642s 35 tests, 35 passed, 0 known failure, 0 skipped 642s [inst/dist_fun/bisacdf.m] 642s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bisacdf.m 642s ***** demo 642s ## Plot various CDFs from the Birnbaum-Saunders distribution 642s x = 0.01:0.01:4; 642s p1 = bisacdf (x, 1, 0.5); 642s p2 = bisacdf (x, 1, 1); 642s p3 = bisacdf (x, 1, 2); 642s p4 = bisacdf (x, 1, 5); 642s p5 = bisacdf (x, 1, 10); 642s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 642s grid on 642s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 642s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 642s title ("Birnbaum-Saunders CDF") 642s xlabel ("values in x") 642s ylabel ("probability") 642s ***** demo 642s ## Plot various CDFs from the Birnbaum-Saunders distribution 642s x = 0.01:0.01:6; 642s p1 = bisacdf (x, 1, 0.3); 642s p2 = bisacdf (x, 2, 0.3); 642s p3 = bisacdf (x, 1, 0.5); 642s p4 = bisacdf (x, 3, 0.5); 642s p5 = bisacdf (x, 5, 0.5); 642s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 642s grid on 642s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 642s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 642s title ("Birnbaum-Saunders CDF") 642s xlabel ("values in x") 642s ylabel ("probability") 642s ***** shared x, y 642s x = [-1, 0, 1, 2, Inf]; 642s y = [0, 0, 1/2, 0.76024993890652337, 1]; 642s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 642s ***** assert (bisacdf (x, 1, 1), y, eps) 642s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 642s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 642s ***** assert (bisacdf (x, 1, 1), y, eps) 642s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 642s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 642s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 644s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 644s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 644s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 644s ***** error bisacdf () 644s ***** error bisacdf (1) 644s ***** error bisacdf (1, 2) 644s ***** error ... 644s bisacdf (1, 2, 3, 4, 5) 644s ***** error bisacdf (1, 2, 3, "tail") 644s ***** error bisacdf (1, 2, 3, 4) 644s ***** error ... 644s bisacdf (ones (3), ones (2), ones(2)) 644s ***** error ... 644s bisacdf (ones (2), ones (3), ones(2)) 644s ***** error ... 644s bisacdf (ones (2), ones (2), ones(3)) 644s ***** error bisacdf (i, 4, 3) 644s ***** error bisacdf (1, i, 3) 644s ***** error bisacdf (1, 4, i) 644s 23 tests, 23 passed, 0 known failure, 0 skipped 644s [inst/dist_fun/hncdf.m] 644s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hncdf.m 644s ***** demo 644s ## Plot various CDFs from the half-normal distribution 644s x = 0:0.001:10; 644s p1 = hncdf (x, 0, 1); 644s p2 = hncdf (x, 0, 2); 644s p3 = hncdf (x, 0, 3); 644s p4 = hncdf (x, 0, 5); 644s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 644s grid on 644s xlim ([0, 10]) 644s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 644s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 644s title ("Half-normal CDF") 644s xlabel ("values in x") 644s ylabel ("probability") 644s ***** demo 644s ## Plot half-normal against normal cumulative distribution function 644s x = -5:0.001:5; 644s p1 = hncdf (x, 0, 1); 644s p2 = normcdf (x); 644s plot (x, p1, "-b", x, p2, "-g") 644s grid on 644s xlim ([-5, 5]) 644s legend ({"half-normal with μ = 0, σ = 1", ... 644s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 644s title ("Half-normal against standard normal CDF") 644s xlabel ("values in x") 644s ylabel ("probability") 644s ***** shared x, p1, p1u, y2, y2u, y3, y3u 644s x = [-Inf, -1, 0, 1/2, 1, Inf]; 644s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 644s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 644s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 644s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 644s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 644s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 644s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 644s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 644s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 644s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 644s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 644s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 644s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 644s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 644s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 644s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 644s ***** error hncdf () 644s ***** error hncdf (1) 644s ***** error hncdf (1, 2) 644s ***** error hncdf (1, 2, 3, "tail") 644s ***** error hncdf (1, 2, 3, 5) 644s ***** error ... 644s hncdf (ones (3), ones (2), ones(2)) 644s ***** error ... 644s hncdf (ones (2), ones (3), ones(2)) 644s ***** error ... 644s hncdf (ones (2), ones (2), ones(3)) 645s ***** error hncdf (i, 2, 3) 645s ***** error hncdf (1, i, 3) 645s ***** error hncdf (1, 2, i) 645s 25 tests, 25 passed, 0 known failure, 0 skipped 645s [inst/dist_fun/nbininv.m] 645s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nbininv.m 645s ***** demo 645s ## Plot various iCDFs from the negative binomial distribution 645s p = 0.001:0.001:0.999; 645s x1 = nbininv (p, 2, 0.15); 645s x2 = nbininv (p, 5, 0.2); 645s x3 = nbininv (p, 4, 0.4); 645s x4 = nbininv (p, 10, 0.3); 645s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 645s grid on 645s ylim ([0, 40]) 645s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 645s "r = 10, ps = 0.3"}, "location", "northwest") 645s title ("Negative binomial iCDF") 645s xlabel ("probability") 645s ylabel ("values in x (number of failures)") 645s ***** shared p 645s p = [-1 0 3/4 1 2]; 645s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 645s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 645s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 645s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 645s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 645s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 645s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 645s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 645s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 645s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 645s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 645s ***** shared y, tol 645s y = magic (3) + 1; 645s tol = 1; 645s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 645s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 645s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 645s ***** error nbininv () 645s ***** error nbininv (1) 645s ***** error nbininv (1, 2) 645s ***** error ... 645s nbininv (ones (3), ones (2), ones (2)) 645s ***** error ... 645s nbininv (ones (2), ones (3), ones (2)) 645s ***** error ... 645s nbininv (ones (2), ones (2), ones (3)) 645s ***** error nbininv (i, 2, 2) 645s ***** error nbininv (2, i, 2) 645s ***** error nbininv (2, 2, i) 645s 23 tests, 23 passed, 0 known failure, 0 skipped 645s [inst/dist_fun/gevrnd.m] 645s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gevrnd.m 645s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 645s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 645s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 645s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 645s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 645s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 645s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 645s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 645s ***** assert (class (gevrnd (1,1,1)), "double") 645s ***** assert (class (gevrnd (single (1),1,1)), "single") 645s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 645s ***** assert (class (gevrnd (1,single (1),1)), "single") 645s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 645s ***** assert (class (gevrnd (1,1,single (1))), "single") 645s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 645s ***** error gevrnd () 645s ***** error gevrnd (1) 645s ***** error gevrnd (1, 2) 645s ***** error ... 645s gevrnd (ones (3), ones (2), ones (2)) 645s ***** error ... 645s gevrnd (ones (2), ones (3), ones (2)) 645s ***** error ... 645s gevrnd (ones (2), ones (2), ones (3)) 645s ***** error gevrnd (i, 2, 3) 645s ***** error gevrnd (1, i, 3) 645s ***** error gevrnd (1, 2, i) 645s ***** error ... 645s gevrnd (1, 2, 3, -1) 645s ***** error ... 645s gevrnd (1, 2, 3, 1.2) 645s ***** error ... 645s gevrnd (1, 2, 3, ones (2)) 645s ***** error ... 645s gevrnd (1, 2, 3, [2 -1 2]) 645s ***** error ... 645s gevrnd (1, 2, 3, [2 0 2.5]) 645s ***** error ... 645s gevrnd (1, 2, 3, 2, -1, 5) 645s ***** error ... 645s gevrnd (1, 2, 3, 2, 1.5, 5) 645s ***** error ... 645s gevrnd (2, ones (2), 2, 3) 645s ***** error ... 645s gevrnd (2, ones (2), 2, [3, 2]) 645s ***** error ... 645s gevrnd (2, ones (2), 2, 3, 2) 645s 34 tests, 34 passed, 0 known failure, 0 skipped 645s [inst/dist_fun/mvncdf.m] 645s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvncdf.m 645s ***** demo 645s mu = [1, -1]; 645s Sigma = [0.9, 0.4; 0.4, 0.3]; 645s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 645s X = [X1(:), X2(:)]; 645s p = mvncdf (X, mu, Sigma); 645s Z = reshape (p, 25, 25); 645s surf (X1, X2, Z); 645s title ("Bivariate Normal Distribution"); 645s ylabel "X1" 645s xlabel "X2" 645s ***** demo 645s mu = [0, 0]; 645s Sigma = [0.25, 0.3; 0.3, 1]; 645s p = mvncdf ([0 0], [1 1], mu, Sigma); 645s x1 = -3:.2:3; 645s x2 = -3:.2:3; 645s [X1, X2] = meshgrid (x1, x2); 645s X = [X1(:), X2(:)]; 645s p = mvnpdf (X, mu, Sigma); 645s p = reshape (p, length (x2), length (x1)); 645s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 645s xlabel ("x"); 645s ylabel ("p"); 645s title ("Probability over Rectangular Region"); 645s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 645s ***** test 645s fD = (-2:2)'; 645s X = repmat (fD, 1, 4); 645s p = mvncdf (X); 645s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 645s ***** test 645s mu = [1, -1]; 645s Sigma = [0.9, 0.4; 0.4, 0.3]; 645s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 645s X = [X1(:), X2(:)]; 645s p = mvncdf (X, mu, Sigma); 645s p_out = [0.00011878988774500, 0.00034404112322371, ... 645s 0.00087682502191813, 0.00195221905058185, ... 645s 0.00378235566873474, 0.00638175749734415, ... 645s 0.00943764224329656, 0.01239164888125426, ... 645s 0.01472750274376648, 0.01623228313374828]'; 645s assert (p([1:10]), p_out, 1e-16); 645s ***** test 645s mu = [1, -1]; 645s Sigma = [0.9, 0.4; 0.4, 0.3]; 645s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 645s X = [X1(:), X2(:)]; 645s p = mvncdf (X, mu, Sigma); 645s p_out = [0.8180695783608276, 0.8854485749482751, ... 645s 0.9308108777385832, 0.9579855743025508, ... 645s 0.9722897881414742, 0.9788150170059926, ... 645s 0.9813597788804785, 0.9821977956568989, ... 645s 0.9824283794464095, 0.9824809345614861]'; 645s assert (p([616:625]), p_out, 3e-16); 645s ***** test 645s mu = [0, 0]; 645s Sigma = [0.25, 0.3; 0.3, 1]; 645s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 645s assert (p, 0.2097424404755626, 1e-16); 645s assert (err, 1e-08); 645s ***** test 645s x = [1 2]; 645s mu = [0.5 1.5]; 645s sigma = [1.0, 0.5; 0.5, 1.0]; 645s p = mvncdf (x, mu, sigma); 645s assert (p, 0.546244443857090, 1e-15); 645s ***** test 645s x = [1 2]; 645s mu = [0.5 1.5]; 645s sigma = [1.0, 0.5; 0.5, 1.0]; 645s a = [-inf 0]; 645s p = mvncdf (a, x, mu, sigma); 645s assert (p, 0.482672935215631, 1e-15); 645s ***** error p = mvncdf (randn (25,26), [], eye (26)); 645s ***** error p = mvncdf (randn (25,8), [], eye (9)); 645s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 645s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 645s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 645s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 645s 12 tests, 12 passed, 0 known failure, 0 skipped 645s [inst/dist_fun/jsucdf.m] 645s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/jsucdf.m 645s ***** error jsucdf () 645s ***** error jsucdf (1, 2, 3, 4) 645s ***** error ... 645s jsucdf (1, ones (2), ones (3)) 645s 3 tests, 3 passed, 0 known failure, 0 skipped 645s [inst/dist_fun/plpdf.m] 645s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/plpdf.m 645s ***** demo 645s ## Plot various PDFs from the Piecewise linear distribution 645s data = 0:0.01:10; 645s x1 = [0, 1, 3, 4, 7, 10]; 645s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 645s x2 = [0, 2, 5, 6, 7, 8]; 645s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 645s y1 = plpdf (data, x1, Fx1); 645s y2 = plpdf (data, x2, Fx2); 645s plot (data, y1, "-b", data, y2, "g") 645s grid on 645s ylim ([0, 0.6]) 645s xlim ([0, 10]) 645s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 645s title ("Piecewise linear CDF") 645s xlabel ("values in data") 645s ylabel ("density") 645s ***** shared x, Fx 645s x = [0, 1, 3, 4, 7, 10]; 645s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 645s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 645s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 645s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 645s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 645s ***** assert (plpdf (8, x, Fx), 0.1, eps); 645s ***** error plpdf () 645s ***** error plpdf (1) 645s ***** error plpdf (1, 2) 645s ***** error ... 645s plpdf (1, [0, 1, 2], [0, 1]) 645s ***** error ... 645s plpdf (1, [0], [1]) 646s ***** error ... 646s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 646s ***** error ... 646s plpdf (1, [0, 1, 2], [0, i, 1]) 646s ***** error ... 646s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 646s ***** error ... 646s plpdf (1, [0, i, 2], [0, 0.5, 1]) 646s ***** error ... 646s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 646s 15 tests, 15 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/iwishrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/iwishrnd.m 646s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 646s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 646s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 646s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 646s ***** error iwishrnd () 646s ***** error iwishrnd (1) 646s ***** error iwishrnd ([-3 1; 1 3],1) 646s ***** error iwishrnd ([1; 1],1) 646s 8 tests, 8 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/ncx2inv.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncx2inv.m 646s ***** demo 646s ## Plot various iCDFs from the noncentral chi-squared distribution 646s p = 0.001:0.001:0.999; 646s x1 = ncx2inv (p, 2, 1); 646s x2 = ncx2inv (p, 2, 2); 646s x3 = ncx2inv (p, 2, 3); 646s x4 = ncx2inv (p, 4, 1); 646s x5 = ncx2inv (p, 4, 2); 646s x6 = ncx2inv (p, 4, 3); 646s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 646s p, x4, "-m", p, x5, "-c", p, x6, "-y") 646s grid on 646s ylim ([0, 10]) 646s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 646s "df = 2, λ = 3", "df = 4, λ = 1", ... 646s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 646s title ("Noncentral chi-squared iCDF") 646s xlabel ("probability") 646s ylabel ("values in x") 646s ***** demo 646s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 646s ## chi-squared CDF with the same number of degrees of freedom (4). 646s 646s p = 0.001:0.001:0.999; 646s x1 = ncx2inv (p, 4, 2); 646s x2 = chi2inv (p, 4); 646s plot (p, x1, "-", p, x2, "-"); 646s grid on 646s ylim ([0, 10]) 646s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 646s title ("Noncentral chi-squared vs chi-squared quantile functions") 646s xlabel ("probability") 646s ylabel ("values in x") 646s ***** test 646s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 646s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 646s ***** test 646s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 646s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 646s ***** test 646s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 646s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 646s ***** test 646s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 646s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 646s ***** test 646s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 646s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 646s ***** test 646s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 646s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 646s ***** test 646s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 646s ***** error ncx2inv () 646s ***** error ncx2inv (1) 646s ***** error ncx2inv (1, 2) 646s ***** error ... 646s ncx2inv (ones (3), ones (2), ones (2)) 646s ***** error ... 646s ncx2inv (ones (2), ones (3), ones (2)) 646s ***** error ... 646s ncx2inv (ones (2), ones (2), ones (3)) 646s ***** error ncx2inv (i, 2, 2) 646s ***** error ncx2inv (2, i, 2) 646s ***** error ncx2inv (2, 2, i) 646s 16 tests, 16 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/ncfrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncfrnd.m 646s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 646s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 646s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 646s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 646s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 646s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 646s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 646s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 646s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 646s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 646s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 646s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 646s ***** assert (class (ncfrnd (1, 1, 1)), "double") 646s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 646s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 646s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 646s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 646s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 646s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 646s ***** error ncfrnd () 646s ***** error ncfrnd (1) 646s ***** error ncfrnd (1, 2) 646s ***** error ... 646s ncfrnd (ones (3), ones (2), ones (2)) 646s ***** error ... 646s ncfrnd (ones (2), ones (3), ones (2)) 646s ***** error ... 646s ncfrnd (ones (2), ones (2), ones (3)) 646s ***** error ncfrnd (i, 2, 3) 646s ***** error ncfrnd (1, i, 3) 646s ***** error ncfrnd (1, 2, i) 646s ***** error ... 646s ncfrnd (1, 2, 3, -1) 646s ***** error ... 646s ncfrnd (1, 2, 3, 1.2) 646s ***** error ... 646s ncfrnd (1, 2, 3, ones (2)) 646s ***** error ... 646s ncfrnd (1, 2, 3, [2 -1 2]) 646s ***** error ... 646s ncfrnd (1, 2, 3, [2 0 2.5]) 646s ***** error ... 646s ncfrnd (1, 2, 3, 2, -1, 5) 646s ***** error ... 646s ncfrnd (1, 2, 3, 2, 1.5, 5) 646s ***** error ... 646s ncfrnd (2, ones (2), 2, 3) 646s ***** error ... 646s ncfrnd (2, ones (2), 2, [3, 2]) 646s ***** error ... 646s ncfrnd (2, ones (2), 2, 3, 2) 646s 38 tests, 38 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/mvtpdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvtpdf.m 646s ***** demo 646s ## Compute the pdf of a multivariate t distribution with correlation 646s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 646s 646s rho = [1, 0.4; 0.4, 1]; 646s df = 2; 646s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 646s X = [X1(:), X2(:)]; 646s y = mvtpdf (X, rho, df); 646s surf (X1, X2, reshape (y, 25, 25)); 646s title ("Bivariate Student's t probability density function"); 646s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 646s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 646s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 646s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 646s [0.04713313 0.03722421 0.02069011]', 1E-7) 646s 3 tests, 3 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/hygernd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hygernd.m 646s ***** assert (size (hygernd (4,2,2)), [1, 1]) 646s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 646s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 646s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 646s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 646s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 646s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 646s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 646s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 646s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 646s ***** assert (class (hygernd (4,2,2)), "double") 646s ***** assert (class (hygernd (single (4),2,2)), "single") 646s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 646s ***** assert (class (hygernd (4,single (2),2)), "single") 646s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 646s ***** assert (class (hygernd (4,2,single (2))), "single") 646s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 646s ***** error hygernd () 646s ***** error hygernd (1) 646s ***** error hygernd (1, 2) 646s ***** error ... 646s hygernd (ones (3), ones (2), ones (2)) 646s ***** error ... 646s hygernd (ones (2), ones (3), ones (2)) 646s ***** error ... 646s hygernd (ones (2), ones (2), ones (3)) 646s ***** error hygernd (i, 2, 3) 646s ***** error hygernd (1, i, 3) 646s ***** error hygernd (1, 2, i) 646s ***** error ... 646s hygernd (1, 2, 3, -1) 646s ***** error ... 646s hygernd (1, 2, 3, 1.2) 646s ***** error ... 646s hygernd (1, 2, 3, ones (2)) 646s ***** error ... 646s hygernd (1, 2, 3, [2 -1 2]) 646s ***** error ... 646s hygernd (1, 2, 3, [2 0 2.5]) 646s ***** error ... 646s hygernd (1, 2, 3, 2, -1, 5) 646s ***** error ... 646s hygernd (1, 2, 3, 2, 1.5, 5) 646s ***** error ... 646s hygernd (2, ones (2), 2, 3) 646s ***** error ... 646s hygernd (2, ones (2), 2, [3, 2]) 646s ***** error ... 646s hygernd (2, ones (2), 2, 3, 2) 646s 36 tests, 36 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/hnrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hnrnd.m 646s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 646s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 646s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 646s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 646s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 646s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 646s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 646s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 646s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 646s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 646s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 646s ***** test 646s r = hnrnd (1, [1, 0, -1]); 646s assert (r([2:3]), [NaN, NaN]) 646s ***** assert (class (hnrnd (1, 0)), "double") 646s ***** assert (class (hnrnd (1, single (0))), "single") 646s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 646s ***** assert (class (hnrnd (1, single (1))), "single") 646s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 646s ***** assert (class (hnrnd (single (1), 1)), "single") 646s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 646s ***** error hnrnd () 646s ***** error hnrnd (1) 646s ***** error ... 646s hnrnd (ones (3), ones (2)) 646s ***** error ... 646s hnrnd (ones (2), ones (3)) 646s ***** error hnrnd (i, 2, 3) 646s ***** error hnrnd (1, i, 3) 646s ***** error ... 646s hnrnd (1, 2, -1) 646s ***** error ... 646s hnrnd (1, 2, 1.2) 646s ***** error ... 646s hnrnd (1, 2, ones (2)) 646s ***** error ... 646s hnrnd (1, 2, [2 -1 2]) 646s ***** error ... 646s hnrnd (1, 2, [2 0 2.5]) 646s ***** error ... 646s hnrnd (1, 2, 2, -1, 5) 646s ***** error ... 646s hnrnd (1, 2, 2, 1.5, 5) 646s ***** error ... 646s hnrnd (2, ones (2), 3) 646s ***** error ... 646s hnrnd (2, ones (2), [3, 2]) 646s ***** error ... 646s hnrnd (2, ones (2), 3, 2) 646s 35 tests, 35 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/gumbelinv.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gumbelinv.m 646s ***** demo 646s ## Plot various iCDFs from the Gumbel distribution 646s p = 0.001:0.001:0.999; 646s x1 = gumbelinv (p, 0.5, 2); 646s x2 = gumbelinv (p, 1.0, 2); 646s x3 = gumbelinv (p, 1.5, 3); 646s x4 = gumbelinv (p, 3.0, 4); 646s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 646s grid on 646s ylim ([-5, 20]) 646s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 646s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 646s title ("Gumbel iCDF") 646s xlabel ("probability") 646s ylabel ("values in x") 646s ***** shared p, x 646s p = [0, 0.05, 0.5 0.95]; 646s x = [-Inf, -1.0972, 0.3665, 2.9702]; 646s ***** assert (gumbelinv (p), x, 1e-4) 646s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 646s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 646s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 646s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 646s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 646s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 646s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 646s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 646s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 646s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 646s p = [0.05, 0.5, 0.95]; 646s x = gumbelinv(p); 646s ***** assert (gumbelcdf(x), p, 1e-4) 646s ***** error gumbelinv () 646s ***** error gumbelinv (1,2,3,4,5,6) 646s ***** error ... 646s gumbelinv (ones (3), ones (2), ones (2)) 646s ***** error ... 646s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 646s ***** error ... 646s [p, plo, pup] = gumbelinv (1, 2, 3) 646s ***** error [p, plo, pup] = ... 646s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 646s ***** error [p, plo, pup] = ... 646s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 646s ***** error gumbelinv (i, 2, 2) 646s ***** error gumbelinv (2, i, 2) 646s ***** error gumbelinv (2, 2, i) 646s ***** error ... 646s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 646s 23 tests, 23 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/betapdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/betapdf.m 646s ***** demo 646s ## Plot various PDFs from the Beta distribution 646s x = 0.001:0.001:0.999; 646s y1 = betapdf (x, 0.5, 0.5); 646s y2 = betapdf (x, 5, 1); 646s y3 = betapdf (x, 1, 3); 646s y4 = betapdf (x, 2, 2); 646s y5 = betapdf (x, 2, 5); 646s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 646s grid on 646s ylim ([0, 2.5]) 646s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 646s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 646s title ("Beta PDF") 646s xlabel ("values in x") 646s ylabel ("density") 646s ***** shared x, y 646s x = [-1 0 0.5 1 2]; 646s y = [0 2 1 0 0]; 646s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 646s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 646s ***** assert (betapdf (x, ones (1, 5), 2), y) 646s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 646s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 646s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 646s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 646s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 646s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 646s ***** test 646s x = rand (10,1); 646s y = 1 ./ (pi * sqrt (x .* (1 - x))); 646s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 646s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 646s ***** error betapdf () 646s ***** error betapdf (1) 646s ***** error betapdf (1,2) 646s ***** error betapdf (1,2,3,4) 646s ***** error ... 646s betapdf (ones (3), ones (2), ones (2)) 646s ***** error ... 646s betapdf (ones (2), ones (3), ones (2)) 646s ***** error ... 646s betapdf (ones (2), ones (2), ones (3)) 646s ***** error betapdf (i, 2, 2) 646s ***** error betapdf (2, i, 2) 646s ***** error betapdf (2, 2, i) 646s 21 tests, 21 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/gprnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gprnd.m 646s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 646s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 646s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 646s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 646s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 646s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 646s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 646s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 646s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 646s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 646s ***** assert (size (gprnd (1,1,0)), [1, 1]) 646s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 646s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 646s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 646s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 646s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 646s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 646s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 646s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 646s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 646s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 646s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 646s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 646s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 646s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 646s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 646s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 646s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 646s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 646s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 646s ***** assert (class (gprnd (0, 1, 0)), "double") 646s ***** assert (class (gprnd (0, 1, single (0))), "single") 646s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 646s ***** assert (class (gprnd (0, single (1),0)), "single") 646s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 646s ***** assert (class (gprnd (single (0), 1, 0)), "single") 646s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 646s ***** error gprnd () 646s ***** error gprnd (1) 646s ***** error gprnd (1, 2) 646s ***** error ... 646s gprnd (ones (3), ones (2), ones (2)) 646s ***** error ... 646s gprnd (ones (2), ones (3), ones (2)) 646s ***** error ... 646s gprnd (ones (2), ones (2), ones (3)) 646s ***** error gprnd (i, 2, 3) 646s ***** error gprnd (1, i, 3) 646s ***** error gprnd (1, 2, i) 646s ***** error ... 646s gprnd (1, 2, 3, -1) 646s ***** error ... 646s gprnd (1, 2, 3, 1.2) 646s ***** error ... 646s gprnd (1, 2, 3, ones (2)) 646s ***** error ... 646s gprnd (1, 2, 3, [2 -1 2]) 646s ***** error ... 646s gprnd (1, 2, 3, [2 0 2.5]) 646s ***** error ... 646s gprnd (1, 2, 3, 2, -1, 5) 646s ***** error ... 646s gprnd (1, 2, 3, 2, 1.5, 5) 646s ***** error ... 646s gprnd (2, ones (2), 2, 3) 646s ***** error ... 646s gprnd (2, ones (2), 2, [3, 2]) 646s ***** error ... 646s gprnd (2, ones (2), 2, 3, 2) 646s 56 tests, 56 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/loglcdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/loglcdf.m 646s ***** demo 646s ## Plot various CDFs from the log-logistic distribution 646s x = 0:0.001:2; 646s p1 = loglcdf (x, log (1), 1/0.5); 646s p2 = loglcdf (x, log (1), 1); 646s p3 = loglcdf (x, log (1), 1/2); 646s p4 = loglcdf (x, log (1), 1/4); 646s p5 = loglcdf (x, log (1), 1/8); 646s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 646s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 646s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 646s grid on 646s title ("Log-logistic CDF") 646s xlabel ("values in x") 646s ylabel ("probability") 646s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 646s ***** shared out1, out2 646s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 646s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 646s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 646s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 646s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 646s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 646s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 646s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 646s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 646s ***** assert (class (loglcdf (1, single (2), 3)), "single") 646s ***** assert (class (loglcdf (1, 2, single (3))), "single") 646s ***** error loglcdf (1) 646s ***** error loglcdf (1, 2) 646s ***** error ... 646s loglcdf (1, 2, 3, 4) 646s ***** error ... 646s loglcdf (1, 2, 3, "uper") 646s ***** error ... 646s loglcdf (1, ones (2), ones (3)) 646s ***** error ... 646s loglcdf (1, ones (2), ones (3), "upper") 646s ***** error ... 646s loglcdf (ones (2), 1, ones (3)) 646s ***** error ... 646s loglcdf (ones (2), 1, ones (3), "upper") 646s ***** error ... 646s loglcdf (ones (2), ones (3), 1) 646s ***** error ... 646s loglcdf (ones (2), ones (3), 1, "upper") 646s ***** error loglcdf (i, 2, 3) 646s ***** error loglcdf (i, 2, 3, "upper") 646s ***** error loglcdf (1, i, 3) 646s ***** error loglcdf (1, i, 3, "upper") 646s ***** error loglcdf (1, 2, i) 646s ***** error loglcdf (1, 2, i, "upper") 646s 25 tests, 25 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/gpcdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gpcdf.m 646s ***** demo 646s ## Plot various CDFs from the generalized Pareto distribution 646s x = 0:0.001:5; 646s p1 = gpcdf (x, 1, 1, 0); 646s p2 = gpcdf (x, 5, 1, 0); 646s p3 = gpcdf (x, 20, 1, 0); 646s p4 = gpcdf (x, 1, 2, 0); 646s p5 = gpcdf (x, 5, 2, 0); 646s p6 = gpcdf (x, 20, 2, 0); 646s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 646s x, p4, "-c", x, p5, "-m", x, p6, "-k") 646s grid on 646s xlim ([0, 5]) 646s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 646s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 646s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 646s "location", "northwest") 646s title ("Generalized Pareto CDF") 646s xlabel ("values in x") 646s ylabel ("probability") 646s ***** shared x, y1, y1u, y2, y2u, y3, y3u 646s x = [-Inf, -1, 0, 1/2, 1, Inf]; 646s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 646s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 646s y2 = [0, 0, 0, 1/3, 1/2, 1]; 646s y2u = [1, 1, 1, 2/3, 1/2, 0]; 646s y3 = [0, 0, 0, 1/2, 1, 1]; 646s y3u = [1, 1, 1, 1/2, 0, 0]; 646s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 646s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 646s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 646s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 646s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 646s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 646s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 646s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 646s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 646s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 646s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 646s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 646s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 646s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 646s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 646s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 646s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 646s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 646s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 646s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 646s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 646s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 646s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 646s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 646s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 646s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 646s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 646s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 646s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 646s [y2u(1:3), NaN, y2u(5:6)], eps) 646s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 646s [y2u(1:3), NaN, y2u(5:6)], eps) 646s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 646s [y2u(1:3), NaN, y2u(5:6)], eps) 646s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 646s [y2u(1:3), NaN, y2u(5:6)], eps) 646s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 646s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 646s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 646s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 646s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 646s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 646s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 646s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 646s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 646s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 646s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 646s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 646s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 646s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 646s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 646s [y3u(1:3), NaN, y3u(5:6)], eps) 646s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 646s [y3u(1:3), NaN, y3u(5:6)], eps) 646s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 646s [y3u(1:3), NaN, y3u(5:6)], eps) 646s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 646s [y3u(1:3), NaN, y3u(5:6)], eps) 646s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 646s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 646s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 646s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 646s ***** error gpcdf () 646s ***** error gpcdf (1) 646s ***** error gpcdf (1, 2) 646s ***** error gpcdf (1, 2, 3) 646s ***** error gpcdf (1, 2, 3, 4, "tail") 646s ***** error gpcdf (1, 2, 3, 4, 5) 646s ***** error ... 646s gpcdf (ones (3), ones (2), ones(2), ones(2)) 646s ***** error ... 646s gpcdf (ones (2), ones (3), ones(2), ones(2)) 646s ***** error ... 646s gpcdf (ones (2), ones (2), ones(3), ones(2)) 646s ***** error ... 646s gpcdf (ones (2), ones (2), ones(2), ones(3)) 646s ***** error gpcdf (i, 2, 3, 4) 646s ***** error gpcdf (1, i, 3, 4) 646s ***** error gpcdf (1, 2, i, 4) 646s ***** error gpcdf (1, 2, 3, i) 646s 76 tests, 76 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/tripdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tripdf.m 646s ***** demo 646s ## Plot various CDFs from the triangular distribution 646s x = 0.001:0.001:10; 646s y1 = tripdf (x, 3, 4, 6); 646s y2 = tripdf (x, 1, 2, 5); 646s y3 = tripdf (x, 2, 3, 9); 646s y4 = tripdf (x, 2, 5, 9); 646s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 646s grid on 646s xlim ([0, 10]) 646s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 646s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 646s "location", "northeast") 646s title ("Triangular CDF") 646s xlabel ("values in x") 646s ylabel ("probability") 646s ***** shared x, y, deps 646s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 646s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 646s deps = 2*eps; 646s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 646s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 646s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 646s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 646s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 646s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 646s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 646s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 646s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 646s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 646s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 646s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 646s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 646s ***** error tripdf () 646s ***** error tripdf (1) 646s ***** error tripdf (1, 2) 646s ***** error tripdf (1, 2, 3) 646s ***** error ... 646s tripdf (1, 2, 3, 4, 5) 646s ***** error ... 646s tripdf (ones (3), ones (2), ones(2), ones(2)) 646s ***** error ... 646s tripdf (ones (2), ones (3), ones(2), ones(2)) 646s ***** error ... 646s tripdf (ones (2), ones (2), ones(3), ones(2)) 646s ***** error ... 646s tripdf (ones (2), ones (2), ones(2), ones(3)) 646s ***** error tripdf (i, 2, 3, 4) 646s ***** error tripdf (1, i, 3, 4) 646s ***** error tripdf (1, 2, i, 4) 646s ***** error tripdf (1, 2, 3, i) 646s 26 tests, 26 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/hygepdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hygepdf.m 646s ***** demo 646s ## Plot various PDFs from the hypergeometric distribution 646s x = 0:60; 646s y1 = hygepdf (x, 500, 50, 100); 646s y2 = hygepdf (x, 500, 60, 200); 646s y3 = hygepdf (x, 500, 70, 300); 646s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 646s grid on 646s xlim ([0, 60]) 646s ylim ([0, 0.18]) 646s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 646s "m = 500, k = 70, μ = 300"}, "location", "northeast") 646s title ("Hypergeometric PDF") 646s xlabel ("values in x (number of successes)") 646s ylabel ("density") 646s ***** shared x, y 646s x = [-1 0 1 2 3]; 646s y = [0 1/6 4/6 1/6 0]; 646s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 646s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 646s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 646s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 646s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 646s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 646s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 646s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 646s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 646s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 646s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 646s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 646s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 646s ***** test 646s z = zeros(3,5); 646s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 646s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 646s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 646s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 646s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 646s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 646s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 646s ***** error hygepdf () 646s ***** error hygepdf (1) 646s ***** error hygepdf (1,2) 646s ***** error hygepdf (1,2,3) 646s ***** error ... 646s hygepdf (1, ones (3), ones (2), ones (2)) 646s ***** error ... 646s hygepdf (1, ones (2), ones (3), ones (2)) 646s ***** error ... 646s hygepdf (1, ones (2), ones (2), ones (3)) 646s ***** error hygepdf (i, 2, 2, 2) 646s ***** error hygepdf (2, i, 2, 2) 646s ***** error hygepdf (2, 2, i, 2) 646s ***** error hygepdf (2, 2, 2, i) 646s 25 tests, 25 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/burrrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/burrrnd.m 646s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 646s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 646s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 646s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 646s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 646s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 646s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 646s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 646s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 646s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 646s ***** assert (class (burrrnd (1,1,1)), "double") 646s ***** assert (class (burrrnd (single (1),1,1)), "single") 646s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 646s ***** assert (class (burrrnd (1,single (1),1)), "single") 646s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 646s ***** assert (class (burrrnd (1,1,single (1))), "single") 646s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 646s ***** error burrrnd () 646s ***** error burrrnd (1) 646s ***** error burrrnd (1, 2) 646s ***** error ... 646s burrrnd (ones (3), ones (2), ones (2)) 646s ***** error ... 646s burrrnd (ones (2), ones (3), ones (2)) 646s ***** error ... 646s burrrnd (ones (2), ones (2), ones (3)) 646s ***** error burrrnd (i, 2, 3) 646s ***** error burrrnd (1, i, 3) 646s ***** error burrrnd (1, 2, i) 646s ***** error ... 646s burrrnd (1, 2, 3, -1) 646s ***** error ... 646s burrrnd (1, 2, 3, 1.2) 646s ***** error ... 646s burrrnd (1, 2, 3, ones (2)) 646s ***** error ... 646s burrrnd (1, 2, 3, [2 -1 2]) 646s ***** error ... 646s burrrnd (1, 2, 3, [2 0 2.5]) 646s ***** error ... 646s burrrnd (1, 2, 3, 2, -1, 5) 646s ***** error ... 646s burrrnd (1, 2, 3, 2, 1.5, 5) 646s ***** error ... 646s burrrnd (2, ones (2), 2, 3) 646s ***** error ... 646s burrrnd (2, ones (2), 2, [3, 2]) 646s ***** error ... 646s burrrnd (2, ones (2), 2, 3, 2) 646s 36 tests, 36 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/loglinv.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/loglinv.m 646s ***** demo 646s ## Plot various iCDFs from the log-logistic distribution 646s p = 0.001:0.001:0.999; 646s x1 = loglinv (p, log (1), 1/0.5); 646s x2 = loglinv (p, log (1), 1); 646s x3 = loglinv (p, log (1), 1/2); 646s x4 = loglinv (p, log (1), 1/4); 646s x5 = loglinv (p, log (1), 1/8); 646s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 646s ylim ([0, 20]) 646s grid on 646s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 646s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 646s title ("Log-logistic iCDF") 646s xlabel ("probability") 646s ylabel ("x") 646s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 646s ***** shared p, out1, out2 646s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 646s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 646s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 646s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 646s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 646s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 646s ***** assert (class (loglinv (single (1), 2, 3)), "single") 646s ***** assert (class (loglinv (1, single (2), 3)), "single") 646s ***** assert (class (loglinv (1, 2, single (3))), "single") 646s ***** error loglinv (1) 646s ***** error loglinv (1, 2) 646s ***** error ... 646s loglinv (1, ones (2), ones (3)) 646s ***** error ... 646s loglinv (ones (2), 1, ones (3)) 646s ***** error ... 646s loglinv (ones (2), ones (3), 1) 646s ***** error loglinv (i, 2, 3) 646s ***** error loglinv (1, i, 3) 646s ***** error loglinv (1, 2, i) 646s 14 tests, 14 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/hnpdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/hnpdf.m 646s ***** demo 646s ## Plot various PDFs from the half-normal distribution 646s x = 0:0.001:10; 646s y1 = hnpdf (x, 0, 1); 646s y2 = hnpdf (x, 0, 2); 646s y3 = hnpdf (x, 0, 3); 646s y4 = hnpdf (x, 0, 5); 646s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 646s grid on 646s xlim ([0, 10]) 646s ylim ([0, 0.9]) 646s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 646s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 646s title ("Half-normal PDF") 646s xlabel ("values in x") 646s ylabel ("density") 646s ***** demo 646s ## Plot half-normal against normal probability density function 646s x = -5:0.001:5; 646s y1 = hnpdf (x, 0, 1); 646s y2 = normpdf (x); 646s plot (x, y1, "-b", x, y2, "-g") 646s grid on 646s xlim ([-5, 5]) 646s ylim ([0, 0.9]) 646s legend ({"half-normal with μ = 0, σ = 1", ... 646s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 646s title ("Half-normal against standard normal PDF") 646s xlabel ("values in x") 646s ylabel ("density") 646s ***** shared x, y 646s x = [-Inf, -1, 0, 1/2, 1, Inf]; 646s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 646s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 646s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 646s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 646s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 646s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 646s ***** error hnpdf () 646s ***** error hnpdf (1) 646s ***** error hnpdf (1, 2) 646s ***** error ... 646s hnpdf (1, ones (2), ones (3)) 646s ***** error ... 646s hnpdf (ones (2), 1, ones (3)) 646s ***** error ... 646s hnpdf (ones (2), ones (3), 1) 646s ***** error hnpdf (i, 2, 3) 646s ***** error hnpdf (1, i, 3) 646s ***** error hnpdf (1, 2, i) 646s 14 tests, 14 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/poisspdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/poisspdf.m 646s ***** demo 646s ## Plot various PDFs from the Poisson distribution 646s x = 0:20; 646s y1 = poisspdf (x, 1); 646s y2 = poisspdf (x, 4); 646s y3 = poisspdf (x, 10); 646s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 646s grid on 646s ylim ([0, 0.4]) 646s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 646s title ("Poisson PDF") 646s xlabel ("values in x (number of occurences)") 646s ylabel ("density") 646s ***** shared x, y 646s x = [-1 0 1 2 Inf]; 646s y = [0, exp(-1)*[1 1 0.5], 0]; 646s ***** assert (poisspdf (x, ones (1,5)), y, eps) 646s ***** assert (poisspdf (x, 1), y, eps) 646s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 646s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 646s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 646s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 646s ***** error poisspdf () 646s ***** error poisspdf (1) 646s ***** error ... 646s poisspdf (ones (3), ones (2)) 646s ***** error ... 646s poisspdf (ones (2), ones (3)) 646s ***** error poisspdf (i, 2) 646s ***** error poisspdf (2, i) 646s 12 tests, 12 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/mnrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mnrnd.m 646s ***** test 646s n = 10; 646s pk = [0.2, 0.5, 0.3]; 646s r = mnrnd (n, pk); 646s assert (size (r), size (pk)); 646s assert (all (r >= 0)); 646s assert (all (round (r) == r)); 646s assert (sum (r) == n); 646s ***** test 646s n = 10 * ones (3, 1); 646s pk = [0.2, 0.5, 0.3]; 646s r = mnrnd (n, pk); 646s assert (size (r), [length(n), length(pk)]); 646s assert (all (r >= 0)); 646s assert (all (round (r) == r)); 646s assert (all (sum (r, 2) == n)); 646s ***** test 646s n = (1:2)'; 646s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 646s r = mnrnd (n, pk); 646s assert (size (r), size (pk)); 646s assert (all (r >= 0)); 646s assert (all (round (r) == r)); 646s assert (all (sum (r, 2) == n)); 646s 3 tests, 3 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/gevpdf.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gevpdf.m 646s ***** demo 646s ## Plot various PDFs from the generalized extreme value distribution 646s x = -1:0.001:10; 646s y1 = gevpdf (x, 1, 1, 1); 646s y2 = gevpdf (x, 0.5, 1, 1); 646s y3 = gevpdf (x, 1, 1, 5); 646s y4 = gevpdf (x, 1, 2, 5); 646s y5 = gevpdf (x, 1, 5, 5); 646s y6 = gevpdf (x, 1, 0.5, 5); 646s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 646s x, y4, "-c", x, y5, "-m", x, y6, "-k") 646s grid on 646s xlim ([-1, 10]) 646s ylim ([0, 1.1]) 646s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 646s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 646s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 646s "location", "northeast") 646s title ("Generalized extreme value PDF") 646s xlabel ("values in x") 646s ylabel ("density") 646s ***** test 646s x = 0:0.5:2.5; 646s sigma = 1:6; 646s k = 1; 646s mu = 0; 646s y = gevpdf (x, k, sigma, mu); 646s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 646s assert (y, expected_y, 0.001); 646s ***** test 646s x = -0.5:0.5:2.5; 646s sigma = 0.5; 646s k = 1; 646s mu = 0; 646s y = gevpdf (x, k, sigma, mu); 646s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 646s assert (y, expected_y, 0.001); 646s ***** test # check for continuity for k near 0 646s x = 1; 646s sigma = 0.5; 646s k = -0.03:0.01:0.03; 646s mu = 0; 646s y = gevpdf (x, k, sigma, mu); 646s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 646s assert (y, expected_y, 0.001); 646s ***** error gevpdf () 646s ***** error gevpdf (1) 646s ***** error gevpdf (1, 2) 646s ***** error gevpdf (1, 2, 3) 646s ***** error ... 646s gevpdf (ones (3), ones (2), ones(2), ones(2)) 646s ***** error ... 646s gevpdf (ones (2), ones (3), ones(2), ones(2)) 646s ***** error ... 646s gevpdf (ones (2), ones (2), ones(3), ones(2)) 646s ***** error ... 646s gevpdf (ones (2), ones (2), ones(2), ones(3)) 646s ***** error gevpdf (i, 2, 3, 4) 646s ***** error gevpdf (1, i, 3, 4) 646s ***** error gevpdf (1, 2, i, 4) 646s ***** error gevpdf (1, 2, 3, i) 646s 15 tests, 15 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/normrnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/normrnd.m 646s ***** assert (size (normrnd (1, 1)), [1 1]) 646s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 646s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 646s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 646s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 646s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 646s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 646s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 646s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 646s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 646s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 646s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 646s ***** assert (class (normrnd (1, 1)), "double") 646s ***** assert (class (normrnd (1, single (1))), "single") 646s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 646s ***** assert (class (normrnd (single (1), 1)), "single") 646s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 646s ***** error normrnd () 646s ***** error normrnd (1) 646s ***** error ... 646s normrnd (ones (3), ones (2)) 646s ***** error ... 646s normrnd (ones (2), ones (3)) 646s ***** error normrnd (i, 2, 3) 646s ***** error normrnd (1, i, 3) 646s ***** error ... 646s normrnd (1, 2, -1) 646s ***** error ... 646s normrnd (1, 2, 1.2) 646s ***** error ... 646s normrnd (1, 2, ones (2)) 646s ***** error ... 646s normrnd (1, 2, [2 -1 2]) 646s ***** error ... 646s normrnd (1, 2, [2 0 2.5]) 646s ***** error ... 646s normrnd (1, 2, 2, -1, 5) 646s ***** error ... 646s normrnd (1, 2, 2, 1.5, 5) 646s ***** error ... 646s normrnd (2, ones (2), 3) 646s ***** error ... 646s normrnd (2, ones (2), [3, 2]) 646s ***** error ... 646s normrnd (2, ones (2), 3, 2) 646s 33 tests, 33 passed, 0 known failure, 0 skipped 646s [inst/dist_fun/ncx2rnd.m] 646s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncx2rnd.m 646s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 646s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 646s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 646s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 646s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 646s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 646s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 646s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 646s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 646s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 647s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 647s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 647s ***** assert (class (ncx2rnd (1, 1)), "double") 647s ***** assert (class (ncx2rnd (1, single (1))), "single") 647s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 647s ***** assert (class (ncx2rnd (single (1), 1)), "single") 647s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 647s ***** error ncx2rnd () 647s ***** error ncx2rnd (1) 647s ***** error ... 647s ncx2rnd (ones (3), ones (2)) 647s ***** error ... 647s ncx2rnd (ones (2), ones (3)) 647s ***** error ncx2rnd (i, 2) 647s ***** error ncx2rnd (1, i) 647s ***** error ... 647s ncx2rnd (1, 2, -1) 647s ***** error ... 647s ncx2rnd (1, 2, 1.2) 647s ***** error ... 647s ncx2rnd (1, 2, ones (2)) 647s ***** error ... 647s ncx2rnd (1, 2, [2 -1 2]) 647s ***** error ... 647s ncx2rnd (1, 2, [2 0 2.5]) 647s ***** error ... 647s ncx2rnd (1, 2, 2, -1, 5) 647s ***** error ... 647s ncx2rnd (1, 2, 2, 1.5, 5) 647s ***** error ... 647s ncx2rnd (2, ones (2), 3) 647s ***** error ... 647s ncx2rnd (2, ones (2), [3, 2]) 647s ***** error ... 647s ncx2rnd (2, ones (2), 3, 2) 647s 33 tests, 33 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/logncdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logncdf.m 647s ***** demo 647s ## Plot various CDFs from the log-normal distribution 647s x = 0:0.01:3; 647s p1 = logncdf (x, 0, 1); 647s p2 = logncdf (x, 0, 0.5); 647s p3 = logncdf (x, 0, 0.25); 647s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 647s grid on 647s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 647s "location", "southeast") 647s title ("Log-normal CDF") 647s xlabel ("values in x") 647s ylabel ("probability") 647s ***** shared x, y 647s x = [-1, 0, 1, e, Inf]; 647s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 647s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 647s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 647s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 647s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 647s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 647s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 647s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 647s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 647s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 647s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 647s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 647s ***** error logncdf () 647s ***** error logncdf (1,2,3,4,5,6,7) 647s ***** error logncdf (1, 2, 3, 4, "uper") 647s ***** error ... 647s logncdf (ones (3), ones (2), ones (2)) 647s ***** error logncdf (2, 3, 4, [1, 2]) 647s ***** error ... 647s [p, plo, pup] = logncdf (1, 2, 3) 647s ***** error [p, plo, pup] = ... 647s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 647s ***** error [p, plo, pup] = ... 647s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 647s ***** error [p, plo, pup] = ... 647s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 647s ***** error logncdf (i, 2, 2) 647s ***** error logncdf (2, i, 2) 647s ***** error logncdf (2, 2, i) 647s ***** error ... 647s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 647s 24 tests, 24 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/binocdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/binocdf.m 647s ***** demo 647s ## Plot various CDFs from the binomial distribution 647s x = 0:40; 647s p1 = binocdf (x, 20, 0.5); 647s p2 = binocdf (x, 20, 0.7); 647s p3 = binocdf (x, 40, 0.5); 647s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 647s grid on 647s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 647s "n = 40, ps = 0.5"}, "location", "southeast") 647s title ("Binomial CDF") 647s xlabel ("values in x (number of successes)") 647s ylabel ("probability") 647s ***** shared x, p, p1 647s x = [-1 0 1 2 3]; 647s p = [0 1/4 3/4 1 1]; 647s p1 = 1 - p; 647s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 647s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 647s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 647s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 647s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 647s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 647s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 647s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 647s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 647s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 647s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 647s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 647s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 647s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 647s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 647s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 647s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 647s ***** error binocdf () 647s ***** error binocdf (1) 647s ***** error binocdf (1, 2) 647s ***** error binocdf (1, 2, 3, 4, 5) 647s ***** error binocdf (1, 2, 3, "tail") 647s ***** error binocdf (1, 2, 3, 4) 647s ***** error ... 647s binocdf (ones (3), ones (2), ones (2)) 647s ***** error ... 647s binocdf (ones (2), ones (3), ones (2)) 647s ***** error ... 647s binocdf (ones (2), ones (2), ones (3)) 647s ***** error binocdf (i, 2, 2) 647s ***** error binocdf (2, i, 2) 647s ***** error binocdf (2, 2, i) 647s 29 tests, 29 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/cauchyinv.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/cauchyinv.m 647s ***** demo 647s ## Plot various iCDFs from the Cauchy distribution 647s p = 0.001:0.001:0.999; 647s x1 = cauchyinv (p, 0, 0.5); 647s x2 = cauchyinv (p, 0, 1); 647s x3 = cauchyinv (p, 0, 2); 647s x4 = cauchyinv (p, -2, 1); 647s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 647s grid on 647s ylim ([-5, 5]) 647s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 647s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 647s title ("Cauchy iCDF") 647s xlabel ("probability") 647s ylabel ("values in x") 647s ***** shared p 647s p = [-1 0 0.5 1 2]; 647s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 647s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 647s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 647s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 647s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 647s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 647s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 647s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 647s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 647s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 647s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 647s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 647s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 647s ***** error cauchyinv () 647s ***** error cauchyinv (1) 647s ***** error ... 647s cauchyinv (1, 2) 647s ***** error cauchyinv (1, 2, 3, 4) 647s ***** error ... 647s cauchyinv (ones (3), ones (2), ones(2)) 647s ***** error ... 647s cauchyinv (ones (2), ones (3), ones(2)) 647s ***** error ... 647s cauchyinv (ones (2), ones (2), ones(3)) 647s ***** error cauchyinv (i, 4, 3) 647s ***** error cauchyinv (1, i, 3) 647s ***** error cauchyinv (1, 4, i) 647s 20 tests, 20 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/tlscdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tlscdf.m 647s ***** demo 647s ## Plot various CDFs from the location-scale Student's T distribution 647s x = -8:0.01:8; 647s p1 = tlscdf (x, 0, 1, 1); 647s p2 = tlscdf (x, 0, 2, 2); 647s p3 = tlscdf (x, 3, 2, 5); 647s p4 = tlscdf (x, -1, 3, Inf); 647s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 647s grid on 647s xlim ([-8, 8]) 647s ylim ([0, 1]) 647s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 647s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 647s "location", "northwest") 647s title ("Location-scale Student's T CDF") 647s xlabel ("values in x") 647s ylabel ("probability") 647s ***** shared x,y 647s x = [-Inf 0 1 Inf]; 647s y = [0 1/2 3/4 1]; 647s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 647s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 647s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 647s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 647s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 647s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 647s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 647s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 647s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 647s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 647s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 647s ***** error tlscdf () 647s ***** error tlscdf (1) 647s ***** error tlscdf (1, 2) 647s ***** error tlscdf (1, 2, 3) 647s ***** error tlscdf (1, 2, 3, 4, "uper") 647s ***** error tlscdf (1, 2, 3, 4, 5) 647s ***** error ... 647s tlscdf (ones (3), ones (2), 1, 1) 647s ***** error ... 647s tlscdf (ones (3), 1, ones (2), 1) 647s ***** error ... 647s tlscdf (ones (3), 1, 1, ones (2)) 647s ***** error ... 647s tlscdf (ones (3), ones (2), 1, 1, "upper") 647s ***** error ... 647s tlscdf (ones (3), 1, ones (2), 1, "upper") 647s ***** error ... 647s tlscdf (ones (3), 1, 1, ones (2), "upper") 647s ***** error tlscdf (i, 2, 1, 1) 647s ***** error tlscdf (2, i, 1, 1) 647s ***** error tlscdf (2, 1, i, 1) 647s ***** error tlscdf (2, 1, 1, i) 647s 27 tests, 27 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/evcdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/evcdf.m 647s ***** demo 647s ## Plot various CDFs from the extreme value distribution 647s x = -10:0.01:10; 647s p1 = evcdf (x, 0.5, 2); 647s p2 = evcdf (x, 1.0, 2); 647s p3 = evcdf (x, 1.5, 3); 647s p4 = evcdf (x, 3.0, 4); 647s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 647s grid on 647s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 647s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 647s title ("Extreme value CDF") 647s xlabel ("values in x") 647s ylabel ("probability") 647s ***** shared x, y 647s x = [-Inf, 1, 2, Inf]; 647s y = [0, 0.6321, 0.9340, 1]; 647s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 647s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 647s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 647s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 647s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 647s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 647s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 647s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 647s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 647s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 647s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 647s ***** error evcdf () 647s ***** error evcdf (1,2,3,4,5,6,7) 647s ***** error evcdf (1, 2, 3, 4, "uper") 647s ***** error ... 647s evcdf (ones (3), ones (2), ones (2)) 647s ***** error evcdf (2, 3, 4, [1, 2]) 647s ***** error ... 647s [p, plo, pup] = evcdf (1, 2, 3) 647s ***** error [p, plo, pup] = ... 647s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 647s ***** error [p, plo, pup] = ... 647s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 647s ***** error [p, plo, pup] = ... 647s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 647s ***** error evcdf (i, 2, 2) 647s ***** error evcdf (2, i, 2) 647s ***** error evcdf (2, 2, i) 647s ***** error ... 647s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 647s 24 tests, 24 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/wblrnd.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wblrnd.m 647s ***** assert (size (wblrnd (1, 1)), [1 1]) 647s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 647s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 647s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 647s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 647s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 647s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 647s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 647s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 647s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 647s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 647s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 647s ***** assert (class (wblrnd (1, 1)), "double") 647s ***** assert (class (wblrnd (1, single (1))), "single") 647s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 647s ***** assert (class (wblrnd (single (1), 1)), "single") 647s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 647s ***** error wblrnd () 647s ***** error wblrnd (1) 647s ***** error ... 647s wblrnd (ones (3), ones (2)) 647s ***** error ... 647s wblrnd (ones (2), ones (3)) 647s ***** error wblrnd (i, 2, 3) 647s ***** error wblrnd (1, i, 3) 647s ***** error ... 647s wblrnd (1, 2, -1) 647s ***** error ... 647s wblrnd (1, 2, 1.2) 647s ***** error ... 647s wblrnd (1, 2, ones (2)) 647s ***** error ... 647s wblrnd (1, 2, [2 -1 2]) 647s ***** error ... 647s wblrnd (1, 2, [2 0 2.5]) 647s ***** error ... 647s wblrnd (1, 2, 2, -1, 5) 647s ***** error ... 647s wblrnd (1, 2, 2, 1.5, 5) 647s ***** error ... 647s wblrnd (2, ones (2), 3) 647s ***** error ... 647s wblrnd (2, ones (2), [3, 2]) 647s ***** error ... 647s wblrnd (2, ones (2), 3, 2) 647s 33 tests, 33 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/logninv.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logninv.m 647s ***** demo 647s ## Plot various iCDFs from the log-normal distribution 647s p = 0.001:0.001:0.999; 647s x1 = logninv (p, 0, 1); 647s x2 = logninv (p, 0, 0.5); 647s x3 = logninv (p, 0, 0.25); 647s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 647s grid on 647s ylim ([0, 3]) 647s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 647s "location", "northwest") 647s title ("Log-normal iCDF") 647s xlabel ("probability") 647s ylabel ("values in x") 647s ***** shared p 647s p = [-1 0 0.5 1 2]; 647s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 647s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 647s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN], 2*eps) 647s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 647s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 647s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 647s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN], 2*eps) 647s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 647s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 647s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 647s ***** error logninv () 647s ***** error logninv (1,2,3,4) 647s ***** error logninv (ones (3), ones (2), ones (2)) 647s ***** error logninv (ones (2), ones (3), ones (2)) 647s ***** error logninv (ones (2), ones (2), ones (3)) 647s ***** error logninv (i, 2, 2) 647s ***** error logninv (2, i, 2) 647s ***** error logninv (2, 2, i) 647s 18 tests, 18 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/unifrnd.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unifrnd.m 647s ***** assert (size (unifrnd (1, 1)), [1 1]) 647s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 647s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 647s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 647s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 647s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 647s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 647s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 647s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 647s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 647s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 647s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 647s ***** assert (class (unifrnd (1, 1)), "double") 647s ***** assert (class (unifrnd (1, single (1))), "single") 647s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 647s ***** assert (class (unifrnd (single (1), 1)), "single") 647s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 647s ***** error unifrnd () 647s ***** error unifrnd (1) 647s ***** error ... 647s unifrnd (ones (3), ones (2)) 647s ***** error ... 647s unifrnd (ones (2), ones (3)) 647s ***** error unifrnd (i, 2, 3) 647s ***** error unifrnd (1, i, 3) 647s ***** error ... 647s unifrnd (1, 2, -1) 647s ***** error ... 647s unifrnd (1, 2, 1.2) 647s ***** error ... 647s unifrnd (1, 2, ones (2)) 647s ***** error ... 647s unifrnd (1, 2, [2 -1 2]) 647s ***** error ... 647s unifrnd (1, 2, [2 0 2.5]) 647s ***** error ... 647s unifrnd (1, 2, 2, -1, 5) 647s ***** error ... 647s unifrnd (1, 2, 2, 1.5, 5) 647s ***** error ... 647s unifrnd (2, ones (2), 3) 647s ***** error ... 647s unifrnd (2, ones (2), [3, 2]) 647s ***** error ... 647s unifrnd (2, ones (2), 3, 2) 647s 33 tests, 33 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/copularnd.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/copularnd.m 647s ***** test 647s theta = 0.5; 647s r = copularnd ("Gaussian", theta); 647s assert (size (r), [1, 2]); 647s assert (all ((r >= 0) & (r <= 1))); 647s ***** test 647s theta = 0.5; 647s df = 2; 647s r = copularnd ("t", theta, df); 647s assert (size (r), [1, 2]); 647s assert (all ((r >= 0) & (r <= 1))); 647s ***** test 647s theta = 0.5; 647s r = copularnd ("Clayton", theta); 647s assert (size (r), [1, 2]); 647s assert (all ((r >= 0) & (r <= 1))); 647s ***** test 647s theta = 0.5; 647s n = 2; 647s r = copularnd ("Clayton", theta, n); 647s assert (size (r), [n, 2]); 647s assert (all ((r >= 0) & (r <= 1))); 647s ***** test 647s theta = [1; 2]; 647s n = 2; 647s d = 3; 647s r = copularnd ("Clayton", theta, n, d); 647s assert (size (r), [n, d]); 647s assert (all ((r >= 0) & (r <= 1))); 647s 5 tests, 5 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/chi2pdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/chi2pdf.m 647s ***** demo 647s ## Plot various PDFs from the chi-squared distribution 647s x = 0:0.01:8; 647s y1 = chi2pdf (x, 1); 647s y2 = chi2pdf (x, 2); 647s y3 = chi2pdf (x, 3); 647s y4 = chi2pdf (x, 4); 647s y5 = chi2pdf (x, 6); 647s y6 = chi2pdf (x, 9); 647s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 647s x, y4, "-c", x, y5, "-m", x, y6, "-y") 647s grid on 647s xlim ([0, 8]) 647s ylim ([0, 0.5]) 647s legend ({"df = 1", "df = 2", "df = 3", ... 647s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 647s title ("Chi-squared PDF") 647s xlabel ("values in x") 647s ylabel ("density") 647s ***** shared x, y 647s x = [-1 0 0.5 1 Inf]; 647s y = [0, 1/2 * exp(-x(2:5)/2)]; 647s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 647s ***** assert (chi2pdf (x, 2), y) 647s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 647s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 647s ***** assert (chi2pdf (2, Inf), 0) 647s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 647s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 647s ***** error chi2pdf () 647s ***** error chi2pdf (1) 647s ***** error chi2pdf (1,2,3) 647s ***** error ... 647s chi2pdf (ones (3), ones (2)) 647s ***** error ... 647s chi2pdf (ones (2), ones (3)) 647s ***** error chi2pdf (i, 2) 647s ***** error chi2pdf (2, i) 647s 14 tests, 14 passed, 0 known failure, 0 skipped 647s [inst/dist_fun/wblcdf.m] 647s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wblcdf.m 647s ***** demo 647s ## Plot various CDFs from the Weibull distribution 647s x = 0:0.001:2.5; 647s p1 = wblcdf (x, 1, 0.5); 647s p2 = wblcdf (x, 1, 1); 647s p3 = wblcdf (x, 1, 1.5); 647s p4 = wblcdf (x, 1, 5); 647s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 647s grid on 647s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 647s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 647s title ("Weibull CDF") 647s xlabel ("values in x") 647s ylabel ("probability") 647s ***** shared x, y 647s x = [-1 0 0.5 1 Inf]; 647s y = [0, 1-exp(-x(2:4)), 1]; 647s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 647s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 647s ***** assert (wblcdf (x, "upper"), 1 - y) 647s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 647s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 647s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 647s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 647s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 647s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 647s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 647s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 647s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 647s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 647s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 647s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 647s ***** error wblcdf () 647s ***** error wblcdf (1,2,3,4,5,6,7) 647s ***** error wblcdf (1, 2, 3, 4, "uper") 647s ***** error ... 647s wblcdf (ones (3), ones (2), ones (2)) 647s ***** error wblcdf (2, 3, 4, [1, 2]) 647s ***** error ... 647s [p, plo, pup] = wblcdf (1, 2, 3) 647s ***** error [p, plo, pup] = ... 647s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 647s ***** error [p, plo, pup] = ... 647s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 647s ***** error [p, plo, pup] = ... 647s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 648s ***** error wblcdf (i, 2, 2) 648s ***** error wblcdf (2, i, 2) 648s ***** error wblcdf (2, 2, i) 648s ***** error ... 648s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 648s 28 tests, 28 passed, 0 known failure, 0 skipped 648s [inst/dist_fun/bisapdf.m] 648s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bisapdf.m 648s ***** demo 648s ## Plot various PDFs from the Birnbaum-Saunders distribution 648s x = 0.01:0.01:4; 648s y1 = bisapdf (x, 1, 0.5); 648s y2 = bisapdf (x, 1, 1); 648s y3 = bisapdf (x, 1, 2); 648s y4 = bisapdf (x, 1, 5); 648s y5 = bisapdf (x, 1, 10); 648s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 648s grid on 648s ylim ([0, 1.5]) 648s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 648s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 648s title ("Birnbaum-Saunders PDF") 648s xlabel ("values in x") 648s ylabel ("density") 648s ***** demo 648s ## Plot various PDFs from the Birnbaum-Saunders distribution 648s x = 0.01:0.01:6; 648s y1 = bisapdf (x, 1, 0.3); 648s y2 = bisapdf (x, 2, 0.3); 648s y3 = bisapdf (x, 1, 0.5); 648s y4 = bisapdf (x, 3, 0.5); 648s y5 = bisapdf (x, 5, 0.5); 648s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 648s grid on 648s ylim ([0, 1.5]) 648s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 648s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 648s title ("Birnbaum-Saunders CDF") 648s xlabel ("values in x") 648s ylabel ("density") 648s ***** shared x, y 648s x = [-1, 0, 1, 2, Inf]; 648s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 648s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 648s ***** assert (bisapdf (x, 1, 1), y, eps) 648s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 648s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 648s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 648s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 648s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 648s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 648s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 648s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 648s ***** error bisapdf () 648s ***** error bisapdf (1) 648s ***** error bisapdf (1, 2) 648s ***** error bisapdf (1, 2, 3, 4) 648s ***** error ... 648s bisapdf (ones (3), ones (2), ones(2)) 648s ***** error ... 648s bisapdf (ones (2), ones (3), ones(2)) 648s ***** error ... 648s bisapdf (ones (2), ones (2), ones(3)) 648s ***** error bisapdf (i, 4, 3) 648s ***** error bisapdf (1, i, 3) 648s ***** error bisapdf (1, 4, i) 648s 20 tests, 20 passed, 0 known failure, 0 skipped 648s [inst/dist_fun/cauchypdf.m] 648s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/cauchypdf.m 648s ***** demo 648s ## Plot various PDFs from the Cauchy distribution 648s x = -5:0.01:5; 648s y1 = cauchypdf (x, 0, 0.5); 648s y2 = cauchypdf (x, 0, 1); 648s y3 = cauchypdf (x, 0, 2); 648s y4 = cauchypdf (x, -2, 1); 648s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 648s grid on 648s xlim ([-5, 5]) 648s ylim ([0, 0.7]) 648s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 648s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 648s title ("Cauchy PDF") 648s xlabel ("values in x") 648s ylabel ("density") 648s ***** shared x, y 648s x = [-1 0 0.5 1 2]; 648s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 648s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 648s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 648s ***** assert (cauchypdf (x, ones (1,5), 2), y) 648s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 648s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 648s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 648s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 648s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 648s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 648s ***** test 648s x = rand (10, 1); 648s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 648s ***** error cauchypdf () 648s ***** error cauchypdf (1) 648s ***** error ... 648s cauchypdf (1, 2) 648s ***** error cauchypdf (1, 2, 3, 4) 648s ***** error ... 648s cauchypdf (ones (3), ones (2), ones(2)) 648s ***** error ... 648s cauchypdf (ones (2), ones (3), ones(2)) 648s ***** error ... 648s cauchypdf (ones (2), ones (2), ones(3)) 648s ***** error cauchypdf (i, 4, 3) 648s ***** error cauchypdf (1, i, 3) 648s ***** error cauchypdf (1, 4, i) 648s 20 tests, 20 passed, 0 known failure, 0 skipped 648s [inst/dist_fun/unifinv.m] 648s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unifinv.m 648s ***** demo 648s ## Plot various iCDFs from the continuous uniform distribution 648s p = 0.001:0.001:0.999; 648s x1 = unifinv (p, 2, 5); 648s x2 = unifinv (p, 3, 9); 648s plot (p, x1, "-b", p, x2, "-g") 648s grid on 648s xlim ([0, 1]) 648s ylim ([0, 10]) 648s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 648s title ("Continuous uniform iCDF") 648s xlabel ("probability") 648s ylabel ("values in x") 648s ***** shared p 648s p = [-1 0 0.5 1 2]; 648s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 648s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 648s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 648s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 648s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 648s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 648s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 648s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 648s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 648s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 648s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 648s ***** error unifinv () 648s ***** error unifinv (1, 2) 648s ***** error ... 648s unifinv (ones (3), ones (2), ones (2)) 648s ***** error ... 648s unifinv (ones (2), ones (3), ones (2)) 648s ***** error ... 648s unifinv (ones (2), ones (2), ones (3)) 648s ***** error unifinv (i, 2, 2) 648s ***** error unifinv (2, i, 2) 648s ***** error unifinv (2, 2, i) 648s 19 tests, 19 passed, 0 known failure, 0 skipped 648s [inst/dist_fun/nctinv.m] 648s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nctinv.m 648s ***** demo 648s ## Plot various iCDFs from the noncentral T distribution 648s p = 0.001:0.001:0.999; 648s x1 = nctinv (p, 1, 0); 648s x2 = nctinv (p, 4, 0); 648s x3 = nctinv (p, 1, 2); 648s x4 = nctinv (p, 4, 2); 648s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 648s grid on 648s ylim ([-5, 5]) 648s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 648s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 648s title ("Noncentral T iCDF") 648s xlabel ("probability") 648s ylabel ("values in x") 648s ***** demo 648s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 648s ## with the same number of degrees of freedom (10). 648s 648s p = 0.001:0.001:0.999; 648s x1 = nctinv (p, 10, 1); 648s x2 = tinv (p, 10); 648s plot (p, x1, "-", p, x2, "-"); 648s grid on 648s ylim ([-5, 5]) 648s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 648s title ("Noncentral T vs T quantile functions") 648s xlabel ("probability") 648s ylabel ("values in x") 648s ***** test 648s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 648s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 649s ***** test 649s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 649s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 650s ***** test 650s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 650s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 651s ***** test 651s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 651s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 652s ***** test 652s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 652s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 654s ***** test 654s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 654s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 656s ***** test 656s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 659s ***** error nctinv () 659s ***** error nctinv (1) 659s ***** error nctinv (1, 2) 659s ***** error ... 659s nctinv (ones (3), ones (2), ones (2)) 659s ***** error ... 659s nctinv (ones (2), ones (3), ones (2)) 659s ***** error ... 659s nctinv (ones (2), ones (2), ones (3)) 659s ***** error nctinv (i, 2, 2) 659s ***** error nctinv (2, i, 2) 659s ***** error nctinv (2, 2, i) 659s 16 tests, 16 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/jsupdf.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/jsupdf.m 659s ***** error jsupdf () 659s ***** error jsupdf (1, 2, 3, 4) 659s ***** error ... 659s jsupdf (1, ones (2), ones (3)) 659s 3 tests, 3 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/plinv.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/plinv.m 659s ***** demo 659s ## Plot various iCDFs from the Piecewise linear distribution 659s p = 0.001:0.001:0.999; 659s x1 = [0, 1, 3, 4, 7, 10]; 659s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 659s x2 = [0, 2, 5, 6, 7, 8]; 659s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 659s data1 = plinv (p, x1, Fx1); 659s data2 = plinv (p, x2, Fx2); 659s plot (p, data1, "-b", p, data2, "-g") 659s grid on 659s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 659s title ("Piecewise linear iCDF") 659s xlabel ("probability") 659s ylabel ("values in data") 659s ***** test 659s p = 0:0.2:1; 659s data = plinv (p, [0, 1], [0, 1]); 659s assert (data, p); 659s ***** test 659s p = 0:0.2:1; 659s data = plinv (p, [0, 2], [0, 1]); 659s assert (data, 2 * p); 659s ***** test 659s p = 0:0.2:1; 659s data_out = 1:6; 659s data = plinv (p, [0, 1], [0, 0.5]); 659s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 659s ***** test 659s p = 0:0.2:1; 659s data_out = 1:6; 659s data = plinv (p, [0, 0.5], [0, 1]); 659s assert (data, [0:0.1:0.5]); 659s ***** error plinv () 659s ***** error plinv (1) 659s ***** error plinv (1, 2) 659s ***** error ... 659s plinv (1, [0, 1, 2], [0, 1]) 659s ***** error ... 659s plinv (1, [0], [1]) 659s ***** error ... 659s plinv (1, [0, 1, 2], [0, 1, 1.5]) 659s ***** error ... 659s plinv (1, [0, 1, 2], [0, i, 1]) 659s ***** error ... 659s plinv (i, [0, 1, 2], [0, 0.5, 1]) 659s ***** error ... 659s plinv (1, [0, i, 2], [0, 0.5, 1]) 659s ***** error ... 659s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 659s 14 tests, 14 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/gumbelrnd.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gumbelrnd.m 659s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 659s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 659s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 659s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 659s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 659s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 659s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 659s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 659s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 659s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 659s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 659s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 659s ***** assert (class (gumbelrnd (1, 1)), "double") 659s ***** assert (class (gumbelrnd (1, single (1))), "single") 659s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 659s ***** assert (class (gumbelrnd (single (1), 1)), "single") 659s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 659s ***** error gumbelrnd () 659s ***** error gumbelrnd (1) 659s ***** error ... 659s gumbelrnd (ones (3), ones (2)) 659s ***** error ... 659s gumbelrnd (ones (2), ones (3)) 659s ***** error gumbelrnd (i, 2, 3) 659s ***** error gumbelrnd (1, i, 3) 659s ***** error ... 659s gumbelrnd (1, 2, -1) 659s ***** error ... 659s gumbelrnd (1, 2, 1.2) 659s ***** error ... 659s gumbelrnd (1, 2, ones (2)) 659s ***** error ... 659s gumbelrnd (1, 2, [2 -1 2]) 659s ***** error ... 659s gumbelrnd (1, 2, [2 0 2.5]) 659s ***** error ... 659s gumbelrnd (1, 2, 2, -1, 5) 659s ***** error ... 659s gumbelrnd (1, 2, 2, 1.5, 5) 659s ***** error ... 659s gumbelrnd (2, ones (2), 3) 659s ***** error ... 659s gumbelrnd (2, ones (2), [3, 2]) 659s ***** error ... 659s gumbelrnd (2, ones (2), 3, 2) 659s 33 tests, 33 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/raylcdf.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/raylcdf.m 659s ***** demo 659s ## Plot various CDFs from the Rayleigh distribution 659s x = 0:0.01:10; 659s p1 = raylcdf (x, 0.5); 659s p2 = raylcdf (x, 1); 659s p3 = raylcdf (x, 2); 659s p4 = raylcdf (x, 3); 659s p5 = raylcdf (x, 4); 659s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 659s grid on 659s ylim ([0, 1]) 659s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 659s "σ = 3", "σ = 4"}, "location", "southeast") 659s title ("Rayleigh CDF") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** test 659s x = 0:0.5:2.5; 659s sigma = 1:6; 659s p = raylcdf (x, sigma); 659s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 659s assert (p, expected_p, 0.001); 659s ***** test 659s x = 0:0.5:2.5; 659s p = raylcdf (x, 0.5); 659s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 659s assert (p, expected_p, 0.001); 659s ***** shared x, p 659s x = [-1, 0, 1, 2, Inf]; 659s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 659s ***** assert (raylcdf (x, 1), p, 1e-14) 659s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 659s ***** error raylcdf () 659s ***** error raylcdf (1) 659s ***** error raylcdf (1, 2, "uper") 659s ***** error raylcdf (1, 2, 3) 659s ***** error ... 659s raylcdf (ones (3), ones (2)) 659s ***** error ... 659s raylcdf (ones (2), ones (3)) 659s ***** error raylcdf (i, 2) 659s ***** error raylcdf (2, i) 659s 12 tests, 12 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/ncx2cdf.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncx2cdf.m 659s ***** demo 659s ## Plot various CDFs from the noncentral chi-squared distribution 659s x = 0:0.1:10; 659s p1 = ncx2cdf (x, 2, 1); 659s p2 = ncx2cdf (x, 2, 2); 659s p3 = ncx2cdf (x, 2, 3); 659s p4 = ncx2cdf (x, 4, 1); 659s p5 = ncx2cdf (x, 4, 2); 659s p6 = ncx2cdf (x, 4, 3); 659s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 659s x, p4, "-m", x, p5, "-c", x, p6, "-y") 659s grid on 659s xlim ([0, 10]) 659s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 659s "df = 2, λ = 3", "df = 4, λ = 1", ... 659s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 659s title ("Noncentral chi-squared CDF") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** demo 659s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 659s ## chi-squared CDF with the same number of degrees of freedom (4). 659s 659s x = 0:0.1:10; 659s p1 = ncx2cdf (x, 4, 2); 659s p2 = chi2cdf (x, 4); 659s plot (x, p1, "-", x, p2, "-") 659s grid on 659s xlim ([0, 10]) 659s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 659s title ("Noncentral chi-squared vs chi-squared CDFs") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** test 659s x = -2:0.1:2; 659s p = ncx2cdf (x, 10, 1); 659s assert (p([1:21]), zeros (1, 21), 3e-84); 659s assert (p(22), 1.521400636466575e-09, 1e-14); 659s assert (p(30), 6.665480510026046e-05, 1e-14); 659s assert (p(41), 0.002406447308399836, 1e-14); 659s ***** test 659s p = ncx2cdf (12, 10, 3); 659s assert (p, 0.4845555602398649, 1e-14); 659s ***** test 659s p = ncx2cdf (2, 3, 2); 659s assert (p, 0.2207330870741212, 1e-14); 659s ***** test 659s p = ncx2cdf (2, 3, 2, "upper"); 659s assert (p, 0.7792669129258789, 1e-14); 659s ***** test 659s p = ncx2cdf ([3, 6], 3, 2, "upper"); 659s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 659s ***** error ncx2cdf () 659s ***** error ncx2cdf (1) 659s ***** error ncx2cdf (1, 2) 659s ***** error ncx2cdf (1, 2, 3, "tail") 659s ***** error ncx2cdf (1, 2, 3, 4) 659s ***** error ... 659s ncx2cdf (ones (3), ones (2), ones (2)) 659s ***** error ... 659s ncx2cdf (ones (2), ones (3), ones (2)) 659s ***** error ... 659s ncx2cdf (ones (2), ones (2), ones (3)) 659s ***** error ncx2cdf (i, 2, 2) 659s ***** error ncx2cdf (2, i, 2) 659s ***** error ncx2cdf (2, 2, i) 659s 16 tests, 16 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/raylinv.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/raylinv.m 659s ***** demo 659s ## Plot various iCDFs from the Rayleigh distribution 659s p = 0.001:0.001:0.999; 659s x1 = raylinv (p, 0.5); 659s x2 = raylinv (p, 1); 659s x3 = raylinv (p, 2); 659s x4 = raylinv (p, 3); 659s x5 = raylinv (p, 4); 659s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 659s grid on 659s ylim ([0, 10]) 659s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 659s "σ = 3", "σ = 4"}, "location", "northwest") 659s title ("Rayleigh iCDF") 659s xlabel ("probability") 659s ylabel ("values in x") 659s ***** test 659s p = 0:0.1:0.5; 659s sigma = 1:6; 659s x = raylinv (p, sigma); 659s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 659s assert (x, expected_x, 0.001); 659s ***** test 659s p = 0:0.1:0.5; 659s x = raylinv (p, 0.5); 659s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 659s assert (x, expected_x, 0.001); 659s ***** error raylinv () 659s ***** error raylinv (1) 659s ***** error ... 659s raylinv (ones (3), ones (2)) 659s ***** error ... 659s raylinv (ones (2), ones (3)) 659s ***** error raylinv (i, 2) 659s ***** error raylinv (2, i) 659s 8 tests, 8 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/tcdf.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tcdf.m 659s ***** demo 659s ## Plot various CDFs from the Student's T distribution 659s x = -5:0.01:5; 659s p1 = tcdf (x, 1); 659s p2 = tcdf (x, 2); 659s p3 = tcdf (x, 5); 659s p4 = tcdf (x, Inf); 659s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 659s grid on 659s xlim ([-5, 5]) 659s ylim ([0, 1]) 659s legend ({"df = 1", "df = 2", ... 659s "df = 5", 'df = \infty'}, "location", "southeast") 659s title ("Student's T CDF") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** shared x,y 659s x = [-Inf 0 1 Inf]; 659s y = [0 1/2 3/4 1]; 659s ***** assert (tcdf (x, ones (1,4)), y, eps) 659s ***** assert (tcdf (x, 1), y, eps) 659s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 659s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 659s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 659s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 659s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 659s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 659s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 659s ***** error tcdf () 659s ***** error tcdf (1) 659s ***** error tcdf (1, 2, "uper") 659s ***** error tcdf (1, 2, 3) 659s ***** error ... 659s tcdf (ones (3), ones (2)) 659s ***** error ... 659s tcdf (ones (3), ones (2)) 659s ***** error ... 659s tcdf (ones (3), ones (2), "upper") 659s ***** error tcdf (i, 2) 659s ***** error tcdf (2, i) 659s ***** shared tol_rel 659s tol_rel = 10 * eps; 659s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 659s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 659s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 659s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 659s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 659s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 659s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 659s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 659s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 659s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 659s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 659s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 659s 30 tests, 30 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/laplaceinv.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/laplaceinv.m 659s ***** demo 659s ## Plot various iCDFs from the Laplace distribution 659s p = 0.001:0.001:0.999; 659s x1 = cauchyinv (p, 0, 1); 659s x2 = cauchyinv (p, 0, 2); 659s x3 = cauchyinv (p, 0, 4); 659s x4 = cauchyinv (p, -5, 4); 659s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 659s grid on 659s ylim ([-10, 10]) 659s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 659s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 659s title ("Laplace iCDF") 659s xlabel ("probability") 659s ylabel ("values in x") 659s ***** shared p, x 659s p = [-1 0 0.5 1 2]; 659s x = [NaN, -Inf, 0, Inf, NaN]; 659s ***** assert (laplaceinv (p, 0, 1), x) 659s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 659s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 659s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 659s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 659s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 659s ***** error laplaceinv () 659s ***** error laplaceinv (1) 659s ***** error ... 659s laplaceinv (1, 2) 659s ***** error laplaceinv (1, 2, 3, 4) 659s ***** error ... 659s laplaceinv (1, ones (2), ones (3)) 659s ***** error ... 659s laplaceinv (ones (2), 1, ones (3)) 659s ***** error ... 659s laplaceinv (ones (2), ones (3), 1) 659s ***** error laplaceinv (i, 2, 3) 659s ***** error laplaceinv (1, i, 3) 659s ***** error laplaceinv (1, 2, i) 659s 16 tests, 16 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/poisscdf.m] 659s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/poisscdf.m 659s ***** demo 659s ## Plot various CDFs from the Poisson distribution 659s x = 0:20; 659s p1 = poisscdf (x, 1); 659s p2 = poisscdf (x, 4); 659s p3 = poisscdf (x, 10); 659s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 659s grid on 659s ylim ([0, 1]) 659s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 659s title ("Poisson CDF") 659s xlabel ("values in x (number of occurences)") 659s ylabel ("probability") 659s ***** shared x, y 659s x = [-1 0 1 2 Inf]; 659s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 659s ***** assert (poisscdf (x, ones (1,5)), y) 659s ***** assert (poisscdf (x, 1), y) 659s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 660s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 660s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 660s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 660s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 660s ***** error poisscdf () 660s ***** error poisscdf (1) 660s ***** error poisscdf (1, 2, 3) 660s ***** error poisscdf (1, 2, "tail") 660s ***** error ... 660s poisscdf (ones (3), ones (2)) 660s ***** error ... 660s poisscdf (ones (2), ones (3)) 660s ***** error poisscdf (i, 2) 660s ***** error poisscdf (2, i) 660s 15 tests, 15 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/ricecdf.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ricecdf.m 660s ***** demo 660s ## Plot various CDFs from the Rician distribution 660s x = 0:0.01:10; 660s p1 = ricecdf (x, 0, 1); 660s p2 = ricecdf (x, 0.5, 1); 660s p3 = ricecdf (x, 1, 1); 660s p4 = ricecdf (x, 2, 1); 660s p5 = ricecdf (x, 4, 1); 660s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 660s grid on 660s ylim ([0, 1]) 660s xlim ([0, 8]) 660s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 660s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 660s title ("Rician CDF") 660s xlabel ("values in x") 660s ylabel ("probability") 660s ***** demo 660s ## Plot various CDFs from the Rician distribution 660s x = 0:0.01:10; 660s p1 = ricecdf (x, 0, 0.5); 660s p2 = ricecdf (x, 0, 2); 660s p3 = ricecdf (x, 0, 3); 660s p4 = ricecdf (x, 2, 2); 660s p5 = ricecdf (x, 4, 2); 660s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 660s grid on 660s ylim ([0, 1]) 660s xlim ([0, 8]) 660s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 660s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 660s title ("Rician CDF") 660s xlabel ("values in x") 660s ylabel ("probability") 660s ***** test 660s x = 0:0.5:2.5; 660s s = 1:6; 660s p = ricecdf (x, s, 1); 660s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 660s assert (p, expected_p, 0.001); 660s ***** test 660s x = 0:0.5:2.5; 660s sigma = 1:6; 660s p = ricecdf (x, 1, sigma); 660s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 660s assert (p, expected_p, 0.001); 660s ***** test 660s x = 0:0.5:2.5; 660s p = ricecdf (x, 0, 1); 660s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 660s assert (p, expected_p, 0.001); 660s ***** test 660s x = 0:0.5:2.5; 660s p = ricecdf (x, 1, 1); 660s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 660s assert (p, expected_p, 0.001); 660s ***** shared x, p 660s x = [-1, 0, 1, 2, Inf]; 660s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 660s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 660s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 660s ***** error ricecdf () 660s ***** error ricecdf (1) 660s ***** error ricecdf (1, 2) 660s ***** error ricecdf (1, 2, 3, "uper") 660s ***** error ricecdf (1, 2, 3, 4) 660s ***** error ... 660s ricecdf (ones (3), ones (2), ones (2)) 660s ***** error ... 660s ricecdf (ones (2), ones (3), ones (2)) 660s ***** error ... 660s ricecdf (ones (2), ones (2), ones (3)) 660s ***** error ricecdf (i, 2, 3) 660s ***** error ricecdf (2, i, 3) 660s ***** error ricecdf (2, 2, i) 660s 17 tests, 17 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/tlspdf.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tlspdf.m 660s ***** demo 660s ## Plot various PDFs from the Student's T distribution 660s x = -8:0.01:8; 660s y1 = tlspdf (x, 0, 1, 1); 660s y2 = tlspdf (x, 0, 2, 2); 660s y3 = tlspdf (x, 3, 2, 5); 660s y4 = tlspdf (x, -1, 3, Inf); 660s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 660s grid on 660s xlim ([-8, 8]) 660s ylim ([0, 0.41]) 660s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 660s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 660s "location", "northwest") 660s title ("Location-scale Student's T PDF") 660s xlabel ("values in x") 660s ylabel ("density") 660s ***** test 660s x = rand (10,1); 660s y = 1./(pi * (1 + x.^2)); 660s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 660s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 660s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 660s ***** shared x, y 660s x = [-Inf 0 0.5 1 Inf]; 660s y = 1./(pi * (1 + x.^2)); 660s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 660s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 660s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 660s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 660s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 660s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 660s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 660s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 660s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 660s ***** error tlspdf () 660s ***** error tlspdf (1) 660s ***** error tlspdf (1, 2) 660s ***** error tlspdf (1, 2, 3) 660s ***** error ... 660s tlspdf (ones (3), ones (2), 1, 1) 660s ***** error ... 660s tlspdf (ones (2), 1, ones (3), 1) 660s ***** error ... 660s tlspdf (ones (2), 1, 1, ones (3)) 660s ***** error tlspdf (i, 2, 1, 1) 660s ***** error tlspdf (2, i, 1, 1) 660s ***** error tlspdf (2, 1, i, 1) 660s ***** error tlspdf (2, 1, 1, i) 660s 21 tests, 21 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/norminv.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/norminv.m 660s ***** demo 660s ## Plot various iCDFs from the normal distribution 660s p = 0.001:0.001:0.999; 660s x1 = norminv (p, 0, 0.5); 660s x2 = norminv (p, 0, 1); 660s x3 = norminv (p, 0, 2); 660s x4 = norminv (p, -2, 0.8); 660s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 660s grid on 660s ylim ([-5, 5]) 660s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 660s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 660s title ("Normal iCDF") 660s xlabel ("probability") 660s ylabel ("values in x") 660s ***** shared p 660s p = [-1 0 0.5 1 2]; 660s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 660s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 660s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 660s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 660s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 660s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 660s ***** assert (norminv (p), probit (p)) 660s ***** assert (norminv (0.31254), probit (0.31254)) 660s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 660s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 660s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 660s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 660s ***** error norminv () 660s ***** error ... 660s norminv (ones (3), ones (2), ones (2)) 660s ***** error ... 660s norminv (ones (2), ones (3), ones (2)) 660s ***** error ... 660s norminv (ones (2), ones (2), ones (3)) 660s ***** error norminv (i, 2, 2) 660s ***** error norminv (2, i, 2) 660s ***** error norminv (2, 2, i) 660s 19 tests, 19 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/ricepdf.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ricepdf.m 660s ***** demo 660s ## Plot various PDFs from the Rician distribution 660s x = 0:0.01:8; 660s y1 = ricepdf (x, 0, 1); 660s y2 = ricepdf (x, 0.5, 1); 660s y3 = ricepdf (x, 1, 1); 660s y4 = ricepdf (x, 2, 1); 660s y5 = ricepdf (x, 4, 1); 660s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 660s grid on 660s ylim ([0, 0.65]) 660s xlim ([0, 8]) 660s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 660s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 660s title ("Rician PDF") 660s xlabel ("values in x") 660s ylabel ("density") 660s ***** shared x, y 660s x = [-1 0 0.5 1 2]; 660s y = [0 0 0.1073 0.1978 0.2846]; 660s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 660s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 660s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 660s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 660s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 660s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 660s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 660s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 660s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 660s ***** error ricepdf () 660s ***** error ricepdf (1) 660s ***** error ricepdf (1,2) 660s ***** error ricepdf (1,2,3,4) 660s ***** error ... 660s ricepdf (ones (3), ones (2), ones (2)) 660s ***** error ... 660s ricepdf (ones (2), ones (3), ones (2)) 660s ***** error ... 660s ricepdf (ones (2), ones (2), ones (3)) 660s ***** error ricepdf (i, 2, 2) 660s ***** error ricepdf (2, i, 2) 660s ***** error ricepdf (2, 2, i) 660s 19 tests, 19 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/mvtrnd.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvtrnd.m 660s ***** test 660s rho = [1, 0.5; 0.5, 1]; 660s df = 3; 660s n = 10; 660s r = mvtrnd (rho, df, n); 660s assert (size (r), [10, 2]); 660s ***** test 660s rho = [1, 0.5; 0.5, 1]; 660s df = [2; 3]; 660s n = 2; 660s r = mvtrnd (rho, df, 2); 660s assert (size (r), [2, 2]); 660s 2 tests, 2 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/tlsrnd.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/tlsrnd.m 660s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 660s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 660s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 660s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 660s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 660s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 660s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 660s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 660s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 660s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 660s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 660s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 660s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 660s ***** assert (class (tlsrnd (1, 2, 3)), "double") 660s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 660s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 660s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 660s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 660s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 660s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 660s ***** error tlsrnd () 660s ***** error tlsrnd (1) 660s ***** error tlsrnd (1, 2) 660s ***** error ... 660s tlsrnd (ones (3), ones (2), 1) 660s ***** error ... 660s tlsrnd (ones (2), 1, ones (3)) 660s ***** error ... 660s tlsrnd (1, ones (2), ones (3)) 660s ***** error tlsrnd (i, 2, 3) 660s ***** error tlsrnd (1, i, 3) 660s ***** error tlsrnd (1, 2, i) 660s ***** error ... 660s tlsrnd (1, 2, 3, -1) 660s ***** error ... 660s tlsrnd (1, 2, 3, 1.2) 660s ***** error ... 660s tlsrnd (1, 2, 3, ones (2)) 660s ***** error ... 660s tlsrnd (1, 2, 3, [2 -1 2]) 660s ***** error ... 660s tlsrnd (1, 2, 3, [2 0 2.5]) 660s ***** error ... 660s tlsrnd (ones (2), 2, 3, ones (2)) 660s ***** error ... 660s tlsrnd (1, 2, 3, 2, -1, 5) 660s ***** error ... 660s tlsrnd (1, 2, 3, 2, 1.5, 5) 660s ***** error ... 660s tlsrnd (ones (2,2), 2, 3, 3) 660s ***** error ... 660s tlsrnd (1, ones (2,2), 3, 3) 660s ***** error ... 660s tlsrnd (1, 2, ones (2,2), 3) 660s ***** error ... 660s tlsrnd (1, 2, ones (2,2), [3, 3]) 660s ***** error ... 660s tlsrnd (1, 2, ones (2,2), 2, 3) 660s 42 tests, 42 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/gpinv.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gpinv.m 660s ***** demo 660s ## Plot various iCDFs from the generalized Pareto distribution 660s p = 0.001:0.001:0.999; 660s x1 = gpinv (p, 1, 1, 0); 660s x2 = gpinv (p, 5, 1, 0); 660s x3 = gpinv (p, 20, 1, 0); 660s x4 = gpinv (p, 1, 2, 0); 660s x5 = gpinv (p, 5, 2, 0); 660s x6 = gpinv (p, 20, 2, 0); 660s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 660s p, x4, "-c", p, x5, "-m", p, x6, "-k") 660s grid on 660s ylim ([0, 5]) 660s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 660s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 660s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 660s "location", "southeast") 660s title ("Generalized Pareto iCDF") 660s xlabel ("probability") 660s ylabel ("values in x") 660s ***** shared p, y1, y2, y3 660s p = [-1, 0, 1/2, 1, 2]; 660s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 660s y2 = [NaN, 0, 1, Inf, NaN]; 660s y3 = [NaN, 0, 1/2, 1, NaN]; 660s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 660s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 660s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 660s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 660s ***** assert (gpinv (p, 0, 1, 0), y1) 660s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 660s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 660s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 660s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 660s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 660s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 660s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 660s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 660s ***** assert (gpinv (p, 1, 1, 0), y2) 660s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 660s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 660s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 660s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 660s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 660s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 660s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 660s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 660s ***** assert (gpinv (p, -1, 1, 0), y3) 660s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 660s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 660s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 660s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 660s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 660s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 660s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 660s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 660s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 660s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 660s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 660s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 660s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 660s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 660s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 660s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 660s ***** error gpinv () 660s ***** error gpinv (1) 660s ***** error gpinv (1, 2) 660s ***** error gpinv (1, 2, 3) 660s ***** error ... 660s gpinv (ones (3), ones (2), ones(2), ones(2)) 660s ***** error ... 660s gpinv (ones (2), ones (3), ones(2), ones(2)) 660s ***** error ... 660s gpinv (ones (2), ones (2), ones(3), ones(2)) 660s ***** error ... 660s gpinv (ones (2), ones (2), ones(2), ones(3)) 660s ***** error gpinv (i, 2, 3, 4) 660s ***** error gpinv (1, i, 3, 4) 660s ***** error gpinv (1, 2, i, 4) 660s ***** error gpinv (1, 2, 3, i) 660s 51 tests, 51 passed, 0 known failure, 0 skipped 660s [inst/dist_fun/mvtcdf.m] 660s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvtcdf.m 660s ***** demo 660s ## Compute the cdf of a multivariate Student's t distribution with 660s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 660s 660s rho = [1, 0.4; 0.4, 1]; 660s df = 2; 660s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 660s X = [X1(:), X2(:)]; 660s p = mvtcdf (X, rho, df); 660s surf (X1, X2, reshape (p, 25, 25)); 660s title ("Bivariate Student's t cumulative distribution function"); 660s ***** test 660s x = [1, 2]; 660s rho = [1, 0.5; 0.5, 1]; 660s df = 4; 660s a = [-1, 0]; 660s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 660s ***** test 660s x = [1, 2;2, 4;1, 5]; 660s rho = [1, 0.5; 0.5, 1]; 660s df = 4; 660s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 660s assert (mvtcdf(x, rho, df), p, 1e-14); 660s ***** test 660s x = [1, 2, 2, 4, 1, 5]; 660s rho = eye (6); 660s rho(rho == 0) = 0.5; 660s df = 4; 660s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 685s ***** error mvtcdf (1) 685s ***** error mvtcdf (1, 2) 685s ***** error ... 685s mvtcdf (1, [2, 3; 3, 2], 1) 685s ***** error ... 685s mvtcdf ([2, 3, 4], ones (2), 1) 685s ***** error ... 685s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 685s ***** error ... 685s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 685s ***** error ... 685s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 685s 10 tests, 10 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/mnpdf.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mnpdf.m 685s ***** test 685s x = [1, 4, 2]; 685s pk = [0.2, 0.5, 0.3]; 685s y = mnpdf (x, pk); 685s assert (y, 0.11812, 0.001); 685s ***** test 685s x = [1, 4, 2; 1, 0, 9]; 685s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 685s y = mnpdf (x, pk); 685s assert (y, [0.11812; 0.13422], 0.001); 685s 2 tests, 2 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/bisainv.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bisainv.m 685s ***** demo 685s ## Plot various iCDFs from the Birnbaum-Saunders distribution 685s p = 0.001:0.001:0.999; 685s x1 = bisainv (p, 1, 0.5); 685s x2 = bisainv (p, 1, 1); 685s x3 = bisainv (p, 1, 2); 685s x4 = bisainv (p, 1, 5); 685s x5 = bisainv (p, 1, 10); 685s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 685s grid on 685s ylim ([0, 10]) 685s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 685s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 685s title ("Birnbaum-Saunders iCDF") 685s xlabel ("probability") 685s ylabel ("values in x") 685s ***** demo 685s ## Plot various iCDFs from the Birnbaum-Saunders distribution 685s p = 0.001:0.001:0.999; 685s x1 = bisainv (p, 1, 0.3); 685s x2 = bisainv (p, 2, 0.3); 685s x3 = bisainv (p, 1, 0.5); 685s x4 = bisainv (p, 3, 0.5); 685s x5 = bisainv (p, 5, 0.5); 685s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 685s grid on 685s ylim ([0, 10]) 685s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 685s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 685s title ("Birnbaum-Saunders iCDF") 685s xlabel ("probability") 685s ylabel ("values in x") 685s ***** shared p, y, f 685s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 685s p = [-1, 0, 1/4, 1/2, 1, 2]; 685s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 685s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 685s ***** assert (bisainv (p, 1, ones (1,6)), y) 685s ***** assert (bisainv (p, ones (1,6), 1), y) 685s ***** assert (bisainv (p, 1, 1), y) 685s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 685s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 685s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 685s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 685s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 685s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 685s ***** error bisainv () 685s ***** error bisainv (1) 685s ***** error bisainv (1, 2) 685s ***** error bisainv (1, 2, 3, 4) 685s ***** error ... 685s bisainv (ones (3), ones (2), ones(2)) 685s ***** error ... 685s bisainv (ones (2), ones (3), ones(2)) 685s ***** error ... 685s bisainv (ones (2), ones (2), ones(3)) 685s ***** error bisainv (i, 4, 3) 685s ***** error bisainv (1, i, 3) 685s ***** error bisainv (1, 4, i) 685s 20 tests, 20 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/bvncdf.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/bvncdf.m 685s ***** demo 685s mu = [1, -1]; 685s sigma = [0.9, 0.4; 0.4, 0.3]; 685s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 685s x = [X1(:), X2(:)]; 685s p = bvncdf (x, mu, sigma); 685s Z = reshape (p, 25, 25); 685s surf (X1, X2, Z); 685s title ("Bivariate Normal Distribution"); 685s ylabel "X1" 685s xlabel "X2" 685s ***** test 685s mu = [1, -1]; 685s sigma = [0.9, 0.4; 0.4, 0.3]; 685s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 685s x = [X1(:), X2(:)]; 685s p = bvncdf (x, mu, sigma); 685s p_out = [0.00011878988774500, 0.00034404112322371, ... 685s 0.00087682502191813, 0.00195221905058185, ... 685s 0.00378235566873474, 0.00638175749734415, ... 685s 0.00943764224329656, 0.01239164888125426, ... 685s 0.01472750274376648, 0.01623228313374828]'; 685s assert (p([1:10]), p_out, 1e-16); 685s ***** test 685s mu = [1, -1]; 685s sigma = [0.9, 0.4; 0.4, 0.3]; 685s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 685s x = [X1(:), X2(:)]; 685s p = bvncdf (x, mu, sigma); 685s p_out = [0.8180695783608276, 0.8854485749482751, ... 685s 0.9308108777385832, 0.9579855743025508, ... 685s 0.9722897881414742, 0.9788150170059926, ... 685s 0.9813597788804785, 0.9821977956568989, ... 685s 0.9824283794464095, 0.9824809345614861]'; 685s assert (p([616:625]), p_out, 3e-16); 685s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 685s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 685s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 685s 5 tests, 5 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/unidrnd.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unidrnd.m 685s ***** assert (size (unidrnd (2)), [1, 1]) 685s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 685s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 685s ***** assert (size (unidrnd (1, 3)), [3, 3]) 685s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 685s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 685s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 685s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 685s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 685s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 685s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 685s ***** assert (unidrnd (0, 1, 1), NaN) 685s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 685s ***** assert (class (unidrnd (2)), "double") 685s ***** assert (class (unidrnd (single (2))), "single") 685s ***** assert (class (unidrnd (single ([2 2]))), "single") 685s ***** error unidrnd () 685s ***** error unidrnd (i) 685s ***** error ... 685s unidrnd (1, -1) 685s ***** error ... 685s unidrnd (1, 1.2) 685s ***** error ... 685s unidrnd (1, ones (2)) 685s ***** error ... 685s unidrnd (1, [2 -1 2]) 685s ***** error ... 685s unidrnd (1, [2 0 2.5]) 685s ***** error ... 685s unidrnd (ones (2), ones (2)) 685s ***** error ... 685s unidrnd (1, 2, -1, 5) 685s ***** error ... 685s unidrnd (1, 2, 1.5, 5) 685s ***** error unidrnd (ones (2,2), 3) 685s ***** error unidrnd (ones (2,2), [3, 2]) 685s ***** error unidrnd (ones (2,2), 2, 3) 685s 29 tests, 29 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/mvtcdfqmc.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/mvtcdfqmc.m 685s ***** error mvtcdfqmc (1, 2, 3); 685s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 685s 2 tests, 2 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/finv.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/finv.m 685s ***** demo 685s ## Plot various iCDFs from the F distribution 685s p = 0.001:0.001:0.999; 685s x1 = finv (p, 1, 1); 685s x2 = finv (p, 2, 1); 685s x3 = finv (p, 5, 2); 685s x4 = finv (p, 10, 1); 685s x5 = finv (p, 100, 100); 685s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 685s grid on 685s ylim ([0, 4]) 685s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 685s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 685s "df1 = 100, df2 = 100"}, "location", "northwest") 685s title ("F iCDF") 685s xlabel ("probability") 685s ylabel ("values in x") 685s ***** shared p 685s p = [-1 0 0.5 1 2]; 685s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 685s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 685s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 685s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN Inf NaN]) 685s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN Inf NaN]) 685s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 685s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 685s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 685s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 685s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 685s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 685s ***** test 685s x = finv (0.35, Inf, 4); 685s assert (x, 0.9014, 1e-4) 685s ***** test 685s x = finv (0, Inf, 4); 685s assert (x, 0) 685s ***** test 685s x = finv (1, Inf, 4); 685s assert (x, Inf) 685s ***** test 685s x = finv (0.35, 4, Inf); 685s assert (x, 0.6175, 1e-4) 685s ***** test 685s x = finv (0, 4, Inf); 685s assert (x, 0) 685s ***** test 685s x = finv (1, 4, Inf); 685s assert (x, Inf) 685s ***** test 685s x = finv ([0, 0.000001, 0.35, 1, 1.2], Inf, Inf); 685s assert (x, [0, 1, 1, 1, NaN]); 685s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 685s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 685s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 685s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 685s ***** error finv () 685s ***** error finv (1) 685s ***** error finv (1,2) 685s ***** error ... 685s finv (ones (3), ones (2), ones (2)) 685s ***** error ... 685s finv (ones (2), ones (3), ones (2)) 685s ***** error ... 685s finv (ones (2), ones (2), ones (3)) 685s ***** error finv (i, 2, 2) 685s ***** error finv (2, i, 2) 685s ***** error finv (2, 2, i) 685s 31 tests, 31 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/gumbelpdf.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gumbelpdf.m 685s ***** demo 685s ## Plot various PDFs from the Extreme value distribution 685s x = -5:0.001:20; 685s y1 = gumbelpdf (x, 0.5, 2); 685s y2 = gumbelpdf (x, 1.0, 2); 685s y3 = gumbelpdf (x, 1.5, 3); 685s y4 = gumbelpdf (x, 3.0, 4); 685s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 685s grid on 685s ylim ([0, 0.2]) 685s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 685s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 685s title ("Extreme value PDF") 685s xlabel ("values in x") 685s ylabel ("density") 685s ***** shared x, y0, y1 685s x = [-5, 0, 1, 2, 3]; 685s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 685s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 685s ***** assert (gumbelpdf (x), y0, 1e-4) 685s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 685s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 685s ***** error gumbelpdf () 685s ***** error ... 685s gumbelpdf (ones (3), ones (2), ones (2)) 685s ***** error gumbelpdf (i, 2, 2) 685s ***** error gumbelpdf (2, i, 2) 685s ***** error gumbelpdf (2, 2, i) 685s 8 tests, 8 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/nctrnd.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nctrnd.m 685s ***** assert (size (nctrnd (1, 1)), [1 1]) 685s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 685s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 685s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 685s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 685s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 685s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 685s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 685s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 685s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 685s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 685s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 685s ***** assert (class (nctrnd (1, 1)), "double") 685s ***** assert (class (nctrnd (1, single (1))), "single") 685s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 685s ***** assert (class (nctrnd (single (1), 1)), "single") 685s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 685s ***** error nctrnd () 685s ***** error nctrnd (1) 685s ***** error ... 685s nctrnd (ones (3), ones (2)) 685s ***** error ... 685s nctrnd (ones (2), ones (3)) 685s ***** error nctrnd (i, 2) 685s ***** error nctrnd (1, i) 685s ***** error ... 685s nctrnd (1, 2, -1) 685s ***** error ... 685s nctrnd (1, 2, 1.2) 685s ***** error ... 685s nctrnd (1, 2, ones (2)) 685s ***** error ... 685s nctrnd (1, 2, [2 -1 2]) 685s ***** error ... 685s nctrnd (1, 2, [2 0 2.5]) 685s ***** error ... 685s nctrnd (1, 2, 2, -1, 5) 685s ***** error ... 685s nctrnd (1, 2, 2, 1.5, 5) 685s ***** error ... 685s nctrnd (2, ones (2), 3) 685s ***** error ... 685s nctrnd (2, ones (2), [3, 2]) 685s ***** error ... 685s nctrnd (2, ones (2), 3, 2) 685s 33 tests, 33 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/frnd.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/frnd.m 685s ***** assert (size (frnd (1, 1)), [1 1]) 685s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 685s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 685s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 685s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 685s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 685s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 685s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 685s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 685s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 685s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 685s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 685s ***** assert (class (frnd (1, 1)), "double") 685s ***** assert (class (frnd (1, single (1))), "single") 685s ***** assert (class (frnd (1, single ([1, 1]))), "single") 685s ***** assert (class (frnd (single (1), 1)), "single") 685s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 685s ***** error frnd () 685s ***** error frnd (1) 685s ***** error ... 685s frnd (ones (3), ones (2)) 685s ***** error ... 685s frnd (ones (2), ones (3)) 685s ***** error frnd (i, 2, 3) 685s ***** error frnd (1, i, 3) 685s ***** error ... 685s frnd (1, 2, -1) 685s ***** error ... 685s frnd (1, 2, 1.2) 685s ***** error ... 685s frnd (1, 2, ones (2)) 685s ***** error ... 685s frnd (1, 2, [2 -1 2]) 685s ***** error ... 685s frnd (1, 2, [2 0 2.5]) 685s ***** error ... 685s frnd (1, 2, 2, -1, 5) 685s ***** error ... 685s frnd (1, 2, 2, 1.5, 5) 685s ***** error ... 685s frnd (2, ones (2), 3) 685s ***** error ... 685s frnd (2, ones (2), [3, 2]) 685s ***** error ... 685s frnd (2, ones (2), 3, 2) 685s 33 tests, 33 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/wienrnd.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/wienrnd.m 685s ***** error wienrnd (0) 685s ***** error wienrnd (1, 3, -50) 685s ***** error wienrnd (5, 0) 685s ***** error wienrnd (0.4, 3, 5) 685s ***** error wienrnd ([1 4], 3, 5) 685s 5 tests, 5 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/invginv.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/invginv.m 685s ***** demo 685s ## Plot various iCDFs from the inverse Gaussian distribution 685s p = 0.001:0.001:0.999; 685s x1 = invginv (p, 1, 0.2); 685s x2 = invginv (p, 1, 1); 685s x3 = invginv (p, 1, 3); 685s x4 = invginv (p, 3, 0.2); 685s x5 = invginv (p, 3, 1); 685s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 685s grid on 685s ylim ([0, 3]) 685s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 685s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 685s title ("Inverse Gaussian iCDF") 685s xlabel ("probability") 685s ylabel ("x") 685s ***** shared p, x 685s p = [0, 0.3829, 0.6827, 1]; 685s x = [0, 0.5207, 1.0376, Inf]; 685s ***** assert (invginv (p, 1, 1), x, 1e-4); 685s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 685s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 685s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 685s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 685s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 685s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 685s ***** error invginv (1) 685s ***** error invginv (1, 2) 685s ***** error ... 685s invginv (1, ones (2), ones (3)) 685s ***** error ... 685s invginv (ones (2), 1, ones (3)) 685s ***** error ... 685s invginv (ones (2), ones (3), 1) 685s ***** error invginv (i, 2, 3) 685s ***** error invginv (1, i, 3) 685s ***** error invginv (1, 2, i) 685s 15 tests, 15 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/laplacepdf.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/laplacepdf.m 685s ***** demo 685s ## Plot various PDFs from the Laplace distribution 685s x = -10:0.01:10; 685s y1 = laplacepdf (x, 0, 1); 685s y2 = laplacepdf (x, 0, 2); 685s y3 = laplacepdf (x, 0, 4); 685s y4 = laplacepdf (x, -5, 4); 685s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 685s grid on 685s xlim ([-10, 10]) 685s ylim ([0, 0.6]) 685s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 685s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 685s title ("Laplace PDF") 685s xlabel ("values in x") 685s ylabel ("density") 685s ***** shared x, y 685s x = [-Inf -log(2) 0 log(2) Inf]; 685s y = [0, 1/4, 1/2, 1/4, 0]; 685s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 685s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 685s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 685s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 685s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 685s ***** error laplacepdf () 685s ***** error laplacepdf (1) 685s ***** error ... 685s laplacepdf (1, 2) 685s ***** error laplacepdf (1, 2, 3, 4) 685s ***** error ... 685s laplacepdf (1, ones (2), ones (3)) 685s ***** error ... 685s laplacepdf (ones (2), 1, ones (3)) 685s ***** error ... 685s laplacepdf (ones (2), ones (3), 1) 685s ***** error laplacepdf (i, 2, 3) 685s ***** error laplacepdf (1, i, 3) 685s ***** error laplacepdf (1, 2, i) 685s 15 tests, 15 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/nbinrnd.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nbinrnd.m 685s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 685s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 685s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 685s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 685s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 685s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 685s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 685s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 685s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 685s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 685s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 685s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 685s ***** assert (class (nbinrnd (1, 0.5)), "double") 685s ***** assert (class (nbinrnd (1, single (0.5))), "single") 685s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 685s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 685s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 685s ***** error nbinrnd () 685s ***** error nbinrnd (1) 685s ***** error ... 685s nbinrnd (ones (3), ones (2)) 685s ***** error ... 685s nbinrnd (ones (2), ones (3)) 685s ***** error nbinrnd (i, 2, 3) 685s ***** error nbinrnd (1, i, 3) 685s ***** error ... 685s nbinrnd (1, 2, -1) 685s ***** error ... 685s nbinrnd (1, 2, 1.2) 685s ***** error ... 685s nbinrnd (1, 2, ones (2)) 685s ***** error ... 685s nbinrnd (1, 2, [2 -1 2]) 685s ***** error ... 685s nbinrnd (1, 2, [2 0 2.5]) 685s ***** error ... 685s nbinrnd (1, 2, 2, -1, 5) 685s ***** error ... 685s nbinrnd (1, 2, 2, 1.5, 5) 685s ***** error ... 685s nbinrnd (2, ones (2), 3) 685s ***** error ... 685s nbinrnd (2, ones (2), [3, 2]) 685s ***** error ... 685s nbinrnd (2, ones (2), 3, 2) 685s 33 tests, 33 passed, 0 known failure, 0 skipped 685s [inst/dist_fun/normpdf.m] 685s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/normpdf.m 685s ***** demo 685s ## Plot various PDFs from the normal distribution 685s x = -5:0.01:5; 685s y1 = normpdf (x, 0, 0.5); 685s y2 = normpdf (x, 0, 1); 685s y3 = normpdf (x, 0, 2); 685s y4 = normpdf (x, -2, 0.8); 685s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 685s grid on 685s xlim ([-5, 5]) 685s ylim ([0, 0.9]) 685s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 685s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 685s title ("Normal PDF") 685s xlabel ("values in x") 685s ylabel ("density") 685s ***** shared x, y 685s x = [-Inf, 1, 2, Inf]; 685s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 685s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 685s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 685s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 685s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 685s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 686s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 686s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 686s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 686s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 686s ***** error normpdf () 686s ***** error ... 686s normpdf (ones (3), ones (2), ones (2)) 686s ***** error ... 686s normpdf (ones (2), ones (3), ones (2)) 686s ***** error ... 686s normpdf (ones (2), ones (2), ones (3)) 686s ***** error normpdf (i, 2, 2) 686s ***** error normpdf (2, i, 2) 686s ***** error normpdf (2, 2, i) 686s 16 tests, 16 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/logipdf.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logipdf.m 686s ***** demo 686s ## Plot various PDFs from the logistic distribution 686s x = -5:0.01:20; 686s y1 = logipdf (x, 5, 2); 686s y2 = logipdf (x, 9, 3); 686s y3 = logipdf (x, 9, 4); 686s y4 = logipdf (x, 6, 2); 686s y5 = logipdf (x, 2, 1); 686s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 686s grid on 686s ylim ([0, 0.3]) 686s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 686s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 686s title ("Logistic PDF") 686s xlabel ("values in x") 686s ylabel ("density") 686s ***** shared x, y 686s x = [-Inf -log(4) 0 log(4) Inf]; 686s y = [0, 0.16, 1/4, 0.16, 0]; 686s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 686s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 686s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 686s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 686s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 686s ***** error logipdf () 686s ***** error logipdf (1) 686s ***** error ... 686s logipdf (1, 2) 686s ***** error ... 686s logipdf (1, ones (2), ones (3)) 686s ***** error ... 686s logipdf (ones (2), 1, ones (3)) 686s ***** error ... 686s logipdf (ones (2), ones (3), 1) 686s ***** error logipdf (i, 2, 3) 686s ***** error logipdf (1, i, 3) 686s ***** error logipdf (1, 2, i) 686s 14 tests, 14 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/gevcdf.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gevcdf.m 686s ***** demo 686s ## Plot various CDFs from the generalized extreme value distribution 686s x = -1:0.001:10; 686s p1 = gevcdf (x, 1, 1, 1); 686s p2 = gevcdf (x, 0.5, 1, 1); 686s p3 = gevcdf (x, 1, 1, 5); 686s p4 = gevcdf (x, 1, 2, 5); 686s p5 = gevcdf (x, 1, 5, 5); 686s p6 = gevcdf (x, 1, 0.5, 5); 686s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 686s x, p4, "-c", x, p5, "-m", x, p6, "-k") 686s grid on 686s xlim ([-1, 10]) 686s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 686s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 686s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 686s "location", "southeast") 686s title ("Generalized extreme value CDF") 686s xlabel ("values in x") 686s ylabel ("probability") 686s ***** test 686s x = 0:0.5:2.5; 686s sigma = 1:6; 686s k = 1; 686s mu = 0; 686s p = gevcdf (x, k, sigma, mu); 686s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 686s assert (p, expected_p, 0.001); 686s ***** test 686s x = -0.5:0.5:2.5; 686s sigma = 0.5; 686s k = 1; 686s mu = 0; 686s p = gevcdf (x, k, sigma, mu); 686s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 686s assert (p, expected_p, 0.001); 686s ***** test # check for continuity for k near 0 686s x = 1; 686s sigma = 0.5; 686s k = -0.03:0.01:0.03; 686s mu = 0; 686s p = gevcdf (x, k, sigma, mu); 686s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 686s assert (p, expected_p, 0.001); 686s ***** error gevcdf () 686s ***** error gevcdf (1) 686s ***** error gevcdf (1, 2) 686s ***** error gevcdf (1, 2, 3) 686s ***** error ... 686s gevcdf (1, 2, 3, 4, 5, 6) 686s ***** error gevcdf (1, 2, 3, 4, "tail") 686s ***** error gevcdf (1, 2, 3, 4, 5) 686s ***** error ... 686s gevcdf (ones (3), ones (2), ones(2), ones(2)) 686s ***** error ... 686s gevcdf (ones (2), ones (3), ones(2), ones(2)) 686s ***** error ... 686s gevcdf (ones (2), ones (2), ones(3), ones(2)) 686s ***** error ... 686s gevcdf (ones (2), ones (2), ones(2), ones(3)) 686s ***** error gevcdf (i, 2, 3, 4) 686s ***** error gevcdf (1, i, 3, 4) 686s ***** error gevcdf (1, 2, i, 4) 686s ***** error gevcdf (1, 2, 3, i) 686s 18 tests, 18 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/unidinv.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/unidinv.m 686s ***** demo 686s ## Plot various iCDFs from the discrete uniform distribution 686s p = 0.001:0.001:0.999; 686s x1 = unidinv (p, 5); 686s x2 = unidinv (p, 9); 686s plot (p, x1, "-b", p, x2, "-g") 686s grid on 686s xlim ([0, 1]) 686s ylim ([0, 10]) 686s legend ({"N = 5", "N = 9"}, "location", "northwest") 686s title ("Discrete uniform iCDF") 686s xlabel ("probability") 686s ylabel ("values in x") 686s ***** shared p 686s p = [-1 0 0.5 1 2]; 686s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 686s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 686s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 686s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 686s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 686s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 686s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 686s ***** error unidinv () 686s ***** error unidinv (1) 686s ***** error ... 686s unidinv (ones (3), ones (2)) 686s ***** error ... 686s unidinv (ones (2), ones (3)) 686s ***** error unidinv (i, 2) 686s ***** error unidinv (2, i) 686s 13 tests, 13 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/logiinv.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/logiinv.m 686s ***** demo 686s ## Plot various iCDFs from the logistic distribution 686s p = 0.001:0.001:0.999; 686s x1 = logiinv (p, 5, 2); 686s x2 = logiinv (p, 9, 3); 686s x3 = logiinv (p, 9, 4); 686s x4 = logiinv (p, 6, 2); 686s x5 = logiinv (p, 2, 1); 686s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 686s grid on 686s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 686s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 686s title ("Logistic iCDF") 686s xlabel ("probability") 686s ylabel ("x") 686s ***** test 686s p = [0.01:0.01:0.99]; 686s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 686s ***** shared p 686s p = [-1 0 0.5 1 2]; 686s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 686s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 686s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 686s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 686s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 686s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 686s ***** error logiinv () 686s ***** error logiinv (1) 686s ***** error ... 686s logiinv (1, 2) 686s ***** error ... 686s logiinv (1, ones (2), ones (3)) 686s ***** error ... 686s logiinv (ones (2), 1, ones (3)) 686s ***** error ... 686s logiinv (ones (2), ones (3), 1) 686s ***** error logiinv (i, 2, 3) 686s ***** error logiinv (1, i, 3) 686s ***** error logiinv (1, 2, i) 686s 16 tests, 16 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/trirnd.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/trirnd.m 686s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 686s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 686s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 686s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 686s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 686s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 686s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 686s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 686s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 686s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 686s ***** assert (class (trirnd (1, 1.5, 2)), "double") 686s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 686s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 686s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 686s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 686s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 686s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 686s ***** error trirnd () 686s ***** error trirnd (1) 686s ***** error trirnd (1, 2) 686s ***** error ... 686s trirnd (ones (3), 5 * ones (2), ones (2)) 686s ***** error ... 686s trirnd (ones (2), 5 * ones (3), ones (2)) 686s ***** error ... 686s trirnd (ones (2), 5 * ones (2), ones (3)) 686s ***** error trirnd (i, 5, 3) 686s ***** error trirnd (1, 5+i, 3) 686s ***** error trirnd (1, 5, i) 686s ***** error ... 686s trirnd (1, 5, 3, -1) 686s ***** error ... 686s trirnd (1, 5, 3, 1.2) 686s ***** error ... 686s trirnd (1, 5, 3, ones (2)) 686s ***** error ... 686s trirnd (1, 5, 3, [2 -1 2]) 686s ***** error ... 686s trirnd (1, 5, 3, [2 0 2.5]) 686s ***** error ... 686s trirnd (1, 5, 3, 2, -1, 5) 686s ***** error ... 686s trirnd (1, 5, 3, 2, 1.5, 5) 686s ***** error ... 686s trirnd (2, 5 * ones (2), 2, 3) 686s ***** error ... 686s trirnd (2, 5 * ones (2), 2, [3, 2]) 686s ***** error ... 686s trirnd (2, 5 * ones (2), 2, 3, 2) 686s 36 tests, 36 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/gumbelcdf.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/gumbelcdf.m 686s ***** demo 686s ## Plot various CDFs from the Gumbel distribution 686s x = -5:0.01:20; 686s p1 = gumbelcdf (x, 0.5, 2); 686s p2 = gumbelcdf (x, 1.0, 2); 686s p3 = gumbelcdf (x, 1.5, 3); 686s p4 = gumbelcdf (x, 3.0, 4); 686s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 686s grid on 686s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 686s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 686s title ("Gumbel CDF") 686s xlabel ("values in x") 686s ylabel ("probability") 686s ***** shared x, y 686s x = [-Inf, 1, 2, Inf]; 686s y = [0, 0.3679, 0.6922, 1]; 686s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 686s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 686s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 686s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 686s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 686s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 686s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 686s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 686s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 686s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 686s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 686s ***** error gumbelcdf () 686s ***** error gumbelcdf (1,2,3,4,5,6,7) 686s ***** error gumbelcdf (1, 2, 3, 4, "uper") 686s ***** error ... 686s gumbelcdf (ones (3), ones (2), ones (2)) 686s ***** error gumbelcdf (2, 3, 4, [1, 2]) 686s ***** error ... 686s [p, plo, pup] = gumbelcdf (1, 2, 3) 686s ***** error [p, plo, pup] = ... 686s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 686s ***** error [p, plo, pup] = ... 686s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 686s ***** error [p, plo, pup] = ... 686s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 686s ***** error gumbelcdf (i, 2, 2) 686s ***** error gumbelcdf (2, i, 2) 686s ***** error gumbelcdf (2, 2, i) 686s ***** error ... 686s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 686s 24 tests, 24 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/raylpdf.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/raylpdf.m 686s ***** demo 686s ## Plot various PDFs from the Rayleigh distribution 686s x = 0:0.01:10; 686s y1 = raylpdf (x, 0.5); 686s y2 = raylpdf (x, 1); 686s y3 = raylpdf (x, 2); 686s y4 = raylpdf (x, 3); 686s y5 = raylpdf (x, 4); 686s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 686s grid on 686s ylim ([0, 1.25]) 686s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 686s "σ = 3", "σ = 4"}, "location", "northeast") 686s title ("Rayleigh PDF") 686s xlabel ("values in x") 686s ylabel ("density") 686s ***** test 686s x = 0:0.5:2.5; 686s sigma = 1:6; 686s y = raylpdf (x, sigma); 686s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 686s assert (y, expected_y, 0.001); 686s ***** test 686s x = 0:0.5:2.5; 686s y = raylpdf (x, 0.5); 686s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 686s assert (y, expected_y, 0.001); 686s ***** error raylpdf () 686s ***** error raylpdf (1) 686s ***** error ... 686s raylpdf (ones (3), ones (2)) 686s ***** error ... 686s raylpdf (ones (2), ones (3)) 686s ***** error raylpdf (i, 2) 686s ***** error raylpdf (2, i) 686s 8 tests, 8 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/iwishpdf.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/iwishpdf.m 686s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 686s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 686s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 686s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 686s ***** error iwishpdf () 686s ***** error iwishpdf (1, 2) 686s ***** error iwishpdf (1, 2, 0) 686s 6 tests, 6 passed, 0 known failure, 0 skipped 686s [inst/dist_fun/ncfinv.m] 686s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/ncfinv.m 686s ***** demo 686s ## Plot various iCDFs from the noncentral F distribution 686s p = 0.001:0.001:0.999; 686s x1 = ncfinv (p, 2, 5, 1); 686s x2 = ncfinv (p, 2, 5, 2); 686s x3 = ncfinv (p, 5, 10, 1); 686s x4 = ncfinv (p, 10, 20, 10); 686s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 686s grid on 686s ylim ([0, 5]) 686s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 686s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 686s "location", "northwest") 686s title ("Noncentral F iCDF") 686s xlabel ("probability") 686s ylabel ("values in x") 686s ***** demo 686s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 686s ## same number of numerator and denominator degrees of freedom (5, 20) 686s 686s p = 0.001:0.001:0.999; 686s x1 = ncfinv (p, 5, 20, 10); 686s x2 = finv (p, 5, 20); 686s plot (p, x1, "-", p, x2, "-"); 686s grid on 686s ylim ([0, 10]) 686s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 686s title ("Noncentral F vs F quantile functions") 686s xlabel ("probability") 686s ylabel ("values in x") 686s ***** test 686s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 686s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 686s ***** test 686s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 686s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 686s ***** test 686s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 686s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 686s ***** test 686s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 686s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 686s ***** test 686s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 686s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 687s ***** test 687s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 687s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 687s ***** test 687s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 687s ***** error ncfinv () 687s ***** error ncfinv (1) 687s ***** error ncfinv (1, 2) 687s ***** error ncfinv (1, 2, 3) 687s ***** error ... 687s ncfinv (ones (3), ones (2), ones (2), ones (2)) 687s ***** error ... 687s ncfinv (ones (2), ones (3), ones (2), ones (2)) 687s ***** error ... 687s ncfinv (ones (2), ones (2), ones (3), ones (2)) 687s ***** error ... 687s ncfinv (ones (2), ones (2), ones (2), ones (3)) 687s ***** error ncfinv (i, 2, 2, 2) 687s ***** error ncfinv (2, i, 2, 2) 687s ***** error ncfinv (2, 2, i, 2) 687s ***** error ncfinv (2, 2, 2, i) 687s 19 tests, 19 passed, 0 known failure, 0 skipped 687s [inst/dist_fun/nbinpdf.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_fun/nbinpdf.m 687s ***** demo 687s ## Plot various PDFs from the negative binomial distribution 687s x = 0:40; 687s y1 = nbinpdf (x, 2, 0.15); 687s y2 = nbinpdf (x, 5, 0.2); 687s y3 = nbinpdf (x, 4, 0.4); 687s y4 = nbinpdf (x, 10, 0.3); 687s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 687s grid on 687s xlim ([0, 40]) 687s ylim ([0, 0.12]) 687s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 687s "r = 10, ps = 0.3"}, "location", "northeast") 687s title ("Negative binomial PDF") 687s xlabel ("values in x (number of failures)") 687s ylabel ("density") 687s ***** shared x, y 687s x = [-1 0 1 2 Inf]; 687s y = [0 1/2 1/4 1/8 NaN]; 687s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 687s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 687s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 687s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 687s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 687s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 687s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 687s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 687s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 687s ***** error nbinpdf () 687s ***** error nbinpdf (1) 687s ***** error nbinpdf (1, 2) 687s ***** error ... 687s nbinpdf (ones (3), ones (2), ones (2)) 687s ***** error ... 687s nbinpdf (ones (2), ones (3), ones (2)) 687s ***** error ... 687s nbinpdf (ones (2), ones (2), ones (3)) 687s ***** error nbinpdf (i, 2, 2) 687s ***** error nbinpdf (2, i, 2) 687s ***** error nbinpdf (2, 2, i) 687s 18 tests, 18 passed, 0 known failure, 0 skipped 687s [inst/glmfit.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/glmfit.m 687s ***** demo 687s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 687s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 687s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 687s b = glmfit (x, [y n], "binomial", "Link", "probit"); 687s yfit = glmval (b, x, "probit", "Size", n); 687s plot (x, y./n, 'o', x, yfit ./ n, '-') 687s ***** demo 687s load fisheriris 687s X = meas (51:end, :); 687s y = strcmp ("versicolor", species(51:end)); 687s b = glmfit (X, y, "binomial", "link", "logit") 687s ***** test 687s load fisheriris; 687s X = meas(51:end,:); 687s y = strcmp ("versicolor", species(51:end)); 687s b = glmfit (X, y, "binomial", "link", "logit"); 687s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 687s ***** test 687s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 687s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 687s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 687s b_matlab = [-0.7631; 0.1113]; 687s dev_matlab = 0.0111; 687s assert (Bnew, b_matlab, 0.001); 687s assert (dev, dev_matlab, 0.001); 687s ***** test 687s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 687s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 687s p_input = 1; 687s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 687s b_matlab = [0.3813; 0.0950]; 687s dev_matlab = 0.0051; 687s assert (Bnew, b_matlab, 0.001); 687s assert (dev, dev_matlab, 0.001); 687s ***** error glmfit () 687s ***** error glmfit (1) 687s ***** error glmfit (1, 2) 687s ***** error ... 687s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 687s ***** error ... 687s glmfit ('abc', rand (6, 1), 'poisson') 687s ***** error ... 687s glmfit ([], rand (6, 1), 'poisson') 687s ***** error ... 687s glmfit (rand (5, 2), 'abc', 'poisson') 687s ***** error ... 687s glmfit (rand (5, 2), [], 'poisson') 687s ***** error ... 687s glmfit (rand (5, 2), rand (6, 1), 'poisson') 687s ***** error ... 687s glmfit (rand (6, 2), rand (6, 1), 3) 687s ***** error ... 687s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 3), 'binomial') 687s ***** error ... 687s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 2), 'normal') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 687s ***** error ... 687s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 687s ***** error ... 687s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 687s 70 tests, 70 passed, 0 known failure, 0 skipped 687s [inst/monotone_smooth.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/monotone_smooth.m 687s ***** error ... 687s monotone_smooth (1) 687s ***** error ... 687s monotone_smooth ("char", 1) 687s ***** error ... 687s monotone_smooth ({1,2,3}, 1) 687s ***** error ... 687s monotone_smooth (ones(20,3), 1) 687s ***** error ... 687s monotone_smooth (1, "char") 687s ***** error ... 687s monotone_smooth (1, {1,2,3}) 687s ***** error ... 687s monotone_smooth (1, ones(20,3)) 687s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 687s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 687s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 687s 10 tests, 10 passed, 0 known failure, 0 skipped 687s [inst/pcacov.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/pcacov.m 687s ***** demo 687s x = [ 7 26 6 60; 687s 1 29 15 52; 687s 11 56 8 20; 687s 11 31 8 47; 687s 7 52 6 33; 687s 11 55 9 22; 687s 3 71 17 6; 687s 1 31 22 44; 687s 2 54 18 22; 687s 21 47 4 26; 687s 1 40 23 34; 687s 11 66 9 12; 687s 10 68 8 12 687s ]; 687s Kxx = cov (x); 687s [coeff, latent, explained] = pcacov (Kxx) 687s ***** test 687s load hald 687s Kxx = cov (ingredients); 687s [coeff,latent,explained] = pcacov(Kxx); 687s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 687s -0.6785, -0.0200, -0.5440, 0.4933; ... 687s 0.0290, 0.7553, 0.4036, 0.5156; ... 687s 0.7309, -0.1085, -0.4684, 0.4844]; 687s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 687s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 687s assert (coeff, c_out, 1e-4); 687s assert (latent, l_out, 1e-4); 687s assert (explained, e_out, 1e-4); 687s ***** error pcacov (ones (2,3)) 687s ***** error pcacov (ones (3,3,3)) 687s 3 tests, 3 passed, 0 known failure, 0 skipped 687s [inst/ztest2.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ztest2.m 687s ***** error ztest2 (); 687s ***** error ztest2 (1); 687s ***** error ztest2 (1, 2); 687s ***** error ztest2 (1, 2, 3); 687s ***** error ztest2 (1, 2, 3, 2); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha") 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha", 0); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha", 1.2); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha", "val"); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "tail", "val"); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 687s ***** error ... 687s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 687s 12 tests, 12 passed, 0 known failure, 0 skipped 687s [inst/normplot.m] 687s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/normplot.m 687s ***** demo 687s h = normplot([1:20]); 687s ***** demo 687s h = normplot([1:20;5:2:44]'); 687s ***** demo 687s ax = newplot(); 687s h = normplot(ax, [1:20]); 687s ax = gca; 687s h = normplot(ax, [-10:10]); 687s set (ax, "xlim", [-11, 21]); 687s ***** error normplot (); 687s ***** error normplot (23); 687s ***** error normplot (23, [1:20]); 687s ***** error normplot (ones(3,4,5)); 687s ***** test 687s hf = figure ("visible", "off"); 687s unwind_protect 687s ax = newplot (hf); 687s h = normplot (ax, [1:20]); 687s ax = gca; 687s h = normplot(ax, [-10:10]); 687s set (ax, "xlim", [-11, 21]); 687s unwind_protect_cleanup 687s close (hf); 687s end_unwind_protect 687s ***** test 687s hf = figure ("visible", "off"); 687s unwind_protect 687s h = normplot([1:20;5:2:44]'); 687s unwind_protect_cleanup 687s close (hf); 687s end_unwind_protect 688s 6 tests, 6 passed, 0 known failure, 0 skipped 688s [inst/tabulate.m] 688s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/tabulate.m 688s ***** demo 688s ## Generate a frequency table for a vector of data in a cell array 688s load patients 688s 688s ## Display the first seven entries of the Gender variable 688s gender = Gender(1:7) 688s 688s ## Compute the frequency table that shows the number and 688s ## percentage of Male and Female patients 688s tabulate (Gender) 688s ***** demo 688s ## Create a frequency table for a vector of positive integers 688s load patients 688s 688s ## Display the first seven entries of the Gender variable 688s height = Height(1:7) 688s 688s ## Create a frequency table that shows, in its second and third columns, 688s ## the number and percentage of patients with a particular height. 688s table = tabulate (Height); 688s 688s ## Display the first and last seven entries of the frequency table 688s first = table(1:7,:) 688s 688s last = table(end-6:end,:) 688s ***** demo 688s ## Create a frequency table from a character array 688s load carsmall 688s 688s ## Tabulate the data in the Origin variable, which shows the 688s ## country of origin of each car in the data set 688s tabulate (Origin) 688s ***** demo 688s ## Create a frequency table from a numeric vector with NaN values 688s load carsmall 688s 688s ## The carsmall dataset contains measurements of 100 cars 688s total_cars = length (MPG) 688s ## For six cars, the MPG value is missing 688s missingMPG = length (MPG(isnan (MPG))) 688s 688s ## Create a frequency table using MPG 688s tabulate (MPG) 688s table = tabulate (MPG); 688s 688s ## Only 94 cars were used 688s valid_cars = sum (table(:,2)) 688s ***** test 688s load patients 688s table = tabulate (Gender); 688s assert (table{1,1}, "Male"); 688s assert (table{2,1}, "Female"); 688s assert (table{1,2}, 47); 688s assert (table{2,2}, 53); 688s ***** test 688s load patients 688s table = tabulate (Height); 688s assert (table(end-4,:), [68, 15, 15]); 688s assert (table(end-3,:), [69, 8, 8]); 688s assert (table(end-2,:), [70, 11, 11]); 688s assert (table(end-1,:), [71, 10, 10]); 688s assert (table(end,:), [72, 4, 4]); 688s ***** error tabulate (ones (3)) 688s ***** error tabulate ({1, 2, 3, 4}) 688s ***** error ... 688s tabulate ({"a", "b"; "a", "c"}) 688s 5 tests, 5 passed, 0 known failure, 0 skipped 688s [inst/standardizeMissing.m] 688s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/standardizeMissing.m 688s ***** assert (standardizeMissing (1, 1), NaN) 688s ***** assert (standardizeMissing (1, 0), 1) 688s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 688s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 688s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 688s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 688s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 688s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 688s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 688s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 688s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 688s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 688s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 688s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 688s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 688s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 688s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 688s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 688s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 688s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 688s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 688s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 688s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 688s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 688s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 688s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 688s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 688s ***** assert (standardizeMissing (single (1), true), single (NaN)) 688s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 688s ***** assert (standardizeMissing (true, true), true) 688s ***** assert (standardizeMissing (true, 1), true) 688s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 688s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 688s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 688s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 688s ***** error standardizeMissing (); 688s ***** error standardizeMissing (1); 688s ***** error standardizeMissing (1,2,3); 688s ***** error standardizeMissing ({'abc', 1}, 1); 688s ***** error standardizeMissing (struct ('a','b'), 1); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 688s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 688s 49 tests, 49 passed, 0 known failure, 0 skipped 688s [inst/fitcnet.m] 688s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fitcnet.m 688s ***** demo 688s ## Train a Neural Network on the Fisher's Iris data set and display 688s ## a confusion chart with the classification results. 688s 688s load fisheriris 688s Mdl = fitcnet (meas, species); 688s pred_species = resubPredict (Mdl); 688s confusionchart (species, pred_species, "Title", ... 688s "Fully Connected Neural Network classification on Fisher's Iris dataset"); 688s ***** test 688s load fisheriris 688s x = meas; 688s y = grp2idx (species); 688s Mdl = fitcnet (x, y, "IterationLimit", 50); 688s assert (class (Mdl), "ClassificationNeuralNetwork"); 688s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 688s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 688s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 688s ***** error fitcnet () 688s ***** error fitcnet (ones (4,1)) 688s ***** error 688s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 688s ***** error 688s fitcnet (ones (4,2), ones (3, 1)) 688s ***** error 688s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 688s 6 tests, 6 passed, 0 known failure, 0 skipped 688s [inst/multiway.m] 688s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/multiway.m 688s ***** test 688s numbers = [4, 5, 6, 7, 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 688s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 688s ***** test 688s numbers = [1, 2, 3, 4, 5, 6]; 688s num_parts = 3; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 688s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 688s ***** test 688s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 688s num_parts = 3; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 688s assert (sort (cellfun (@sum, partition)), sort ([38, 38, 37])); 688s ***** test 688s numbers = [10, 10, 10]; 688s num_parts = 3; 688s [~, partition] = multiway (numbers, num_parts, "completeKK"); 688s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 688s ***** test 688s numbers = 1:10; 688s num_parts = 2; 688s [~, partition] = multiway (numbers, num_parts, "completeKK"); 688s assert (sort (cellfun (@sum, partition)), [27, 28]); 688s ***** test 688s numbers = [4, 5, 6, 7, 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 688s ***** test 688s numbers = [1, 2, 3, 4, 5, 6]; 688s num_parts = 3; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 688s ***** test 688s numbers = [10, 7, 5, 5, 6, 4, 10, 11, 12, 9, 10, 4, 3, 4, 5]; 688s num_parts = 4; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), sort ([27, 27, 27, 24])); 688s ***** test 688s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 688s num_parts = 3; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), sort ([35, 37, 41])); 688s ***** test 688s numbers = [10, 10, 10]; 688s num_parts = 3; 688s [~, partition] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 688s ***** test 688s numbers = 1:10; 688s num_parts = 2; 688s [~, partition] = multiway (numbers, num_parts, "greedy"); 688s assert (sort (cellfun (@sum, partition)), [27, 28]); 688s ***** test 688s grpidx_ckk = multiway ([3 2 4 3 9 3 64], 3); 688s grpidx_greedy = multiway ([3 2 4 3 9 3 64], 3, 'greedy'); 688s assert (isequal (grpidx_ckk, grpidx_greedy), false); 688s ***** test 688s numbers = [4; 5; 6; 7; 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 688s assert (iscolumn (groupindex), true) 688s assert (iscolumn (groupsizes), true); 688s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 688s numbers = [4; 5; 6; 7; 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (iscolumn (groupindex), true) 688s assert (iscolumn (groupsizes), true); 688s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 688s ***** test 688s numbers = [4, 5, 6, 7, 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 688s assert (isrow (groupindex), true) 688s assert (isrow (groupsizes), true); 688s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 688s ***** test 688s numbers = [4, 5, 6, 7, 8]; 688s num_parts = 2; 688s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 688s assert (isrow (groupindex), true) 688s assert (isrow (groupsizes), true); 688s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 688s ***** error multiway () 688s ***** error multiway ([1, 2]) 688s ***** error ... 688s multiway ([1, 2, 3], 2, 1) 688s ***** error multiway ([], 2) 688s ***** error multiway (ones (2, 2), 2) 688s ***** error ... 688s multiway ({1, 2, 3}, 2) 688s ***** error multiway ([1, -2, 3], 2) 688s ***** error ... 688s multiway ([1, 2, NaN], 2) 688s ***** error multiway ([1,2,3], [1,2]) 688s ***** error ... 688s multiway ([1, 2, 3], "2") 688s ***** error multiway ([1, 2, 3], 0) 688s ***** error multiway ([1, 2, 3], 1.5) 688s ***** error multiway ([1, 2, 3], -1) 688s ***** error ... 688s multiway ([1, 2], 3) 688s ***** error ... 688s multiway ([1,2,3], 2, "greedyalgo") 688s 30 tests, 30 passed, 0 known failure, 0 skipped 688s [inst/anovan.m] 689s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/anovan.m 689s ***** demo 689s 689s # Two-sample unpaired test on independent samples (equivalent to Student's 689s # t-test). Note that the absolute value of t-statistic can be obtained by 689s # taking the square root of the reported F statistic. In this example, 689s # t = sqrt (1.44) = 1.20. 689s 689s score = [54 23 45 54 45 43 34 65 77 46 65]'; 689s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 689s "female" "female" "female"}'; 689s 689s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 689s ***** demo 689s 689s # Two-sample paired test on dependent or matched samples equivalent to a 689s # paired t-test. As for the first example, the t-statistic can be obtained by 689s # taking the square root of the reported F statistic. Note that the interaction 689s # between treatment x subject was dropped from the full model by assigning 689s # subject as a random factor ('). 689s 689s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 689s treatment = {"before" "after"; "before" "after"; "before" "after"; 689s "before" "after"; "before" "after"}'; 689s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 689s 689s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 689s "model", "full", "random", 2, "sstype", 2, ... 689s "varnames", {"treatment", "subject"}, ... 689s "display", "on"); 689s ***** demo 689s 689s # One-way ANOVA on the data from a study on the strength of structural beams, 689s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 689s 689s strength = [82 86 79 83 84 85 86 87 74 82 ... 689s 78 75 76 77 79 79 77 78 82 79]'; 689s alloy = {"st","st","st","st","st","st","st","st", ... 689s "al1","al1","al1","al1","al1","al1", ... 689s "al2","al2","al2","al2","al2","al2"}'; 689s 689s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 689s "varnames", "alloy"); 689s ***** demo 689s 689s # One-way repeated measures ANOVA on the data from a study on the number of 689s # words recalled by 10 subjects for three time conditions, in Loftus & Masson 689s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 689s # between seconds x subject was dropped from the full model by assigning 689s # subject as a random factor ('). 689s 689s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 689s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 689s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 689s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 689s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 689s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 689s 689s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 689s "model", "full", "random", 2, "sstype", 2, ... 689s "display", "on", "varnames", {"seconds", "subject"}); 689s ***** demo 689s 689s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 689s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 689s # New York: MacMillan 689s 689s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 689s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 689s brands = {"Gourmet", "National", "Generic"; ... 689s "Gourmet", "National", "Generic"; ... 689s "Gourmet", "National", "Generic"; ... 689s "Gourmet", "National", "Generic"; ... 689s "Gourmet", "National", "Generic"; ... 689s "Gourmet", "National", "Generic"}; 689s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 689s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 689s 689s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 689s "display", "on", "model", "full", ... 689s "varnames", {"brands", "popper"}); 689s ***** demo 689s 689s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 689s # gender and having a college degree on salaries of company employees, 689s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 689s 689s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 689s 25 29 27 19 18 21 20 21 22 19]'; 689s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 689s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 689s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 689s 689s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 689s "sstype", 3, "display", "on", "varnames", ... 689s {"gender", "degree"}); 689s ***** demo 689s 689s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 689s # adding sugar and/or milk on the tendency of coffee to make people babble, 689s # in from Navarro (2019): 16.10 689s 689s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 689s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 689s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 689s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 689s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 689s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 689s 689s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 689s "sstype", 3, "display", "on", ... 689s "varnames", {"sugar", "milk"}); 689s ***** demo 689s 689s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 689s # of three different drugs, biofeedback and diet on patient blood pressure, 689s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 689s # * Missing values introduced to make the sample sizes unequal to test the 689s # calculation of different types of sums-of-squares 689s 689s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 689s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 689s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 689s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 689s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 689s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 689s 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; 689s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 689s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 689s 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; 689s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 689s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 689s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 689s 173 194 197 190 176 198 164 190 169 164 176 175; 689s 186 194 201 215 219 209 164 166 159 182 187 174 ... 689s 189 194 217 206 199 195 171 173 196 199 180 NaN; 689s 180 187 199 170 204 194 162 184 183 156 180 173 ... 689s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 689s 689s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 689s "model", "full", "sstype", 3, ... 689s "display", "on", ... 689s "varnames", {"drug", "feedback", "diet"}); 689s ***** demo 689s 689s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 689s # factor. The data is from a randomized block design study on the effects 689s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 689s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 689s # Note that all interactions involving block were dropped from the full model 689s # by assigning block as a random factor ('). 689s 689s measurement = [444 614 423 625 408 856 447 719 ... 689s 764 831 586 782 609 1002 606 766]'; 689s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 689s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 689s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 689s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 689s 689s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 689s "sstype", 2, "model", "full", "random", 3, ... 689s "display", "on", ... 689s "varnames", {"strain", "treatment", "block"}); 689s ***** demo 689s 689s # One-way ANCOVA on data from a study of the additive effects of species 689s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 689s # Text eveR 689s 689s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 689s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 689s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 689s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 689s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 689s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 689s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 689s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 689s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 689s 689s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 689s "continuous", 2, "sstype", "h", "display", "on", ... 689s "varnames", {"species", "temp"}); 689s ***** demo 689s 689s # Factorial ANCOVA on data from a study of the effects of treatment and 689s # exercise on stress reduction score after adjusting for age. Data from R 689s # datarium package). 689s 689s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 689s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 689s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 689s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 689s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 689s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 689s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 689s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 689s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 689s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 689s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 689s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 689s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 689s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 689s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 689s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 689s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 689s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 689s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 689s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 689s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 689s 689s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 689s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 689s "continuous", 3, "sstype", "h", "display", "on", ... 689s "varnames", {"treatment", "exercise", "age"}); 689s ***** demo 689s 689s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 689s # relating to the contrasts are shown in the table of model parameters, and 689s # can be retrieved from the STATS.coeffs output. 689s 689s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 689s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 689s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 689s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 689s 25.694 ]'; 689s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 689s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 689s C = [ 0.4001601 0.3333333 0.5 0.0 689s 0.4001601 0.3333333 -0.5 0.0 689s 0.4001601 -0.6666667 0.0 0.0 689s -0.6002401 0.0000000 0.0 0.5 689s -0.6002401 0.0000000 0.0 -0.5]; 689s 689s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 689s "alpha", 0.05, "display", "on"); 689s ***** demo 689s 689s # One-way ANOVA with the linear model fit by weighted least squares to 689s # account for heteroskedasticity. In this example, the variance appears 689s # proportional to the outcome, so weights have been estimated by initially 689s # fitting the model without weights and regressing the absolute residuals on 689s # the fitted values. Although this data could have been analysed by Welch's 689s # ANOVA test, the approach here can generalize to ANOVA models with more than 689s # one factor. 689s 689s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 689s 2, 2, 2, 2, 2, 2, 2, 2, ... 689s 3, 3, 3, 3, 3, 3, 3, 3]'; 689s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 689s 10, 25, 66, 43, 47, 56, 6, 39, ... 689s 11, 39, 26, 35, 25, 14, 24, 17]'; 689s 689s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 689s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 689s b = polyfit (fitted, abs (STATS.resid), 1); 689s v = polyval (b, fitted); # Variance as a function of the fitted values 689s figure("Name", "Regression of the absolute residuals on the fitted values"); 689s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 689s xlabel("Fitted values"); ylabel("Absolute residuals"); 689s 689s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 689s ***** test 689s score = [54 23 45 54 45 43 34 65 77 46 65]'; 689s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 689s 'female' 'female' 'female'}'; 689s 689s [P, T, STATS] = anovan (score,gender,'display','off'); 689s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 689s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 689s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 689s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 689s ***** test 689s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 689s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 689s 'before' 'after'; 'before' 'after'}'; 689s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 689s 689s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 689s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 689s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 689s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 689s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 689s ***** test 689s strength = [82 86 79 83 84 85 86 87 74 82 ... 689s 78 75 76 77 79 79 77 78 82 79]'; 689s alloy = {'st','st','st','st','st','st','st','st', ... 689s 'al1','al1','al1','al1','al1','al1', ... 689s 'al2','al2','al2','al2','al2','al2'}'; 689s 689s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 689s assert (P(1), 0.000152643638830491, 1e-09); 689s assert (ATAB{2,6}, 15.4, 1e-09); 689s ***** test 689s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 689s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 689s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 689s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 689s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 689s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 689s 689s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 689s assert (P(1), 1.51865926758752e-07, 1e-09); 689s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 689s assert (ATAB{3,2}, 942.533333333333, 1e-09); 689s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 689s ***** test 689s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 689s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 689s brands = {'Gourmet', 'National', 'Generic'; ... 689s 'Gourmet', 'National', 'Generic'; ... 689s 'Gourmet', 'National', 'Generic'; ... 689s 'Gourmet', 'National', 'Generic'; ... 689s 'Gourmet', 'National', 'Generic'; ... 689s 'Gourmet', 'National', 'Generic'}; 689s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 689s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 689s 689s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 689s assert (P(1), 7.67895738278171e-07, 1e-09); 689s assert (P(2), 0.000100373896304998, 1e-09); 689s assert (P(3), 0.746215396636649, 1e-09); 689s assert (ATAB{2,6}, 56.7, 1e-09); 689s assert (ATAB{3,6}, 32.4, 1e-09); 689s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 689s ***** test 689s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 689s 25 29 27 19 18 21 20 21 22 19]'; 689s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 689s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 689s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 689s 689s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 689s assert (P(1), 0.747462549227232, 1e-09); 689s assert (P(2), 1.03809316857694e-08, 1e-09); 689s assert (P(3), 0.523689833702691, 1e-09); 689s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 689s assert (ATAB{3,2}, 272.391841491841, 1e-09); 689s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 689s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 689s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 689s assert (P(1), 2.53445097305047e-08, 1e-09); 689s assert (P(2), 0.00388133678528749, 1e-09); 689s assert (P(3), 0.523689833702671, 1e-09); 689s assert (ATAB{2,2}, 242.227272727273, 1e-09); 689s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 689s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 689s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 689s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 689s assert (P(1), 0.00388133678528743, 1e-09); 689s assert (P(2), 1.03809316857694e-08, 1e-09); 689s assert (P(3), 0.523689833702691, 1e-09); 689s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 689s assert (ATAB{3,2}, 272.391841491841, 1e-09); 689s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 689s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 689s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 689s assert (P(1), 0.00442898146583742, 1e-09); 689s assert (P(2), 1.30634252053587e-08, 1e-09); 689s assert (P(3), 0.523689833702691, 1e-09); 689s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 689s assert (ATAB{3,2}, 264.335664335664, 1e-09); 689s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 689s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 689s ***** test 689s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 689s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 689s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 689s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 689s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 689s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 689s 689s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 689s assert (P(1), 0.0108632139833963, 1e-09); 689s assert (P(2), 0.0810606976703546, 1e-09); 689s assert (P(3), 0.00175433329935627, 1e-09); 689s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 689s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 689s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 689s assert (ATAB{5,2}, 3.1625, 1e-09); 689s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 689s assert (P(1), 0.0373333189297505, 1e-09); 689s assert (P(2), 0.017075098787169, 1e-09); 689s assert (P(3), 0.00175433329935627, 1e-09); 689s assert (ATAB{2,2}, 1.444, 1e-09); 689s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 689s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 689s assert (ATAB{5,2}, 3.1625, 1e-09); 689s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 689s assert (P(1), 0.017075098787169, 1e-09); 689s assert (P(2), 0.0810606976703546, 1e-09); 689s assert (P(3), 0.00175433329935627, 1e-09); 689s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 689s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 689s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 689s assert (ATAB{5,2}, 3.1625, 1e-09); 689s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 689s assert (P(1), 0.0454263063473954, 1e-09); 689s assert (P(2), 0.0746719907091438, 1e-09); 689s assert (P(3), 0.00175433329935627, 1e-09); 689s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 689s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 689s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 689s assert (ATAB{5,2}, 3.1625, 1e-09); 689s ***** test 689s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 689s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 689s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 689s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 689s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 689s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 689s 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; 689s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 689s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 689s 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; 689s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 689s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 689s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 689s 173 194 197 190 176 198 164 190 169 164 176 175; 689s 186 194 201 215 219 209 164 166 159 182 187 174 ... 689s 189 194 217 206 199 195 171 173 196 199 180 NaN; 689s 180 187 199 170 204 194 162 184 183 156 180 173 ... 689s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 689s 689s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 689s assert (P(1), 7.02561843825325e-05, 1e-09); 689s assert (P(2), 0.000425806013389362, 1e-09); 689s assert (P(3), 6.16780773446401e-07, 1e-09); 689s assert (P(4), 0.261347622678438, 1e-09); 689s assert (P(5), 0.0542278432357043, 1e-09); 689s assert (P(6), 0.590353225626655, 1e-09); 689s assert (P(7), 0.0861628249564267, 1e-09); 689s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 689s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 689s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 689s assert (ATAB{5,2}, 437.066007908781, 1e-09); 689s assert (ATAB{6,2}, 976.180770397332, 1e-09); 689s assert (ATAB{7,2}, 46.616653365254, 1e-09); 689s assert (ATAB{8,2}, 814.345251396648, 1e-09); 689s assert (ATAB{9,2}, 9065.8, 1e-09); 689s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 689s assert (P(1), 9.4879638470754e-05, 1e-09); 689s assert (P(2), 0.00124177666315809, 1e-09); 689s assert (P(3), 6.86162012732911e-07, 1e-09); 689s assert (P(4), 0.260856132341256, 1e-09); 689s assert (P(5), 0.0523758623892078, 1e-09); 689s assert (P(6), 0.590353225626655, 1e-09); 689s assert (P(7), 0.0861628249564267, 1e-09); 689s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 689s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 689s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 689s assert (ATAB{5,2}, 437.693674777847, 1e-09); 689s assert (ATAB{6,2}, 988.431929811402, 1e-09); 689s assert (ATAB{7,2}, 46.616653365254, 1e-09); 689s assert (ATAB{8,2}, 814.345251396648, 1e-09); 689s assert (ATAB{9,2}, 9065.8, 1e-09); 689s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 689s assert (P(1), 0.000106518678028207, 1e-09); 689s assert (P(2), 0.00125371366571508, 1e-09); 689s assert (P(3), 5.30813260778464e-07, 1e-09); 689s assert (P(4), 0.308353667232981, 1e-09); 689s assert (P(5), 0.0562901327343161, 1e-09); 689s assert (P(6), 0.599091042141092, 1e-09); 689s assert (P(7), 0.0861628249564267, 1e-09); 689s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 689s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 689s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 689s assert (ATAB{5,2}, 382.07709497207, 1e-09); 689s assert (ATAB{6,2}, 963.037988826813, 1e-09); 689s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 689s assert (ATAB{8,2}, 814.345251396648, 1e-09); 689s assert (ATAB{9,2}, 9065.8, 1e-09); 689s ***** test 689s measurement = [444 614 423 625 408 856 447 719 ... 689s 764 831 586 782 609 1002 606 766]'; 689s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 689s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 689s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 689s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 689s 689s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 689s assert (P(1), 0.0914352969909372, 1e-09); 689s assert (P(2), 5.04077373924908e-05, 1e-09); 689s assert (P(4), 0.0283196918836667, 1e-09); 689s assert (ATAB{2,2}, 286.132500000002, 1e-09); 689s assert (ATAB{3,2}, 2275.29, 1e-09); 689s assert (ATAB{4,2}, 1242.5625, 1e-09); 689s assert (ATAB{5,2}, 495.905000000001, 1e-09); 689s assert (ATAB{6,2}, 207.007499999999, 1e-09); 689s ***** test 689s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 689s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 689s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 689s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 689s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 689s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 689s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 689s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 689s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 689s 689s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 689s assert (P(1), 6.27153318786007e-14, 1e-09); 689s assert (P(2), 2.48773241196644e-25, 1e-09); 689s assert (ATAB{2,2}, 598.003953318404, 1e-09); 689s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 689s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 689s assert (ATAB{2,6}, 187.399388123951, 1e-09); 689s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 689s ***** test 689s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 689s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 689s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 689s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 689s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 689s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 689s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 689s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 689s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 689s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 689s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 689s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 689s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 689s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 689s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 689s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 689s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 689s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 689s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 689s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 689s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 689s 689s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 689s assert (P(5), 0.9245630968248468, 1e-09); 689s assert (P(6), 0.791115159521822, 1e-09); 689s assert (P(7), 0.9296668751457956, 1e-09); 689s [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'); 689s assert (P(1), 0.00158132928938933, 1e-09); 689s assert (P(2), 2.12537505039986e-07, 1e-09); 689s assert (P(3), 0.00390292555160047, 1e-09); 689s assert (P(4), 0.0164086580775543, 1e-09); 689s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 689s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 689s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 689s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 689s ***** test 689s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 689s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 689s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 689s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 689s 25.694 ]'; 689s 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]'; 689s C = [ 0.4001601 0.3333333 0.5 0.0 689s 0.4001601 0.3333333 -0.5 0.0 689s 0.4001601 -0.6666667 0.0 0.0 689s -0.6002401 0.0000000 0.0 0.5 689s -0.6002401 0.0000000 0.0 -0.5]; 689s 689s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 689s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 689s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 689s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 689s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 689s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 689s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 689s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 689s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 689s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 689s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 689s assert (STATS.coeffs(1,5), 40.161, 1e-03); 689s assert (STATS.coeffs(2,5), -9.624, 1e-03); 689s assert (STATS.coeffs(3,5), -3.825, 1e-03); 689s assert (STATS.coeffs(4,5), -4.875, 1e-03); 689s assert (STATS.coeffs(5,5), -5.515, 1e-03); 689s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 689s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 689s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 689s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 690s 12 tests, 12 passed, 0 known failure, 0 skipped 690s [inst/violin.m] 690s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/violin.m 690s ***** demo 690s clf 690s x = zeros (9e2, 10); 690s for i=1:10 690s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 690s endfor 690s h = violin (x, "color", "c"); 690s axis tight 690s set (h.violin, "linewidth", 2); 690s set (gca, "xgrid", "on"); 690s xlabel ("Variables") 690s ylabel ("Values") 690s ***** demo 690s clf 690s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 690s subplot (1,2,1) 690s title ("Grade 3 heights - vertical"); 690s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 690s violin (data, "Nbins", 10); 690s axis tight 690s 690s subplot(1,2,2) 690s title ("Grade 3 heights - horizontal"); 690s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 690s violin (data, "horizontal", "Nbins", 10); 690s axis tight 690s ***** demo 690s clf 690s data = exprnd (0.1, 500,4); 690s violin (data, "nbins", {5,10,50,100}); 690s axis ([0 5 0 max(data(:))]) 690s ***** demo 690s clf 690s data = exprnd (0.1, 500,4); 690s violin (data, "color", jet(4)); 690s axis ([0 5 0 max(data(:))]) 690s ***** demo 690s clf 690s data = repmat(exprnd (0.1, 500,1), 1, 4); 690s violin (data, "width", linspace (0.1,0.5,4)); 690s axis ([0 5 0 max(data(:))]) 690s ***** demo 690s clf 690s data = repmat(exprnd (0.1, 500,1), 1, 4); 690s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 690s axis ([0 5 0 max(data(:))]) 690s ***** test 690s hf = figure ("visible", "off"); 690s unwind_protect 690s data = exprnd (0.1, 500,4); 690s violin (data, "color", jet(4)); 690s axis ([0 5 0 max(data(:))]) 690s unwind_protect_cleanup 690s close (hf); 690s end_unwind_protect 690s ***** test 690s hf = figure ("visible", "off"); 690s unwind_protect 690s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 690s subplot (1,2,1) 690s title ("Grade 3 heights - vertical"); 690s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 690s violin (data, "Nbins", 10); 690s axis tight 690s unwind_protect_cleanup 690s close (hf); 690s end_unwind_protect 690s ***** test 690s hf = figure ("visible", "off"); 690s unwind_protect 690s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 690s subplot (1,2,1) 690s title ("Grade 3 heights - vertical"); 690s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 690s violin (data, "Nbins", 10); 690s axis tight 690s subplot(1,2,2) 690s title ("Grade 3 heights - horizontal"); 690s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 690s violin (data, "horizontal", "Nbins", 10); 690s axis tight 690s unwind_protect_cleanup 690s close (hf); 690s end_unwind_protect 691s ***** test 691s hf = figure ("visible", "off"); 691s unwind_protect 691s data = repmat(exprnd (0.1, 500,1), 1, 4); 691s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 691s axis ([0 5 0 max(data(:))]) 691s unwind_protect_cleanup 691s close (hf); 691s end_unwind_protect 692s ***** test 692s hf = figure ("visible", "off"); 692s unwind_protect 692s data = repmat(exprnd (0.1, 500,1), 1, 4); 692s violin (data, "width", linspace (0.1,0.5,4)); 692s axis ([0 5 0 max(data(:))]) 692s unwind_protect_cleanup 692s close (hf); 692s end_unwind_protect 692s 5 tests, 5 passed, 0 known failure, 0 skipped 692s [inst/dcov.m] 692s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dcov.m 692s ***** demo 692s base=@(x) (x- min(x))./(max(x)-min(x)); 692s N = 5e2; 692s x = randn (N,1); x = base (x); 692s z = randn (N,1); z = base (z); 692s # Linear relations 692s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 692s ly = x .* cy; 692s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 692s # Correlated Gaussian 692s cz = 1 - abs (cy); 692s gy = base ( ly + cz.*z); 692s # Shapes 692s sx = repmat (x,1,7); 692s sy = zeros (size (ly)); 692s v = 2 * rand (size(x,1),2) - 1; 692s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 692s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 692s tmp = R(35) * v.'; 692s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 692s tmp = R(45) * v.'; 692s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 692s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 692s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 692s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 692s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 692s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 692s sy = base (sy); 692s sx = base (sx); 692s # scaled shape 692s sc = 1/3; 692s ssy = (sy-0.5) * sc + 0.5; 692s n = size (ly,2); 692s ym = 1.2; 692s xm = 0.5; 692s fmt={'horizontalalignment','center'}; 692s ff = "% .2f"; 692s figure (1) 692s for i=1:n 692s subplot(4,n,i); 692s plot (x, gy(:,i), '.b'); 692s axis tight 692s axis off 692s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 692s 692s subplot(4,n,i+n); 692s plot (x, ly(:,i), '.b'); 692s axis tight 692s axis off 692s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 692s 692s subplot(4,n,i+2*n); 692s plot (sx(:,i), sy(:,i), '.b'); 692s axis tight 692s axis off 692s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 692s v = axis (); 692s 692s subplot(4,n,i+3*n); 692s plot (sx(:,i), ssy(:,i), '.b'); 692s axis (v) 692s axis off 692s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 692s endfor 692s ***** error dcov (randn (30, 5), randn (25,5)) 692s 1 test, 1 passed, 0 known failure, 0 skipped 692s [inst/chi2gof.m] 692s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/chi2gof.m 692s ***** demo 692s x = normrnd (50, 5, 100, 1); 692s [h, p, stats] = chi2gof (x) 692s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 692s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 692s ***** demo 692s x = rand (100,1 ); 692s n = length (x); 692s binedges = linspace (0, 1, 11); 692s expectedCounts = n * diff (binedges); 692s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 692s ***** demo 692s bins = 0:5; 692s obsCounts = [6 16 10 12 4 2]; 692s n = sum(obsCounts); 692s lambdaHat = sum(bins.*obsCounts) / n; 692s expCounts = n * poisspdf(bins,lambdaHat); 692s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 692s "expected", expCounts, "nparams",1) 692s ***** error chi2gof () 692s ***** error chi2gof ([2,3;3,4]) 692s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 692s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 692s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 692s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 692s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 692s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 692s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 692s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 692s ***** test 692s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 692s [h, p, stats] = chi2gof (x); 692s assert (h, 0); 692s assert (p, NaN); 692s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 692s assert (stats.df, 0); 692s assert (stats.edges, [1, 2.5, 4], 1e-14); 692s assert (stats.O, [7, 5], 1e-14); 692s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 692s 11 tests, 11 passed, 0 known failure, 0 skipped 692s [inst/jackknife.m] 692s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/jackknife.m 692s ***** demo 692s for k = 1:1000 692s rand ("seed", k); # for reproducibility 692s x = rand (10, 1); 692s s(k) = std (x); 692s jackstat = jackknife (@std, x); 692s j(k) = 10 * std (x) - 9 * mean (jackstat); 692s endfor 692s figure(); 692s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 692s ***** demo 692s for k = 1:1000 692s randn ("seed", k); # for reproducibility 692s x = randn (1, 50); 692s rand ("seed", k); # for reproducibility 692s y = rand (1, 50); 692s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 692s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 692s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 692s endfor 692s t = (j - sqrt (1 / 12)) ./ sqrt (v); 692s figure(); 692s plot (sort (tcdf (t, 49)), ... 692s "-;Almost linear mapping indicates good fit with t-distribution.;") 692s ***** test 692s ##Example from Quenouille, Table 1 692s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 692s jackstat = jackknife ( @(x) 1/mean(x), d ); 692s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 692s 1 test, 1 passed, 0 known failure, 0 skipped 692s [inst/manovacluster.m] 692s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/manovacluster.m 692s ***** demo 692s load carbig 692s X = [MPG Acceleration Weight Displacement]; 692s [d, p, stats] = manova1 (X, Origin); 692s manovacluster (stats) 692s ***** test 692s hf = figure ("visible", "off"); 692s unwind_protect 692s load carbig 692s X = [MPG Acceleration Weight Displacement]; 692s [d, p, stats] = manova1 (X, Origin); 692s manovacluster (stats); 692s unwind_protect_cleanup 692s close (hf); 692s end_unwind_protect 692s ***** error manovacluster (stats, "some"); 693s 2 tests, 2 passed, 0 known failure, 0 skipped 693s [inst/kruskalwallis.m] 693s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/kruskalwallis.m 693s ***** demo 693s x = meshgrid (1:6); 693s x = x + normrnd (0, 1, 6, 6); 693s kruskalwallis (x, [], 'off'); 693s ***** demo 693s x = meshgrid (1:6); 693s x = x + normrnd (0, 1, 6, 6); 693s [p, atab] = kruskalwallis(x); 693s ***** demo 693s x = ones (30, 4) .* [-2, 0, 1, 5]; 693s x = x + normrnd (0, 2, 30, 4); 693s group = {"A", "B", "C", "D"}; 693s kruskalwallis (x, group); 693s ***** test 693s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 693s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 693s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 693s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 693s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 693s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 693s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 693s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 693s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 693s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 693s group = [1:10] .* ones (10,10); 693s group = group(:); 693s [p, tbl] = kruskalwallis (data, group, "off"); 693s assert (p, 0.048229, 1e-6); 693s assert (tbl{2,5}, 17.03124, 1e-5); 693s assert (tbl{2,3}, 9, 0); 693s assert (tbl{4,2}, 82655.5, 1e-16); 693s data = reshape (data, 10, 10); 693s [p, tbl, stats] = kruskalwallis (data, [], "off"); 693s assert (p, 0.048229, 1e-6); 693s assert (tbl{2,5}, 17.03124, 1e-5); 693s assert (tbl{2,3}, 9, 0); 693s assert (tbl{4,2}, 82655.5, 1e-16); 693s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 693s N = 10 * ones (1, 10); 693s assert (stats.meanranks, means, 1e-6); 693s assert (length (stats.gnames), 10, 0); 693s assert (stats.n, N, 0); 693s 1 test, 1 passed, 0 known failure, 0 skipped 693s [inst/kstest2.m] 693s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/kstest2.m 693s ***** error kstest2 ([1,2,3,4,5,5]) 693s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 693s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 693s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 693s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 693s ***** test 693s load examgrades 693s [h, p] = kstest2 (grades(:,1), grades(:,2)); 693s assert (h, false); 693s assert (p, 0.1222791870137312, 1e-14); 693s ***** test 693s load examgrades 693s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 693s assert (h, false); 693s assert (p, 0.1844421391011258, 1e-14); 693s ***** test 693s load examgrades 693s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 693s assert (h, false); 693s assert (p, 0.06115357930171663, 1e-14); 693s ***** test 693s load examgrades 693s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 693s assert (h, true); 693s assert (p, 0.06115357930171663, 1e-14); 693s 14 tests, 14 passed, 0 known failure, 0 skipped 693s [inst/evalclusters.m] 693s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/evalclusters.m 693s ***** demo 693s load fisheriris; 693s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 693s plot (eva) 693s ***** error evalclusters () 693s ***** error evalclusters ([1 1;0 1]) 693s ***** error evalclusters ([1 1;0 1], "kmeans") 693s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 693s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 693s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 693s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 693s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 693s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 693s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 693s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 693s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 693s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 693s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 693s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 693s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 693s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 693s "distance", "a") 693s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 693s "distance", "a") 693s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 693s "clusterpriors", "equal") 693s ***** error evalclusters ([1 1;0 1], [1; 2], ... 693s "silhouette", "clusterpriors", "xxx") 693s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 693s ***** test 693s load fisheriris; 693s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 693s assert (isa (eva, "CalinskiHarabaszEvaluation")); 693s assert (eva.NumObservations, 150); 693s assert (eva.OptimalK, 3); 693s assert (eva.InspectedK, [1 2 3 4 5 6]); 693s 22 tests, 22 passed, 0 known failure, 0 skipped 693s [inst/regress_gp.m] 693s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/regress_gp.m 693s ***** demo 693s ## Linear fitting of 1D Data 693s rand ("seed", 125); 693s X = 2 * rand (5, 1) - 1; 693s randn ("seed", 25); 693s Y = 2 * X - 1 + 0.3 * randn (5, 1); 693s 693s ## Points for interpolation/extrapolation 693s Xfit = linspace (-2, 2, 10)'; 693s 693s ## Fit regression model 693s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 693s 693s ## Plot fitted data 693s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 693s title ("Gaussian process regression with linear kernel"); 693s ***** demo 693s ## Linear fitting of 2D Data 693s rand ("seed", 135); 693s X = 2 * rand (4, 2) - 1; 693s randn ("seed", 35); 693s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 693s 693s ## Mesh for interpolation/extrapolation 693s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 693s Xfit = [x1(:), x2(:)]; 693s 693s ## Fit regression model 693s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 693s Ypred = reshape (Ypred, 10, 10); 693s YintU = reshape (Yint(:,1), 10, 10); 693s YintL = reshape (Yint(:,2), 10, 10); 693s 693s ## Plot fitted data 693s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 693s hold on; 693s h = mesh (x1, x2, Ypred, zeros (10, 10)); 693s set (h, "facecolor", "none", "edgecolor", "yellow"); 693s h = mesh (x1, x2, YintU, ones (10, 10)); 693s set (h, "facecolor", "none", "edgecolor", "cyan"); 693s h = mesh (x1, x2, YintL, ones (10, 10)); 693s set (h, "facecolor", "none", "edgecolor", "cyan"); 693s hold off 693s axis tight 693s view (75, 25) 693s title ("Gaussian process regression with linear kernel"); 693s ***** demo 693s ## Projection over basis function with linear kernel 693s pp = [2, 2, 0.3, 1]; 693s n = 10; 693s rand ("seed", 145); 693s X = 2 * rand (n, 1) - 1; 693s randn ("seed", 45); 693s Y = polyval (pp, X) + 0.3 * randn (n, 1); 693s 693s ## Powers 693s px = [sqrt(abs(X)), X, X.^2, X.^3]; 693s 693s ## Points for interpolation/extrapolation 693s Xfit = linspace (-1, 1, 100)'; 693s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 693s 693s ## Define a prior covariance assuming that the sqrt component is not present 693s Sp = 100 * eye (size (px, 2) + 1); 693s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 693s 693s ## Fit regression model 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 693s 693s ## Plot fitted data 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("Linear kernel over basis function with prior covariance"); 693s ***** demo 693s ## Projection over basis function with linear kernel 693s pp = [2, 2, 0.3, 1]; 693s n = 10; 693s rand ("seed", 145); 693s X = 2 * rand (n, 1) - 1; 693s randn ("seed", 45); 693s Y = polyval (pp, X) + 0.3 * randn (n, 1); 693s 693s ## Powers 693s px = [sqrt(abs(X)), X, X.^2, X.^3]; 693s 693s ## Points for interpolation/extrapolation 693s Xfit = linspace (-1, 1, 100)'; 693s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 693s 693s ## Fit regression model without any assumption on prior covariance 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 693s 693s ## Plot fitted data 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("Linear kernel over basis function without prior covariance"); 693s ***** demo 693s ## Projection over basis function with rbf kernel 693s pp = [2, 2, 0.3, 1]; 693s n = 10; 693s rand ("seed", 145); 693s X = 2 * rand (n, 1) - 1; 693s randn ("seed", 45); 693s Y = polyval (pp, X) + 0.3 * randn (n, 1); 693s 693s ## Powers 693s px = [sqrt(abs(X)), X, X.^2, X.^3]; 693s 693s ## Points for interpolation/extrapolation 693s Xfit = linspace (-1, 1, 100)'; 693s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 693s 693s ## Fit regression model with RBF kernel (standard parameters) 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 693s 693s ## Plot fitted data 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("RBF kernel over basis function with standard parameters"); 693s text (-0.5, 4, "theta = 5\n g = 0.01"); 693s ***** demo 693s ## Projection over basis function with rbf kernel 693s pp = [2, 2, 0.3, 1]; 693s n = 10; 693s rand ("seed", 145); 693s X = 2 * rand (n, 1) - 1; 693s randn ("seed", 45); 693s Y = polyval (pp, X) + 0.3 * randn (n, 1); 693s 693s ## Powers 693s px = [sqrt(abs(X)), X, X.^2, X.^3]; 693s 693s ## Points for interpolation/extrapolation 693s Xfit = linspace (-1, 1, 100)'; 693s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 693s 693s ## Fit regression model with RBF kernel with different parameters 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 693s 693s ## Plot fitted data 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("GP regression with RBF kernel and non default parameters"); 693s text (-0.5, 4, "theta = 10\n g = 0.01"); 693s 693s ## Fit regression model with RBF kernel with different parameters 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 693s 693s ## Plot fitted data 693s figure 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("GP regression with RBF kernel and non default parameters"); 693s text (-0.5, 4, "theta = 50\n g = 0.01"); 693s 693s ## Fit regression model with RBF kernel with different parameters 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 693s 693s ## Plot fitted data 693s figure 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("GP regression with RBF kernel and non default parameters"); 693s text (-0.5, 4, "theta = 50\n g = 0.001"); 693s 693s ## Fit regression model with RBF kernel with different parameters 693s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 693s 693s ## Plot fitted data 693s figure 693s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 693s Xfit, polyval (pp, Xfit), "g-;True;"); 693s axis tight 693s axis manual 693s hold on 693s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 693s hold off 693s title ("GP regression with RBF kernel and non default parameters"); 693s text (-0.5, 4, "theta = 50\n g = 0.05"); 693s ***** demo 693s ## RBF fitting on noiseless 1D Data 693s x = [0:2*pi/7:2*pi]'; 693s y = 5 * sin (x); 693s 693s ## Predictive grid of 500 equally spaced locations 693s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 693s 693s ## Fit regression model with RBF kernel 693s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 693s 693s ## Plot fitted data 693s r = mvnrnd (Yfit, diag (Ysd)', 50); 693s plot (xi, r', "c-"); 693s hold on 693s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 693s plot (x, y, ".k;Predictor points;", "markersize", 20) 693s plot (xi, 5 * sin (xi), "-y;True Function;"); 693s xlim ([-0.5,2*pi+0.5]); 693s ylim ([-10,10]); 693s hold off 693s title ("GP regression with RBF kernel on noiseless 1D data"); 693s text (0, -7, "theta = 5\n g = 0.01"); 693s ***** demo 693s ## RBF fitting on noisy 1D Data 693s x = [0:2*pi/7:2*pi]'; 693s x = [x; x]; 693s y = 5 * sin (x) + randn (size (x)); 693s 693s ## Predictive grid of 500 equally spaced locations 693s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 693s 693s ## Fit regression model with RBF kernel 693s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 693s 693s ## Plot fitted data 693s r = mvnrnd (Yfit, diag (Ysd)', 50); 693s plot (xi, r', "c-"); 693s hold on 693s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 693s plot (x, y, ".k;Predictor points;", "markersize", 20) 693s plot (xi, 5 * sin (xi), "-y;True Function;"); 693s xlim ([-0.5,2*pi+0.5]); 693s ylim ([-10,10]); 693s hold off 693s title ("GP regression with RBF kernel on noisy 1D data"); 693s text (0, -7, "theta = 5\n g = 0.01"); 693s ***** error regress_gp (ones (20, 2)) 693s ***** error regress_gp (ones (20, 2), ones (20, 1)) 693s ***** error ... 693s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 693s ***** error ... 693s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 693s 22 tests, 22 passed, 0 known failure, 0 skipped 693s [inst/anova2.m] 693s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/anova2.m 693s ***** demo 693s 693s # Factorial (Crossed) Two-way ANOVA with Interaction 693s 693s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 693s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 693s 693s [p, atab, stats] = anova2(popcorn, 3, "on"); 693s ***** demo 693s 693s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 693s 693s data = [54, 43, 78, 111; 693s 23, 34, 37, 41; 693s 45, 65, 99, 78; 693s 31, 33, 36, 35; 693s 15, 25, 30, 26]; 693s 693s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 693s ***** demo 693s 693s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 693s 693s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 693s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 693s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 693s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 693s 693s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 693s ***** test 693s ## Test for anova2 ("interaction") 693s ## comparison with results from Matlab for column effect 693s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 693s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 693s [p, atab, stats] = anova2 (popcorn, 3, "off"); 693s assert (p(1), 7.678957383294716e-07, 1e-14); 693s assert (p(2), 0.0001003738963050171, 1e-14); 693s assert (p(3), 0.7462153966366274, 1e-14); 693s assert (atab{2,5}, 56.700, 1e-14); 693s assert (atab{2,3}, 2, 0); 693s assert (atab{4,2}, 0.08333333333333348, 1e-14); 693s assert (atab{5,4}, 0.1388888888888889, 1e-14); 693s assert (atab{5,2}, 1.666666666666667, 1e-14); 693s assert (atab{6,2}, 22); 693s assert (stats.source, "anova2"); 693s assert (stats.colmeans, [6.25, 4.75, 4]); 693s assert (stats.inter, 1, 0); 693s assert (stats.pval, 0.7462153966366274, 1e-14); 693s assert (stats.df, 12); 693s ***** test 693s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 693s data = [54, 43, 78, 111; 693s 23, 34, 37, 41; 693s 45, 65, 99, 78; 693s 31, 33, 36, 35; 693s 15, 25, 30, 26]; 693s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 693s assert (atab{2,2}, 2174.95, 1e-10); 693s assert (atab{3,2}, 8371.7, 1e-10); 693s assert (atab{4,2}, 2404.3, 1e-10); 693s assert (atab{5,2}, 12950.95, 1e-10); 693s assert (atab{2,4}, 724.983333333333, 1e-10); 693s assert (atab{3,4}, 2092.925, 1e-10); 693s assert (atab{4,4}, 200.358333333333, 1e-10); 693s assert (atab{2,5}, 3.61843363972882, 1e-10); 693s assert (atab{3,5}, 10.445909412303, 1e-10); 693s assert (atab{2,6}, 0.087266112738617, 1e-10); 693s assert (atab{3,6}, 0.000698397753556, 1e-10); 693s ***** test 693s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 693s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 693s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 693s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 693s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 693s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 693s assert (atab{2,2}, 745.360306290833, 1e-10); 693s assert (atab{3,2}, 278.01854140125, 1e-10); 693s assert (atab{4,2}, 180.180377467501, 1e-10); 693s assert (atab{5,2}, 1203.55922515958, 1e-10); 693s assert (atab{2,4}, 372.680153145417, 1e-10); 693s assert (atab{3,4}, 92.67284713375, 1e-10); 693s assert (atab{4,4}, 10.0100209704167, 1e-10); 693s assert (atab{2,5}, 4.02146005730833, 1e-10); 693s assert (atab{3,5}, 9.25800729165627, 1e-10); 693s assert (atab{2,6}, 0.141597630656771, 1e-10); 693s assert (atab{3,6}, 0.000636643812875719, 1e-10); 694s 3 tests, 3 passed, 0 known failure, 0 skipped 694s [inst/histfit.m] 694s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/histfit.m 694s ***** demo 694s histfit (randn (100, 1)) 694s ***** demo 694s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 694s ***** demo 694s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 694s ***** test 694s hf = figure ("visible", "off"); 694s unwind_protect 694s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 694s histfit (x); 694s unwind_protect_cleanup 694s close (hf); 694s end_unwind_protect 694s ***** test 694s hf = figure ("visible", "off"); 694s unwind_protect 694s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 694s histfit (x); 694s unwind_protect_cleanup 694s close (hf); 694s end_unwind_protect 694s ***** test 694s hf = figure ("visible", "off"); 694s unwind_protect 694s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 694s histfit (x, 3); 694s unwind_protect_cleanup 694s close (hf); 694s end_unwind_protect 694s ***** test 694s hf = figure ("visible", "off"); 694s unwind_protect 694s histfit (randn (100, 1)); 694s unwind_protect_cleanup 694s close (hf); 694s end_unwind_protect 694s ***** test 694s hf = figure ("visible", "off"); 694s unwind_protect 694s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 694s unwind_protect_cleanup 694s close (hf); 694s end_unwind_protect 695s ***** test 695s hf = figure ("visible", "off"); 695s unwind_protect 695s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 695s unwind_protect_cleanup 695s close (hf); 695s end_unwind_protect 695s ***** test 695s hf = figure ("visible", "off"); 695s unwind_protect 695s ax = gca (); 695s histfit (ax, randn (100, 1)); 695s unwind_protect_cleanup 695s close (hf); 695s end_unwind_protect 695s ***** test 695s hf = figure ("visible", "off"); 695s unwind_protect 695s ax = gca (); 695s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 695s unwind_protect_cleanup 695s close (hf); 695s end_unwind_protect 695s ***** test 695s hf = figure ("visible", "off"); 695s unwind_protect 695s ax = gca (); 695s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 695s unwind_protect_cleanup 695s close (hf); 695s end_unwind_protect 695s ***** test 695s hf = figure ("visible", "off"); 695s unwind_protect 695s ax = axes ("parent", hf); 695s fail ("histfit (ax)", "histfit: too few input arguments."); 695s unwind_protect_cleanup 695s close (hf); 695s end_unwind_protect 695s ***** error ... 695s histfit ('wer') 695s ***** error histfit ([NaN, NaN, NaN]); 695s ***** error ... 695s histfit (randn (100, 1), 5.6) 695s ***** error ... 695s histfit (randn (100, 1), 8, 5) 695s ***** error ... 695s histfit (randn (100, 1), 8, {'normal'}) 695s ***** error ... 695s histfit (randn (100, 1), 8, 'Kernel') 695s ***** error ... 695s histfit (randn (100, 1), 8, 'ASDASDASD') 695s 17 tests, 17 passed, 0 known failure, 0 skipped 695s [inst/runstest.m] 695s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/runstest.m 695s ***** test 695s ## NIST beam deflection data 695s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 695s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 695s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 695s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 695s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 695s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 695s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 695s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 695s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 695s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 695s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 695s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 695s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 695s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 695s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 695s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 695s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 695s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 695s [h, p, stats] = runstest (data, median (data)); 695s expected_h = 1; 695s expected_p = 0.008562; 695s expected_z = 2.6229; 695s assert (h, expected_h); 695s assert (p, expected_p, 1E-6); 695s assert (stats.z, expected_z, 1E-4); 695s ***** shared x 695s x = [45, -60, 1.225, 55.4, -9 27]; 695s ***** test 695s [h, p, stats] = runstest (x); 695s assert (h, 0); 695s assert (p, 0.6, 1e-14); 695s assert (stats.nruns, 5); 695s assert (stats.n1, 3); 695s assert (stats.n0, 3); 695s assert (stats.z, 0.456435464587638, 1e-14); 695s ***** test 695s [h, p, stats] = runstest (x, [], "method", "approximate"); 695s assert (h, 0); 695s assert (p, 0.6481, 1e-4); 695s assert (stats.z, 0.456435464587638, 1e-14); 695s ***** test 695s [h, p, stats] = runstest (x, [], "tail", "left"); 695s assert (h, 0); 695s assert (p, 0.9, 1e-14); 695s assert (stats.z, 1.369306393762915, 1e-14); 695s ***** error runstest (ones (2,20)) 695s ***** error runstest (["asdasda"]) 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], "updown") 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "method", "some") 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 695s ***** error ... 695s runstest ([2 3 4 3 2 3 4], [], "option", "some") 695s 14 tests, 14 passed, 0 known failure, 0 skipped 695s [inst/manova1.m] 695s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/manova1.m 695s ***** demo 695s load carbig 695s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 695s ***** test 695s load carbig 695s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 695s assert (d, 3); 695s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 695s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 695s ***** test 695s load carbig 695s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 695s assert (d, 2); 695s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 695s [1e-12, 1e-12, 1e-12]'); 695s 2 tests, 2 passed, 0 known failure, 0 skipped 695s [inst/hotelling_t2test2.m] 695s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hotelling_t2test2.m 695s ***** error hotelling_t2test2 (); 695s ***** error ... 695s hotelling_t2test2 ([2, 3, 4, 5, 6]); 695s ***** error ... 695s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 695s ***** error ... 695s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 695s ***** error ... 695s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 695s ***** error ... 695s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 695s ***** error ... 695s hotelling_t2test2 (ones (20,1), ones (20,2)); 695s ***** error ... 695s hotelling_t2test2 (ones (20,2), ones (25,3)); 696s ***** test 696s randn ("seed", 1); 696s x1 = randn (60000, 5); 696s randn ("seed", 5); 696s x2 = randn (30000, 5); 696s [h, pval, stats] = hotelling_t2test2 (x1, x2); 696s assert (h, 0); 696s assert (stats.df1, 5); 696s assert (stats.df2, 89994); 696s 14 tests, 14 passed, 0 known failure, 0 skipped 696s [inst/cdfcalc.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cdfcalc.m 696s ***** test 696s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 696s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 696s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 696s assert (xCDF, [2, 3, 4, 5, 6]'); 696s assert (n, 10); 696s ***** shared x 696s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 696s ***** error yCDF = cdfcalc (x); 696s ***** error [yCDF, xCDF] = cdfcalc (); 696s ***** error [yCDF, xCDF] = cdfcalc (x, x); 696s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 696s 5 tests, 5 passed, 0 known failure, 0 skipped 696s [inst/kmeans.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/kmeans.m 696s ***** demo 696s ## Generate a two-cluster problem 696s randn ("seed", 31) # for reproducibility 696s C1 = randn (100, 2) + 1; 696s randn ("seed", 32) # for reproducibility 696s C2 = randn (100, 2) - 1; 696s data = [C1; C2]; 696s 696s ## Perform clustering 696s rand ("seed", 1) # for reproducibility 696s [idx, centers] = kmeans (data, 2); 696s 696s ## Plot the result 696s figure; 696s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 696s hold on; 696s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 696s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 696s title ("A simple two-clusters example"); 696s hold off; 696s ***** demo 696s ## Cluster data using k-means clustering, then plot the cluster regions 696s ## Load Fisher's iris data set and use the petal lengths and widths as 696s ## predictors 696s 696s load fisheriris 696s X = meas(:,3:4); 696s 696s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 696s title ("Fisher's Iris Data"); 696s xlabel ("Petal Lengths (cm)"); 696s ylabel ("Petal Widths (cm)"); 696s 696s ## Cluster the data. Specify k = 3 clusters 696s rand ("seed", 1) # for reproducibility 696s [idx, C] = kmeans (X, 3); 696s x1 = min (X(:,1)):0.01:max (X(:,1)); 696s x2 = min (X(:,2)):0.01:max (X(:,2)); 696s [x1G, x2G] = meshgrid (x1, x2); 696s XGrid = [x1G(:), x2G(:)]; 696s 696s idx2Region = kmeans (XGrid, 3, "MaxIter", 10, "Start", C); 696s figure; 696s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 696s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 696s hold on; 696s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 696s title ("Fisher's Iris Data"); 696s xlabel ("Petal Lengths (cm)"); 696s ylabel ("Petal Widths (cm)"); 696s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 696s hold off 696s ***** demo 696s ## Partition Data into Two Clusters 696s 696s randn ("seed", 1) # for reproducibility 696s r1 = randn (100, 2) * 0.75 + ones (100, 2); 696s randn ("seed", 2) # for reproducibility 696s r2 = randn (100, 2) * 0.5 - ones (100, 2); 696s X = [r1; r2]; 696s 696s plot (X(:,1), X(:,2), "."); 696s title ("Randomly Generated Data"); 696s rand ("seed", 1) # for reproducibility 696s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 696s "Replicates", 5, "Display", "final"); 696s figure; 696s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 696s hold on 696s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 696s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 696s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 696s title ("Cluster Assignments and Centroids"); 696s hold off 696s ***** demo 696s ## Assign New Data to Existing Clusters 696s 696s ## Generate a training data set using three distributions 696s randn ("seed", 5) # for reproducibility 696s r1 = randn (100, 2) * 0.75 + ones (100, 2); 696s randn ("seed", 7) # for reproducibility 696s r2 = randn (100, 2) * 0.5 - ones (100, 2); 696s randn ("seed", 9) # for reproducibility 696s r3 = randn (100, 2) * 0.75; 696s X = [r1; r2; r3]; 696s 696s ## Partition the training data into three clusters by using kmeans 696s 696s rand ("seed", 1) # for reproducibility 696s [idx, C] = kmeans (X, 3); 696s 696s ## Plot the clusters and the cluster centroids 696s 696s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 696s hold on 696s plot (C(:,1), C(:,2), "kx"); 696s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 696s 696s ## Generate a test data set 696s randn ("seed", 25) # for reproducibility 696s r1 = randn (100, 2) * 0.75 + ones (100, 2); 696s randn ("seed", 27) # for reproducibility 696s r2 = randn (100, 2) * 0.5 - ones (100, 2); 696s randn ("seed", 29) # for reproducibility 696s r3 = randn (100, 2) * 0.75; 696s Xtest = [r1; r2; r3]; 696s 696s ## Classify the test data set using the existing clusters 696s ## Find the nearest centroid from each test data point by using pdist2 696s 696s D = pdist2 (C, Xtest, "euclidean"); 696s [group, ~] = find (D == min (D)); 696s 696s ## Plot the test data and label the test data using idx_test with gscatter 696s 696s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 696s box on; 696s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 696s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 696s "Data classified to Cluster 3", "Location", "NorthWest"); 696s title ("Assign New Data to Existing Clusters"); 696s ***** test 696s samples = 4; 696s dims = 3; 696s k = 2; 696s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 696s "emptyAction", "singleton"); 696s assert (size (cls), [samples, 1]); 696s assert (size (c), [k, dims]); 696s assert (size (d), [k, 1]); 696s assert (size (z), [samples, k]); 696s ***** test 696s samples = 4; 696s dims = 3; 696s k = 2; 696s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 696s "emptyAction", "singleton"); 696s assert (size (cls), [samples, 1]); 696s assert (size (c), [k, dims]); 696s assert (size (d), [k, 1]); 696s assert (size (z), [samples, k]); 696s ***** test 696s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 696s assert (cls, [1; 1]); 696s assert (c, [1.5, 0; NA, NA]); 696s ***** test 696s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 696s "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 696s ***** test 696s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 696s ***** test 696s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 696s ***** error kmeans (rand (3,2), 4); 696s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 696s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 696s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 696s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 696s ***** error kmeans (rand (3,4), 2, "start", "normal"); 696s ***** error kmeans (rand (4,3), 2, "replicates", i); 696s ***** error kmeans (rand (4,3), 2, "replicates", -1); 696s ***** error kmeans (rand (4,3), 2, "replicates", []); 696s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 696s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 696s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 696s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 696s ***** error kmeans (rand (4,3), 2, "maxiter", []); 696s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 696s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 696s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 696s 31 tests, 31 passed, 0 known failure, 0 skipped 696s [inst/sigma_pts.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/sigma_pts.m 696s ***** demo 696s K = [1 0.5; 0.5 1]; # covariance matrix 696s # calculate and build associated ellipse 696s [R,S,~] = svd (K); 696s theta = atan2 (R(2,1), R(1,1)); 696s v = sqrt (diag (S)); 696s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 696s t = linspace (0, 2*pi, 100).'; 696s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 696s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 696s 696s figure(1); clf; hold on 696s # Plot ellipse and axes 696s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 696s plot (xe,ye,'-r'); 696s 696s col = 'rgb'; 696s l = [-1.8 -1 1.5]; 696s for li = 1:3 696s p = sigma_pts (2, [], K, l(li)); 696s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 696s p(1,1), p(1,2), ['o' col(li)]); 696s h(li) = tmp(1); 696s endfor 696s hold off 696s axis image 696s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 696s ***** test 696s p = sigma_pts (5); 696s assert (mean (p), zeros(1,5), sqrt(eps)); 696s assert (cov (p), eye(5), sqrt(eps)); 696s ***** test 696s m = randn(1, 5); 696s p = sigma_pts (5, m); 696s assert (mean (p), m, sqrt(eps)); 696s assert (cov (p), eye(5), sqrt(eps)); 696s ***** test 696s x = linspace (0,1,5); 696s K = exp (- (x.' - x).^2/ 0.5); 696s p = sigma_pts (5, [], K); 696s assert (mean (p), zeros(1,5), sqrt(eps)); 696s assert (cov (p), K, sqrt(eps)); 696s ***** error sigma_pts(2,1); 696s ***** error sigma_pts(2,[],1); 696s ***** error sigma_pts(2,1,1); 696s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 696s 7 tests, 7 passed, 0 known failure, 0 skipped 696s [inst/nanmax.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/nanmax.m 696s ***** demo 696s ## Find the column maximum values and their indices 696s ## for matrix data with missing values. 696s 696s x = magic (3); 696s x([1, 6:9]) = NaN 696s [y, ind] = nanmax (x) 696s ***** demo 696s ## Find the maximum of all the values in an array, ignoring missing values. 696s ## Create a 2-by-5-by-3 array x with some missing values. 696s 696s x = reshape (1:30, [2, 5, 3]); 696s x([10:12, 25]) = NaN 696s 696s ## Find the maximum of the elements of x. 696s 696s y = nanmax (x, [], 'all') 696s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 696s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 696s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 696s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 696s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 696s ***** shared x, y 696s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 696s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 696s y = x; 696s y(2,3,1) = 0.51; 696s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 696s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 696s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 696s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 696s ***** assert (nanmax (x, [], 'all'), 6.77) 696s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 696s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 696s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 696s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 696s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 696s ***** test 696s xx = repmat ([1:20;6:25], [5 2 6 3]); 696s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 696s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 696s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 696s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 696s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 696s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 696s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 696s ***** assert (nanmax (magic (3), [], 3), magic (3)) 696s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 696s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 696s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 696s ***** error ... 696s nanmax (y, [], [1, 1, 2]) 696s ***** error ... 696s [v, idx] = nanmax(x, y, [1 2]) 696s 24 tests, 24 passed, 0 known failure, 0 skipped 696s [inst/correlation_test.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/correlation_test.m 696s ***** error correlation_test (); 696s ***** error correlation_test (1); 696s ***** error ... 696s correlation_test ([1 2 NaN]', [2 3 4]'); 696s ***** error ... 696s correlation_test ([1 2 Inf]', [2 3 4]'); 696s ***** error ... 696s correlation_test ([1 2 3+i]', [2 3 4]'); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 NaN]'); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 Inf]'); 696s ***** error ... 696s correlation_test ([1 2 3]', [3 4 3+i]'); 696s ***** error ... 696s correlation_test ([1 2 3]', [3 4 4 5]'); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 696s ***** error ... 696s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 696s ***** test 696s x = [6 7 7 9 10 12 13 14 15 17]; 696s y = [19 22 27 25 30 28 30 29 25 32]; 696s [h, pval, stats] = correlation_test (x, y); 696s assert (stats.corrcoef, corr (x', y'), 1e-14); 696s assert (pval, 0.0223, 1e-4); 696s ***** test 696s x = [6 7 7 9 10 12 13 14 15 17]'; 696s y = [19 22 27 25 30 28 30 29 25 32]'; 696s [h, pval, stats] = correlation_test (x, y); 696s assert (stats.corrcoef, corr (x, y), 1e-14); 696s assert (pval, 0.0223, 1e-4); 696s 20 tests, 20 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/ricestat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/ricestat.m 696s ***** error ricestat () 696s ***** error ricestat (1) 696s ***** error ricestat ({}, 2) 696s ***** error ricestat (1, "") 696s ***** error ricestat (i, 2) 696s ***** error ricestat (1, i) 696s ***** error ... 696s ricestat (ones (3), ones (2)) 696s ***** error ... 696s ricestat (ones (2), ones (3)) 696s ***** shared s, sigma 696s s = [2, 0, -1, 1, 4]; 696s sigma = [1, NaN, 3, -1, 2]; 696s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 696s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 696s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 696s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 696s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 696s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 696s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 696s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 696s 16 tests, 16 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/lognstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/lognstat.m 696s ***** error lognstat () 696s ***** error lognstat (1) 696s ***** error lognstat ({}, 2) 696s ***** error lognstat (1, "") 696s ***** error lognstat (i, 2) 696s ***** error lognstat (1, i) 696s ***** error ... 696s lognstat (ones (3), ones (2)) 696s ***** error ... 696s lognstat (ones (2), ones (3)) 696s ***** test 696s mu = 0:0.2:1; 696s sigma = 0.2:0.2:1.2; 696s [m, v] = lognstat (mu, sigma); 696s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 696s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 696s assert (m, expected_m, 0.001); 696s assert (v, expected_v, 0.001); 696s ***** test 696s sigma = 0.2:0.2:1.2; 696s [m, v] = lognstat (0, sigma); 696s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 696s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 696s assert (m, expected_m, 0.001); 696s assert (v, expected_v, 0.001); 696s 10 tests, 10 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/hnstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/hnstat.m 696s ***** error hnstat () 696s ***** error hnstat (1) 696s ***** error hnstat ({}, 2) 696s ***** error hnstat (1, "") 696s ***** error hnstat (i, 2) 696s ***** error hnstat (1, i) 696s ***** error ... 696s hnstat (ones (3), ones (2)) 696s ***** error ... 696s hnstat (ones (2), ones (3)) 696s ***** test 696s [m, v] = hnstat (0, 1); 696s assert (m, 0.7979, 1e-4); 696s assert (v, 0.3634, 1e-4); 696s ***** test 696s [m, v] = hnstat (2, 1); 696s assert (m, 2.7979, 1e-4); 696s assert (v, 0.3634, 1e-4); 696s ***** test 696s [m, v] = hnstat (2, 2); 696s assert (m, 3.5958, 1e-4); 696s assert (v, 1.4535, 1e-4); 696s ***** test 696s [m, v] = hnstat (2, 2.5); 696s assert (m, 3.9947, 1e-4); 696s assert (v, 2.2711, 1e-4); 696s ***** test 696s [m, v] = hnstat (1.5, 0.5); 696s assert (m, 1.8989, 1e-4); 696s assert (v, 0.0908, 1e-4); 696s ***** test 696s [m, v] = hnstat (-1.5, 0.5); 696s assert (m, -1.1011, 1e-4); 696s assert (v, 0.0908, 1e-4); 696s 14 tests, 14 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/gevstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/gevstat.m 696s ***** error gevstat () 696s ***** error gevstat (1) 696s ***** error gevstat (1, 2) 696s ***** error gevstat ({}, 2, 3) 696s ***** error gevstat (1, "", 3) 696s ***** error gevstat (1, 2, "") 696s ***** error gevstat (i, 2, 3) 696s ***** error gevstat (1, i, 3) 696s ***** error gevstat (1, 2, i) 696s ***** error ... 696s gevstat (ones (3), ones (2), 3) 696s ***** error ... 696s gevstat (ones (2), 2, ones (3)) 696s ***** error ... 696s gevstat (1, ones (2), ones (3)) 696s ***** test 696s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 696s sigma = 2; 696s mu = 1; 696s [m, v] = gevstat (k, sigma, mu); 696s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 696s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 696s assert (m, expected_m, -0.001); 696s assert (v, expected_v, -0.001); 696s 13 tests, 13 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/normstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/normstat.m 696s ***** error normstat () 696s ***** error normstat (1) 696s ***** error normstat ({}, 2) 696s ***** error normstat (1, "") 696s ***** error normstat (i, 2) 696s ***** error normstat (1, i) 696s ***** error ... 696s normstat (ones (3), ones (2)) 696s ***** error ... 696s normstat (ones (2), ones (3)) 696s ***** test 696s mu = 1:6; 696s sigma = 0.2:0.2:1.2; 696s [m, v] = normstat (mu, sigma); 696s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 696s assert (m, mu); 696s assert (v, expected_v, 0.001); 696s ***** test 696s sigma = 0.2:0.2:1.2; 696s [m, v] = normstat (0, sigma); 696s expected_mn = [0, 0, 0, 0, 0, 0]; 696s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 696s assert (m, expected_mn, 0.001); 696s assert (v, expected_v, 0.001); 696s 10 tests, 10 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/tristat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/tristat.m 696s ***** error tristat () 696s ***** error tristat (1) 696s ***** error tristat (1, 2) 696s ***** error tristat ("i", 2, 1) 696s ***** error tristat (0, "d", 1) 696s ***** error tristat (0, 3, {}) 696s ***** error tristat (i, 2, 1) 696s ***** error tristat (0, i, 1) 696s ***** error tristat (0, 3, i) 696s ***** test 696s a = 1:5; 696s b = 3:7; 696s c = 5:9; 696s [m, v] = tristat (a, b, c); 696s expected_m = [3, 4, 5, 6, 7]; 696s assert (m, expected_m); 696s assert (v, ones (1, 5) * (2/3)); 696s 10 tests, 10 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/nakastat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/nakastat.m 696s ***** error nakastat () 696s ***** error nakastat (1) 696s ***** error nakastat ({}, 2) 696s ***** error nakastat (1, "") 696s ***** error nakastat (i, 2) 696s ***** error nakastat (1, i) 696s ***** error ... 696s nakastat (ones (3), ones (2)) 696s ***** error ... 696s nakastat (ones (2), ones (3)) 696s ***** test 696s [m, v] = nakastat (1, 1); 696s assert (m, 0.8862269254, 1e-10); 696s assert (v, 0.2146018366, 1e-10); 696s ***** test 696s [m, v] = nakastat (1, 2); 696s assert (m, 1.25331413731, 1e-10); 696s assert (v, 0.42920367321, 1e-10); 696s ***** test 696s [m, v] = nakastat (2, 1); 696s assert (m, 0.93998560299, 1e-10); 696s assert (v, 0.11642706618, 1e-10); 696s 11 tests, 11 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/betastat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/betastat.m 696s ***** error betastat () 696s ***** error betastat (1) 696s ***** error betastat ({}, 2) 696s ***** error betastat (1, "") 696s ***** error betastat (i, 2) 696s ***** error betastat (1, i) 696s ***** error ... 696s betastat (ones (3), ones (2)) 696s ***** error ... 696s betastat (ones (2), ones (3)) 696s ***** test 696s a = -2:6; 696s b = 0.4:0.2:2; 696s [m, v] = betastat (a, b); 696s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 696s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 696s assert (m, expected_m, eps*100); 696s assert (v, expected_v, 0.001); 696s ***** test 696s a = -2:1:6; 696s [m, v] = betastat (a, 1.5); 696s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 696s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 696s assert (m, expected_m); 696s assert (v, expected_v, 0.001); 696s ***** test 696s a = [14 Inf 10 NaN 10]; 696s b = [12 9 NaN Inf 12]; 696s [m, v] = betastat (a, b); 696s expected_m = [14/26 NaN NaN NaN 10/22]; 696s expected_v = [168/18252 NaN NaN NaN 120/11132]; 696s assert (m, expected_m); 696s assert (v, expected_v); 696s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 696s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 696s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 696s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 696s 15 tests, 15 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/ncfstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/ncfstat.m 696s ***** error ncfstat () 696s ***** error ncfstat (1) 696s ***** error ncfstat (1, 2) 696s ***** error ncfstat ({}, 2, 3) 696s ***** error ncfstat (1, "", 3) 696s ***** error ncfstat (1, 2, "") 696s ***** error ncfstat (i, 2, 3) 696s ***** error ncfstat (1, i, 3) 696s ***** error ncfstat (1, 2, i) 696s ***** error ... 696s ncfstat (ones (3), ones (2), 3) 696s ***** error ... 696s ncfstat (ones (2), 2, ones (3)) 696s ***** error ... 696s ncfstat (1, ones (2), ones (3)) 696s ***** shared df1, df2, lambda 696s df1 = [2, 0, -1, 1, 4, 5]; 696s df2 = [2, 4, -1, 5, 6, 7]; 696s lambda = [1, NaN, 3, 0, 2, -1]; 696s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 696s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 696s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 696s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 696s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 696s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 696s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 696s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 696s 20 tests, 20 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/hygestat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/hygestat.m 696s ***** error hygestat () 696s ***** error hygestat (1) 696s ***** error hygestat (1, 2) 696s ***** error hygestat ({}, 2, 3) 696s ***** error hygestat (1, "", 3) 696s ***** error hygestat (1, 2, "") 696s ***** error hygestat (i, 2, 3) 696s ***** error hygestat (1, i, 3) 696s ***** error hygestat (1, 2, i) 696s ***** error ... 696s hygestat (ones (3), ones (2), 3) 696s ***** error ... 696s hygestat (ones (2), 2, ones (3)) 696s ***** error ... 696s hygestat (1, ones (2), ones (3)) 696s ***** test 696s m = 4:9; 696s k = 0:5; 696s n = 1:6; 696s [mn, v] = hygestat (m, k, n); 696s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 696s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 696s assert (mn, expected_mn, 0.001); 696s assert (v, expected_v, 0.001); 696s ***** test 696s m = 4:9; 696s k = 0:5; 696s [mn, v] = hygestat (m, k, 2); 696s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 696s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 696s assert (mn, expected_mn, 0.001); 696s assert (v, expected_v, 0.001); 696s 14 tests, 14 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/geostat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/geostat.m 696s ***** error geostat () 696s ***** error geostat ({}) 696s ***** error geostat ("") 696s ***** error geostat (i) 696s ***** test 696s ps = 1 ./ (1:6); 696s [m, v] = geostat (ps); 696s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 696s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 696s 5 tests, 5 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/chi2stat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/chi2stat.m 696s ***** error chi2stat () 696s ***** error chi2stat ({}) 696s ***** error chi2stat ("") 696s ***** error chi2stat (i) 696s ***** test 696s df = 1:6; 696s [m, v] = chi2stat (df); 696s assert (m, df); 696s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 696s 5 tests, 5 passed, 0 known failure, 0 skipped 696s [inst/dist_stat/expstat.m] 696s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/expstat.m 696s ***** error expstat () 696s ***** error expstat ({}) 696s ***** error expstat ("") 696s ***** error expstat (i) 696s ***** test 696s mu = 1:6; 696s [m, v] = expstat (mu); 696s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 696s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 697s 5 tests, 5 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/burrstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/burrstat.m 697s ***** error burrstat () 697s ***** error burrstat (1) 697s ***** error burrstat (1, 2) 697s ***** error burrstat ({}, 2, 3) 697s ***** error burrstat (1, "", 3) 697s ***** error burrstat (1, 2, "") 697s ***** error burrstat (i, 2, 3) 697s ***** error burrstat (1, i, 3) 697s ***** error burrstat (1, 2, i) 697s ***** error ... 697s burrstat (ones (3), ones (2), 3) 697s ***** error ... 697s burrstat (ones (2), 2, ones (3)) 697s ***** error ... 697s burrstat (1, ones (2), ones (3)) 697s ***** test 697s [m, v] = burrstat (1, 2, 5); 697s assert (m, 0.4295, 1e-4); 697s assert (v, 0.0655, 1e-4); 697s ***** test 697s [m, v] = burrstat (1, 1, 1); 697s assert (m, Inf); 697s assert (v, Inf); 697s ***** test 697s [m, v] = burrstat (2, 4, 1); 697s assert (m, 2.2214, 1e-4); 697s assert (v, 1.3484, 1e-4); 697s 15 tests, 15 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/evstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/evstat.m 697s ***** error evstat () 697s ***** error evstat (1) 697s ***** error evstat ({}, 2) 697s ***** error evstat (1, "") 697s ***** error evstat (i, 2) 697s ***** error evstat (1, i) 697s ***** error ... 697s evstat (ones (3), ones (2)) 697s ***** error ... 697s evstat (ones (2), ones (3)) 697s ***** shared x, y0, y1 697s x = [-5, 0, 1, 2, 3]; 697s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 697s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 697s ***** assert (evstat (x, x), y0, 1e-4) 697s ***** assert (evstat (x, x+6), y1, 1e-4) 697s ***** assert (evstat (x, x-6), NaN (1,5)) 697s 11 tests, 11 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/plstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/plstat.m 697s ***** shared x, Fx 697s x = [0, 1, 3, 4, 7, 10]; 697s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 697s ***** assert (plstat (x, Fx), 4.15) 697s ***** test 697s [m, v] = plstat (x, Fx); 697s assert (v, 10.3775, 1e-14) 697s ***** error plstat () 697s ***** error plstat (1) 697s ***** error ... 697s plstat ([0, 1, 2], [0, 1]) 697s ***** error ... 697s plstat ([0], [1]) 697s ***** error ... 697s plstat ([0, 1, 2], [0, 1, 1.5]) 697s ***** error ... 697s plstat ([0, 1, 2], [0, i, 1]) 697s ***** error ... 697s plstat ([0, i, 2], [0, 0.5, 1]) 697s ***** error ... 697s plstat ([0, i, 2], [0, 0.5i, 1]) 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/raylstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/raylstat.m 697s ***** error raylstat () 697s ***** error raylstat ({}) 697s ***** error raylstat ("") 697s ***** error raylstat (i) 697s ***** test 697s sigma = 1:6; 697s [m, v] = raylstat (sigma); 697s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 697s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 5 tests, 5 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/wblstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/wblstat.m 697s ***** error wblstat () 697s ***** error wblstat (1) 697s ***** error wblstat ({}, 2) 697s ***** error wblstat (1, "") 697s ***** error wblstat (i, 2) 697s ***** error wblstat (1, i) 697s ***** error ... 697s wblstat (ones (3), ones (2)) 697s ***** error ... 697s wblstat (ones (2), ones (3)) 697s ***** test 697s lambda = 3:8; 697s k = 1:6; 697s [m, v] = wblstat (lambda, k); 697s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 697s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s k = 1:6; 697s [m, v] = wblstat (6, k); 697s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 697s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/tlsstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/tlsstat.m 697s ***** error tlsstat () 697s ***** error tlsstat (1) 697s ***** error tlsstat (1, 2) 697s ***** error tlsstat ({}, 2, 3) 697s ***** error tlsstat (1, "", 3) 697s ***** error tlsstat (1, 2, ["d"]) 697s ***** error tlsstat (i, 2, 3) 697s ***** error tlsstat (1, i, 3) 697s ***** error tlsstat (1, 2, i) 697s ***** error ... 697s tlsstat (ones (3), ones (2), 1) 697s ***** error ... 697s tlsstat (ones (2), 1, ones (3)) 697s ***** error ... 697s tlsstat (1, ones (2), ones (3)) 697s ***** test 697s [m, v] = tlsstat (0, 1, 0); 697s assert (m, NaN); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (0, 1, 1); 697s assert (m, NaN); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (2, 1, 1); 697s assert (m, NaN); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (-2, 1, 1); 697s assert (m, NaN); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (0, 1, 2); 697s assert (m, 0); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (2, 1, 2); 697s assert (m, 2); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (-2, 1, 2); 697s assert (m, -2); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (0, 2, 2); 697s assert (m, 0); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (2, 2, 2); 697s assert (m, 2); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (-2, 2, 2); 697s assert (m, -2); 697s assert (v, NaN); 697s ***** test 697s [m, v] = tlsstat (0, 1, 3); 697s assert (m, 0); 697s assert (v, 3); 697s ***** test 697s [m, v] = tlsstat (0, 2, 3); 697s assert (m, 0); 697s assert (v, 6); 697s ***** test 697s [m, v] = tlsstat (2, 1, 3); 697s assert (m, 2); 697s assert (v, 3); 697s ***** test 697s [m, v] = tlsstat (2, 2, 3); 697s assert (m, 2); 697s assert (v, 6); 697s ***** test 697s [m, v] = tlsstat (-2, 1, 3); 697s assert (m, -2); 697s assert (v, 3); 697s ***** test 697s [m, v] = tlsstat (-2, 2, 3); 697s assert (m, -2); 697s assert (v, 6); 697s 28 tests, 28 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/ncx2stat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/ncx2stat.m 697s ***** error ncx2stat () 697s ***** error ncx2stat (1) 697s ***** error ncx2stat ({}, 2) 697s ***** error ncx2stat (1, "") 697s ***** error ncx2stat (i, 2) 697s ***** error ncx2stat (1, i) 697s ***** error ... 697s ncx2stat (ones (3), ones (2)) 697s ***** error ... 697s ncx2stat (ones (2), ones (3)) 697s ***** shared df, d1 697s df = [2, 0, -1, 1, 4]; 697s d1 = [1, NaN, 3, -1, 2]; 697s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 697s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 697s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 697s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 697s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 697s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 697s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 697s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 697s 16 tests, 16 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/nctstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/nctstat.m 697s ***** error nctstat () 697s ***** error nctstat (1) 697s ***** error nctstat ({}, 2) 697s ***** error nctstat (1, "") 697s ***** error nctstat (i, 2) 697s ***** error nctstat (1, i) 697s ***** error ... 697s nctstat (ones (3), ones (2)) 697s ***** error ... 697s nctstat (ones (2), ones (3)) 697s ***** shared df, mu 697s df = [2, 0, -1, 1, 4]; 697s mu = [1, NaN, 3, -1, 2]; 697s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 697s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 697s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 697s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 697s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 697s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 697s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 697s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 697s 16 tests, 16 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/binostat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/binostat.m 697s ***** error binostat () 697s ***** error binostat (1) 697s ***** error binostat ({}, 2) 697s ***** error binostat (1, "") 697s ***** error binostat (i, 2) 697s ***** error binostat (1, i) 697s ***** error ... 697s binostat (ones (3), ones (2)) 697s ***** error ... 697s binostat (ones (2), ones (3)) 697s ***** test 697s n = 1:6; 697s ps = 0:0.2:1; 697s [m, v] = binostat (n, ps); 697s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 697s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s n = 1:6; 697s [m, v] = binostat (n, 0.5); 697s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 697s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 697s [m, v] = binostat (n, 0.5); 697s assert (isnan (m), [true true false true false true false false]) 697s assert (isnan (v), [true true false true false true false false]) 697s assert (m(end), Inf); 697s assert (v(end), Inf); 697s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 697s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 697s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 697s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 697s 15 tests, 15 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/nbinstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/nbinstat.m 697s ***** error nbinstat () 697s ***** error nbinstat (1) 697s ***** error nbinstat ({}, 2) 697s ***** error nbinstat (1, "") 697s ***** error nbinstat (i, 2) 697s ***** error nbinstat (1, i) 697s ***** error ... 697s nbinstat (ones (3), ones (2)) 697s ***** error ... 697s nbinstat (ones (2), ones (3)) 697s ***** test 697s r = 1:4; 697s ps = 0.2:0.2:0.8; 697s [m, v] = nbinstat (r, ps); 697s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 697s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s r = 1:4; 697s [m, v] = nbinstat (r, 0.5); 697s expected_m = [1, 2, 3, 4]; 697s expected_v = [2, 4, 6, 8]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/bisastat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/bisastat.m 697s ***** error bisastat () 697s ***** error bisastat (1) 697s ***** error bisastat ({}, 2) 697s ***** error bisastat (1, "") 697s ***** error bisastat (i, 2) 697s ***** error bisastat (1, i) 697s ***** error ... 697s bisastat (ones (3), ones (2)) 697s ***** error ... 697s bisastat (ones (2), ones (3)) 697s ***** test 697s beta = 1:6; 697s gamma = 1:0.2:2; 697s [m, v] = bisastat (beta, gamma); 697s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 697s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 697s assert (m, expected_m, 1e-2); 697s assert (v, expected_v, 1e-3); 697s ***** test 697s beta = 1:6; 697s [m, v] = bisastat (beta, 1.5); 697s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 697s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 697s assert (m, expected_m, 1e-3); 697s assert (v, expected_v, 1e-4); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/loglstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/loglstat.m 697s ***** error loglstat () 697s ***** error loglstat (1) 697s ***** error loglstat ({}, 2) 697s ***** error loglstat (1, "") 697s ***** error loglstat (i, 2) 697s ***** error loglstat (1, i) 697s ***** error ... 697s loglstat (ones (3), ones (2)) 697s ***** error ... 697s loglstat (ones (2), ones (3)) 697s ***** test 697s [m, v] = loglstat (0, 1); 697s assert (m, Inf, 0.001); 697s assert (v, Inf, 0.001); 697s ***** test 697s [m, v] = loglstat (0, 0.8); 697s assert (m, 4.2758, 0.001); 697s assert (v, Inf, 0.001); 697s ***** test 697s [m, v] = loglstat (0, 0.6); 697s assert (m, 1.9820, 0.001); 697s assert (v, Inf, 0.001); 697s ***** test 697s [m, v] = loglstat (0, 0.4); 697s assert (m, 1.3213, 0.001); 697s assert (v, 2.5300, 0.001); 697s ***** test 697s [m, v] = loglstat (0, 0.2); 697s assert (m, 1.0690, 0.001); 697s assert (v, 0.1786, 0.001); 697s 13 tests, 13 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/unifstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/unifstat.m 697s ***** error unifstat () 697s ***** error unifstat (1) 697s ***** error unifstat ({}, 2) 697s ***** error unifstat (1, "") 697s ***** error unifstat (i, 2) 697s ***** error unifstat (1, i) 697s ***** error ... 697s unifstat (ones (3), ones (2)) 697s ***** error ... 697s unifstat (ones (2), ones (3)) 697s ***** test 697s a = 1:6; 697s b = 2:2:12; 697s [m, v] = unifstat (a, b); 697s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 697s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s a = 1:6; 697s [m, v] = unifstat (a, 10); 697s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 697s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/tstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/tstat.m 697s ***** error tstat () 697s ***** error tstat ({}) 697s ***** error tstat ("") 697s ***** error tstat (i) 697s ***** test 697s df = 3:8; 697s [m, v] = tstat (df); 697s expected_m = [0, 0, 0, 0, 0, 0]; 697s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 697s assert (m, expected_m); 697s assert (v, expected_v, 0.001); 697s 5 tests, 5 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/logistat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/logistat.m 697s ***** error logistat () 697s ***** error logistat (1) 697s ***** error logistat ({}, 2) 697s ***** error logistat (1, "") 697s ***** error logistat (i, 2) 697s ***** error logistat (1, i) 697s ***** error ... 697s logistat (ones (3), ones (2)) 697s ***** error ... 697s logistat (ones (2), ones (3)) 697s ***** test 697s [m, v] = logistat (0, 1); 697s assert (m, 0); 697s assert (v, 3.2899, 0.001); 697s ***** test 697s [m, v] = logistat (0, 0.8); 697s assert (m, 0); 697s assert (v, 2.1055, 0.001); 697s ***** test 697s [m, v] = logistat (1, 0.6); 697s assert (m, 1); 697s assert (v, 1.1844, 0.001); 697s ***** test 697s [m, v] = logistat (0, 0.4); 697s assert (m, 0); 697s assert (v, 0.5264, 0.001); 697s ***** test 697s [m, v] = logistat (-1, 0.2); 697s assert (m, -1); 697s assert (v, 0.1316, 0.001); 697s 13 tests, 13 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/invgstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/invgstat.m 697s ***** error invgstat () 697s ***** error invgstat (1) 697s ***** error invgstat ({}, 2) 697s ***** error invgstat (1, "") 697s ***** error invgstat (i, 2) 697s ***** error invgstat (1, i) 697s ***** error ... 697s invgstat (ones (3), ones (2)) 697s ***** error ... 697s invgstat (ones (2), ones (3)) 697s ***** test 697s [m, v] = invgstat (1, 1); 697s assert (m, 1); 697s assert (v, 1); 697s ***** test 697s [m, v] = invgstat (2, 1); 697s assert (m, 2); 697s assert (v, 8); 697s ***** test 697s [m, v] = invgstat (2, 2); 697s assert (m, 2); 697s assert (v, 4); 697s ***** test 697s [m, v] = invgstat (2, 2.5); 697s assert (m, 2); 697s assert (v, 3.2); 697s ***** test 697s [m, v] = invgstat (1.5, 0.5); 697s assert (m, 1.5); 697s assert (v, 6.75); 697s 13 tests, 13 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/gamstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/gamstat.m 697s ***** error gamstat () 697s ***** error gamstat (1) 697s ***** error gamstat ({}, 2) 697s ***** error gamstat (1, "") 697s ***** error gamstat (i, 2) 697s ***** error gamstat (1, i) 697s ***** error ... 697s gamstat (ones (3), ones (2)) 697s ***** error ... 697s gamstat (ones (2), ones (3)) 697s ***** test 697s a = 1:6; 697s b = 1:0.2:2; 697s [m, v] = gamstat (a, b); 697s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 697s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s a = 1:6; 697s [m, v] = gamstat (a, 1.5); 697s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 697s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/fstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/fstat.m 697s ***** error fstat () 697s ***** error fstat (1) 697s ***** error fstat ({}, 2) 697s ***** error fstat (1, "") 697s ***** error fstat (i, 2) 697s ***** error fstat (1, i) 697s ***** error ... 697s fstat (ones (3), ones (2)) 697s ***** error ... 697s fstat (ones (2), ones (3)) 697s ***** test 697s df1 = 1:6; 697s df2 = 5:10; 697s [m, v] = fstat (df1, df2); 697s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 697s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 697s assert (m, expected_mn, 0.001); 697s assert (v, expected_v, 0.001); 697s ***** test 697s df1 = 1:6; 697s [m, v] = fstat (df1, 5); 697s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 697s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 697s assert (m, expected_mn, 0.001); 697s assert (v, expected_v, 0.001); 697s 10 tests, 10 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/poisstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/poisstat.m 697s ***** error poisstat () 697s ***** error poisstat ({}) 697s ***** error poisstat ("") 697s ***** error poisstat (i) 697s ***** test 697s lambda = 1 ./ (1:6); 697s [m, v] = poisstat (lambda); 697s assert (m, lambda); 697s assert (v, lambda); 697s 5 tests, 5 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/unidstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/unidstat.m 697s ***** error unidstat () 697s ***** error unidstat ({}) 697s ***** error unidstat ("") 697s ***** error unidstat (i) 697s ***** test 697s N = 1:6; 697s [m, v] = unidstat (N); 697s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 697s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 697s assert (m, expected_m, 0.001); 697s assert (v, expected_v, 0.001); 697s 5 tests, 5 passed, 0 known failure, 0 skipped 697s [inst/dist_stat/gpstat.m] 697s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dist_stat/gpstat.m 697s ***** error gpstat () 697s ***** error gpstat (1) 697s ***** error gpstat (1, 2) 697s ***** error gpstat ({}, 2, 3) 697s ***** error gpstat (1, "", 3) 697s ***** error gpstat (1, 2, "") 697s ***** error gpstat (i, 2, 3) 697s ***** error gpstat (1, i, 3) 697s ***** error gpstat (1, 2, i) 697s ***** error ... 697s gpstat (ones (3), ones (2), 3) 697s ***** error ... 697s gpstat (ones (2), 2, ones (3)) 697s ***** error ... 697s gpstat (1, ones (2), ones (3)) 698s ***** shared x, y 698s x = [-Inf, -1, 0, 1/2, 1, Inf]; 698s y = [0, 0.5, 1, 2, Inf, Inf]; 698s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 698s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 698s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 698s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 698s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 698s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 698s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 698s 19 tests, 19 passed, 0 known failure, 0 skipped 698s [inst/x2fx.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/x2fx.m 698s ***** test 698s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 698s D = x2fx(X,'quadratic'); 698s assert (D(1,:), [1, 1, 10, 10, 1, 100]); 698s assert (D(2,:), [1, 2, 20, 40, 4, 400]); 698s ***** test 698s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 698s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 698s D = x2fx(X,model); 698s assert (D(1,:), [1, 1, 10, 10, 1]); 698s assert (D(2,:), [1, 2, 20, 40, 4]); 698s assert (D(4,:), [1, 4, 20, 80, 16]); 698s ***** test 698s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 698s D = x2fx (x, 'linear'); 698s assert (D, [1, 1, 2, 3; 1, 2, 3, 4;, 1, 3, 4, 5]); 698s D = x2fx (x, 'interaction'); 698s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6]); 698s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12]); 698s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20]); 698s D = x2fx (x, 'quadratic'); 698s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6, 1, 4, 9]); 698s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12, 4, 9, 16]); 698s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20, 9, 16, 25]); 698s D = x2fx (x, 'purequadratic'); 698s assert (D(1,:), [1, 1, 2, 3, 1, 4, 9]); 698s assert (D(2,:), [1, 2, 3, 4, 4, 9, 16]); 698s assert (D(3,:), [1, 3, 4, 5, 9, 16, 25]); 698s ***** test 698s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 698s D = x2fx (x, [0, 0, 1; 1, 0, 2]); 698s assert (D, [3, 9; 4, 32; 5, 75]); 698s ***** test 698s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 698s D = x2fx (x, 'linear', [1, 3]); 698s assert (D, [1, 1, 0, 2, 1, 0; 1, 0, 1, 3, 0, 1; 1, 0, 0, 4, 0, 0]); 698s ***** test 698s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 698s D = x2fx (x, 'quadratic', [1, 3]); 698s assert (D(1,:), [1, 1, 0, 2, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 4]); 698s assert (D(2,:), [1, 0, 1, 3, 0, 1, 0, 3, 0, 0, 0, 1, 0, 3, 9]); 698s assert (D(3,:), [1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]); 698s ***** test 698s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 698s D = x2fx (x, 'cos'); 698s assert (D(1,:), [0.5403, -0.4161, -0.9900], 1e-4); 698s assert (D(2,:), [-0.4161, -0.9900, -0.6536], 1e-4); 698s assert (D(3,:), [-0.9900, -0.6536, 0.2837], 1e-4); 698s ***** error ... 698s x2fx ([1, 2, 3; 2, 3, 4], 'quadratic', [1, 4]) 698s ***** error ... 698s D = x2fx ([1, 2, 3; 2, 3, 4; 3, 4, 5], 'cosine') 698s ***** error ... 698s x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 698s ***** error ... 698s x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 698s 11 tests, 11 passed, 0 known failure, 0 skipped 698s [inst/createns.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/createns.m 698s ***** test 698s ## Default ExhaustiveSearcher 698s X = [1, 2; 3, 4; 5, 6]; 698s obj = createns (X); 698s assert (isa (obj, "ExhaustiveSearcher")); 698s assert (obj.X, X); 698s assert (obj.Distance, "euclidean"); 698s ***** test 698s ## KDTreeSearcher with default parameters 698s X = [1, 2; 3, 4; 5, 6]; 698s obj = createns (X, "NSMethod", "kdtree"); 698s assert (isa (obj, "KDTreeSearcher")); 698s assert (obj.X, X); 698s assert (obj.Distance, "euclidean"); 698s ***** test 698s ## hnswSearcher with custom parameters 698s X = [1, 2; 3, 4; 5, 6]; 698s obj = createns (X, "NSMethod", "hnsw", "MaxNumLinksPerNode", 2, "TrainSetSize", 3); 698s assert (isa (obj, "hnswSearcher")); 698s assert (obj.X, X); 698s assert (obj.MaxNumLinksPerNode, 2); 698s assert (obj.TrainSetSize, 3); 698s ***** test 698s ## ExhaustiveSearcher with custom distance 698s X = [1, 2; 3, 4]; 698s obj = createns (X, "NSMethod", "exhaustive", "Distance", "cityblock"); 698s assert (isa (obj, "ExhaustiveSearcher")); 698s assert (obj.Distance, "cityblock"); 698s ***** error 698s createns () 698s ***** error 698s X = [1, 2; 3, 4]; createns (X, "NSMethod") 698s ***** error 698s createns ([1; Inf; 3]) 698s ***** error 698s X = [1, 2; 3, 4]; createns (X, "NSMethod", 1) 698s ***** error 698s X = [1, 2; 3, 4]; createns (X, "NSMethod", "invalid") 698s 9 tests, 9 passed, 0 known failure, 0 skipped 698s [inst/canoncorr.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/canoncorr.m 698s ***** shared X,Y,A,B,r,U,V,k 698s k = 10; 698s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 698s [A,B,r,U,V,stats] = canoncorr (X,Y); 698s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 698s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 698s ***** assert (r, [0.99590 0.26754], 1E-5); 698s ***** assert (U, center(X) * A, 10*eps); 698s ***** assert (V, center(Y) * B, 10*eps); 698s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 698s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 698s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 698s ***** assert (r, ones(1, 5), 10*eps); 698s 8 tests, 8 passed, 0 known failure, 0 skipped 698s [inst/harmmean.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/harmmean.m 698s ***** test 698s x = [0:10]; 698s y = [x;x+5;x+10]; 698s assert (harmmean (x), 0); 698s m = [0 8.907635160795225 14.30854471766802]; 698s assert (harmmean (y, 2), m', 4e-14); 698s assert (harmmean (y, "all"), 0); 698s y(2,4) = NaN; 698s m(2) = 9.009855936313949; 698s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 698s assert (harmmean (y', "omitnan"), m, 4e-14); 698s z = y + 20; 698s assert (harmmean (z, "all"), NaN); 698s assert (harmmean (z, "all", "includenan"), NaN); 698s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 698s m = [24.59488458841874 NaN 34.71244385944397]; 698s assert (harmmean (z'), m, 4e-14); 698s assert (harmmean (z', "includenan"), m, 4e-14); 698s m(2) = 29.84104075528277; 698s assert (harmmean (z', "omitnan"), m, 4e-14); 698s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 698s ***** test 698s x = repmat ([1:20;6:25], [5 2 6 3]); 698s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 698s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 698s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 698s assert (size (harmmean (x, [1 4 3])), [1 40]); 698s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 698s ***** test 698s x = repmat ([1:20;6:25], [5 2 6 3]); 698s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 698s assert (harmmean (x, [3 2]), m, 4e-14); 698s x(2,5,6,3) = NaN; 698s m(2,3) = NaN; 698s assert (harmmean (x, [3 2]), m, 4e-14); 698s m(2,3) = 13.06617961315406; 698s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 698s ***** error harmmean ("char") 698s ***** error harmmean ([1 -1 3]) 698s ***** error ... 698s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 698s ***** error ... 698s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 698s ***** error ... 698s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 698s 8 tests, 8 passed, 0 known failure, 0 skipped 698s [inst/gmdistribution.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/gmdistribution.m 698s ***** test 698s mu = eye(2); 698s Sigma = eye(2); 698s GM = gmdistribution (mu, Sigma); 698s density = GM.pdf ([0 0; 1 1]); 698s assert (density(1) - density(2), 0, 1e-6); 698s 698s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 698s assert (idx, [1; 2]); 698s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 698s assert (nlogl - nlogl2, 0, 1e-6); 698s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 698s assert (P - P3, zeros (2), 1e-6); 698s [idx4,nlogl4] = cluster (GM, eye(2)); 698s assert (size (nlogl4), [1 1]); 698s idx5 = cluster (GM, eye(2)); 698s assert (idx - idx5, zeros (2,1)); 698s 698s D = GM.mahal ([1;0]); 698s assert (D - M(1,:), zeros (1,2), 1e-6); 698s 698s P = GM.posterior ([0 1]); 698s assert (P - P2(2,:), zeros (1,2), 1e-6); 698s 698s R = GM.random(20); 698s assert (size(R), [20, 2]); 698s 698s R = GM.random(); 698s assert (size(R), [1, 2]); 698s 1 test, 1 passed, 0 known failure, 0 skipped 698s [inst/ranksum.m] 698s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/ranksum.m 698s ***** test 698s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 698s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 698s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 698s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 698s assert (p, 0.004329004329004329, 1e-14); 698s assert (h, true); 698s assert (stats.ranksum, 21.5); 698s ***** test 698s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 698s 49 47 50 60 59 60 62 61 71]'; 698s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 698s 54 50 53 62 62 62 72 60 67]'; 698s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 698s assert (p, 0.1270832752950605, 1e-14); 698s assert (h, false); 698s assert (stats.ranksum, 837.5); 698s assert (stats.zval, -1.140287483634606, 1e-14); 698s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 698s "method", "exact"); 698s assert (p, 0.127343916432862, 1e-14); 698s assert (h, false); 698s assert (stats.ranksum, 837.5); 716s 2 tests, 2 passed, 0 known failure, 0 skipped 716s [inst/gscatter.m] 716s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/gscatter.m 716s ***** demo 716s load fisheriris; 716s X = meas(:,3:4); 716s cidcs = kmeans (X, 3, "Replicates", 5); 716s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 716s title ("Fisher's iris data"); 716s ***** shared visibility_setting 716s visibility_setting = get (0, "DefaultFigureVisible"); 716s ***** test 716s hf = figure ("visible", "off"); 716s unwind_protect 716s load fisheriris; 716s X = meas(:,3:4); 716s cidcs = kmeans (X, 3, "Replicates", 5); 716s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 716s title ("Fisher's iris data"); 716s unwind_protect_cleanup 716s close (hf); 716s end_unwind_protect 716s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 716s ***** error gscatter (); 716s ***** error gscatter ([1]); 716s ***** error gscatter ([1], [2]); 716s ***** error gscatter ('abc', [1 2 3], [1]); 716s ***** error gscatter ([1 2 3], [1 2], [1]); 716s ***** error gscatter ([1 2 3], 'abc', [1]); 716s ***** error gscatter ([1 2], [1 2], [1]); 716s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 716s 9 tests, 9 passed, 0 known failure, 0 skipped 716s [inst/sampsizepwr.m] 716s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/sampsizepwr.m 716s ***** demo 716s ## Compute the mean closest to 100 that can be determined to be 716s ## significantly different from 100 using a t-test with a sample size 716s ## of 60 and a power of 0.8. 716s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 716s disp (mu1); 716s ***** demo 716s ## Compute the sample sizes required to distinguish mu0 = 100 from 716s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 716s ## smaller sample sizes of 1.5 and a power of 0.6. 716s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 716s ***** demo 716s ## Compute the sample size N required to distinguish p=.26 from p=.2 716s ## with a binomial test. The result is approximate, so make a plot to 716s ## see if any smaller N values also have the required power of 0.6. 716s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 716s nn = 1:250; 716s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 716s Nexact = min (nn(pwr >= 0.6)); 716s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 716s grid on 716s ***** demo 716s ## The company must test 52 bottles to detect the difference between a mean 716s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 716s ## to visualize how the sample size affects the power of the test. 716s 716s nout = sampsizepwr('t',[100 5],102,0.80); 716s nn = 1:100; 716s pwrout = sampsizepwr('t',[100 5],102,[],nn); 716s 716s figure; 716s plot (nn, pwrout, "b-", nout, 0.8, "ro") 716s title ("Power versus Sample Size") 716s xlabel ("Sample Size") 716s ylabel ("Power") 716s ***** error ... 716s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("z", 100, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("t", 100, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("t2", 60, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 716s ***** error ... 716s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("var", 0, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("var", -5, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("p", 0, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", -1, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", 0, [], 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 716s ***** error ... 716s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], [], [], 60); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], 110, [], []); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 716s ***** error ... 716s out = sampsizepwr ("var", 5, -1, [], 60); 716s ***** error ... 716s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 716s ***** error ... 716s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 716s ***** error ... 716s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], 110, 1.2); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], 110, 0); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 716s ***** error ... 716s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 716s ***** error ... 716s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 716s ***** error ... 716s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 716s ***** error ... 716s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 716s ***** warning ... 716s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 717s ***** warning ... 717s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 717s ***** test 717s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 717s assert (mu1, 103.67704316, 1e-8); 718s ***** test 718s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 718s assert (N1, 9); 718s assert (N2, 14); 719s ***** test 719s nn = 1:250; 719s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 719s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 719s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 719s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 719s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 719s ***** test 719s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 719s assert (nout, 52); 719s ***** test 719s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 719s assert (power, 0.5797373588621888, 1e-14); 719s ***** test 719s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 719s assert (nout, 18); 719s ***** test 719s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 719s assert (p1out, 25.65317979360237, 2e-14); 720s ***** test 720s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 720s assert (pwr, 0.716504004686586, 1e-14); 720s ***** test 720s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 720s assert (n, 11); 721s ***** test 721s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 721s assert ([n1, n2], [8, 16]); 722s 68 tests, 68 passed, 0 known failure, 0 skipped 722s [inst/crosstab.m] 722s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/crosstab.m 722s ***** error crosstab () 722s ***** error crosstab (1) 722s ***** error crosstab (ones (2), [1 1]) 722s ***** error crosstab ([1 1], ones (2)) 722s ***** error crosstab ([1], [1 2]) 722s ***** error crosstab ([1 2], [1]) 722s ***** test 722s load carbig 722s [table, chisq, p, labels] = crosstab (cyl4, when, org); 722s assert (table(2,3,1), 38); 722s assert (labels{3,3}, "Japan"); 722s ***** test 722s load carbig 722s [table, chisq, p, labels] = crosstab (cyl4, when, org); 722s assert (table(2,3,2), 17); 722s assert (labels{1,3}, "USA"); 722s ***** test 722s x = [1, 1, 2, 3, 1]; 722s y = [1, 2, 5, 3, 1]; 722s t = crosstab (x, y); 722s assert (t, [2, 1, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0]); 722s ***** test 722s x = [1, 1, 2, 3, 1]; 722s y = [1, 2, 3, 5, 1]; 722s t = crosstab (x, y); 722s assert (t, [2, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1]); 722s ***** test 722s x1 = [1, 3, 7, 7, 8]; 722s x2 = [4, 2, 1, 1, 1]; 722s x3 = [6, 2, 6, 2, NaN]; 722s T1 = [0, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 0]; 722s T2 = [0, 0, 1; 0, 0, 0; 1, 0, 0; 0, 0, 0]; 722s T = zeros (4, 3, 2); 722s T(:,:,1) = T1; 722s T(:,:,2) = T2; 722s t = crosstab (x1, x2, x3); 722s assert (t, T); 722s ***** test 722s x = [1, 2, NaN, 1]; 722s y = [1, 2, 3, NaN]; 722s t = crosstab (x, y); 722s assert (t, [1, 0, 0; 0, 1, 0]); 722s 12 tests, 12 passed, 0 known failure, 0 skipped 722s [inst/cophenet.m] 722s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/cophenet.m 722s ***** demo 722s randn ("seed", 5) # for reproducibility 722s X = randn (10,2); 722s y = pdist (X); 722s Z = linkage (y, "average"); 722s cophenet (Z, y) 722s ***** error cophenet () 722s ***** error cophenet (1) 722s ***** error ... 722s cophenet (ones (2,2), 1) 722s ***** error ... 722s cophenet ([1 2 1], "a") 722s ***** error ... 722s cophenet ([1 2 1], [1 2]) 722s 5 tests, 5 passed, 0 known failure, 0 skipped 722s [inst/mhsample.m] 722s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/mhsample.m 722s ***** demo 722s ## Define function to sample 722s d = 2; 722s mu = [-1; 2]; 722s rand ("seed", 5) # for reproducibility 722s Sigma = rand (d); 722s Sigma = (Sigma + Sigma'); 722s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 722s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 722s ## Inputs 722s start = ones (1, 2); 722s nsamples = 500; 722s sym = true; 722s K = 500; 722s m = 10; 722s rand ("seed", 8) # for reproducibility 722s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 722s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 722s "symmetric", sym, "burnin", K, "thin", m); 722s figure; 722s hold on; 722s plot (smpl(:, 1), smpl(:, 2), 'x'); 722s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 722s z = reshape (pdf ([x(:), y(:)]), size(x)); 722s mesh (x, y, z, "facecolor", "None"); 722s ## Using sample points to find the volume of half a sphere with radius of .5 722s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 722s int = mean (f (smpl) ./ pdf (smpl)); 722s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 722s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 722s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 722s printf ("Monte Carlo integral error estimate %f\n", errest); 722s printf ("The actual error %f\n", trueerr); 722s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 722s ***** demo 722s ## Integrate truncated normal distribution to find normalization constant 722s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 722s nsamples = 1e3; 722s rand ("seed", 5) # for reproducibility 722s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 722s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 722s "symmetric", true, "thin", 4); 722s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 722s x = linspace (-3, 3, 1000); 722s area(x, f(x)); 722s xlabel ('x'); 722s ylabel ('f(x)'); 722s int = mean (f (smpl) ./ pdf (smpl)); 722s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 722s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 722s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 722s printf ("Monte Carlo integral error estimate %f\n", errest); 722s printf ("The actual error %f\n", trueerr); 722s ***** test 722s nchain = 1e4; 722s start = rand (nchain, 1); 722s nsamples = 1e3; 722s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 722s proppdf = @(x, y) 1/3; 722s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 722s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 722s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 722s "burnin", 0); 722s assert (mean (mean (smpl, 1), 3), 1, .01); 722s assert (mean (var (smpl, 1), 3), 1, .01) 727s ***** error mhsample (); 727s ***** error mhsample (1); 727s ***** error mhsample (1, 1); 727s ***** error mhsample (1, 1, "pdf", @(x)x); 727s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 727s 6 tests, 6 passed, 0 known failure, 0 skipped 727s [inst/loadmodel.m] 727s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/loadmodel.m 727s ***** error loadmodel () 727s ***** error ... 727s loadmodel ("fisheriris.mat") 727s ***** error ... 727s loadmodel ("fail_loadmodel.mdl") 727s ***** error ... 727s loadmodel ("fail_load_model.mdl") 727s 4 tests, 4 passed, 0 known failure, 0 skipped 727s [inst/fullfact.m] 727s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/fullfact.m 727s ***** demo 727s ## Full factorial design with 3 ordinal variables 727s fullfact ([2, 3, 4]) 727s ***** error fullfact (); 727s ***** error ... 727s fullfact (Inf); 727s ***** error ... 727s fullfact (NaN); 727s ***** error ... 727s fullfact (ones (2)); 727s ***** error ... 727s fullfact ([1, 2, NaN]); 727s ***** error ... 727s fullfact ([1, 2, Inf]); 727s ***** error fullfact (2.5); 727s ***** error fullfact (0); 727s ***** error fullfact (-3); 727s ***** error fullfact (3+2i); 727s ***** error fullfact ([1, 2, -3]); 727s ***** error fullfact ([0, 1, 2]); 727s ***** test 727s A = fullfact (1); 727s assert (A, 1); 727s ***** test 727s A = fullfact (2); 727s assert (A, [1; 2]); 727s ***** test 727s ***** test 727s A = fullfact (3); 727s assert (A, [1; 2; 3]); 733s ***** test 733s A = fullfact ([1, 2, 4]); 733s A_out = [1, 1, 1; 1, 2, 1; 1, 1, 2; 1, 2, 2; ... 733s 1, 1, 3; 1, 2, 3; 1, 1, 4; 1, 2, 4]; 733s assert (A, A_out); 733s ***** test 733s A = fullfact ([2, 2]); 733s assert (A, [1, 1; 2, 1; 1, 2; 2, 2]); 733s ***** test 733s A = fullfact ([2, 2, 4]); 733s A_out = [1, 1, 1; 2, 1, 1; 1, 2, 1; 2, 2, 1; ... 733s 1, 1, 2; 2, 1, 2; 1, 2, 2; 2, 2, 2; ... 733s 1, 1, 3; 2, 1, 3; 1, 2, 3; 2, 2, 3; ... 733s 1, 1, 4; 2, 1, 4; 1, 2, 4; 2, 2, 4]; 733s assert (A, A_out); 733s ***** test 733s A = fullfact ([3, 2, 4]); 733s A_out = [1, 1, 1; 2, 1, 1; 3, 1, 1; 1, 2, 1; 2, 2, 1; 3, 2, 1; ... 733s 1, 1, 2; 2, 1, 2; 3, 1, 2; 1, 2, 2; 2, 2, 2; 3, 2, 2; ... 733s 1, 1, 3; 2, 1, 3; 3, 1, 3; 1, 2, 3; 2, 2, 3; 3, 2, 3; ... 733s 1, 1, 4; 2, 1, 4; 3, 1, 4; 1, 2, 4; 2, 2, 4; 3, 2, 4]; 733s assert (A, A_out); 733s ***** test 733s A = fullfact ([4, 2]); 733s assert (A, [1, 1; 2, 1; 3, 1; 4, 1; 1, 2; 2, 2; 3, 2; 4, 2]); 733s 21 tests, 21 passed, 0 known failure, 0 skipped 733s [inst/rmmissing.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/rmmissing.m 733s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 733s ***** assert (rmmissing ('abcd f'), 'abcdf') 733s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 733s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 733s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 733s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 733s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 733s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 733s ***** test 733s x = [1:6]; 733s x([2,4]) = NaN; 733s [~, idx] = rmmissing (x); 733s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 733s assert (class(idx), 'logical'); 733s x = reshape (x, [2, 3]); 733s [~, idx] = rmmissing (x); 733s assert (idx, logical ([0; 1])); 733s assert (class(idx), 'logical'); 733s [~, idx] = rmmissing (x, 2); 733s assert (idx, logical ([1, 1, 0])); 733s assert (class(idx), 'logical'); 733s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 733s assert (idx, logical ([0; 1])); 733s assert (class(idx), 'logical'); 733s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 733s assert (idx, logical ([0, 0, 0])); 733s assert (class(idx), 'logical'); 733s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 733s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 733s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 733s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 733s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 733s autopkgtest [09:00:59]: test command1: -----------------------] 733s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 733s ***** assert (rmmissing ([]), []) 733s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 733s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 733s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 733s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 733s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 733s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 733s ***** error rmmissing (ones (0,1,2)) 733s ***** error rmmissing () 733s ***** error rmmissing (ones(2,2,2)) 733s ***** error rmmissing ([1 2; 3 4], 5) 733s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 733s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 733s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 733s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 733s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 733s 31 tests, 31 passed, 0 known failure, 0 skipped 733s [inst/mnrfit.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/mnrfit.m 733s ***** error mnrfit (ones (50,1)) 733s ***** error ... 733s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 733s ***** error ... 733s mnrfit (ones (50, 4, 2), ones (50, 1)) 733s ***** error ... 733s mnrfit (ones (50, 4), ones (50, 1, 3)) 733s ***** error ... 733s mnrfit (ones (50, 4), ones (45,1)) 733s ***** error ... 733s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 733s ***** error ... 733s mnrfit (ones (5, 4), ones (5, 1), "model") 733s ***** error ... 733s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 733s ***** error ... 733s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 733s ***** error ... 733s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 733s ***** error ... 733s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 733s ***** error ... 733s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 733s ***** error ... 733s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 733s 13 tests, 13 passed, 0 known failure, 0 skipped 733s [inst/datasample.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/datasample.m 733s ***** error datasample(); 733s ***** error datasample(1); 733s ***** error datasample({1, 2, 3}, 1); 733s ***** error datasample([1 2], -1); 733s ***** error datasample([1 2], 1.5); 733s ***** error datasample([1 2], [1 1]); 733s ***** error datasample([1 2], 'g', [1 1]); 733s ***** error datasample([1 2], 1, -1); 733s ***** error datasample([1 2], 1, 1.5); 733s ***** error datasample([1 2], 1, [1 1]); 733s ***** error datasample([1 2], 1, 1, "Replace", -2); 733s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 733s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 733s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 733s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 733s ***** test 733s dat = randn (10, 4); 733s assert (size (datasample (dat, 3, 1)), [3 4]); 733s ***** test 733s dat = randn (10, 4); 733s assert (size (datasample (dat, 3, 2)), [10 3]); 733s 17 tests, 17 passed, 0 known failure, 0 skipped 733s [inst/dendrogram.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/dendrogram.m 733s ***** demo 733s ## simple dendrogram 733s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 733s y(:,3) = 1:5; 733s dendrogram (y); 733s title ("simple dendrogram"); 733s ***** demo 733s ## another simple dendrogram 733s v = 2 * rand (30, 1) - 1; 733s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 733s y = linkage (squareform (d, "tovector")); 733s dendrogram (y); 733s title ("another simple dendrogram"); 733s ***** demo 733s ## collapsed tree, find all the leaves of node 5 733s X = randn (60, 2); 733s D = pdist (X); 733s y = linkage (D, "average"); 733s subplot (2, 1, 1); 733s title ("original tree"); 733s dendrogram (y, 0); 733s subplot (2, 1, 2); 733s title ("collapsed tree"); 733s [~, t] = dendrogram (y, 20); 733s find(t == 5) 733s ***** demo 733s ## optimal leaf order 733s X = randn (30, 2); 733s D = pdist (X); 733s y = linkage (D, "average"); 733s order = optimalleaforder (y, D); 733s subplot (2, 1, 1); 733s title ("original leaf order"); 733s dendrogram (y); 733s subplot (2, 1, 2); 733s title ("optimal leaf order"); 733s dendrogram (y, "Reorder", order); 733s ***** demo 733s ## horizontal orientation and labels 733s X = randn (8, 2); 733s D = pdist (X); 733s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 733s "Sneezy"; "Dopey"]; 733s y = linkage (D, "average"); 733s dendrogram (y, "Orientation", "left", "Labels", L); 733s title ("horizontal orientation and labels"); 733s ***** shared visibility_setting 733s visibility_setting = get (0, "DefaultFigureVisible"); 733s ***** test 733s hf = figure ("visible", "off"); 733s unwind_protect 733s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 733s y(:,3) = 1:5; 733s dendrogram (y); 733s unwind_protect_cleanup 733s close (hf); 733s end_unwind_protect 733s ***** test 733s hf = figure ("visible", "off"); 733s unwind_protect 733s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 733s y(:,3) = 1:5; 733s dendrogram (y); 733s unwind_protect_cleanup 733s close (hf); 733s end_unwind_protect 733s ***** test 733s hf = figure ("visible", "off"); 733s unwind_protect 733s v = 2 * rand (30, 1) - 1; 733s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 733s y = linkage (squareform (d, "tovector")); 733s dendrogram (y); 733s unwind_protect_cleanup 733s close (hf); 733s end_unwind_protect 733s ***** test 733s hf = figure ("visible", "off"); 733s unwind_protect 733s X = randn (30, 2); 733s D = pdist (X); 733s y = linkage (D, "average"); 733s order = optimalleaforder (y, D); 733s subplot (2, 1, 1); 733s title ("original leaf order"); 733s dendrogram (y); 733s subplot (2, 1, 2); 733s title ("optimal leaf order"); 733s dendrogram (y, "Reorder", order); 733s unwind_protect_cleanup 733s close (hf); 733s end_unwind_protect 733s ***** error dendrogram (); 733s ***** error dendrogram (ones (2, 2), 1); 733s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 733s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 733s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 733s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 733s 9 tests, 9 passed, 0 known failure, 0 skipped 733s [inst/vartest.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/vartest.m 733s ***** error vartest (); 733s ***** error vartest ([1, 2, 3, 4], -0.5); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 0); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "tail", "val"); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "dim", 3); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 733s ***** error ... 733s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 733s ***** test 733s load carsmall 733s [h, pval, ci] = vartest (MPG, 7^2); 733s assert (h, 1); 733s assert (pval, 0.04335086742174443, 1e-14); 733s assert (ci, [49.397; 88.039], 1e-3); 733s ***** test 733s load carsmall 733s [h, pval, ci] = vartest (MPG, 7^2, "tail", "left"); 733s assert (h, 0); 733s assert (pval, 0.978324566289128, 1e-14); 733s assert (ci, [0; 83.685], 1e-3); 733s ***** test 733s load carsmall 733s [h, pval, ci] = vartest (MPG, 7^2, "tail", "right"); 733s assert (h, 1); 733s assert (pval, 0.021675433710872, 1e-14); 733s assert (ci, [51.543; Inf], 1e-3); 733s 14 tests, 14 passed, 0 known failure, 0 skipped 733s [inst/hmmgenerate.m] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/inst/hmmgenerate.m 733s ***** test 733s len = 25; 733s transprob = [0.8, 0.2; 0.4, 0.6]; 733s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 733s [sequence, states] = hmmgenerate (len, transprob, outprob); 733s assert (length (sequence), len); 733s assert (length (states), len); 733s assert (min (sequence) >= 1); 733s assert (max (sequence) <= columns (outprob)); 733s assert (min (states) >= 1); 733s assert (max (states) <= rows (transprob)); 733s ***** test 733s len = 25; 733s transprob = [0.8, 0.2; 0.4, 0.6]; 733s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 733s symbols = {"A", "B", "C"}; 733s statenames = {"One", "Two"}; 733s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 733s "symbols", symbols, "statenames", statenames); 733s assert (length (sequence), len); 733s assert (length (states), len); 733s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 733s strcmp (sequence, "C") == ones (1, len)); 733s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 733s 2 tests, 2 passed, 0 known failure, 0 skipped 733s Checking C++ files ... 733s [src/libsvmread.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/libsvmread.cc 733s ***** error [L, D] = libsvmread (24); 733s ***** error ... 733s D = libsvmread ("filename"); 733s ***** test 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s assert (size (L), [270, 1]); 733s assert (size (D), [270, 13]); 733s ***** test 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s assert (issparse (L), false); 733s assert (issparse (D), true); 733s 4 tests, 4 passed, 0 known failure, 0 skipped 733s [src/svmtrain.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/svmtrain.cc 733s ***** test 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s model = svmtrain(L, D, '-c 1 -g 0.07'); 733s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 733s assert (isstruct (model), true); 733s assert (isfield (model, "Parameters"), true); 733s assert (model.totalSV, 130); 733s assert (model.nr_class, 2); 733s assert (size (model.Label), [2, 1]); 733s ***** shared L, D 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s ***** error [L, D] = svmtrain (L, D); 733s ***** error ... 733s model = svmtrain (single (L), D); 733s ***** error ... 733s model = svmtrain (L, D, "", ""); 733s 4 tests, 4 passed, 0 known failure, 0 skipped 733s [src/editDistance.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/editDistance.cc 733s ***** error d = editDistance (1, 2, 3, 4); 733s ***** error ... 733s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 733s ***** error ... 733s [C, IA] = editDistance ({"AS","SD","AD"}); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, [1, 2]); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, -2); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, 1.25); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 733s ***** error ... 733s d = editDistance ("string1", "string2", [1, 2]); 733s ***** error ... 733s d = editDistance ("string1", "string2", -2); 733s ***** error ... 733s d = editDistance ("string1", "string2", 1.25); 733s ***** error ... 733s d = editDistance ({{"string1", "string2"}, 2}); 733s ***** error ... 733s d = editDistance ({{"string1", "string2"}, 2}, 2); 733s ***** error ... 733s d = editDistance ([1, 2, 3]); 733s ***** error ... 733s d = editDistance (["AS","SD","AD","AS"]); 733s ***** error ... 733s d = editDistance (["AS","SD","AD"], 2); 733s ***** error ... 733s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 733s ***** error ... 733s d = editDistance ([1,2,3], {"AS","AS","AD"}); 733s ***** error ... 733s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 733s ***** error ... 733s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 733s ***** test 733s d = editDistance ({"AS","SD","AD"}); 733s assert (d, [2; 1; 1]); 733s assert (class (d), "double"); 733s ***** test 733s C = editDistance ({"AS","SD","AD"}, 1); 733s assert (iscellstr (C), true); 733s assert (C, {"AS";"SD"}); 733s ***** test 733s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 733s assert (class (IA), "double"); 733s assert (IA, [1;2]); 733s ***** test 733s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 733s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 733s assert (class (IA), "double"); 733s assert (A(IA), C); 733s ***** test 733s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 733s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 733s assert (class (IA), "cell"); 733s assert (C, {"ASS"; "FDE"; "OPA"}); 733s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 733s assert (A(IA{2}), {"FDE"; "EDS"}); 733s assert (A(IA{3}), {"OPA"}); 733s ***** test 733s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 733s [C, IA, IC] = editDistance (A, 2); 733s assert (class (IA), "double"); 733s assert (A(IA), C); 733s assert (IC, [1; 1; 3; 1; 5]); 733s ***** test 733s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 733s assert (d, [0; 1; 2]); 733s assert (class (d), "double"); 733s ***** test 733s d = editDistance ({"AS","SD","AD"}, {"AS"}); 733s assert (d, [0; 2; 1]); 733s assert (class (d), "double"); 733s ***** test 733s d = editDistance ({"AS"}, {"AS","SD","AD"}); 733s assert (d, [0; 2; 1]); 733s assert (class (d), "double"); 733s ***** test 733s b = editDistance ("Octave", "octave"); 733s assert (b, 1); 733s assert (class (b), "double"); 733s 33 tests, 33 passed, 0 known failure, 0 skipped 733s [src/fcnntrain.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/fcnntrain.cc 733s ***** shared X, Y, MODEL 733s load fisheriris 733s X = meas; 733s Y = grp2idx (species); 733s ***** error ... 733s model = fcnntrain (X, Y); 733s ***** error ... 733s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 733s ***** error ... 733s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 733s 33 tests, 33 passed, 0 known failure, 0 skipped 733s [src/libsvmwrite.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/libsvmwrite.cc 733s ***** shared L, D 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s ***** error libsvmwrite ("", L, D); 733s ***** error ... 733s libsvmwrite (tempname (), [L;L], D); 733s ***** error ... 733s OUT = libsvmwrite (tempname (), L, D); 733s ***** error ... 733s libsvmwrite (tempname (), single (L), D); 733s ***** error libsvmwrite (13412, L, D); 733s ***** error ... 733s libsvmwrite (tempname (), L, full (D)); 733s ***** error ... 733s libsvmwrite (tempname (), L, D, D); 733s 7 tests, 7 passed, 0 known failure, 0 skipped 733s [src/fcnnpredict.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/fcnnpredict.cc 733s ***** shared X, Y, MODEL 733s load fisheriris 733s X = meas; 733s Y = grp2idx (species); 733s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 733s ***** test 733s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 733s assert (numel (Y_pred), numel (Y)); 733s assert (isequal (size (Y_pred), size (Y)), true); 733s assert (columns (Y_scores), numel (unique (Y))); 733s assert (rows (Y_scores), numel (Y)); 733s ***** error ... 733s fcnnpredict (MODEL); 733s ***** error ... 733s [Q, W, E] = fcnnpredict (MODEL, X); 733s ***** error ... 733s fcnnpredict (1, X); 733s ***** error ... 733s fcnnpredict (struct ("L", {1, 2, 3}), X); 733s ***** error ... 733s fcnnpredict (struct ("L", 1), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", 1), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {1}), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 733s "Activations", [2]), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 733s "Activations", [2; 2]), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 733s "Activations", {{2, 2}}), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 733s "Activations", {{"sigmoid", "softmax"}}), X); 733s ***** error ... 733s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 733s "Activations", "sigmoid"), X); 733s ***** error ... 733s fcnnpredict (MODEL, complex (X)); 733s ***** error ... 733s fcnnpredict (MODEL, {1, 2, 3, 4}); 733s ***** error ... 733s fcnnpredict (MODEL, "asd"); 733s ***** error ... 733s fcnnpredict (MODEL, []); 733s ***** error ... 733s fcnnpredict (MODEL, X(:,[1:3])); 733s 20 tests, 20 passed, 0 known failure, 0 skipped 733s [src/svmpredict.cc] 733s >>>>> /tmp/autopkgtest.HPv1lw/build.Fbp/src/src/svmpredict.cc 733s ***** test 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s model = svmtrain (L, D, '-c 1 -g 0.07'); 733s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 733s assert (size (predict_label), size (dec_values)); 733s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 733s assert (dec_values(1), 1.225836001973273, 1e-14); 733s assert (dec_values(2), -0.3212992933043805, 1e-14); 733s assert (predict_label(1), 1); 733s ***** shared L, D, model 733s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 733s model = svmtrain (L, D, '-c 1 -g 0.07'); 733s ***** error ... 733s [p, a] = svmpredict (L, D, model); 733s ***** error p = svmpredict (L, D); 733s ***** error ... 733s p = svmpredict (single (L), D, model); 733s ***** error p = svmpredict (L, D, 123); 733s 5 tests, 5 passed, 0 known failure, 0 skipped 733s Done running the unit tests. 733s Summary: 11023 tests, 11021 passed, 1 known failures, 1 skipped 734s command1 PASS 734s autopkgtest [09:01:01]: test command1: - - - - - - - - - - results - - - - - - - - - - 735s autopkgtest [09:01:02]: @@@@@@@@@@@@@@@@@@@@ summary 735s command1 PASS