当前位置:网站首页>特征选择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
边栏推荐
- Multifunctional toolbox wechat applet source code
- 使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
- Nodejs installation
- Ionic 从创建到打包指令集顺序
- ESP32 LVGL8. 1 - label (style 14)
- Query the logistics update quantity according to the express order number
- QT curve / oscilloscope customplot control
- 教你用简单几个步骤快速重命名文件夹名
- Ctfshow - web362 (ssti)
- C language simulates entering and leaving the stack, first in first out, first in first out, shared memory
猜你喜欢
Robocode tutorial 8 - advanced robot
Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha
Imx6 debugging LVDS screen technical notes
Robocode tutorial 5 - enemy class
iptables初探
Robocode tutorial 3 - Robo machine analysis
Machine learning theory (8): model integration ensemble learning
ctfshow-web361(SSTI)
使用晨曦记账本,分析某个时间段每个账户收支结余
Halo 开源项目学习(七):缓存机制
随机推荐
MATLAB从入门到精通(二)
Promote QT default control to custom control
ESP32 LVGL8. 1 - anim animation (anim 16)
Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
Const keyword, variable and function are decorated with const
22 year flying Book manpower Kit
Analysez l'objet promise avec le noyau dur (Connaissez - vous les sept API communes obligatoires et les sept questions clés?)
CISSP certified daily knowledge points (April 12, 2022)
Resolve the error Max virtual memory areas VM max_ map_ count [65530] is too low, increase to at least [262144]
In win10 system, all programs run as administrator by default
教你用简单几个步骤快速重命名文件夹名
【ACM】455. Distribute Biscuits (1. Give priority to big biscuits to big appetite; 2. Traverse two arrays with only one for loop (use subscript index -- to traverse another array))
After CANopen starts PDO timing transmission, the heartbeat frame time is wrong, PDO is delayed, and CANopen time axis is disordered
QT error: no matching member function for call to ‘connect‘
MATLAB小技巧(6)七种滤波方法比较
Software test summary
QT excel operation summary
Daily CISSP certification common mistakes (April 13, 2022)
【ACM】70. climb stairs