当前位置:网站首页>特征选择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
边栏推荐
- Analysez l'objet promise avec le noyau dur (Connaissez - vous les sept API communes obligatoires et les sept questions clés?)
- How to restore MySQL database after win10 system is reinstalled (mysql-8.0.26-winx64. Zip)
- Introduction to QT programming
- In win10 system, all programs run as administrator by default
- Introduction to quantexa CDI syneo platform
- 14 py games source code share the second bullet
- Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)
- 昇腾 AI 开发者创享日全国巡回首站在西安成功举行
- Ctfshow - web362 (ssti)
- JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
猜你喜欢

Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)

Setting up keil environment of GD single chip microcomputer

How to virtualize the video frame and background is realized in a few simple steps

Win1远程出现“这可能是由于credssp加密oracle修正”解决办法

MATLAB小技巧(6)七种滤波方法比较

QT add external font ttf

教你用简单几个步骤快速重命名文件夹名

ESP32 LVGL8. 1 - label (style 14)

机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式

【ACM】70. climb stairs
随机推荐
Daily CISSP certification common mistakes (April 18, 2022)
Daily network security certification test questions (April 12, 2022)
QT reading and writing XML files (including source code + comments)
Loop path
Gson fastjason Jackson of object to JSON difference modifies the field name
Test questions of daily safety network (February 2024)
Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
Daily CISSP certification common mistakes (April 19, 2022)
【ACM】455. 分发饼干(1. 大饼干优先喂给大胃口;2. 遍历两个数组可以只用一个for循环(用下标索引--来遍历另一个数组))
MATLAB小技巧(6)七种滤波方法比较
Quantexa CDI(场景决策智能)Syneo平台介绍
Feign requests the log to be printed uniformly
Cutting permission of logrotate file
关于unity文件读取的操作(一)
Jeecg boot microservice architecture
Nodejs installation
Kettle paoding jieniu Chapter 17 text file output
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
C language simulates entering and leaving the stack, first in first out, first in first out, shared memory
Daily network security certification test questions (April 15, 2022)