SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/TODO
ViewVC logotype

Diff of /pkg/Matrix/TODO

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2783, Wed Jun 6 06:53:52 2012 UTC revision 2784, Fri Jun 8 17:01:25 2012 UTC
# Line 1  Line 1 
1  ##-*- mode: org -*-  ##-*- mode: org -*-
2    
3    * *Urgent* in some sense ------------------------------------------------------
4    
5  - Look at Paul Bailey's problem -- CHOLMOD error (even seg.fault for him)  - Look at Paul Bailey's problem -- CHOLMOD error (even seg.fault for him)
6    --> ~/R/MM/Pkg-ex/Matrix/sparseOrderedLogit.R    --> ~/R/MM/Pkg-ex/Matrix/sparseOrderedLogit.R
7    
# Line 7  Line 9 
9    level e.g. for solve(<dsyMatrix>).   Should define  expand() method or    level e.g. for solve(<dsyMatrix>).   Should define  expand() method or
10    similar, see man/BunchKaufman-methods.Rd and R/dsyMatrix.R (at end).    similar, see man/BunchKaufman-methods.Rd and R/dsyMatrix.R (at end).
11    
12  ----------------------------------------  * New smallish ideas, relatively urgent for MM --------------------------------
13    
14  - Investigate the "band changing (and getting) ideas  'band<-' etc,  - Investigate the "band changing (and getting) ideas  'band<-' etc,
15    from Jeremy D Silver, per posts to R-devel on Aug.26,2011    from Jeremy D Silver, per posts to R-devel on Aug.26,2011
# Line 35  Line 37 
37     [done with dgeMatrix_matrix_mm();  not yet for other classes;     [done with dgeMatrix_matrix_mm();  not yet for other classes;
38      and for _crossprod()]      and for _crossprod()]
39    
40  -----  * Generalization of Existing Classes and Methods --------------------------
41    
42  - "Math2" , "Math", "Arith":  - "Math2" , "Math", "Arith":
43     keep triangular and symmetric Matrices when appropriate:     keep triangular and symmetric Matrices when appropriate:
# Line 85  Line 87 
87    specifically for multiplying a cholmod_sparse object by a diagonal matrix.    specifically for multiplying a cholmod_sparse object by a diagonal matrix.
88    Use it in %*% and [t]crossprod methods.    Use it in %*% and [t]crossprod methods.
89    
 - chol() should ``work'': proper result or "good" error message.  
   
90  - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".  - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".
91    e.g. zapsmall(<pMatrix>) fails "badly"    e.g. zapsmall(<pMatrix>) fails "badly"
92    
# Line 102  Line 102 
102    !M  where M is "sparseMatrix", currently always gives dense. This only    !M  where M is "sparseMatrix", currently always gives dense. This only
103    makes sense when M is ``really sparse''.    makes sense when M is ``really sparse''.
104    
 - example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm)  
   
   shows that chol() does not seem to make use of an already  
   present factorization and rather uses one with more '0' in x slot.  
   
105  - diag(m) <- val    currently automatically works via  m[cbind(i,i)] <- val  - diag(m) <- val    currently automatically works via  m[cbind(i,i)] <- val
106    This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to    This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to
107    be for triangularMatrix, and probably also "dense*general*Matrix" since the    be for triangularMatrix, and probably also "dense*general*Matrix" since the
# Line 117  Line 112 
112  - The "[<-" now uses  src/t_Csparse_subassign.c and no longer explodes  - The "[<-" now uses  src/t_Csparse_subassign.c and no longer explodes
113    memory.  *However* it is still too slow when the replacment region is large.    memory.  *However* it is still too slow when the replacment region is large.
114    
115    * Cholesky(), chol() etc ------------------
116    
117    - chol() should ``work'': proper result or "good" error message.
118      (mostly done ?)
119    
120    - example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm)
121    
122      shows that chol() does not seem to make use of an already
123      present factorization and rather uses one with more '0' in x slot.
124    
125  - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))  - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))
126    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd
# Line 126  Line 130 
130    --> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give    --> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give
131    faster determinant    faster determinant
132    
133    - Allow  Cholesky(A,..) when A is not symmetric *AND*
134      we really _mean_ to factorize  AA' ( + beta * I)
135    
136    - update(Cholesky(..), *): make *also* use of the possibility to update
137      with non-symmetric A and then  AA' + mult * I   is really meant.
138      .updateCHMfactor() ## allows that already(?)
139    
140    - add examples (and tests!) for update(<CHMfactor>, ..) and
141      Cholesky(......, Imult), also tests for hidden {hence no examples}
142      ldetL2up() { R/CHMfactor.R }. MM: See e.g. ~/R/MM/Pkg-ex/Matrix/CholUpdate.R
143    
144    - implement fast diag(<triangularCsparse>) via calling new
145      src/Csparse.c's diag_tC_ptr() .
146     -- diag_tC_ptr() functionality now exported via
147      R/dsCMatrix.R   .diag.dsC() -- the name is silly, but
148      functionality nice.  See (hidden) example in man/Cholesky.Rd
149    
150    - chol(<nsCMatrix>)  gives "temporarily disabled"
151      but should give the *symbolic* factorization;
152      similarly Cholesky(.) is not enabled
153    
154    * "Basic" new functionality -- "nice to have" (non-urgent)
155    
156  - tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed  - tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed
157    frequently in some computations {conditional normal distr. ...}.    frequently in some computations {conditional normal distr. ...}.
158    Since this can be done faster than by    Since this can be done faster than by
# Line 142  Line 169 
169    Well, if A %*% B is square,   diag(A %*% B)  ===  colSums(t(A) * B)    Well, if A %*% B is square,   diag(A %*% B)  ===  colSums(t(A) * B)
170    and we should probably teach people about that !    and we should probably teach people about that !
171    
 - qr.R(qr(x)) may differ for the "same" matrix, depending on it being  
   sparse or dense:  
     "qr.R(<sparse>) may differ from qr.R(<dense>) because of permutations"  
   
   This is not really acceptable and currently influences  rcond() as well.  
   
172  - eigen() should become generic, and get a method at least for diagonal,  - eigen() should become generic, and get a method at least for diagonal,
173    but also for symmetric -> dsyMatrix  [LAPACK dsyev() uses UPLO !],    but also for symmetric -> dsyMatrix  [LAPACK dsyev() uses UPLO !],
174    but also simply for dgeMatrix (without going via tradition matrices).    but also simply for dgeMatrix (without going via tradition matrices).
# Line 156  Line 177 
177    ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix))))    ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix))))
178    Matrix( signif(ee$vectors, 3) )    Matrix( signif(ee$vectors, 3) )
179    
180    * Everything else aka "Miscellaneous" ----------------------------------------
181    
182    - qr.R(qr(x)) may differ for the "same" matrix, depending on it being
183      sparse or dense:
184        "qr.R(<sparse>) may differ from qr.R(<dense>) because of permutations"
185    
186      This is not really acceptable and currently influences  rcond() as well.
187    
188  - facmul() has no single method defined;  it looks like a good idea though  - facmul() has no single method defined;  it looks like a good idea though
189    (instead of the infamous qr.qy, qr.qty,.... functions)    (instead of the infamous qr.qy, qr.qty,.... functions)
190    
# Line 170  Line 199 
199    as_CspClass() quite a bit.  --> try to replace these by    as_CspClass() quite a bit.  --> try to replace these by
200    as(*, "CsparseMatrix"); forceSymmetric, etc.    as(*, "CsparseMatrix"); forceSymmetric, etc.
201    
 - implement fast diag(<triangularCsparse>) via calling new  
   src/Csparse.c's diag_tC_ptr()  
   
 - add examples (and tests!) for update(<CHMfactor>, ..) and  
   Cholesky(......, Imult), also tests for hidden {hence no examples}  
   ldetL2up() { R/CHMfactor.R }  
   
 - chol(<nsCMatrix>)  gives "temporarily disabled"  
   but should give the *symbolic* factorization;  
   similarly Cholesky(.) is not enabled  
   
202  - writeMM(obj, file=stdout()) creates file "1" since file is silently  - writeMM(obj, file=stdout()) creates file "1" since file is silently
203    assumed to be a string, i.e. cannot be a connection.    assumed to be a string, i.e. cannot be a connection.
204    An R (instead of C) version should be pretty simple, and would work with    An R (instead of C) version should be pretty simple, and would work with

Legend:
Removed from v.2783  
changed lines
  Added in v.2784

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge