Hello community,

here is the log from the commit of package octave-forge-nan for 
openSUSE:Factory checked in at 2020-12-04 21:27:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-nan (Old)
 and      /work/SRC/openSUSE:Factory/.octave-forge-nan.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "octave-forge-nan"

Fri Dec  4 21:27:55 2020 rev:11 rq:849235 version:3.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/octave-forge-nan/octave-forge-nan.changes        
2020-08-17 12:05:49.734709261 +0200
+++ 
/work/SRC/openSUSE:Factory/.octave-forge-nan.new.5913/octave-forge-nan.changes  
    2020-12-04 21:27:56.902078371 +0100
@@ -1,0 +2,14 @@
+Sun Nov 15 20:54:21 UTC 2020 - Atri Bhattacharya <[email protected]>
+
+- Update to version 3.5.2:
+  * New functions added:
+    - gini: Gini index.
+    - lmom: L-moments.
+    - betapdf, betacdf, betainv: beta distribution functions.
+  * Bug fixes:
+    - bland-altman: fix ylabel.
+    - fix debian bug #964210: test tries to download data.
+    - fix #59335: "'load_fisheriris' fails on Windows".
+    - fix #59336: "(nan) BIST for `ttest` fails".
+
+-------------------------------------------------------------------

Old:
----
  nan-3.5.0.tar.gz

New:
----
  nan-3.5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ octave-forge-nan.spec ++++++
--- /var/tmp/diff_new_pack.le0hlj/_old  2020-12-04 21:27:57.542079290 +0100
+++ /var/tmp/diff_new_pack.le0hlj/_new  2020-12-04 21:27:57.546079295 +0100
@@ -18,7 +18,7 @@
 
 %define octpkg  nan
 Name:           octave-forge-%{octpkg}
-Version:        3.5.0
+Version:        3.5.2
 Release:        0
 Summary:        A statistics and machine learning toolbox
 License:        GPL-3.0-or-later

++++++ nan-3.5.0.tar.gz -> nan-3.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/DESCRIPTION new/nan-3.5.2/DESCRIPTION
--- old/nan-3.5.0/DESCRIPTION   2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/DESCRIPTION   2020-10-31 17:44:32.000000000 +0100
@@ -1,11 +1,11 @@
 Name: NaN
-Version: 3.5.0
-Date: 2020-07-12
-Author: Alois Schloegl <[email protected]>
-Maintainer: Alois Schloegl
+Version: 3.5.2
+Date: 2020-10-31
+Author: Alois Schlögl <[email protected]>
+Maintainer: Alois Schlögl
 Title: The NaN-toolbox
 Description: A statistics and machine learning toolbox for data with and w/o 
missing values
-Depends: octave (>= 3.8.0)
+Depends: octave (>= 4.4.1)
 License: GPLv3+
 Url: http://pub.ist.ac.at/~schloegl/matlab/NaN
 Autoload: no
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/INDEX new/nan-3.5.2/INDEX
--- old/nan-3.5.0/INDEX 2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/INDEX 2020-10-31 17:44:32.000000000 +0100
@@ -13,6 +13,8 @@
  bland_altman cumsumskipnan range signrank histo
  histo2 histo3 histo4 kolmogorov_smirnov kstest2 roc
  kappa load_cifar100 load_cifar10 load_mnist
- fishers_exact_test
+ fishers_exact_test betapdf betacdf betainv
+ gini lmom
+
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/NEWS new/nan-3.5.2/NEWS
--- old/nan-3.5.0/NEWS  2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/NEWS  2020-10-31 17:44:32.000000000 +0100
@@ -1,3 +1,24 @@
+
+2020-10-31: Release of NaN-toolbox 3.5.2
+
+* new functions added
+   gini: Gini index
+   lmom: L-moments
+   betapdf, betacdf, betainv:
+       beta distribution functions
+
+* bug fixes:
+  bland-altman: fix ylabel
+  fix debian bug #964210: test tries to download data
+  fix #59335: "'load_fisheriris' fails on Windows"
+  fix #59336: "(nan) BIST for `ttest` fails"
+    this failed because betainv(...) is not available
+    the suggestion of add a dependency on statistics package
+    does not work, because of a conflict with statistics
+    (it would not handle NaNs in the indended way).
+    Therefore, functions for beta* distributions are included.
+
+
 2020-07-12: Release of NaN-toolbox 3.5.0
 
 * ttest:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/betacdf.m new/nan-3.5.2/inst/betacdf.m
