COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### How to judge quality of Savitzky-Golay smoothing?

• Email
• Follow

```I have used sgolayfilt and performed some Savitzky-Golay smoothing to data:
http://www.mathworks.com/help/toolbox/signal/ref/sgolayfilt.html

For now, it neesd to be a Savitzky-Golay filter - not moving average, loess, etc. Now, I need to know how to judge what the best Savitzky-Golay filter parameters are. There are 2 options for parameters: k - degree of polynomial and f - frame size. I am not very familiar with smoothing techniques so I have some questions.

Questions:
1. How does one judge the quality of the smoothing? Is visual judgement sufficient (I can do this)?
2. Can a R^2 be computed for the agreement/disagreement between the smoothed data and the raw data? Would this be a valid approach to making this judgement?
```
 0
Reply studentt_44 (54) 8/11/2012 8:08:07 PM

See related articles to this posting

```"Stan" wrote in message <k06e37\$m9g\$1@newscl01ah.mathworks.com>...
> I have used sgolayfilt and performed some Savitzky-Golay smoothing to data:
> http://www.mathworks.com/help/toolbox/signal/ref/sgolayfilt.html
>
> For now, it neesd to be a Savitzky-Golay filter - not moving average, loess, etc. Now, I need to know how to judge what the best Savitzky-Golay filter parameters are. There are 2 options for parameters: k - degree of polynomial and f - frame size. I am not very familiar with smoothing techniques so I have some questions.
>
> Questions:
> 1. How does one judge the quality of the smoothing? Is visual judgement sufficient (I can do this)?
> 2. Can a R^2 be computed for the agreement/disagreement between the smoothed data and the raw data? Would this be a valid approach to making this judgement?

R^2 is a terrible choice for automatic judgment of
smoothing.

Use your eyes to tell you when you are happy, not
any single number. As soon as you agree to remove
equation, replacing them with a single number to
judge the result, you will get what you deserve.

John
```
 0
Reply woodchips (7942) 8/11/2012 8:29:07 PM

```I agree with John.  There is no single equation that will give you some kin=
d of quality metric that will tell you when you have the optimal set of par=
ameters.  It's optimal when you say it's optimal.  How much smoothing or no=
ise reduction you need is a subjective and personal decision.  So unless yo=
u have some "ground truth" (the theoretically perfect and known noise-free =
```
 0
Reply imageanalyst (7622) 8/11/2012 11:15:03 PM

```"Stan" wrote in message <k06e37\$m9g\$1@newscl01ah.mathworks.com>...
>
>
> Questions:
> 1. How does one judge the quality of the smoothing? Is visual judgement sufficient (I can do this)?
> 2. Can a R^2 be computed for the agreement/disagreement between the smoothed data and the raw data? Would this be a valid approach to making this judgement?
============

In image processing, what people often do is plot a noise/resolution trade-off curve as a function of the filter parameters. They would then select the parameters based on the resolution/noise level they want to operate at.

Although this isn't image processing, I image you have ways of measuring both noise and the sharpness of the signal features you want to preserve. You could therefore plot the trade-off in a similar way.
```
 0
Reply mattjacREMOVE (3193) 8/12/2012 12:31:06 AM

```ImageAnalyst <imageanalyst@mailinator.com> wrote in message <b28337e0-c93b-410b-bd65-ab9c50543b43@googlegroups.com>...
> I agree with John.  There is no single equation that will give you some kind of quality metric that will tell you when you have the optimal set of parameters.  It's optimal when you say it's optimal.  How much smoothing or noise reduction you need is a subjective and personal decision.  So unless you have some "ground truth" (the theoretically perfect and known noise-free signal) then you can just adjust it as you please.

There are some theory that tends to estimate the parameters automatically, such as cross validation, L-curve.

Compromise between smoothness and overfit is usually challenging to be done well automatically, but it's NOT a matter of subjective decision.

Bruno
```
 0
Reply b.luong5955 (6403) 8/12/2012 2:23:07 AM

