Is it possible to call a R statistics function to optimize C# function

后端 未结 3 1033
挽巷
挽巷 2020-12-16 05:51

I want to know if it\'s possible to call r statistics optimization function (here I want to use regnoud) from C# while the function to be optimized is written in C#. I fou

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 06:19

    If I understand your need clearly, you have a an optimisation problem with a C# calling R calling back C#.

    I do not think there is a way to set up a callback function ("function pointer", "delegate" as they can be called depending on who you talk to) in R.NET currently. I am likely to have very similar needs and may contribute this to R.NET in the future, if I can allocate the time.

    Meanwhile, if it is acceptable to have things such that you work from R calling C#, i.e. R is the entry point of your application, this is definitely doable using the rClr package. I have colleagues doing optimisation and MCMC analysis of a model written in C#. One tutorial is a very simplified but realistic case of optimisation from R using C#.

提交回复
热议问题