similar to: Problem with %*%

Displaying 20 results from an estimated 9000 matches similar to: "Problem with %*%"

2010 Dec 09
1
problem on Matrix package~~
Hi,all! I encountered a problem "not-yet-implemented method for <list> %*% <dgCMatrix>" when I tried "diagr %*% design_mat", where "diagr<-diag(vr,100)", vr is a vector with 100 elements, and design_mat is a sparse matrix with dimension 100*677000 constructed by calling sparseMatrix(). I am new to the Matrix package, so I am confused with this, and I
2018 Apr 23
0
R 3.5.0 fails its regression test suite on Linux/x86_64
On 23/04/2018 6:33 AM, Peter Simons wrote: > Hi, > > I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new > version fails its regression test suite. We configure the build using > the flags "--without-recommended-packages", in case that's relevant. You > can see a complete build log with all relevant information at [1]. > Anyway, the test
2011 Aug 23
0
Matrix:::qr.qy and signature(qr = "sparseQR", y = "dgCMatrix")
> sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Matrix_0.999375-50 lattice_0.19-30 loaded via a namespace (and not attached): [1] grid_2.13.1
2015 Mar 19
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
Hi Martin I got stung by this last week. glmnet produces a coefficient matrix of class ?dgCMatrix? If a predictor matrix was created using sparseMatrix as follows, one gets unexpected results, as this simple example shows. My fix was easy (I always convert the predictor matrix to class ?dgCMatrix? now) Trevor > y=Matrix(diag(4)) > y 4 x 4 diagonal matrix of class "ddiMatrix"
2018 Apr 23
4
R 3.5.0 fails its regression test suite on Linux/x86_64
Hi, I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new version fails its regression test suite. We configure the build using the flags "--without-recommended-packages", in case that's relevant. You can see a complete build log with all relevant information at [1]. Anyway, the test failures look like this: | make[3]: Entering directory
2016 Apr 20
0
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Tue, 19 Apr 2016 14:04:11 -0700 writes: > Using the Matrix package, how can I create a row-oriented sparse > Matrix from scratch populated with some data? By default a > column-oriented one is created and I'm aware of the note that the > package is optimized for
2017 Oct 21
0
What exactly is an dgCMatrix-class. There are so many attributes.
>>>>> C W <tmrsg11 at gmail.com> >>>>> on Fri, 20 Oct 2017 15:51:16 -0400 writes: > Thank you for your responses. I guess I don't feel > alone. I don't find the documentation go into any detail. > I also find it surprising that, >> object.size(train$data) > 1730904 bytes >>
2017 Oct 21
1
What exactly is an dgCMatrix-class. There are so many attributes.
> On Oct 21, 2017, at 7:50 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> C W <tmrsg11 at gmail.com> >>>>>> on Fri, 20 Oct 2017 15:51:16 -0400 writes: > >> Thank you for your responses. I guess I don't feel >> alone. I don't find the documentation go into any detail. > >> I also find
2009 Jul 20
1
S4 method dispatch with inheritance
Hi, I'm trying to create a new S4 class (myMatrix) which for now just extends dgCMatrix (from package Matrix). Then I want to use "[" which is defined in Matrix. Out of the box with "[" (defined in Matrix) I lose the class information and the result is an object of class dgCMatrix. If I specify a "["-method for myMatrix, it is not used because a signature
2011 Oct 06
0
linear classifiers with sparse matrices
I've been trying to get some linear classifiers (LiblineaR, kernlab, e1071) to work with a sparse matrix of feature data. In the case of LiblineaR and kernlab, it seems I have to coerce my data into a dense matrix in order to train a model. I've done a number of searches, read through the manuals and vignettes, but I can't seem to see how to use either of these packages with sparse
2010 Aug 19
1
Converting sparse matrix to data.frame in Matrix package
I am able to create a coordinate list sparse matrix this way: r = c(1,2,2,3,3) c = c(4,1,2,3,5) v = c(1,2,1,3,1) a = sparseMatrix(i=r,j=c,x=v) However, this results in an object that looks like this: a 3 x 5 sparse Matrix of class "dgCMatrix" [1,] . . . 1 . [2,] 2 1 . . . [3,] . . 3 . 1 How do I convert this object into a data.frame that would look like this:
2009 May 13
2
Optimization algorithm to be applied to S4 classes - specifically sparse matrices
Hello. I am trying to optimize a set of parameters using /optim/ in which the actual function to be minimized contains matrix multiplication and is of the form: SUM ((A%*%X - B)^2) where A is a matrix and X and B are vectors, with X as parameter vector. This has worked well so far. Recently, I was given a data set A of size 360440 x 1173, which could not be handled as a normal matrix. I
2007 May 03
1
Issue with the Matrix package
Hi all, I am wondering if this is a bug in the Matrix package or if it something that I am just getting wrong...here is an example: > m = matrix(0,4,4) > dimnames(m) = list(letters[1:4], letters[5:8]) > r = c("a","b","a","d") > m[r,2] = 1 > m e f g h a 0 1 0 0 b 0 1 0 0 c 0 0 0 0 d 0 1 0 0 > M = Matrix(0,4,4) > dimnames(M) =
2009 Aug 26
1
Problem with standard generic methods in Matrix package
I have posted this message on r-lang, but it is perhaps more appropriate on r-devel: --- Hello, I'm puzzled by a problem with call to diag(), rowSums(), rownames() on objects of class "dgtMatrix", created by sparseMatrix() or spMatrix(). I use Matrix 0.999375-30. The weird thing is that I don't encounter any problem when I use this functions on the R prompt, or
2016 Apr 19
2
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
Using the Matrix package, how can I create a row-oriented sparse Matrix from scratch populated with some data? By default a column-oriented one is created and I'm aware of the note that the package is optimized for column-oriented ones, but I'm only interested in using it for holding my sparse row-oriented data and doing basic subsetting by rows (even using drop=FALSE). Here is what I
2009 Jan 20
1
Creating a Sparse Matrix from a Sparse Vector
Hello, I am working with a sparse matrix that is approx. 13,900 by 14,100. My goal is to select a row out of the matrix and create a new matrix with that row repeated 13,900 times without having to do any looping. Example: Starting Matrix: exampleMatrix 3 x 4 sparse Matrix of class "dgCMatrix" [1,] 1 . . . [2,] . 1 . 0.5 [3,] . . 1 .. New Matrix:.. newExampleMatrix 3 x 4 sparse
2013 May 07
0
How to use "SparseM-conversions" to convert a dCgMatrix into a matrix.csr ?
Hi all, I want to transform a dCgMatrix from package Matrix into a matrix.csr from package SparseM, and I found out this link : http://stat.ethz.ch/R-manual/R-devel/library/Matrix/html/SparseM-conv.html But there's no informaion about usage/description/arguments, so how do I use this SparseM-conversions method ?? Is it a function ?? By the way I already tried function: as.spam.matrix.csr
2020 Oct 26
0
Change to I() in R 4.1
> > Hi there, > Is that change in R-devel intentional? > > library(Matrix) > m <- as(matrix(c(0, 1)), "sparseMatrix") > > isS4(m) > # [1] TRUE > > x <- I(m) > # Warning message: > # In `class<-`(x, unique.default(c("AsIs", oldClass(x)))) : > # Setting class(x) to multiple strings ("AsIs",
2009 Oct 22
0
dgTMatrix --- [, , drop=F] strange behavior, Matrix 0.999375-20
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have something strange here... I want to subset a large sparse matrix, with the subset being still in sparse form. Easily achievable with mm[i,,drop=F] , right? Well, it doesn't work on the matrix I'm working on. This is a very large wikipedia Matrix (now I can play with it as I just got 16Gb of memory): > mm at Dim [1] 793251
2017 Oct 20
4
What exactly is an dgCMatrix-class. There are so many attributes.
Thank you for your responses. I guess I don't feel alone. I don't find the documentation go into any detail. I also find it surprising that, > object.size(train$data) 1730904 bytes > object.size(as.matrix(train$data)) 6575016 bytes the dgCMatrix actually takes less memory, though it *looks* like the opposite. Cheers! On Fri, Oct 20, 2017 at 3:22 PM, David Winsemius