Mathematica 10 provides beautiful high-level machine learning functionality. Sadly, the learned functions once created are rather opaque objects. I need to use them in other projects, so here is my question:

Can I export the neural networks, random forest decision trees, or any other internals of the learned functions for externally use, e.g. can I export a neural net into a standard FANN File format.

PS. My real hope is to use Mathematica V10 to generate machine-vision convolutional neural networks and then embed them within my clojure, pythons and iOS projects.

  • 1
    $\begingroup$ I've been wondering the same thing. Also, I don't believe v10 machine learning supports convolution nets, and exporting image processing related code is not easy. $\endgroup$ – M.R. Jul 31 '14 at 15:47
  • 1
    $\begingroup$ This question has been asked last year. Are there any worthy updates? $\endgroup$ – Levi Sep 2 '15 at 19:33
  • $\begingroup$ Any further development on this? I saw in recent videos that they discussed exporting models. $\endgroup$ – ArtificialBrilliance May 4 '16 at 8:53

It's on our list of things to do, but there are many other areas we want to cover, such as custom feature functions, customizable feature selection, boosting, NLP, deep learning of neural networks, convolutional nets, GPU acceleration, and so on.

Until then, your only real solution is to deploy your trained classifier as an API function. Some simpler classifiers and predictors can output a pure function that is fairly easy to translate 'by hand':

p = Predict[{{1.3, "P"} -> 1, {1.8, "Q"} -> 2.5, {1.9, "Q"} -> 3, {0.2, "P"} -> 1,        
               {-3.2, "P"} -> -4.2, {0.3, "Q"} -> 2}];

PredictorInformation[p, "Function"]
0.452129 - 0.530351 Boole[#2 === "P"] + 0.530351 Boole[#2 === "Q"] + 1.12488 #1 &
  • 4
    $\begingroup$ And Bayesian networks with the ability to edit/provide your own nets please! This is a showstopper for me. $\endgroup$ – user4860 Jul 31 '14 at 22:13
  • $\begingroup$ Hi from 2017 ! Any news ? $\endgroup$ – mazieres Mar 9 '17 at 23:10
  • 2
    $\begingroup$ @mazieres I encourage you to file this as a suggestion with technical support. I don't work on this feature. $\endgroup$ – Taliesin Beynon Mar 19 '17 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.