当前位置:网站首页>特征选择feature_selection--SelectKBest
特征选择feature_selection--SelectKBest
2022-04-23 18:35:00 【夺笋123】
feature_selection.SelectKBest(score_func=<function f_classif>, *, k=10)
根据k个最高的分数(根据选择算法得出的分数)来选择k个特征
一般选择与输出值相关性最大的k个特征,选择算法涉及到统计学知识
该类的作用是创建一个特征选择器,特征的选择和返回需要fit_transform()函数
主要类方法
fit_transform
拟合数据,在该过程中寻找与标签值相关性最大的k个特征并返回
fit_transform(X, y=None, **fit_params)
一般使用格式
selector=SelectKBest(k=2) # 创建一个选择器
x_new=selector.fit_transform(x,y) # 选择器先拟合数据,选择出与标签值相关性最大的k个特征,将这些特征的整列返回作为一个新的ndarray
版权声明
本文为[夺笋123]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_54510474/article/details/124365670
边栏推荐
- 解决:cnpm : 无法加载文件 ...\cnpm.ps1,因为在此系统上禁止运行脚本
- STM32 learning record 0008 - GPIO things 1
- ESP32 LVGL8. 1 - event (event 17)
- STM32: LCD display
- 22年字节跳动飞书人力套件三面面经
- The connection of imx6 network port is unstable after power on
- iptables -L执行缓慢
- Win1远程出现“这可能是由于credssp加密oracle修正”解决办法
- QT add external font ttf
- CISSP certified daily knowledge points (April 14, 2022)
猜你喜欢
Introduction to quantexa CDI syneo platform
Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)
Use of regular expressions in QT
实战业务优化方案总结---主目录---持续更新
Deep learning classic network analysis and target detection (I): r-cnn
Solution to Chinese garbled code after reg file is imported into the registry
Spark performance optimization guide
Stm32mp157 wm8960 audio driver debugging notes
Robocode tutorial 3 - Robo machine analysis
Halo open source project learning (VII): caching mechanism
随机推荐
Daily network security certification test questions (April 12, 2022)
Introduction to quantexa CDI syneo platform
iptables初探
Robocode tutorial 8 - advanced robot
ctfshow-web362(SSTI)
多功能工具箱微信小程序源码
Test post and login function
Setting up keil environment of GD single chip microcomputer
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
Daily CISSP certification common mistakes (April 14, 2022)
WIN1 remote "this may be due to credssp encryption Oracle correction" solution
Database computer experiment 4 (data integrity and stored procedure)
配置iptables
串口调试工具cutecom和minicom
Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha
Keil RVMDK compiled data type
CISSP certified daily knowledge points (April 18, 2022)
QT reading and writing XML files (including source code + comments)
【ACM】376. Swing sequence
os_authent_prefix