This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This function parses the logs of the FCE class | |
def parse_fce_logs(filename): | |
f = open(filename, "r") | |
path_indices = list() | |
relative_cross_validation_error = list() | |
q_squares = list() | |
for line in f: | |
tokens = line.split(" ") | |
if len(tokens) > 0: | |
sub_tokens = tokens[0].split("=") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
import openturns.viewer as otv | |
import numpy as np | |
def draw_loo(error): | |
g = ot.Graph() | |
g.setXTitle("step") | |
g.setYTitle("error") | |
g.setAxes(True) | |
g.setGrid(True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
from openturns.usecases.wingweight_function import WingWeightModel | |
import time | |
import pandas as pd | |
ot.Log.Show(ot.Log.NONE) | |
m = WingWeightModel() | |
inputNames = m.distributionX.getDescription() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
inputDimension = 2 | |
""" | |
Learning data | |
Box in [0,10]x[0,10] | |
""" | |
levels = [6, 3] | |
box = ot.Box(levels) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
import numpy as np | |
def compute_kriging_virtual_loo(inputSample, outputSample, covariance_model, basis=None, transformation=None): | |
""" | |
We write here the Virtual cross validation system | |
# K b + F c = y | |
# F^t b = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
inputDimension = 2 | |
# Learning data | |
levels = [8, 5] | |
levels = [6, 3] | |
box = ot.Box(levels) | |
inputSample = box.generate() | |
# Scale each direction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Nov 23 14:14:19 2020 | |
@author: lbrevaul | |
""" | |
import openturns as ot | |
import math as m | |
import numpy as np |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openturns as ot | |
def getConditionalMarginalCovariance(krigingResult, x): | |
def _getConditionalMarginalCovariancePoint(x): | |
cov = krigingResult.getConditionalCovariance(x) | |
return cov | |
def _getConditionalMarginalCovarianceSample(x): | |
cov_coll = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Point ExpertMixture::evaluate_supervised(const Point & inP) const | |
{ | |
if (supervised_) return evaluate_supervised(inP); | |
return evaluate_non_supervised(inP); | |
} | |
Point ExpertMixture::evaluate_non_supervised(const Point & inP) const | |
{ | |
const UnsignedInteger inputDimension = getInputDimension(); | |
if (inP.getDimension() != inputDimension) throw InvalidArgumentException(HERE) << "Error: expected a point of dimension=" << inputDimension << " and got a point of dimension=" << inP.getDimension(); |
NewerOlder