Contrastive loss function: L = (1/2N) Σ [max(0, margin - y_i * (z_i - z_j))² + max(0, y_i * (z_i - z_j) - margin)²]
Image: Neoclassicism Enthusiast, CC BY-SA 4.0, via Wikimedia Commons
Contrastive loss function: L = (1/2N) Σ [max(0, margin - y_i * (z_i - z_j))² + max(0, y_i * (z_i - z_j) - margin)²]
Write the triplet loss formula: max(d(a,p) - d(a,n) + margin, 0)
Triplet loss formula: max(d(a,p) - d(a,n) + margin, 0)
ReLU and Leaky ReLU
ReLU: f(x) = max(0, x); Leaky ReLU: f(x) = x if x > 0 else αx (α < 1)
Cross-entropy
Cross-entropy loss equation: H(p, q) = -Σ(p(x) * log(q(x)))
Write the Bellman equation for reinforcement learning
Bellman equation: V(s) = max_a [R(s,a) + γ Σ P(s'|s,a) V(s')]
Jensen–Shannon divergence
Jensen-Shannon divergence formula: D_JS(P||Q) = 1/2 * D_KL(P||(M)) + 1/2 * D_KL(Q||(M))
Normalization (machine learning)
L2 normalization equation: x_i' = x_i / ||x||_2
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews