I am learning the SVM classification and encounter a problem. I am not sure if this dilemma has a terminology for it.

Assume we would like to classify patient by SVM given the samples of healthy people ( of both gender) and people with liver cancer ( of both gender). If we label healthy people sample as class 1 and the people with cancer as class 2, we can train a binary SVM and obtain a classifier 1 to predict any new patient. Now, image another scenario. Assume that we first divide all samples by gender before SVM classification. For each gender, we still label healthy patients vs cancerous patients into 2 classes and train a binary SVM to obtain classifier 2 and classifier 3 for female and male samples respectively. The question is if there is a new female patient, which classifier, 1 or 2, should be used to obtain more accurate prediction ? Here is the dilemma for the arguments I have

(1) When the number of samples is large, the prediction should be more accurate. Based on this argument, the classifier 1 seems a good choice.

(2) However, if we divide samples into female and male groups first, the classifier 2 seems a better choice since the new patient (unknown test sample) is female.

Does this kind of dilemma have a terminology or does anyone know any further information or how to solve problem like this ? I am not even sure if this is a legit question and sorry for the naive question in advance. Thanks

  • 4
    $\begingroup$ This can't be answered in general. Perhaps if we knew how much gender influences cancer and how many samples you have, which loss function you use etc. It's probably much easier to experiment using cross validation. $\endgroup$
    – adrianN
    Mar 6, 2013 at 9:51
  • $\begingroup$ Thanks. It makes sense. I guess there should not be a general rule. $\endgroup$
    – Cassie
    Mar 8, 2013 at 22:15
  • 1
    $\begingroup$ this sounds like a general ML question about "how should I go about using ML to solve this problem". there is no standard answer. its important/accepted/standard to try different approaches and see which strategies lead to the most accurate prediction results. the general heading is something like "representation of the real world problem in the abstract ML framework" or roughly "modelling" & is covered in good std refs.... see also stats.se $\endgroup$
    – vzn
    Sep 23, 2013 at 17:59

2 Answers 2


You should take a look at Feature selection and algorithms that automate this process. It's okay if you are new to ML and don't understand the entire feature selection process, just get the proper intuition and then you can use a library to automate the process.

The key idea of having a Learning algorithm is so that it can find the patterns ... the most you can do, is help him out by providing lots of (non-redundant) data and having a good preprocessing step, that usually involves stuff like feature selection, and normalization.

On a friendly note, when implementing learning algorithms, you should not try to modify your dataset just by 'looking' at it, unless you have concrete metrics that testifies it needs modifications, many a times, it has been the case, that the learning algorithm put high bias towards features that did not appear to be even remotely 'related' to the classification process. Always try to do a feature selection step before trying any modifications on your data.


one general heading for this type of step of the machine learning process is data preprocessing which wikipedia says includes "cleaning, normalization, transformation, feature extraction and selection, etc".

another aspect of machine learning is "creating the model". this involves decisions eg about how many classes will detected, what the "size" or "dimensions" of the ML structure will be (eg "how many Kernels will the SVM include" etc, roughly analogous to choice of number of neurons in a NN model). unfortunately some refs tend to skip or "gloss over" this step. but note its common with statistics and some statistics books will have a good description.

in ML type approaches it is conventional that there is a strong iterative/feedback/evolutionary process to determine both effective preprocessing and modelling. the experimenter tries various preprocessing and modelling ideas and moves in the direction of the more successful ones. the general rule of thumb is "the better the predictions, the more one is correctly [and presumably also realistically] preprocessing and modelling", but also given that overfitting is carefully ruled out.


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.