MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / tiny_dataset

Function tiny_dataset

nodedb-codec/src/vector_quant/opq.rs:350–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

348 use super::*;
349
350 fn tiny_dataset() -> Vec<Vec<f32>> {
351 (0..10)
352 .map(|i| {
353 let base = i as f32 * 2.0;
354 vec![
355 base,
356 base + 0.1,
357 base - 0.1,
358 base + 0.2,
359 base * 0.5,
360 base * 0.5 + 0.1,
361 base * 0.5 - 0.1,
362 base * 0.5 + 0.05,
363 ]
364 })
365 .collect()
366 }
367
368 fn train_tiny() -> OpqCodec {
369 let vecs = tiny_dataset();

Callers 5

train_tinyFunction · 0.85
encode_produces_m_bytesFunction · 0.85
distance_is_non_negativeFunction · 0.85

Calls 1

collectMethod · 0.80