随笔分类 -  机器学习

摘要:(草稿) Random Forest的随机性表现在哪里。 第一,是选择训练样本的随机性,又放回的 第二,是选择树节点特征的随机性。在n个特征中选择nsub个子特征的最优,但是会增加树对样本的你和程度,但是会提高泛化能力,可采用交叉验证的方法确定合适的nsub。 https://www.cnblogs 阅读全文
posted @ 2018-04-23 23:16 路边的十元钱硬币 阅读(176) 评论(0) 推荐(0) 编辑
摘要:(草稿) 过程: 1. 初始化所有节点的 labels 成唯一的值; 2. 对每个节点,将 label 更新为和其相连的所有节点中,标签最多的 节点的label; 2. 初始化情况下,假如所有相连的节点的label没有重复,则随机选取一个。 3. 直到不再更新,停止。 阅读全文
posted @ 2018-04-23 18:14 路边的十元钱硬币 阅读(309) 评论(0) 推荐(0) 编辑
摘要:(草稿) 两点关系的三种定义: 1. 直接密度可达:A在B的邻域内; 2. 密度可达:AB之间存在,直接密度可达的点串; 3. 密度连接:AB之间存在点k,使得Ak和Bk都密度可达; 过程: 1. 对每个点 2. 分别求满足 连接性和最大性的 簇 。 3. 所有点都归类,结束。 参考: https: 阅读全文
posted @ 2018-04-23 16:53 路边的十元钱硬币 阅读(143) 评论(0) 推荐(0) 编辑
摘要:(草稿) k-means: 1. 随机选取n个中心 2. 计算每个点到各个中心的距离 3. 距离小于阈值的归成一类。 4. 计算新类的质心,作为下一次循环的n个中心 5. 直到新类的质心和对应本次循环的n个中心的偏移不大,停止。 k-means++: 1. 随机选取n个中心(越远的被选取的概率越大, 阅读全文
posted @ 2018-04-23 16:05 路边的十元钱硬币 阅读(198) 评论(0) 推荐(0) 编辑
摘要:(草稿) meanshift 也是一种聚类方法。 优点在于:不需要提前指定类型数。 缺点就是计算量大 过程:(最一般的做法,没有使用核函数) 1. 逐点迭代,设置为位置中心 2. 计算所有点到位置中心的距离 3. 计算位置的质心(平均) 4. 位置中心的质心的距离够小就停止,该位置中心点就属于(质心 阅读全文
posted @ 2018-04-23 15:56 路边的十元钱硬币 阅读(192) 评论(0) 推荐(0) 编辑
摘要:转自: https://github.com/zhaozhiyong19890102/Python-Machine-Learning-Algorithm 阅读全文
posted @ 2018-04-23 09:21 路边的十元钱硬币 阅读(224) 评论(0) 推荐(0) 编辑
摘要:Logistics Regression 二分类问题。 模型 线性模型 响应 sigmoid 损失函数(显示) 最小均方 优化方法 BGD 例子: #coding utf-8 import numpy as np def load_data(file_name): feature_data = [] 阅读全文
posted @ 2018-04-21 11:17 路边的十元钱硬币 阅读(237) 评论(0) 推荐(0) 编辑
摘要:源码链接:https://github.com/davidsandberg/facenet 论文链接:https://arxiv.org/pdf/1503.03832.pdf B站大神视频解读论文:https://www.bilibili.com/video/av17281188 FaceNet是一 阅读全文
posted @ 2018-04-16 20:35 路边的十元钱硬币 阅读(644) 评论(0) 推荐(0) 编辑
摘要:范式可以理解成距离 转载自: https://blog.csdn.net/hanhuili/article/details/52079590 内容如下: 由此可见,L2其实就是欧式距离。工程上,往往不做开平方处理。 阅读全文
posted @ 2018-04-16 15:18 路边的十元钱硬币 阅读(1631) 评论(0) 推荐(0) 编辑
摘要:1. tf.variable_scope生成一个上下文管理器,用于获取已经生成的变量 2.计算图。在程序的开始,最好显式声明一个计算图,多个不同的图可以在不同的线程中计算,显卡的优势就显示出来了。 3. 4. 5. 6. 阅读全文
posted @ 2018-04-14 21:36 路边的十元钱硬币 阅读(182) 评论(0) 推荐(0) 编辑
摘要:(本系列随笔持续更新) 这部分代码是基于参考中的链接,修改后适用于TensorFlow1.6.0版本的代码。由于TensorFlow的频繁更新,所以不一定支持后续新或者就版本,特此说明。 程序的最初版,来自“山人7” [参考1,参考2],但是在新的TensorFlow下面不能直接运行。 修改后版本, 阅读全文
posted @ 2018-04-13 15:29 路边的十元钱硬币 阅读(4339) 评论(0) 推荐(1) 编辑
摘要:(本系列随笔持续更新) 搭建要求 详细的搭建过程在 参考资料1 中已经有啦。 TensorFlow 1.6.0 OpenCV 2.4.8 仅仅是加载和读取图片的需要 Ubuntu 14.04 64bits 代码:加载图片,找出人脸。运行依赖detect_face.py 显示效果: 参考资料: 1 h 阅读全文
posted @ 2018-04-13 15:14 路边的十元钱硬币 阅读(3334) 评论(0) 推荐(0) 编辑
摘要:两层卷积层 训练速度慢了,但是精度提高了 阅读全文
posted @ 2018-04-09 21:39 路边的十元钱硬币 阅读(343) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import LabelBinarizer #load data digits = load_digit... 阅读全文
posted @ 2018-03-31 21:17 路边的十元钱硬币 阅读(200) 评论(0) 推荐(0) 编辑
摘要:解释 compute_accuracy 的计算原理: 来自:https://blog.csdn.net/cy_tec/article/details/52046806 阅读全文
posted @ 2018-03-31 21:15 路边的十元钱硬币 阅读(194) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # # add layer # def add_layer(inputs, in_size, out_size,n_layer, activation_function = None): layer_name = '... 阅读全文
posted @ 2018-03-31 21:14 路边的十元钱硬币 阅读(202) 评论(0) 推荐(0) 编辑
摘要:注意:有些浏览器可能支持的不好,推荐使用最新的Chrome 命令行输入: tensorboard --logdir=logs/ 阅读全文
posted @ 2018-03-31 21:13 路边的十元钱硬币 阅读(142) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf import numpy as np import matplotlib.pyplot as plt def add_layer(inputs, in_size, out_size, activation_function = None): Weights = tf.Variable(tf.random_normal([i... 阅读全文
posted @ 2018-03-31 21:10 路边的十元钱硬币 阅读(173) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf import numpy as np def add_layer(inputs, in_size, out_size, activation_function = None): Weights = tf.Variable(tf.random_normal([in_size, out_size])) # hang lie ... 阅读全文
posted @ 2018-03-31 21:09 路边的十元钱硬币 阅读(193) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) output = tf.multiply(input1, input2) with tf.Session() as sess: print(ses... 阅读全文
posted @ 2018-03-31 21:07 路边的十元钱硬币 阅读(90) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示