Hello community,
here is the log from the commit of package octave-forge-splines for
openSUSE:Factory checked in at 2017-01-29 10:36:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-splines (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-splines.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-splines"
Changes:
--------
---
/work/SRC/openSUSE:Factory/octave-forge-splines/octave-forge-splines.changes
2016-06-09 16:17:13.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.octave-forge-splines.new/octave-forge-splines.changes
2017-02-03 17:51:59.483503247 +0100
@@ -1,0 +2,6 @@
+Sun Jan 1 12:01:00 UTC 2017 - [email protected]
+
+- Update to version 1.3.2
+ * Bug fixes
+
+-------------------------------------------------------------------
Old:
----
splines-1.3.1.tar.gz
New:
----
splines-1.3.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-splines.spec ++++++
--- /var/tmp/diff_new_pack.ytjdsn/_old 2017-02-03 17:52:00.043424300 +0100
+++ /var/tmp/diff_new_pack.ytjdsn/_new 2017-02-03 17:52:00.047423736 +0100
@@ -1,7 +1,7 @@
#
# spec file for package octave-forge-splines
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%define octpkg splines
Name: octave-forge-%{octpkg}
-Version: 1.3.1
+Version: 1.3.2
Release: 0
Summary: Additional spline functions for Octave
License: GPL-2.0+ and GPL-3.0+ and SUSE-Public-Domain
@@ -31,7 +31,7 @@
%description
Additional spline functions.
-This is part of Octave-Forge project.
+This is part of the Octave-Forge project.
%prep
%setup -q -c %{name}-%{version}
++++++ splines-1.3.1.tar.gz -> splines-1.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/splines/CITATION new/splines-1.3.2/CITATION
--- old/splines/CITATION 2016-06-02 15:12:06.000000000 +0200
+++ new/splines-1.3.2/CITATION 2016-12-13 15:09:28.274576750 +0100
@@ -2,6 +2,6 @@
author = {Krakauer, Nir Y. and others},
title = {Splines Package for GNU Octave},
url = {http://octave.sourceforge.net/splines},
- version = {1.2.9},
- date = {2015-11-28},
+ version = {1.3.2},
+ date = {2016-11-23},
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/splines/DESCRIPTION new/splines-1.3.2/DESCRIPTION
--- old/splines/DESCRIPTION 2016-06-02 15:12:06.000000000 +0200
+++ new/splines-1.3.2/DESCRIPTION 2016-12-13 15:09:28.274576750 +0100
@@ -1,8 +1,8 @@
Name: splines
-Version: 1.3.1
-Date: 2016-06-02
+Version: 1.3.2
+Date: 2016-11-23
Author: various authors
-Maintainer: Nir Krakauer <[email protected]>
+Maintainer: Nir Krakauer <[email protected]>
Title: Splines.
Description: Additional spline functions.
Categories: Splines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/splines/NEWS new/splines-1.3.2/NEWS
--- old/splines/NEWS 2016-06-02 15:12:06.000000000 +0200
+++ new/splines-1.3.2/NEWS 2016-12-13 15:09:28.274576750 +0100
@@ -1,6 +1,12 @@
Summary of important user-visible changes for splines x.x.x:
-------------------------------------------------------------------
+
+Summary of important user-visible changes for splines 1.3.2:
+-------------------------------------------------------------------
+
+ ** bug fix in csaps
+
Summary of important user-visible changes for splines 1.3.1:
-------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/splines/inst/csaps.m new/splines-1.3.2/inst/csaps.m
--- old/splines/inst/csaps.m 2016-06-02 15:12:06.000000000 +0200
+++ new/splines-1.3.2/inst/csaps.m 2016-12-13 15:09:28.278576709 +0100
@@ -18,9 +18,9 @@
## @deftypefnx{Function File}{[@var{pp} @var{p} @var{sigma2}] =}
csaps(@var{x}, @var{y}, @var{p}, [], @var{w}=[])
##
## Cubic spline approximation (smoothing)@*
-## approximate [@var{x},@var{y}], weighted by @var{w} (inverse variance; if
not given, equal weighting is assumed), at @var{xi}
+## approximate [@var{x},@var{y}], weighted by @var{w} (inverse variance of the
@var{y} values; if not given, equal weighting is assumed), at @var{xi}
##
-## The chosen cubic spline with natural boundary conditions @var{pp}(@var{x})
minimizes @var{p} Sum_i @var{w}_i*(@var{y}_i - @var{pp}(@var{x}_i))^2 +
(1-@var{p}) Int @var{pp}''(@var{x}) d@var{x}
+## The chosen cubic spline with natural boundary conditions @var{pp}(@var{x})
minimizes @var{p} * Sum_i @var{w}_i*(@var{y}_i - @var{pp}(@var{x}_i))^2 +
(1-@var{p}) * Int @var{pp}''(@var{x}) d@var{x}
##
## Outside the range of @var{x}, the cubic spline is a straight line
##
@@ -32,7 +32,9 @@
## @item @var{p}=1
## no smoothing: interpolation
## @item @var{p}<0 or not given
-## an intermediate amount of smoothing is chosen (such that the
smoothing term and the interpolation term are of the same magnitude)
+## an intermediate amount of smoothing is chosen @*
+## and the corresponding @var{p} between 0 and 1 is returned @*
+## (such that the smoothing term and the interpolation term are of the
same magnitude) @*
## (csaps_sel provides other methods for automatically selecting the
smoothing parameter @var{p}.)
## @end table
##
@@ -43,10 +45,13 @@
##
## @var{df} is an estimate of the degrees of freedom used in the spline fit (2
for @var{p}=0, n for @var{p}=1)
##
-## Reference: Carl de Boor (1978), A Practical Guide to Splines, Springer,
Chapter XIV
+##
+## References: @*
+## Carl de Boor (1978), A Practical Guide to Splines, Springer, Chapter XIV @*
+## Grace Wahba (1983), Bayesian ``confidence intervals'' for the
cross-validated smoothing spline, Journal of the Royal Statistical Society,
45B(1):133-150
##
## @end deftypefn
-## @seealso{spline, csapi, ppval, dedup, bin_values, csaps_sel}
+## @seealso{spline, splinefit, csapi, ppval, dedup, bin_values, csaps_sel}
## Author: Nir Krakauer <[email protected]>
@@ -87,7 +92,7 @@
end
- R = spdiags([h(2:end) 2*(h(1:end-1) + h(2:end)) h(1:end-1)], [-1 0 1], n-2,
n-2); #this is the correct expression
+ R = spdiags([h(2:end) 2*(h(1:end-1) + h(2:end)) h(1:end-1)], [-1 0 1], n-2,
n-2);
QT = spdiags([1 ./ h(1:end-1) -(1 ./ h(1:end-1) + 1 ./ h(2:end)) 1 ./
h(2:end)], [0 1 2], n-2, n);
@@ -97,7 +102,8 @@
p = r ./ (1 + r);
endif
-## solve for the scaled second derivatives u and for the function values a at
the knots (if p = 1, a = y; if p = 0, cc(:) = dd(:) = 0)
+## solve for the scaled second derivatives u and for the function values a at
the knots
+## (if p = 1, a = y; if p = 0, cc(:) = dd(:) = 0)
## QT*y can also be written as (y(3:n, :) - y(2:(n-1), :)) ./ h(2:end) -
(y(2:(n-1), :) - y(1:(n-2), :)) ./ h(1:(end-1))
u = (6*(1-p)*QT*diag(1 ./ w)*QT' + p*R) \ (QT*y);
a = y - 6*(1-p)*diag(1 ./ w)*QT'*u;
@@ -122,7 +128,7 @@
aa(1, :) = a(1, :) - dx_minus*bb(1, :);
ret = mkpp (x, cat (2, dd'(:)/6, cc'(:)/2, bb'(:), aa'(:)), m);
- clear a aa bb cc dd slope_minus slope_plus u #no longer needed
+ clear a aa bb cc dd slope_minus slope_plus u #these values are no longer
needed
if ~isempty (xi)
ret = ppval (ret, xi);
@@ -139,17 +145,17 @@
if isargout (4) && ~isempty (xi)
unc_yi = zeros(numel(xi), 1);
endif
- break
+ df = n;
+ return
endif
- [U D V] = svd(diag(1 ./ sqrt(w))*QT'*sqrtm(inv(R)), 0); D = diag(D).^2;
+ [U D V] = svd (diag(1 ./ sqrt(w))*QT'*sqrtm(inv(R)), 0); D = diag(D).^2;
#influence matrix for given p
A = speye(n) - U * diag(D ./ (D + (p / (6*(1-p))))) * U';
- A = diag(1 ./ sqrt(w)) * A * diag(sqrt(w)); #rescale to original units; a
= A*y
- MSR = mean(w .* (y - (A*y)) .^ 2); #mean square residual
- Ad = diag(A);
- df = trace(A);
- sigma2 = mean(MSR(:)) * (n / (n-df)); #estimated data error variance
(wahba83)
+ A = diag (1 ./ sqrt(w)) * A * diag(sqrt(w)); #rescale to original units; a
= A*y
+ MSR = mean (w .* (y - (A*y)) .^ 2); #mean square residual
+ df = trace (A);
+ sigma2 = mean (MSR(:)) * (n / (n-df)); #estimated data error variance
(wahba83)
if isargout (4) && ~isempty (xi)
ni = numel (xi);
@@ -174,15 +180,23 @@
endfunction
-%!shared x,y, xi
-%! x = ([1:10 10.5 11.3])'; y = sin(x); xi = linspace(min(x), max(x), 30);
+%!shared x,y,xi,yi,p,sigma2,unc_yi,df
+%! x = ([1:10 10.5 11.3])'; y = sin(x); xi = linspace(min(x), max(x), 30)';
%!assert (csaps(x,y,1,x), y, 10*eps);
%!assert (csaps(x,y,1,x'), y', 10*eps);
%!assert (csaps(x',y',1,x'), y', 10*eps);
%!assert (csaps(x',y',1,x), y, 10*eps);
%!assert (csaps(x,[y 2*y],1,x)', [y 2*y], 10*eps);
-%!assert (csaps(x,y,1,xi), ppval(csape(x, y, "variational"), xi), eps);
-%!assert (csaps(x,y,0,xi), polyval(polyfit(x, y, 1), xi), 10*eps);
+%! [yi,p,sigma2,unc_yi,df] = csaps(x,y,1,xi);
+%!assert (yi, ppval(csape(x, y, "variational"), xi), eps);
+%!assert (p, 1);
+%!assert (unc_yi, zeros(size(xi)));
+%!assert (sigma2, 0);
+%!assert (df, numel(x));
+%! [yi,p,~,~,df] = csaps(x,y,0,xi);
+%!assert (yi, polyval(polyfit(x, y, 1), xi), 10*eps);
+%!assert (p, 0);
+%!assert (df, 2, 100*eps);
%{
test weighted smoothing:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/splines/inst/tpaps.m new/splines-1.3.2/inst/tpaps.m
--- old/splines/inst/tpaps.m 2016-06-02 15:12:06.000000000 +0200
+++ new/splines-1.3.2/inst/tpaps.m 2016-12-13 15:09:28.282576667 +0100
@@ -152,7 +152,7 @@
%!shared x,y
%! x = ([1:10 10.5 11.3])'; y = sin(x);
-%!assert (tpaps(x,y,1,x), y, 1E-13);
+%!assert (tpaps(x,y,1,x), y, 1E3*eps);
%! x = rand(100, 2)*2 - 1;
%! y = x(:, 1) .^ 2 + x(:, 2) .^ 2;
%!assert (tpaps(x,y,1,x), y, 1E-10);