Interface KNNFingerprintingOptions

interface KNNFingerprintingOptions {
    classifier?: string;
    frameFilter?: ((frame) => boolean);
    k?: number;
    locked?: boolean;
    naive?: boolean;
    name?: string;
    objectFilter?: ((object, frame?) => boolean);
    serializeContext?: boolean;
    similarityFunction?: ((point, fingerprint) => number);
    uid?: string;
    valueFilter?: ((pos) => boolean);
    weightFunction?: ((distance) => number);
    weighted?: boolean;
}

Hierarchy (view full)

Properties

classifier?: string

Fingerprint classifier

Default

""
frameFilter?: ((frame) => boolean)

Frame filter to specify what frames are processed by this node

Type declaration

    • (frame): boolean
    • Parameters

      • frame: DataFrame

      Returns boolean

k?: number

Number of neighbours to use

locked?: boolean
naive?: boolean

Naive algorithm (no KD-tree)

name?: string

User friendly name of the node Used for querying a node by its name.

objectFilter?: ((object, frame?) => boolean)

Object filter to specify what data object are processed by this node

Type declaration

    • (object, frame?): boolean
    • Parameters

      • object: DataObject
      • Optional frame: DataFrame

      Returns boolean

serializeContext?: boolean

Serialize contextual information about fingerprint features This option uses more memory.

similarityFunction?: ((point, fingerprint) => number)

Similarity function (distance function)

Type declaration

    • (point, fingerprint): number
    • Parameters

      • point: number[]
      • fingerprint: number[]

      Returns number

Default

DistanceFunction.EUCLIDEAN
uid?: string

Manually set the unique identifier of the node

valueFilter?: ((pos) => boolean)

Filter on relative positions

Type declaration

    • (pos): boolean
    • Parameters

      • pos: RelativePosition<number, Unit>

      Returns boolean

weightFunction?: ((distance) => number)

Weight function

Type declaration

    • (distance): number
    • Parameters

      • distance: number

      Returns number

Default

WeightFunction.DEFAULT
weighted?: boolean

Use weighted KNN