简体   繁体   English

当我们同时拥有分类变量和连续变量时,可以使用相异矩阵代替数据框架吗?

[英]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.

相关问题 当我们同时具有连续变量和分类变量作为预测变量时,如何在多项逻辑回归中检验多重共线性? - How to test multicollinearity in multinomial logistic regression when we have both continuous variables as well categorical variables as predictors? 如何制作同时包含连续变量和分类变量的 phylog.netic 树 - How can I make a phylogenetic tree with both continuous and categorical variables 计算 R 中数据帧中每对分类单元之间的差异 - Compute dissimilarity between each pairs of categorical unit in a data frame in R 当一行可以由多个分类变量定义时,如何根据分类变量对数据框进行子集化 - How to subset a data frame based on categorical variables when a row can be defined by more than categorical variable 创建 10 个分类随机变量和 10 个连续随机变量并将它们保存为数据框 - Creating 10 categorical and 10 continuous random variables and save them as a data frame 在数据帧上运行 summary() function 时,分类变量未正确汇总 - Categorical variables are not properly summarized when running the summary() function on Data Frame 如何绘制具有连续变量和分类变量的二项式GLM的预测 - How to plot predictions of binomial GLM that has both continuous and categorical variables 如何获得连续变量和分类变量的描述性表? - How to get descriptive table for both continuous and categorical variables? 计算大数据的不相似矩阵 - Compute dissimilarity matrix for large data 将具有伪变量的数据框转换为分类变量 - Convert data frame with dummy variables into categorical variables
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM