Skip to content

Commit

Permalink
CircleCI build openturns 20983
Browse files Browse the repository at this point in the history
  • Loading branch information
CircleCI committed Nov 22, 2024
1 parent 4084501 commit 778a201
Show file tree
Hide file tree
Showing 1,015 changed files with 3,250 additions and 2,823 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"import openturns as ot\nimport openturns.viewer as viewer\nfrom matplotlib import pylab as plt\n\not.Log.Show(ot.Log.NONE)\n\n# The original distribution\ndistribution = ot.Gumbel(0.45, 0.6)\ngraph = distribution.drawPDF()\nview = viewer.View(graph)"
"import openturns as ot\nimport openturns.viewer as viewer\n\not.Log.Show(ot.Log.NONE)\n\n# The original distribution\ndistribution = ot.Gumbel(0.45, 0.6)\ngraph = distribution.drawPDF()\nview = viewer.View(graph)"
]
},
{
Expand Down Expand Up @@ -130,7 +130,25 @@
},
"outputs": [],
"source": [
"graph = truncatedKS.drawPDF([-2.5] * dimension, [2.5] * dimension, [256] * dimension)\ngraph.add(ot.Cloud(truncatedKS.getSample(200)))\ngraph.setColors([\"blue\", \"red\"])\nview = viewer.View(graph)\nplt.show()"
"graph = truncatedKS.drawPDF([-2.5] * dimension, [2.5] * dimension, [256] * dimension)\ngraph.add(ot.Cloud(truncatedKS.getSample(200)))\nview = viewer.View(graph)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Display all the graphs\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"view.ShowAll()"
]
}
],
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"outputs": [],
"source": [
"graph = distribution.drawCDF()\ngraph.setColors([\"blue\"])\nview = otv.View(graph)"
"graph = distribution.drawCDF()\nview = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
graph = distribution.drawPDF()
curve = fit.drawPDF()
graph.add(curve)
graph.setColors(["dodgerblue3", "darkorange1"])
graph.setLegends(["Mixture", "Kernel smoothing"])
graph.setLegendPosition("upper left")
view = otv.View(graph)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
# We draw the fitted distribution and a histogram of the data.
graph = myDistribution.drawPDF()
graph.add(ot.HistogramFactory().build(sample).drawPDF())
graph.setColors(["black", "red"])
graph.setLegends(["GEV fitting", "histogram"])
graph.setLegendPosition("upper right")

Expand Down Expand Up @@ -103,7 +102,6 @@
curveWeibullMax.setLineStyle("dashed")
graph.add(curveWeibullMax)

graph.setColors(["black", "red", "green", "blue", "orange"])
graph.setLegends(
[
"GEV fitting",
Expand Down Expand Up @@ -159,7 +157,6 @@
graph = myFittedDist.drawPDF()
graph.add(ot.HistogramFactory().build(sample).drawPDF())
graph.setTitle("Generalized Pareto distribution fitting on a sample")
graph.setColors(["black", "red"])
graph.setLegends(["GPD fitting", "histogram"])
graph.setLegendPosition("upper right")

Expand Down Expand Up @@ -190,13 +187,11 @@
graph = myFittedDist.drawPDF()
graph.add(ot.HistogramFactory().build(sample).drawPDF())
graph.setTitle("Generalized Pareto distribution fitting on a sample")
graph.setColors(["black", "red"])
graph.setLegends(["GPD fitting", "histogram"])
graph.setLegendPosition("upper right")

view = viewer.View(graph)
axes = view.getAxes()
_ = axes[0].set_xlim(-1.0, 10.0)


plt.show()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
},
"outputs": [],
"source": [
"grid = ot.GridLayout(2, 3)\not.RandomGenerator.SetSeed(0)\nfor i, distribution in enumerate(distCollection):\n sample = distribution.getSample(5000)\n\n # We draw the real distribution\n graph = distribution.drawPDF()\n graph.setLegends([distribution.getClassName()])\n # We choose the default kernel\n kernel = ot.KernelSmoothing()\n\n # We activate no particular treatment\n fitted = kernel.build(sample)\n curve = fitted.drawPDF()\n curve.setLegends([\"Fitted\"])\n graph.add(curve)\n\n # We activate the log-transform treatment\n kernel.setUseLogTransform(True)\n fitted = kernel.build(sample)\n curve = fitted.drawPDF()\n curve.setLegends([\"Fitted LogTransform\"])\n curve = curve.getDrawable(0)\n curve.setLineStyle(\"dashed\")\n\n graph.add(curve)\n graph.setColors(ot.Drawable.BuildDefaultPalette(3))\n grid.setGraph(i // 3, i % 3, graph)\n\nview = viewer.View(grid)\n\nplt.show()"
"grid = ot.GridLayout(2, 3)\not.RandomGenerator.SetSeed(0)\nfor i, distribution in enumerate(distCollection):\n sample = distribution.getSample(5000)\n\n # We draw the real distribution\n graph = distribution.drawPDF()\n graph.setLegends([distribution.getClassName()])\n # We choose the default kernel\n kernel = ot.KernelSmoothing()\n\n # We activate no particular treatment\n fitted = kernel.build(sample)\n curve = fitted.drawPDF()\n curve.setLegends([\"Fitted\"])\n graph.add(curve)\n\n # We activate the log-transform treatment\n kernel.setUseLogTransform(True)\n fitted = kernel.build(sample)\n curve = fitted.drawPDF()\n curve.setLegends([\"Fitted LogTransform\"])\n curve = curve.getDrawable(0)\n curve.setLineStyle(\"dashed\")\n\n graph.add(curve)\n grid.setGraph(i // 3, i % 3, graph)\n\nview = viewer.View(grid)\n\nplt.show()"
]
}
],
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def fEst(X):

