@iyulab/u-doe 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/node/u_doe.cjs +27 -0
- package/node/u_doe.d.cts +17 -0
- package/node/u_doe_bg.wasm +0 -0
- package/package.json +1 -1
- package/u_doe.d.ts +17 -0
- package/u_doe.js +1 -1
- package/u_doe_bg.js +26 -0
- package/u_doe_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ println!("Required replicates: {n}");
|
|
|
106
106
|
| Design | Function | Use Case |
|
|
107
107
|
|--------|----------|----------|
|
|
108
108
|
| Full Factorial | `full_factorial(k)` | k = 2..7, all factor combinations |
|
|
109
|
-
| Fractional Factorial | `fractional_factorial(k, p)` | Screening, k=
|
|
109
|
+
| Fractional Factorial | `fractional_factorial(k, p)` | Screening, k=4..7, p=1..3 |
|
|
110
110
|
| Plackett-Burman | `plackett_burman(k)` | Screening, k ≤ 19, N = 8/12/16/20 |
|
|
111
111
|
| CCD | `ccd(k, alpha, n_center)` | RSM, k = 2..6 |
|
|
112
112
|
| Box-Behnken | `box_behnken(k, n_center)` | RSM, k = 3/4/5 |
|
|
@@ -157,6 +157,21 @@ Generate a 2^k full factorial design (k = 1..7).
|
|
|
157
157
|
|
|
158
158
|
Generate a 2^(k-p) fractional factorial design (k = 4..7, p = 1..3).
|
|
159
159
|
|
|
160
|
+
#### `fractional_factorial_info(k, p) -> FractionalInfo`
|
|
161
|
+
|
|
162
|
+
Metadata for the fraction `fractional_factorial(k, p)` emits: resolution, defining relation, and generator equations. Use it to derive the alias structure of the design you actually received instead of pairing the matrix with an external published table.
|
|
163
|
+
|
|
164
|
+
**Output:**
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"k": 7,
|
|
168
|
+
"p": 3,
|
|
169
|
+
"resolution": "IV",
|
|
170
|
+
"defining_relation": "I=ABCE=BCDF=ACDG=ADEF=BDEG=ABFG=CEFG",
|
|
171
|
+
"generators": ["E=ABC", "F=BCD", "G=ACD"]
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
160
175
|
#### `plackett_burman(k) -> DesignMatrix`
|
|
161
176
|
|
|
162
177
|
Generate a Plackett-Burman screening design (k = 1..19).
|
package/node/u_doe.cjs
CHANGED
|
@@ -219,6 +219,33 @@ function fractional_factorial(k, p) {
|
|
|
219
219
|
}
|
|
220
220
|
exports.fractional_factorial = fractional_factorial;
|
|
221
221
|
|
|
222
|
+
/**
|
|
223
|
+
* Metadata for a 2^(k-p) fractional factorial design: resolution, defining
|
|
224
|
+
* relation, and generator equations of the fraction `fractional_factorial(k, p)`
|
|
225
|
+
* actually emits — lets consumers derive the alias structure without pairing
|
|
226
|
+
* the design with an external published table.
|
|
227
|
+
*
|
|
228
|
+
* Returns `{ k: usize, p: usize, resolution: "III"|"IV"|"V",
|
|
229
|
+
* defining_relation: str, generators: [str] }` —
|
|
230
|
+
* e.g. `{ k: 7, p: 3, resolution: "IV",
|
|
231
|
+
* defining_relation: "I=ABCE=BCDF=ACDG=ADEF=BDEG=ABFG=CEFG",
|
|
232
|
+
* generators: ["E=ABC", "F=BCD", "G=ACD"] }`.
|
|
233
|
+
*
|
|
234
|
+
* # Errors
|
|
235
|
+
* Returns an error string if the (k, p) combination is not in the standard table.
|
|
236
|
+
* @param {number} k
|
|
237
|
+
* @param {number} p
|
|
238
|
+
* @returns {any}
|
|
239
|
+
*/
|
|
240
|
+
function fractional_factorial_info(k, p) {
|
|
241
|
+
const ret = wasm.fractional_factorial_info(k, p);
|
|
242
|
+
if (ret[2]) {
|
|
243
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
244
|
+
}
|
|
245
|
+
return takeFromExternrefTable0(ret[0]);
|
|
246
|
+
}
|
|
247
|
+
exports.fractional_factorial_info = fractional_factorial_info;
|
|
248
|
+
|
|
222
249
|
/**
|
|
223
250
|
* Generate a 2^k full factorial design.
|
|
224
251
|
*
|
package/node/u_doe.d.cts
CHANGED
|
@@ -125,6 +125,23 @@ export function fit_rsm(design: any, responses: Float64Array, factor_names: any)
|
|
|
125
125
|
*/
|
|
126
126
|
export function fractional_factorial(k: number, p: number): any;
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Metadata for a 2^(k-p) fractional factorial design: resolution, defining
|
|
130
|
+
* relation, and generator equations of the fraction `fractional_factorial(k, p)`
|
|
131
|
+
* actually emits — lets consumers derive the alias structure without pairing
|
|
132
|
+
* the design with an external published table.
|
|
133
|
+
*
|
|
134
|
+
* Returns `{ k: usize, p: usize, resolution: "III"|"IV"|"V",
|
|
135
|
+
* defining_relation: str, generators: [str] }` —
|
|
136
|
+
* e.g. `{ k: 7, p: 3, resolution: "IV",
|
|
137
|
+
* defining_relation: "I=ABCE=BCDF=ACDG=ADEF=BDEG=ABFG=CEFG",
|
|
138
|
+
* generators: ["E=ABC", "F=BCD", "G=ACD"] }`.
|
|
139
|
+
*
|
|
140
|
+
* # Errors
|
|
141
|
+
* Returns an error string if the (k, p) combination is not in the standard table.
|
|
142
|
+
*/
|
|
143
|
+
export function fractional_factorial_info(k: number, p: number): any;
|
|
144
|
+
|
|
128
145
|
/**
|
|
129
146
|
* Generate a 2^k full factorial design.
|
|
130
147
|
*
|
package/node/u_doe_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"iyulab"
|
|
6
6
|
],
|
|
7
7
|
"description": "Design of Experiments (DOE) framework: factorial, Plackett-Burman, CCD, Box-Behnken, Taguchi, effects analysis, RSM, and desirability optimization.",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.8.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
package/u_doe.d.ts
CHANGED
|
@@ -125,6 +125,23 @@ export function fit_rsm(design: any, responses: Float64Array, factor_names: any)
|
|
|
125
125
|
*/
|
|
126
126
|
export function fractional_factorial(k: number, p: number): any;
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Metadata for a 2^(k-p) fractional factorial design: resolution, defining
|
|
130
|
+
* relation, and generator equations of the fraction `fractional_factorial(k, p)`
|
|
131
|
+
* actually emits — lets consumers derive the alias structure without pairing
|
|
132
|
+
* the design with an external published table.
|
|
133
|
+
*
|
|
134
|
+
* Returns `{ k: usize, p: usize, resolution: "III"|"IV"|"V",
|
|
135
|
+
* defining_relation: str, generators: [str] }` —
|
|
136
|
+
* e.g. `{ k: 7, p: 3, resolution: "IV",
|
|
137
|
+
* defining_relation: "I=ABCE=BCDF=ACDG=ADEF=BDEG=ABFG=CEFG",
|
|
138
|
+
* generators: ["E=ABC", "F=BCD", "G=ACD"] }`.
|
|
139
|
+
*
|
|
140
|
+
* # Errors
|
|
141
|
+
* Returns an error string if the (k, p) combination is not in the standard table.
|
|
142
|
+
*/
|
|
143
|
+
export function fractional_factorial_info(k: number, p: number): any;
|
|
144
|
+
|
|
128
145
|
/**
|
|
129
146
|
* Generate a 2^k full factorial design.
|
|
130
147
|
*
|
package/u_doe.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./u_doe_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
box_behnken, ccd, definitive_screening, desirability, doe_anova, estimate_effects, fit_rsm, fractional_factorial, full_factorial, plackett_burman, signal_to_noise, simplex_centroid, simplex_lattice, steepest_ascent, taguchi_array, two_level_factorial_power
|
|
8
|
+
box_behnken, ccd, definitive_screening, desirability, doe_anova, estimate_effects, fit_rsm, fractional_factorial, fractional_factorial_info, full_factorial, plackett_burman, signal_to_noise, simplex_centroid, simplex_lattice, steepest_ascent, taguchi_array, two_level_factorial_power
|
|
9
9
|
} from "./u_doe_bg.js";
|
package/u_doe_bg.js
CHANGED
|
@@ -209,6 +209,32 @@ export function fractional_factorial(k, p) {
|
|
|
209
209
|
return takeFromExternrefTable0(ret[0]);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Metadata for a 2^(k-p) fractional factorial design: resolution, defining
|
|
214
|
+
* relation, and generator equations of the fraction `fractional_factorial(k, p)`
|
|
215
|
+
* actually emits — lets consumers derive the alias structure without pairing
|
|
216
|
+
* the design with an external published table.
|
|
217
|
+
*
|
|
218
|
+
* Returns `{ k: usize, p: usize, resolution: "III"|"IV"|"V",
|
|
219
|
+
* defining_relation: str, generators: [str] }` —
|
|
220
|
+
* e.g. `{ k: 7, p: 3, resolution: "IV",
|
|
221
|
+
* defining_relation: "I=ABCE=BCDF=ACDG=ADEF=BDEG=ABFG=CEFG",
|
|
222
|
+
* generators: ["E=ABC", "F=BCD", "G=ACD"] }`.
|
|
223
|
+
*
|
|
224
|
+
* # Errors
|
|
225
|
+
* Returns an error string if the (k, p) combination is not in the standard table.
|
|
226
|
+
* @param {number} k
|
|
227
|
+
* @param {number} p
|
|
228
|
+
* @returns {any}
|
|
229
|
+
*/
|
|
230
|
+
export function fractional_factorial_info(k, p) {
|
|
231
|
+
const ret = wasm.fractional_factorial_info(k, p);
|
|
232
|
+
if (ret[2]) {
|
|
233
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
234
|
+
}
|
|
235
|
+
return takeFromExternrefTable0(ret[0]);
|
|
236
|
+
}
|
|
237
|
+
|
|
212
238
|
/**
|
|
213
239
|
* Generate a 2^k full factorial design.
|
|
214
240
|
*
|
package/u_doe_bg.wasm
CHANGED
|
Binary file
|