コード例 #1
0
ファイル: BET_script.py プロジェクト: User-zwj/BET
import bet.calculateP.simpleFunP as simpleFunP
import bet.calculateP.calculateP as calculateP
import bet.postProcess.plotP as plotP
import bet.postProcess.plotDomains as plotD
import bet.sample as samp
import bet.sampling.basicSampling as bsam
from myModel import my_model
from Compute_Save_KL import computeSaveKL

# Interface BET to the model.
sampler = bsam.sampler(my_model)

# Define the number of KL terms to use to represent permeability field
num_KL_terms = 2
# Compute and save the KL expansion -- can comment out after running once
computeSaveKL(num_KL_terms)

# Initialize input parameter sample set object
input_samples = samp.sample_set(num_KL_terms)

# Set parameter domain
KL_term_min = -3.0
KL_term_max = 3.0
input_samples.set_domain(
    np.repeat([[KL_term_min, KL_term_max]], num_KL_terms, axis=0))
'''
Suggested changes for user:

Try with and without random sampling.

If using regular sampling, try different numbers of samples
コード例 #2
0
import bet.calculateP.calculateP as calculateP
import bet.postProcess.plotP as plotP
import bet.postProcess.plotDomains as plotD
import bet.sample as samp
import bet.sampling.basicSampling as bsam
from lbModel import lb_model
from myModel import my_model
from Compute_Save_KL import computeSaveKL

# Interface BET to the model.
sampler = bsam.sampler(lb_model)

# Define the number of KL terms to use to represent permeability field
num_KL_terms = 2
# Compute and save the KL expansion -- can comment out after running once
computeSaveKL(num_KL_terms)

# Initialize input parameter sample set object
input_samples = samp.sample_set(num_KL_terms)

# Set parameter domain
KL_term_min = -3.0
KL_term_max = 3.0
input_samples.set_domain(np.repeat([[KL_term_min, KL_term_max]],
                                   num_KL_terms,
                                   axis=0))

'''
Suggested changes for user:

Try with and without random sampling.