Saving Multiple Results

Everything related to the development of modules in jamovi
Post Reply
JavierMG
Posts: 12
Joined: Mon Feb 24, 2025 11:30 am

Saving Multiple Results

Post by JavierMG »

Hi,

I'm currently working with a multiclass classification model and I would like to be able so save the predicted probabilities for each class as an output. The problem is that I don't know a priori how many classes there are, I've tried using an array of outputs on the results file but it doesn't output anything. I guess that it doesn't work because it needs one ouput item on the analysis file per output but I don´t know a priori how many I need. Is there a way to implement this? Thank you in advance.

Cheers,

Javier
User avatar
jonathon
Posts: 2874
Joined: Fri Jan 27, 2017 10:04 am

Re: Saving Multiple Results

Post by jonathon »

hey,

try something like the following:

titles <- c(.("Mahalanobis ChiSq"), .("Mahalanobis p"))
descriptions <- c(
description(.("Mahalanobis distance (Chi sq.)")),
description(.("Mahalanobis distance (p)"))
)
self$results$mahalOV$set(seq(2), titles, descriptions, rep('continuous', 2))

https://github.com/jamovi/jmv/blob/mast ... #L737-L742

jonathon
Post Reply