一直都想系统性地学习一下分布式系统的一些理论,所以打算开个坑学习一下 MIT 的课程 6.824: Distributed Systems 。本文主要是 LEC 1 中的内容,简单介绍了分布式系统的几个核心问题,以及经典的分布式计算框架 - MapReduce, 虽然这是耳熟能详的一个框架(或者说是编程范式)了,但是其设计思想至今还是非常值得参考的。

阅读全文 »

EE (Exploitation & Exploration) 问题在计算广告 / 推荐系统中非常常见,甚至在更广义的范围上,任意决策问题都会牵涉到 EE 问题。简单来说,这个问题就是要解决的是在决策时到底是根据已有经验选择最优的策略 (Exploitation),还是去探索一些新的策略来提升未来的收益 (Exploration)。本文主要介绍解决这个问题的三种比较常见的方法:随机方法,UCB 方法,Thompson sampling 方法,侧重于方法的具体流程和基本思想。

阅读全文 »

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

阅读全文 »
0%