Skip to main content
0 votes
0 answers
26 views

I have relational data, i.e. observations for pairs of objects. More specifically these are migration rates between plant populations, which I would like to explain by a predictor. The migration rates ...
Tobias Naaf's user avatar
1 vote
1 answer
70 views

I have an embedding matrix in the size of (100000, 100). I want to compute all the pairwise cosine distances in the matrix. I've tried using sklearn.metrics.pairwise.cosine_distances function, but it ...
EyalG's user avatar
  • 45
1 vote
1 answer
88 views

I have two pandas dataframes in which each row is a person and their response data in the form of a list: df_1 = pd.DataFrame({'ID': ['a', 'b', 'c', 'd', 'e', 'f'], 'response': [["apple", &...
psychcoder's user avatar
0 votes
1 answer
259 views

I write a BiLSTM-Siamese Network to measure the string similarities using pairwise distance and cosine similarities with the detail as follows: class SiameseNetwork(nn.Module): def __init__(self, ...
fairy's user avatar
  • 7
1 vote
2 answers
180 views

How to make the script below more efficient? This is a follow-up to my previous post Python nested loop issue It currently takes the best part of two hours to process input tables consisting in about ...
tholgate's user avatar
0 votes
1 answer
53 views

I have a (N,3)-dimensional numpy array holding the 3-dim. positions of N particles in its rows. I want to obtain the pairwise distances of these particles using periodic boundaries (the latter means ...
reloh100's user avatar
3 votes
1 answer
918 views

In NumPy, the command numpy.corrcoef(X.T) is amazingly efficient at computing correlations between every possible pair of columns in a matrix X. I am looking for a similarly efficient method to ...
Que's user avatar
  • 131
1 vote
1 answer
92 views

I have a dataset containing a set of variables and the coordinates describing their distributions in geographic space: set.seed(123) #example dataset: d <- data.frame(var=as.factor(rep(LETTERS[1:...
eazyezy's user avatar
  • 185
0 votes
0 answers
150 views

I was getting MemoryError when I imported 100,000 documents to pairwise_distances function. For this reason, I sparsely calculated the distance matrix piece by piece and combined it finally. But ...
Salihcan's user avatar
  • 131
1 vote
1 answer
2k views

I'm trying to implement a manifold alignment type of loss illustrated here. Given a tensor representing a batch of embeddings of shape (L,N) for example with L=256: tensor([[ 0.0178, 0.0004, -0.0217, ...
James Arten's user avatar
0 votes
1 answer
380 views

i'm working on big distance matrix (10-80k row ; 3k cols) and i want to get custom pairwise distance on that matrix ; and do it fast. I have trying with armadillo but with huge data it still "...
Ludo Vic's user avatar
0 votes
0 answers
196 views

Is it possible to use the sklearn pairwise_distances function inside an addConstr(...) for computing the distance between 2 D-dimensional points in the constraint? I'd like to do something like this: ...
HKAY's user avatar
  • 13
1 vote
2 answers
323 views

I have a dataframe with 4 columns. set.seed(123) df <- data.frame(A = round(rnorm(1000, mean = 1)), B = rpois(1000, lambda = 3), C = round(rnorm(1000, mean = -1)), ...
CyG's user avatar
  • 523
0 votes
1 answer
637 views

Issue I'm having some trouble calculating the Mahalanobis Distance between three classes of the independent variable Country. My aim is to calculate the Mahalanobis distance among dolphin whistle ...
Alice Hobbs's user avatar
  • 1,247
0 votes
1 answer
951 views

I have a list of words, and I need to create a pairwise similarity matrix using the Fasttext word embedding. This is what I am currently doing: from gensim.models import fasttext as ft from sklearn....
sato's user avatar
  • 882

15 30 50 per page