-2

We are writing a classification code in python, we want to obtain the probabilities of sample belonging to each class as our output . How do we obtain probabilities instead of class label from the classifier? We want to know the probability of sample belonging to each class.. (For eg: If there are 9 classes, we need probability of sample belonging to class one, class two and so on..) and then we require to place them in class according to probability prediction and check the accuracy. we are classifying data samples according to their features extracted (like opcode, API calls etc.). We dont want to use Weka for classification.

edit: We are planning to use probabilistic classifier like NaiveBayes. Libraries used are Numpy, scikitlearn Also, is there a specific format in which features should be obtained?

Vidya Marathe
  • 403
  • 2
  • 6
  • 17

1 Answers1

-1

There are many approaches that you could take. One approach could be to use an ANN, simple feed forward network and use the output value as a probability of the input to belong/not belong to that class. At the next level, a more finer approach can be take to get a probability across the classes, refer: this post. Some Python libraries that provide ANN implementation: are listed here

Ironluca
  • 3,402
  • 4
  • 25
  • 32