diff --git a/docs/src/methods.md b/docs/src/methods.md index edc6d2e6..b0e052d5 100644 --- a/docs/src/methods.md +++ b/docs/src/methods.md @@ -42,7 +42,7 @@ plot!(A) ## Lagrange Interpolation -It fits polynomial of degree d (=length(t)-1), and is thuse a continuously +It fits polynomial of degree d (=length(t)-1), and is thus a continuously differentiable function. ```@example tutorial @@ -174,7 +174,7 @@ spaced, unordered, and/or repeat-valued). Generalized cross validation (GCV) or so-called L-curve methods can be used to determine an "optimal" value for the smoothing parameter. In this example, we perform smoothing in two ways. In the first, we find smooth values at the original ``t`` values and then -interpolate. In the second, we perform the smoothing for the interpolatant +interpolate. In the second, we perform the smoothing for the interpolant ``\hat{t}`` values directly. GCV is used to determine the regularization parameter for both cases. diff --git a/ext/DataInterpolationsRegularizationToolsExt.jl b/ext/DataInterpolationsRegularizationToolsExt.jl index a0ab2cae..fe5e7d75 100644 --- a/ext/DataInterpolationsRegularizationToolsExt.jl +++ b/ext/DataInterpolationsRegularizationToolsExt.jl @@ -45,7 +45,7 @@ const LA = LinearAlgebra derivative (i.e. the curvature) of the data is used to calculate roughness. # Keyword Arguments -- `λ::{Number,Tuple} = 1.0`: regulariation parameter; larger values result in a smoother +- `λ::{Number,Tuple} = 1.0`: regularization parameter; larger values result in a smoother curve; the provided value is used directly when `alg = :fixed`; otherwise it is used as an initial guess for the optimization method, or as bounds if a 2-tuple is provided (TBD) @@ -179,7 +179,7 @@ end # function RegularizationSmooth(u::AbstractVector, t::AbstractVector, t̂::AbstractVector, # wls::Symbol, d::Int=2; λ::Real=1.0, alg::Symbol=:gcv_svd) -""" Solve for the smoothed depedent variables and create spline interpolator """ +""" Solve for the smoothed dependent variables and create spline interpolator """ function _reg_smooth_solve(u::AbstractVector, t̂::AbstractVector, d::Int, M::AbstractMatrix, Wls½::AbstractMatrix, Wr½::AbstractMatrix, λ::Real, alg::Symbol) λ = float(λ) # `float` expected by RT diff --git a/src/DataInterpolations.jl b/src/DataInterpolations.jl index 83f6c4d4..d97f0aba 100644 --- a/src/DataInterpolations.jl +++ b/src/DataInterpolations.jl @@ -90,7 +90,7 @@ end end end -# Define an empty fucntion, so that it can be extended via `DataInterpolationsOptimExt` +# Define an empty function, so that it can be extended via `DataInterpolationsOptimExt` Curvefit() = error("CurveFit requires loading Optim, e.g. `using Optim`") export Curvefit diff --git a/src/interpolation_utils.jl b/src/interpolation_utils.jl index 17bae864..acdccb24 100644 --- a/src/interpolation_utils.jl +++ b/src/interpolation_utils.jl @@ -69,7 +69,7 @@ v[hi]` according to the specified order, assuming that `x` is actually within th values found in `v`. If `x` is outside that range, either `lo` will be `firstindex(v)` or `hi` will be `lastindex(v)`. -Note that the results will not typically satify `lo ≤ guess ≤ hi`. If `x` is precisely +Note that the results will not typically satisfy `lo ≤ guess ≤ hi`. If `x` is precisely equal to a value that is not unique in the input `v`, there is no guarantee that `(lo, hi)` will encompass *all* indices corresponding to that value. diff --git a/src/plot_rec.jl b/src/plot_rec.jl index d801bfa5..307e56b2 100644 --- a/src/plot_rec.jl +++ b/src/plot_rec.jl @@ -202,7 +202,7 @@ end end ######################################## -# Akima intepolation # +# Akima interpolation # ######################################## @recipe function f(::Type{Val{:akima}}, diff --git a/test/interpolation_tests.jl b/test/interpolation_tests.jl index 28ccdce4..9062d7f8 100644 --- a/test/interpolation_tests.jl +++ b/test/interpolation_tests.jl @@ -129,7 +129,7 @@ import ForwardDiff # Test derivative at point gives derivative to the right (except last is to left): ts = t[begin:(end - 1)] @test dA.(ts) == dA.(ts .+ 0.5) - # Test last derivitive is to the left: + # Test last derivative is to the left: @test dA(last(t)) == dA(last(t) - 0.5) # Test array-valued interpolation @@ -537,7 +537,7 @@ A = QuadraticInterpolation(u, t) @test A(3.5) == [12.25, 12.25] @test A(2.5) == [6.25, 6.25] -# ForwardDiff compatibility with respect to cofficients +# ForwardDiff compatibility with respect to coefficients function square(INTERPOLATION_TYPE, c) # elaborate way to write f(x) = x² xs = -4.0:2.0:4.0