As shown in the figure below, I want to measure MSE from waveform data using MSE.VI, but there are many difficulties.
03-16-2020 09:14 PM
Solved! Go to Solution.
03-16-2020 10:15 PM
If you have two sequences, X and Y, you can compute the Mean Square Error between them. For example, if you fit a straight line through a series of points, you can compute the MSE between the data and the corresponding point on the line that you tried to fit. Indeed, one often tries to find the line that has the smallest MSE, and calls this the "Least Squares Fit line". [I'm over-simplifying a little bit ...]
You took a Waveform and used it for both X and Y. I would expect the MSE to always be 0, no matter what the Waveform was. Is that what you got?
What is it that you are really trying to do? What are X and Y going into the MSE function? I suspect that you might not quite understand what you are doing (I certainly don't understand what you are doing ...).
Bob Schor
03-16-2020 11:38 PM
Hi, Bob Schor
Thanks for the answer.
It is an object to construct an algorithm for removing noise using a wavelet transform on a signal measured by a microphone and analyzing a noise removal effect on a denoised signal.
The purpose of using Mse is to evaluate the accuracy of the noise removal process.
However, I don't know how to calculate Mse using Mse.VI.
How can I calculate MSE from denoised acoustic signals?
03-17-2020 12:15 AM - edited 03-17-2020 12:23 AM
@Disaster_prevention wrote:The purpose of using Mse is to evaluate the accuracy of the noise removal process.
You simply need to compare the signal before and after the filter, so wire these signals to the two inputs of MSE. (You are currently comparing a waveform to itself, which makes no sense).
Besides the math, you are not really measuring any MSE this way, unless you can assume that the filtering removes 100% of the noise while creating zero distortion to the signal. That's typically only an approximation.
Notice all your red coercion dots, each one means that the datatype of the wired signal is not what the function expects. MSE wants two 1D arrays of equal size. (Personally, I would not have called the inputs X and Y, because that's confusing.)
Even if you are a beginner, I would recommend you get away from express VIs and dynamic data.
03-17-2020 02:48 AM
03-17-2020 03:07 AM - edited 03-17-2020 03:07 AM
Your SNR is less than 0.01, but your indicator is formatted to only show two decimal digits. Change the format and you get a nonzero value with your current data (right-click...display format...):
I have not determined the validity of the rest of your code. In particular I don't know if your wavelet settings are reasonable. Do you know how a noiseless dataset is supposed to look like (e.g. from a simulation)?
03-17-2020 05:55 AM
The present wavelet transform denoising process is a step to build, and the appropriate wavelet parameter is not yet applied.
I plan to analyze noise removal signal performance based on MSE and SNR in the future and determine the appropriate wavelet parameters.