Given are two 2-d sets, each with its own bivariate normal distribution. I need to build an SVM classifier. The a priori probabilities of each class corresponds to the size of its set (20/50 for the first and 30/50 for the second one). I am quite confused about the way to implement the knowledge about set structure and a priori probability of classes. Any ideas appreciated.

(If your idea is supported by some R packages it would be very nice.)


1 Answer 1


SVM doesn't take into account that prior knowledge about the distribution of the classes, so if you want a classifier that takes advantage of that, you'll need a different classifier.

In particular, if you know the distribution of each class and the priors (class balance), you can use Bayes rule to classify each point directly, without needing any fancy classifier. This is the optimal (most accurate) way to classify, is not hard to implement, and doesn't require any training set.

If you know that each class has a bivariate normal distribution but you don't know its parameters (mean and covariance matrix), you can use the training set to estimate these parameters, then use Bayes rule.

  • $\begingroup$ Thank you. No idea, why i was told to use SVM. $\endgroup$ Apr 16, 2019 at 16:47
  • $\begingroup$ @ПавелЗахаров, see my updated answer for an alternative approach. $\endgroup$
    – D.W.
    Apr 16, 2019 at 19:40
  • $\begingroup$ Yes, Bayesian approach seems to be an optimal way, and if it was up to me, i would use this concept. But unfortunately, the task was to contstruct precisely an SVM linear classifier. $\endgroup$ Apr 16, 2019 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.