摘要: 3 Longest Substring Without Repeating Characters 问题描述 Given a string, find the length of the longest substring without repeating characters. Example 1 阅读全文
posted @ 2020-03-22 19:14 Lyu1997 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 16 3Sum Closest 问题描述 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Retu 阅读全文
posted @ 2020-03-22 18:15 Lyu1997 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 11 Container With Most Water 问题描述 Given n non negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical line 阅读全文
posted @ 2020-03-22 16:43 Lyu1997 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 836 Rectangle Overlap 问题描述 A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom left corner, and (x 阅读全文
posted @ 2020-03-22 16:09 Lyu1997 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 300 Longest Increasing Subsequence 问题描述 Given an unsorted array of integers, find the length of longest increasing subsequence. Input: [10,9,2,5,3,7,1 阅读全文
posted @ 2020-03-22 15:43 Lyu1997 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 常数密度轮廓线(constant probability density contour) 对于PRML这本书中的图2.7,我不了解这张图表达的含义,于是谷歌到了这个名词。 在多元高斯分布中,对于某一常数$c$,满足下列公式的所有点${\boldsymbol x}$的集合组合成常数密度轮廓线: $$ 阅读全文
posted @ 2020-02-16 19:18 Lyu1997 阅读(1147) 评论(0) 推荐(1) 编辑
摘要: 高斯分布1 概览 一元高斯分布: $$ N(x|\mu,\sigma^2)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp( \frac{(x \mu)^2}{2\sigma^2}) $$ 对于D维向量$\boldsymbol x$,多元高斯分布为: $$ N(\boldsymb 阅读全文
posted @ 2020-02-16 19:12 Lyu1997 阅读(816) 评论(0) 推荐(0) 编辑
摘要: 概率分布(二) 多项式变量 二元变量表示只可能在两种可能值之中取值,若有$K$个互斥状态,则可以用$1 of K$表示法。 取$K=6$,则$\boldsymbol{x},\boldsymbol{\mu}$可以表示成: $$ \boldsymbol{x}=(0,0,1,0,0,0)^T\\ \bol 阅读全文
posted @ 2020-01-27 21:31 Lyu1997 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: 概率分布(一) 参数分布 取这个名字是因为少量的参数可以控制整个概率分布。如高斯分布,我们只需要控制其期望和方差就可以得到一个特定的概率分布。 频率学家的观点:通过最优化某些准则(如似然函数)来确定参数的具体值。 贝叶斯观点:给定观察数据,先引入参数的先验分布,然后用贝叶斯定理计算对应的后验概率分布 阅读全文
posted @ 2020-01-17 22:01 Lyu1997 阅读(1114) 评论(0) 推荐(0) 编辑
摘要: Gamma分布与共轭先验 Gamma函数 对于整数$n$的阶乘,我们有$n!=n\times (n 1)...\times1$。 对于实数$x$的阶乘,计算公式为: $$ \Gamma(x)=\int_0^\infty t^{x 1}e^{ t}\,dt $$ 性质如下: 1. $\Gamma(x+ 阅读全文
posted @ 2020-01-17 21:59 Lyu1997 阅读(4313) 评论(0) 推荐(1) 编辑