如何在机器学习中找到两个数据集之间的相关性

huangapple go评论59阅读模式
英文:

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])

huangapple
  • 本文由 发表于 2023年7月23日 23:53:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/76749140.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定