The EE (Exploitation & Exploration) problem is very common in computational advertising/recommender systems. More broadly, any decision-making problem involves the EE problem. Simply put, this problem addresses whether to choose the optimal strategy based on existing experience (Exploitation) or explore new strategies to improve future returns (Exploration) when making decisions. This article mainly introduces three common methods to solve this problem: random methods, UCB methods, and Thompson sampling methods, focusing on the specific procedures and basic ideas of each method.

阅读全文 »

题目有点拗口,其实就是给定一个数组,要求给出某个元素作为最小值或最小值的那些 continous subarrays 中最长的长度,如对于数组 [1, 2, 5, 6], 元素 5 作为最大值的 continous subarrays 有三个: [5], [2, 5], [1, 2, 5],长度最长的是 3。遍历的解法找出一个元素要 \(O(n)\) 的时间复杂度,找出所有元素则需要 \(O(n^2)\) 的时间复杂度,而通过栈能够在 \(O(n)\) 的时间复杂度内解决这个问题

阅读全文 »

最近在魔改 loss function,涉及到很多矩阵运算,而矩阵运算中维度的对齐免不了要多次的调试;沿袭着之前的 print 大法弄了一段时间后,不仅代码凌乱不堪,而且心累:每次 import tensorflow as tf 都要十几秒,然后 print 完之后想进一步看其他变量的信息,又要重新执行一遍。后来找到了 ipdb 这个好用的工具,才发现自己过去调试程序的方法是多么的低效和 naive。

阅读全文 »

C / C++ 在 linux 下可通过 gcc 进行编译,当文件数量少,文件依赖关系简单时可通过命令进行编译,但是当文件数量庞大且关系复杂时,就要依赖于 make 和 Makefile 管理这些复杂关系了。MakeFile 类似于 shell 脚本,定义了文件的依赖关系,以及编译的先后顺序。本文主要介绍 Makefile 的基本语法,本系列文章主要参考了 跟我一起写 Makefile

阅读全文 »

最近在学习 golang,本文主要是 A Tour of Go 的一些摘记,涵盖了 go 的一些基本语法与数据类型、通过 struct 和 method 实现类的特性、以及 go 中重要的 concurrency 特性。

阅读全文 »

文章为转载,转载自 Compiling Cpp,主要涉及到 C++ 在 linux 下通过 g++ 编译的一些基础知识,包括编译单个源文件、多个源文件、创建并使用静态库等。

阅读全文 »
0%