What is the difference between 'smooth' and 'smoothdata' function?

I known that the 'smooth' function deals with response data while the 'smoothdata' function deals with noisy data.
Is there any difference bewteen response data and noisy data?
Are 'smooth' and 'smoothdata' repetitive functions?

4 comentarios

I don't understand the supposed difference between "reponse" and "noisy" data? Data are data; anything can be filtered and/or smoothed; the source has little, if any, bearing. From whence did you get the description/idea of the two having some supposed different application? It's not in the TMW documentation for either.
smoothdata is pretty new as compared to smooth but is in the base product datafun library whereas smoothdata is in the CurveFit TB so had to have had it before to have access.
They do have quite similar functionality altho they don't quite replicate each other in how are implemented re: end effects and computing moving averages so won't get identical results in most cases even trying to match parameters.
Thank you very much for your reply.
I found descriptions involving 'response' and 'noisy data' on pages below:
Now I realised that the two functions process differently even using the same filter method and parameters. Then how to know which one is better to be applied to my specific data? Is there any guidance or prefrence that suggests me to choose between these two functions?
Not really...the differences should be minor as it is really only the end effects that can't make same.
You'll end up trying several different types to find what works well in a given situation, they'll undoubtedly have far more differences between them than the relatively minor differences of the implementation differences.
If you didn't have the SP TB you'd not know about smooth, anyways, and be just as happy with smoothdata... :)
I now know what to do with my data. Thanks again :D

Iniciar sesión para comentar.

 Respuesta aceptada

John D'Errico
John D'Errico el 19 de Abr. de 2020
Editada: John D'Errico el 19 de Abr. de 2020
These are very similar codes, doing similar things. smooth came eariler. But not everybody has the same toolboxes, nor can you be forced to get all toolboxes. Yet many people will want to do the same things as are found in both codes.
Smooth came out in 2006, smoothdata in 2017. Smoothdata is a little more sophisticated, with more options, as you might expect, since it was introduced many years later. It can work on multidimensional arrays. Smooth seems to be for vectors only. The interface is slightly different between them, but not by that much.
Which one is "better"? Neither, really. Both offer a similar set of methods, though smoothdata is a littler broader in your choices. If you need one of the options in smoothdata, then your choice is made for you. If they both offer the same method, and you want to use that method, then just flip a coin. I'm pretty confident the author made sure the code is valid, by crosstesting the results.
Don't get too hung up on the wording in the documentation. They both do essentially the same thing. It would be more important for you to choose intelligently from the various methods offered as options, as that can significantly impact your results. Different methods can be useful for different kinds of noise, different noise structures, so understanding what choices you make is important.
For example, suppose your noise is in the form of rare but very large outliers? In that case, some sort of median smooth makes a lot of sense. Other smoothing operations (moving mean, Savitsky-Golay, etc.) will get draggd around massively by a rare but significant outlier. Again, it is really important to understand the methods in those tools.

3 comentarios

Now I see that filter methods are really important. Many thanks for the detail answer, it's very helpful!
Thanks much for the explanation and the insights!
For anyone out there using the LOESS and RLOESS functions, for long window (400+ pts) sizes the smoothdata implementation appears to be dramatically faster than the older smooth. I'm not sure why this is and haven't validated, but those are my initial results using them.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 19 de Abr. de 2020

Comentada:

el 5 de Oct. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by