starspace_knn: K-nearest neighbours using a Starspace model

View source: R/embed-all-the-things.R

starspace_knnR Documentation

K-nearest neighbours using a Starspace model

Description

K-nearest neighbours using a Starspace model

Usage

starspace_knn(object, newdata, k = 5, ...)

Arguments

object

an object of class textspace as returned by starspace or starspace_load_model

newdata

a character string of length 1

k

integer with the number of nearest neighbours

...

not used

Value

a list with elements input and a data.frame called prediction which has columns called label, similarity and rank


ruimtehol documentation built on May 29, 2024, 5:26 a.m.