SCM

SCM Repository

[matrix] Diff of /pkg/TODO
ViewVC logotype

Diff of /pkg/TODO

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

revision 529, Mon Feb 7 10:56:34 2005 UTC revision 1087, Fri Dec 9 20:55:39 2005 UTC
# Line 1  Line 1 
1    - Migration of lmer from the mer representation to the mer2
2       representation and the use of the CHOLMOD code for the sparse
3       matrix decomposition.  Some of the things that need to be done.
4    
5       - Matrices in the mer2 representation are classed matrices, in the
6       mer representation they were unclassed.  Any parts inside the C
7       code that would access, for example,
8        REAL(GET_SLOT(x, Matrix_RXXSym))
9       need to be modified to access
10        REAL(GET_SLOT(GET_SLOT(x, Matrix_RXXSym), Matrix_xSym))
11       This is especially important for Omega but I think I have done
12       those changes already.
13    
14       - The components named *X* in an mer object refer to an augmented
15       design matrix of p+1 columns.  In the mer2 object there are
16       separate slots for rZy and rXy.  The scalar y'y is the first
17       element of devComp.
18    
19       - Presently nc is of length nf+1 and the last element is n, the
20       number of observations.  This value should be moved to devComp and
21       nc made of length nf.
22    
23       - The slot L is a list of length 1 that contains an ExternalPointer
24       to a cholmod_factor object.  This contains a permutation which is
25       most easily accessible through cholmod_solve(CHOLMOD_P,...) or
26       cholmod_solve(CHOLMOD_Pt,...).  The ZtX, Zty, RZX and rZy slots actually
27       contain P%*%RZX and P%*%rZy
28    
29    ------
30    - Sparse matrix methods can now be based on the CHOLMOD package.  We
31       will need to migrate from the current code to CHOLMOD-based code
32       using #ifdef USE_CHOLMOD.  Some of the things to be done
33    
34       - Move documentation from subdirectories of src to inst/doc
35       - Write utilities to create a cholmod_sparse pointer from a
36       dgCMatrix or lgCMatrix (or zgCMatrix) object without copying and
37       allocating.
38       - Start adding simple S4 methods (rcond, %*%, +, cbind, t).
39    
40  - Report the problem in the Linux ldexp manual page.  The second and  - Report the problem in the Linux ldexp manual page.  The second and
41    third calls in the Synopsis should be to ldexpf and ldexpl.    third calls in the Synopsis should be to ldexpf and ldexpl.
42    
43  - [,] indexing  - [,] indexing: for sparse "works", but not yet for negative indices!
   
 - group generics: "Arith", but also "Ops" and "Math";  see  
   ?Math.data.frame  and the examples in  
   ?SetGeneric  
   
 - bCrosstab(): do we really want the diagonal "V:V" crosstabs?  
                (if so or in any case: add to  man/bCrosstab.Rd )  
   
 - src/Metis/ : one of the two Makefiles needs fixing, as changing  
              src/Metis/*.c  does not lead to recompilation.  
   --DB - it seems both Makefiles need fixing.  I think I have the  
              src/Metis/Makefile fixed but not src/Makefile  
44    
45  - man/Matrix.Rd :  has example with dimnames, but we just drop them!  - consider moving alloc3Darray from ./src/Mutils.c to
46                  MM thinks dimnames should be supported (but then ...)    $(RSRC)/src/base/array.c
   
 - data/ : names 'mm' and even more 'y' are  ``too short''.  
         If we really want to keep them, don't use "LazyData"  
         (such that one needs  data(*) explicitly);  
         But MM would rather want something like  ex.mm and ex.y  
   
 - spelling style: Should "coersion" be "coercion" ?  
   
 - "factors" maybe should move up to "Matrix"  
47    
48  -------  -------
49    
50  We have a (at least one) basic problem :  - provide methods for "dspMatrix" and "dppMatrix"!
51     Currently the show() method fail sometime after coercion:  
52     e.g. 'sy' show()s wrongly, even though it "str()" fine :  - implement (more) methods for supporting "packed" (symmetric / triangular)
53      matrices; particularly something like pack() and unpack()  [to/from our
54        (po <- crossprod(Matrix(0:3, 2))) # ok    classes from/to "numeric"] --- have already man/unpack.Rd but no method yet!
55        (ge <- as(po, "dgeMatrix")) # ok  
56        (sy <- as(po, "dsyMatrix")) # BAD    (have some dtr* <-> dtp*)
57        str(sy) # looks fine  
58    - implement diagonal Matrix class  "ddiMatrix" etc
59    or    using constructor function Diagonal() or Diag().
60        example(expand) # -> ex$L and ex$U look bad, however  
61        as(ex$L, "dgeMatrix") # `works'  - rcond() of a singular dpoMatrix gives a LaPack error instead of just 0:
62      MM <- crossprod(M <- Matrix(c(1:4,9:6), 2,4)) ; rcond(MM)
63      ##> Error in rcond(MM) : Lapack routine dpotrf returned error code 4
64      It's .Call("dpoMatrix_rcond") --> set_rcond() in src/dpoMatrix.c
65      and in src/dppMatrix.c similarly.
66    
67      Done(2005-10-03): The error message is more helpful now.
68    
69    ---
70    
71    - combine the C functions for multiplication by special forms and
72      solution wrt special forms by using a 'right' argument and a
73      'classed' argument.
74       [done with dgeMatrix_matrix_mm();  not yet for other classes;
75        and for _crossprod()]
76    
77    - add more comprehensive examples / tests for Schur decomposition
78    
79    - arithmetic for sparse matrices:
80                 <sparseMatrix>  o  <same-dim-sparseMatrix>
81      should return a sparse matrix  for at least "+" and "*" , also %%,
82      and "/" and "%/%" at least when the RHS is non-zero a scalar.
83      Challenge: nice implementation (``common non-0''; but Tsparse* is not uniq).
84    
85    ---
86    
87    - Create a Harwell-Boeing version of the matrix mm and the response
88      vector y in inst/external and remove them from the data directory.
89      Modify any examples that use them and modify the Comparisons vignette.
90    
91    - "Math2" , "Math", "Arith":
92       keep triangular and symmetric Matrices when appropriate:
93       particularly desirable for  "Math2": round(), signif()
94    
95    - "d" <-> "l" coercion for all "[TCR]" sparse matrices is really trivial:
96      "d" -> "l" : drops the 'x' slot
97      "l" -> "d" : construct an 'x' slot of all '1'
98      We currently have many of these conversions explicitly, e.g.
99       setAs("dsTMatrix", "lsTMatrix",
100          function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo,
101                             Dim = from@Dim, Dimnames = from@Dimnames))
102      but I would rather want to automatically construct all these coercion
103      methods at once by a ``method constructor'', i.e.,
104      for all  "dsparse*" -> "lsparse*" and vice versa.
105      How can one do this {in a documented way} ?
106    
107    {Of course, we don't need a workaround but must understand  - tcrossprod(x, y) : do provide methods for y != NULL  -- at least dummy ones!
    and solve the problem}  

Legend:
Removed from v.529  
changed lines
  Added in v.1087

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