Skip to content

Commit

Permalink
File rename
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap committed Apr 9, 2022
1 parent 6f73dc6 commit f1d626c
Show file tree
Hide file tree
Showing 49 changed files with 125 additions and 125 deletions.
2 changes: 1 addition & 1 deletion docs/code/RunModel/abaqus_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import time

from UQpy.distributions import Normal, Uniform
from UQpy.run_model.RunModel_New import *
from UQpy.run_model.RunModel import *
from UQpy.sampling import MonteCarloSampling

calling_directory = os.getcwd()
Expand Down
2 changes: 1 addition & 1 deletion docs/code/RunModel/ls_dyna_example_multijob.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# %%
from UQpy.distributions import Uniform
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.sampling import MonteCarloSampling

# %% md
Expand Down
2 changes: 1 addition & 1 deletion docs/code/RunModel/ls_dyna_example_singlejob.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# %%
from UQpy.distributions import Uniform
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.sampling import MonteCarloSampling

# %% md
Expand Down
2 changes: 1 addition & 1 deletion docs/code/RunModel/matlab_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
# %%

from UQpy.sampling import MonteCarloSampling
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Normal
import time
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion docs/code/RunModel/opensees_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import numpy as np

from UQpy.distributions import Uniform
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.sampling import MonteCarloSampling

# %% md
Expand Down
2 changes: 1 addition & 1 deletion docs/code/RunModel/python_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# %%

from UQpy.sampling import MonteCarloSampling
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Normal
import time
import numpy as np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import matplotlib.pyplot as plt
from UQpy.sampling.mcmc import MetropolisHastings
from UQpy.inference import BayesModelSelection, BayesParameterEstimation, ComputationalModel
from UQpy.run_model.RunModel_New import RunModel_New # required to run the quadratic model
from UQpy.run_model.RunModel import RunModel # required to run the quadratic model
from UQpy.distributions import Normal, JointIndependent
from scipy.stats import multivariate_normal, norm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from UQpy import PythonModel
from UQpy.sampling.ImportanceSampling import ImportanceSampling
from UQpy.inference import BayesParameterEstimation, ComputationalModel
from UQpy.run_model.RunModel_New import RunModel_New # required to run the quadratic model
from UQpy.run_model.RunModel import RunModel # required to run the quadratic model
from sklearn.neighbors import KernelDensity # for the plots
from UQpy.distributions import JointIndependent, Normal

Expand All @@ -46,7 +46,7 @@ def pdf_from_kde(domain, samples1d):

model = PythonModel(model_script='local_pfn_models.py', model_object_name='model_quadratic', delete_files=True,
var_names=['theta_0', 'theta_1'])
h_func = RunModel_New(model=model)
h_func = RunModel(model=model)
h_func.run(samples=param_true)

# Add noise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from UQpy import PythonModel
from UQpy.sampling.mcmc.MetropolisHastings import MetropolisHastings
from UQpy.inference.inference_models.ComputationalModel import ComputationalModel
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.inference import BayesParameterEstimation
from sklearn.neighbors import KernelDensity # for the plots
from UQpy.distributions import JointIndependent, Normal
Expand All @@ -48,7 +48,7 @@ def pdf_from_kde(domain, samples1d):

model = PythonModel(model_script='local_pfn_models.py', model_object_name='model_quadratic',
var_names=['theta_0', 'theta_1'])
h_func = RunModel_New(model=model)
h_func = RunModel(model=model)
h_func.run(samples=param_true)
data_clean = np.array(h_func.qoi_list[0])
print(data_clean.shape)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from UQpy import PythonModel
from UQpy.inference import InformationModelSelection, MLE
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
import numpy as np
from UQpy.inference import BIC
import matplotlib.pyplot as plt
Expand All @@ -45,7 +45,7 @@
print('Shape of true parameter vector: {}'.format(param_true.shape))

model = PythonModel(model_script='pfn_models.py', model_object_name='model_quadratic', var_names=['theta_0', 'theta_1'])
h_func = RunModel_New(model=model)
h_func = RunModel(model=model)
h_func.run(samples=param_true)

# Add noise
Expand All @@ -68,7 +68,7 @@
for i in range(3):
model = PythonModel(model_script='pfn_models.py', model_object_name=names[i],
var_names=['theta_{}'.format(j) for j in range(i + 1)])
h_func = RunModel_New(model=model)
h_func = RunModel(model=model)
M = ComputationalModel(runmodel_object=h_func, n_parameters=i + 1,
name=names[i], error_covariance=error_covariance)
estimators.append(MLE(inference_model=M, data=data_1))
Expand Down
4 changes: 2 additions & 2 deletions docs/code/inference/mle/plot_regression_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from UQpy.inference import ComputationalModel, MLE
from UQpy.distributions import Normal
from UQpy.inference import MinimizeOptimizer
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel

#%% md
#
Expand All @@ -42,7 +42,7 @@

model = PythonModel(model_script='local_pfn_models.py', model_object_name='model_quadratic', delete_files=True,
var_names=['theta_0', 'theta_1'])
h_func = RunModel_New(model=model)
h_func = RunModel(model=model)
h_func.run(samples=param_true)

# Add noise
Expand Down
4 changes: 2 additions & 2 deletions docs/code/reliability/form/plot_FORM_linear function_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import shutil

from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.distributions import Normal
from UQpy.reliability import FORM
Expand All @@ -28,7 +28,7 @@
dist2 = Normal(loc=0., scale=1.)

model = PythonModel(model_script='pfn.py', model_object_name="example2")
RunModelObject2 = RunModel_New(model=model)
RunModelObject2 = RunModel(model=model)

Z = FORM(distributions=[dist1, dist2], runmodel_object=RunModelObject2)
Z.run()
Expand Down
4 changes: 2 additions & 2 deletions docs/code/reliability/form/plot_FORM_linear_function_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# %%

from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.distributions import Normal
from UQpy.reliability import FORM
Expand All @@ -35,7 +35,7 @@
dist3 = Normal(loc=4., scale=0.4)

model = PythonModel(model_script='pfn.py', model_object_name="example3",)
RunModelObject3 = RunModel_New(model=model)
RunModelObject3 = RunModel(model=model)

Z0 = FORM(distributions=[dist1, dist2, dist3], runmodel_object=RunModelObject3)
Z0.run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

import numpy as np
import matplotlib.pyplot as plt
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.distributions import Normal
from UQpy.reliability import FORM


model = PythonModel(model_script='pfn.py', model_object_name="example1")
RunModelObject = RunModel_New(model=model)
RunModelObject = RunModel(model=model)

dist1 = Normal(loc=200., scale=20.)
dist2 = Normal(loc=150, scale=10.)
Expand Down
4 changes: 2 additions & 2 deletions docs/code/reliability/sorm/plot_SORM_nonlinear_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import shutil

import numpy as np
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.distributions import Normal
from UQpy.reliability import FORM
Expand All @@ -38,7 +38,7 @@
dist1 = Normal(loc=20., scale=2)
dist2 = Lognormal(s=s, loc=0.0, scale=scale)
model = PythonModel(model_script='pfn.py', model_object_name="example4",)
RunModelObject4 = RunModel_New(model=model)
RunModelObject4 = RunModel(model=model)
form = FORM(distributions=[dist1, dist2], runmodel_object=RunModelObject4)
form.run()
Q0 = SORM(form_object=form)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

from UQpy import PythonModel
from UQpy.reliability import SubsetSimulation
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.sampling import Stretch, ModifiedMetropolisHastings, MonteCarloSampling
import numpy as np
import scipy.stats as stats
Expand Down Expand Up @@ -113,7 +113,7 @@
plt.show()

m = PythonModel(model_script='local_Resonance_pfn.py', model_object_name="RunPythonModel")
model = RunModel_New(model=m)
model = RunModel(model=m)

# %% md
#
Expand Down Expand Up @@ -143,7 +143,7 @@

for i in range(ntrials):
m1 = PythonModel(model_script='local_Resonance_pfn.py', model_object_name="RunPythonModel")
model = RunModel_New(model=m1)
model = RunModel(model=m1)
dist = MultivariateNormal(mean=m, cov=C)
xx = dist.rvs(nsamples=1000, random_state=123)
xx1 = dist.rvs(nsamples=100, random_state=123)
Expand Down Expand Up @@ -187,7 +187,7 @@

for i in range(ntrials):
m1 = PythonModel(model_script='local_Resonance_pfn.py', model_object_name="RunPythonModel")
model = RunModel_New(model=m1)
model = RunModel(model=m1)
dist = MultivariateNormal(mean=m, cov=C)
xx = dist.rvs(nsamples=1000, random_state=123)
xx1 = dist.rvs(nsamples=100, random_state=123)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Import this newly defined Rosenbrock distribution into the Distributions module
from UQpy.distributions import Normal
from UQpy.reliability import SubsetSimulation
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.sampling import ModifiedMetropolisHastings, Stretch
# First import the file that contains the newly defined Rosenbrock distribution
from local_Rosenbrock import Rosenbrock
Expand All @@ -32,7 +32,7 @@
# %%

