project: Project each row of an input matrix along a vector.

View source: R/matrixFunctions.R

projectR Documentation

Project each row of an input matrix along a vector.

Description

As with 'cosineSimilarity

Usage

project(matrix, vector)

Arguments

matrix

A matrix or VectorSpaceModel

vector

A vector (or object coercable to a vector) of the same length as the VectorSpaceModel.

Value

A new matrix or VectorSpaceModel of the same dimensions as 'matrix', each row of which is parallel to vector.

If the input is a matrix, the output will be a matrix: if a VectorSpaceModel, it will be a VectorSpaceModel.


bmschmidt/wordVectors documentation built on June 2, 2022, 3:53 p.m.