@(131 - Machine Learning | 机器学习)

1 Feature Scaling

transforms features to have range [0,1]

according to the formula

$x' = \frac{x-x_{min}}{x_{max}-x_{min}} $

1.1 Sklearn - MinMaxScaler


from sklearn.preprocessing import MinMaxScaler
import numpy
weights = numpy.array([[115.],[140.],[175.]])
#MinMaxScaler assumes floating point values as input
scaler = MinMaxScaler()
rescaled_weight = scaler.fit_transform(weights)
print rescaled_weight [[0. ]
[0.41666667]
[1. ]]

1.2 Algorithm affected by feature rescaling?

□ 决策树

□ 使用 RBF 核函数的 SVM√

□ 线性回归

□ K-均值聚类√

Decision Trees use vertical and horizontal lines so there is no trade off.

SVM with RBF Kernel requires making trade-offs in dimensions.

In linear regression, the coefficient and the feature always go together.

K-Means Clustering requires making trade-offs in dimensions.

Algorithms in which two dimensions affect the outcome will be affected by rescaling.

131.006 Unsupervised Learning - Feature Scaling | 非监督学习 - 特征缩放的更多相关文章

  1. 131.007 Unsupervised Learning - Feature Selection | 非监督学习 - 特征选择

    1 Why? Reason1 Knowledge Discovery (about human beings limitaitons) Reason2 Cause of Dimensionality ...

  2. 131.005 Unsupervised Learning - Cluster | 非监督学习 - 聚类

    @(131 - Machine Learning | 机器学习) 零. Goal How Unsupervised Learning fills in that model gap from the ...

  3. 131.008 Unsupervised Learning - Principle component Analysis |PCA | 非监督学习 - 主成分分析

    @(131 - Machine Learning | 机器学习) PCA是一种特征选择方法,可将一组相关变量转变成一组基础正交变量 25 PCA的回顾和定义 Demo: when to use PCA ...

  4. 斯坦福大学公开课机器学习:梯度下降运算的特征缩放(gradient descent in practice 1:feature scaling)

    以房屋价格为例,假设有两个特征向量:X1:房子大小(1-2000 feets), X2:卧室数量(1-5) 关于这两个特征向量的代价函数如下图所示: 从上图可以看出,代价函数是一个又瘦又高的椭圆形轮廓 ...

  5. 如何区分监督学习(supervised learning)和非监督学习(unsupervised learning)

    监督学习:简单来说就是给定一定的训练样本(这里一定要注意,样本是既有数据,也有数据对应的结果),利用这个样本进行训练得到一个模型(可以说是一个函数),然后利用这个模型,将所有的输入映射为相应的输出,之 ...

  6. Standford机器学习 聚类算法(clustering)和非监督学习(unsupervised Learning)

    聚类算法是一类非监督学习算法,在有监督学习中,学习的目标是要在两类样本中找出他们的分界,训练数据是给定标签的,要么属于正类要么属于负类.而非监督学习,它的目的是在一个没有标签的数据集中找出这个数据集的 ...

  7. Machine Learning——Unsupervised Learning(机器学习之非监督学习)

    前面,我们提到了监督学习,在机器学习中,与之对应的是非监督学习.无监督学习的问题是,在未加标签的数据中,试图找到隐藏的结构.因为提供给学习者的实例是未标记的,因此没有错误或报酬信号来评估潜在的解决方案 ...

  8. Machine Learning Algorithms Study Notes(4)—无监督学习(unsupervised learning)

    1    Unsupervised Learning 1.1    k-means clustering algorithm 1.1.1    算法思想 1.1.2    k-means的不足之处 1 ...

  9. Deep Learning论文笔记之(三)单层非监督学习网络分析

    Deep Learning论文笔记之(三)单层非监督学习网络分析 zouxy09@qq.com http://blog.csdn.net/zouxy09          自己平时看了一些论文,但老感 ...

随机推荐

  1. 剑指offer——面试题32:从上到下打印二叉树

    void BFS(BinaryTreeNode* pRoot) { if(pRoot==nullptr) { cout<<"empty binary tree!"< ...

  2. Mac 10.12通过Launchd创建自定义服务(基于MySQL 5.7.15的开机自启动)

    在上一篇文章http://www.cnblogs.com/EasonJim/p/6275863.html中安装MySQL时采用的时DMG包的安装步骤页面进行安装的,如果这样安装的MySQL是会开机自启 ...

  3. mono修改代码模板

    新建android application是在这里修改模板D:\prostu\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCach ...

  4. JDBC处理可滚动的处理集

    Statement createStatement(int resultSetType,                           int resultSetConcurrency,     ...

  5. hibernate_Session接口_load_get

    hibernate读取数据库内容,用 1,session.get(Class类型,主键); 立马发出sql语句.从数据库中取出值装到对象里去 2,session.load(Class类型,主键); 从 ...

  6. 安装php readline扩展报错 Please reinstall libedit

    现象:configure: error: Please reinstall libedit – I cannot find readline.h解决办法:安装 Editline Library (li ...

  7. guava学习:guava集合类型-table

    最近学习了下guava的使用,这里简单记录下一些常用并且使用的工具类把. 看到table的使用时候真的是眼前一亮,之前的代码中写过很多的Map<String,Map<String,Stri ...

  8. MySQL之mysql命令使用详解

    MySQL Name mysql - the MySQL command-line tool Synopsis mysql [options] db_name Description mysql is ...

  9. 利用 ICEpdf 快速实现 pdf 文件预览功能

    之前工作中,需要实现一个在线预览pdf的功能,一开始用的的 jQuery-media 插件来实现的,后来感觉有点慢,就继续寻找更好的替代品,直到遇见了 ICE pdf... ICEpdf (官网:ht ...

  10. mysql 索引使用策略及优化

    索引使用策略及优化 MySQL的优化主要分为结构优化(Scheme optimization)和查询优化(Query optimization).本章讨论的高性能索引策略主要属于结构优化范畴.本章的内 ...