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

22 visualizaciones (últimos 30 días)
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
dpb
dpb el 19 de Abr. de 2020
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... :)
Yuqian Si
Yuqian Si el 20 de Abr. de 2020
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
Muhammad Zayed
Muhammad Zayed el 25 de Ag. de 2020
Thanks much for the explanation and the insights!
Miguel Inserni
Miguel Inserni el 5 de Oct. de 2020
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

Más información sobre Calendar en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by