about a fit algorithm

51 views
Skip to first unread message

GiHan Kwon

unread,
Apr 25, 2023, 9:26:20 PM4/25/23
to diffpy-users

Greetings,

I am working on a project that involves fitting some experimental data to a predefined model using scipy.optimizer. The model has been verified by a previous study that used diffpy-cmi and it shows a good agreement with the experimental Gr (residual ~ 0.25). However, when I use scipy.optimizer, the residual is much higher (~0.7), and it seems stuck in local minima.

I would like to know how or what kind of fit (LM fit?) algorithm is using in diffpy-cmi. and is most effective?  Please let me know if you have any information. I would be grateful for any suggestions or references on this topic.

Best,

 

Gihan

Simon Billinge

unread,
Apr 26, 2023, 4:08:05 AM4/26/23
to diffpy...@googlegroups.com
Dear Gihan,

diffpy-cmi is a highly modular and configurable regression framework.  As such, you have great flexibility to choose which regression engine to use in any analysis model that you set up in it.   So it is not possible for me to answer the question you ask because it depends who set up that diffpy-cmi project and what they used for their regressor.

With that being said, I would guess that >90% of refinements built up using diffpy-cmi as the framework use scipy.optimize optimizers so probably that is the case in the one you describe.  You can see by looking in the code that used diffpy-cmi to fit your data.

In general we would strongly encourage the community to use diffpy-cmi to build their bespoke optimizations as a first step.  It is exceptionally flexible, allowing you to define your own cost function with different contributions, write and include your own calculators for calculating different quantities, and try out different regression engines if you are having convergence issues.  It is a community open source project so developments that are made in the community can be merged back into the project so they are available to others to use.

S

--
You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diffpy-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diffpy-users/3e9ef3d0-c355-45e0-9b24-9b36fc483752n%40googlegroups.com.


--
Simon Billinge
Professor, Columbia University

GiHan Kwon

unread,
May 3, 2023, 9:34:56 AM5/3/23
to diffpy-users
thanks for the your kind explanation.

I appreciate the your kind explanation. It helped me understand the situation better and resolve the issue.

Thank you for your time and effort.

Gihan

2023년 4월 26일 수요일 오전 4시 8분 5초 UTC-4에 Simon J. L. Billinge님이 작성:
Reply all
Reply to author
Forward
0 new messages