Note
Go to the end to download the full example code.
Validation of a Karhunen-Loeve decompositionΒΆ
In this example we are going to assess a Karhunen-Loeve decomposition
import openturns as ot
import openturns.viewer as otv
Create a Gaussian process.
numberOfVertices = 20
interval = ot.Interval(-1.0, 1.0)
mesh = ot.IntervalMesher([numberOfVertices - 1]).build(interval)
covariance = ot.SquaredExponential()
process = ot.GaussianProcess(covariance, mesh)
Decompose it using KL-SVD.
sampleSize = 100
processSample = process.getSample(sampleSize)
threshold = 1.0e-7
algo = ot.KarhunenLoeveSVDAlgorithm(processSample, threshold)
algo.run()
klresult = algo.getResult()
Instantiate the validation service.
Plot the residual field.
Plot the residual mean field.
Plot the residual standard deviation field.
Build the validation graph.
Build the weight graph.
Build the quality graph.
Display all figures
OpenTURNS