search for: ngcmatrix

Displaying 10 results from an estimated 10 matches for "ngcmatrix".

Did you mean: dgcmatrix
2015 Mar 20
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
Hi Martin, package arules heavily relies on ngCMatrix and uses multiplication and addition for logical operations. I think it makes sense that in a mixed operation with one dgCMatrix and one ngCMatrix the ngCMatrix should be "promoted" to a dgCMatrix. The current behavior of %*% and friends is in deed confusing: > m <- matrix(sam...
2015 Mar 19
6
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
...r M >= c will also use "lMatrix" (l: logical i.e. TRUE/FALSE/NA). All the following is **not** affecting those numerical / logical computations. A few others will know that we also have "pattern" matrices (purely binary: TRUE/FALSE, no NA) notably sparse ones, those "ngCMatrix" etc, all starting with "n" (from ``patter[n]``) which do play a prominent role in the internal sparse matrix algorithms, notably of the (underlying C code) CHOLMOD library in the so-called "symbolic" cholesky decomposition and other such operations. Another reason you may...
2010 Nov 19
0
Error from sparse pattern matrix product
Hi The following attempt to minimize memory consumption fails. m1 <- Matrix(c(rep(1,1000), rep(0,2000)), 1500) m2 <- as(m1, "ngCMatrix") Then m1 %*% c(1,2) produces the desired matrix product, while m2 %*% c(1,2) results in the error Error in x %*% y : Cholmod error 'invalid xtype' at file:../MatrixOps/cholmod_sdmult.c, line 82 I might be making a wrong assumption that this should work, or another mistake,...
2011 Jan 28
1
arules package question- apriori/S4 object export question
...m having difficulty working with these S4 objects. My object looks as follows. > str(rules) Formal class 'rules' [package "arules"] with 4 slots ..@ lhs :Formal class 'itemMatrix' [package "arules"] with 3 slots .. .. ..@ data :Formal class 'ngCMatrix' [package "Matrix"] with 5 slots .. .. .. .. ..@ i : int [1:2133] 3907 3519 4172 3519 4182 3519 4172 4182 4172 4182 ... .. .. .. .. ..@ p : int [1:790] 0 0 1 2 3 4 5 6 7 8 ... .. .. .. .. ..@ Dim : int [1:2] 7002 789 .. .. .. .. ..@ Dimnames:List of 2 .. .. ....
2015 Mar 19
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
...atrix? now) Trevor > y=Matrix(diag(4)) > y 4 x 4 diagonal matrix of class "ddiMatrix" [,1] [,2] [,3] [,4] [1,] 1 . . . [2,] . 1 . . [3,] . . 1 . [4,] . . . 1 > z=sparseMatrix(1:4,1:4) > z 4 x 4 sparse Matrix of class "ngCMatrix" [1,] | . . . [2,] . | . . [3,] . . | . [4,] . . . | > beta=as(Matrix(1:4),"dgCMatrix") > y%*%beta 4 x 1 sparse Matrix of class "dgCMatrix" [1,] 1 [2,] 2 [3,] 3 [4,] 4 > z%*%beta 4 x 1 sparse Matrix of class "ngCMatrix" [1,] | [...
2018 Apr 23
4
R 3.5.0 fails its regression test suite on Linux/x86_64
...t; e: <environment> | < __ not parse()able __: environment | --- | > dn: list(c("A", "B", "C"), c("a", "b", "c", "d", "e")) | > --> checking list(*): Ok | > --=--=--=--=-- | > e: new("ngCMatrix", i = integer(0), p = c(0L, 0L, 0L, 0L, 0L, 0L, | > 0L), Dim = c(4L, 6L), Dimnames = list(NULL, NULL), factors = list()) | > --> checking list(*): Ok | 844a1013,1015 | > i: c(1, 3, 4, 5, 6, 7, 8) | > --> checking list(*): Ok | > --=--=--=--=-- | 876a1048,1050 | &...
2018 Apr 23
0
R 3.5.0 fails its regression test suite on Linux/x86_64
...lt; __ not parse()able __: environment > | --- > | > dn: list(c("A", "B", "C"), c("a", "b", "c", "d", "e")) > | > --> checking list(*): Ok > | > --=--=--=--=-- > | > e: new("ngCMatrix", i = integer(0), p = c(0L, 0L, 0L, 0L, 0L, 0L, > | > 0L), Dim = c(4L, 6L), Dimnames = list(NULL, NULL), factors = list()) > | > --> checking list(*): Ok > | 844a1013,1015 > | > i: c(1, 3, 4, 5, 6, 7, 8) > | > --> checking list(*): Ok > | >...
2008 Sep 03
0
How to read-in a transaction-table with single items per line via RODBC?
...item3 2 item2 2 item3 ... how do I create a transaction object of the arules package from such a table? I tried this with read.transactions(tr_dat, format="single") of the package arules but I didn'd succeed getting the following error Error: invalid class "ngCMatrix" object: slot i is not *strictly* increasing inside a column. After reading the R source of read.transactions I wrote the below function transactionsFromSingleItems, which seems to work. The problem seemed to be that the items of the list tr_basket are not atomic. That's why I used th...
2010 Dec 20
2
package "arules" - 'transpose' of the transactions
Suppose this is my list of transactions: set.seed(200) tran=random.transactions(100,3) inspect(tran) items transactionID 1 {item80} trans1 2 {item8, item20} trans2 3 {item28} trans3 I want to get the 'transpose' of the data, i.e. transactionID items 1 {trans2} item8 2 {trans2} item20 3 {trans3} item28 4 {trans1} item80 I
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
Fine with me as long as eliminating the inconveniences associated with it can be put on the roadmap. The alias instability and the fact that the user has no way to know if s/he should do ?`foo,numeric-method` or ?`foo,numeric,ANY-method` to find the method has been a long-standing problem. H. On 3/21/19 21:29, Michael Lawrence wrote: If we started over, I'd try to avoid this sort of