Diff of the two buildlogs: -- --- b1/build.log 2024-10-18 22:22:26.234346373 +0000 +++ b2/build.log 2024-10-18 22:27:06.672394363 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Fri Oct 18 10:14:30 -12 2024 -I: pbuilder-time-stamp: 1729289670 +I: Current time: Sat Oct 19 12:22:37 +14 2024 +I: pbuilder-time-stamp: 1729290157 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -26,52 +26,84 @@ dpkg-source: info: unpacking octave-fuzzy-logic-toolkit_0.6.1-1.debian.tar.xz I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/1979/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/D01_modify_environment starting +debug: Running on virt64a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Oct 18 22:22 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="32" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.32(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='c62b6acfbb374d08b19623ce9f8d33a9' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='1979' - PS1='# ' - PS2='> ' + INVOCATION_ID=cbfee580e0ee46e7aed47e14ef5ffcdb + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=14837 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.RVZbQEHC/pbuilderrc_uR7r --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.RVZbQEHC/b1 --logfile b1/build.log octave-fuzzy-logic-toolkit_0.6.1-1.dsc' - SUDO_GID='110' - SUDO_UID='103' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.RVZbQEHC/pbuilderrc_G1TS --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.RVZbQEHC/b2 --logfile b2/build.log octave-fuzzy-logic-toolkit_0.6.1-1.dsc' + SUDO_GID=114 + SUDO_UID=108 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt32z 6.1.0-26-armmp-lpae #1 SMP Debian 6.1.112-1 (2024-09-30) armv7l GNU/Linux + Linux i-capture-the-hostname 6.1.0-26-arm64 #1 SMP Debian 6.1.112-1 (2024-09-30) aarch64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/1979/tmp/hooks/D02_print_environment finished +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -620,7 +652,7 @@ Get: 509 http://deb.debian.org/debian unstable/main armhf gfortran armhf 4:14.2.0-1 [1428 B] Get: 510 http://deb.debian.org/debian unstable/main armhf octave-dev armhf 9.2.0-3+b1 [995 kB] Get: 511 http://deb.debian.org/debian unstable/main armhf dh-octave all 1.8.0 [22.7 kB] -Fetched 172 MB in 5s (33.3 MB/s) +Fetched 172 MB in 3s (50.2 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package netbase. (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 ... 19665 files and directories currently installed.) @@ -2718,7 +2750,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-fuzzy-logic-toolkit_0.6.1-1_source.changes +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-fuzzy-logic-toolkit_0.6.1-1_source.changes dpkg-buildpackage: info: source package octave-fuzzy-logic-toolkit dpkg-buildpackage: info: source version 0.6.1-1 dpkg-buildpackage: info: source distribution unstable @@ -2730,7 +2766,7 @@ dh_auto_clean -O--buildsystem=octave dh_octave_clean make[1]: Entering directory '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1' -/bin/sh: 1: hg: not found +/bin/sh: line 1: hg: command not found make[1]: hg: No such file or directory grep: src/*.cc: No such file or directory ## Cleaning release tarballs (package + html)... @@ -2801,216 +2837,602 @@ ***** error algebraic_product(0:100, []) 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/sigmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/sigmf.m +[inst/showfis.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/showfis.m +***** error + showfis() +***** error + showfis(1, 2) +***** error + showfis(1) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/defuzz.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/defuzz.m +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'centroid'), 2.8667, 1e-4) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'bisector'), 3) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'mom'), 4) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'som'), 4) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'lom'), 4) +***** assert(defuzz([1 2 3 4], [1 1 1 1], 'wtaver'), 2.5) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'wtaver'), 3) +***** assert(defuzz([1 2 3 4], [0 0 1 1], 'wtaver'), 3.5) +***** assert(defuzz([1 2 3 4], [1 1 1 1], 'wtsum'), 10) +***** assert(defuzz([1 2 3 4], [1 2 3 4], 'wtsum'), 30) +***** assert(defuzz([1 2 3 4], [0 0 1 1], 'wtsum'), 7) +***** error + defuzz() +***** error + defuzz(1) +***** error + defuzz(1, 2) +***** error + defuzz(1, 2, 3, 4) +***** error + defuzz([1 0], 2, 3) +***** error + defuzz([0 1], 2, 3) +***** error + defuzz([0 1], [2 3], 3) +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/zmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/zmf.m ***** demo x = 0:100; - params = [0.3 40]; - y1 = sigmf(x, params); - params = [0.2 40]; - y2 = sigmf(x, params); - params = [0.1 40]; - y3 = sigmf(x, params); - figure('NumberTitle', 'off', 'Name', 'sigmf demo'); - plot(x, y1, 'r;params = [0.3 40];', 'LineWidth', 2) + params = [40 60]; + y1 = zmf(x, params); + params = [25 75]; + y2 = zmf(x, params); + params = [10 90]; + y3 = zmf(x, params); + figure('NumberTitle', 'off', 'Name', 'zmf demo'); + plot(x, y1, 'r;params = [40 60];', 'LineWidth', 2) hold on; - plot(x, y2, 'b;params = [0.2 40];', 'LineWidth', 2) + plot(x, y2, 'b;params = [25 75];', 'LineWidth', 2) hold on; - plot(x, y3, 'g;params = [0.1 40];', 'LineWidth', 2) - ylim([-0.1 1.2]); + plot(x, y3, 'g;params = [10 90];', 'LineWidth', 2) + ylim([-0.1 1.1]); xlabel('Crisp Input Value', 'FontWeight', 'bold'); ylabel('Degree of Membership', 'FontWeight', 'bold'); grid; ***** test - x = 0:10; - params = [5 2]; - y = [4.5398e-05 6.6929e-03 0.5000 0.9933 1 1 1 1 1 1 1]; - z = sigmf(x, params); + x = 0:10:100; + params = [25 75]; + y = [1 1 1 0.9800 0.8200 0.5000 0.1800 0.020000 0 0 0]; + z = zmf(x, params); assert(z, y, 1e-4); -***** error - sigmf() -***** error - sigmf(1) -***** error - sigmf(1, 2, 3) -***** error - sigmf([1 0], 2) -***** error - sigmf(1, 2) -***** error - sigmf(0:100, []) -***** error - sigmf(0:100, [30]) -***** error - sigmf(0:100, [90 80 30]) -***** error - sigmf(0:100, 'abc') -***** error - sigmf(0:100, '') +***** error zmf() +***** error zmf(1) +***** error zmf(1, 2, 3) +***** error zmf([1 0], 2) +***** error zmf(1, 2) +***** error zmf(0:100, []) +***** error zmf(0:100, [30]) +***** error zmf(0:100, [90 80 30]) +***** error zmf(0:100, 'abc') +***** error zmf(0:100, '') 11 tests, 11 passed, 0 known failure, 0 skipped -[inst/mamdani_tip_demo.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/mamdani_tip_demo.m -***** test +[inst/gustafson_kessel.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gustafson_kessel.m +***** demo + ## This demo: + ## - classifies a small set of unlabeled data points using + ## the Gustafson-Kessel algorithm into two fuzzy clusters + ## - plots the input points together with the cluster centers + ## - evaluates the quality of the resulting clusters using + ## three validity measures: the partition coefficient, the + ## partition entropy, and the Xie-Beni validity index + ## + ## Note: The input_data is taken from Chapter 13, Example 17 in + ## Fuzzy Logic: Intelligence, Control and Information, by + ## J. Yen and R. Langari, Prentice Hall, 1999, page 381 + ## (International Edition). + + ## Use gustafson_kessel to classify the input_data. + input_data = [2 12; 4 9; 7 13; 11 5; 12 7; 14 4]; + number_of_clusters = 2; + [cluster_centers, soft_partition, obj_fcn_history] = ... + gustafson_kessel (input_data, number_of_clusters) + + ## Plot the data points as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 1'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 2), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 2'); + grid + hold + + ## Calculate and print the three validity measures. + printf ("Partition Coefficient: %f\n", ... + partition_coeff (soft_partition)); + printf ("Partition Entropy (with a = 2): %f\n", ... + partition_entropy (soft_partition, 2)); + printf ("Xie-Beni Index: %f\n\n", ... + xie_beni_index (input_data, cluster_centers, ... + soft_partition)); +***** demo + ## This demo: + ## - classifies three-dimensional unlabeled data points using + ## the Gustafson-Kessel algorithm into three fuzzy clusters + ## - plots the input points together with the cluster centers + ## - evaluates the quality of the resulting clusters using + ## three validity measures: the partition coefficient, the + ## partition entropy, and the Xie-Beni validity index + ## + ## Note: The input_data was selected to form three areas of + ## different shapes. + + ## Use gustafson_kessel to classify the input_data. + input_data = [1 11 5; 1 12 6; 1 13 5; 2 11 7; 2 12 6; 2 13 7; + 3 11 6; 3 12 5; 3 13 7; 1 1 10; 1 3 9; 2 2 11; + 3 1 9; 3 3 10; 3 5 11; 4 4 9; 4 6 8; 5 5 8; 5 7 9; + 6 6 10; 9 10 12; 9 12 13; 9 13 14; 10 9 13; 10 13 12; + 11 10 14; 11 12 13; 12 6 12; 12 7 15; 12 9 15; + 14 6 14; 14 8 13]; + number_of_clusters = 3; + [cluster_centers, soft_partition, obj_fcn_history] = ... + gustafson_kessel (input_data, number_of_clusters, [1 1 1], ... + [NaN NaN NaN 0]) + + ## Plot the data points in two dimensions (using features 1 & 2) + ## as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 2'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers in two dimensions + ## (using features 1 & 2) as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 2), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 2'); + grid + + ## Plot the data points in two dimensions + ## (using features 1 & 3) as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 2'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 3), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers in two dimensions + ## (using features 1 & 3) as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 3), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 3'); + grid + hold + + ## Calculate and print the three validity measures. + printf ("Partition Coefficient: %f\n", ... + partition_coeff (soft_partition)); + printf ("Partition Entropy (with a = 2): %f\n", ... + partition_entropy (soft_partition, 2)); + printf ("Xie-Beni Index: %f\n\n", ... + xie_beni_index (input_data, cluster_centers, ... + soft_partition)); +***** error + gustafson_kessel() +***** error + gustafson_kessel(1) +***** error + gustafson_kessel(1, 2, 3, 4, 5) +***** error + gustafson_kessel('input', 2) +***** error + gustafson_kessel(1, 0) +***** error + gustafson_kessel(1, 2, 3j) +***** error + gustafson_kessel(1, 2, 3, 4j) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/fcm.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/fcm.m +***** demo + ## This demo: + ## - classifies a small set of unlabeled data points using + ## the Fuzzy C-Means algorithm into two fuzzy clusters + ## - plots the input points together with the cluster centers + ## - evaluates the quality of the resulting clusters using + ## three validity measures: the partition coefficient, the + ## partition entropy, and the Xie-Beni validity index + ## + ## Note: The input_data is taken from Chapter 13, Example 17 in + ## Fuzzy Logic: Intelligence, Control and Information, by + ## J. Yen and R. Langari, Prentice Hall, 1999, page 381 + ## (International Edition). + + ## Use fcm to classify the input_data. + input_data = [2 12; 4 9; 7 13; 11 5; 12 7; 14 4]; + number_of_clusters = 2; + [cluster_centers, soft_partition, obj_fcn_history] = ... + fcm (input_data, number_of_clusters) + + ## Plot the data points as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'FCM Demo 1'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 2), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 2'); + grid + hold + + ## Calculate and print the three validity measures. + printf ("Partition Coefficient: %f\n", ... + partition_coeff (soft_partition)); + printf ("Partition Entropy (with a = 2): %f\n", ... + partition_entropy (soft_partition, 2)); + printf ("Xie-Beni Index: %f\n\n", ... + xie_beni_index (input_data, cluster_centers, ... + soft_partition)); +***** demo + ## This demo: + ## - classifies three-dimensional unlabeled data points using + ## the Fuzzy C-Means algorithm into three fuzzy clusters + ## - plots the input points together with the cluster centers + ## - evaluates the quality of the resulting clusters using + ## three validity measures: the partition coefficient, the + ## partition entropy, and the Xie-Beni validity index + ## + ## Note: The input_data was selected to form three areas of + ## different shapes. + + ## Use fcm to classify the input_data. + input_data = [1 11 5; 1 12 6; 1 13 5; 2 11 7; 2 12 6; 2 13 7; + 3 11 6; 3 12 5; 3 13 7; 1 1 10; 1 3 9; 2 2 11; + 3 1 9; 3 3 10; 3 5 11; 4 4 9; 4 6 8; 5 5 8; 5 7 9; + 6 6 10; 9 10 12; 9 12 13; 9 13 14; 10 9 13; 10 13 12; + 11 10 14; 11 12 13; 12 6 12; 12 7 15; 12 9 15; + 14 6 14; 14 8 13]; + number_of_clusters = 3; + [cluster_centers, soft_partition, obj_fcn_history] = ... + fcm (input_data, number_of_clusters, [NaN NaN NaN 0]) + + ## Plot the data points in two dimensions (using features 1 & 2) + ## as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'FCM Demo 2'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers in two dimensions + ## (using features 1 & 2) as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 2), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 2'); + grid + hold + + ## Plot the data points in two dimensions + ## (using features 1 & 3) as small blue x's. + figure ('NumberTitle', 'off', 'Name', 'FCM Demo 2'); + for i = 1 : rows (input_data) + plot (input_data(i, 1), input_data(i, 3), 'LineWidth', 2, ... + 'marker', 'x', 'color', 'b'); + hold on; + endfor + + ## Plot the cluster centers in two dimensions + ## (using features 1 & 3) as larger red *'s. + for i = 1 : number_of_clusters + plot (cluster_centers(i, 1), cluster_centers(i, 3), ... + 'LineWidth', 4, 'marker', '*', 'color', 'r'); + hold on; + endfor + + ## Make the figure look a little better: + ## - scale and label the axes + ## - show gridlines + xlim ([0 15]); + ylim ([0 15]); + xlabel ('Feature 1'); + ylabel ('Feature 3'); + grid + hold + + ## Calculate and print the three validity measures. + printf ("Partition Coefficient: %f\n", ... + partition_coeff (soft_partition)); + printf ("Partition Entropy (with a = 2): %f\n", ... + partition_entropy (soft_partition, 2)); + printf ("Xie-Beni Index: %f\n\n", ... + xie_beni_index (input_data, cluster_centers, ... + soft_partition)); +***** error + fcm() +***** error + fcm(1) +***** error + fcm(1, 2, 3, 4) +***** error + fcm('input', 2) +***** error + fcm(1, 0) +***** error + fcm(1, 2, 2j) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/addrule.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/addrule.m +***** shared fis fis = readfis ('mamdani_tip_calculator.fis'); - food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; - tip = evalfis (food_service, fis, 1001); - expected_result = ... - [10.0000 1.1000 - 15.0000 1.1500 - 20.0000 1.2000 - 15.0000 1.1500 - 15.0000 1.1500 - 16.4708 1.1647]; - assert(tip, expected_result, 1e-4); warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 30 column 31 + /tmp/tmp.Ps9u36fyql at line 62 column 31 -1 test, 1 passed, 0 known failure, 0 skipped -[inst/trapmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/trapmf.m +***** test + fis = addrule(fis, [1 2 2 1 1 1]); + assert(fis.rule(5).antecedent, [1 2]); +***** error + addrule() +***** error + addrule(1) +***** error + addrule(1, 2, 3) +***** error + addrule(1, 2) +***** error + addrule(fis, 2j) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/gbellmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gbellmf.m ***** demo - x = 0:100; - params = [-1 0 20 40]; - y1 = trapmf(x, params); - params = [20 40 60 80]; - y2 = trapmf(x, params); - params = [60 80 100 101]; - y3 = trapmf(x, params); - figure('NumberTitle', 'off', 'Name', 'trapmf demo'); - plot(x, y1, 'r;params = [-1 0 20 40];', 'LineWidth', 2) + x = 0:255; + params = [20 4 100]; + y1 = gbellmf(x, params); + params = [30 3 100]; + y2 = gbellmf(x, params); + params = [40 2 100]; + y3 = gbellmf(x, params); + figure('NumberTitle', 'off', 'Name', 'gbellmf demo'); + plot(x, y1, 'r;params = [20 4 100];', 'LineWidth', 2) hold on; - plot(x, y2, 'b;params = [20 40 60 80];', 'LineWidth', 2) + plot(x, y2, 'b;params = [30 3 100];', 'LineWidth', 2) hold on; - plot(x, y3, 'g;params = [60 80 100 101];', 'LineWidth', 2) - ylim([-0.1 1.2]); + plot(x, y3, 'g;params = [40 2 100];', 'LineWidth', 2) + ylim([-0.1 1.1]); xlabel('Crisp Input Value', 'FontWeight', 'bold'); ylabel('Degree of Membership', 'FontWeight', 'bold'); grid; ***** test - x = 0:10; - params = [-1 0 2 4]; - y1 = trapmf(x, params); - assert(y1, [1.0 1.0 1.0 0.5 0 0 0 0 0 0 0]); - params = [2 4 6 8]; - y2 = trapmf(x, params); - assert(y2, [0 0 0 0.5 1.0 1.0 1.0 0.5 0 0 0]); - params = [6 8 10 11]; - y3 = trapmf(x, params); - assert(y3, [0 0 0 0 0 0 0 0.5 1.0 1.0 1.0]); -***** error - trapmf() -***** error - trapmf(1) -***** error - trapmf(1, 2, 3) -***** error - trapmf([1 0], 2) -***** error - trapmf(1, 2) -***** error - trapmf(0:100, []) -***** error - trapmf(0:100, [2]) -***** error - trapmf(0:100, [2 3]) -***** error - trapmf(0:100, [90 80 30 20]) -***** error - trapmf(0:100, [30 80 20 20]) -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/xie_beni_index.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/xie_beni_index.m -***** error - xie_beni_index() -***** error - xie_beni_index(1) -***** error - xie_beni_index(1, 2) -***** error - xie_beni_index(1, 2, 3, 4) -***** error - xie_beni_index(1j, 2, 3) -***** error - xie_beni_index(1, [2 2], 3) -***** error - xie_beni_index([1 1], [2 2], 3j) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/gaussmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gaussmf.m -***** demo - x = -5:0.1:5; - params = [0.5 0]; - y1 = gaussmf(x, params); - params = [1 0]; - y2 = gaussmf(x, params); - params = [2 0]; - y3 = gaussmf(x, params); - figure('NumberTitle', 'off', 'Name', 'gaussmf demo'); - plot(x, y1, 'r;params = [0.5 0];', 'LineWidth', 2); - hold on ; - plot(x, y2, 'b;params = [1 0];', 'LineWidth', 2); - hold on ; - plot(x, y3, 'g;params = [2 0];', 'LineWidth', 2); - ylim([-0.1 1.1]); - xlabel('Crisp Input Value'); - ylabel('Degree of Membership'); - grid; - hold; -***** test - x = -5:5; - params = [2 0]; - y = [0.043937 0.1353 0.3247 0.6065 0.8825 1 ... - 0.8825 0.6065 0.3247 0.1353 0.043937]; - z = gaussmf(x, params); + x = 0:25:250; + params = [40 2 100]; + y = [0.024961 0.074852 0.2906 0.8676 1 0.8676 ... + 0.2906 0.074852 0.024961 0.010377 5.0313e-03]; + z = gbellmf(x, params); assert(z, y, 1e-4); -***** error - gaussmf() -***** error - gaussmf(1) -***** error - gaussmf(1, 2, 3) -***** error - gaussmf([1 0], 2) -***** error - gaussmf(1, 2) -***** error - gaussmf(0:100, []) -***** error - gaussmf(0:100, [30]) -***** error - gaussmf(0:100, [2 3 4 5]) -***** error - gaussmf(0:100, [90 80 30]) -***** error - gaussmf(0:100, 'abc') +***** error + gbellmf() +***** error + gbellmf(1) +***** error + gbellmf(1, 2, 3) +***** error + gbellmf([1 0], 2) +***** error + gbellmf(1, 2) +***** error + gbellmf(0:100, []) +***** error + gbellmf(0:100, [30]) +***** error + gbellmf(0:100, [2 3]) +***** error + gbellmf(0:100, [90 80 30 50]) +***** error + gbellmf(0:100, 'abcd') 11 tests, 11 passed, 0 known failure, 0 skipped -[inst/readfis.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/readfis.m -***** shared fis +[inst/algebraic_sum.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/algebraic_sum.m +***** test + x = [5 2]; + z = algebraic_sum(x); + assert(z, -3); +***** test + x = [5 2 3 6]; + y = [-1 0 2 3]; + z = algebraic_sum(x, y); + assert(z, [9 2 -1 -9]); +***** error + algebraic_sum() +***** error + algebraic_sum(1, 2, 3) +***** error + algebraic_sum(2j) +***** error + algebraic_sum(1, 2j) +***** error + algebraic_sum([1 2j]) +***** error + algebraic_sum([1 2], [1 2 3]) +***** error + algebraic_sum([1 2], [1 2; 3 4]) +***** error + algebraic_sum(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/sugeno_tip_demo.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/sugeno_tip_demo.m +***** test fis = readfis ('sugeno_tip_calculator.fis'); + food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; + tip = evalfis (food_service, fis, 1001); + expected_result = ... + [10.000 10.000 12.500 + 10.868 13.681 19.138 + 17.500 17.500 20.000 + 10.604 14.208 19.452 + 10.427 13.687 19.033 + 10.471 14.358 19.353]; + assert(tip, expected_result, 1e-3); warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 62 column 31 + /tmp/tmp.Ps9u36fyql at line 86 column 31 -***** assert(fis.andMethod == 'einstein_product'); -***** assert(fis.orMethod == 'einstein_sum'); -***** assert(fis.impMethod == 'prod'); -***** assert(fis.aggMethod == 'sum'); -***** assert(fis.defuzzMethod == 'wtaver'); -***** error - readfis(1, 2) -***** error - readfis(1) -7 tests, 7 passed, 0 known failure, 0 skipped +1 test, 1 passed, 0 known failure, 0 skipped +[inst/addmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/addmf.m +***** demo + ## Create new FIS. + a = newfis ('Heart-Disease-Risk', 'sugeno', ... + 'min', 'max', 'min', 'max', 'wtaver'); + + ## Add two inputs and their membership functions. + a = addvar (a, 'input', 'LDL-Level', [0 300]); + a = addmf (a, 'input', 1, 'Low', 'trapmf', [-1 0 90 110]); + a = addmf (a, 'input', 1, 'Low-Borderline', 'trapmf', ... + [90 110 120 140]); + a = addmf (a, 'input', 1, 'Borderline', 'trapmf', ... + [120 140 150 170]); + a = addmf (a, 'input', 1, 'High-Borderline', 'trapmf', ... + [150 170 180 200]); + a = addmf (a, 'input', 1, 'High', 'trapmf', [180 200 300 301]); + + a = addvar (a, 'input', 'HDL-Level', [0 100]); + a = addmf (a, 'input', 2, 'Low-HDL', 'trapmf', [-1 0 35 45]); + a = addmf (a, 'input', 2, 'Moderate-HDL', 'trapmf', [35 45 55 65]); + a = addmf (a, 'input', 2, 'High-HDL', 'trapmf', [55 65 100 101]); + + ## Plot the input membership functions. + plotmf (a, 'input', 1); + plotmf (a, 'input', 2); +***** shared fis + fis = readfis ('mamdani_tip_calculator.fis'); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path +warning: called from + readfis>open_input_file at line 128 column 14 + readfis at line 69 column 7 + __test__ at line 3 column 6 + test at line 682 column 11 + /tmp/tmp.Ps9u36fyql at line 94 column 31 + +***** test + fis = addmf(fis, 'input', 1, 'Excellent', 'trapmf', [5 8 10 11]); + assert(fis.input(1).mf(3).name, 'Excellent'); +***** error + addmf() +***** error + addmf(1) +***** error + addmf(1, 2) +***** error + addmf(1, 2, 3) +***** error + addmf(1, 2, 3, 4) +***** error + addmf(1, 2, 3, 4, 5) +***** error + addmf(1, 2, 3, 4, 5, 6, 7) +***** error + addmf(1, 2, 3, 4, 5, 6) +***** error + addmf(fis, 'file', 3, 4, 5, 6) +***** error + addmf(fis, 'input', 3, 4, 5, 6) +***** error + addmf(fis, 'input', 1, 4, 'string', 6) +***** error + addmf(fis, 'input', 1, 'string', 5, 6) +***** error + addmf(fis, 'input', 1, 'string', 'trapmf', []) +14 tests, 14 passed, 0 known failure, 0 skipped +[inst/linear_tip_demo.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/linear_tip_demo.m +***** test + fis = readfis ('linear_tip_calculator.fis'); + food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; + tip = evalfis (food_service, fis, 1001); + expected_result = ... + [10.000 + 15.000 + 20.000 + 15.000 + 15.000 + 16.250]; + assert(tip, expected_result, 1e-3); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/linear_tip_calculator.fis' found by searching load path +warning: called from + readfis>open_input_file at line 128 column 14 + readfis at line 69 column 7 + __test__ at line 3 column 6 + test at line 682 column 11 + /tmp/tmp.Ps9u36fyql at line 102 column 31 + +1 test, 1 passed, 0 known failure, 0 skipped [inst/investment_portfolio_demo.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/investment_portfolio_demo.m ***** test @@ -3023,121 +3445,181 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 70 column 31 + /tmp/tmp.Ps9u36fyql at line 110 column 31 1 test, 1 passed, 0 known failure, 0 skipped -[inst/einstein_product.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/einstein_product.m -***** test - x = [5 3]; - z = einstein_product(x); - assert(z, 1.6667, 1e-3); -***** test - x = [5 2 3 6]; - y = [-1 1 2 3]; - z = einstein_product(x, y); - assert(z, [0.7134 2.0000 2.0000 1.6364], 1e-3); -***** error - einstein_product() -***** error - einstein_product(2j) -***** error - einstein_product(1, 2j) -***** error - einstein_product([1 2j]) -***** error - einstein_product(1, 2, 3) -***** error - einstein_product([1 2], [1 2 3]) -***** error - einstein_product([1 2], [1 2; 3 4]) -***** error - einstein_product(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/zmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/zmf.m +[inst/partition_coeff.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/partition_coeff.m +***** error + partition_coeff() +***** error + partition_coeff(1, 2) +***** error + partition_coeff([-1 2]) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/gauss2mf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gauss2mf.m ***** demo - x = 0:100; - params = [40 60]; - y1 = zmf(x, params); - params = [25 75]; - y2 = zmf(x, params); - params = [10 90]; - y3 = zmf(x, params); - figure('NumberTitle', 'off', 'Name', 'zmf demo'); - plot(x, y1, 'r;params = [40 60];', 'LineWidth', 2) - hold on; - plot(x, y2, 'b;params = [25 75];', 'LineWidth', 2) - hold on; - plot(x, y3, 'g;params = [10 90];', 'LineWidth', 2) + x = -10:0.2:10; + params = [3 0 1.5 2]; + y1 = gauss2mf(x, params); + params = [1.5 0 3 2]; + y2 = gauss2mf(x, params); + params = [1.5 2 3 0]; + y3 = gauss2mf(x, params); + figure('NumberTitle', 'off', 'Name', 'gauss2mf demo'); + plot(x, y1, 'r;params = [3 0 1.5 2];', 'LineWidth', 2); + hold on ; + plot(x, y2, 'b;params = [1.5 0 3 2];', 'LineWidth', 2); + hold on ; + plot(x, y3, 'g;params = [1.5 2 3 0];', 'LineWidth', 2); ylim([-0.1 1.1]); xlabel('Crisp Input Value', 'FontWeight', 'bold'); ylabel('Degree of Membership', 'FontWeight', 'bold'); grid; + hold; ***** test - x = 0:10:100; - params = [25 75]; - y = [1 1 1 0.9800 0.8200 0.5000 0.1800 0.020000 0 0 0]; - z = zmf(x, params); + x = -10:2:10; + params = [3 0 1.5 2]; + y = [3.8659e-03 0.028566 0.1353 0.4111 0.8007 1 ... + 1 0.4111 0.028566 3.3546e-04 6.6584e-07]; + z = gauss2mf(x, params); assert(z, y, 1e-4); -***** error zmf() -***** error zmf(1) -***** error zmf(1, 2, 3) -***** error zmf([1 0], 2) -***** error zmf(1, 2) -***** error zmf(0:100, []) -***** error zmf(0:100, [30]) -***** error zmf(0:100, [90 80 30]) -***** error zmf(0:100, 'abc') -***** error zmf(0:100, '') +***** error + gauss2mf() +***** error + gauss2mf(1) +***** error + gauss2mf(1, 2, 3) +***** error + gauss2mf([1 0], 2) +***** error + gauss2mf(1, 2) +***** error + gauss2mf(0:100, []) +***** error + gauss2mf(0:100, [30]) +***** error + gauss2mf(0:100, [2 3]) +***** error + gauss2mf(0:100, [90 80 30]) +***** error + gauss2mf(0:100, 'abc') 11 tests, 11 passed, 0 known failure, 0 skipped -[inst/pimf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/pimf.m +[inst/dsigmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/dsigmf.m ***** demo - x = 0:255; - params = [70 80 100 140]; - y1 = pimf(x, params); - params = [50 75 105 175]; - y2 = pimf(x, params); - params = [30 70 110 200]; - y3 = pimf(x, params); - figure('NumberTitle', 'off', 'Name', 'pimf demo'); - plot(x, y1, 'r;params = [70 80 100 140];', 'LineWidth', 2) + x = 0:100; + params = [0.5 20 0.3 60]; + y1 = dsigmf(x, params); + params = [0.3 20 0.2 60]; + y2 = dsigmf(x, params); + params = [0.2 20 0.1 60]; + y3 = dsigmf(x, params); + figure('NumberTitle', 'off', 'Name', 'dsigmf demo'); + plot(x, y1, 'r;params = [0.5 20 0.3 60];', 'LineWidth', 2) hold on; - plot(x, y2, 'b;params = [50 75 105 175];', 'LineWidth', 2) + plot(x, y2, 'b;params = [0.3 20 0.2 60];', 'LineWidth', 2) hold on; - plot(x, y3, 'g;params = [30 70 110 200];', 'LineWidth', 2) + plot(x, y3, 'g;params = [0.2 20 0.1 60];', 'LineWidth', 2) ylim([-0.1 1.1]); xlabel('Crisp Input Value', 'FontWeight', 'bold'); ylabel('Degree of Membership', 'FontWeight', 'bold'); grid; ***** test - x = 0:25:250; - params = [50 75 105 175]; - y = [0 0 0 1 1 0.8367 0.2551 0 0 0 0]; - z = pimf(x, params); + x = 0:10; + params = [5 2 3 6]; + y = [4.5383e-05 6.6925e-03 0.5000 0.9932 0.9975 0.9526 ... + 0.5000 0.047426 2.4726e-03 1.2339e-04 6.1442e-06]; + z = dsigmf(x, params); assert(z, y, 1e-4); -***** error - pimf() -***** error - pimf(1) -***** error - pimf(1, 2, 3) -***** error - pimf([1 0], 2) -***** error - pimf(1, 2) -***** error - pimf(0:100, []) -***** error - pimf(0:100, [30]) -***** error - pimf(0:100, [2 3]) -***** error - pimf(0:100, [90 80 30]) -***** error - pimf(0:100, 'abc') +***** error + dsigmf() +***** error + dsigmf(1) +***** error + dsigmf([1 0], 2) +***** error + dsigmf(1, 2) +***** error + dsigmf(1, 2, 3) +***** error + dsigmf(0:100, []) +***** error + dsigmf(0:100, [30]) +***** error + dsigmf(0:100, [2 3]) +***** error + dsigmf(0:100, [90 80 30]) +***** error + dsigmf(0:100, 'abc') 11 tests, 11 passed, 0 known failure, 0 skipped +[inst/evalmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/evalmf.m +***** demo + x = 0:100; + params = [25 50 75]; + mf_type = 'trimf'; + y = evalmf(x, params, mf_type); + figure('NumberTitle', 'off', 'Name', "evalmf(0:100, [25 50 75], 'trimf')"); + plot(x, y, 'LineWidth', 2) + ylim([-0.1 1.1]); + xlabel('Crisp Input Value', 'FontWeight', 'bold'); + ylabel('Degree of Membership', 'FontWeight', 'bold'); + grid; +***** test + x = 0:10:100; + params = [25 50 75]; + mf_type = 'trimf'; + y = evalmf(x, params, mf_type); + assert(y, [0 0 0 0.2 0.6 1 0.6 0.2 0 0 0]); +***** error + evalmf() +***** error + evalmf(1) +***** error + evalmf(1, 2) +***** error + evalmf(1, 2, 3, 4, 5, 6) +***** error + evalmf([1 0], 2, 3) +***** error + evalmf([0 1], 2, 3) +***** error + evalmf([0 1], 2, 'trimf', 2j) +***** error + evalmf([0 1], 2, 'trimf', 2, 2) +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/rmvar.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/rmvar.m +***** shared fis + fis = readfis ('mamdani_tip_calculator.fis'); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path +warning: called from + readfis>open_input_file at line 128 column 14 + readfis at line 69 column 7 + __test__ at line 3 column 6 + test at line 682 column 11 + /tmp/tmp.Ps9u36fyql at line 150 column 31 + +***** test + fis = rmvar(fis, 'input', 1); + assert(fis.input.name, 'Service'); +***** error + rmvar() +***** error + rmvar(1) +***** error + rmvar(1, 2) +***** error + rmvar(1, 2, 3, 4) +***** error + rmvar(1, 2, 3) +***** error + rmvar(fis, 2, 3) +***** error + rmvar(fis, 'input', 3) +8 tests, 8 passed, 0 known failure, 0 skipped [inst/hamacher_sum.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/hamacher_sum.m ***** test @@ -3166,57 +3648,129 @@ ***** error hamacher_sum(0:100, []) 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/drastic_product.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/drastic_product.m +[inst/xie_beni_index.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/xie_beni_index.m +***** error + xie_beni_index() +***** error + xie_beni_index(1) +***** error + xie_beni_index(1, 2) +***** error + xie_beni_index(1, 2, 3, 4) +***** error + xie_beni_index(1j, 2, 3) +***** error + xie_beni_index(1, [2 2], 3) +***** error + xie_beni_index([1 1], [2 2], 3j) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/bounded_sum.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/bounded_sum.m ***** test x = [0.5 0.2]; - z = drastic_product(x); - assert(z, 0); + z = bounded_sum(x); + assert(z, 0.7, 1e-5); ***** test - x = [0.5 0.2 0.3 1]; + x = [0.5 0.2 0.3 0.6]; y = [1 0 0.2 0.3]; - z = drastic_product(x, y); - assert(z, [0.5 0 0 0.3]); -***** error - drastic_product() -***** error - drastic_product(1, 2, 3) -***** error - drastic_product(2j) -***** error - drastic_product(1, 2j) -***** error - drastic_product([1 2j]) -***** error - drastic_product([1 2], [1 2 3]) -***** error - drastic_product([1 2], [1 2; 3 4]) -***** error - drastic_product(0:100, []) + z = bounded_sum(x, y); + assert(z, [1 0.2 0.5 0.9], 1e-5); +***** error + bounded_sum() +***** error + bounded_sum(1, 2, 3) +***** error + bounded_sum(2j) +***** error + bounded_sum(1, 2j) +***** error + bounded_sum([1 2j]) +***** error + bounded_sum([1 2], [1 2 3]) +***** error + bounded_sum([1 2], [1 2; 3 4]) +***** error + bounded_sum(0:100, []) 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/linear_tip_demo.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/linear_tip_demo.m +[inst/bounded_difference.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/bounded_difference.m ***** test - fis = readfis ('linear_tip_calculator.fis'); - food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; - tip = evalfis (food_service, fis, 1001); - expected_result = ... - [10.000 - 15.000 - 20.000 - 15.000 - 15.000 - 16.250]; - assert(tip, expected_result, 1e-3); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/linear_tip_calculator.fis' found by searching load path + x = [5 2]; + z = bounded_difference(x); + assert(z, 6); +***** test + x = [5 2 3 -6]; + y = [-1 0 2 3]; + z = bounded_difference(x, y); + assert(z, [3 1 4 0]); +***** error + bounded_difference() +***** error + bounded_difference(1, 2, 3) +***** error + bounded_difference(2j) +***** error + bounded_difference(1, 2j) +***** error + bounded_difference([1 2j]) +***** error + bounded_difference([1 2], [1 2 3]) +***** error + bounded_difference([1 2], [1 2; 3 4]) +***** error + bounded_difference(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/readfis.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/readfis.m +***** shared fis + fis = readfis ('sugeno_tip_calculator.fis'); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 118 column 31 + /tmp/tmp.Ps9u36fyql at line 190 column 31 -1 test, 1 passed, 0 known failure, 0 skipped +***** assert(fis.andMethod == 'einstein_product'); +***** assert(fis.orMethod == 'einstein_sum'); +***** assert(fis.impMethod == 'prod'); +***** assert(fis.aggMethod == 'sum'); +***** assert(fis.defuzzMethod == 'wtaver'); +***** error + readfis(1, 2) +***** error + readfis(1) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/einstein_product.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/einstein_product.m +***** test + x = [5 3]; + z = einstein_product(x); + assert(z, 1.6667, 1e-3); +***** test + x = [5 2 3 6]; + y = [-1 1 2 3]; + z = einstein_product(x, y); + assert(z, [0.7134 2.0000 2.0000 1.6364], 1e-3); +***** error + einstein_product() +***** error + einstein_product(2j) +***** error + einstein_product(1, 2j) +***** error + einstein_product([1 2j]) +***** error + einstein_product(1, 2, 3) +***** error + einstein_product([1 2], [1 2 3]) +***** error + einstein_product([1 2], [1 2; 3 4]) +***** error + einstein_product(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped [inst/addvar.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/addvar.m ***** demo @@ -3232,7 +3786,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 126 column 31 + /tmp/tmp.Ps9u36fyql at line 206 column 31 ***** test fis = addvar(fis, 'input', 'Dining-Room', [1 10]); @@ -3256,196 +3810,6 @@ ***** error addvar(fis, 'input', 'string', 4) 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/evalfis.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/evalfis.m -***** shared fis, food_service - fis = readfis ('sugeno_tip_calculator.fis'); - food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path -warning: called from - readfis>open_input_file at line 128 column 14 - readfis at line 69 column 7 - __test__ at line 3 column 6 - test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 134 column 31 - -***** test - tip = evalfis (food_service, fis, 1001); - expected_result = ... - [10.000 10.000 12.500 - 10.868 13.681 19.138 - 17.500 17.500 20.000 - 10.604 14.208 19.452 - 10.427 13.687 19.033 - 10.471 14.358 19.353]; - assert(tip, expected_result, 1e-3); -***** error - evalfis() -***** error - evalfis(1) -***** error - evalfis(1, 2, 3, 4) -***** error - evalfis(food_service, 2, 3) -***** error - evalfis(0, fis, 3) -***** error - evalfis(food_service, fis, -3) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/partition_entropy.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/partition_entropy.m -***** error - partition_entropy() -***** error - partition_entropy(1) -***** error - partition_entropy(1, 2, 3) -***** error - partition_entropy([1 2], 2) -***** error - partition_entropy([1 1], -2) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/bounded_difference.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/bounded_difference.m -***** test - x = [5 2]; - z = bounded_difference(x); - assert(z, 6); -***** test - x = [5 2 3 -6]; - y = [-1 0 2 3]; - z = bounded_difference(x, y); - assert(z, [3 1 4 0]); -***** error - bounded_difference() -***** error - bounded_difference(1, 2, 3) -***** error - bounded_difference(2j) -***** error - bounded_difference(1, 2j) -***** error - bounded_difference([1 2j]) -***** error - bounded_difference([1 2], [1 2 3]) -***** error - bounded_difference([1 2], [1 2; 3 4]) -***** error - bounded_difference(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/algebraic_sum.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/algebraic_sum.m -***** test - x = [5 2]; - z = algebraic_sum(x); - assert(z, -3); -***** test - x = [5 2 3 6]; - y = [-1 0 2 3]; - z = algebraic_sum(x, y); - assert(z, [9 2 -1 -9]); -***** error - algebraic_sum() -***** error - algebraic_sum(1, 2, 3) -***** error - algebraic_sum(2j) -***** error - algebraic_sum(1, 2j) -***** error - algebraic_sum([1 2j]) -***** error - algebraic_sum([1 2], [1 2 3]) -***** error - algebraic_sum([1 2], [1 2; 3 4]) -***** error - algebraic_sum(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/defuzz.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/defuzz.m -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'centroid'), 2.8667, 1e-4) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'bisector'), 3) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'mom'), 4) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'som'), 4) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'lom'), 4) -***** assert(defuzz([1 2 3 4], [1 1 1 1], 'wtaver'), 2.5) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'wtaver'), 3) -***** assert(defuzz([1 2 3 4], [0 0 1 1], 'wtaver'), 3.5) -***** assert(defuzz([1 2 3 4], [1 1 1 1], 'wtsum'), 10) -***** assert(defuzz([1 2 3 4], [1 2 3 4], 'wtsum'), 30) -***** assert(defuzz([1 2 3 4], [0 0 1 1], 'wtsum'), 7) -***** error - defuzz() -***** error - defuzz(1) -***** error - defuzz(1, 2) -***** error - defuzz(1, 2, 3, 4) -***** error - defuzz([1 0], 2, 3) -***** error - defuzz([0 1], 2, 3) -***** error - defuzz([0 1], [2 3], 3) -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/partition_coeff.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/partition_coeff.m -***** error - partition_coeff() -***** error - partition_coeff(1, 2) -***** error - partition_coeff([-1 2]) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/gbellmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gbellmf.m -***** demo - x = 0:255; - params = [20 4 100]; - y1 = gbellmf(x, params); - params = [30 3 100]; - y2 = gbellmf(x, params); - params = [40 2 100]; - y3 = gbellmf(x, params); - figure('NumberTitle', 'off', 'Name', 'gbellmf demo'); - plot(x, y1, 'r;params = [20 4 100];', 'LineWidth', 2) - hold on; - plot(x, y2, 'b;params = [30 3 100];', 'LineWidth', 2) - hold on; - plot(x, y3, 'g;params = [40 2 100];', 'LineWidth', 2) - ylim([-0.1 1.1]); - xlabel('Crisp Input Value', 'FontWeight', 'bold'); - ylabel('Degree of Membership', 'FontWeight', 'bold'); - grid; -***** test - x = 0:25:250; - params = [40 2 100]; - y = [0.024961 0.074852 0.2906 0.8676 1 0.8676 ... - 0.2906 0.074852 0.024961 0.010377 5.0313e-03]; - z = gbellmf(x, params); - assert(z, y, 1e-4); -***** error - gbellmf() -***** error - gbellmf(1) -***** error - gbellmf(1, 2, 3) -***** error - gbellmf([1 0], 2) -***** error - gbellmf(1, 2) -***** error - gbellmf(0:100, []) -***** error - gbellmf(0:100, [30]) -***** error - gbellmf(0:100, [2 3]) -***** error - gbellmf(0:100, [90 80 30 50]) -***** error - gbellmf(0:100, 'abcd') -11 tests, 11 passed, 0 known failure, 0 skipped [inst/showrule.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/showrule.m ***** demo @@ -3476,7 +3840,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 190 column 31 + /tmp/tmp.Ps9u36fyql at line 214 column 31 ***** error showrule() @@ -3495,249 +3859,72 @@ ***** error showrule(fis, [2 4], 'verbose', 'english', 5) 8 tests, 8 passed, 0 known failure, 0 skipped -[inst/trimf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/trimf.m -***** demo - x = 0:100; - params = [-1 0 50]; - y1 = trimf(x, params); - params = [0 50 100]; - y2 = trimf(x, params); - params = [50 100 101]; - y3 = trimf(x, params); - figure('NumberTitle', 'off', 'Name', 'trimf demo'); - plot(x, y1, 'r;params = [-1 0 50];', 'LineWidth', 2) - hold on; - plot(x, y2, 'b;params = [0 50 100];', 'LineWidth', 2) - hold on; - plot(x, y3, 'g;params = [50 100 101];', 'LineWidth', 2) - ylim([-0.1 1.2]); - xlabel('Crisp Input Value', 'FontWeight', 'bold'); - ylabel('Degree of Membership', 'FontWeight', 'bold'); - grid; -***** test - x = 0:10; - params = [0 2 4]; - y1 = trimf(x, params); - assert(y1, [0 0.5 1.0 0.5 0 0 0 0 0 0 0]); - params = [2 4 6]; - y2 = trimf(x, params); - assert(y2, [0 0 0 0.5 1.0 0.5 0 0 0 0 0]); - params = [6 8 10]; - y3 = trimf(x, params); - assert(y3, [0 0 0 0 0 0 0 0.5 1.0 0.5 0]); -***** error - trimf() -***** error - trimf(1) -***** error - trimf(1, 2, 3) -***** error - trimf([1 0], 2) -***** error - trimf(1, 2) -***** error - trimf(0:100, []) -***** error - trimf(0:100, [2]) -***** error - trimf(0:100, [2 3]) -***** error - trimf(0:100, [90 80 30]) -***** error - trimf(0:100, [30 80 20]) -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/dsigmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/dsigmf.m -***** demo - x = 0:100; - params = [0.5 20 0.3 60]; - y1 = dsigmf(x, params); - params = [0.3 20 0.2 60]; - y2 = dsigmf(x, params); - params = [0.2 20 0.1 60]; - y3 = dsigmf(x, params); - figure('NumberTitle', 'off', 'Name', 'dsigmf demo'); - plot(x, y1, 'r;params = [0.5 20 0.3 60];', 'LineWidth', 2) - hold on; - plot(x, y2, 'b;params = [0.3 20 0.2 60];', 'LineWidth', 2) - hold on; - plot(x, y3, 'g;params = [0.2 20 0.1 60];', 'LineWidth', 2) - ylim([-0.1 1.1]); - xlabel('Crisp Input Value', 'FontWeight', 'bold'); - ylabel('Degree of Membership', 'FontWeight', 'bold'); - grid; -***** test - x = 0:10; - params = [5 2 3 6]; - y = [4.5383e-05 6.6925e-03 0.5000 0.9932 0.9975 0.9526 ... - 0.5000 0.047426 2.4726e-03 1.2339e-04 6.1442e-06]; - z = dsigmf(x, params); - assert(z, y, 1e-4); -***** error - dsigmf() -***** error - dsigmf(1) -***** error - dsigmf([1 0], 2) -***** error - dsigmf(1, 2) -***** error - dsigmf(1, 2, 3) -***** error - dsigmf(0:100, []) -***** error - dsigmf(0:100, [30]) -***** error - dsigmf(0:100, [2 3]) -***** error - dsigmf(0:100, [90 80 30]) -***** error - dsigmf(0:100, 'abc') -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/heart_disease_demo_2.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/heart_disease_demo_2.m +[inst/heart_disease_demo_1.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/heart_disease_demo_1.m ***** test - fis = readfis ('heart_disease_risk.fis'); - ldl_hdl = [129 59; 130 60; 90 65; 205 40]; - heart_disease_risk = evalfis (ldl_hdl, fis, 1001); - assert(heart_disease_risk, [3.6250; 3.7500; 0; 8.7500], 1e-4); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/heart_disease_risk.fis' found by searching load path -warning: called from - readfis>open_input_file at line 128 column 14 - readfis at line 69 column 7 - __test__ at line 3 column 6 - test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 214 column 31 + a = newfis ('Heart-Disease-Risk', 'sugeno', ... + 'algebraic_product', 'algebraic_sum', ... + 'min', 'max', 'wtaver'); + + ## Add two inputs and their membership functions. + a = addvar (a, 'input', 'LDL-Level', [0 300]); + a = addmf (a, 'input', 1, 'Low', 'trapmf', [-1 0 90 130]); + a = addmf (a, 'input', 1, 'Moderate', 'trapmf', [90 130 160 200]); + a = addmf (a, 'input', 1, 'High', 'trapmf', [160 200 300 301]); + + a = addvar (a, 'input', 'HDL-Level', [0 100]); + a = addmf (a, 'input', 2, 'Low', 'trapmf', [-1 0 35 45]); + a = addmf (a, 'input', 2, 'Moderate', 'trapmf', [35 45 55 65]); + a = addmf (a, 'input', 2, 'High', 'trapmf', [55 65 100 101]); + + ## Add one output and its membership functions. + a = addvar (a, 'output', 'Heart-Disease-Risk', [-2 12]); + a = addmf (a, 'output', 1, 'Negligible', 'constant', 0); + a = addmf (a, 'output', 1, 'Low', 'constant', 2.5); + a = addmf (a, 'output', 1, 'Medium', 'constant', 5); + a = addmf (a, 'output', 1, 'High', 'constant', 7.5); + a = addmf (a, 'output', 1, 'Extreme', 'constant', 10); + + ## Add 15 rules and display them in verbose format. + a = addrule (a, [1 1 3 1 1; 1 2 2 1 1; 1 3 1 1 1; ... + 2 1 4 1 1; 2 2 3 1 1; 2 3 2 1 1; ... + 3 1 5 1 1; 3 2 4 1 1; 3 3 3 1 1; ... + 1.3 3.3 2 1 2; ... + 3.05 1.05 4 1 2; ... + -3.2 -1.2 3 1 1]); + ldl_hdl = [129 59; 130 60; 90 65; 205 40]; + heart_disease_risk = evalfis (ldl_hdl, a, 1001); + assert(heart_disease_risk, [4.2679; 4.1667; 2.5000; 8.3333], 1e-4); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/rmvar.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/rmvar.m -***** shared fis - fis = readfis ('mamdani_tip_calculator.fis'); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path -warning: called from - readfis>open_input_file at line 128 column 14 - readfis at line 69 column 7 - __test__ at line 3 column 6 - test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 222 column 31 - -***** test - fis = rmvar(fis, 'input', 1); - assert(fis.input.name, 'Service'); -***** error - rmvar() -***** error - rmvar(1) -***** error - rmvar(1, 2) -***** error - rmvar(1, 2, 3, 4) -***** error - rmvar(1, 2, 3) -***** error - rmvar(fis, 2, 3) -***** error - rmvar(fis, 'input', 3) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/gauss2mf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gauss2mf.m -***** demo - x = -10:0.2:10; - params = [3 0 1.5 2]; - y1 = gauss2mf(x, params); - params = [1.5 0 3 2]; - y2 = gauss2mf(x, params); - params = [1.5 2 3 0]; - y3 = gauss2mf(x, params); - figure('NumberTitle', 'off', 'Name', 'gauss2mf demo'); - plot(x, y1, 'r;params = [3 0 1.5 2];', 'LineWidth', 2); - hold on ; - plot(x, y2, 'b;params = [1.5 0 3 2];', 'LineWidth', 2); - hold on ; - plot(x, y3, 'g;params = [1.5 2 3 0];', 'LineWidth', 2); - ylim([-0.1 1.1]); - xlabel('Crisp Input Value', 'FontWeight', 'bold'); - ylabel('Degree of Membership', 'FontWeight', 'bold'); - grid; - hold; +[inst/einstein_sum.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/einstein_sum.m ***** test - x = -10:2:10; - params = [3 0 1.5 2]; - y = [3.8659e-03 0.028566 0.1353 0.4111 0.8007 1 ... - 1 0.4111 0.028566 3.3546e-04 6.6584e-07]; - z = gauss2mf(x, params); - assert(z, y, 1e-4); -***** error - gauss2mf() -***** error - gauss2mf(1) -***** error - gauss2mf(1, 2, 3) -***** error - gauss2mf([1 0], 2) -***** error - gauss2mf(1, 2) -***** error - gauss2mf(0:100, []) -***** error - gauss2mf(0:100, [30]) -***** error - gauss2mf(0:100, [2 3]) -***** error - gauss2mf(0:100, [90 80 30]) -***** error - gauss2mf(0:100, 'abc') -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/psigmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/psigmf.m -***** demo - x = 0:100; - params = [0.5 20 -0.3 60]; - y1 = psigmf(x, params); - params = [0.3 20 -0.2 60]; - y2 = psigmf(x, params); - params = [0.2 20 -0.1 60]; - y3 = psigmf(x, params); - figure('NumberTitle', 'off', 'Name', 'psigmf demo'); - plot(x, y1, 'r;params = [0.5 20 -0.3 60];', 'LineWidth', 2) - hold on; - plot(x, y2, 'b;params = [0.3 20 -0.2 60];', 'LineWidth', 2) - hold on; - plot(x, y3, 'g;params = [0.2 20 -0.1 60];', 'LineWidth', 2) - ylim([-0.1 1.1]); - xlabel('Crisp Input Value', 'FontWeight', 'bold'); - ylabel('Degree of Membership', 'FontWeight', 'bold'); - grid; + x = [5 3]; + z = einstein_sum(x); + assert(z, 0.5000); ***** test - x = 0:10:100; - params = [0.3 20 -0.2 60]; - y = [2.4726e-03 0.047424 0.4998 0.9502 0.9796 0.8807 ... - 0.5000 0.1192 0.017986 2.4726e-03 3.3535e-04]; - z = psigmf(x, params); - assert(z, y, 1e-4); -***** error - psigmf() -***** error - psigmf(1) -***** error - psigmf(1, 2, 3) -***** error - psigmf([1 0], 2) -***** error - psigmf(1, 2) -***** error - psigmf(0:100, []) -***** error - psigmf(0:100, [30]) -***** error - psigmf(0:100, [2 3]) -***** error - psigmf(0:100, [90 80 30]) -***** error - psigmf(0:100, 'abc') -11 tests, 11 passed, 0 known failure, 0 skipped + x = [5 2 3 6]; + y = [-1 1 2 3]; + z = einstein_sum(x, y); + assert(z, [-1.000 1.000 0.7143 0.4737], 1e-4); +***** error + einstein_sum() +***** error + einstein_sum(2j) +***** error + einstein_sum(1, 2j) +***** error + einstein_sum([1 2j]) +***** error + einstein_sum(1, 2, 3) +***** error + einstein_sum([1 2], [1 2 3]) +***** error + einstein_sum([1 2], [1 2; 3 4]) +***** error + einstein_sum(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped [inst/rmmf.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/rmmf.m ***** shared fis @@ -3748,7 +3935,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 246 column 31 + /tmp/tmp.Ps9u36fyql at line 238 column 31 ***** test fis = rmmf(fis, 'input', 1, 'mf', 1); @@ -3776,72 +3963,61 @@ ***** error rmmf(fis, 'input', 1, 'mf', 5.5) 12 tests, 12 passed, 0 known failure, 0 skipped -[inst/addmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/addmf.m -***** demo - ## Create new FIS. - a = newfis ('Heart-Disease-Risk', 'sugeno', ... - 'min', 'max', 'min', 'max', 'wtaver'); - - ## Add two inputs and their membership functions. - a = addvar (a, 'input', 'LDL-Level', [0 300]); - a = addmf (a, 'input', 1, 'Low', 'trapmf', [-1 0 90 110]); - a = addmf (a, 'input', 1, 'Low-Borderline', 'trapmf', ... - [90 110 120 140]); - a = addmf (a, 'input', 1, 'Borderline', 'trapmf', ... - [120 140 150 170]); - a = addmf (a, 'input', 1, 'High-Borderline', 'trapmf', ... - [150 170 180 200]); - a = addmf (a, 'input', 1, 'High', 'trapmf', [180 200 300 301]); - - a = addvar (a, 'input', 'HDL-Level', [0 100]); - a = addmf (a, 'input', 2, 'Low-HDL', 'trapmf', [-1 0 35 45]); - a = addmf (a, 'input', 2, 'Moderate-HDL', 'trapmf', [35 45 55 65]); - a = addmf (a, 'input', 2, 'High-HDL', 'trapmf', [55 65 100 101]); - - ## Plot the input membership functions. - plotmf (a, 'input', 1); - plotmf (a, 'input', 2); +[inst/gensurf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gensurf.m ***** shared fis - fis = readfis ('mamdani_tip_calculator.fis'); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path + fis = readfis ('cubic_approximator.fis'); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/cubic_approximator.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 254 column 31 + /tmp/tmp.Ps9u36fyql at line 246 column 31 +***** error + gensurf() +***** error + gensurf(fis, 1, 1, 3, 0, 2, 0) +***** error + gensurf(1) +***** error + gensurf(fis, 2) +***** error + gensurf(fis, 1, 2) +***** error + gensurf(fis, 1, 1, 0) +***** error + gensurf(fis, 1, 1, 3, [0; 0]) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/drastic_sum.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/drastic_sum.m ***** test - fis = addmf(fis, 'input', 1, 'Excellent', 'trapmf', [5 8 10 11]); - assert(fis.input(1).mf(3).name, 'Excellent'); -***** error - addmf() -***** error - addmf(1) -***** error - addmf(1, 2) -***** error - addmf(1, 2, 3) -***** error - addmf(1, 2, 3, 4) -***** error - addmf(1, 2, 3, 4, 5) -***** error - addmf(1, 2, 3, 4, 5, 6, 7) -***** error - addmf(1, 2, 3, 4, 5, 6) -***** error - addmf(fis, 'file', 3, 4, 5, 6) -***** error - addmf(fis, 'input', 3, 4, 5, 6) -***** error - addmf(fis, 'input', 1, 4, 'string', 6) -***** error - addmf(fis, 'input', 1, 'string', 5, 6) -***** error - addmf(fis, 'input', 1, 'string', 'trapmf', []) -14 tests, 14 passed, 0 known failure, 0 skipped + x = [0.5 0.2]; + z = drastic_sum(x); + assert(z, 1); +***** test + x = [0.5 0.2 0.3 1]; + y = [1 0 0.2 0.3]; + z = drastic_sum(x, y); + assert(z, [1 0.2 1 1]); +***** error + drastic_sum() +***** error + drastic_sum(1, 2, 3) +***** error + drastic_sum(2j) +***** error + drastic_sum(1, 2j) +***** error + drastic_sum([1 2j]) +***** error + drastic_sum([1 2], [1 2 3]) +***** error + drastic_sum([1 2], [1 2; 3 4]) +***** error + drastic_sum(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped [inst/smf.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/smf.m ***** demo @@ -3889,57 +4065,6 @@ ***** error smf(0:100, '') 11 tests, 11 passed, 0 known failure, 0 skipped -[inst/bounded_sum.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/bounded_sum.m -***** test - x = [0.5 0.2]; - z = bounded_sum(x); - assert(z, 0.7, 1e-5); -***** test - x = [0.5 0.2 0.3 0.6]; - y = [1 0 0.2 0.3]; - z = bounded_sum(x, y); - assert(z, [1 0.2 0.5 0.9], 1e-5); -***** error - bounded_sum() -***** error - bounded_sum(1, 2, 3) -***** error - bounded_sum(2j) -***** error - bounded_sum(1, 2j) -***** error - bounded_sum([1 2j]) -***** error - bounded_sum([1 2], [1 2 3]) -***** error - bounded_sum([1 2], [1 2; 3 4]) -***** error - bounded_sum(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/sugeno_tip_demo.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/sugeno_tip_demo.m -***** test - fis = readfis ('sugeno_tip_calculator.fis'); - food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; - tip = evalfis (food_service, fis, 1001); - expected_result = ... - [10.000 10.000 12.500 - 10.868 13.681 19.138 - 17.500 17.500 20.000 - 10.604 14.208 19.452 - 10.427 13.687 19.033 - 10.471 14.358 19.353]; - assert(tip, expected_result, 1e-3); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path -warning: called from - readfis>open_input_file at line 128 column 14 - readfis at line 69 column 7 - __test__ at line 3 column 6 - test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 278 column 31 - -1 test, 1 passed, 0 known failure, 0 skipped [inst/getfis.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/getfis.m ***** shared fis @@ -3950,7 +4075,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 286 column 31 + /tmp/tmp.Ps9u36fyql at line 270 column 31 ***** error getfis() @@ -3969,159 +4094,34 @@ ***** error getfis(fis, 'input', 1, 'mf', 1, 6) 8 tests, 8 passed, 0 known failure, 0 skipped -[inst/fcm.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/fcm.m -***** demo - ## This demo: - ## - classifies a small set of unlabeled data points using - ## the Fuzzy C-Means algorithm into two fuzzy clusters - ## - plots the input points together with the cluster centers - ## - evaluates the quality of the resulting clusters using - ## three validity measures: the partition coefficient, the - ## partition entropy, and the Xie-Beni validity index - ## - ## Note: The input_data is taken from Chapter 13, Example 17 in - ## Fuzzy Logic: Intelligence, Control and Information, by - ## J. Yen and R. Langari, Prentice Hall, 1999, page 381 - ## (International Edition). - - ## Use fcm to classify the input_data. - input_data = [2 12; 4 9; 7 13; 11 5; 12 7; 14 4]; - number_of_clusters = 2; - [cluster_centers, soft_partition, obj_fcn_history] = ... - fcm (input_data, number_of_clusters) - - ## Plot the data points as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'FCM Demo 1'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 2), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 2'); - grid - hold - - ## Calculate and print the three validity measures. - printf ("Partition Coefficient: %f\n", ... - partition_coeff (soft_partition)); - printf ("Partition Entropy (with a = 2): %f\n", ... - partition_entropy (soft_partition, 2)); - printf ("Xie-Beni Index: %f\n\n", ... - xie_beni_index (input_data, cluster_centers, ... - soft_partition)); -***** demo - ## This demo: - ## - classifies three-dimensional unlabeled data points using - ## the Fuzzy C-Means algorithm into three fuzzy clusters - ## - plots the input points together with the cluster centers - ## - evaluates the quality of the resulting clusters using - ## three validity measures: the partition coefficient, the - ## partition entropy, and the Xie-Beni validity index - ## - ## Note: The input_data was selected to form three areas of - ## different shapes. - - ## Use fcm to classify the input_data. - input_data = [1 11 5; 1 12 6; 1 13 5; 2 11 7; 2 12 6; 2 13 7; - 3 11 6; 3 12 5; 3 13 7; 1 1 10; 1 3 9; 2 2 11; - 3 1 9; 3 3 10; 3 5 11; 4 4 9; 4 6 8; 5 5 8; 5 7 9; - 6 6 10; 9 10 12; 9 12 13; 9 13 14; 10 9 13; 10 13 12; - 11 10 14; 11 12 13; 12 6 12; 12 7 15; 12 9 15; - 14 6 14; 14 8 13]; - number_of_clusters = 3; - [cluster_centers, soft_partition, obj_fcn_history] = ... - fcm (input_data, number_of_clusters, [NaN NaN NaN 0]) - - ## Plot the data points in two dimensions (using features 1 & 2) - ## as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'FCM Demo 2'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers in two dimensions - ## (using features 1 & 2) as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 2), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 2'); - grid - hold - - ## Plot the data points in two dimensions - ## (using features 1 & 3) as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'FCM Demo 2'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 3), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers in two dimensions - ## (using features 1 & 3) as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 3), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 3'); - grid - hold - - ## Calculate and print the three validity measures. - printf ("Partition Coefficient: %f\n", ... - partition_coeff (soft_partition)); - printf ("Partition Entropy (with a = 2): %f\n", ... - partition_entropy (soft_partition, 2)); - printf ("Xie-Beni Index: %f\n\n", ... - xie_beni_index (input_data, cluster_centers, ... - soft_partition)); -***** error - fcm() -***** error - fcm(1) -***** error - fcm(1, 2, 3, 4) -***** error - fcm('input', 2) -***** error - fcm(1, 0) -***** error - fcm(1, 2, 2j) -6 tests, 6 passed, 0 known failure, 0 skipped +[inst/drastic_product.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/drastic_product.m +***** test + x = [0.5 0.2]; + z = drastic_product(x); + assert(z, 0); +***** test + x = [0.5 0.2 0.3 1]; + y = [1 0 0.2 0.3]; + z = drastic_product(x, y); + assert(z, [0.5 0 0 0.3]); +***** error + drastic_product() +***** error + drastic_product(1, 2, 3) +***** error + drastic_product(2j) +***** error + drastic_product(1, 2j) +***** error + drastic_product([1 2j]) +***** error + drastic_product([1 2], [1 2 3]) +***** error + drastic_product([1 2], [1 2; 3 4]) +***** error + drastic_product(0:100, []) +10 tests, 10 passed, 0 known failure, 0 skipped [inst/plotmf.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/plotmf.m ***** shared fis @@ -4132,7 +4132,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 302 column 31 + /tmp/tmp.Ps9u36fyql at line 286 column 31 ***** error plotmf() @@ -4153,312 +4153,210 @@ ***** error plotmf(fis, 'input', 1, 0, 2j) 9 tests, 9 passed, 0 known failure, 0 skipped -[inst/showfis.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/showfis.m -***** error - showfis() -***** error - showfis(1, 2) -***** error - showfis(1) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/writefis.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/writefis.m -***** shared fis - fis = readfis ('sugeno_tip_calculator.fis'); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path -warning: called from - readfis>open_input_file at line 128 column 14 - readfis at line 69 column 7 - __test__ at line 3 column 6 - test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 318 column 31 - -***** error - writefis() -***** error - writefis(1) -***** error - writefis(fis, 2) -***** error - writefis(fis, 'temp.fis', 'abc') -***** error - writefis(1, 2, 3, 4) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/drastic_sum.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/drastic_sum.m +[inst/trimf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/trimf.m +***** demo + x = 0:100; + params = [-1 0 50]; + y1 = trimf(x, params); + params = [0 50 100]; + y2 = trimf(x, params); + params = [50 100 101]; + y3 = trimf(x, params); + figure('NumberTitle', 'off', 'Name', 'trimf demo'); + plot(x, y1, 'r;params = [-1 0 50];', 'LineWidth', 2) + hold on; + plot(x, y2, 'b;params = [0 50 100];', 'LineWidth', 2) + hold on; + plot(x, y3, 'g;params = [50 100 101];', 'LineWidth', 2) + ylim([-0.1 1.2]); + xlabel('Crisp Input Value', 'FontWeight', 'bold'); + ylabel('Degree of Membership', 'FontWeight', 'bold'); + grid; ***** test - x = [0.5 0.2]; - z = drastic_sum(x); - assert(z, 1); + x = 0:10; + params = [0 2 4]; + y1 = trimf(x, params); + assert(y1, [0 0.5 1.0 0.5 0 0 0 0 0 0 0]); + params = [2 4 6]; + y2 = trimf(x, params); + assert(y2, [0 0 0 0.5 1.0 0.5 0 0 0 0 0]); + params = [6 8 10]; + y3 = trimf(x, params); + assert(y3, [0 0 0 0 0 0 0 0.5 1.0 0.5 0]); +***** error + trimf() +***** error + trimf(1) +***** error + trimf(1, 2, 3) +***** error + trimf([1 0], 2) +***** error + trimf(1, 2) +***** error + trimf(0:100, []) +***** error + trimf(0:100, [2]) +***** error + trimf(0:100, [2 3]) +***** error + trimf(0:100, [90 80 30]) +***** error + trimf(0:100, [30 80 20]) +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/gaussmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gaussmf.m +***** demo + x = -5:0.1:5; + params = [0.5 0]; + y1 = gaussmf(x, params); + params = [1 0]; + y2 = gaussmf(x, params); + params = [2 0]; + y3 = gaussmf(x, params); + figure('NumberTitle', 'off', 'Name', 'gaussmf demo'); + plot(x, y1, 'r;params = [0.5 0];', 'LineWidth', 2); + hold on ; + plot(x, y2, 'b;params = [1 0];', 'LineWidth', 2); + hold on ; + plot(x, y3, 'g;params = [2 0];', 'LineWidth', 2); + ylim([-0.1 1.1]); + xlabel('Crisp Input Value'); + ylabel('Degree of Membership'); + grid; + hold; ***** test - x = [0.5 0.2 0.3 1]; - y = [1 0 0.2 0.3]; - z = drastic_sum(x, y); - assert(z, [1 0.2 1 1]); -***** error - drastic_sum() -***** error - drastic_sum(1, 2, 3) -***** error - drastic_sum(2j) -***** error - drastic_sum(1, 2j) -***** error - drastic_sum([1 2j]) -***** error - drastic_sum([1 2], [1 2 3]) -***** error - drastic_sum([1 2], [1 2; 3 4]) -***** error - drastic_sum(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/einstein_sum.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/einstein_sum.m + x = -5:5; + params = [2 0]; + y = [0.043937 0.1353 0.3247 0.6065 0.8825 1 ... + 0.8825 0.6065 0.3247 0.1353 0.043937]; + z = gaussmf(x, params); + assert(z, y, 1e-4); +***** error + gaussmf() +***** error + gaussmf(1) +***** error + gaussmf(1, 2, 3) +***** error + gaussmf([1 0], 2) +***** error + gaussmf(1, 2) +***** error + gaussmf(0:100, []) +***** error + gaussmf(0:100, [30]) +***** error + gaussmf(0:100, [2 3 4 5]) +***** error + gaussmf(0:100, [90 80 30]) +***** error + gaussmf(0:100, 'abc') +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/hamacher_product.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/hamacher_product.m ***** test x = [5 3]; - z = einstein_sum(x); - assert(z, 0.5000); + z = hamacher_product(x); + assert(z, -2.1429, 1e-4); ***** test x = [5 2 3 6]; y = [-1 1 2 3]; - z = einstein_sum(x, y); - assert(z, [-1.000 1.000 0.7143 0.4737], 1e-4); -***** error - einstein_sum() -***** error - einstein_sum(2j) -***** error - einstein_sum(1, 2j) -***** error - einstein_sum([1 2j]) -***** error - einstein_sum(1, 2, 3) -***** error - einstein_sum([1 2], [1 2 3]) -***** error - einstein_sum([1 2], [1 2; 3 4]) -***** error - einstein_sum(0:100, []) + z = hamacher_product(x, y); + assert(z, [-0.5556 2.0000 -6.0000 -2.0000], 1e-4); +***** error + hamacher_product() +***** error + hamacher_product(2j) +***** error + hamacher_product(1, 2j) +***** error + hamacher_product([1 2j]) +***** error + hamacher_product(1, 2, 3) +***** error + hamacher_product([1 2], [1 2 3]) +***** error + hamacher_product([1 2], [1 2; 3 4]) +***** error + hamacher_product(0:100, []) 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/gustafson_kessel.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gustafson_kessel.m -***** demo - ## This demo: - ## - classifies a small set of unlabeled data points using - ## the Gustafson-Kessel algorithm into two fuzzy clusters - ## - plots the input points together with the cluster centers - ## - evaluates the quality of the resulting clusters using - ## three validity measures: the partition coefficient, the - ## partition entropy, and the Xie-Beni validity index - ## - ## Note: The input_data is taken from Chapter 13, Example 17 in - ## Fuzzy Logic: Intelligence, Control and Information, by - ## J. Yen and R. Langari, Prentice Hall, 1999, page 381 - ## (International Edition). - - ## Use gustafson_kessel to classify the input_data. - input_data = [2 12; 4 9; 7 13; 11 5; 12 7; 14 4]; - number_of_clusters = 2; - [cluster_centers, soft_partition, obj_fcn_history] = ... - gustafson_kessel (input_data, number_of_clusters) - - ## Plot the data points as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 1'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 2), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 2'); - grid - hold - - ## Calculate and print the three validity measures. - printf ("Partition Coefficient: %f\n", ... - partition_coeff (soft_partition)); - printf ("Partition Entropy (with a = 2): %f\n", ... - partition_entropy (soft_partition, 2)); - printf ("Xie-Beni Index: %f\n\n", ... - xie_beni_index (input_data, cluster_centers, ... - soft_partition)); -***** demo - ## This demo: - ## - classifies three-dimensional unlabeled data points using - ## the Gustafson-Kessel algorithm into three fuzzy clusters - ## - plots the input points together with the cluster centers - ## - evaluates the quality of the resulting clusters using - ## three validity measures: the partition coefficient, the - ## partition entropy, and the Xie-Beni validity index - ## - ## Note: The input_data was selected to form three areas of - ## different shapes. - - ## Use gustafson_kessel to classify the input_data. - input_data = [1 11 5; 1 12 6; 1 13 5; 2 11 7; 2 12 6; 2 13 7; - 3 11 6; 3 12 5; 3 13 7; 1 1 10; 1 3 9; 2 2 11; - 3 1 9; 3 3 10; 3 5 11; 4 4 9; 4 6 8; 5 5 8; 5 7 9; - 6 6 10; 9 10 12; 9 12 13; 9 13 14; 10 9 13; 10 13 12; - 11 10 14; 11 12 13; 12 6 12; 12 7 15; 12 9 15; - 14 6 14; 14 8 13]; - number_of_clusters = 3; - [cluster_centers, soft_partition, obj_fcn_history] = ... - gustafson_kessel (input_data, number_of_clusters, [1 1 1], ... - [NaN NaN NaN 0]) - - ## Plot the data points in two dimensions (using features 1 & 2) - ## as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 2'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 2), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers in two dimensions - ## (using features 1 & 2) as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 2), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 2'); - grid - - ## Plot the data points in two dimensions - ## (using features 1 & 3) as small blue x's. - figure ('NumberTitle', 'off', 'Name', 'Gustafson-Kessel Demo 2'); - for i = 1 : rows (input_data) - plot (input_data(i, 1), input_data(i, 3), 'LineWidth', 2, ... - 'marker', 'x', 'color', 'b'); - hold on; - endfor - - ## Plot the cluster centers in two dimensions - ## (using features 1 & 3) as larger red *'s. - for i = 1 : number_of_clusters - plot (cluster_centers(i, 1), cluster_centers(i, 3), ... - 'LineWidth', 4, 'marker', '*', 'color', 'r'); - hold on; - endfor - - ## Make the figure look a little better: - ## - scale and label the axes - ## - show gridlines - xlim ([0 15]); - ylim ([0 15]); - xlabel ('Feature 1'); - ylabel ('Feature 3'); - grid - hold - - ## Calculate and print the three validity measures. - printf ("Partition Coefficient: %f\n", ... - partition_coeff (soft_partition)); - printf ("Partition Entropy (with a = 2): %f\n", ... - partition_entropy (soft_partition, 2)); - printf ("Xie-Beni Index: %f\n\n", ... - xie_beni_index (input_data, cluster_centers, ... - soft_partition)); -***** error - gustafson_kessel() -***** error - gustafson_kessel(1) -***** error - gustafson_kessel(1, 2, 3, 4, 5) -***** error - gustafson_kessel('input', 2) -***** error - gustafson_kessel(1, 0) -***** error - gustafson_kessel(1, 2, 3j) -***** error - gustafson_kessel(1, 2, 3, 4j) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/evalmf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/evalmf.m +[inst/trapmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/trapmf.m ***** demo x = 0:100; - params = [25 50 75]; - mf_type = 'trimf'; - y = evalmf(x, params, mf_type); - figure('NumberTitle', 'off', 'Name', "evalmf(0:100, [25 50 75], 'trimf')"); - plot(x, y, 'LineWidth', 2) - ylim([-0.1 1.1]); + params = [-1 0 20 40]; + y1 = trapmf(x, params); + params = [20 40 60 80]; + y2 = trapmf(x, params); + params = [60 80 100 101]; + y3 = trapmf(x, params); + figure('NumberTitle', 'off', 'Name', 'trapmf demo'); + plot(x, y1, 'r;params = [-1 0 20 40];', 'LineWidth', 2) + hold on; + plot(x, y2, 'b;params = [20 40 60 80];', 'LineWidth', 2) + hold on; + plot(x, y3, 'g;params = [60 80 100 101];', 'LineWidth', 2) + ylim([-0.1 1.2]); xlabel('Crisp Input Value', 'FontWeight', 'bold'); ylabel('Degree of Membership', 'FontWeight', 'bold'); grid; ***** test - x = 0:10:100; - params = [25 50 75]; - mf_type = 'trimf'; - y = evalmf(x, params, mf_type); - assert(y, [0 0 0 0.2 0.6 1 0.6 0.2 0 0 0]); -***** error - evalmf() -***** error - evalmf(1) -***** error - evalmf(1, 2) -***** error - evalmf(1, 2, 3, 4, 5, 6) -***** error - evalmf([1 0], 2, 3) -***** error - evalmf([0 1], 2, 3) -***** error - evalmf([0 1], 2, 'trimf', 2j) -***** error - evalmf([0 1], 2, 'trimf', 2, 2) -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/gensurf.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/gensurf.m -***** shared fis - fis = readfis ('cubic_approximator.fis'); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/cubic_approximator.fis' found by searching load path + x = 0:10; + params = [-1 0 2 4]; + y1 = trapmf(x, params); + assert(y1, [1.0 1.0 1.0 0.5 0 0 0 0 0 0 0]); + params = [2 4 6 8]; + y2 = trapmf(x, params); + assert(y2, [0 0 0 0.5 1.0 1.0 1.0 0.5 0 0 0]); + params = [6 8 10 11]; + y3 = trapmf(x, params); + assert(y3, [0 0 0 0 0 0 0 0.5 1.0 1.0 1.0]); +***** error + trapmf() +***** error + trapmf(1) +***** error + trapmf(1, 2, 3) +***** error + trapmf([1 0], 2) +***** error + trapmf(1, 2) +***** error + trapmf(0:100, []) +***** error + trapmf(0:100, [2]) +***** error + trapmf(0:100, [2 3]) +***** error + trapmf(0:100, [90 80 30 20]) +***** error + trapmf(0:100, [30 80 20 20]) +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/mamdani_tip_demo.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/mamdani_tip_demo.m +***** test + fis = readfis ('mamdani_tip_calculator.fis'); + food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; + tip = evalfis (food_service, fis, 1001); + expected_result = ... + [10.0000 1.1000 + 15.0000 1.1500 + 20.0000 1.2000 + 15.0000 1.1500 + 15.0000 1.1500 + 16.4708 1.1647]; + assert(tip, expected_result, 1e-4); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 358 column 31 + /tmp/tmp.Ps9u36fyql at line 326 column 31 -***** error - gensurf() -***** error - gensurf(fis, 1, 1, 3, 0, 2, 0) -***** error - gensurf(1) -***** error - gensurf(fis, 2) -***** error - gensurf(fis, 1, 2) -***** error - gensurf(fis, 1, 1, 0) -***** error - gensurf(fis, 1, 1, 3, [0; 0]) -7 tests, 7 passed, 0 known failure, 0 skipped +1 test, 1 passed, 0 known failure, 0 skipped [inst/cubic_approx_demo.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/cubic_approx_demo.m ***** test @@ -4481,82 +4379,9 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 366 column 31 + /tmp/tmp.Ps9u36fyql at line 334 column 31 1 test, 1 passed, 0 known failure, 0 skipped -[inst/newfis.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/newfis.m -***** shared fis - fis = newfis ('Heart-Disease-Risk', 'sugeno', ... - 'min', 'max', 'min', 'max', 'wtaver'); -***** assert(fis.name == 'Heart-Disease-Risk'); -***** assert(fis.type == 'sugeno'); -***** assert(fis.andMethod == 'min'); -***** assert(fis.orMethod == 'max'); -***** assert(fis.impMethod == 'min'); -***** assert(fis.aggMethod == 'max'); -***** assert(fis.defuzzMethod == 'wtaver'); -***** error - newfis() -***** error - newfis(1, 2, 3, 4, 5, 6, 7, 8, 9) -***** error - newfis(1, 'str', 'str', 'str', 'str', 'str', 'str', 8) -***** error - newfis(1, 'str', 'str', 'str', 'str', 'str', 'str', 8) -***** error - newfis('str', 2, 'str', 'str', 'str', 'str', 'str', 8) -***** error - newfis('str', 'str', 3, 'str', 'str', 'str', 'str', 8) -***** error - newfis('str', 'str', 'str', 4, 'str', 'str', 'str', 8) -***** error - newfis('str', 'str', 'str', 'str', 5, 'str', 'str', 8) -***** error - newfis('str', 'str', 'str', 'str', 'str', 6, 'str', 8) -***** error - newfis('str', 'str', 'str', 'str', 'str', 'str', 7, 8) -***** error - newfis('str', 'str', 'str', 'str', 'str', 'str', 'str', 'str') -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/heart_disease_demo_1.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/heart_disease_demo_1.m -***** test - a = newfis ('Heart-Disease-Risk', 'sugeno', ... - 'algebraic_product', 'algebraic_sum', ... - 'min', 'max', 'wtaver'); - - ## Add two inputs and their membership functions. - a = addvar (a, 'input', 'LDL-Level', [0 300]); - a = addmf (a, 'input', 1, 'Low', 'trapmf', [-1 0 90 130]); - a = addmf (a, 'input', 1, 'Moderate', 'trapmf', [90 130 160 200]); - a = addmf (a, 'input', 1, 'High', 'trapmf', [160 200 300 301]); - - a = addvar (a, 'input', 'HDL-Level', [0 100]); - a = addmf (a, 'input', 2, 'Low', 'trapmf', [-1 0 35 45]); - a = addmf (a, 'input', 2, 'Moderate', 'trapmf', [35 45 55 65]); - a = addmf (a, 'input', 2, 'High', 'trapmf', [55 65 100 101]); - - ## Add one output and its membership functions. - a = addvar (a, 'output', 'Heart-Disease-Risk', [-2 12]); - a = addmf (a, 'output', 1, 'Negligible', 'constant', 0); - a = addmf (a, 'output', 1, 'Low', 'constant', 2.5); - a = addmf (a, 'output', 1, 'Medium', 'constant', 5); - a = addmf (a, 'output', 1, 'High', 'constant', 7.5); - a = addmf (a, 'output', 1, 'Extreme', 'constant', 10); - - ## Add 15 rules and display them in verbose format. - a = addrule (a, [1 1 3 1 1; 1 2 2 1 1; 1 3 1 1 1; ... - 2 1 4 1 1; 2 2 3 1 1; 2 3 2 1 1; ... - 3 1 5 1 1; 3 2 4 1 1; 3 3 3 1 1; ... - 1.3 3.3 2 1 2; ... - 3.05 1.05 4 1 2; ... - -3.2 -1.2 3 1 1]); - - ldl_hdl = [129 59; 130 60; 90 65; 205 40]; - heart_disease_risk = evalfis (ldl_hdl, a, 1001); - assert(heart_disease_risk, [4.2679; 4.1667; 2.5000; 8.3333], 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped [inst/setfis.m] >>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/setfis.m ***** shared fis @@ -4567,7 +4392,7 @@ readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 390 column 31 + /tmp/tmp.Ps9u36fyql at line 342 column 31 ***** test fis = setfis(fis, 'defuzzMethod', 'mom'); @@ -4599,60 +4424,271 @@ ***** error setfis(fis, 'input', 1, 'mf', 1, 'name', 7) 14 tests, 14 passed, 0 known failure, 0 skipped -[inst/addrule.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/addrule.m -***** shared fis - fis = readfis ('mamdani_tip_calculator.fis'); -warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/mamdani_tip_calculator.fis' found by searching load path +[inst/heart_disease_demo_2.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/heart_disease_demo_2.m +***** test + fis = readfis ('heart_disease_risk.fis'); + ldl_hdl = [129 59; 130 60; 90 65; 205 40]; + heart_disease_risk = evalfis (ldl_hdl, fis, 1001); + assert(heart_disease_risk, [3.6250; 3.7500; 0; 8.7500], 1e-4); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/heart_disease_risk.fis' found by searching load path warning: called from readfis>open_input_file at line 128 column 14 readfis at line 69 column 7 __test__ at line 3 column 6 test at line 682 column 11 - /tmp/tmp.81rVebpLCO at line 398 column 31 + /tmp/tmp.Ps9u36fyql at line 350 column 31 +1 test, 1 passed, 0 known failure, 0 skipped +[inst/sigmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/sigmf.m +***** demo + x = 0:100; + params = [0.3 40]; + y1 = sigmf(x, params); + params = [0.2 40]; + y2 = sigmf(x, params); + params = [0.1 40]; + y3 = sigmf(x, params); + figure('NumberTitle', 'off', 'Name', 'sigmf demo'); + plot(x, y1, 'r;params = [0.3 40];', 'LineWidth', 2) + hold on; + plot(x, y2, 'b;params = [0.2 40];', 'LineWidth', 2) + hold on; + plot(x, y3, 'g;params = [0.1 40];', 'LineWidth', 2) + ylim([-0.1 1.2]); + xlabel('Crisp Input Value', 'FontWeight', 'bold'); + ylabel('Degree of Membership', 'FontWeight', 'bold'); + grid; ***** test - fis = addrule(fis, [1 2 2 1 1 1]); - assert(fis.rule(5).antecedent, [1 2]); -***** error - addrule() -***** error - addrule(1) -***** error - addrule(1, 2, 3) -***** error - addrule(1, 2) -***** error - addrule(fis, 2j) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/hamacher_product.m] ->>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/hamacher_product.m + x = 0:10; + params = [5 2]; + y = [4.5398e-05 6.6929e-03 0.5000 0.9933 1 1 1 1 1 1 1]; + z = sigmf(x, params); + assert(z, y, 1e-4); +***** error + sigmf() +***** error + sigmf(1) +***** error + sigmf(1, 2, 3) +***** error + sigmf([1 0], 2) +***** error + sigmf(1, 2) +***** error + sigmf(0:100, []) +***** error + sigmf(0:100, [30]) +***** error + sigmf(0:100, [90 80 30]) +***** error + sigmf(0:100, 'abc') +***** error + sigmf(0:100, '') +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/evalfis.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/evalfis.m +***** shared fis, food_service + fis = readfis ('sugeno_tip_calculator.fis'); + food_service = [1 1; 5 5; 10 10; 4 6; 6 4; 7 4]; +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path +warning: called from + readfis>open_input_file at line 128 column 14 + readfis at line 69 column 7 + __test__ at line 3 column 6 + test at line 682 column 11 + /tmp/tmp.Ps9u36fyql at line 366 column 31 + ***** test - x = [5 3]; - z = hamacher_product(x); - assert(z, -2.1429, 1e-4); + tip = evalfis (food_service, fis, 1001); + expected_result = ... + [10.000 10.000 12.500 + 10.868 13.681 19.138 + 17.500 17.500 20.000 + 10.604 14.208 19.452 + 10.427 13.687 19.033 + 10.471 14.358 19.353]; + assert(tip, expected_result, 1e-3); +***** error + evalfis() +***** error + evalfis(1) +***** error + evalfis(1, 2, 3, 4) +***** error + evalfis(food_service, 2, 3) +***** error + evalfis(0, fis, 3) +***** error + evalfis(food_service, fis, -3) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/pimf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/pimf.m +***** demo + x = 0:255; + params = [70 80 100 140]; + y1 = pimf(x, params); + params = [50 75 105 175]; + y2 = pimf(x, params); + params = [30 70 110 200]; + y3 = pimf(x, params); + figure('NumberTitle', 'off', 'Name', 'pimf demo'); + plot(x, y1, 'r;params = [70 80 100 140];', 'LineWidth', 2) + hold on; + plot(x, y2, 'b;params = [50 75 105 175];', 'LineWidth', 2) + hold on; + plot(x, y3, 'g;params = [30 70 110 200];', 'LineWidth', 2) + ylim([-0.1 1.1]); + xlabel('Crisp Input Value', 'FontWeight', 'bold'); + ylabel('Degree of Membership', 'FontWeight', 'bold'); + grid; ***** test - x = [5 2 3 6]; - y = [-1 1 2 3]; - z = hamacher_product(x, y); - assert(z, [-0.5556 2.0000 -6.0000 -2.0000], 1e-4); -***** error - hamacher_product() -***** error - hamacher_product(2j) -***** error - hamacher_product(1, 2j) -***** error - hamacher_product([1 2j]) -***** error - hamacher_product(1, 2, 3) -***** error - hamacher_product([1 2], [1 2 3]) -***** error - hamacher_product([1 2], [1 2; 3 4]) -***** error - hamacher_product(0:100, []) -10 tests, 10 passed, 0 known failure, 0 skipped + x = 0:25:250; + params = [50 75 105 175]; + y = [0 0 0 1 1 0.8367 0.2551 0 0 0 0]; + z = pimf(x, params); + assert(z, y, 1e-4); +***** error + pimf() +***** error + pimf(1) +***** error + pimf(1, 2, 3) +***** error + pimf([1 0], 2) +***** error + pimf(1, 2) +***** error + pimf(0:100, []) +***** error + pimf(0:100, [30]) +***** error + pimf(0:100, [2 3]) +***** error + pimf(0:100, [90 80 30]) +***** error + pimf(0:100, 'abc') +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/writefis.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/writefis.m +***** shared fis + fis = readfis ('sugeno_tip_calculator.fis'); +warning: fopen: '/build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/debian/octave-fuzzy-logic-toolkit/usr/share/octave/packages/fuzzy-logic-toolkit-0.6.1/sugeno_tip_calculator.fis' found by searching load path +warning: called from + readfis>open_input_file at line 128 column 14 + readfis at line 69 column 7 + __test__ at line 3 column 6 + test at line 682 column 11 + /tmp/tmp.Ps9u36fyql at line 382 column 31 + +***** error + writefis() +***** error + writefis(1) +***** error + writefis(fis, 2) +***** error + writefis(fis, 'temp.fis', 'abc') +***** error + writefis(1, 2, 3, 4) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/newfis.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/newfis.m +***** shared fis + fis = newfis ('Heart-Disease-Risk', 'sugeno', ... + 'min', 'max', 'min', 'max', 'wtaver'); +***** assert(fis.name == 'Heart-Disease-Risk'); +***** assert(fis.type == 'sugeno'); +***** assert(fis.andMethod == 'min'); +***** assert(fis.orMethod == 'max'); +***** assert(fis.impMethod == 'min'); +***** assert(fis.aggMethod == 'max'); +***** assert(fis.defuzzMethod == 'wtaver'); +***** error + newfis() +***** error + newfis(1, 2, 3, 4, 5, 6, 7, 8, 9) +***** error + newfis(1, 'str', 'str', 'str', 'str', 'str', 'str', 8) +***** error + newfis(1, 'str', 'str', 'str', 'str', 'str', 'str', 8) +***** error + newfis('str', 2, 'str', 'str', 'str', 'str', 'str', 8) +***** error + newfis('str', 'str', 3, 'str', 'str', 'str', 'str', 8) +***** error + newfis('str', 'str', 'str', 4, 'str', 'str', 'str', 8) +***** error + newfis('str', 'str', 'str', 'str', 5, 'str', 'str', 8) +***** error + newfis('str', 'str', 'str', 'str', 'str', 6, 'str', 8) +***** error + newfis('str', 'str', 'str', 'str', 'str', 'str', 7, 8) +***** error + newfis('str', 'str', 'str', 'str', 'str', 'str', 'str', 'str') +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/psigmf.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/psigmf.m +***** demo + x = 0:100; + params = [0.5 20 -0.3 60]; + y1 = psigmf(x, params); + params = [0.3 20 -0.2 60]; + y2 = psigmf(x, params); + params = [0.2 20 -0.1 60]; + y3 = psigmf(x, params); + figure('NumberTitle', 'off', 'Name', 'psigmf demo'); + plot(x, y1, 'r;params = [0.5 20 -0.3 60];', 'LineWidth', 2) + hold on; + plot(x, y2, 'b;params = [0.3 20 -0.2 60];', 'LineWidth', 2) + hold on; + plot(x, y3, 'g;params = [0.2 20 -0.1 60];', 'LineWidth', 2) + ylim([-0.1 1.1]); + xlabel('Crisp Input Value', 'FontWeight', 'bold'); + ylabel('Degree of Membership', 'FontWeight', 'bold'); + grid; +***** test + x = 0:10:100; + params = [0.3 20 -0.2 60]; + y = [2.4726e-03 0.047424 0.4998 0.9502 0.9796 0.8807 ... + 0.5000 0.1192 0.017986 2.4726e-03 3.3535e-04]; + z = psigmf(x, params); + assert(z, y, 1e-4); +***** error + psigmf() +***** error + psigmf(1) +***** error + psigmf(1, 2, 3) +***** error + psigmf([1 0], 2) +***** error + psigmf(1, 2) +***** error + psigmf(0:100, []) +***** error + psigmf(0:100, [30]) +***** error + psigmf(0:100, [2 3]) +***** error + psigmf(0:100, [90 80 30]) +***** error + psigmf(0:100, 'abc') +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/partition_entropy.m] +>>>>> /build/reproducible-path/octave-fuzzy-logic-toolkit-0.6.1/inst/partition_entropy.m +***** error + partition_entropy() +***** error + partition_entropy(1) +***** error + partition_entropy(1, 2, 3) +***** error + partition_entropy([1 2], 2) +***** error + partition_entropy([1 1], -2) +5 tests, 5 passed, 0 known failure, 0 skipped Checking C++ files ... Done running the unit tests. Summary: 419 tests, 419 passed, 0 known failures, 0 skipped @@ -4682,12 +4718,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/14837/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/1979 and its subdirectories -I: Current time: Fri Oct 18 10:22:21 -12 2024 -I: pbuilder-time-stamp: 1729290141 +I: removing directory /srv/workspace/pbuilder/14837 and its subdirectories +I: Current time: Sat Oct 19 12:27:01 +14 2024 +I: pbuilder-time-stamp: 1729290421