{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/269","repository_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl","labels_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/269/comments","events_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/269/events","html_url":"https://github.com/JuliaMath/Interpolations.jl/pull/269","id":381515187,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNDY1Mjgz","number":269,"title":"[RFC] Add Hessians for ScaledInterpolation and tests","user":{"login":"dkarrasch","id":26658441,"node_id":"MDQ6VXNlcjI2NjU4NDQx","avatar_url":"https://avatars0.githubusercontent.com/u/26658441?v=4","gravatar_id":"","url":"https://api.github.com/users/dkarrasch","html_url":"https://github.com/dkarrasch","followers_url":"https://api.github.com/users/dkarrasch/followers","following_url":"https://api.github.com/users/dkarrasch/following{/other_user}","gists_url":"https://api.github.com/users/dkarrasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dkarrasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkarrasch/subscriptions","organizations_url":"https://api.github.com/users/dkarrasch/orgs","repos_url":"https://api.github.com/users/dkarrasch/repos","events_url":"https://api.github.com/users/dkarrasch/events{/privacy}","received_events_url":"https://api.github.com/users/dkarrasch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-11-16T09:27:16Z","updated_at":"2018-11-18T15:50:08Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/pulls/269","html_url":"https://github.com/JuliaMath/Interpolations.jl/pull/269","diff_url":"https://github.com/JuliaMath/Interpolations.jl/pull/269.diff","patch_url":"https://github.com/JuliaMath/Interpolations.jl/pull/269.patch"},"body":"This adds `hessian` functionality to `ScaledInterpolation`s. The inference issue seems to be due to `symmatrix`, as far as I can tell, but inference hasn't been tested on `hessian` for `BSplineInterpolation` either, so that may not be too bad.\r\n\r\nThe current implementation avoids unnecessary (by symmetry) rescaling operations and allocation of arrays (as would have been necessary in any recursive implementation I could come up with).\r\n\r\nEDIT: (sort of) fixes #268."},"comment":{"url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/comments/439702729","html_url":"https://github.com/JuliaMath/Interpolations.jl/pull/269#issuecomment-439702729","issue_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/269","id":439702729,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTcwMjcyOQ==","user":{"login":"dkarrasch","id":26658441,"node_id":"MDQ6VXNlcjI2NjU4NDQx","avatar_url":"https://avatars0.githubusercontent.com/u/26658441?v=4","gravatar_id":"","url":"https://api.github.com/users/dkarrasch","html_url":"https://github.com/dkarrasch","followers_url":"https://api.github.com/users/dkarrasch/followers","following_url":"https://api.github.com/users/dkarrasch/following{/other_user}","gists_url":"https://api.github.com/users/dkarrasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dkarrasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkarrasch/subscriptions","organizations_url":"https://api.github.com/users/dkarrasch/orgs","repos_url":"https://api.github.com/users/dkarrasch/repos","events_url":"https://api.github.com/users/dkarrasch/events{/privacy}","received_events_url":"https://api.github.com/users/dkarrasch/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T15:50:08Z","updated_at":"2018-11-18T15:50:08Z","author_association":"NONE","body":"Many thanks, @timholy. Regarding the boundary accuracy, what confused me is the fact that the true functions do match the boundary conditions of the interpolant:\r\n```\r\nxs = -pi:2pi/10:pi\r\nf1(x) = sin(x)\r\nf2(x) = cos(x)\r\nf3(x) = sin(x) .* cos(x)\r\nf(x,y) = y == 1 ? f1(x) : (y == 2 ? f2(x) : (y == 3 ? f3(x) : error(\"invalid value for y (must be 1, 2 or 3, you used $y)\")))\r\nys = 1:3\r\nA = hcat(map(f1, xs), map(f2, xs), map(f3, xs))\r\nitp = interpolate(A, (BSpline(Cubic(Periodic(OnGrid()))), NoInterp()))\r\nsitp = scale(itp, xs, ys)\r\n```\r\nI realized that this is a boundary-only issue after plotting the interpolation-hessian versus the analytical one. In the interior, they match really well, but close to the periodic boundary, there is some ridiculous zigzag-pattern, way off of what it should be."}}
{"actor":{"display_login":"dkarrasch"}}