similar to: squared euclidean distance

Displaying 20 results from an estimated 1000 matches similar to: "squared euclidean distance"

2008 Jan 31
3
fastest way to compute the squared Euclidean distance between two vectors in R
I have a program which needs to compute squared Euclidean distance between two vectors million of times, which the Rprof shows is the bottleneck. I wondered if there is any faster way than my own simple function distance2 = function(x1, x2) { temp = x1-x2 sum(temp*temp) } I have searched the R-help archives and can not find anything except when the arguments are matrices. Thanks for any
2012 Nov 18
2
euclidean dist. between matrices
Dear Users,I have two matrices A=15*365 and B=1*365. i want to calculate "Euclidean Distance" between these matrices in such a way that i should have euclidean distance of matrix B against all the columns of matrix A. More precisely, first i want euclidean dist. of column 1 of A against B, then column 2 against B, 3rd column of A against B and so on.is there a way in r to do it?your help
2011 Jul 06
1
relative euclidean distance
Hi, I would like to calculate the RELATIVE euclidean distance. Is there a function in R which does it ? (I calculated the abundance of 94 chemical compounds in secretion of several individuals, and I would like to have the chemical distance between 2 individuals as expressed by the relative euclidean distance. Some compounds are in very low abundance whereas others are in high abundance,
2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated: 3x3 subset used
2012 Aug 24
3
Euclidean distance function
Hi, I should preface this problem with a statement that although I am sure this is a really easy function to write, I have tried and failed to get my head around writing functions in R. I can use R where functions exist to do what I want done, but have found myself completely incapable of writing them myself. The problem is that I have a table with several rows of species and several columns of
2013 Mar 28
2
hierarchical clustering with pearson's coefficient
Hello, I want to use pearson's correlation as distance between observations and then use any centroid based linkage distance (ex. Ward's distance) When linkage distances are formed as the Lance-Williams recursive formulation, they just require the initial distance between observations. See here: http://en.wikipedia.org/wiki/Ward%27s_method It is said that you have to use euclidean
2010 Jun 24
2
Euclidean Distance Matrix Analysis (EDMA) in R?
I am studying on statistical shape analysis, I wonder is there any way or package available that I can perform Euclidean Distance Matrix Analysis (EDMA I or EDMA II) in R... thanks Gokhan -- View this message in context: http://r.789695.n4.nabble.com/Euclidean-Distance-Matrix-Analysis-EDMA-in-R-tp2266797p2266797.html Sent from the R help mailing list archive at Nabble.com.
2011 Apr 05
2
Euclidean Distance in R
Hi 1. I have two raster files *.asc (identical size) 2. The data in each contain presence or absence data in each cell represented by a 1 or 0 respectively 3. I would like to take the location of each 1 (presence cell) in raster file 1 and measure the euclidean distance to the nearest 1 (presence cell) in raster file 2. Obviously in some cases there will be overlap so the distance will be zero.
2010 Apr 26
2
Cluster analysis: dissimilar results between R and SPSS
Hello everyone! My data is composed of 277 individuals measured on 8 binary variables (1=yes, 2=no). I did two similar cluster analyses, one on SPSS 18.0 and one on R 2.9.2. The objective is to have the means for each variable per retained cluster. 1) the R analysis ran as followed: > call data > dist=dist(data,method="euclidean") >
2008 Oct 01
3
for loop question Documentation and its application for calculating euclidean distance on MDS ordination axis scores
?for doesn't return anything help.search("for") doesn't return anything- Is the for loop so prevelant in computer programing that the documentation is implicit or is R paradigm to discourage the use of the for loop. I will post data probably tonight, but here is my problem. I have preformed an MDS on a set of data. I have the scores of the four axes that are the optimal
2008 Oct 06
1
easier way to do this without a loop? (successive euclidean distances between points)
a <- c(1:10) b <- c(.5, .6, .9, 10, .4, 3, 4, 9, 0, 11) d <- c(21:30) z <- data.frame(a,b,d) library(fields) results <- c() for(i in 1:(length(rownames(z))-1)){ results[i] <- rdist(z[i,], z[(i+1),]) } results.1 <- data.frame(results) f <- rownames(z) r <- f[-1] rownames(results.1) <- r colnames(results.1) <- f[1] this does what I want it to do - is
2011 Jul 08
1
Visualizing a dissimilarity matrix in Euclidean space
Hi, I have a set of nodes and a dissimilarity matrix for them, as well as a csv file in which the diss matrix has been converted to [node_1, node_2, dissimilarity] format. I would like to visualize this as a graph in Euclidean space (that is, similar nodes clumped together in clusters), rather than the seriation visualization given by dissplot(). I am using Network WorkBench for my
2018 Mar 15
0
stats 'dist' euclidean distance calculation
> 3x3 subset used > Locus1 Locus2 Locus3 > Samp1 GG <NA> GG > Samp2 AG CA GA > Samp3 AG CA GG > > The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2)) My > assumption was that the difference between
2010 Nov 03
1
install vegan
Dear all, I am trying to install Vegan, but I allways get the following error message: Warning in install.packages(choose.files("", filters = Filters[c("zip", : 'lib = "C:/Programme/R/R-2.12.0/library"' is not writable Error in install.packages(choose.files("", filters = Filters[c("zip", : unable to install packages >
2009 Jan 14
2
Vectorization of three embedded loops
Dear R-programmer, I wrote an adapted implementation of the Kennard-Stone algorithm for sample selection of multivariate data (R 2.7.1 under MacBook Pro, Processor 2.2 GHz Intel Core 2 Duo, Memory 2 GB 667 MHZ DDR2 SDRAM). I used for the heart of the script three embedded loops. This makes it especially for huge datasets very slow. For a datamatrix of 1853*1853 and the selection of 556
2009 Apr 25
1
fclustindex, e1071 package
Hi, I'm using e1071 package to do fuzzy cluster analysis. My dataset (ra) has 5237 observations and 2 variables - depth and velocity. I used fuzzy cmeans to create 6 fuzzy classes. >ra.flcust6<-cmeans(ra,6,iter.max=100,verbose=F,dist="euclidean",method="cmea ns",m=1.7,rate.par=NULL,weights=1) I would like to calculate the value of all the fuzzy validity
1999 Jan 20
0
dist(*, "euclidean") [was "dist function suggestion"]
> BDR> You will need to call it something else: dist is a clone of an S > BDR> function, and dist(X, "manhattan") is well-established usage. > > one could still imagine an extra Y argument such that > dist(X, Y=myY, method="euclidean") > and dist(X, "euclidean", Y=myY) > would work > one could even make it such that > both
2010 May 20
1
finding euclidean proximate points in two datasets
Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. Given a set of points in 2-d space X, i'm trying to find the subset of points in Y proximate to each point in X. Furthermore, the proximity threshold of each point in X differs (X$threshold). I've constructed this myself already, but it's horrificly slow with a
2013 Apr 09
4
quotes in cat() within function
Hello all, Sorry if this question has been answered in the past, but I could not find an answer. I am trying to print quotes within a cat output. The arguments are: file= "Data labels" directory= "/home/mylaptop/" The function returns: cat("The file", file, "is located in directory", directory, sep=" ") The output R prints is The file Data
2013 Sep 10
2
Normalidad para datos multivariados
Hola! Estoy teniendo un problema para testar la normalidad y la homogeneidad de varianzas para mi modelo de manova Es este mi modelo: m1<-manova(cbind(pred,fit,oniv)~tratamento/parcela+bloco,data.vegetacao) Aparte de tener tres variables respuestas (predador, fitófago, omnívoro), también es un diseño anidado. Alguien sabría responder esto? Gracias! Carol [[alternative HTML version