negative values kernel density estimation
Ältere Kommentare anzeigen
I have obtained the monthly temperature distribution using kernel density estimate. And using SVD(Singular Value Decomposition) and regression model, I forecast the monthly temperature distribution. But I found that some estimated kernel density values are negative. How to deal with these negative values?
10 Kommentare
Bjorn Gustavsson
am 20 Dez. 2022
It might be easier to have opinions if you could share a figure illustrating this.
Adam Danz
am 20 Dez. 2022
Code snippets are helpful, too, so we can see exactly what you're doing.
ZHIMIN YAN
am 21 Dez. 2022
Bearbeitet: Adam Danz
am 21 Dez. 2022
Adam Danz
am 21 Dez. 2022
Could you provide the z values?
ZHIMIN YAN
am 21 Dez. 2022
Bearbeitet: Torsten
am 21 Dez. 2022
You start with negative z values.
data = load('z.mat')
[zmin, zmax] = bounds(data.z, 'all') % show range of z values
And you're training your model using negative values,
[U,S,V] = svd(data.z);
U1 = U(:,1)
Your new model EstMdl contains estimated parameters based on the training data U1. So, when you forecast that fitted model, the forecast also has negative values.
ZHIMIN YAN
am 22 Dez. 2022
ZHIMIN YAN
am 22 Dez. 2022
Adam Danz
am 22 Dez. 2022
> So you mean that I should delete the negative values in z
No, I would take a step back and investigate. Do you expect there to be negative values in z? If not, then how did they get there? Perhaps something went wrong with your calculations of z or perhaps your expectations of what z should be aren't correct expectations. If you do expect there to be negative values in z or that negative values are possible, then I would re-think whether it is a problem that the forecast produces negative values.
If z isn't meaningful data and you're using z to poke around at the model, then it's completely fine to replace the negative values or use an entirely different set of data. But if z is meaningful data, you can't just delete some values because they are causing problems.
I don't know enough about what the data are or about the forecasting you're using to suggest the next steps.
ZHIMIN YAN
am 23 Dez. 2022
Antworten (0)
Kategorien
Mehr zu Gaussian Process Regression finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!