Can we get negative mean square error?

I am getting negative mean square error, while training a SVM model. What is confusing me is that, squared errors should not be negative, is this any bug or is it something that I am missing?

4 comentarios

Matt J
Matt J el 6 de Jul. de 2022
Editada: Matt J el 6 de Jul. de 2022
I would view it to be a bug, but it's possible that MSE is calculated with constant terms dropped. That is, if MSE has the general form,
MSE(θ) =
the term is independent of the design parameters θ and can therefore be dropped without affecting optimization. This would allow negative values.
Yes Sir, I too believe it to ve a bug, as in this case, I am working on a time series problem, so y is not independent of the predictors, rather it itself is the predictor, albeit, past values.
the cyclist
the cyclist el 7 de Jul. de 2022
Are you able to post the data, and the model that gave negative MSE? I know that sometimes R^2 can be negative (when constructed in certain ways for an ML model), but I am also surprised to get MSE negative.
Hey Cyclist, thanks a lot for your response. I am using Optimizable SVM, from Statisctcs and Deep Learning Toolbox. I have attached the data file, for your kind perusal. Please let me know if I can provide any more details.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2022a

Preguntada:

el 6 de Jul. de 2022

Comentada:

el 12 de Jul. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by