Skip to content

Commit

Permalink
fix typos (#56)
Browse files Browse the repository at this point in the history
* typos

* reword
  • Loading branch information
spaette committed Jun 24, 2023
1 parent 647a20e commit 5305648
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ r = densratiofunc(x_nu, x_de, KLIEP())

### Hyperparameter tuning

Methods like `KLIEP` are equiped with tuning strategies, and its hyperparameters
Methods like `KLIEP` are equipped with tuning strategies, and its hyperparameters
can be found using the following line:

```julia
Expand Down
2 changes: 1 addition & 1 deletion ext/DensityRatioEstimationGPUArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
end
using LinearAlgebra

# Aviod `mat + a * I` with CUDA which involes scalar operations and is slow
# Avoid `mat + a * I` with CUDA which involves scalar operations and is slow
function DensityRatioEstimation.safe_diagm(mat::M, a::T) where {M<:GPUArrays.AbstractGPUArray{T,2}} where {T}
diag = similar(mat, size(m, 1))
fill!(diag, a)
Expand Down
2 changes: 1 addition & 1 deletion src/kmm/jump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function DensityRatioEstimation._kmm_ratios(K, κ, dre::KMM, optlib::Type{JuMPLi
# build the problem without constraints
model, β = _kmm_jump_model(K, κ, dre, optlib)

# adding constriants
# adding constraints
@constraint(model, 0 .≤ β)
isinf(B) || @constraint(model, β .≤ B)
@constraint(model, (1 - ϵ) mean(β) (1 + ϵ))
Expand Down
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ gaussian_gramian(esq, σ::AbstractFloat) = exp.(-esq ./ 2σ^2)
safe_diagm(mat, a)
Generate a squared matrix whose diagonal is `a` that is
compatible to perform addition on `mat`. It hebaves
differently based on `mat` is on CPU or GPU.
compatible to perform addition on `mat`. It behaves
differently based on whether `mat` is on a CPU or GPU.
It is compatible with
- CuArrays.jl (see lib/cuarrays.jl)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ islinux = Sys.islinux()
visualtests = !isCI || (isCI && islinux)
datadir = joinpath(@__DIR__, "data")

# helper funcions
# helper functions
include("utils.jl")

# simple cases for testing
Expand Down

0 comments on commit 5305648

Please sign in to comment.