简体   繁体   中英

Can dissimilarity matrix be used instead of data frame when we have both categorical and continuous variables?

I'm new to RI have a data frame which has both continuous and categorical variables,My questions is: can I use dissimilarity matrix instead of data frame when in some functions just numeric matrix or data frames are accepted?For example when I want to use lofactor() which is the function for LOF algorithm and can be applied just on numeric data while my data has some categorical variables,Can I use the dissimilarity matrix of my data which is numeric?

Any little help would be greatly appreciated.

The DMwR lofactor implementation is slow and too limited.

But the Local Outlier Factor LOF allows any dissimilarity to be used.

You probably just have to write the code yourself , or use a better implementation such as ELKI instead of DMwR.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM