Skip to content

Commit b738490

Browse files
committed
small improvements to bootstrap presentation
1 parent ebad40e commit b738490

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/load_results.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ function load_bootstrap(cat::String="synthetic", mitigation::Bool=false, latent:
206206
else
207207
output_path = joinpath(output_dir(cat), "bootstrap.csv")
208208
end
209-
output_path = output_dir(cat)
210-
_file = readdir(output_path)[contains.(readdir(output_path),"bootstrap")]
211-
_file = joinpath.(output_path, _file)
212-
df = CSV.File(_file) |> DataFrame
209+
df = CSV.read(output_path, DataFrame)
213210
return df
214211
end
215212

src/post_processing.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,13 @@ function aggregate_bs(
193193
df.data = [replace(x, "_" => " ") |> titlecase for x in df.data]
194194
replace!(df.model, "FluxEnsemble" => "Deep Ensemble", "FluxModel" => "MLP", "LogisticRegression" => "Linear")
195195
df.generator .= convert.(String, df.generator)
196-
replace!(df.generator, "Generic_conservative" => "Generic (γ=0.9)", "Generic" => "Generic (γ=0.5)", "REVISE" => "Latent")
196+
replace!(df.generator, "Generic_conservative" => "Generic (γ=0.9)", "Generic" => "Generic (γ=0.5)", "REVISE" => "Latent", "Latent_conservative" => "Latent (γ=0.9)")
197+
if any(df.generator .== "Latent (γ=0.9)")
198+
replace!(df.generator, "Latent" => "Latent (γ=0.5)")
199+
end
197200
select!(df, Not(:scope))
201+
select!(df, :name, :generator, Not(:name, :generator))
202+
sort!(df)
198203

199204
if !isnothing(backend)
200205
return tabulate_bs(df, backend, alpha; header, kwrgs...)

0 commit comments

Comments
 (0)