in Education by
I am trying to calculate Euclidean Distance for MNIST data set. X_Train = 60,000*784 and X_Test = 10,000*784 D= No. of Columns, M= rows of training set and N = rows of test set I've done X_test_sq = sum(X_test(:,1:784),2) and same for training set and I get 10,000*1 and 60,000*1 vectors. But I don't understand what XtestSqrR means and shouldn't X_cross be dot product? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
XtestSqrR is the sum squared distance (with respect to the origin of 0,0,...,0). The distance along each dimension is: sum( X(:,d).^2 ) (square first then sum); then you can sum across dimensions (d goes from 1 to 60,000). Also I think the x means matrix multiplication, not cross product. So a matrix of 60,000*784 multiplied by a matrix of (784*10,000), would be 60,000*10,000.

Related questions

0 votes
    How would you identify specific points in an image based on the pixels around the point(s) that you ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    For the given points, how will you calculate the Euclidean distance in Python?...
asked Apr 26, 2021 in Technology by JackTerrance
0 votes
    Every now and then, variables just stop showing up in the Workspace pane. who and whos show that there ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    I have a distribution of tube radius r, and I would like to plot tubes for all the sampled r in ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I have a dataset with labels and datapoints, problem is that rather then a classification problem I want to ... quadratic estimation. Select the correct answer from above options...
asked Feb 3, 2022 in Education by JackTerrance
0 votes
    I have a 2D space in which a function value is defined (you can think of it as a manifold). Now ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 16, 2022 in Education by JackTerrance
0 votes
    Why Should I Use Numpy Rather Than Idl, Matlab, Octave, Or Yorick?...
asked Apr 25, 2021 in Technology by JackTerrance
0 votes
    Why is NumPy preferred to other programming tools such as Idl, Matlab, Octave, Or Yorick?...
asked Apr 24, 2021 in Technology by JackTerrance
0 votes
    Asynchronous update ensures that the next state is atmost unit hamming distance from current state, is that true? ... Networks of Neural Networks Please answer the above question....
asked Aug 30, 2022 in Education by JackTerrance
0 votes
    I'm using Elasticsearch 6.6 and have an index (1 shard, 1 replica) with the geonames (https:// ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I'm using a lat/long SRID in my PostGIS database (-4326). I would like to find the nearest ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    I am wanting to find the distance between two different points. This I know can be accomplished with the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I am seeking an Android solution to calculate the distance to an object and then determine the size (height ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    As the title said, I'm trying to implement an algorithm that finds out the distances between all pairs of nodes in given ... the edges can be considered as having weight of 1. |E|...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    Can I specify my own distance function using scikit-learn K-Means Clustering? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
...