--- old/nan-3.5.0/inst/betacdf.m        1970-01-01 01:00:00.000000000 +0100
+++ new/nan-3.5.2/inst/betacdf.m        2020-10-31 17:44:32.000000000 +0100
@@ -0,0 +1,89 @@
+%% Copyright (C) 2012 Rik Wehbring
+%% Copyright (C) 1995-2016 Kurt Hornik
+%%
+%% This program is free software: you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License as
+%% published by the Free Software Foundation, either version 3 of the
+%% License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%% General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; see the file COPYING.  If not, see
+%% <http://www.gnu.org/licenses/>.
+
+%% cdf = betacdf (x, a, b)
+%% For each element of @var{x}, compute the cumulative distribution function
+%% (CDF) at x of the Beta distribution with parameters a and b.
+
+%% Author: KH <[email protected]>
+%% Description: CDF of the Beta distribution
+
+%% Adapted for the use with Matlab and the NaN-toolbox.
+
+function cdf = betacdf (x, a, b)
+
+  if (nargin ~= 3)
+    print_usage ();
+  end
+
+  if (~ isscalar (a) || ~ isscalar (b))
+    [retval, x, a, b] = common_size (x, a, b);
+    if (retval > 0)
+      error ('betacdf: X, A, and B must be of common size or scalars');
+    end
+  end
+
+  if (iscomplex (x) || iscomplex (a) || iscomplex (b))
+    error ('betacdf: X, A, and B must not be complex');
+  end
+
+  if (isa (x, 'single') || isa (a, 'single') || isa (b, 'single'))
+    cdf = zeros (size (x), 'single');
+  else
+    cdf = zeros (size (x));
+  end
+
+  k = isnan (x) | ~(a > 0) | ~(b > 0);
+  cdf(k) = NaN;
+
+  k = (x >= 1) & (a > 0) & (b > 0);
+  cdf(k) = 1;
+
+  k = (x > 0) & (x < 1) & (a > 0) & (b > 0);
+  if (isscalar (a) && isscalar (b))
+    cdf(k) = betainc (x(k), a, b);
+  else
+    cdf(k) = betainc (x(k), a(k), b(k));
+  end
+
+end
+
+
+%!shared x,y
+%! x = [-1 0 0.5 1 2];
+%! y = [0 0 0.75 1 1];
+%!assert (betacdf (x, ones (1,5), 2*ones (1,5)), y)
+%!assert (betacdf (x, 1, 2*ones (1,5)), y)
+%!assert (betacdf (x, ones (1,5), 2), y)
+%!assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1])
+%!assert (betacdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1])
+%!assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)])
+
+%% Test class of input preserved
+%!assert (betacdf ([x, NaN], 1, 2), [y, NaN])
+%!assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
+%!assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN]))
+%!assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN]))
+
+%% Test input validation
+%!error betacdf ()
+%!error betacdf (1)
+%!error betacdf (1,2)
+%!error betacdf (1,2,3,4)
+%!error betacdf (ones (3), ones (2), ones (2))
+%!error betacdf (ones (2), ones (3), ones (2))
+%!error betacdf (ones (2), ones (2), ones (3))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/betainv.m new/nan-3.5.2/inst/betainv.m
--- old/nan-3.5.0/inst/betainv.m        1970-01-01 01:00:00.000000000 +0100
+++ new/nan-3.5.2/inst/betainv.m        2020-10-31 17:44:32.000000000 +0100
@@ -0,0 +1,136 @@
+%% Copyright (C) 2012 Rik Wehbring
+%% Copyright (C) 1995-2016 Kurt Hornik
+%% Copyright (C) 2020 Alois Schlögl 
+%%
+%% This program is free software: you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License as
+%% published by the Free Software Foundation, either version 3 of the
+%% License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%% General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; see the file COPYING.  If not, see
+%% <http://www.gnu.org/licenses/>.
+
+%% inv = betainv (x, a, b)
+%% For each element of x, compute the quantile (the inverse of the CDF)
+%% at x of the Beta distribution with parameters a and b.
+
+%% Author: KH <[email protected]>
+%% Description: Quantile function of the Beta distribution
+
+%% Adapted for the use with Matlab and the NaN-toolbox.
+
+
+function inv = betainv (x, a, b)
+
+  if (nargin ~= 3)
+    print_usage ();
+  end
+
+  if (! isscalar (a) || ~isscalar (b))
+    [retval, x, a, b] = common_size (x, a, b);
+    if (retval > 0)
+      error ('betainv: X, A, and B must be of common size or scalars');
+    end
+  end
+
+  if (iscomplex (x) || iscomplex (a) || iscomplex (b))
+    error ('betainv: X, A, and B must not be complex');
+  end
+
+  if (isa (x, 'single') || isa (a, 'single') || isa (b, 'single'))
+    inv = zeros (size (x), 'single');
+  else
+    inv = zeros (size (x));
+  end
+
+  k = (x < 0) | (x > 1) | ~(a > 0) | ~(b > 0) | isnan (x);
+  inv(k) = NaN;
+
+  k = (x == 1) & (a > 0) & (b > 0);
+  inv(k) = 1;
+
+  k = find ((x > 0) & (x < 1) & (a > 0) & (b > 0));
+  if (~ isempty (k))
+    if (~ isscalar (a) || ~ isscalar (b))
+      a = a(k);
+      b = b(k);
+      y = a ./ (a + b);
+    else
+      y = a / (a + b) * ones (size (k));
+    end
+    x = x(k);          
+
+    if (isa (y, 'single'))
+      myeps = eps ('single');
+    else
+      myeps = eps;
+    end
+
+    l = find (y < myeps);
+    if (any (l))
+      y(l) = sqrt (myeps) * ones (length (l), 1);
+    end
+    l = find (y > 1 - myeps);
+    if (any (l))
+      y(l) = 1 - sqrt (myeps) * ones (length (l), 1);
+    end
+
+    y_new = y;
+    loopcnt = 0;
+    do
+      y_old = y_new;
+      h     = (betacdf (y_old, a, b) - x) ./ betapdf (y_old, a, b);
+      y_new = y_old - h;
+      ind   = find (y_new <= myeps);
+      if (any (ind))
+        y_new(ind) = y_old(ind) / 10;
+      end
+      ind = find (y_new >= 1 - myeps);
+      if (any (ind))
+        y_new(ind) = 1 - (1 - y_old(ind)) / 10;
+      end
+      h = y_old - y_new;
+    until (max (abs (h)) < sqrt (myeps) || ++loopcnt == 40)
+
+    if (loopcnt == 40)
+      warning ('betainv: calculation failed to converge for some values');
+    end
+
+    inv(k) = y_new;
+  end
+
+end
+
+
+%!shared x
+%! x = [-1 0 0.75 1 2];
+%!assert (betainv (x, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps)
+%!assert (betainv (x, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps)
+%!assert (betainv (x, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps)
+%!assert (betainv (x, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN])
+%!assert (betainv (x, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN])
+%!assert (betainv ([x(1:2) NaN x(4:5)], 1, 2), [NaN 0 NaN 1 NaN])
+
+%% Test class of input preserved
+%!assert (betainv ([x, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps)
+%!assert (betainv (single ([x, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN]))
+%!assert (betainv ([x, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), 
eps('single'))
+%!assert (betainv ([x, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), 
eps('single'))
+
+%% Test input validation
+%!error betainv ()
+%!error betainv (1)
+%!error betainv (1,2)
+%!error betainv (1,2,3,4)
+%!error betainv (ones (3), ones (2), ones (2))
+%!error betainv (ones (2), ones (3), ones (2))
+%!error betainv (ones (2), ones (2), ones (3))
+%!error betainv (i, 2, 2)
+%!error betainv (2, i, 2)
+%!error betainv (2, 2, i)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/betapdf.m new/nan-3.5.2/inst/betapdf.m
--- old/nan-3.5.0/inst/betapdf.m        1970-01-01 01:00:00.000000000 +0100
+++ new/nan-3.5.2/inst/betapdf.m        2020-10-31 17:44:32.000000000 +0100
@@ -0,0 +1,130 @@
+%% Copyright (C) 2012 Rik Wehbring
+%% Copyright (C) 1995-2016 Kurt Hornik
+%% Copyright (C) 2010 Christos Dimitrakakis
+%% Copyright (C) 2020 Alois Schlögl 
+%%
+%% This program is free software: you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License as
+%% published by the Free Software Foundation, either version 3 of the
+%% License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%% General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; see the file COPYING.  If not, see
+%% <http://www.gnu.org/licenses/>.
+
+%% pdf = betapdf (x, a, b)
+%% For each element of x, compute the probability density function (PDF)
+%% at x of the Beta distribution with parameters a and b.
+
+%% Author: KH <[email protected]>, CD <[email protected]>
+%% Description: PDF of the Beta distribution
+
+%% Adapted for the use with Matlab and the NaN-toolbox.
+
+function pdf = betapdf (x, a, b)
+
+  if (nargin ~= 3)
+    print_usage ();
+  end
+
+  if (~ isscalar (a) || ~ isscalar (b))
+    [retval, x, a, b] = common_size (x, a, b);
+    if (retval > 0)
+      error ('betapdf: X, A, and B must be of common size or scalars');
+    end
+  end
+
+  if (iscomplex (x) || iscomplex (a) || iscomplex (b))
+    error ('betapdf: X, A, and B must not be complex');
+  end
+
+  if (isa (x, 'single') || isa (a, 'single') || isa (b, 'single'));
+    pdf = zeros (size (x), 'single');
+  else
+    pdf = zeros (size (x));
+  end
+
+  k = ~(a > 0) | ~(b > 0) | isnan (x);
+  pdf(k) = NaN;
+
+  k = (x > 0) & (x < 1) & (a > 0) & (b > 0) & ((a ~= 1) | (b ~= 1));
+  if (isscalar (a) && isscalar (b))
+    pdf(k) = exp ((a - 1) * log (x(k))
+                  + (b - 1) * log (1 - x(k))
+                  + gammaln (a + b) - gammaln (a) - gammaln (b));
+  else
+    pdf(k) = exp ((a(k) - 1) .* log (x(k))
+                  + (b(k) - 1) .* log (1 - x(k))
+                  + gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
+  end
+
+  %% Most important special cases when the density is finite.
+  k = (x == 0) & (a == 1) & (b > 0) & (b ~= 1);
+  if (isscalar (a) && isscalar (b))
+    pdf(k) = exp (gammaln (a + b) - gammaln (a) - gammaln (b));
+  else
+    pdf(k) = exp (gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
+  end
+
+  k = (x == 1) & (b == 1) & (a > 0) & (a ~= 1);
+  if (isscalar (a) && isscalar (b))
+    pdf(k) = exp (gammaln (a + b) - gammaln (a) - gammaln (b));
+  else
+    pdf(k) = exp (gammaln (a(k) + b(k)) - gammaln (a(k)) - gammaln (b(k)));
+  end
+
+  k = (x >= 0) & (x <= 1) & (a == 1) & (b == 1);
+  pdf(k) = 1;
+
+  %% Other special case when the density at the boundary is infinite.
+  k = (x == 0) & (a < 1);
+  pdf(k) = Inf;
+
+  k = (x == 1) & (b < 1);
+  pdf(k) = Inf;
+
+end
+
+
+%!shared x,y
+%! x = [-1 0 0.5 1 2];
+%! y = [0 2 1 0 0];
+%!assert (betapdf (x, ones (1,5), 2*ones (1,5)), y)
+%!assert (betapdf (x, 1, 2*ones (1,5)), y)
+%!assert (betapdf (x, ones (1,5), 2), y)
+%!assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)])
+%!assert (betapdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)])
+%!assert (betapdf ([x, NaN], 1, 2), [y, NaN])
+
+%% Test class of input preserved
+%!assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN]))
+%!assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN]))
+%!assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN]))
+
+%% Beta (1/2,1/2) == arcsine distribution
+%!test
+%! x = rand (10,1);
+%! y = 1./(pi * sqrt (x.*(1-x)));
+%! assert (betapdf (x, 1/2, 1/2), y, 50*eps);
+
+%% Test large input values to betapdf
+%!assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3)
+
+%% Test input validation
+%!error betapdf ()
+%!error betapdf (1)
+%!error betapdf (1,2)
+%!error betapdf (1,2,3,4)
+%!error betapdf (ones (3), ones (2), ones (2))
+%!error betapdf (ones (2), ones (3), ones (2))
+%!error betapdf (ones (2), ones (2), ones (3))
+%!error betapdf (i, 2, 2)
+%!error betapdf (2, i, 2)
+%!error betapdf (2, 2, i)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/bland_altman.m 
new/nan-3.5.2/inst/bland_altman.m
--- old/nan-3.5.0/inst/bland_altman.m   2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/inst/bland_altman.m   2020-10-31 17:44:32.000000000 +0100
@@ -95,9 +95,9 @@
        W = 1./n(J);
        RES.SSW = sumskipnan(R.^2,1,W);
        RES.SSB = var(data,[],1,W)*sum(W)*(sum(W)-1);
