Open karlnapf opened 9 years ago
Related to:
Turns out the stan people finally took out their math library of the rest of the framework: https://github.com/stan-dev/math
It should be related to
https://github.com/shogun-toolbox/shogun/pull/2876
(see the FirstOrderCostFunction
class)
@karlnapf Look at this http://arxiv.org/abs/1509.07164
I feel like Shogun could use a way of defining mathematical expressions, such as
in a meta-langauge (much like stan does it), which is then at compile time translated into c++ code, which is then compiled. This would allow to essentially specify new kernel or cost functions as strings. The advantage of such a system is also that gradients can be computed automatically. In particular for our kernel functions, this would be extremely useful. There are libraries that can do such things.
Stan is an example. They define more complicated things than just mathematical expressions and load data, but the core idea is very similar, see example