[R] confusion matrix like detail with continuous data?

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Feb 16 11:00:05 CET 2022


On Tue, 15 Feb 2022 22:17:42 +0100
Neha gupta <neha.bologna90 using gmail.com> wrote:

> (1) Can we get the details like the confusion matrix with continuous
> data?

I think the closest you can get is a predicted-reference plot. That is,
plot true values on the X axis and the corresponding predicted values
on the Y axis.

Unsatisfying option: use cut() to transform a continuous variable into
a categorical variable and make a confusion matrix out of that.

> (2) How can we get the mean absolute error for an individual
> instance? For example, if the ground truth is 4 and our model
> predicted as 6, how to find the mean absolute error for this instance?

Mathematically speaking, mean absolute error of an individual instance
would be just the absolute value of the error in that instance, but
that's probably not what you're looking for. If you need some kind of
confidence bands for the predictions, it's the model's responsibility
to provide them. There's lots of options, ranging from the use of the
loss function derivative around the optimum to Monte-Carlo simulations.
For examples, see the confint() method.

-- 
Best regards,
Ivan



More information about the R-help mailing list