search for: smpl

Displaying 10 results from an estimated 10 matches for "smpl".

Did you mean: smp
2008 May 23
0
Est. Component Size with AIC/BIC under Gamma Distribution
...the # samples, I use BIC/AIC with MLE (computed from dgamma function). Here is the code I have. __BEGIN__ mlogl <- function( x_func, theta_func, samp) { # computing log_likelihood return( - sum(dgamma(samp, shape = x_func, scale=theta_func, log = TRUE))) } find_bic <- function(mll,smpl,k) { bic <- (-2 * mll) + (k * log(length(smpl))) bic } find_aic <- function(mll,smpl,k) { aic <- (-2 * mll) + (k * 2) aic } mlogl_process <- function(smpl,error,start ) { # EM algorithm to estimate max loglikelihood thetalast <- 0 thetacurren...
2004 Jul 25
2
Colors in survival plots
Hi, Sorry to trouble the list - I would like to ask a question - I can't find the answer in the r-help archives. I am trying to plot 2 survival curves in different colors. What I have tried is this plot(survfit(sim.surv ~ sim.km.smpl),col="red") but both the survival curves turn red... Your advice would be most appreciated! Thank you. Min-Han
2002 Feb 14
1
Subsets in mclust
...ize `k' of the data in the initial hierarchical clustering phase. The default is to use the entire data set. m2 is a matrix (not very large, but the same happens always when specifying k): > dim(m2) [1] 242 2 > em321 <- emclust(m2,k=50) Error in mhtree.VVV(data[smpl, ]) : data must be a matrix with at least 2 columns > em321 <- emclust(m2) (No problems) > em321 <- emclust(m2,modelid="VEV",k=50) Error in mhtree.VVV(data[smpl, ]) : data must be a matrix with at least 2 columns > library(help=mclust) mclust Model-based cluster...
2023 Jun 25
0
[PATCH 08/26] virtio-mem: use array_size
On Fri, 23 Jun 2023 23:14:39 +0200, Julia Lawall <Julia.Lawall at inria.fr> wrote: > Use array_size to protect against multiplication overflows. > > The changes were done using the following Coccinelle semantic patch: > > // <smpl> > @@ > expression E1, E2; > constant C1, C2; > identifier alloc = {vmalloc,vzalloc}; > @@ > > ( > alloc(C1 * C2,...) > | > alloc( > - (E1) * (E2) > + array_size(E1, E2) > ,...) > ) > // </smpl>...
2008 Aug 02
0
[PATCH 10/10] drivers/net/xen-netfront.c: Use DIV_ROUND_UP
From: Julia Lawall <julia at diku.dk> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. An extract of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expressio...
2009 Jul 18
0
[PATCH 5/6] fs/btrfs: convert nested spin_lock_irqsave to spin_lock
...t state at the point of the second call overwrites the value saved by the first call. Indeed, the second call does not need to save the interrupt state, so it is changed to a simple spin_lock. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression lock1,lock2; expression flags; @@ *spin_lock_irqsave(lock1,flags) ... when != flags *spin_lock_irqsave(lock2,flags) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> --- fs/btrfs/async-thread.c | 4 ++-- 1 files changed, 2 insertions(+), 2 delet...
2014 Jul 18
9
[PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use
We should prefer `const struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> I have 103 patches ready, and will only send a few for you to judge if it is useful enough, and to prevent from spamming too much. T...
2014 Jul 18
9
[PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use
We should prefer `const struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> I have 103 patches ready, and will only send a few for you to judge if it is useful enough, and to prevent from spamming too much. T...
2005 Aug 19
2
FFT, frequs, magnitudes, phases
Hi, I'm in dire need of a fast fourier transformation for me stupid biologist, i.e. I have a heartbeat signal and would like to decompose it into pure sin waves, getting three vectors, one containing the frequencies of the sin waves, one the magnitudes and one the phases (that's what I get from my data acquisition software's FFT function). I'd be very much obliged, if someone
2008 Apr 02
10
[PATCH 0/62] Ocfs2 updates for 2.6.26-rc1
The following series of patches comprises the bulk of our outstanding changes for Ocfs2. Aside from the usual set of cleanups and fixes that were inappropriate for 2.6.25, there are a few highlights: The '/sys/o2cb' directory has been moved to '/sys/fs/o2cb'. The new location meshes better with modern sysfs layout. A symbolic link has been placed in the old location so as to