Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to approach machine learning problems with high dimensional input space?

How should I approach a situtation when I try to apply some ML algorithm (classification, to be more specific, SVM in particular) over some high dimensional input, and the results I get are not quite satisfactory?

1, 2 or 3 dimensional data can be visualized, along with the algorithm's results, so you can get the hang of what's going on, and have some idea how to aproach the problem. Once the data is over 3 dimensions, other than intuitively playing around with the parameters I am not really sure how to attack it?

like image 460
sold Avatar asked Feb 12 '10 23:02

sold


People also ask

What approach or method would you use to reduce the data in higher dimensional space to a lower dimensional space?

Isometric mapping (Isomap) This method performs non-linear dimensionality reduction through Isometric mapping. It is an extension of MDS or Kernel PCA. It connects each instance by calculating the curved or geodesic distance to its nearest neighbors and reduces dimensionality.

Which technique handle high dimensionality data very well in machine learning?

The most common approach to dimensionality reduction is called principal components analysis or PCA.

How do you tackle the problem of the curse of dimensionality in machine learning?

Solutions to Curse of Dimensionality: One of the ways to reduce the impact of high dimensions is to use a different measure of distance in a space vector. One could explore the use of cosine similarity to replace Euclidean distance. Cosine similarity can have a lesser impact on data with higher dimensions.


4 Answers

What do you do to the data? My answer: nothing. SVMs are designed to handle high-dimensional data. I'm working on a research problem right now that involves supervised classification using SVMs. Along with finding sources on the Internet, I did my own experiments on the impact of dimensionality reduction prior to classification. Preprocessing the features using PCA/LDA did not significantly increase classification accuracy of the SVM.

To me, this totally makes sense from the way SVMs work. Let x be an m-dimensional feature vector. Let y = Ax where y is in R^n and x is in R^m for n < m, i.e., y is x projected onto a space of lower dimension. If the classes Y1 and Y2 are linearly separable in R^n, then the corresponding classes X1 and X2 are linearly separable in R^m. Therefore, the original subspaces should be "at least" as separable as their projections onto lower dimensions, i.e., PCA should not help, in theory.

Here is one discussion that debates the use of PCA before SVM: link

What you can do is change your SVM parameters. For example, with libsvm link, the parameters C and gamma are crucially important to classification success. The libsvm faq, particularly this entry link, contains more helpful tips. Among them:

  1. Scale your features before classification.
  2. Try to obtain balanced classes. If impossible, then penalize one class more than the other. See more references on SVM imbalance.
  3. Check the SVM parameters. Try many combinations to arrive at the best one.
  4. Use the RBF kernel first. It almost always works best (computationally speaking).
  5. Almost forgot... before testing, cross validate!

EDIT: Let me just add this "data point." I recently did another large-scale experiment using the SVM with PCA preprocessing on four exclusive data sets. PCA did not improve the classification results for any choice of reduced dimensionality. The original data with simple diagonal scaling (for each feature, subtract mean and divide by standard deviation) performed better. I'm not making any broad conclusion -- just sharing this one experiment. Maybe on different data, PCA can help.

like image 83
Steve Tjoa Avatar answered Sep 26 '22 12:09

Steve Tjoa


Some suggestions:

  • Project data (just for visualization) to a lower-dimensional space (using PCA or MDS or whatever makes sense for your data)

  • Try to understand why learning fails. Do you think it overfits? Do you think you have enough data? Is it possible there isn't enough information in your features to solve the task you are trying to solve? There are ways to answer each of these questions without visualizing the data.

Also, if you tell us what the task is and what your SVM output is, there may be more specific suggestions people could make.

like image 45
user245973 Avatar answered Sep 26 '22 12:09

user245973


You can try reducing the dimensionality of the problem by PCA or the similar technique. Beware that PCA has two important points. (1) It assumes that the data it is applied to is normally distributed and (2) the resulting data looses its natural meaning (resulting in a blackbox). If you can live with that, try it.

Another option is to try several parameter selection algorithms. Since SVM's were already mentioned here, you might try the approach of Chang and Li (Feature Ranking Using Linear SVM) in which they used linear SVM to pre-select "interesting features" and then used RBF - based SVM on the selected features. If you are familiar with Orange, a python data mining library, you will be able to code this method in less than an hour. Note that this is a greedy approach which, due to its "greediness" might fail in cases where the input variables are highly correlated. In that case, and if you cannot solve this problem with PCA (see above), you might want to go to heuristic methods, which try to select best possible combinations of predictors. The main pitfall of this kind of approaches is the high potential of overfitting. Make sure you have a bunch "virgin" data that was not seen during the entire process of model building. Test your model on that data only once, after you are sure that the model is ready. If you fail, don't use this data once more to validate another model, you will have to find a new data set. Otherwise you won't be sure that you didn't overfit once more.

List of selected papers on parameter selection: Feature selection for high-dimensional genomic microarray data

Oh, and one more thing about SVM. SVM is a black box. You better figure out what is the mechanism that generate the data and model the mechanism and not the data. On the other hand, if this would be possible, most probably you wouldn't be here asking this question (and I wouldn't be so bitter about overfitting).

List of selected papers on parameter selection

  1. Feature selection for high-dimensional genomic microarray data
  2. Wrappers for feature subset selection
  3. Parameter selection in particle swarm optimization
  4. I worked in the laboratory that developed this Stochastic method to determine, in silico, the drug like character of molecules
like image 23
Boris Gorelik Avatar answered Sep 25 '22 12:09

Boris Gorelik


I would approach the problem as follows:

What do you mean by "the results I get are not quite satisfactory"?

If the classification rate on the training data is unsatisfactory, it implies that either

  • You have outliers in your training data (data that is misclassified). In this case you can try algorithms such as RANSAC to deal with it.
  • Your model(SVM in this case) is not well suited for this problem. This can be diagnozed by trying other models (adaboost etc.) or adding more parameters to your current model.
  • The representation of the data is not well suited for your classification task. In this case preprocessing the data with feature selection or dimensionality reduction techniques would help

If the classification rate on the test data is unsatisfactory, it implies that your model overfits the data:

  • Either your model is too complex(too many parameters) and it needs to be constrained further,
  • Or you trained it on a training set which is too small and you need more data

Of course it may be a mixture of the above elements. These are all "blind" methods to attack the problem. In order to gain more insight into the problem you may use visualization methods by projecting the data into lower dimensions or look for models which are suited better to the problem domain as you understand it (for example if you know the data is normally distributed you can use GMMs to model the data ...)

like image 25
elijah Avatar answered Sep 22 '22 12:09

elijah