I need to classify URLs into categories. Say I have 15 categories that I'm planning to zero down every URL to.

Is a 15-way classifier better? Where I have 15 labels and generate features for each data point.

Or building 15 binary classifiers, say: Movie or Non-Movie, and use the numbers I get from these classifications to build a ranker, to pick the best category, going to be better?


3 Answers 3


First of all, you must ask yourself if your problem is multilabel (i.e. a single URL can belong to several classes) or not (i.e. a single URL can belong to only one class).

If you are in the former situation, go with a battery of binary classifiers, because this is a default way of doing multilabel problems.

If the latter, the answer depends on a combination of shape of your data, the aim of your analysis and the method are you using -- probably you should just try both and select the best.

Only note that some methods (like SVM) can't actually do multiclass classification because of how they are defined and thus internally use a battery of binary classifiers.

  • $\begingroup$ my problem statement is considering the former assumption @mbq. I know there are multilabels. and yes, like you've said I have decided to go for 15 binary classifiers but again, I need to rank them to pick one best category. So, I'm going to try performing another top level classification using the numbers I obtained from the battery of binary classifiers. Do you see any problem? $\endgroup$
    – madCode
    Jun 19, 2012 at 15:04
  • $\begingroup$ SVMs can perform multiclass classification. The method is very similar to softmax regression (see "On the algorithmic implementation of multiclass kernel-based vector machines"). $\endgroup$ Aug 8, 2012 at 13:05

This will depend on how your data is dispersed. There is a beautiful example that was given recently to a similar question where the OP wanted to know if a single linear discriminant function would be a better classifier for deciding population A vs B or C or one based on multiple linear discriminant functions that separate A, B and C. Someone gave a very nice coloured scatterplot to show how using two discriminants would be better than one in that case. I will try to link to it.

  • $\begingroup$ Hang on. I am having trouble finding it but I will keep looking. $\endgroup$ Jun 18, 2012 at 18:48
  • $\begingroup$ Sorry for not being able to find the link. Imagine a cloud of one color to the left, another in the middle and a third to the right. Two linear discriminant line would do a good job of separating the middle group from the ones to the left and right but no single line would do well at all. The picture would be worth more than all these words. $\endgroup$ Jun 18, 2012 at 20:38
  • 1
    $\begingroup$ @MichaelChernick Is this the link you are looking for? $\endgroup$
    – user10525
    Jun 18, 2012 at 21:00
  • $\begingroup$ I think I understand what you are saying: bit.ly/M1NydS - the picture you defined I came across in this presentation. 4 way or 3 way classification..could be direct. But.. I'm wondering if the precision/recall would be compromised if do 15 way classification, Dr. Chernick. $\endgroup$
    – madCode
    Jun 18, 2012 at 21:10
  • $\begingroup$ @Procrastinator Thank you for finding that. i was having so much trouble locating it and I was sopemnding a lot of time looking! It was a recent post so I though tit would be easy to find. $\endgroup$ Jun 19, 2012 at 0:37

Some methods deal well with multiclass, Random Forests, MLPs for example.

If you don't want to go that way, then it is possible that ECOC may well out perform 1-vs-All for your problem, only testing will tell.


Your Answer

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

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