Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #191

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions ext/DataInterpolationsRegularizationToolsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/DataInterpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/interpolation_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/plot_rec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ end
end

########################################
# Akima intepolation #
# Akima interpolation #
########################################

@recipe function f(::Type{Val{:akima}},
Expand Down
4 changes: 2 additions & 2 deletions test/interpolation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down