Measure Weight Optimization

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
Eric Hu
Posts: 38
Joined: Tue Oct 03, 2023 1:56 pm

Measure Weight Optimization

Post by Eric Hu » Sun Nov 10, 2024 11:48 am

Hi Dr. Geijtenbeek,

I was wondering if there is a way to optimize the weights of the cost function terms to produce the best possible output with the lowest fitness? I tried making the weights an optimizable parameter but the parameters did not appear within the parameters window. I found that there is the CMAOptimizerPool option that can allow you to run multiple optimizations, but I could not find a way to optimize the weights for my cost function between each iteration. Could this be done within SCONE? If so, could you walk through how I could go about doing that?

For some context, my current goal is to try and track experimental data with the model I have currently. I understand that SCONE might not be the best option to use for tracking, but I like the flexibility that SCONE provides. However, in order to find the best tracking solution, I would need to optimize the weights to produce the best output.

Thank you for your help.

Best,
Eric

User avatar
Thomas Geijtenbeek
Posts: 457
Joined: Wed Mar 12, 2014 8:08 am

Re: Measure Weight Optimization

Post by Thomas Geijtenbeek » Mon Nov 11, 2024 2:42 am

Do I understand correctly that you want to run a meta optimization, i.e. run various optimizations to get the objective weights that lead to the best results? In that case, the weights for your cost function would remain constant during each SCONE optimization, and you would run another optimizer on top of that, which uses another optimization criterion (e.g. tracking).

User avatar
Eric Hu
Posts: 38
Joined: Tue Oct 03, 2023 1:56 pm

Re: Measure Weight Optimization

Post by Eric Hu » Mon Nov 11, 2024 10:36 am

Hi Dr. Geijtenbeek,

I suppose that it would be a meta optimization, where I would have an optimization of the simulation trying to track the experimental data and another optimizer to optimize the weights in the fashion that you have proposed. Is there a way to perform that within SCONE? What would the procedure be to implement that?

Best,
Eric

User avatar
Thomas Geijtenbeek
Posts: 457
Joined: Wed Mar 12, 2014 8:08 am

Re: Measure Weight Optimization

Post by Thomas Geijtenbeek » Tue Nov 12, 2024 3:46 am

You can't use SCONE directly for meta optimizations like that, but perhaps you can build something in Python that uses SCONE to perform the individual optimizations, using the SconePy interface:

https://scone.software/doku.php?id=doc:batch

This is something I would *not recommend* unless you know exactly what you're doing.

User avatar
Eric Hu
Posts: 38
Joined: Tue Oct 03, 2023 1:56 pm

Re: Measure Weight Optimization

Post by Eric Hu » Mon Nov 25, 2024 8:59 am

Hi Dr. Geijtenbeek,

I guess on this topic, is there any way to grab the individual fitness values of each cost function term? I understand that the total fitness is given to us in the result file and the breakdown of all the cost function terms are in the GUI, but I wasn't able to find that breakdown in the sto file.

Thank you,
Eric

POST REPLY