Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
bc0adbee
Commit
bc0adbee
authored
Nov 09, 2020
by
Chris Jewell
Browse files
Added custom chunksize option
parent
4f17748d
Changes
1
Hide whitespace changes
Inline
Side-by-side
inference.py
View file @
bc0adbee
...
...
@@ -278,9 +278,9 @@ if __name__ == "__main__":
####################################
# MCMC Control
NUM_BURSTS
=
config
[
"mcmc"
][
"num_bursts"
]
NUM_BURST_SAMPLES
=
config
[
"mcmc"
][
"num_burst_samples"
]
NUM_EVENT_TIME_UPDATES
=
config
[
"mcmc"
][
"num_event_time_updates"
]
NUM_BURSTS
=
int
(
config
[
"mcmc"
][
"num_bursts"
]
)
NUM_BURST_SAMPLES
=
int
(
config
[
"mcmc"
][
"num_burst_samples"
]
)
NUM_EVENT_TIME_UPDATES
=
int
(
config
[
"mcmc"
][
"num_event_time_updates"
]
)
NUM_SAVED_SAMPLES
=
NUM_BURST_SAMPLES
*
NUM_BURSTS
# RNG stuff
...
...
@@ -299,9 +299,12 @@ if __name__ == "__main__":
os
.
path
.
expandvars
(
config
[
"output"
][
"results_dir"
]),
config
[
"output"
][
"posterior"
],
),
{
"theta"
:
samples
[
0
],
"xi"
:
samples
[
1
],
"events"
:
samples
[
2
]},
results
,
NUM_SAVED_SAMPLES
,
sample_dict
=
{
"theta"
:
(
samples
[
0
],
(
NUM_BURST_SAMPLES
,
1
)),
"xi"
:
(
samples
[
1
],
(
NUM_BURST_SAMPLES
,
1
)),
"events"
:
(
samples
[
2
],
(
NUM_BURST_SAMPLES
,
64
,
64
,
1
)),
},
results_dict
=
results
,
num_samples
=
NUM_SAVED_SAMPLES
,
)
posterior
.
_file
.
create_dataset
(
"initial_state"
,
data
=
initial_state
)
posterior
.
_file
.
create_dataset
(
"config"
,
data
=
yaml
.
dump
(
config
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment