similar to: TD Matrix

Displaying 20 results from an estimated 20000 matches similar to: "TD Matrix"

2005 Jun 15
1
coding to generate a matrix to prepare for chi-sqr test f or text mining
I would compile a table of all the words in the dataset (maybe you have it already), then create a list where each component is an integer vector of indices of words. That is, replace words by their positions in the table. >From that sparse form you could create binary features to use with standard classification methods, or for example compute the X'X matrix for linear regression
2004 Apr 27
3
reading a "sparse" matrix into R
I have a 47k x 47k adjacency matrix that is very sparse (at most 30 entries per row); my textual representation therefore is simply an adjacency list of connections between nodes for each row, e.g. node connections A B C D E B A C D C A E D A E A F F E G H I'd like to import this into a dataframe of node/connection (character/vector-of-characters) pairs. I've experimented with
2005 Apr 18
2
Construction of a large sparse matrix
Dear List: I'm working to construct a very large sparse matrix and have found relief using the SparseM package. I have encountered an issue that is confusing to me and wonder if anyone may be able to suggest a smarter solution. The matrix I'm creating is a covariance matrix for a larger research problem that is subsequently used in a simulation. Below is the latex form of the matrix if
2005 Jun 07
6
transform large matrix into list
Dear List I need to transform a large matrix M with many NAs into a list L with one row for each non missing cell. Every row should contain the cell value in the first column, and its coordinates of the matrix in column 2 and 3. M: x1 x2 y1 1 2 y2 4 5 y3 7 8 L: v x y 1 1 1 4 1 2 7 1 2 2 2 1 5 2 2 8 2 3 I'm trying to do this with a loop, but since my matrix is quite large (around
2005 May 31
2
Null space (or kernel) and image of a matrix
Hello! Does anyone now if there exist a function that would compute a "null space" (or "kernel" - "Ker") of a matrix and maybe also one that would compute an "image" ("Im") of a matrix. I tried R-site search and google, However I found notnihg useful! Thanks for any sugestions! I am also not sure what an "image" of a matrix is, so
2012 Nov 05
1
no method for coercing this S4 class to a vector
all of a sudden, after a SparseM upgrade(?) I get this error: > str(z) Formal class 'matrix.csr' [package "SparseM"] with 4 slots ..@ ra : num [1:85372672] -0.4288 0.0397 0.0104 -0.1843 -0.1203 ... ..@ ja : int [1:85372672] 1 2 3 4 5 6 7 8 9 10 ... ..@ ia : int [1:699777] 1 123 245 367 489 611 733 855 977 1099 ... ..@ dimension: int [1:2] 699776 122
2005 Apr 13
5
Binary Matrices
I'm wanting to perform analysis (e.g. using eigen()) of binary matrices - i.e. matrices comprising 0s and 1s. For example: n<-1000 test.mat<-matrix(round(runif(n^2)),n,n) eigen(test.mat,only.values=T) Is there a more efficient way of setting up test.mat, as each cell only requires a binary digit? I imagine R is setting up a structure which could contain n^2 floats. Thanks in advance
2004 Jun 25
2
Matrix: Help with syntax and comparison with SparseM
Hi, I am writing some basic smoothers in R for cleaning some spectral data. I wanted to see if I could get close to matlab for speed, so I was trying to compare SparseM with Matrix to see which could do the choleski decomposition the fastest. Here is the function using SparseM difsm <- function(y, lambda, d){ # Smoothing with a finite difference penalty # y: signal to be smoothed #
2006 Feb 20
2
Matrix / SparseM conflict (PR#8618)
Full_Name: David Pleydell Version: 2.2.1 OS: Debian Etch Submission from: (NULL) (193.55.70.206) There appears to be a conflict between the chol functions from the Matrix and the SparseM packages. chol() can only be applied to a matrix of class dspMatrix if SparseM is not in the path. with gratitude David > library(Matrix) > sm <- as(as(Matrix(diag(5) + 1), "dsyMatrix"),
2006 Apr 19
1
comparing execition time: R vs matlab linear algebra...
Greetings: We are evaluating the performance of R matrix algebra es as we port a MATLAB R14 script into R. The MATLAB code basically evaluates the AX=B system on sparse matrices that result in output matrices of 100 to 1,000,000 rows/columns. Our R prototype script uses spase base matrices and the methods qr() and qr.coeff(). The following statements are called inside a doubly-nested loop: G
2004 Jun 18
1
Initializing SparseM matrix matrix.csc
Hi! Would like to initialize a huge matrix.csc (Pacakge SparseM) with all elements 0 and afterwards set a few alements nonzero. The matrix which I like to allocate is so huge that I can not use A <- matrix(a,n1,p) before: A.csr <- as.matrix.csc(A) because I can not allocate such a huge matrix A. But I believe that the much more memmory efficient model in case of csc matrix should do it for
2006 Jan 27
3
e1071: using svm with sparse matrices (PR#8527)
Full_Name: Julien Gagneur Version: 2.2.1 OS: Linux (Suse 9.3) Submission from: (NULL) (194.94.44.4) Using the SparseM library (SparseM_0.66) and the e1071 library (e1071_1.5-12) I fail using svm method with a sparse matrix. Here is a sample example. I experienced the same problem under Windows. > library(SparseM) [1] "SparseM library loaded" > library("e1071")
2004 Jan 29
3
Developmental version of Matrix package for R-1.9.0
I recently uploaded a developmental version of the Matrix package, Matrix_0.6-1.tar.gz, to CRAN where it is in the src/contrib/1.9.0/Other directory. It requires some of the packages that will appear in R-1.9.0. This version marks a major redesign of the Matrix package to use S4 classes and methods and to incorporate sparse matrix manipulations using routines from TAUCS
2006 Jun 10
3
sparse matrix, rnorm, malloc
Hi, I'm Sorry for any cross-posting. I've reviewed the archives and could not find an exact answer to my question below. I'm trying to generate very large sparse matrices (< 1% non-zero entries per row). I have a sparse matrix function below which works well until the row/col count exceeds 10,000. This is being run on a machine with 32G memory: sparse_matrix <-
2005 Jan 05
4
output from table() in matrix form
Hi How do I get the output from table() in matrix form? If I have R> table(c(1,1,1,1,2,20)) 1 2 20 4 1 1 I want [,1] [,2] [,3] [1,] 1 2 20 [2,] 4 1 1 The problem is that names(table) is a vector of characters and I need the numeric values. I am using R> rbind(as.integer(names(x)),x) I thought tabulate() might be better as it takes an
2005 May 04
4
rank of a matrix
how do I check the rank of a matrix ? say A= 1 0 0 0 1 0 then rank(A)=2 what is this function? thanks I did try help.search("rank"), but all the returned help information seem irrelevant to what I want. I would like to know how people search for help information like this. rank(base) Sample Ranks SignRank(stats) Distribution of the
2005 Nov 09
6
elements in a matrix to a vector
hi all, i'm trying to get elements in a matrix into a vector. i need a "streamlined" way to do it as the way i'm doing it is not very serviceable. an example is a 3x3 matrix like 0 0 3 2 0 0 0 4 0 to a vector like 3 2 4 thanks...mj [[alternative HTML version deleted]]
2007 Jul 08
1
Problems with e1071 and SparseM
Hello all, I am trying to use the "svm" method provided by e1071 (Version: 1.5-16) together with a matrix provided by the SparseM package (Version: 0.73) but it fails with this message: > model <- svm(lm, lv, scale = TRUE, type = 'C-classification', kernel = 'linear') Error in t.default(x) : argument is not a matrix although lm was created before with
2004 Aug 31
2
Sparse Matrices in R
I have data in i,j,r format, where r is the value in location A[i,j] for some imaginary matrix A. I need to build this matrix A, but given the sizes of i and j, I believe that using a sparse format would be most adequate. Hopefully this will allow me to perform some basic matrix manipulation such as multiplication, addition, rowsums, transpositions, subsetting etc etc. Is there any way
2005 Dec 09
2
Matrix Problem
Hello R-Users, I have to invert a matrix 3000X3000 and the solve method doesn't work or it is too slow. Are there any methods to invert a big matrix? Regards Stefan --------------------------------- [[alternative HTML version deleted]]