Skip to content

Commit

Permalink
Minor import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap committed Mar 16, 2021
1 parent 629f720 commit 33fb9b3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
3 changes: 1 addition & 2 deletions example/SampleMethods/STS/STS_Example1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
}
],
"source": [
"from UQpy.SampleMethods.Strata.rectangular import RectangularStrata\n",
"from UQpy.SampleMethods.STS.rectangular import RectangularSTS\n",
"from UQpy.SampleMethods import *\n",
"from UQpy.Distributions import Exponential\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down
31 changes: 26 additions & 5 deletions example/Surrogates/PCE/PCE_Example6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -211,9 +211,19 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Error from least squares regression is: 0.0510225\n",
"Error from LASSO is: 0.0507776\n",
"Error from Ridge is: 0.0503678\n"
]
}
],
"source": [
"n_samples = 500\n",
"x_val = joint.rvs(n_samples)\n",
Expand Down Expand Up @@ -243,9 +253,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Moments from least squares regression : (9.9848, 92.7136)\n",
"Moments from LASSO regression : (9.9842, 92.6511)\n",
"Moments from Ridge regression : (9.9593, 91.8614)\n",
"Moments from MC integration: (10.018975, 92.526962)\n"
]
}
],
"source": [
"n_mc = 1000000\n",
"x_mc = joint.rvs(n_mc)\n",
Expand Down

0 comments on commit 33fb9b3

Please sign in to comment.