Jan 15, 2020

主定理的证明

算法分析的那个定理.
Master Theorem
where , are constants and is nonnegative. Then
  1. If for some constant , then .
  2. If , then .
  3. If for some constant , and if for some constant and all sufficiently large , then .

Jan 8, 2020

在 TeXworks 中自定义代码补全


因为 TeXworks 用了太多年, 不太想换 IDE, 还是继续用了.
参考 官方文档.
文件地址: TeXworks 菜单栏的 "帮助" -> "TeXworks 配置与资源" -> "资源" -> "completion" 文件夹 -> "tw-latex.txt" 文件.

语法

<alias>:=<text>
The <alias>:= part can be omitted to turn the code text into its own alias. <text> must fit in a single line. Empty lines and lines starting with a % are ignored.
第一句话的意思是, 单纯写 blahblah 相当于 blahblah:=blahblah.
<text> 中连续的空格是有效的.
  • #RET# 表示 return, 换行.
  • #INS# 表示 insert, 光标会被放置在此处.
  • bullet 是 placeholder, 使用 <Ctrl>+<Tab> 让光标移动到下一个占位符处.

Dec 12, 2019

A Wrong Way to Do Cross-Validation


While this point may seem obvious to the reader, we have seen this blunder committed many times in published papers in top rank journals.

Nov 30, 2019

Side Note: Information Entropy, Cross-Entropy and KL Divergence


我们考虑一个事件 , 它发生的概率是 . 假设我们观测到事件 发生, 我们希望定义一个信息量 来衡量 " 发生了" 这件事给了我们多少信息.
  1. 是关于 的递减函数. 如果事件发生概率高, 而且它发生了, 我们得到的信息应该比较少, 因为我们认为它确实容易发生, 这不稀奇.
  2. 考虑另一个独立的事件 , 它发生的概率是 , 则 . 也就是说我们希望独立事件同时发生时提供的信息量应该是他们分别提供的信息量之和.