emel/lazy/ml/k_nearest_neighbors

Functions

pub fn classifier(dataset: ZList(#(ZList(Float), String)), k: Int) -> fn(
  ZList(Float),
) -> String
pub fn k_nearest_neighbors(dataset: ZList(#(ZList(Float), a)), item: ZList(
    Float,
  ), k: Int) -> ZList(#(ZList(Float), a))
pub fn predictor(dataset: ZList(#(ZList(Float), Float)), k: Int) -> fn(
  ZList(Float),
) -> Float