Proof that BFS finds shortest distance

Intuitively, Breadth-First Search (BFS) can find shortest distances from a source $latex s&s=4$ to any other reachable vertex. However, proving this intuition needs a bit hard work. After some searches, I found that there are two ideas to prove it. The two ideas both use induction to prove it. Both ideas require a bit long proof. …

How is Logistic Regression designed?

背景 Logistic Regression是ML中再熟悉不过的Model了,它能基于数据X,得出生成binary label的概率: (在上式中,X仅有一个feature) 假设你出生在Logistic Regression被发明之前且在Normal Linear Regression被发明之后,现在让你设计一个Model来预测Binary的label——Y,使得这个Model能够基于观测数据X得出Y。你会怎么设计呢? (注:接下来我们都假设X仅有一个feature)