search for: index_end

Displaying 12 results from an estimated 12 matches for "index_end".

2011 Jul 23
1
Extend my code to run several data at once.
...matrix(NA, nrow = runs, ncol = 4, dimnames = list(paste("Qtr:", 1:runs , sep = ''), c("al_j", "au_j", "sigma_j", "b_j"))) ## Estimate parameters based on rows 0-20, 21-40, 41-60 of afull for (i in 1:runs) { index_start=20*(i-1)+1 index_end= 20*i a=afull[index_start:index_end,] out[i, ] <- optimx(llik,par = start.par,method = "Nelder-Mead", control=list(maximize=TRUE) )[[1]][[1]] } ## Yields > out al_j au_j sigma_j b_j Qtr:1 0.0012402032 0.001082986 0.012889809 1.14095125 Qtr...
2017 Dec 20
0
[PATCH v20 0/7] Virtio-balloon Enhancement
...xb_find_set(struct xb *xb, unsigned long max, unsigned long *bit) { - struct radix_tree_root *root = &xb->xbrt; - struct radix_tree_node *node; + struct radix_tree_iter iter; void __rcu **slot; struct ida_bitmap *bitmap; - unsigned long index = offset / IDA_BITMAP_BITS; - unsigned long index_end = size / IDA_BITMAP_BITS; - unsigned long bit = offset % IDA_BITMAP_BITS; - - if (unlikely(offset >= size)) - return size; - - while (index <= index_end) { - unsigned long ret; - unsigned int nbits = size - index * IDA_BITMAP_BITS; - - bitmap = __radix_tree_lookup(root, index, &node,...
2011 Jul 06
1
Group Data indexed by n Variables
...- > pnorm(au_j,mean=b_j*a$R_m,sd=sqrt(sigma_j^2))))) > > ) > > } > > start.par = c(0, 0, 0.01, 1) > out1 = optim(llik, par=start.par, method="Nelder-Mead") > > > for (i in 1: runs) > { > index_start=20*(i-1)+1 > index_end= 20*i > out[i]=out1[index_start:index_end] > } > out > > > Thank you in advance > > Edward > UCT > ####My data > > R_j R_m > -0.0625 0.002320654 > 0 -0.004642807 > 0.033333333 0.005936332 > 0.032258065 0.0010...
2011 Jul 04
3
loop in optim
...-log(pnorm(au_j,mean=b_j*a$R_m,sd=sqrt(sigma_j^2))- pnorm(au_j,mean=b_j*a$R_m,sd=sqrt(sigma_j^2))))) ) } start.par = c(0, 0, 0.01, 1) out1 = optim(llik, par=start.par, method="Nelder-Mead") for (i in 1: runs) { index_start=20*(i-1)+1 index_end= 20*i out[i]=out1[index_start:index_end] } out Thank you in advance Edward UCT ####My data R_j R_m -0.0625 0.002320654 0 -0.004642807 0.033333333 0.005936332 0.032258065 0.001060848 0 0.007114057 0.015625 0.005581558 0 0.002974794 0.015384615 0.004215271 0.060606061 0.005073116 0.02857142...
2017 Dec 20
2
[PATCH v20 0/7] Virtio-balloon Enhancement
On Wednesday, December 20, 2017 8:26 PM, Matthew Wilcox wrote: > On Wed, Dec 20, 2017 at 06:34:36PM +0800, Wei Wang wrote: > > On 12/19/2017 10:05 PM, Tetsuo Handa wrote: > > > I think xb_find_set() has a bug in !node path. > > > > I think we can probably remove the "!node" path for now. It would be > > good to get the fundamental part in first, and
2017 Dec 20
2
[PATCH v20 0/7] Virtio-balloon Enhancement
On Wednesday, December 20, 2017 8:26 PM, Matthew Wilcox wrote: > On Wed, Dec 20, 2017 at 06:34:36PM +0800, Wei Wang wrote: > > On 12/19/2017 10:05 PM, Tetsuo Handa wrote: > > > I think xb_find_set() has a bug in !node path. > > > > I think we can probably remove the "!node" path for now. It would be > > good to get the fundamental part in first, and
2017 Dec 22
0
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...ffset) >>> +{ >>> + struct radix_tree_root *root = &xb->xbrt; >>> + struct radix_tree_node *node; >>> + void __rcu **slot; >>> + struct ida_bitmap *bitmap; >>> + unsigned long index = offset / IDA_BITMAP_BITS; >>> + unsigned long index_end = size / IDA_BITMAP_BITS; >>> + unsigned long bit = offset % IDA_BITMAP_BITS; >>> + >>> + if (unlikely(offset >= size)) >>> + return size; >>> + >>> + while (index <= index_end) { >>> + unsigned long ret; >>> + unsigne...
2017 Dec 21
7
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...d. + */ +unsigned long xb_find_set(struct xb *xb, unsigned long size, + unsigned long offset) +{ + struct radix_tree_root *root = &xb->xbrt; + struct radix_tree_node *node; + void __rcu **slot; + struct ida_bitmap *bitmap; + unsigned long index = offset / IDA_BITMAP_BITS; + unsigned long index_end = size / IDA_BITMAP_BITS; + unsigned long bit = offset % IDA_BITMAP_BITS; + + if (unlikely(offset >= size)) + return size; + + while (index <= index_end) { + unsigned long ret; + unsigned int nbits = size - index * IDA_BITMAP_BITS; + + bitmap = __radix_tree_lookup(root, index, &node,...
2017 Dec 21
7
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...d. + */ +unsigned long xb_find_set(struct xb *xb, unsigned long size, + unsigned long offset) +{ + struct radix_tree_root *root = &xb->xbrt; + struct radix_tree_node *node; + void __rcu **slot; + struct ida_bitmap *bitmap; + unsigned long index = offset / IDA_BITMAP_BITS; + unsigned long index_end = size / IDA_BITMAP_BITS; + unsigned long bit = offset % IDA_BITMAP_BITS; + + if (unlikely(offset >= size)) + return size; + + while (index <= index_end) { + unsigned long ret; + unsigned int nbits = size - index * IDA_BITMAP_BITS; + + bitmap = __radix_tree_lookup(root, index, &node,...
2011 Jul 03
3
Hint improve my code
Hi I have developed the code below. I am worried that the parameters I want to be estimated are "not being found" when I ran my code. Is there a way I can code them so that R recognize that they should be estimated. This is the error I am getting. > out1=optim(llik,par=start.par) Error in pnorm(au_j, mean = b_j * R_m, sd = sigma_j) : object 'au_j' not found #Yet
2017 Dec 19
15
[PATCH v20 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one array each time; and 2) free page block reporting: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live
2017 Dec 19
15
[PATCH v20 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one array each time; and 2) free page block reporting: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live