sklearn手册5.14.2节 comparison of F-test and mutual information

此示例通过比较单变量F检验和互信息展示了它们在特征选择中的差异。F检验因只捕捉线性依赖,将x_1评为关键特征,而互信息能捕捉任意依赖,认为x_2最重要。两者都识别x_3为不相关特征。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

5.14.2 comparison of F-test and mutual information

"This example illustrates the differences between univariate F-test statistics and mutual information.
We consider 3 features x_1, x_2, x_3 distributed uniformly over [0, 1], the target depends on them as follows:
y = x_1 + sin(6 * pi * x_2) + 0.1 * N(0, 1), that is the third features is completely irrelevant.
The code below plots the dependency of y against individual x_i and normalized values of univariate F-tests statistics
and mutual information.
As F-test captures only linear dependency, it rates x_1 as the most discriminative feature. On the other hand, mutual
information can capture any kind of dependency between variables and it rates x_2 as the most discriminative feature,
which probably agrees better with our intuitive perception for this example. Both methods correctly marks x_3 as
irrelevant."

"本例展示单变量F检验和互信息之间的差别。假设一个数据集中有三个特征x_1、x_2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值