英文:
How to find correlation between two datasets in ml
问题
'如何在机器学习中找到两个不同数据集之间的相关性'?
如何确定这些数据集是否相关?
下面是具有不同列名的示例数据集
df1
基因 s1 s2 s3
1 a b c
2 f a
3 f g
df2
gen1 s11 s12 s4
s r g y
par p1 rr uu
英文:
'How to find correlation between two different datasets in ml'?
how to find ow this datasets are correlated are not?
example below dataset which has different columns names also
df1
gene s1 s2 s3
1 a b c
2 f a
3 f g
df2
gen1 s11 s12 s4
s r g y
par p1 rr uu
答案1
得分: 1
这是不太可能找到两个数据集之间的相关性。
相关性仅在一次定义两个变量之间。
所以你可能正在寻找你的数据帧中所有变量对之间的相关性。
尝试
df1[col1_name].corr(df2[col3_name])
英文:
It is not really possible to find correlations between two datasets.
A correlation is defined between only two variables at a time.
So you are probably looking for correlations between all pairs of variables in your dfs.
Try
df1[col1_name].corr(df2[col3_name])
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论