Skip to content

Commit

Permalink
rename plateau to truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed Aug 14, 2023
1 parent e0ed8f7 commit 564ecc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function logit!(v)
end
end

function plateau!(v::AbstractVector, ps_lowerbound)
function truncate!(v::AbstractVector, ps_lowerbound)
for i in eachindex(v)
v[i] = max(v[i], ps_lowerbound)
end
Expand Down Expand Up @@ -167,7 +167,7 @@ function balancing_weights(scm::SCM, W, T; ps_lowerbound=1e-8)
= MLJBase.predict(mach, W[colname])
density .*= pdf.(ŷ, Tables.getcolumn(T, colname))
end
plateau!(density, ps_lowerbound)
truncate!(density, ps_lowerbound)
return 1. ./ density
end

Expand Down

0 comments on commit 564ecc5

Please sign in to comment.