Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Kunzmann committed Jan 22, 2020
1 parent ceb6d89 commit 5c4cbdf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/estimators/CompatibleMLE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ function (estimator::CompatibleMLE)(x1::TI, x2::TI, design::TD) where {TI<:Integ
error("(x1,x2) not found in sample space, valid observation?")
end

function CompatibleMLE(design::TD; verbosity = 0, λ = .5, ϵ = 1e-4, smoothmax_scale = 10., max_iter = 10^4) where {TD<:AbstractDesign}
function CompatibleMLE(design::TD; verbosity = 0, lambda = .5, epsilon = 1e-4, smoothmax_scale = 10., max_iter = 10^4) where {TD<:AbstractDesign}

λ = lambda
ϵ = epsilon
@assert (0 <= verbosity <= 5) "Ipopt takes levels between 0 and 5"
XX = sample_space(design)
# precompute test decisions and get indices for rejection/non-rejection
Expand Down
3 changes: 2 additions & 1 deletion src/interval-estimators/ClopperPearsonInterval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ end

string(ci::ClopperPearsonInterval) = @sprintf "ClopperPearsonInterval<%s>" string(ci.ordering)

function ClopperPearsonInterval(ordering::Ordering, design::AbstractDesign, α::Real; ϵ = 1e-6)
function ClopperPearsonInterval(ordering::Ordering, design::AbstractDesign, α::Real; epsilon = 1e-6)

ϵ = epsilon
XX = sample_space(design)
nn = size(XX, 1)

Expand Down
3 changes: 2 additions & 1 deletion src/interval-estimators/PosteriorCredibleInterval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ end
string(ci::PosteriorCredibleInterval) = @sprintf "PosteriorCredibleInterval<%s>" string(ci.prior)


function PosteriorCredibleInterval(prior::Prior, design::AbstractDesign, α::Real; ϵ = 1e-4)
function PosteriorCredibleInterval(prior::Prior, design::AbstractDesign, α::Real; epsilon = 1e-4)

ϵ = epsilon
XX = sample_space(design)
nn = size(XX, 1)

Expand Down
2 changes: 1 addition & 1 deletion test/test_point-estimators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ for (pnull, palt) in [(pnull, pnull + .2) for pnull in 0.1:.1:.7]

for psamplesize in (pnull, palt)
design = get_design(psamplesize, pnull, palt)
cmle = CompatibleMLE(design; λ = .25)
cmle = CompatibleMLE(design; lambda = .25)
if !compatible(EstimatorOrdering(cmle), design, pnull, α)["compatible"]
global tmp = design, pnull, palt, psamplesize
end
Expand Down

0 comments on commit 5c4cbdf

Please sign in to comment.