cov_graph = func.draw(-a / 4, a / 4, 1024)
cov_graph.add(funcEst.draw(-a / 4, a / 4, 1024))
cov_graph.setColors(["blue", "red"])
cov_graph.setTitle("Stationary covariance model estimation")

fig = plt.figure(figsize=(10, 4))
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ def compute_R2_score_by_kfold(
cloud.setLegend("K-Fold")
graph.add(cloud)
graph.setLegendPosition("topleft")
graph.setColors(ot.Drawable().BuildDefaultPalette(2))
graph.setBoundingBox(boundingBox)
view = otv.View(graph, figure_kw={"figsize": (5.0, 4.0)})
# sphinx_gallery_thumbnail_number = 4
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"outputs": [],
"source": [
"import openturns as ot\nimport openturns.viewer as viewer\nfrom matplotlib import pylab as plt\n\not.Log.Show(ot.Log.NONE)"
"import openturns as ot\nimport openturns.viewer as viewer\n\not.Log.Show(ot.Log.NONE)"
]
},
{
Expand Down Expand Up @@ -372,7 +372,25 @@
},
"outputs": [],
"source": [
"xmin = sample.getMin()[0]\nxmax = sample.getMax()[0] - 1 # To avoid log(0) because P(X>Xmax)=0\nnpoints = 50\nlogScaleX = True\ngraph = userdefined.drawSurvivalFunction(xmin, xmax, pointNumber, logScaleX)\ngraph.setLogScale(ot.GraphImplementation.LOGXY)\ngraph.setColors([\"blue\"])\ngraph.setLegends([\"Sample\"])\ngraphDistribution = distribution.drawSurvivalFunction(xmin, xmax, npoints, logScaleX)\ngraphDistribution.setLegends([\"GPD\"])\ngraph.add(graphDistribution)\ngraph.setLegendPosition(\"upper right\")\ngraph.setTitle(\"GPD against the sample - n=%d\" % (sample.getSize()))\nview = viewer.View(graph)\n# graph\nplt.show()"
"xmin = sample.getMin()[0]\nxmax = sample.getMax()[0] - 1 # To avoid log(0) because P(X>Xmax)=0\nnpoints = 50\nlogScaleX = True\ngraph = userdefined.drawSurvivalFunction(xmin, xmax, pointNumber, logScaleX)\ngraph.setLogScale(ot.GraphImplementation.LOGXY)\ngraph.setLegends([\"Sample\"])\ngraphDistribution = distribution.drawSurvivalFunction(xmin, xmax, npoints, logScaleX)\ngraphDistribution.setLegends([\"GPD\"])\ngraph.add(graphDistribution)\ngraph.setLegendPosition(\"upper right\")\ngraph.setTitle(\"GPD against the sample - n=%d\" % (sample.getSize()))\nview = viewer.View(graph)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Show all the graphs.\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"view.ShowAll()"
]
}
],
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
fhat = result.getMetaModel()