```"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <k0742b\$nv8\$1@newscl01ah.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <b28337e0-c93b-410b-bd65-ab9c50543b43@googlegroups.com>...
> > I agree with John.  There is no single equation that will give you some kind of quality metric that will tell you when you have the optimal set of parameters.  It's optimal when you say it's optimal.  How much smoothing or noise reduction you need is a subjective and personal decision.  So unless you have some "ground truth" (the theoretically perfect and known noise-free signal) then you can just adjust it as you please.
>
> There are some theory that tends to estimate the parameters automatically, such as cross validation, L-curve.
>
> Compromise between smoothness and overfit is usually challenging to be done well automatically, but it's NOT a matter of subjective decision.
>
> Bruno

I have no desire to argue the matter, but I will disagree
that automatic tools are up to the task of such a decision
at least at the current state of the art.

Anyway, this is not the choice of a continuous smoothing
parameter, that MIGHT arguably be chosen by a tool, but
the choice of parameters like window width and order of
the implicit fit in a Savitsky-Golay smoother.

The eyes of the person doing the fit will often be far better
at making such decisions than a computational algorithm.
You are the person who knows what your goal is for the fit,
and who knows how much of that noise really is noise and
what is acceptable for your purposes. You can often see
immediately when the fit is one that overfits the data or is

Trust your eyes rather than rely on a black box.

John
```
 0
Reply woodchips (7942) 8/12/2012 2:37:06 AM

```Okay, lots of information there to digest. Let me start with this:

> ============
>
> In image processing, what people often do is plot a noise/resolution trade-off curve as a function of the filter parameters. They would then select the parameters based on the resolution/noise level they want to operate at.
>
> Although this isn't image processing, I image you have ways of measuring both noise > and the sharpness of the signal features you want to preserve. You could therefore > plot the trade-off in a similar way.
> ============

Here is what I have access to (this is spectroscopy data - counts vs channels is what I am dealing with):
1. x - channels
2. y - measured counts
3. yf - smoothed counts

What is the noise trade-off equation that you are refering to? I don't mean the MATLAB version, but just the equation in general (if you have a link that you be best) unless it's easier to just write out the MATLAB code.
```
 0
Reply studentt_44 (54) 8/12/2012 8:27:06 PM

6 Replies
51 Views

Similar Articles

12/13/2013 1:09:39 PM
[PageSpeed]

Similar Artilces:

Problems on the Savitzky-Golay smoothing filter
Hi,everybody, I have got a annoying problem about the implementing the Savitzky-Golay filter to smooth the time series RS data in the IDL. Actually, I know the function of the Savitzky-Golay filter in IDL is SAVGOL.But the question is the result I got is either a horizon line or the same as the original line(In other words, the filter seems not to work at all), when I changed the parameters of the SAVGOL function. (when the DEGREE = NL + NR(PARA OF THE SAVGOL FUNCTION), THE RESULT IS THE SAME AS THE ORIGINAL, OTHERWISE, THE RUSULT IS A HORISON LINE) My pro is as follows. The c...

golay-savitzky filter
I urgently need a program which is performing data-filtering, especially after golay-savitzky algorithmus. thanx. L wrote: > > > I urgently need a program which is performing data-filtering, > especially after golay-savitzky algorithmus. > > thanx. >>help sgolayfilt ...

smooth
How do you smooth a columb matrix that has random nan values mixed in the matrix? In article <eee6a44.-1@webx.raydaftYaTP>, kk <ktkiebel@hotmail.com> wrote: > How do you smooth a columb matrix that has random nan values mixed in > the matrix? Inpaint_nans is on matlab central. It will do a smooth interpolation, but is not set up to smooth the non-nan elements. You certainly could modify it to allow actual smoothing. HTH, John D'Errico -- There are no questions "?" about my real address. The best material model of a cat is another, or preferably the same...

Quality Assurance versus Quality Control
I have a QA/QC question that I have been trying to find the answer to. I should warn that I'm being very pedantic in this question. I've seen articles that say QA and QC are nearly the same thing or that QA processes include doing reviews, which by my definition is QC. So here goes. Let's assume that I have the following waterfall process in place: Business Requirements (Business) Functional Specification (IT) >Formal Functional Spec Review (IT & Business) High Level Design Specification (IT) >Formal High Level Design Spec Review (IT) Write Code (IT) Develop Unit Test C...

