Machine learning in OCaml or Haskell?

前端 未结 11 1156
天命终不由人
天命终不由人 2021-01-29 17:51

I\'m hoping to use either Haskell or OCaml on a new project because R is too slow. I need to be able to use support vectory machines, ideally separating out each execution to r

11条回答
  •  春和景丽
    2021-01-29 18:26

    Having revamped OCaml-R, I've got a few comments to make on integrating OCaml and R. It might be worthwile to use OCaml to call R code, it works, but is not yet exactly straightforward. So using it to pilot R is worthwile. Integrating R functionality much more thoroughly is still cumbersome as, for example, much remains to be done to export R's type system and data to OCaml in a seamless way (you will have work to do). Moreover, the interaction of R's GC and OCaml's GC is a delicate point: you free n values in O(n^2) time, which isn't nice (to solve this point, you either need a more flexible R API, as far as I understand it, or to implement a GC in the binding itself as a big R array for proper interaction between GCs).

    In a nutshell, I'd go for the "pilot R from OCaml" approach.

    Contributions on the GC interaction layer and on mapping R datatypes to OCaml are most welcome.

提交回复
热议问题