graph.add(fhat.draw(0.0, 10.0))
graph.setColors(["blue", "red", "black", "pink"])
graph.setLegends(["model", "GP Fitter", "sample", "GP Regression"])
graph.setLegendPosition("upper left")
graph.setTitle(r"$y(x)=x * sin(x)$")
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"import openturns as ot\nimport openturns.viewer as viewer\nfrom matplotlib import pylab as plt\n\not.Log.Show(ot.Log.NONE)"
"import openturns as ot\nimport openturns.viewer as viewer\n\not.Log.Show(ot.Log.NONE)"
]
},
{
Expand Down Expand Up @@ -80,7 +80,18 @@
},
"outputs": [],
"source": [
"graph = drawFamily(ot.HermiteFactory())\nview = viewer.View(graph)\nplt.show()"
"graph = drawFamily(ot.HermiteFactory())\nview = viewer.View(graph)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"view.ShowAll()"
]
}
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
curve.setLineStyle("dashed")

graph.add(curve)
graph.setColors(ot.Drawable.BuildDefaultPalette(3))
grid.setGraph(i // 3, i % 3, graph)

view = viewer.View(grid)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# %%
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt

ot.Log.Show(ot.Log.NONE)

Expand Down Expand Up @@ -61,4 +60,6 @@ def drawFamily(factory, degreeMax=5):
# %%
graph = drawFamily(ot.HermiteFactory())
view = viewer.View(graph)
plt.show()

# %%
view.ShowAll()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
# %%
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt

ot.Log.Show(ot.Log.NONE)

Expand Down Expand Up @@ -132,4 +131,6 @@
graph.add(curve)
graph.setLegendPosition("upper right")
view = viewer.View(graph)
plt.show()

# %%
view.ShowAll()
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# %%
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt

ot.Log.Show(ot.Log.NONE)

Expand Down Expand Up @@ -65,6 +64,8 @@
# Draw its PDF
graph = truncatedKS.drawPDF([-2.5] * dimension, [2.5] * dimension, [256] * dimension)
graph.add(ot.Cloud(truncatedKS.getSample(200)))
graph.setColors(["blue", "red"])
view = viewer.View(graph)
plt.show()

# %%
# Display all the graphs
view.ShowAll()
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
distribution = ot.GeneralizedExtremeValue(0.0, 1.0, p)
pdf_curve = distribution.drawPDF().getDrawable(0)
cdf_curve = distribution.drawCDF().getDrawable(0)
pdf_curve.setColor(palette[i])
cdf_curve.setColor(palette[i])
legend = f"xi={p}"
pdf_curve.setLegend(legend)
cdf_curve.setLegend(legend)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
},
"outputs": [],
"source": [
"graph = ot.Graph(\"CV : split vs K-Fold\", \"Degree\", \"$R^2$\", True)\ncloud = ot.Cloud(ot.Sample.BuildFromPoint(degree_list), scoreSampleSplit)\ncloud.setPointStyle(\"circle\")\ncloud.setLegend(\"Split\")\ngraph.add(cloud)\ncloud = ot.Cloud(ot.Sample.BuildFromPoint(degree_list), scoreSampleKFold)\ncloud.setPointStyle(\"square\")\ncloud.setLegend(\"K-Fold\")\ngraph.add(cloud)\ngraph.setLegendPosition(\"topleft\")\ngraph.setColors(ot.Drawable().BuildDefaultPalette(2))\ngraph.setBoundingBox(boundingBox)\nview = otv.View(graph, figure_kw={\"figsize\": (5.0, 4.0)})\n# sphinx_gallery_thumbnail_number = 4"
"graph = ot.Graph(\"CV : split vs K-Fold\", \"Degree\", \"$R^2$\", True)\ncloud = ot.Cloud(ot.Sample.BuildFromPoint(degree_list), scoreSampleSplit)\ncloud.setPointStyle(\"circle\")\ncloud.setLegend(\"Split\")\ngraph.add(cloud)\ncloud = ot.Cloud(ot.Sample.BuildFromPoint(degree_list), scoreSampleKFold)\ncloud.setPointStyle(\"square\")\ncloud.setLegend(\"K-Fold\")\ngraph.add(cloud)\ngraph.setLegendPosition(\"topleft\")\ngraph.setBoundingBox(boundingBox)\nview = otv.View(graph, figure_kw={\"figsize\": (5.0, 4.0)})\n# sphinx_gallery_thumbnail_number = 4"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@
theta_2 = (0.5, 0.7, 0.9)
pdf_2d_1 = ot.Graph(title_2d.format(theta_1), "x1", "x2", True)
pdf_2d_2 = ot.Graph(title_2d.format(theta_2), "x1", "x2", True)
palette = ot.Drawable.BuildDefaultPalette(10)
list_theta = [(2, 2), (7, 5), (2, 6), (3, 4)]
for theta in list_theta:
distribution = ot.Dirichlet(theta)
pdf_curve = distribution.drawPDF()
cdf_curve = distribution.drawCDF()
pdf_graph.add(pdf_curve)
cdf_graph.add(cdf_curve)
pdf_graph.setColors([palette[i] for i in range(4)])
cdf_graph.setColors([palette[i] for i in range(4)])
legends = [f"theta={theta}" for theta in list_theta]
pdf_graph.setLegends(legends)
cdf_graph.setLegends(legends)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@

graph = fittedDist.drawPDF()
graph.add(ot.Gamma(6.0, 1.0).drawPDF())
graph.setColors(ot.Drawable.BuildDefaultPalette(2))
graph.setLegends(["KS dist", "Gamma"])
View(graph)
# View(graph, figure_kw={'figsize': (8, 4)})
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
},
"outputs": [],
"source": [
"graph = myDistribution.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setColors([\"black\", \"red\"])\ngraph.setLegends([\"GEV fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-20.0, 20.0)"
"graph = myDistribution.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setLegends([\"GEV fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-20.0, 20.0)"
]
},
{
Expand All @@ -187,7 +187,7 @@
},
"outputs": [],
"source": [
"graph = myDistribution.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\n\ndistFrechet = ot.FrechetFactory().buildAsFrechet(sample)\ngraph.add(distFrechet.drawPDF())\n\ndistGumbel = ot.GumbelFactory().buildAsGumbel(sample)\ngraph.add(distGumbel.drawPDF())\n\n# We change the line style of the WeibullMax.\ndistWeibullMax = ot.WeibullMaxFactory().buildAsWeibullMax(sample)\ncurveWeibullMax = distWeibullMax.drawPDF().getDrawable(0)\ncurveWeibullMax.setLineStyle(\"dashed\")\ngraph.add(curveWeibullMax)\n\ngraph.setColors([\"black\", \"red\", \"green\", \"blue\", \"orange\"])\ngraph.setLegends(\n [\n \"GEV fitting\",\n \"histogram\",\n \"Frechet fitting\",\n \"Gumbel fitting\",\n \"WeibullMax fitting\",\n ]\n)\ngraph.setLegendPosition(\"upper right\")\nview = viewer.View(graph)\naxes = view.getAxes() # axes is a matplotlib object\n_ = axes[0].set_xlim(-20.0, 20.0)"
"graph = myDistribution.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\n\ndistFrechet = ot.FrechetFactory().buildAsFrechet(sample)\ngraph.add(distFrechet.drawPDF())\n\ndistGumbel = ot.GumbelFactory().buildAsGumbel(sample)\ngraph.add(distGumbel.drawPDF())\n\n# We change the line style of the WeibullMax.\ndistWeibullMax = ot.WeibullMaxFactory().buildAsWeibullMax(sample)\ncurveWeibullMax = distWeibullMax.drawPDF().getDrawable(0)\ncurveWeibullMax.setLineStyle(\"dashed\")\ngraph.add(curveWeibullMax)\n\ngraph.setLegends(\n [\n \"GEV fitting\",\n \"histogram\",\n \"Frechet fitting\",\n \"Gumbel fitting\",\n \"WeibullMax fitting\",\n ]\n)\ngraph.setLegendPosition(\"upper right\")\nview = viewer.View(graph)\naxes = view.getAxes() # axes is a matplotlib object\n_ = axes[0].set_xlim(-20.0, 20.0)"
]
},
{
Expand Down Expand Up @@ -266,7 +266,7 @@
},
"outputs": [],
"source": [
"graph = myFittedDist.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setTitle(\"Generalized Pareto distribution fitting on a sample\")\ngraph.setColors([\"black\", \"red\"])\ngraph.setLegends([\"GPD fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-1.0, 10.0)"
"graph = myFittedDist.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setTitle(\"Generalized Pareto distribution fitting on a sample\")\ngraph.setLegends([\"GPD fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-1.0, 10.0)"
]
},
{
Expand Down Expand Up @@ -320,7 +320,7 @@
},
"outputs": [],
"source": [
"graph = myFittedDist.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setTitle(\"Generalized Pareto distribution fitting on a sample\")\ngraph.setColors([\"black\", \"red\"])\ngraph.setLegends([\"GPD fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-1.0, 10.0)\n\n\nplt.show()"
"graph = myFittedDist.drawPDF()\ngraph.add(ot.HistogramFactory().build(sample).drawPDF())\ngraph.setTitle(\"Generalized Pareto distribution fitting on a sample\")\ngraph.setLegends([\"GPD fitting\", \"histogram\"])\ngraph.setLegendPosition(\"upper right\")\n\nview = viewer.View(graph)\naxes = view.getAxes()\n_ = axes[0].set_xlim(-1.0, 10.0)\n\nplt.show()"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# %%
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt

ot.Log.Show(ot.Log.NONE)

Expand Down Expand Up @@ -199,12 +198,15 @@ def generateKSSampleEstimatedParameters(nrepeat, samplesize):
graph.setLegends(["Known parameters"])
graphP = ot.KernelSmoothing().build(sampleDP).drawPDF()
graphP.setLegends(["Estimated parameters"])
graphP.setColors(["blue"])
graph.add(graphP)
graph.setTitle("Kolmogorov-Smirnov distribution")
graph.setXTitle("KS-Statistics")
view = viewer.View(graph)
plt.show()

# %%
# Display the graphs
view.ShowAll()


# %%
# We see that the distribution of the KS distances when the parameters are
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# %%
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt

ot.Log.Show(ot.Log.NONE)

Expand Down Expand Up @@ -64,14 +63,14 @@
xmax = 5.0
x1value = 0.5
parametricModelGraph = ot.ParametricFunction(model, [0], [x1value]).draw(xmin, xmax)
parametricModelGraph.setColors(["red"])
graphMetamodel = ot.ParametricFunction(responseSurface, [0], [x1value]).draw(xmin, xmax)
graphMetamodel.setColors(["blue"])
parametricModelGraph.add(graphMetamodel)
parametricModelGraph.setLegends(["Model", "Meta-Model"])
parametricModelGraph.setLegendPosition("upper right")
view = viewer.View(parametricModelGraph)
plt.show()

# %%
view.ShowAll()

# %%
# We see that the metamodel is equal to the trend because it takes into account the fact that the mean of the Gaussian process is zero.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def computeQuantile(self, prob, tail=False):
# %%
# And plot the CDF:
graph = distribution.drawCDF()
graph.setColors(["blue"])
view = otv.View(graph)

# %%
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 778a201

Please sign in to comment.