quality
Does anyone know if the quality of Acer aspire notebooks has decreased? I have been told that as they are now manufacturing them to a lower price for selling to the big supermarkets they are building them with lower quality parts.. Thanks for any thoughts. -- Nospam "Nospam" <nospam@nospam.demon.co.uk> wrote in message news:AWfenTD8AU+GFwTM@nospam.demon.co.uk... > Does anyone know if the quality of Acer aspire notebooks has decreased? > > I have been told that as they are now manufacturing them to a lower price > for selling to the big supermarkets they are...

Quality
I invite you to have a look at my newly launched web site on Quality management. It contains lots of basic information on quality and is free for any one to access. go to http://www.qualitytimes.co.in Sandeep ...

good quality F1 coat,jacket,shirt(paypal accept)(www. top-saler.com) good quality gucci bag,lv bag,dior,fendi(paypal accept)(www. top-saler.com) good quality watch,belt hat(paypal accept)(www.
good quality hip hop shirt wholesale (paypal accept)(www.top- saler.com) good quality googi,jeans,jacket,hoody(paypal accept)(www. top- saler.com) good quality F1 coat,jacket,shirt(paypal accept)(www. top-saler.com) good quality gucci bag,lv bag,dior,fendi(paypal accept)(www. top- saler.com) good quality watch,belt hat(paypal accept)(www. top-saler.com) air jordan At Wholesale Price wholesale (paypal accept)(www.top- saler.com) dunk At Wholesale Price wholesale (paypal accept)(www.top-saler.com) gucci At Wholesale Price wholesale (paypal accept)(www.top- saler.com) r3,r4,r5,shox At Whole...

Non-intrusive voice quality testing software for single-ended speech quality assessment
Modern standard methods for evaluating quality of transmitted speech Voice quality is one of the main characteristics of speech transmission systems. When analyzing voice quality one must not only consider audio signal degradation caused by transmission over telecom channels, but also specifics of speaker's voice, conditions of listener's hearing and variation of these parameters in time. The most known methods for quality evaluation of voice transmission systems were developed by Telecommunication Standardization Sector of International Telecommunications Union (ITU-T) in ...

Consumers reject low quality OSS alternatives. Seem to be very happy with quality name brand products.
Yup - everybody is running away from closed propreitary hardware and software. As witnessed by what Apple did in the past 3 months. Funny how Apple sold more iPods and iPhones in the past 3 months than all of these crappy OSS gadgets combined have ever sold. People want name brand quality. It's only the COLA bozo's only care about cheap or free. http://biz.yahoo.com/prnews/071022/aqm220.html?.v=5 - "Apple shipped 2,164,000 Macintosh� computers, representing 34 percent growth over the year-ago quarter and exceeding the previous quarterly record for Mac� shipments by 400,0...

font smoothing
i made a vector font in opengl, but it looks bad around the edges. the standard anti-aliasing didn't cut it. any ideas? bob@coolgroups.com wrote: > i made a vector font in opengl, but it looks bad around the edges. > > the standard anti-aliasing didn't cut it. any ideas? > Can you put a screenshot on a web site to show the problem...? -- <\___/> / O O \ \_____/ FTB. For email, remove my socks. In science it often happens that scientists say, 'You know that's a really good argument; my position is mistaken,' and then they actually change th...

Apple Quality???
Lifted from rec.video.production: "I just heard yesterday that one of the leading post-houses here in Sydney has so many issues with FCP (Dual G4 with Cinewave), that they are seriously thinking of ditching their system and get another AVID back. They hate it (they have upgraded to v.4)." Couple with the outstanding issues of file sharing with Windows PC. The perfect world of the Mac is just an illusion. Now, back to the Apple machines' quality. This morning. I turned on the Powerbook. The screen was blank, but I heard the Apple start up sound and nothing else. Tried again the...

Smoothing a graph
Hello I have a program that calculates the distance between two moving bubbles in a fluid. The algorithm has an error on the order of the grid size, so that the resulting graphs look like this: http://folk.ntnu.no/knutert/osc.png Is there an easy way to filter out these oscillations to produce a nicer result? ...

Image Quality !!!
I am facing a problem. I need to render some Solidworks Parts ( using 3D STUDIO MAX )...but even after setting IMAGE Quality to Highest Resolution, I am not getting smooth surface ...especially at the curvatures on the model. I was wondering ...if its possible to increase image quality. I have not yet installed latest service pack...Is it something to do with installing the service packs. Thanks. Amit. No, it has to due with curvature quality and c1 c2 ect.. tangency. SW has certain limitations in that area. "Amit" <amit.kulkarni@villanova.edu> wrote in message news:160726...

Smoothing a surface
I have a 2D matrix of data, but it represents a 3D surface, I want to smooth this surface, I can have also the data in X Y and Z. smooth3 is not working since I would need a 3D array and I'm not sure that that's what I need (What should I write where there are no values? NaN? zeros?.Or how can I use the smooth 3 in this case? I think interpolation won't do it since what I want is not to find values intermediate to those that I already have, but to "correct" those that are not what they should, this is an example: If this is the original matrix: A= [ 1 2 3 4 5 2 3...

image quality
I have a couple of quick questions... I have zoomed into my drawing and produced a circular hidden detail, but when showing this hidden detail at 6:1 the outline of the circle is jagged. I have changed the image quality setting in performance to maximum but this isn't helping... any ideas? Also, how can I change the colour of just this hidden detail circle to white? Thanks. The image quality setting slider bar on top is only for shaded drawing views & shaded 3d models. The image quality setting slider bar on the bottom is for wireframe, hidden removed, hidden visible, ect... which...

Quality Webform
Hi, I am trying to create a quality webform which has a number of checkboxes or (radio buttons)... 1st parameter: checkbox 1 - value 5 checkbox 2 - value 3 checkbox 3 - value 1 2nd parameter: checkbox 1 - value 5 checkbox 2 - value 3 checkbox 3 - value 1 on selecting a checkbox it will give show its corresponding value in a textbox on the right-hand side of the page..... the final 2 textboxes will show the total & the percentage.... how to Accomplish this??? I am new to Javascript..... Junoon said on 02/04/2006 5:05 PM AEST: > Hi, > > I am trying to create a quality webf...

mpeg quality
Hi all, Sorry if this has been asked before, but does anyone know how to improve the quality of an mpeg written from IDL's Xinteranimate command. I tried changing mpg_quality and mpg_bitrate but I always got a file that was exactly the same size and quality. I must be doing something silly. Thanks David In article <1Zbhc.1597\$Ua5.1269400@monger.newsread.com>, "David Jackson" <jacksond@dickinson.edu> wrote: > Sorry if this has been asked before, but does anyone know how to improve the > quality of an mpeg written from IDL's Xinteranimate command. I...

Smooth edges
I'm looking for advice on making borders of rounded pictures smooth. Currently when working with small images (20px) the borders have sharp edges and images looks like cutted out inaccurate. Thanks. In article <1153410390.556630.14900@s13g2000cwa.googlegroups.com>, "Dmi" <dskrizhewsky@gmail.com> wrote: > I'm looking for advice on making borders of rounded pictures smooth. > Currently when working with small images (20px) the borders have sharp > edges and images looks like cutted out inaccurate. What are you doing with these images? -- Art, phot...

Toshiba quality
Any thoughts as to the quality of toshiba's Satellite series of laptops? I know everyone has their preferences but how does the quality stack up against Dell? GP This varies by specific model (of both Toshiba and Dell), but overall I'd say that Toshiba is about comparable to Dell. Again, you really have to compare specific models. gperry@peoplescom.net wrote: > Any thoughts as to the quality of toshiba's Satellite series of > laptops? I know everyone has their preferences but how does the > quality stack up against Dell? > > GP <gperry@peoplescom.net&...