I'm new to machine learning and I'm working on a project work related to SVM.

I'm now a little confuse about pre-processing, and in particular with in the management of a possible grouping of data according to the centre of origin (i.e. data source).

My dataset is of different patients from two different hospitals. In a first analysis of the data, I found that the data from centre B does not have 4 of the 20 total predictors, which instead centre A has.

I am wondering how to consider that the data are grouped (= clustered) by centre, in the training of the model through SVM.

Also, despite this grouping, will it be necessary to impute the missing data, which in this case also includes the data that centre B did not collect compared to centre A?

EDIT: I think that I wasn't clear enough, and I apologize. By "centre" I mean that part of the data comes from a different source, namely a "hospital A", while the rest comes from a "hospital B". However, this is explained within the dataset through a variable called "centre". The data coming from hospital B, however, do not have all the variables present in the data of hospital A. I was therefore wondering how this information could be included in my analysis; or should the data be grouped by hospital? But how will I then train the model via SVM?


You could either impute or omit those 4 variables. Whether imputing is a good idea depends on whether the covariance between all variables is likely to vary between source hospitals.

Regarding your second question, you could include data source (hospital) as a variable in your analyses. Whether that is a good idea is also likely to depend on your goals and the details of your analyses.

  • $\begingroup$ I'll probably do the analysis considering the center as another variable. However, in the text of the project, it was recommended to group by centre, but I do not think I understood this advice well. $\endgroup$ – Marts Jul 14 '19 at 16:21
  • $\begingroup$ @Marts I think that means the same thing! $\endgroup$ – mkt - Reinstate Monica Jul 14 '19 at 16:26
  • $\begingroup$ No, because the dataset at the origin present the variable "center", instead the advice says that "you can consider that the data are grouped by center of belonging. That is, consider an analysis that takes into account observations such as the fact that in the data in center B there are no variables." $\endgroup$ – Marts Jul 15 '19 at 6:57
  • $\begingroup$ @Marts I do not understand what you just wrote. $\endgroup$ – mkt - Reinstate Monica Jul 15 '19 at 7:22
  • 1
    $\begingroup$ It might be reasonable to perform multiple analyses - including the center as a variable vs. ignoring, and with variables ommitted vs. imputed. (i.e. 4 analyses total). Conclusions that would hold in all cases could then be considered more robust, while for conclusions that would vary a further investigation on why do they vary might be fruitful. $\endgroup$ – Martin Modrák Jul 15 '19 at 12:07

I think you might be confusing different topics, imputation, clustering, modelling.

1- If your data is missing, one pracince is to impute the data. So you can easily impute it with mean, or if the data is skwed, with the median. You can also predict that variable from other variabels.

2- You mentioned center of origin a few times I am not sure what it is related to. But one thing that is important with SVM is that you need to standardscale the data. In other words, all the features should have the same mean and variance.

  • $\begingroup$ I EDIT the question for clarifications. $\endgroup$ – Marts Jul 14 '19 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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