如何使用列车数据的分组最大最大最大最大限制组来按组MIN_MAX_SCALE测试数据?
例如,数据集类似于:
组 | A | B | C |
---|---|---|---|
1 | 0.1 | 0.1 | 0.2 0.3 |
1 | 0.7 | 0.7 | 0.34 0.67 |
2 | 0.3 | 0.3 0.1 | 0.5 |
2 | 0.52 0.54 | 0.6 | 0.6 |
我想使用训练数据集的每一列的最小值和最大值来扩展测试数据的测试数据,以使每个列分别具有相似的结构。谢谢你!
For example, the dataset is like:
Group | A | B | C |
---|---|---|---|
1 | 0.1 | 0.2 | 0.3 |
1 | 0.7 | 0.34 | 0.67 |
2 | 0.3 | 0.1 | 0.5 |
2 | 0.54 | 0.6 | 0.2 |
I want to use the min and max values of every column of the training dataset to scale the test data for each column separately, which also have a similar structure. THANK YOU!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以按以下方式使用此工作;
输出:
输出:
数据集已经在范围{0,1}之间。
MinMaxScaler将将每个值转换为0-1。
因此,使用不同的输入数据,值将相应地反映。
You can use this working as follows ;
Output:
Output :
The dataset is already between the range {0,1} .
MinMaxScaler will convert each value to the range 0-1 .
Hence with a different input data, the values will reflect accordingly.