Top "Dot-product" questions

In mathematics, the dot product or scalar product is an algebraic operation that takes two equal-length sequences of numbers (usually coordinate vectors) and returns a single number.

Cosine Similarity

I calculated tf/idf values of two documents. The following are the tf/idf values: 1.txt 0.0 0.5 2.txt 0.0 0.5 The documents are …

java similarity trigonometry tf-idf dot-product
Speeding up numpy.dot

I've got a numpy script that spends about 50% of its runtime in the following code: s = numpy.dot(v1, v1) …

python performance numpy dot-product
Dot product sparse matrices

I have two sparse matrices (a and b) in python of the following dimensions: a = <240760x2177930 sparse matrix of …

python python-3.x numpy sparse-matrix dot-product
sum of multiplication of two columns of a matrix in R

I am generating a matrix in R using following, ncolumns = 3 nrows = 10 my.mat <- matrix(runif(ncolumns*nrows), ncol=…

r matrix dot-product
numpy: column-wise dot product

Given a 2D numpy array, I need to compute the dot product of every column with itself, and store the …

python numpy dot-product
Dot product along third axis

I'm trying to take a tensor dot product in numpy using tensordot, but I'm not sure how I should reshape …

python numpy tensor dot-product
Matrix Multiplication of a Pandas DataFrame and Series

I want to do a matrix multiplcation of a pandas dataframe and a series df = pandas.DataFrame({'a':[4,1,3], 'b':[5,2,4]},index=[1,2,3]) …

python pandas matrix matrix-multiplication dot-product
How do I know if two line segments are near collinear

I am having some trouble determining if two line segments are collinear because of floating point precision. How can I …

vector parallel-processing dot-product cross-product
How to Find Dot Product of Two Lines (Opencv)

I'm working on a program that require me to find the angle between two lines. I have found all of …

c++ opencv dot-product
Does np.dot automatically transpose vectors?

I am trying to calculate the first and second order moments for a portfolio of stocks (i.e. expected return …

python numpy dot-product