5

Maybe I'm quite naive but I just realized that Mathematica is shipped with a lot of undocumented libraries. On my Linux, with MMA 11, there are more than 1200 *.mx files located in

/usr/local/Wolfram/Mathematica/11.1/SystemFiles/Kernel/SystemResources/Linux

The first 10 are:

./Algebra
./AlphaIntegration.mx
./Archive.mx
./Astronomy
./Asymptotics
./Audio
./BinaryRead.mx
./Biology
./BranchCuts.mx

For instance:

?Statistics`Library`*

returns a huge list of Mathematica functions.

Unfortunately I do not know how to get documentation for these functions

For instance:

?Statistics`Library`NEntropy

returns

Attributes[Statistics`Library`NEntropy]={Protected}

For a simple function like this one you can check that it computes the 2-base information entropy, because

Statistics`Library`NEntropy[{1, 2, 1}]

returns 0.918296.

But this approach is obviously impossible for more complex functions like RandomForest

My question: is there an accessible doc for all these libraries & functions? How to get it?

(This lack of doc seems so absurd that I'm certainly missing something... sorry)

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Picaud Vincent
  • 2,463
  • 13
  • 20
  • 8
    These are mostly part of the implementation of documented functions. If you implement a library in any language, you would probably have a few functions exposed for public use, and many more functions that you simply use to implement the functionality of the library (and these may change from one version of the library to the next). – Szabolcs Sep 25 '17 at 10:52
  • 6
    Many of these are used under the hood, while you have the pleasure to work with high-level functions. – halirutan Sep 25 '17 at 10:54
  • @{Szabolcs,halirutan} many thanks for the clarification. I get the point, however, I think it is quite sad that no doc is available. I mean a lot of these functions seem really interesting and I would have really preferred some docs with a warning like "experimental" or "use them at your own risk!". – Picaud Vincent Sep 25 '17 at 11:00
  • 3
    Some of these functions do get some exposure here, but there is always an implicit caveat emptor. – J. M.'s missing motivation Sep 25 '17 at 11:12
  • @J.M. thank you, I was definitely naive! – Picaud Vincent Sep 25 '17 at 11:15
  • (MMA is the only closed source code software I use) – Picaud Vincent Sep 25 '17 at 11:21
  • 6
    Even open source code is likely to have undocumented internal functions. The difference being one can, if one so desires, inspect the code. [As for whether more effort should go into documenting internals of the sort noted in this thread, I'm on the fence. I agree it might be nice but there would be a serious opportunity cost incurred. And then one gets into gray areas of what exactly warrants documentation vs what should be omitted. I generally prefer seeing effort go into careful and thorough documentation of System context functions.] – Daniel Lichtblau Sep 25 '17 at 14:32
  • I expect once you document things, even with warnings, folks would use them and complain if they ever got modified/deleted. – george2079 Sep 25 '17 at 18:00
  • 1
    I built myself an automatic documentation generator. I'll try to spin up some docs for the current state of the "Statistics`" contexts in 11.2, but it'll take a few hours as there are a ~500 functions in there. – b3m2a1 Oct 02 '17 at 04:24
  • @b3m2a1 what is the main idea you use for this generator? I mean the files are binary mx files and we have no access to the source code or am I missing something? – Picaud Vincent Oct 02 '17 at 16:02
  • 1
    @PicaudVincent basically it's using all of the *Values*. It's not perfect, but it's better than nothing. Scroll down towards the bottom here to see it. Here's just the "Statistics`Library`" page. I must have introduced some formatting bugs, but it provides a starting point for investigating these functions. – b3m2a1 Oct 02 '17 at 17:27
  • @b3m2a1 I got the idea, thanks for the clarification. I have seen your links, the result is great! – Picaud Vincent Oct 02 '17 at 18:14

0 Answers0