VegCurveFit.jl

VegCurveFit.nlminbFunction
nlminb(start, objective, ...; )

Arguments

  • args: Other parameters to objective, e.g. t, y, w, FUN

  • fevalmax, itermax: The default value in fortran is 200 and 150. But they

are set to 1000 at here.

Return

  • par
  • objective
  • convergence:
    • 0: convergent
    • 1: not convergent
  • iterations
  • evaluations

References

  1. David M. Gay (1990), Usage summary for selected optimization routines. Computing Science Technical Report 153, AT&T Bell Laboratories, Murray Hill.

  2. http://www.netlib.org/port/

Example

t = Array(1.0:8:366)
y = doubleLog_Beck(par, t)
ypred = doubleLog_Beck(par0, t)
par0 = [0.05, 0.6, 45, 0.1, 200, 0.2]
@time opt_par = nlminb(par0, goal!, doubleLog_Beck!, y, t, ypred, 
    feval_max = 1000, iter_max = 1000)
source
VegCurveFit.wBisquare_Kong2023Function
wBisquare(y, yfit, w; iter = 2, wmin, to_upper = true)

Arguments

  • iter : not used
  • options : currently ignored

Bad points

    1. under the yfit, in the growing season (yfit > 0.3 * A + ymin)

Examples

source
VegCurveFit.cal_diagFunction

retrieve the diagonal of the inverse of a banded matrix B

一种带状矩阵对角阵的快速算法,用于Whittaker smoother求解。

\[B = (U' * D * U) # Hutchinson 1985, Eq. 3.1 B^(-1) = B * U^(-1)' + (1 - U) * B^(-1) # Hutchinson 1985, Eq. 3.3\]

Arguments

  • U: A = L D L' = U' * D * U. Note U = L'!
U = [
  1 c₁ e₁ f₁ 0
  0 1  c₂ e₂ f₂
  0 0  1  c₃ e₃
  0 0  0  1  c₄
  0 0  0  0  1]
U2 = [
  c₁ e₁ f₁ 0
  c₂ e₂ f₂ 0
  c₃ e₃ 0  0
  c₄ 0  0  0 
  0  0  0  0 ]

Dongdong Kong, CUG, 2024-05-07

source
VegCurveFit.whit2_cvFunction

R version Whittaker Cross validation

Whittaker smoothing with second order differences Computation of the hat diagonal (Hutchinson and de Hoog, 1986)

  • In : data vector (y), weigths (w), smoothing parameter (lambda)
  • Out: list with smooth vector (z), hat diagonal (dhat)

#author: Gianluca Frasso and Paul HC Eilers, 2015

#references

  1. Gianluca Frasso and Paul HC Eilers, L- and V-curves for optimal smoothing, 2015
source
VegCurveFit.whit2Function
whit2(y::AbstractVector{T}, w::AbstractVector{T2}, lambda::Float64; include_cve=true)

z, cve = whit2(y, w;lambda=2.0) whit2(y, w; lambda) whit2(y, w; lambda)

source
VegCurveFit.whit2!Function

Second-order differences Whittaker-Henderson smoothing

LU decompose was used.

Ax = y A = LU, LUx = y let b = Ux, Lb = y

References

'Smoothing and interpolation with finite differences' Eilers P. H. C, 1994

source