28 个版本 (重大更改)
0.21.1 | 2024 年 7 月 30 日 |
---|---|
0.20.0 | 2024 年 6 月 25 日 |
0.16.0 | 2024 年 3 月 7 日 |
0.14.0 | 2023 年 12 月 13 日 |
0.4.0 | 2022 年 7 月 9 日 |
#507 in 机器学习
每月 382 次下载
用于 4 crates
32KB
605 行
实验设计
egobox-doe
提供了一些实验设计构建方法的 Rust 实现。它是 SMT Python 库采样方法的 Rust 版本。
整体概览
egobox-doe
是顶层包 egobox 中的一个库 crate。
当前状态
egobox-doe
目前提供了以下方法的实现
- 随机抽样
- 全因子抽样
- 拉丁超立方抽样:经典、居中、优化
示例
examples/ 目录中有一个使用示例。要运行,请使用
$ cargo run --release --example samplings
许可协议
根据 Apache License 2.0 许可 https://apache.ac.cn/licenses/LICENSE-2.0
lib.rs
:
此库实现了某些实验设计 (DoE) 方法,也称为抽样方法,特别是用于代理方法的 拉丁超立方抽样 方法。此库是 SMT 采样方法 的端口。
DoE 方法是在设计(或样本)空间 xlimits
内生成一组点(即 DoE)的方法。设计空间定义为 2D ndarray (nx, 2)
,指定每个 nx
样本组件的下限和上限。
示例
use egobox_doe::{FullFactorial, Lhs, LhsKind, Random, SamplingMethod};
use ndarray::{arr2};
use ndarray_rand::rand::SeedableRng;
use rand_xoshiro::Xoshiro256Plus;
// Design space is defined as [5., 10.] x [0., 1.], samples are 2-dimensional.
let xlimits = arr2(&[[5., 10.], [0., 1.]]);
// We generate five samples using centered Latin Hypercube sampling.
let samples = Lhs::new(&xlimits).kind(LhsKind::Centered).sample(5);
// or else with FullFactorial sampling
let samples = FullFactorial::new(&xlimits).sample(5);
// or else randomly with random generator for reproducibility
let samples = Random::new(&xlimits).with_rng(Xoshiro256Plus::seed_from_u64(42)).sample(5);
此库包含三种抽样方法
依赖项
~7MB
~136K SLoC