m = PythonModel(model_script='local_Rosenbrock_pfn.py', model_object_name="RunPythonModel")
model = RunModel_New(model=m)
model = RunModel(model=m)
dist = Rosenbrock(p=100.)
dist_prop1 = Normal(loc=0, scale=1)
dist_prop2 = Normal(loc=0, scale=10)
Expand Down Expand Up @@ -69,7 +69,7 @@
# %%

m = PythonModel(model_script='local_Rosenbrock_pfn.py', model_object_name="RunPythonModel")
model = RunModel_New(model=m)
model = RunModel(model=m)
dist = Rosenbrock(p=100.)

x = stats.norm.rvs(loc=0, scale=1, size=(100, 2), random_state=83276)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from UQpy import PythonModel
from UQpy.surrogates import GaussianProcessRegression
from UQpy.sampling import MonteCarloSampling, AdaptiveKriging
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Uniform
from local_BraninHoo import function
import time
Expand All @@ -66,7 +66,7 @@
# %%

model = PythonModel(model_script='local_BraninHoo.py', model_object_name='function')
rmodel = RunModel_New(model=model)
rmodel = RunModel(model=model)

# %% md
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from UQpy import PythonModel
from UQpy.surrogates.gaussian_process import GaussianProcessRegression
from UQpy.sampling import MonteCarloSampling, AdaptiveKriging
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Normal
from local_series import series
import matplotlib.pyplot as plt
Expand All @@ -44,7 +44,7 @@
# %%

model = PythonModel(model_script='local_series.py', model_object_name='series')
rmodel = RunModel_New(model=model)
rmodel = RunModel(model=model)


# %% md
Expand Down Expand Up @@ -156,7 +156,7 @@ def evaluate_function(self, distributions, n_add, surrogate, population, qoi=Non
K1 = GaussianProcessRegression(regression_model=LinearRegression(), kernel=RBF(), optimizer=optimizer,
hyperparameters=[1, 1, 0.1], optimizations_number=1)
model = PythonModel(model_script='local_series.py', model_object_name='series')
rmodel1 = RunModel_New(model=model)
rmodel1 = RunModel(model=model)

# %% md
#
Expand Down Expand Up @@ -209,7 +209,7 @@ def evaluate_function(self, distributions, n_add, surrogate, population, qoi=Non
# Code
b = MonteCarloSampling(distributions=marginals, nsamples=10 ** 4, random_state=4)
model = PythonModel(model_script='local_series.py', model_object_name='series')
r1model = RunModel_New(model=model)
r1model = RunModel(model=model)
r1model.run(samples=b.samples)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from UQpy.sampling import TrueStratifiedSampling, RefinedStratifiedSampling
from UQpy.surrogates import GaussianProcessRegression
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Uniform
import matplotlib.pyplot as plt
from matplotlib import cm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from UQpy.sampling import TrueStratifiedSampling, RefinedStratifiedSampling
from UQpy.sampling import VoronoiStrata
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Uniform
import matplotlib.pyplot as plt
from matplotlib import cm
Expand Down
4 changes: 2 additions & 2 deletions docs/code/sensitivity/morris/plot_12_dimensional_gfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# %%
import shutil
from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Uniform
from UQpy.sensitivity import MorrisSensitivity
import matplotlib.pyplot as plt
Expand All @@ -31,7 +31,7 @@

model = PythonModel(model_script='local_pfn.py', model_object_name='gfun_sensitivity', delete_files=True,
a_values=a_values, var_names=['X{}'.format(i) for i in range(na)])
runmodel_object = RunModel_New(model=model)
runmodel_object = RunModel(model=model)

dist_object = [Uniform(), ] * na

Expand Down
4 changes: 2 additions & 2 deletions docs/code/sensitivity/morris/plot_morris_2d_gfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import shutil

from UQpy.run_model.model_execution.PythonModel import PythonModel
from UQpy.run_model.RunModel_New import RunModel_New
from UQpy.run_model.RunModel import RunModel
from UQpy.distributions import Uniform
from UQpy.sensitivity import MorrisSensitivity
import numpy as np
Expand All @@ -30,7 +30,7 @@

model = PythonModel(model_script='local_pfn.py', model_object_name='gfun_sensitivity', delete_files=True,
a_values=a_values, var_names=['X{}'.format(i) for i in range(na)])
runmodel_object = RunModel_New(model=model)
runmodel_object = RunModel(model=model)

dist_object = [Uniform(), ] * na

Expand Down
Loading

0 comments on commit f1d626c

Please sign in to comment.