nearest_neighbors: NEAREST NEIGHBORS

View source: R/KNN_classifier_with_custom_distance_function.R

nearest_neighborsR Documentation

NEAREST NEIGHBORS

Description

NEAREST NEIGHBORS

Usage

nearest_neighbors(x, obs, k, FUN, p = NULL)

Arguments

x

an nxm matrix where each row is a reference time series. There are n series of length m.

obs

a 1Xm matrix that represents a series of length m which we want to classify by comparing with the reference series.

k

number of nearest neighbors

FUN

distance measure.

p

some extra parameter of the FUN function


juancbellass/time-series-r-package documentation built on Aug. 26, 2023, 8:06 p.m.