initial commit FESurrogateModelTutorial

This commit is contained in:
김경종
2026-05-21 17:03:51 +09:00
parent 93665d9ee6
commit 43b86669fa
122 changed files with 7929 additions and 0 deletions
@@ -0,0 +1,19 @@
import pandas as pd
from femsurrogate.data.bounds import DEFAULT_PARAMETER_BOUNDS
from femsurrogate.data.sampling import generate_lhs_samples
def test_lhs_samples_are_reproducible_for_fixed_seed():
first = generate_lhs_samples(DEFAULT_PARAMETER_BOUNDS, n=8, seed=20260521)
second = generate_lhs_samples(DEFAULT_PARAMETER_BOUNDS, n=8, seed=20260521)
pd.testing.assert_frame_equal(first, second)
def test_lhs_samples_have_expected_columns_and_bounds():
samples = generate_lhs_samples(DEFAULT_PARAMETER_BOUNDS, n=16, seed=20260521)
assert list(samples.columns) == list(DEFAULT_PARAMETER_BOUNDS)
for column, bounds in DEFAULT_PARAMETER_BOUNDS.items():
assert samples[column].between(bounds.lower, bounds.upper).all()