Commit dcf8e380 authored by Villez, Kris's avatar Villez, Kris
Browse files

Correct default input for __init__ method

Correct docstring for __init__ method
parent 39e0dee0
......@@ -38,7 +38,7 @@ class SliceSampler(univariate_sampler.UnivariateSliceSampler):
def __init__(self, *, log_likelihood_function, initial_sample=np.array(0),
......@@ -50,7 +50,7 @@ class SliceSampler(univariate_sampler.UnivariateSliceSampler):
:param initial_sample: initial sample (x)
:param adaptation_interval: number of samples between adaptation of the covariance matrix (0 for no updates)
:param direction_method: method to sample in multivariate space, either
"univar_random" (sample one random direction according of the covariance matrix for one sample) or
"random_eigen" (sample one random direction according of the covariance matrix for one sample) or
"univar_eigen" (univariate updates along every eigenvector of the covariance matrix for one sample)
:param expansion_method: method to expand sampling interval (either 'fixed', 'double', or 'step_out')
:param expansion_limit: maximum number of expansions of sampling interval for one new sample, only relevant if
#!/usr/bin/env python
import sys
import numpy as np
import warnings
......@@ -99,6 +99,10 @@ class UnivariateSliceSampler:
log_likelihood_seq = np.append(log_likelihood_seq, log_likelihood_value)
sample_index += 1
iFrac = int(np.round((sample_index) / number_of_samples * 100))
sys.stdout.write("\r{0}>".format("=" * iFrac) + " " + str(iFrac) + "% (" +
str(sample_index) + " of " + str(number_of_samples) + ")")
return sample_sequence, log_likelihood_seq
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment