Skip to content

Commit

Permalink
Update SimTools.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jiewenTsai committed Dec 25, 2024
1 parent cbb4939 commit 9af60f5
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/SimTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,18 @@ end
"""
"""
function getMetrics(object; par=:a)
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)]
if par == ()
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)][2:end]
end
else
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)]
end
end

Metrics = (
Expand All @@ -518,10 +526,18 @@ end
"""
"""
function getMetrics2(object; par=:a)
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)]
if par == ()
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)][2:end]
end
else
vectorTrue = object[:True][Symbol(par)]
vectorEsti = Array{Any}(undef, length(vectorTrue), 100)
for i in 1:100
vectorEsti[:,i] = object[i][Symbol(par)]
end
end

Metrics = (
Expand Down

0 comments on commit 9af60f5

Please sign in to comment.