-       RES.sigma2_w= RES.SSW/(sum(W)*(length(G)-1));
-       RES.sigma2_u= RES.SSB/(sum(W)*(length(G)-1)) - RES.sigma2_w/(length(G));
-       RES.group = bland_altman(data2);        % FIXME: this plot shows 
incorrect interval, it does not account for the group/repeated samples. 
+       RES.sigma2_w = RES.SSW/(sum(W)*(length(G)-1));
+       RES.sigma2_u = RES.SSB/(sum(W)*(length(G)-1)) - 
RES.sigma2_w/(length(G));
+       RES.group  = bland_altman(data2);       % FIXME: this plot shows 
incorrect interval, it does not account for the group/repeated samples.
        RES.repeatability_coefficient1 = 2.77*sqrt(var(R,1,1));         % 
variance with factor group removed
        RES.repeatability_coefficient = 2.77*sqrt(mean(SW2,1));         % 
variance with factor group removed
        RES.std_d_ = std(d);
@@ -117,5 +117,5 @@
 
 plot(M,D,'o', [min(M),max(M)]', [0,0]','k--', [min(M),max(M)]', [1,1,1; 
0,1.96,-1.96]'*[RES.Bias;std(D)]*[1,1], 'k-');
 xlabel('mean');
-ylabel('difference');
+ylabel('difference (m1-m2)');
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/gini.m new/nan-3.5.2/inst/gini.m
--- old/nan-3.5.0/inst/gini.m   1970-01-01 01:00:00.000000000 +0100
+++ new/nan-3.5.2/inst/gini.m   2020-10-31 17:44:32.000000000 +0100
@@ -0,0 +1,35 @@
+function G = gini(data)
+% GINI computes the gini-coefficient [1] using by
+%   computing the L-moments [2]. 
+%
+% USAGE: 
+%   G = gini(data)
+% 
+% 
+% 
+% References: 
+% [1] https://en.wikipedia.org/wiki/Gini_coefficient
+% [2] https://en.wikipedia.org/wiki/L-moment 
+
+% Copyright (C) 2019,2020 by Alois Schlögl <[email protected]>
+%       This function is part of the NaN-toolbox
+%       http://pub.ist.ac.at/~schloegl/matlab/NaN/
+
+%% This program is free software: you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License as
+%% published by the Free Software Foundation, either version 3 of the
+%% License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%% General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; see the file COPYING.  If not, see
+%% <http://www.gnu.org/licenses/>.
+
+
+L = lmom(data,2);
+G = L(2)/L(1);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/kappa.m new/nan-3.5.2/inst/kappa.m
--- old/nan-3.5.0/inst/kappa.m  2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/inst/kappa.m  2020-10-31 17:44:32.000000000 +0100
@@ -37,10 +37,9 @@
 % [5] http://ourworld.compuserve.com/homepages/jsuebersax/kappa.htm
 % [6] http://en.wikipedia.org/wiki/Receiver_operating_characteristic
 
