Model Validation

91 views
Skip to first unread message

Debbie Lam

unread,
Apr 11, 2022, 2:44:15 AM4/11/22
to scalismo
Hello,

I've read a few articles regarding model validation. Overall, validation is determined on the model's accuracy, generalization, specificity, and compactness.

May I know is there any functions available in Scalismo to calculate the above values?

Thank you in advance.

Marcel Luethi

unread,
Apr 11, 2022, 3:55:54 AM4/11/22
to Debbie Lam, scalismo
Dear Debbie

You find corresponding functions in the class ModelMetrics

For computing the compactness, you can just sum up the first n eigenvalues:
model.gp.klBasis.take(n).map(_.eigenvalue).sum

Best regards,

Marcel

--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/2344eabd-f86f-4b3c-968f-b55837530227n%40googlegroups.com.

Debbie Lam

unread,
Apr 11, 2022, 10:59:51 AM4/11/22
to scalismo
Hello Marcel,

I'm currently using Scalismo with Scala-cli and VSCode. After I run the code for model validation, nothing was shown in the Scaliso platform.  May I know what is the output and where is it found for the validation functions? 

Thank you.

Marcel Luethi

unread,
Apr 11, 2022, 12:13:18 PM4/11/22
to Debbie Lam, scalismo
The methods just return the metric values. No visual output is produced. Rather, you should print these values out using the println function.

Best regards,

Marcel

Debbie Lam

unread,
Apr 12, 2022, 5:21:29 AM4/12/22
to scalismo
Hello Marcel,

I wasn't able to obtain anything in the "OUTPUT" window in VSCode (see attachment photo). May I know did I look at the wrong place?
Screenshot 2022-04-12 171816.png

Marcel Luethi

unread,
Apr 12, 2022, 11:47:36 AM4/12/22
to Debbie Lam, scalismo
Hi Debbie

When you run the code using the run button of VSCode, the output appears in the Debug Console and not the output window.

Best regards,

Marcel

Message has been deleted

Marcel Luethi

unread,
Apr 14, 2022, 3:17:25 AM4/14/22
to Debbie Lam, scalismo
Hi Debbie

I cannot tell you what is happening. Your code looks correct and it it runs the output should appear.
You could maybe just try to run it using scala-cli instead of using the run button in vscode. For this open a terminal and run the command scala-cli run YOUR_SCALA_FILE.scala

You should see then output in the terminal from which you called scala-cli. If not, something is wrong with your program.

Best regards,
Marcel


On Wed, Apr 13, 2022 at 12:56 PM Debbie Lam <xin9...@gmail.com> wrote:
Hi Marcel

Although my code ran completely fine and the output in Scalismo is within expectation, the debug console is completely blank throughout the entire process. May I know what may be the issue?

Reply all
Reply to author
Forward
0 new messages