Is there a way to create my own ClassifierFunction? I would like to combine predictions from multiple independent classifiers into a single ensemble ClassifierFunction and be able to use things like ClassifierMeasurments etc. Afaik, it seems like the only way to get a ClassifierFunction is via Classify or NetTrain family of functions.

  • $\begingroup$ +1 from me. It's possible to combine classifiers/predictors. But this is undocumented functionality. I have decided to open the new question because your should be rewritten completely. $\endgroup$ Dec 11 '16 at 15:12
  • $\begingroup$ @AlexeyGolyshev, why should my question be rewritten completely? $\endgroup$
    – Abel Brown
    Dec 11 '16 at 18:02
  • $\begingroup$ Your question is unclear on the first sight and was downvoted by someone. I thought to modify your text, add code and images. But what if I am wrong and your original question is a little different. For example, I ensemble my models this way: c1=Classify[...];c2=Classify[...];ensemble[x_]:=(c1[x]+c2[x])/2. Simple average or weighted average. You can create ConfusionMatrix. See this question and answer + Riffle[ensemble[x],y]//Partition[#,2]&//Tally $\endgroup$ Dec 12 '16 at 8:07
  • $\begingroup$ @AlexeyGolyshev I'm not sure my question could be more clear. Thanks for your code snippet but, I'm not interested in generating confusion matrices. Also, ensemble[x_]:=(c1[x]+c2[x]‌​)/2 does not generate a ClassifierFunction and therefore can not be used as input to ClassifierMeasurements. $\endgroup$
    – Abel Brown
    Dec 13 '16 at 13:16
  • $\begingroup$ Abel, I have found solution! $\endgroup$ Jan 12 '17 at 15:22

Your Answer

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

Browse other questions tagged or ask your own question.