Displaying 20 results from an estimated 1000 matches similar to: "dist function in R is very slow"
2017 Jun 18
0
dist function in R is very slow
> By the way, since the tcrossprod function in the Matrix package is so fast, the Euclidean distance can be computed very fast:
Indeed.
> euc_dist <- function(m) {mtm <- Matrix::tcrossprod(m); sq <- rowSums(m*m); sqrt(outer(sq,sq,"+") - 2*mtm)}
There are two reasons why I didn't use this optimization in "wordspace":
1) It can be inaccurate for small
2017 Jun 17
1
dist function in R is very slow
Dear R developers,
I am visualising high dimensional genomic data and for this purpose I need to compute pairwise distances between many points in a high-dimensional space (say I have a matrix of 5,000 rows and 20,000 columns, so the result is a 5,000x5,000 matrix or it's upper diagonal).Computing such thing in R takes many hours (I am doing this on a Linux server with more than 100 GB of RAM,
2013 Nov 25
2
Samba4 in FreeBSD cannot upgrade dns
Hi, Samba team!
I am trying to install samba4 on FreeBSD 9.2 as a domain DC to join an
existing samba4 domain controller on FreeBSD 9.2.
I followed the instruction of:
Samba4/HOWTO/Join a domain as a DC
Everything is OK until I run the following command:
root at mtm:/var/named/etc/namedb # samba-tool drs showrepl
Default-First-Site-Name\MTM
DSA Options: 0x00000001
DSA object GUID:
2010 Jan 21
2
"stack imbalance in ..." when loading a workspace
Hi all,
I just failed in loading a saved wordspace (13MB of size), and received
these errors:
Warning: stack imbalance in 'missing', 52 then 51
Warning: stack imbalance in 'if', 50 then 53
Warning: stack imbalance in 'as.environment', 57 then 59
Warning: stack imbalance in 'ls', 54 then 53
Warning: stack imbalance in '.Internal', 54 then 53
Warning: stack
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
2003 Nov 07
6
SIP protocol bug ???
Hello,
I have a problem with asterisk when dial out to a SIP
provider.
Asterisk send a INVITE with no credentials, the
provider reply with a 401 Unauthorized.
However, Asterisk DOES NOT resend the invite again
with credentials. But it hangs there (maybe waiting
for a ok)
It is this a bug in asterisk or the provider is
supposed to send something else rather than a 401
as answer for a INVITE ?
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
2007 Sep 02
1
buglet in dist() ?
the first line of dist() says
if (!is.na(pmatch(method, "euclidian")))
shouldn't that be "euclidean" ?
---------------------
R version 2.5.1 (2007-06-27)
i486-pc-linux-gnu
locale:
2007 May 02
2
NAs introduced by coercion in dist()
I work with Windows and use R version 2.4.1. I am JUST starting to learn this
program...
I get this warning message 'NAs introduced by coercion' while trying to
build a distance matrix (to be analyzed with NMDS later) from a 336 x 100
data matrix. The original matrix has lots of zeros and no missing values,
but I don't think this should matter.
I searched this forum and people have
2011 Mar 18
3
exploring dist()
Hello, everybody,
I hope somebody could help me with a dist() function.
I have a data frame of size 2*4087 (col*row), where col corresponds to the
treatment and rows are
species, values are Hellinger distances, I should reconstruct a distance
matrix
with a dist() function. I know that "euclidean" method should be used.
When I type:
dist(dframe,"euclidean")
it gives me a
2007 Apr 25
1
dist label names
Hello,
I am trying to do a multi-dimensional scaling of the World Bank's quality
of governance indicators for the Balkan region. I am having trouble
labelling my plot. Could some kind person help me out. How do I set the
attribute Label by a variable (say, "Code")? At present I get this:
>qog.dist<-dist(Balkans.data, method = "euclidean", diag = FALSE, upper =
2002 Oct 21
1
dist() {"mva" package} bug: treats +/- Inf as NA
Vince Carey found this (thank you!).
Since the fix to the problem is not entirely obvious, I post
this to R-devel as RFC:
help(dist) says:
>> Missing values are allowed, and are excluded from all computations
>> involving the rows within which they occur. If some columns are
>> excluded in calculating a Euclidean, Manhattan or Canberra
>> distance, the sum is
2015 May 15
2
https everywhere.
What are the plans for the CentOS repos with respect to authentication
and https everywhere? At the moment it is a trivial exercise to
perform a MTM attack during a yum update over http.
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited
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 May 05
2
custom metric for dist for use with hclust/kmeans
Hi guys,
I've been using the kmeans and hclust functions for some time now and
was wondering if I could specify a custom metric when passing my data
frame into hclust as a distance matrix. Actually, kmeans doesn't even
take a distance matrix; it takes the data frame directly. I was
wondering if there's a way or if there's a package that lets you
create distance matrices from
2012 Jun 16
1
Efficient distance calculation on big matrix
Hi All,
I'm working on analyzing a large data set, lets asume that
dim(Data)=c(1000,8700). I want to calculate the canberra distance
between the columns of this matrix, and using a toy example ('test' is
a matrix filled with random numbers 0-1):
> system.time(d<-as.matrix(dist(t(test), method = "canberra", diag = FALSE, upper = FALSE, p = 2)))
user system
2008 Aug 21
1
[dist]how to analise a large matrix?
Hi all,
I have a matrix of about 100.000?x 4?that I need?to classify using
euclidean metric. For that I am using dist?or daisy functions, but I
am afraid that the message: Error in vector("double", length) : vector
size specified is too large, means too much lines.
Can anyone suggest me how should I analyse this matrix?
Thanks in advance,
Diogo Andr? Alagador
MNCN,CSIC, Madrid, Spain
2013 Jul 18
1
binary distance measure of the "dist" function in the "stats" package
Dear all:
I want to ask question about "binary" distance measure. As far as I
know, there are many binary distance measures,eg, binary Jarcad distance,
binary euclidean distance, and binary Bray-Curtis distance,etc. It is even
more confusing because many have more than one name. So , I wan to know
what the definite name of the binary distance measure of the "dist"
function
2002 Dec 19
1
newbie question on dist
hi,
i have just begun using R, so please bear with me.
i am trying to use cmdscale and display the result. i read the data
using read.table(), calculate the proximity matrix using dist() and
the display the result using the cmdscale(). this is very fine.
in addition, i want the display to distinguish between two classes
of records in my data. i have my data records marked as "1" or
1999 Jan 20
2
dist function suggestion
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-162216788-916833047=:29339
Content-Type: TEXT/PLAIN; charset=US-ASCII
On my R installation (0.62.4) there is no dist() function, so I attach one
possibility. It provides