1
$\begingroup$

I have a dataset which contains 95 highly correlated continuous variables and other 3 categorical variables. I want to reduce the dimension of the data and by that I can deal with correlation as well. I know that I can not apply PCA on categorical data as they do not have concept of variance. I read about Multiple Factor Analysis but I do not feel confident about it. Can I do PCA on continuous data to reduce dimensions and keep categorical data as they are?

The data are sensor data and my application is to predict the machine failure.

Thank you, Arch

$\endgroup$
2
  • 3
    $\begingroup$ Re "Can I:" the software will do that as readily as anything else. In a comment to your previous question I pointed out why this could lead to a poor analysis. $\endgroup$
    – whuber
    Commented Dec 5, 2019 at 18:46
  • $\begingroup$ You write "I know that I can not apply PCA on categorical data " but are you sure? See (this thread)[stats.stackexchange.com/questions/5774/… for some insight on this (and some alternatives). $\endgroup$
    – Peter Flom
    Commented Dec 6, 2019 at 14:41

1 Answer 1

1
$\begingroup$

You may first divide your dataset based on continuous and categorical variables. Then apply PCA on a continuous part of your data and reduce your dimension for example to 10. Finally, merge with your categorical variables. In the end you have 13 dimensions dataset.

$\endgroup$
3
  • $\begingroup$ Thank you. Is it a common practice in the industry as I did not see any examples online? $\endgroup$
    – Arch Desai
    Commented Dec 5, 2019 at 20:24
  • $\begingroup$ I am not sure is it a common practice or not but I don't think there is a problem with this approach. You just create new features from continuous ones and combine with your categorical features. $\endgroup$
    – Batuhan B
    Commented Dec 5, 2019 at 21:53
  • $\begingroup$ This answer is probably off-topic: it explains how to do it, but not why it would be a good idea to do it (which would be more on-topic). $\endgroup$
    – J-J-J
    Commented Jul 15, 2023 at 9:27

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.