Displaying 20 results from an estimated 2000 matches similar to: "SVD for reducing dimensions"
2008 May 16
1
Dimensions of svd V matrix
Hi,
I'm trying to do PCA on a n by p wide matrix (n < p), and I'd like to
get more principal components than there are rows. However, svd() only
returns a V matrix of with n columns (instead of p) unless the argument
nv=p is set (prcomp calls svd without setting it). Moreover, the
eigenvalues returned are always min(n, p) instead of p, even if nv is set:
> x <-
2001 Jun 01
1
v matrix of svd(X) loses dimensions if nrow(X)==1 (PR#963)
Dear R-developers
I'm not very sure whether this is really a bug and not a feature:
> is.matrix(svd(matrix(1:12,nrow=1))$v)
[1] FALSE
In all other cases the $v component is a matrix. Also, the $u component
always seems to be a matrix as indicated in the doc.
My R-version:
> version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
2008 Feb 23
1
Error in ma.svd(X, 0, 0) : 0 extent dimensions
Hi,
I run a maanova analysis and found this message error:
Error in ma.svd(X, 0, 0) : 0 extent dimensions
I did a google search and found this:
\item ma.svd: function to compute the sigular-value decomposition
of a rectangular matrix by using LAPACK routines DEGSVD AND ZGESVD.
\item fdr: function to calculate the adjusted P values for FDR control.
I did a search for LAPACK and
2000 Aug 10
1
svd error (PR#631)
--=====================_24736660==_
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
SVD-Error on
R 1.1.0
Windows 98
I get the following error applying svd on a positive definite matrix :
> sk2
[,1] [,2] [,3] [,4] [,5]
[1,] 1.0460139783 0.084356992 -2.810553e-04
2008 Apr 15
1
SVD of a variance matrix
Hello!
I suppose this is more a matrix theory question than a question on R,
but I will give it a try...
I am using La.svd to compute the singular value decomposition (SVD) of
a variance matrix, i.e., a symmetric nonnegative definite square
matrix. Let S be my variance matrix, and S = U D V' be its SVD. In my
numerical experiments I always got U = V. Is this necessarily the
case? Or I might
2007 Oct 17
3
Observations on SVD linpack errors, and a workaround
Lately I'm getting this error quite a bit:
Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd'
I'm running R 2.5.0 on a 64 bit Intel machine running Fedora (8 I think).
Maybe the 64 bit platform is more fragile about declaring convergence.
I'm seeing way more of these errors than I ever have before.
From R-Help I see that this issue comes up from time to
2011 Sep 13
1
SVD Memory Issue
I am trying to perform Singular Value Decomposition (SVD) on a Term Document
Matrix I created using the 'tm' package. Eventually I want to do a Latent
Semantic Analysis (LSA).
There are 5677 documents with 771 terms (the DTM is 771 x 5677). When I try
to do the SVD, it runs out of memory. I am using a 12GB Dual core Machine
with Windows XP and don't think I can increase the memory
2002 Apr 01
3
svd, La.svd (PR#1427)
(I tried to send this earlier, but it doesnt seem to have come through,
due to
problems on my system)
Hola:
Both cannot be correct:
> m <- matrix(1:4, 2)
> svd(m)
$d
[1] 5.4649857 0.3659662
$u
[,1] [,2]
[1,] -0.5760484 -0.8174156
[2,] -0.8174156 0.5760484
$v
[,1] [,2]
[1,] -0.4045536 0.9145143
[2,] -0.9145143 -0.4045536
> La.svd(m)
$d
[1]
2001 Sep 06
1
svd and eigen
Hello List,
i need help for eigen and svd functions. I have a non-symmetric
square matrix. These matrix is not positive (some eigenvalues are
negative). I want to diagonalise these matrix. So, I use svd and
eigen and i compare the results. eigen give me the "good" eigenvalues
(positive and negative). I compare with another software and the
results are the same. BUT, when i use svd,
2012 Dec 05
1
Understanding svd usage and its necessity in generalized inverse calculation
Dear R-devel:
I could use some advice about matrix calculations and steps that might
make for faster computation of generalized inverses. It appears in
some projects there is a bottleneck at the use of svd in calculation
of generalized inverses.
Here's some Rprof output I need to understand.
> summaryRprof("Amelia.out")
$by.self
self.time self.pct
2001 Nov 02
1
Look, Watson! La.svd & ATLAS
Dear R-devel,
I had attempted to compile r-devel (dated Oct. 31, 2001) on WinNT with link
to ATLAS, with mostly success. However, when I tried the following, I got a
visit from Dr. Watson:
R : Copyright 2001, The R Development Core Team
Version 1.4.0 Under development (unstable) (2001-10-31)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under
2000 May 10
4
Q: Problems with eigen() vs. svd()
At 01:37 PM 5/10/00 +0200, ralle wrote:
>Hi,
>I have a problem understanding what is going on with eigen() for
>nonsymmetric matrices.
>Example:
>h<-rnorm(6)
>> dim(h)<-c(2,3)
>> c<-rnorm(6)
"c" is not a great choice of identifier!
>> dim(c)<-c(3,2)
>> Pi<-h %*% c
>> eigen(Pi)$values
>[1] 1.56216542 0.07147773
These could
2005 Jan 27
2
svd error
Hi,
I met a probem recently and need your help. I would really appreciate
it.
I kept receiving the following error message when running a program:
'Error in svd(X) : infinite or missing values in x'.
However, I did not use any svd function in this program though I did
include the function pseudoinverse. Is the problem caused by doing
pseudoinverse?
Best regards,
Tongtong
2013 Apr 08
3
SVD on very large data matrix
Dear All,
I need to perform a SVD on a very large data matrix, of dimension ~ 500,000 x 1,000 , and I am looking
for an efficient algorithm that can perform an approximate (partial) SVD to extract on the order of the top 50
right and left singular vectors.
Would be very grateful for any advice on what R-packages are available to perform such a task, what the RAM requirement is, and indeed what
2001 May 19
1
COMPUTING DETERMINANT FROM SVD
Dear R-users,
I computed determinant of a square matrix "var.r" using the SVD output:
detr _ 1
d _ svd(var.r)$d
for (i in 1:length(d)) {
detr _ detr*d[i]
}
print(detr)
30.20886
BUT when I tried :
det(var.r)
I got :
-30.20886
Is this because SVD output will only give absolute of the eigenvalues ?, If
this is the case
how can I get the original eigenvalues?
Thanks,
Agus
2012 Dec 06
1
svd(X, LINPACK=TRUE) alters its input
Ordinary functions should not alter their inputs but in R-2.15.2
svd(LINPACK=TRUE,X) does. (It worked in 2.15.0 but not in 2.15.1
or 2.15.2 and became deprecated in 2.15.2.)
> X <- matrix(c(1,2,3, 5,7,11, 13,17,19), 3, 3)
> X
[,1] [,2] [,3]
[1,] 1 5 13
[2,] 2 7 17
[3,] 3 11 19
> svd(X, LINPACK=TRUE)$d
[1] 31.9718214 2.3882717 0.3143114
Warning message:
2009 Aug 09
1
Inaccuracy in svd() with R ubuntu package
On two laptops running 32-bit kubuntu, I have found that svd(), invoked
within R 2.9.1 as supplied with the current ubuntu package, returns very
incorrect results when presented with complex-valued input. One of the
laptops is a Dell D620, the other a MacBook Pro. I've also verified the
problem on a 32-bit desktop. On these same systems, R compiled from
source provides apparently
1997 Oct 17
2
R-alpha: bug in svd
I use R Version 0.60 Alpha (September 18, 1997) on a Linux Pentium
(Debian 1.3) and on a Sparc-Sun-Solaris 2.5.=20
R> svd(matrix(1:16,4,4))
=09yields on both machines
Error: error 4 in dsvdc
R> svd(matrix(1:20,4,5))
=09gives a result on the Linux computer
$d
[1] 0 0 0 NA
$u
[,1] [,2] [,3] [,4]
[1,] 1 0 0 0
[2,] 0 1 0 0
[3,] 0 0 1 0
[4,] 0
2012 Jul 09
3
Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'
Hello,
I am trying to run an ordinal logistic regression (polr) using the package
'MASS'.
I have successfully run other regression classes (glm, multinom) without
much problem, but with the 'polr' class I get the following error:
" Error in svd(X) : infinite or missing values in 'x' "
which appears when I run the "summary" command.
The data file is
2001 Feb 05
1
SVD of complex matrices
Is there a way to determine the SVD of a complex matrix using R?
(I'm using v1.0.1 and svd() won't do the trick).
I know LAPACK has a function to do this.
Thanks
--
Ben Stapley
Biomolecular Modelling Lab
Imperial Cancer Research
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send