The document centre seems only explain how to use these functions, but just in an very brief way. I know Mathmatica is not open source, so we can not expect to see the code of the function, but are there any materials that describe the internal algorithm in more detailed informations? Like how does Mathematica decide to use a logistic model or a Markov model to do the classify or prediction.
-
$\begingroup$ This is an interesting question but it's not clear anyone but Wolfram staff could answer it. $\endgroup$– VerbeiaCommented Dec 10, 2014 at 2:31
-
$\begingroup$ You particularly want to know how it chooses one method over the other automatically? $\endgroup$– RojoCommented Dec 10, 2014 at 17:06
2 Answers
If you want to have a description of the method used by a given ClassifierFunction
you can do:
ClassifierInformation[myclassifier, "MethodDescription"]
Also, the methods used are quite classic, so you can easily find documentation on the web.
If you want to know why Classify uses a given model there is a simple answer: Classify tries to find the model that has the highest likelihood on unseen data (that is on test sets). In a nutshell, Classify first selects possible candidates (from heuristics, depending on the characteristics of data). Then the models compete against each other using cross validation techniques, and the best model is selected. There are subtleties in the automation though (not every model get all the data for speed reason etc.), and we intend to make it smarter in the future, which is the reason we did not give a precise description in the documentation.
Simply run DownValues[Classify]
EDIT: it's strange, DownValues does not work. Anyway, I have a dump of Classify (version 10.4) made using this tool. You can find it here.
RE-EDIT: the link was broken, here's a working one
-
1$\begingroup$ Hmm, I get
{}
-- Means nothing to me. Mean anything to you?? $\endgroup$ Commented Sep 6, 2016 at 2:33 -
2$\begingroup$ I don't think this is what he was looking for... $\endgroup$– ktmCommented Sep 6, 2016 at 3:53
-
1
-
$\begingroup$ @Piruzzolo
Spelunk[Classify]
still returns output, although the algorithms must be in sub-functions, not just the down-values ofClassify
. Maybe saying more about how you generated the dump would be helpful. My lame attempt to download your file yielded an error. -- BTW, the DV is not mine. I usually only downvote non-spam answers if they're dangerously wrong/misleading and the author doesn't respond to feedback. I thought maybe you'd forgotten something likeUnprotect@Classify; ClearAttributes[Classify, ReadProtected]; Protect@Classify;
. This still doesn't get the internal algorithms. $\endgroup$ Commented Sep 6, 2016 at 11:38 -