-%      $Id$
-%      Copyright (c) 1997-2006,2008,2009,2011 by Alois Schloegl 
<[email protected]>     
-%       This function is part of the NaN-toolbox
-%       http://pub.ist.ac.at/~schloegl/matlab/NaN/
+%    Copyright (c) 1997-2020 by Alois Schloegl <[email protected]>
+%    This function is part of the NaN-toolbox
+%    http://pub.ist.ac.at/~schloegl/matlab/NaN/
 %
 %    BioSig is free software: you can redistribute it and/or modify
 %    it under the terms of the GNU General Public License as published by
@@ -184,6 +183,17 @@
        X.Specificity = 1 - X.FPR;
        X.Precision   = X.PPV;
        X.dprime = norminv(X.TPR) - norminv(X.FDR);
+
+       % statistical significance test of Matthews' correlation coefficient
+       NN = sum(H(:));
+       R = X.MCC;
+       R(isnan(R)) = 0;
+       tmp = 1 - R.*R;
+       tmp(tmp<0) = 0;         % prevent tmp<0 i.e. imag(t)~=0
+       t   = R.*sqrt(max(NN-2,0)./tmp)
+       sig = tcdf(t,NN-2);
+       sig = 2 * min(sig,1 - sig);
+       X.MCC_p_value = sig;
 end;
 
 kap = X;  
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/lmom.m new/nan-3.5.2/inst/lmom.m
--- old/nan-3.5.0/inst/lmom.m   1970-01-01 01:00:00.000000000 +0100
+++ new/nan-3.5.2/inst/lmom.m   2020-10-31 17:44:32.000000000 +0100
@@ -0,0 +1,89 @@
+function LMOM = lmom(data,P,opt)
+% LMOM estimates the L-Moments [1,2] from a sample distribution  
+%   and might be a useful density estimation [1,3].
+%   LMOM is equivalent to samlmo.F from dataplot [4].
+%
+% Usage: 
+%   XMOM = lmom(X,P)
+%   XMOM = lmom(X,P,'ratios')
+%
+%   X  input data, NaN's are ignored
+%   P   maximum order, L moments 1:P are estimated
+%   option: default 'false', 
+%           'ratios': compute L-moment ratios
+%   XMOM  vector of L-Moments from 1:P
+%      in case option='ratios', XMOM(3:P) will 
+%      return the L-moment rations (i.e. scaled L-moments).
+%
+% The current implementation is tested only on data sets up to 1000 samples
+% and P=10. The algorithm has not been analyzed with respect to accuracy and
+% computational efficiency. Eventually, this implementation should be
+% compared also to samlmu.F from dataplot [4], which is also used in [5]. 
+%
+% References: 
+% [1] Hosking (1990), L-MOMENTS: ANALYSIS AND ESTIMATION OF DISTRIBUTIONS, 
+%        J. R. Statist. Soc. B (1990), 52,No. 1,pp. 105-124
+% [2] https://en.wikipedia.org/wiki/L-moment
+% [3] https://en.wikipedia.org/wiki/Density_estimation
+% [4] Hosking, function samlmo.F from https://github.com/usnistgov/dataplot
+% [5] 'lmom'-package for R, available from 
+%     
https://www.rdocumentation.org/packages/lmom/versions/2.8/topics/lmom-package
+
+% Copyright (C) 2019,2020 by Alois Schlögl <[email protected]>
+%       This function is part of the NaN-toolbox
+%       http://pub.ist.ac.at/~schloegl/matlab/NaN/
+
+%% This program is free software: you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License as
+%% published by the Free Software Foundation, either version 3 of the
+%% License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%% General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; see the file COPYING.  If not, see
+%% <http://www.gnu.org/licenses/>.
+
+
+if nargin<3
+       opt=0;
+end
+opt = strcmp(opt,'ratios');
+
+data(isnan(data))=[];
+F = [0:length(data)]'/length(data);
+u = sort(data);
+u = u([1,1:end]);
+
+% TODO: one might do this more efficiently 
+p=repmat(NaN,P,P);
+for r = 1:P
+for k = 1:r
+       p(r,k)=bincoeff(r,k)*bincoeff(r+k,k)*(-1)^(r-k);
+end
+end
+
+for k = 1:P,
+       xi(k) = trapz(F, u .* F.^(k-1));
+       if k==1,
+               LMOM(k) = xi(k);
+       else 
+               LMOM(k) = xi(1:k) * [(-1).^(k-1); p(k-1, 1:k-1)'];
+       end
+end
+if (opt && (P>2))
+       LMOM(3:P) = LMOM(3:P)/LMOM(2);
+end
+
+return
+
+% lambda(1) = trapz(F, [u] ); 
+% lambda(2) = trapz(F, [u] .* (2*F-1)) ;
+% lambda(3) = trapz(F, [u] .* (6*F.^2 - 6*F + 1)) ;
+% lambda(4) = trapz(F, [u] .* (20*F.^3 - 30*F.^2 + 12*F - 1)) ;
+%
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/load_fisheriris.m 
new/nan-3.5.2/inst/load_fisheriris.m
--- old/nan-3.5.0/inst/load_fisheriris.m        2020-07-12 23:58:03.000000000 
+0200
+++ new/nan-3.5.2/inst/load_fisheriris.m        2020-10-31 17:44:32.000000000 
+0100
@@ -7,7 +7,7 @@
 % [2] Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis. 
 %        (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. See page 218.
 
-% Copyright (C) 2009,2010,2016,2019 by Alois Schloegl 
<[email protected]>       
+% Copyright (C) 2009,2010,2016,2019,2020 by Alois Schloegl 
<[email protected]>
 %   This function is part of the NaN-toolbox
 %   http://pub.ist.ac.at/~schloegl/matlab/NaN/
 
@@ -27,31 +27,39 @@
 
 
 if exist('OCTAVE_VERSION','builtin')
-       if ~exist('iris.data','file')
-               if strncmp(computer,'PCWIN',5)
-                       fprintf(1,'Download 
http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data and 
save in local directory %s\nPress any key to continue ...\n',pwd);
+       IRIS=fullfile(tempdir(),'iris.dat');
+
+       if ~exist(IRIS,'file')
+               if exist('webread','file')     % available in Octave 6 or 7
+                       species = 
webread('http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data');
+                       fid=fopen(IRIS,'w'); fwrite(fid,species,'char'); 
fclose(fid);
+               elseif strncmp(computer,'PCWIN',5)     % on MXE-OCTAVE for 
Windows, wget is available
+                       fprintf(1,'Download 
http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data and 
save in under %s\nPress any key to continue ...\n',IRIS);
                else 
-                       system('wget 
http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data');
+                       system(['wget 
http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data -O 
',IRIS]);
                end;         
        end;      
 
        if exist('str2array','file')==3,
-               tmp = fopen('iris.data'); 
species=fread(tmp,[1,inf],'uint8=>char'); fclose(tmp); 
+               if ~exist('species','var')
+                       tmp = fopen(IRIS); 
species=fread(tmp,[1,inf],'uint8=>char'); fclose(tmp);
+               end
                [meas, tmp, species] = str2array(species,',');        
                meas = meas(1:150, 1:4);
                species = species(1:150, 5);
 
-       elseif exist('OCTAVE_VERSION', 'builtin'),
-               [a,b,c,d,species] = textread ('iris.data', '%f,%f,%f,%f,%s\n');
+       elseif exist('textread', 'file'),
+               [a,b,c,d,species] = textread (IRIS, '%f,%f,%f,%f,%s\n');
                meas = [a,b,c,d];
+               clear a b c d;
                if (size(meas,1)==151)
                        % remove empty line at the end
                        meas(151,:)=[];
                        species(151)=[];
                end
        else 
-               tmp  = fopen('iris.data'); 
species=fread(tmp,[1,inf],'uint8=>char'); fclose(tmp); 
-               [meas,tmp,species]=str2double(species,',');        
+               tmp  = fopen(IRIS); species=fread(tmp,[1,inf],'uint8=>char'); 
fclose(tmp);
+               [meas,tmp,species]=str2double(species,',');
                meas = meas(:,1:4);
                species = species(:,5);        
        end
@@ -59,7 +67,7 @@
         load fisheriris; 
 end; 
 
-%!test
+%!xtest
 %! load_fisheriris
 %! assert(all(size(meas)==[150,4]))
 %! assert(all(size(species)==[150,1]))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/ttest.m new/nan-3.5.2/inst/ttest.m
--- old/nan-3.5.0/inst/ttest.m  2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/inst/ttest.m  2020-10-31 17:44:32.000000000 +0100
@@ -146,7 +146,7 @@
   end
 
 %!test
-%! x = 8:0.1:12;
+%! x = [8:0.1:12,repmat(NaN,1,40)];
 %! [h, pval, ci] = ttest (x, 10);
 %! assert (h, 0)
 %! assert (pval, 1, 10*eps)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nan-3.5.0/inst/xcovf.m new/nan-3.5.2/inst/xcovf.m
--- old/nan-3.5.0/inst/xcovf.m  2020-07-12 23:58:03.000000000 +0200
+++ new/nan-3.5.2/inst/xcovf.m  2020-10-31 17:44:32.000000000 +0100
@@ -24,7 +24,6 @@
 %
 % see also: COVM, XCORR
 
-%      $Id$
 %      Copyright (C) 2005,2010,2011 by Alois Schloegl 
<[email protected]>       
 %       This function is part of the NaN-toolbox
 %       http://pub.ist.ac.at/~schloegl/matlab/NaN/
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to