摘要: 1. 安装 https://github.com/jvantuyl/sublime_diagram_plugin 安装依赖 把sublime_diagram_plugin放到 2. 使用方法 在sublime中, 选择plantuml命令, 使用快捷键 显示图片. 或者 如果为了排查错误, 打印出更 阅读全文
posted @ 2019-05-29 14:45 bregman 阅读(1009) 评论(0) 推荐(0)
摘要: 升级安装python环境后, 把老的包重新安装回去. 阅读全文
posted @ 2019-05-23 16:36 bregman 阅读(203) 评论(0) 推荐(0)
摘要: 设置 package control 在 Preferences Package Setting Package Control Settings User 中加入 channels, 不然连不上网. 设置 package GoSublime 从github中直接下载GoSublime, 放入 pa 阅读全文
posted @ 2019-05-22 16:16 bregman 阅读(149) 评论(0) 推荐(0)
摘要: 在了解pytorch时发现, C++的代码出了很多新特征,对于简化代码有很大帮助。记录一下 c++ include include using namespace std; std::vector create_vector() { return {0,1.1,2,3,4}; } int main( 阅读全文
posted @ 2019-05-08 20:24 bregman 阅读(189) 评论(0) 推荐(0)
摘要: 就是SQP, 在scipy中被叫做Sequential Least Squares Programming 实现1: scipy.optimize.fmin_slsqp python包里还有其他算法,参考文档 http://www.pyopt.org/_downloads/pyopt_referen 阅读全文
posted @ 2019-05-08 17:46 bregman 阅读(1263) 评论(0) 推荐(0)
摘要: 第一部分根据 slideshare的链接找到对应图片。 第二部分合并.jpg 阅读全文
posted @ 2019-05-07 15:08 bregman 阅读(487) 评论(0) 推荐(0)
摘要: ctree 阅读全文
posted @ 2019-04-26 11:56 bregman 阅读(742) 评论(0) 推荐(0)
摘要: 碰到一个没解决的问题。 用tensorflow 分布式异步更新模式训练模型, 模型中带正则项, 每个batch的损失函数为 $$\lambda \|W\|_1 + \frac 1 {N_j} \sum_i^{N_j} {\rm logloss}(x_i,y_i, W) $$ 发现迭代稳定后, 正则项 阅读全文
posted @ 2019-04-23 10:03 bregman 阅读(233) 评论(0) 推荐(0)
摘要: 假设分布式任务包含n个ps节点, m个worker节点. m, n 0. 希望所有worker的任务结束后,所有节点才终止。 方法: 借助队列tf.FIFOQueue实现。 原理: tf.FIFOQueue 是个全局的的队列, 出队函数dequeue有这个特点: If the queue is em 阅读全文
posted @ 2019-04-19 14:54 bregman 阅读(231) 评论(0) 推荐(0)
摘要: 为了实验可复制, 考虑基于身份证做确定的采样。 1. 随机抽样, 身份证第18位, 比较随机的取到11等份。 2. 生日采样, 注意月,日都不太随机。 如何比较好的取 1/10 用户? 统计每个日期的人数, 然后在1,10, 20日附近做调整。 `substr(cert_no,13,2) in (' 阅读全文
posted @ 2019-04-18 18:14 bregman 阅读(334) 评论(0) 推荐(0)
摘要: java split 函数默认会清除空白行尾的空白. 为了避免这个问题, 需要加参数, 改为 ` String[] tmpValues = line.split(",", 1);` 阅读全文
posted @ 2019-03-23 00:54 bregman 阅读(259) 评论(0) 推荐(0)
摘要: 可信度的估计 二项分布中的$p$ 服从Beta分布 $ {\rm beta}(\alpha, \beta)$, 密度函数 $\frac1{B(\alpha, \beta)} x^{\alpha 1} (1 x)^{\beta 1}$ 均值 $\frac \alpha {\alpha + \beta} 阅读全文
posted @ 2019-03-11 14:13 bregman 阅读(2154) 评论(0) 推荐(0)
摘要: 图像模型 YOLOv3 , 地址 https://pjreddie.com/darknet/yolo/ vgg , 参考 1. https://github.com/tensorflow/models/blob/master/research/slim/nets/vgg.py 1. http://w 阅读全文
posted @ 2019-02-25 16:15 bregman 阅读(185) 评论(0) 推荐(0)
摘要: 衍生特征时, 统计每个类目id的用户的购买次数、金额, 用了下面语法, 发现效率很低. 更改, 先用聚合的concat把结果存在一个字符串中, 在从字符串中取出字段值, 效率大为提升. 猜测原理是, 多个聚合函数导致重复计算. 改为一个稍微复杂的函数, 仍然很快. 时间从2小时变为20分钟. 阅读全文
posted @ 2019-02-23 21:45 bregman 阅读(106) 评论(0) 推荐(0)
摘要: 手工设置shape 阅读全文
posted @ 2019-02-21 14:22 bregman 阅读(323) 评论(0) 推荐(0)
摘要: flink迭代机制 Iterate: 普通迭代 ,实现逻辑在Step 函数中, Step的输入是初始的整个数据集, 或者是上一轮迭代的结果。Step函数包含 map、reduce,join等运算组成。例子: 输入为1到5的数字, Step函数为 output = input.map(_ + 1), 阅读全文
posted @ 2018-12-26 13:04 bregman 阅读(143) 评论(0) 推荐(0)
摘要: shift tab http://opus.konghy.cn/ipynb/jupyter notebook keyboard shortcut.html 阅读全文
posted @ 2018-12-15 20:33 bregman 阅读(141) 评论(0) 推荐(0)
摘要: 使用算法 breeze.optimize.LBFGSB,出现如下问题: 看到github上一个issue的解决方法是使用最新版本的 org.scalanlp:breeze_2.11:1.0 RC2, 结果还是出现错误,有发现有很多warning,怀疑依赖的包有问题。 查了各个办法,没有解决,最后用下 阅读全文
posted @ 2018-12-13 09:10 bregman 阅读(531) 评论(0) 推荐(0)
摘要: 1. Windows下有个 FastStone Capture不错, 2. mac 下 用Xnip 可以。 阅读全文
posted @ 2018-12-09 14:25 bregman 阅读(112) 评论(0) 推荐(0)
摘要: ImprovedGAN $ Loss = Loss_{supervised} \ + \lambda Loss_{unsupervised} $ 第二项形式与原始的GAN模型类似。 参考: Improved Techniques for Training GANs 代码: https://githu 阅读全文
posted @ 2018-12-03 10:02 bregman 阅读(1642) 评论(0) 推荐(0)
摘要: 1. Tensorflow 图的模式 定义各模块,前三个步相当于搭建了模型的静态图。 1. 数据输入函数 2. 优化问题的loss函数, 效果度量函数。注: loss 函数相当于定义深层网络。 3. 参数优化算子 4. 通过 循环 的调用session.run 刷新优化参数,loss函数值,效果度量 阅读全文
posted @ 2018-11-29 18:10 bregman 阅读(625) 评论(0) 推荐(0)
摘要: 初期的业务, 通常标签不够多,特别是大额欺诈等,获取Y标签的代价很高。 因此标签少的问题非常有实际价值。 方案: 1. 半监督学习 2. 迁移学习 3. 在考虑的方法 4. 其他新算法, 如下 论文: WGAN + 半监督学习 1. "Improving the Improved Training 阅读全文
posted @ 2018-11-27 21:06 bregman 阅读(149) 评论(0) 推荐(0)
摘要: 适合问题: 对于无标签的数据, 又想找出坏用户,完成业务目标。 参考: https://scikit learn.org/stable/modules/outlier_detection.html 算法: 1. one class SVM, 原理: 特征空间中, 分割平面离原点的距离大 2. Iso 阅读全文
posted @ 2018-11-23 12:37 bregman 阅读(1534) 评论(0) 推荐(0)
摘要: 深度学习的核心, BP算法实现逻辑 阅读全文
posted @ 2018-11-15 15:15 bregman 阅读(1176) 评论(0) 推荐(0)
摘要: 网易云音乐, 启动问题。 修改 .desktop 文件 或者把密码写到文件 .passwd.txt 中 sudo S netease cloud music %U 阅读全文
posted @ 2018-11-11 22:06 bregman 阅读(489) 评论(0) 推荐(0)
摘要: 1. .iso镜像文件转 .dmg文件 2. 写入U盘 3. 参考 https://jingyan.baidu.com/album/4853e1e565dc781908f72657.html?picindex=9 阅读全文
posted @ 2018-11-09 10:09 bregman 阅读(190) 评论(0) 推荐(0)
摘要: 之前一直用 conda版python, 发现可以直接装intel的numpy了. https://software.intel.com/en us/articles/installing the intel distribution for python and intel performance 阅读全文
posted @ 2018-11-07 15:45 bregman 阅读(781) 评论(0) 推荐(0)
摘要: 在笔记本了装了一个虚拟机, 并安装了Linux系统, 方便测试linux 命令. 考虑到不需要图形界面, 学习了用命令行操作虚拟机, 配置如下 1. linux 下安装openssh server 2. 虚拟机设置端口转发, 见参考链接 3. 配置完后, 操作命令如下 参考 配置ssh端口转发 ht 阅读全文
posted @ 2018-11-07 14:57 bregman 阅读(266) 评论(1) 推荐(0)
摘要: 在scala命令行中加入scala的类库. 阅读全文
posted @ 2018-09-09 22:51 bregman 阅读(444) 评论(0) 推荐(0)
摘要: git submodule 引用 阅读全文
posted @ 2018-08-31 10:53 bregman 阅读(139) 评论(0) 推荐(0)
摘要: 删除julia 1.0 比较容易的安装Julia 1.2 删除依赖再安装相关的包 测试代码 安装 pyplot 没成功,解决如下 https://stackoverflow.com/questions/51800232/error using pyplot in julia v1 0 in wind 阅读全文
posted @ 2018-08-12 18:20 bregman 阅读(375) 评论(1) 推荐(0)
摘要: mac osX上使用latex 的技巧 阅读全文
posted @ 2018-07-02 13:10 bregman 阅读(5932) 评论(0) 推荐(0)
摘要: 两个比较文件同时换行,用 , 或者如下 阅读全文
posted @ 2018-07-01 21:17 bregman 阅读(831) 评论(0) 推荐(0)
摘要: 低秩逼近证明, 发现以前搞复杂了 $$ \begin{align} \min_{r(X)\leq r}\|A X\| &= \min_{U^TU=V^TV =I, r(\Sigma)=r} \| D U \Sigma V^T\| \\ & \leq \min_{U^TU=V^TV =I, r(\Si 阅读全文
posted @ 2018-06-26 20:30 bregman 阅读(897) 评论(0) 推荐(0)
摘要: mount -t ntfs -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" /dev/sdb1 /media/xyq/opt mount -t ntfs -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid 阅读全文
posted @ 2018-06-18 17:41 bregman 阅读(268) 评论(0) 推荐(0)
摘要: 单个查询 http://www.wolframalpha.com/input/?source=nav&i=simplify+radical+sqrt(567) notebook https://sandbox.open.wolframcloud.com/app/objects/7d8ef5ec 66 阅读全文
posted @ 2018-06-11 12:06 bregman 阅读(513) 评论(0) 推荐(0)
摘要: 激活方法参考这里 阅读全文
posted @ 2018-06-10 14:27 bregman 阅读(347) 评论(0) 推荐(0)
摘要: FM https://www.yelp.com/dataset_challenge http://www.dtic.upf.edu/~ocelma/MusicRecommendationDataset/lastfm 1K.html https://webscope.sandbox.yahoo.com 阅读全文
posted @ 2018-06-05 14:56 bregman 阅读(156) 评论(0) 推荐(0)
摘要: mac 截图 阅读全文
posted @ 2018-05-23 16:57 bregman 阅读(232) 评论(0) 推荐(0)
摘要: 计算norm时, 注意把数据改为float 类型, 否则结果不对! /opt/anaconda3/lib/python3.6/site packages/numpy/linalg/linalg.py:2168: RuntimeWarning: invalid value encountered in 阅读全文
posted @ 2018-05-15 17:03 bregman 阅读(1648) 评论(0) 推荐(0)