View source: R/matrixFunctions.R
reject | R Documentation |
Return a vector rejection for each element in a VectorSpaceModel
reject(matrix, vector)
matrix |
A matrix or VectorSpaceModel |
vector |
A vector (or an object coercable to a vector, see project) of the same length as the VectorSpaceModel. |
A new matrix or VectorSpaceModel of the same dimensions as 'matrix', each row of which is orthogonal to the 'vector' object.
This is defined simply as 'matrix-project(matrix,vector)', but having a separate name may make for cleaner code.
See 'project' for more details.
closest_to(demo_vectors,demo_vectors[["man"]]) genderless = reject(demo_vectors,demo_vectors[["he"]] - demo_vectors[["she"]]) closest_to(genderless,genderless[["man"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.