// Small teaching input; index overhead can exceed assignment savings here.
import aner.ml
import aner.tensor
import aner.parallel

let x = [[0.0, 0.0], [0.0, 2.0], [10.0, 10.0], [10.0, 12.0]]
let execution = parallel.local(workers: 2)
let model = ml.fit_omeans(features: x, clusters: 2,
    epochs: 3.0, seed: 42, execution: execution)
print(model.summary())
print(model.coarse_cells())
print(model.probes())
print(model.inertia())
// Final prediction is exhaustive even when training searches fewer cells.
let predicted = model.predict(input: x, execution: execution)
print(tensor.value(predicted, 0, 0) == tensor.value(model.labels(), 0, 0))
