Skip to content

Commit

Permalink
Fixing projection function
Browse files Browse the repository at this point in the history
It was previous just returning the old matrix right back.
  • Loading branch information
bmschmidt authored Aug 31, 2016
1 parent 1d489d3 commit a48e7c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/matrixFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ project = function(matrix,vector) {
stop("The vector must be the same length as the matrix it is being compared to")
}
newmat = crossprod(t(matrix %*% b)/as.vector((b %*% b)) , b)
return(new("VectorSpaceModel",matrix))
return(new("VectorSpaceModel",newmat))
}

#' Return a vector rejection for each element in a VectorSpaceModel
Expand Down

0 comments on commit a48e7c7

Please sign in to comment.