Skip to content
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
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version = "0.3.0"
[deps]
CovarianceSelection = "fb9f034c-9bf8-4e47-a0a4-723273363029"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
ProximalBase = "0a755509-c5b1-5d6f-9b24-59bcda3c37a3"
ProximalSolvers = "fc4971f5-6616-4709-9bfc-89a819252f6b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand All @@ -24,6 +25,7 @@ CovarianceSelection = "0.1"
Ipopt = "1"
JuMP = "1"
LinearAlgebra = "1"
PrecompileTools = "1"
ProximalBase = "0.5"
ProximalSolvers = "0.1"
Random = "1"
Expand Down
7 changes: 1 addition & 6 deletions src/DiffPrecTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,6 @@ function estimate(
DiffPrecResultNormal(Δab, sqrt(v))
end







include("precompile.jl")

end
25 changes: 25 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
####################################
#
# Precompilation
#
####################################

# The estimators' first calls, compiled into the package image. PrecompileTools
# runs this workload when the package is precompiled; the preference
# `precompile_workload = false` skips it.
using PrecompileTools: @setup_workload, @compile_workload

@setup_workload begin
p, n = 5, 300
Σy = [0.5^abs(i - j) for i in 1:p, j in 1:p]
X = randn(Xoshiro(1), n, p)
Y = randn(Xoshiro(2), n, p) * cholesky(Σy).U
@compile_workload begin
estimate(SymmetricNormal(), X, Y, 2, 1)
estimate(AsymmetricNormal(), X, Y, 2, 1)
estimate(SeparateNormal(), X, Y, 2, 1)
estimate(ReducedNormal(), X, Y, tril_index(p, 2, 1))
straps, = bootstrap(X, Y; bootSamples = 2)
simulCIstudentized(straps, 0.95)
end
end
Loading