All Questions
Tagged with euclidean-distance machine-learning
26
questions
3
votes
1
answer
2k
views
How to calculate weighted similarity with scipy.spatial.distance.cosine?
From the function definition:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.cosine.html
scipy.spatial.distance.cosine(u, v, w=None)
but my codes got some errors:
from ...
2
votes
1
answer
1k
views
Confuse with sklearn distance algorithm
While I want to use standard Euclidean metric in KNeighborsClassifier.
knn = KNeighborsRegressor(n_neighbors=k,metric='seuclidean' )
knn.fit(newx,y)
and the typeerror shown:
C:\Anaconda3\lib\site-...
2
votes
3
answers
686
views
Subsequent time-series matching
I've been stuck with subsequent matching of time-series in MATLAB (I'm new to it).
I have two time-series: A (of length a) and B (of length b). Assume that a is much larger than b. The task is to ...
2
votes
1
answer
383
views
Finding the 10 nearest points in 3D Euclidean space, for EACH element in a 5-million element catalog
Suppose I have a catalog of 5 million points, with their x,y,z location in 3D space. For EACH of these 5 million points, I want to find the 10 points closest to it (straightforward 3D Euclidean ...
2
votes
2
answers
3k
views
Distance measure for categorical attributes for k-Nearest Neighbor
For my class project, I am working on the Kaggle competition - Don't get kicked
The project is to classify test data as good/bad buy for cars. There are 34 features and the data is highly skewed. I ...
1
vote
1
answer
2k
views
In K-Means clustering algorithm(sklearn) how to override euclidean distance to some distance
I have some set of documents, I just want to group related docs. Currently I'm using google's news vector file (GoogleNews-vectors-negative300.bin) and with this vector file I'm getting the vector and ...
1
vote
3
answers
3k
views
Euclidean Distance
I have some problem understanding euclidean distance. I have two different entities and I want to measure the similarity between these entities.
Lets suppose that entity A has 2 feature vectors and ...
1
vote
2
answers
565
views
distance measure used to calculate k nearest neighbour
I am reading about k nearest neighbour, and the distance measure given in the example is as below.
It says Ri is the range of the i-th component. I am confused about which distance measure is used ...
1
vote
2
answers
1k
views
Correctly interpreting Cosine Angular Distance Similarity & Euclidean Distance Similarity
As an example, let's say I have a very simple data set. I am given a csv with three columns, user_id, book_id, rating. The rating can be any number 0-5, where 0 means the user has NOT rated the book.
...
1
vote
1
answer
381
views
Distance Estimation Using Quantum Computer
I did a small benchmarking to compare quantum version of algorithm to its classical version, and I found that quantum computing taking so much time in comparison to classical version.
I don't ...
1
vote
1
answer
1k
views
Distance Calculations for Nearest Mean Classifer
Greetins,
How can I calculate how many distance calculations would need to be performed to classify the IRIS dataset using Nearest Mean Classifier.
I know that IRIS dataset has 4 features and every ...
1
vote
1
answer
183
views
How to convert TS-SS result to similarity measure between 0 - 1?
I'm currently developing a question plugin for some LMS that auto grade the answer based on the similarity between the answer and answer key with cosine similarity. But lately, I found that there is a ...
1
vote
0
answers
218
views
How to I create a tensor of euclidean distances from the maxval in an image array using TensorFlow?
I'm trying to write a custom loss function that inputs a batch of multichannel images and outputs a loss based on how well-clustered the pixel values are around the max value of each image on average.
...
1
vote
1
answer
1k
views
Facial identification using difference of L2 distances
I've had some confusion on this for some time now. When FaceNet is run on an image, it returns an 128 element array in Euclidean space/L2 (even this is something I do not completely get). I've had the ...
1
vote
2
answers
1k
views
How K-NN Algorithms work with same distance in rapidminer?
Actually I already asked in rapidminer forum, but no one has given an answer yet..
https://community.rapidminer.com/discussion/55963/how-k-nn-algorithms-work-with-same-distance-in-rapidminer#latest
I ...
1
vote
0
answers
125
views
caffe custom Euclidean layer
I need to do a rather simple thing using the caffe framework. I want to create a new custom c++ Euclidean layer. This layer should set all values of the bottom[1] BLOB (ground truth data) to the ...
1
vote
1
answer
249
views
digit categorisation using Euclidean distance
I want to categorise digits which are represented in a 64 dimensional space which gives an 8X8 pixel character image. Each attribute is an integer from 0...16. I have 20 rows of 64 values plus one at ...
1
vote
1
answer
2k
views
How to define weights for KNN?
I want to identify a set of weights for the distance measure in KNN method. I read through the MATLAB help and I found that there are functions for inverse or squared inverse (w.r.t the distances) ...
0
votes
1
answer
450
views
Weighted Euclidean Distance while Merging Feature Vectors?
I have two groups of features (describing an image, in a machine learning context). The first group A, consisting of 3 features, and group B consisting of 15 features.
A = [f1, f2, f3]
B = [f4, f5, ..,...
0
votes
1
answer
705
views
computing the euclidean distance for KNN
I've been seeing a lot of examples of computing euclidean distance for KNN but non for sentiment classification.
For example I have a sentence "a very close game"
How do I compute the euclidean ...
0
votes
1
answer
373
views
Similarity Metrics
I am trying to research on different metrics and found many ssimilarity metrics : Euclidean distance Dynamic Time Warping, Edit Distance with Real
Penalty DISSIM , Sequence Weighted Alignment model, ...
0
votes
0
answers
104
views
How do I assign weights using Kernel function based on a vector of pairwise Euclidean distance?
I want to quantify the dissimilarity between two group. Each group has 5 observations, so there are 25 combinations.
For each combination, I have calculated their pairwise Euclidean distance (based ...
0
votes
0
answers
2k
views
How to convert Euclidean Distance to a percentage confidence?
I have an application doing facial recognition which uses euclidean distance to compare encoded numpy arrays of faces. The algorithm outputs the distance between the two face images as a float value.
...
0
votes
0
answers
159
views
Online Metric Learning for Face Recognition
I'm using OpenFace to compute representations (in 128D) for faces found in images taken under unconstrained conditions that show significant variations in lighting, time, etc.
According to their ...
0
votes
1
answer
1k
views
There are other useful similarity or distance metrics?
I'm developing an approximate computation system. Defining how much similar two objects are is a basic operation in such a system.
Usually in computer science and math, similarity is synonym of ...
-1
votes
2
answers
2k
views
Why tsne method use Euclidean distance to compute the similarities in high dimensional data?
I have tried other distance metrics like chebychev distance or Manhatten distance and so on, which are all implemented in tsne in Matlab. Some of them achieve the same good performance as Euclidean ...