Displaying 20 results from an estimated 5000 matches similar to: "crossprod and X %*% t(X)"
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis
i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values
> dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2005 Jan 27
3
the incredible lightness of crossprod
The following is at least as much out of intellectual curiosity
as for practical reasons.
On reviewing some code written by novices to R, I came
across:
crossprod(x, y)[1,1]
I thought, "That isn't a very S way of saying that, I wonder
what the penalty is for using 'crossprod'." To my surprise the
penalty was substantially negative. Handily the client had S-PLUS
as
2006 Nov 21
1
crossprod(x) vs crossprod(x,x)
I found out the other day that crossprod() will take a single matrix
argument;
crossprod(x) notionally returns crossprod(x,x).
The two forms do not return identical matrices:
x <- matrix(rnorm(3000000),ncol=3)
M1 <- crossprod(x)
M2 <- crossprod(x,x)
R> max(abs(M1-M2))
[1] 1.932494e-08
But what really surprised me is that crossprod(x) is slower than
crossprod(x,x):
R>
2002 Mar 15
1
Thought on crossprod
Hi everyone,
I do a lot of work with large variance matrices, and I like to use
"crossprod" for speed and to keep everything symmetric, i.e. I often
compute "crossprod(Q %*% t(A))" for "A %*% Sigma %*% t(A)", where
"Sigma" decomposes as "t(Q) %*% Q". I notice in the code that
"crossprod", current definition
> crossprod
function (x,
2005 Oct 05
2
eliminate t() and %*% using crossprod() and solve(A,b)
Hi
I have a square matrix Ainv of size N-by-N where N ~ 1000
I have a rectangular matrix H of size N by n where n ~ 4.
I have a vector d of length N.
I need X = solve(t(H) %*% Ainv %*% H) %*% t(H) %*% Ainv %*% d
and
H %*% X.
It is possible to rewrite X in the recommended crossprod way:
X <- solve(quad.form(Ainv, H), crossprod(crossprod(Ainv, H), d))
where quad.form() is a little
2003 Oct 17
2
Problems with crossprod
Dear R-users,
I found a strange problem
working with products of two matrices, say:
a <- A[i, ] ; crossprod(a)
where i is a set of integers selecting rows. When i is empty
the result is in a sense random.
After some trials the right answer
(a matrix of zeros) appears.
--------------- Illustration --------------------
R : Copyright 2003, The R Development Core Team
Version 1.8.0
2004 Oct 06
3
crossprod vs %*% timing
Hi
the manpage says that crossprod(x,y) is formally equivalent to, but
faster than, the call 't(x) %*% y'.
I have a vector 'a' and a matrix 'A', and need to evaluate 't(a) %*% A
%*% a' many many times, and performance is becoming crucial. With
f1 <- function(a,X){ ignore <- t(a) %*% X %*% a }
f2 <- function(a,X){ ignore <-
2008 Mar 10
1
crossprod is slower than t(AA)%*BB
Dear Rdevelopers
The background for this email is that I was helping a PhD student to
improve the speed of her R code. I suggested to replace calls like
t(AA)%*% BB by crossprod(AA,BB) since I expected this to be faster. The
surprising result to me was that this change actually made her code
slower.
> ## Examples :
>
> AA <- matrix(rnorm(3000*1000),3000,1000)
> BB <-
2009 Oct 20
0
[LLVMdev] 2.6 pre-release2 ready for testing
Hi Tanya,
> 1) Compile llvm from source and untar the llvm-test in the projects
> directory (name it llvm-test or test-suite). Choose to use a
> pre-compiled llvm-gcc or re-compile it yourself.
I compiled llvm and llvm-gcc with separate objects directories.
Platform is x86_64-linux-gnu.
> 2) Run make check, report any failures (FAIL or unexpected pass). Note
> that you need to
2003 Sep 07
3
bug in crossprod? (PR#4092)
# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
# r-bugs@r-project.org
#
######################################################
# The last line of following code produces a segmentation fault:
x <- 1:10
f <- gl(5,2)
2013 May 23
4
[LLVMdev] Polyhedron 2005 results for dragonegg 3.3svn
Below are the results for the Polyhedron 2005 benchmarks compiled with llvm/compiler-rt/dragonegg 3.3svn at r182439 against current
FSF gcc 4.7.3svn and 4.8.1svn. The only major bug remaining in the dragonegg 3.3svn support for gcc 4.8.x is http://llvm.org/bugs/show_bug.cgi?id=15980
which results in unresolved symbols for _iround and _iroundf in the aermod and rnflow testcases. Note that this
2007 Dec 08
0
help for segmented package
Hi,
I am trying to find m breakpoints of a linear regression model. I
used the segmented package. It works fine for small number of
predicators and breakpoints.(3 r.v. 3 points). However, my model has
14 variables it even would not work even for just one breakpoints!.
The error message is always estimated breakpoints are out of range.
Since my problem is time related problem. So I
2009 Oct 17
12
[LLVMdev] 2.6 pre-release2 ready for testing
LLVMers,
2.6 pre-release2 is ready to be tested by the community.
http://llvm.org/prereleases/2.6/
If you have time, I'd appreciate anyone who can help test the release.
To test llvm-gcc:
1) Compile llvm from source and untar the llvm-test in the projects
directory (name it llvm-test or test-suite). Choose to use a pre-
compiled llvm-gcc or re-compile it yourself.
2) Run make check,
2009 Feb 07
11
[LLVMdev] 2.5 Pre-release1 available for testing
LLVMers,
The 2.5 pre-release is available for testing:
http://llvm.org/prereleases/2.5/
If you have time, I'd appreciate anyone who can help test the release.
Please do the following:
1) Download/compile llvm source, and either compile llvm-gcc source or
use llvm-gcc binary (please compile llvm-gcc with fortran if you can).
2) Run make check, send me the testrun.log
3) Run "make
2009 Oct 20
1
[LLVMdev] 2.6 pre-release2 ready for testing
G'Day Tanya,
Is it too late to bring in the following patches to fix some major
brokenness in the AuroraUX tool chain for 2.6?
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?r1=84468&r2=84469&view=diff&pathrev=84469
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?r1=84265&r2=84266&view=diff&pathrev=84266
2013 Mar 05
1
crossprod(): g77 versus gfortran
Hi
I've got two builds of R, one using g77 (version 3.4.6) and the other
using gfortran (version 4.1.2). The two builds are otherwise identical
as far as I can tell. The one which used g77 performs crossprod()s
roughly twice as fast as the gfortran one. I'm wondering if this rings a
bell with anyone, and if so, are you aware of any configure settings
which will improve the performance
2013 Mar 06
3
About basic logical operators
Hello everyone,
I have a basic question regarding logical operators.
> x<-seq(-1,1,by=0.02)
> x
[1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78
[13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.56 -0.54
[25] -0.52 -0.50 -0.48 -0.46 -0.44 -0.42 -0.40 -0.38 -0.36 -0.34 -0.32 -0.30
[37] -0.28 -0.26 -0.24 -0.22 -0.20 -0.18 -0.16
2008 Jan 24
6
[LLVMdev] 2.2 Prerelease available for testing
LLVMers,
The 2.2 prerelease is now available for testing:
http://llvm.org/prereleases/2.2/
If anyone can help test this release, I ask that you do the following:
1) Build llvm and llvm-gcc (or use a binary). You may build release
(default) or debug. You may pick llvm-gcc-4.0, llvm-gcc-4.2, or both.
2) Run 'make check'.
3) In llvm-test, run 'make TEST=nightly report'.
4) When
2010 Mar 27
1
R runs in a usual way, but simulations are not performed
Dear addresses, I need perform a batch of 10 000 simulations for each of
4 options considered. (The idea is to obtain the parameter estimates in
a heteroskedastic linear regression model - with additive or mixed
heteroskedasticity - via the Kenward-Roger small-sample adjusted
covariance matrix of disturbances). For this purpose I wrote an R
program which would capture all possible options (true
2013 May 29
0
[LLVMdev] Polyhedron 2005 results for dragonegg 3.3svn
On Wed, May 29, 2013 at 03:25:30PM +0200, Duncan Sands wrote:
> Hi Jack, I pulled the loop vectorizer and fast math changes into the 3.3 branch,
> so hopefully they will be part of 3.3 rc3 (and 3.3 final!). It would be great
> if you could redo the benchmarks rc3.
>
Duncan,
As requested, appended are the updated Polyhedron 2005 benchmark results with both RC1 and RC3 llvm 3.3