[英]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? 我是RI的新手,有一个同时包含连续变量和分类变量的数据框,我的问题是:当在某些函数中仅接受数值矩阵或数据框时,我可以使用差异矩阵代替数据框吗?使用loF()函数,它是LOF算法的函数,可以在数值数据具有某些分类变量的情况下仅应用于数值数据。我可以使用数值数据的相异矩阵吗?
Any little help would be greatly appreciated. 任何帮助将不胜感激。
The DMwR lofactor
implementation is slow and too limited. DMwR
lofactor
实施速度慢且过于受限。
But the Local Outlier Factor LOF allows any dissimilarity to be used. 但是本地离群因子LOF允许使用任何相似性。
You probably just have to write the code yourself , or use a better implementation such as ELKI instead of DMwR. 您可能只需要自己编写代码 ,或者使用更好的实现(例如ELKI)而不是DMwR。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.