Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify dataframe constructor script
Browse files Browse the repository at this point in the history
SamuelBrand1 committed Jul 25, 2024
1 parent 9fb606a commit 84fc84b
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -23,11 +23,18 @@ epi_datas = map(gi_params["gi_means"]) do μ
Gamma(shape, scale)
end .|> gen_dist -> EpiData(gen_distribution = gen_dist)

## Calculate the prediction dataframe
prediction_df = mapreduce(vcat, files) do filename
## Calculate the prediction and scoring dataframes
double_vcat = (dfs1, dfs2) -> (vcat(dfs1[1], dfs2[1]),
vcat(dfs1[2], dfs2[2]))

dfs = mapreduce(double_vcat, xs) do filename
output = load(joinpath(datadir("epiaware_observables"), filename))
make_prediction_dataframe_from_output(filename, output, epi_datas, pipelines)
(
make_prediction_dataframe_from_output(filename, output, epi_datas, pipelines),
make_scoring_dataframe_from_output(filename, output, epi_datas, pipelines)
)
end

## Save the prediction dataframe
CSV.write(plotsdir("analysis_df.csv"), prediction_df)
## Save the prediction and scoring dataframes
CSV.write(plotsdir("analysis_df.csv"), dfs[1])
CSV.write(plotsdir("scoring_df.csv"), dfs[2])

0 comments on commit 84fc84b

Please sign in to comment.