知识卡片
缩放处理特征量纲
最小最大缩放用训练最小值和最大值把特征映射到指定范围,常用 [0,1]。z 分数标准化减去训练均值并除以标准差,使训练特征居中并尺度一致。标准化不要求把输入变成正态,极端值也会影响缩放参数。对距离模型、正则化模型等对尺度敏感的算法值得先做这一步。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Data Pre-processing · 查看原书依据
In this code, we start with sample data in a NumPy array (data) with two features. We create an instance of the StandardScaler from the sklearn.pre-processing module. We fit the scaler to the data using fit_transform, which standardizes the data by
参考来源
- 位置:《Simplified Machine Learning: The Essential Building Blocks for Machine Learning Expertise》第 02 章《Data Pre-processing》(`extracted/Simplified Machine Learningː The Essential Building Blocks for Machine Learning Expertise/_epub-src/OPS/ch02.xhtml`,book-source 项目,正文索引第 519 段)
- 结论依据:本段给出居中和统一标准差的运算及距离算法用途,前节以逐列最值演示范围缩放。
- 原始内容:In this code, we start with sample data in a NumPy array (data) with two features. We create an instance of the StandardScaler from the sklearn.pre-processing module. We fit the scaler to the data using fit_transform, which standardizes the data by