-1

I'm a new user of scikit-learn,

I have a problem of classification, in which I would like to invoke a first classifier that predict two classes {malware, begnin}, then only if the output predicted label of the classifier 1 is malware call the second classifier to classify the family of malware (virus, trojan, worm, ....). In other term the second classifier will not be invoked if the predicted label of classfier 1 is begnin

But I would like to do that in a same block (or perhaps called a metaclassifier) which when invoked, performs internally the operations mentionned above: - train on a dataset, predict a binary target {malware, begnin}, if the target is malware, call the second classifier to predict the family of the malware.

Thank you in advance for your precious help

NL_user
  • 1
  • 1
  • So you want us to code for you or are asking for libraries that do this. Both are off-topic here. Maybe you can start coding and come here with some code and specific error or issue you are facing. – Vivek Kumar Mar 02 '18 at 07:42
  • The way I see it, you can just call a classifier on your data with two classes. Then collect all the data which have the output class benign, and then apply the second classifier only on that data. Whats the problem – Vivek Kumar Mar 02 '18 at 07:43

1 Answers1

0

I see you're committed to your problem!

Have you tried to use only one classifier that could sort your data between all the classes at once?

Be Chiller Too
  • 2,502
  • 2
  • 16
  • 42
  • Thank's a lot for your answer ! and sorry for the delay, unfortunately no ! But I found this possibility of scikit learn http://scikit-learn.org/stable/developers/contributing.html#rolling-your-own-estimator, I want to implement what I mentioned above in a custom classifier that internally does all the stuff I mentioned. I would like to see your opinion on such solution for my problem. – NL_user Mar 01 '18 at 20:46
  • Hi, sorry I never did anything like that, maybe someone else can give you answers! – Be Chiller Too Mar 02 '18 at 06:52