Beispiel #1
0
# for a new algorithm only change the part which is marked as such

from __future__ import division
import numpy as np

# need load_save from '..'
import sys; sys.path.append('..')
from load_save import save_final_proposal, load_first_proposal

# load parameters
from final_run_params import params
locals().update(params)

# load proposal from mcmc
if type(first_proposal_index) is int:
    first_proposal = load_first_proposal(first_proposal_index)
elif type(first_proposal_index) is str:
    if first_proposal_index == 'good_original':
        if dim == 2:
            first_proposal = load_first_proposal(0)
        elif dim == 10:
            first_proposal = load_first_proposal(65)
        elif dim == 20:
            first_proposal = load_first_proposal(28)
        else:
            raise NotImplementedError('No such first proposal')

    elif first_proposal_index == 'bad_original':
        if dim == 10:
            first_proposal = load_first_proposal(52)
        elif dim == 20:
Beispiel #2
0
# for a new algorithm only change the part which is marked as such

from __future__ import division
import numpy as np

# need load_save from '..'
import sys; sys.path.append('..')
from load_save import save_final_proposal, load_first_proposal

# load parameters
from final_run_params import params
locals().update(params)

# load proposal from mcmc
if type(first_proposal_index) is int:
    first_proposal = load_first_proposal(first_proposal_index)
elif type(first_proposal_index) is str:
    if first_proposal_index == 'good_original':
        if dim == 2:
            first_proposal = load_first_proposal(7)
        elif dim == 10:
            first_proposal = load_first_proposal(28)
        elif dim == 20:
            first_proposal = load_first_proposal(45)
        else:
            raise NotImplementedError('No such first proposal')

    elif first_proposal_index == 'average_original':
        if dim == 2:
            first_proposal = load_first_proposal(1)
        elif dim == 10:
Beispiel #3
0
# for a new algorithm only change the part which is marked as such

from __future__ import division
import numpy as np

# need load_save from '..'
import sys; sys.path.append('..')
from load_save import save_final_proposal, load_first_proposal

# load parameters
from final_run_params import params
locals().update(params)

# load proposal from mcmc
if type(first_proposal_index) is int:
    first_proposal = load_first_proposal(first_proposal_index)
elif type(first_proposal_index) is str:
    if first_proposal_index == 'good_original':
        if dim == 2:
            first_proposal = load_first_proposal(3)
        elif dim == 10:
            first_proposal = load_first_proposal(79)
        elif dim == 20:
            first_proposal = load_first_proposal(283)
        else:
            raise NotImplementedError('No such first proposal')

    elif first_proposal_index == 'average_original':
        if dim == 2:
            first_proposal = load_first_proposal(8)
        elif dim == 10: