最近在 coursera 上发现一门不错的课程,程序的表示、转换与链接,内容是类似《深入理解计算机系统》这本书的,说来惭愧,虽然在上学时零星上过一些相关的课程,但是却没有系统地将这些内容串起来理解。本着算法工程师首先得是个工程的原则,觉得还是有必要去了解一下这块内容; 而且课程内容讲得挺通俗的,值得一听。

本文的内容主要是 week1 的内容,较为宏观地介绍了如何从冯・诺依曼体系结构演进至现代计算机结构、程序执行的基本原理、微体系结构与指令集 (ISA) 等。由于课程 PPT 说得已经较为清晰了,这里大部分内容会直接截图(懒得再打字也是一个原因。。。)

阅读全文 »

In computational advertising, conversions are delayed—users may convert some time after clicking, and deeper conversion funnels tend to have longer delays. When training CVR/deep-CVR models, two situations arise: (1) sending samples to the model too early, treating events that will eventually convert but haven’t yet as negative examples, causing model underestimation; (2) sending samples to the model too late, waiting for all samples to complete a sufficient time window, preventing timely model updates.

Therefore, modeling the conversion feedback delay is necessary. This paper “Modeling Delayed Feedback in Display Advertising” from Criteo provides a solution. The main idea: for samples where conversion hasn’t been observed yet, don’t treat them directly as negative samples, but instead give the model different gradient magnitudes based on how long since the click occurred. The paper validates this method’s effectiveness on Criteo’s real data. Additionally, the modeling approach from problem formulation to solution is worth studying.

阅读全文 »

在计算广告中,转化是有延迟的,即在点击发生后过一段时间用户可能才会发生转化,且往往转化漏斗越深,延迟的时间越长;因此在训练 cvr / deepcvr 模型时,会有两种情况出现(1)过早把样本送入模型,把最终会转化但是还没回传 label 的事件当做负例,导致模型低估(2)过晚把样本送入模型,即让所有样本都等待一个足够长的时间才送入模型,导致模型没能及时更新

因此在建模时需要对转化的回传延时进行建模,这篇 paper 《Modeling Delayed Feedback in Display Advertising》是 criteo 针对这个问题提供的一个解决方法,主要思想就是对于还未观察到 conversion 的样本,不直接将其当做负样本,而是当前考虑 click 已发生的时间长短给模型不同大小的 gradient;paper 里称在 criteo 的真实的数据上验证了该方法的有效性。此外,文章从问题的建模到求解的思路不错,值得一看。

阅读全文 »

本文简单了描述机器学习中的蒸馏(distillation)技术的原理,distillation 可简单分为 model distillation 和 feature distillation。顾名思义,蒸馏是对原来的模型 / 特征进行了压缩,其原因可能是为了减少模型的大小(model distillation)、或者某些特征只能在 training 时获取,serving 无法获取 (feature distillation);在实际业务中可根据具体场景灵活地应用这两类技术。

阅读全文 »

This article briefly describes the principles of distillation in machine learning. Distillation can be simply divided into model distillation and feature distillation. As the name suggests, distillation compresses the original model/features. The reasons may be to reduce model size (model distillation), or because certain features are only available during training but not during serving (feature distillation). In practical business, these two techniques can be flexibly applied according to specific scenarios.

阅读全文 »

Smart Pacing for Effective Online Ad Campaign Optimization》是 Yahoo 在 2015 发表的一篇关于 budget pacing 的论文,与之前写过的 Budget Pacing for Targeted Online Advertisements at LinkedIn 相似,目标也是把预算均匀花完,但是除了这个目标,这篇论文还提出了在预算均匀花完的基础上如何保成本的方法,算是一个多目标优化了。在离线环境和真实环境验证了方法的有效性,是实践性较强的一篇文章,值得一看。

阅读全文 »

Machine learning involves numerous hyperparameters—model hyperparameters, optimizer hyperparameters, loss function hyperparameters, etc. Users need to set these based on experience and adjust according to training results. Optimal values vary by task and dataset, with no universal empirical values.

This step is often tedious and time-consuming. To simplify, Hyperparameter optimization research aims to automatically search for optimal hyperparameters. Common methods include grid search and random search, with more advanced methods like heuristic search and Bayesian optimization. This article introduces Bayesian optimization for hyperparameter search—a common approach also provided as a service by Google on Google Cloud. We focus on the GPR (Gaussian Process Regression) + GP-BUCB (Gaussian Process Regression-Batch Upper Confidence Bound) method.

阅读全文 »

机器学习中存在着众多的超参数,如 model 中的超参,optimizer 中的超参,loss function 中的各种超参等,这些超参需要使用者根据经验设定,并根据训练结果进行调整,因为这些超参的最优值跟不同任务、不同数据集相关, 没有一个非常通用的经验值。

这一步骤往往繁琐耗时,为了简化这一过程,有了 Hyperparameter optimization 的研究,其目的是自动搜索最优的超参。超参搜索最常见的方法是 grid search,random search,当然也有更高级的方法如基于启发式方法的 heuristic search、基于统计学的 bayesian optimization 等,本文主要介绍超参搜索中的 Bayesian Optimization 方法,这是超参搜索比较常见的做法,Google 也将这部分作为一个 service 提供在 Google Cloud 上。本文主要介绍 Bayesian Optimization 中的 GPR (Gaussian Process Regression) + GP - BUCB (Gaussian Process Regression-Batch Upper Confidence Bound) 方法。

阅读全文 »

对于习惯用 markdown 写作的人,日常最烦恼的问题之一应该是如何显示自己的图片,markdown 文本存储的是图片的地址(本地路径或 url),而最为常用的是 url,至少我写文章是这样的。某些 markdown 编辑器也提供了 markdown 图床服务,如有道云笔记,cmd_markdown 等, 但是这些编辑器要么太丑(有道云笔记,说的就是你),要么就是比较小众(cmd markdown),生怕哪天停止运营了文章里的图片就没了,而且这些服务一般是要收费的。

那么有没有一种方法能够为本地图片生成 public url,同时保证数据有较高的可用性,而且最好是免费的。Github 其实已经间接为我们提供了这样的服务,只是这个步骤较为繁琐,本文就是针对这一点开发了一个小工具来简化这个过程,代码已开源,见 MarkdownImageUploader,本文主要介绍其基本原理和使用方法。

阅读全文 »

This article introduces an automated approach to deploying machine learning models using Flask, Docker, Jenkins and Kubernetes. The basic principle: Flask provides RESTful API to receive client prediction requests; Docker packages the service into a docker image for easy deployment and migration; Jenkins triggers automatic builds when code or models are updated; Kubernetes manages containers for scalability and reliability. This article is based on Deploy a machine learning model in 10 minutes with Flask, Docker, and Jenkins with improvements and extensions, such as a simple shell script to trigger Jenkins and Kubernetes deployment instructions. All code is available at DeployMachineLearningModel.

阅读全文 »
0%