similar to: How to identify a matrix which causes memory limit?

Displaying 20 results from an estimated 30000 matches similar to: "How to identify a matrix which causes memory limit?"

2012 Mar 12
3
how to calculate a variance and covariance matrix for a vector
Hello, I have a vector {a, b1, b2, b3, b4}. How can I calculate the following matrix: var(a) cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) cov(a, b1) var(b1) cov(a, b2) cov(a, b3) cov(a, b4) ... ... cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) var(b4) I would very appreciate your inputs. Thank you very much. Sincerely, Jialin Huang [[alternative HTML version deleted]]
2019 Jul 08
5
Format printing inside a matrix
Hi Abby, Thanks a lot for your paraphrasing and your suggestion! The problem of wrapping the list into a S3/S4 object, i.e. subclassing array or matrix, is that one also has to define a bunch of methods for subsetting, joining, etc, in order to make it behave like a list array. The reason is that most R functions for subsetting, joining, etc. do not preserve class attributes of the input, which
2018 Mar 28
1
as.pairlist does not convert call objects
Dear all, It seems that as.pairlist does not convert call objects, producing results like the following: > is.pairlist(as.pairlist(quote(x + y))) [1] FALSE Should this behavior be expected? Thanks, Jialin > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-suse-linux-gnu (64-bit) Running under: openSUSE Tumbleweed Matrix products: default BLAS: /usr/lib64/R/lib/libRblas.so
2018 Mar 18
3
`@<-` modify its argument when slot is externalptr
Dear all, I am confused about the inconsistent behaviors of `@<-` operator when used in different ways. Consider the following example: library(inline) # Function to generate an externalptr object with random address new_extptr <- cfunction(c(), ' SEXP val = PROTECT(ScalarLogical(1)); SEXP out = PROTECT(R_MakeExternalPtr(&val, R_NilValue, val)); UNPROTECT(2);
2019 Jul 02
3
Format printing inside a matrix
Hi everyone, I am not sure if there is an existing solution to this, but I want my S4 objects inside a list matrix showing correctly. Currently it shows as: R> str(lst[[1]]) Formal class 'Basic' [package "symengine"] with 1 slot ..@ ptr:<externalptr> R> matrix(lst, 2) [,1] [,2] [,3] [,4] [,5] [1,] ? ? ? ? ? [2,] ? ? ? ? ? Is it
2019 Jul 08
0
Format printing inside a matrix
On 7/7/19 17:41, Jialin Ma wrote: > Hi Abby, > > Thanks a lot for your paraphrasing and your suggestion! > > The problem of wrapping the list into a S3/S4 object, i.e. subclassing array > or matrix, is that one also has to define a bunch of methods for subsetting, > joining, etc, in order to make it behave like a list array. The reason is that > most R functions for
2006 Oct 09
2
shifting a huge matrix left or right efficiently ?
I'm wondering what's the best way to shift a huge matrix left or right. My current implementation is the following: shiftMatrixL <- function(X, shift, padding=0) { cbind(X[, -1:-shift], matrix(padding, dim(X)[1], shift)) } X <- shiftMatrixL(X, 1)*3 + shiftMatrixL(X,2)*5... However, it's still slow due to heavy use of this function. The resulting matrix will only be read once
2008 Jun 07
1
Problem of installing Matrix
[wincent at PC-BSD]export MAKE=gmake [wincent at PC-BSD]sudo R ..... > install.packages("Matrix") --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://bibs.snu.ac.kr/R/src/contrib/Matrix_0.999375-9.tar.gz' Content type 'application/x-gzip' length 1483674 bytes (1.4 Mb) opened URL
2014 Jan 03
2
[LLVMdev] Tracing values in llvm IR
You will have to insert callinst to tracing functions immediately after the value is produced, not at the entry points. Giri code has many such examples of how to do this. Thanks, Swarup. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Jin Huang [54jin.huang at gmail.com] Sent: Thursday, January 02, 2014 9:47 PM To: llvmdev at
2012 Aug 30
1
path analysis help
Hi there, I searched R-help list with "path analysis" as keyword, and learn that sem package can do it. However, I don't figure out a way to construct the model for the path diagram as Fig. 1. in Huang et al. (2002)[1]. I try the following code: huang.cor <- readMoments(diag=FALSE, names=c('x1', 'x2', 'x3', 'y')) 0.76 0.91 0.72 0.94 0.77 0.83
2014 Jan 03
2
[LLVMdev] Tracing values in llvm IR
Thank you , James. But this way needs to determine whether the instruction is a LOAD/STORE ,and if I want to preserve the operations on these variables for further dynamic symbolic execution usage(just like KLEE ,but it's a static analysis ,not dynamic),I had to backtrace instructions ,this may be not very efficient if the operation is very complex! -Jin Huang 2014/1/3 Jin Huang
2016 Jul 19
4
[PATCH v3] virtio_blk: Fix a slient kernel panic
From: Minfei Huang <mnghuan at gmail.com> We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return
2016 Jul 19
4
[PATCH v3] virtio_blk: Fix a slient kernel panic
From: Minfei Huang <mnghuan at gmail.com> We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return
2013 Mar 06
1
Re: [PATCH 00 of 10 [RFC]] Automatically place gueston host's NUMA nodes with xl
hello, I used the patch in xen4.1 and enabled it has the feature of numa placement,but has the earlier said problem.Can you help me that what is the reason? And where is the newest version of the patch,pls provide the latest development branch's address. Thanks, Regards, Butine huang Zhejiang University 2013-03-06 >On mer, 2013-03-06 at 10:49 +0000, butian huang wrote: >>
2014 Jan 02
2
[LLVMdev] Tracing values in llvm IR
Hi Jin Huang, The updated Giri code is available at https://github.com/liuml07/giri<https://github.com/liuml07/giri.>. This will give you an idea of how to instrument the program to trace different values. You can modify the code to achieve your goals. -Swarup. ________________________________ From: Criswell, John T Sent: Thursday, January 02, 2014 2:12 PM To: Jin Huang; llvmdev at
2015 Feb 28
2
[LLVMdev] Getting basic block address offset from its parent function
Hi John Thanks for your suggestions, they all sound reasonable to me. The way I'm thinking right now is to write a MachineFuncionPass that iterate through each MachinBasicBlock, for each MBB, adds up the instructions counts of previous MBBs, that number multiply by 4 should be the offset of that MBB from its MachineFunction. In order to correctly count the instructions, this pass should be
2008 May 14
2
basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character. It seems that dirname/basename action on unit of byte instead of char, so the result in the following example is half of what is expected. > g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt" > dirname(g) [1] "d:/$BG!2L4^(B" > basename(g) [1] "$BG!2L4^M-(B" -- HUANG Ronggui,
2015 Mar 01
1
[LLVMdev] Getting basic block address offset from its parent function
On Sat, Feb 28, 2015 at 7:39 AM, Ziqiang Patrick Huang < ziqiang.huang1001 at gmail.com> wrote: > Hi John > > Thanks for your suggestions, they all sound reasonable to me. The way I'm > thinking right now is to write a MachineFuncionPass that iterate through > each MachinBasicBlock, for each MBB, adds up the instructions counts of > previous MBBs, that number multiply
2008 Dec 11
1
Sorting problem
Sys.setlocale(,"C") x1 <- as.character(date()) # I use date to record the time, and save it to sqlite database, to it converted to character x1_2 <- strptime(x1, "%a %b %d %H:%M:%S %Y") x2 <- as.character(date()) x2_2 <- strptime(x2, "%a %b %d %H:%M:%S %Y") X<-c(x1_2,x2_2) order(X) ## I want to get the permutation other than the sorted vector. ##
2005 Nov 27
2
multilevel models and sample size
It is not a pure R question,but I hope some one can give me advices. I want to use analysis my data with the multilevel model.The data has 2 levels---- the second level has 52 units and each second level unit has 19-23 units.I think the sample size is quite small,but just now I can't make the sample size much bigger.So I want to ask if I use the multilevel model to analysis the data set,will