Skip to content

ml_KNearest_create

mlfunctionOpenCV 5.0.0
import { ml_KNearest_create } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

Creates the empty model

The static method creates empty %KNearest classifier. It should be then trained using StatModel::train method.
ml_KNearest_create(): ml_KNearest | null;
Returns

The ml_KNearest | null result.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.