Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase the number of burn-in steps #65

Merged
merged 8 commits into from
Aug 22, 2018
Merged

increase the number of burn-in steps #65

merged 8 commits into from
Aug 22, 2018

Conversation

erikbern
Copy link
Contributor

noticed it makes a huge difference

dim, nwalkers, i+1, nburnin+nsteps))
sys.stdout.flush()
sys.stdout.write('\n')
result['samples'] = sampler.chain[:, nburnin:, :].reshape((-1, dim)).T

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

data = x0
sys.stdout.write('\n')
for i, _ in enumerate(sampler.sample(p0, iterations=nburnin+nsteps)):
sys.stdout.write('MCMC in %d dimensions with %d walkers: %6d/%-6d\r' % (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

else:
data = x0
sys.stdout.write('\n')
for i, _ in enumerate(sampler.sample(p0, iterations=nburnin+nsteps)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

@erikbern
Copy link
Contributor Author

Will rebase this on #66 and #67

print('\n')
sys.stdout.write('\n')
for i, _ in enumerate(sampler.sample(p0, iterations=nburnin+nsteps)):
sys.stdout.write('MCMC in %d dimensions with %d walkers: %6d/%-6d\r' % (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

sampler.run_mcmc(p0, nburnin+nsteps)
print('\n')
sys.stdout.write('\n')
for i, _ in enumerate(sampler.sample(p0, iterations=nburnin+nsteps)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

@erikbern erikbern mentioned this pull request Aug 21, 2018
@@ -205,6 +209,8 @@ def fit(self, X, B, T, W=None, fix_k=None, fix_p=None):
sys.stdout.write('\n')
result['samples'] = sampler.chain[:, n_burnin:, :] \
.reshape((-1, dim)).T
if fix_k: result['samples'][0, :] = log(fix_k)
if fix_p: result['samples'][1, :] = log(fix_p)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

@@ -205,6 +209,8 @@ def fit(self, X, B, T, W=None, fix_k=None, fix_p=None):
sys.stdout.write('\n')
result['samples'] = sampler.chain[:, n_burnin:, :] \
.reshape((-1, dim)).T
if fix_k: result['samples'][0, :] = log(fix_k)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

@@ -181,6 +181,10 @@ def fit(self, X, B, T, W=None, fix_k=None, fix_p=None):
)
result = {'map': res.x}

# TODO: should not use fixed k/p as search parameters
if fix_k: result['map'][0] = log(fix_k)
if fix_p: result['map'][1] = log(fix_p)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

@@ -181,6 +181,10 @@ def fit(self, X, B, T, W=None, fix_k=None, fix_p=None):
)
result = {'map': res.x}

# TODO: should not use fixed k/p as search parameters
if fix_k: result['map'][0] = log(fix_k)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

# Callback for progress to stdout
n_iterations = [0] # Dumb hack to make the scope right
sys.stdout.write('\n')
def callback(x):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 1 blank line before a nested definition, found 0

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 95.584% when pulling 656f6ea on burnin into b5bbdaa on master.

@coveralls
Copy link

coveralls commented Aug 22, 2018

Coverage Status

Coverage increased (+0.2%) to 95.652% when pulling 357854c on burnin into b5bbdaa on master.

@erikbern erikbern merged commit 743e811 into master Aug 22, 2018
@erikbern erikbern deleted the burnin branch August 22, 2018 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants