当前位置:网站首页>为什么先划分训练集和测试集后归一化?
为什么先划分训练集和测试集后归一化?
2022-06-27 01:23:00 【思考实践】
先对数据划分训练集和测试集后归一化和对数据归一化后划分测试集和训练集,两者的区别:
理论上还是应该先划分数据集,然后对训练数据做预处理,并且保存预处理的参数,在用同样的参数处理测试集。
因为划分训练集和测试集就是假设只知道训练集的信息,而认为测试集数据是来自未来的,不可得知。如果之前统一做预处理之后再划分的话就利用了测试集的信息。
要归一都归一,不归一的话都不归一。分布相同的情况下,测试才有效。
有些模型归不归一效果都一样,比如决策树。有些必须归一,比如回归分析
参考资料
边栏推荐
- Object access mechanism and others
- Kept to implement redis autofailover (redisha) 13
- Memcached foundation 3
- Two days of beautiful butterfly animation
- Flutter series: flow in flutter
- ESP32-添加多目录的自定义组件
- UVM中uvm_config_db非直线的设置与获取
- About Random Numbers
- leetcode 1143. Longest Commom Subsequence 最长公共子序列(中等)
- Bs-gx-016 implementation of textbook management system based on SSM
猜你喜欢

Systematic analysis of social networks using Networkx: Facebook network analysis case

Structure the fifth operation of the actual camp module

做了两天的唯美蝴蝶动画

Break through the performance bottleneck of image recognition through rust language computing acceleration technology

30 MySQL tutorial MySQL storage engine overview
![[graduation season] role conversion](/img/4e/aa763455da974d9576a31568fc6625.jpg)
[graduation season] role conversion

JSON parsing, esp32 easy access to time, temperature and weather

Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
![Custom jsp[if, foreach, data, select] tag](/img/a2/fc75c182d572d86f4466323e31d6c3.png)
Custom jsp[if, foreach, data, select] tag

LeetCode 142. Circular linked list II
随机推荐
Recursion will make strtok more attractive
SystemVerilog simulation speed increase
Object access mechanism and others
1.44寸TFT-LCD显示屏取模教程
JVM 的指针压缩
Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
Memcached foundation 4
leetcode 1143. Longest common subsequence (medium)
Operating instructions and Q & A of cec-i China learning machine
Continuous delivery blue ocean application
UVM in UVM_ report_ Enabled usage
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
SystemVerilog仿真速率提升
markdown表格(合并)
memcached基础4
Daily question brushing record (V)
UVM in reporting classes_ report_ Get of server_ severity_ Count and get_ Server usage
buuctf-pwn write-ups (6)
浏览器缓存
UVM中config_db机制的使用方法