MCPcopy Create free account
hub / github.com/daniel-e/rustml / test_mixture

Function test_mixture

src/datasets.rs:390–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

388
389 #[test]
390 fn test_mixture() {
391
392 let seed = [1, 2, 3, 4];
393 let m = mixture_builder()
394 .add(3, normal_builder(seed).add(1.0, 0.5).add(2.0, 1.0))
395 .add(5, normal_builder(seed).add(3.0, 0.5).add(4.0, 1.0))
396 .add(8, normal_builder(seed).add(2.0, 0.5).add(7.0, 1.0))
397 .as_matrix();
398 assert_eq!(m.rows(), 16);
399 assert_eq!(m.cols(), 3);
400 // TODO more tests
401 }
402
403}

Callers

nothing calls this directly

Calls 4

mixture_builderFunction · 0.85
normal_builderFunction · 0.85
as_matrixMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected