If I understand your question correctly, you are trying to filter out the noise from the net_signal. Let me try to explain to you why this is not what you are doing in your code.
First of all, a regression is not a tool to denoise something, but a tool to describe/estimate (linear) relationships between data/variables. As your simulated signal does not have any constant parameter attached to some stochastic (random) variable, there is no linear relationship in your data. You have just generated random numbers. This means that you can't find a relationship between the signal and the variable.
Here is an example of data you could simulate where you can find a linear relationship (via a regression) between your signal and some variables:
signal = 0.5 X randomvariable + 0.7 X randomvariable2 + randomnoiseterm
Doing a regression on this on a large enough sample would yield coefficients of approximately 0.5 and 0.7. These coefficients will be returned in the vector you call w.
You are kind of right in your thinking though. With a large enough sample you can via a regression, as stated, estimate the linear relationships in your data (in the above case 0.5 and 0.7). Thus, these coefficients can be seen as the denoised relationship between your signal and the random variables.
It's important to know that a regression will not generate these "correct" estimates in all cases. Certain assumptions/requirements must be met before you can be sure that the estimated coefficients correctly describes the true underlying relationship. I would advice you to read up on linear regression and the assumptions behind.