您是否将最小最大缩放比例分别应用于训练和测试数据? [英] Do you apply min max scaling separately on training and test data?

查看:89
本文介绍了您是否将最小最大缩放比例分别应用于训练和测试数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用最小最大缩放比例对功能进行规范化的同时,您是否在将整个数据集分为训练,验证和测试数据之前对整个数据集应用了最小最大缩放比例?

While applying min max scaling to normalize your features, do you apply min max scaling on the entire dataset before splitting it into training, validation and test data?

还是先拆分然后再使用该特定集合的最小值和最大值将最小最大值应用于每个集合?

Or do you split first and then apply min max on each set, using the min and max values from that specific set?

最后,在对新输入进行预测时,应该在输入到网络之前使用训练数据的最小值,最大值对输入的特征进行归一化吗?

Lastly , when making a prediction on a new input, should the features of that input be normalized using the min, max values from the training data before being fed into the network?

推荐答案

将其拆分,然后缩放.试想一下:您不知道真实世界的数据是什么样子,因此无法将训练数据扩展到该数据.您的测试数据是实际数据的替代,因此您应该以相同的方式对待它.

Split it, then scale. Imagine it this way: you have no idea what real-world data looks like, so you couldn't scale the training data to it. Your test data is the surrogate for real-world data, so you should treat it the same way.

要重申:分割,缩放训练数据,然后将训练数据中的缩放比例用于测试数据.

To reiterate: Split, scale your training data, then use the scaling from your training data on the testing data.

这篇关于您是否将最小最大缩放比例分别应用于训练和测试数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