# Create ClassifierFunction

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.

• +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. – Alexey Golyshev Dec 11 '16 at 15:12
• @AlexeyGolyshev, why should my question be rewritten completely? – Abel Brown Dec 11 '16 at 18:02
• 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 – Alexey Golyshev Dec 12 '16 at 8:07
• @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. – Abel Brown Dec 13 '16 at 13:16
• Abel, I have found solution! – Alexey Golyshev Jan 12 '17 at 15:22