s-news
[Top] [All Lists]

Re: Gaussian smoothing

To: "'Catalina Mesina'" <cmesina@cs.vu.nl>, "Liaw, Andy" <andy_liaw@merck.com>, "S-news list" <s-news@lists.biostat.wustl.edu>
Subject: Re: Gaussian smoothing
From: "Liaw, Andy" <andy_liaw@merck.com>
Date: Mon, 25 Nov 2002 11:14:59 -0500
You simulated:

> myim<-matrix(rnorm(2500),50,50)
> 
> x<-seq(1,50,1)
> y<-seq(1,50,1)
> grid<-expand.grid(x,y)
> myd<-data.frame(grid[,1],grid[,2],as.vector(myim))

so where is the "peak"?  It might help more if you simulated more realistic
data.

Andy

-----Original Message-----
From: Catalina Mesina [mailto:cmesina@cs.vu.nl]
Sent: Monday, November 25, 2002 11:10 AM
To: Liaw, Andy; S-news list
Subject: Re: [S] Gaussian smoothing



In fact my  image is not only noise, but a matrix with low noise levels and
one small area with higher values. However due to the noise in data is
difficult to detect the peak. Therefore I need to smooth. 

Catalina

"Liaw, Andy" wrote:
> 
> If I understood you correctly, what you want to try is set the "span"
> argument in loess() to something fairly small (e.g., 0.1 or 0.05).  The
> default (0.75) is probably too large for smoothing images.
> 
> I'm not sure what you're expecting to see in your simulated example.  You
> simulated pure noise, so you should see (nearly) nothing after the smooth.
> 
> Andy
> 
> -----Original Message-----
> From: Catalina Mesina [mailto:cmesina@cs.vu.nl]
> Sent: Monday, November 25, 2002 10:54 AM
> To: S-news list
> Subject: [S] Gaussian smoothing
> 
> Dear all,
> 
> I have tried a 3D smoothing of my data, using "loess", or smooth but I did
> not get the right smoothed image.
> Suppose that my data is a matrix  "myim" 50x50 and at each point (x,y) in
> the grid I have an intensity value.
> 
> myim<-matrix(rnorm(2500),50,50)
> 
> x<-seq(1,50,1)
> y<-seq(1,50,1)
> grid<-expand.grid(x,y)
> myd<-data.frame(grid[,1],grid[,2],as.vector(myim))
> sm.myd<-fitted(loess(myd$X3~myd$X1*myd$X2,data=myd))
> image(matrix(myd$X3,50,50))
> 
> Then what I would like to have is a gaussian smoothed image (matrix) of
> myim.
> 
> I will appreciate every help answer from you.
> 
> Catalina
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 
>
----------------------------------------------------------------------------
--
> Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that
may be confidential, proprietary copyrighted and/or legally privileged, and
is intended solely for the use of the individual or entity named in this
message.  If you are not the intended recipient, and have received this
message in error, please immediately return this by e-mail and then delete
it.
> 
>
============================================================================
==

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may 
be confidential, proprietary copyrighted and/or legally privileged, and is 
intended solely for the use of the individual or entity named on this message. 
If you are not the intended recipient, and have received this message in error, 
please immediately return this by e-mail and then delete it.

==============================================================================


<Prev in Thread] Current Thread [Next in Thread>