Post 3 companion Β· Vectors Β· Gradient Descent Β· ML Metrics
Material Feature Vectors
Enter two materials' feature vectors (up to 4 features each). See norm, dot product, and cosine similarity computed live.
Vector A (Material 1)
e.g. [a, Z_A, Z_B, ΞEN]
Vector B (Material 2)
e.g. [a, Z_A, Z_B, ΞEN]
Results
βAβ β Norm of Material A
β
β(xβΒ² + xβΒ² + xβΒ² + xβΒ²)
βBβ β Norm of Material B
β
β(xβΒ² + xβΒ² + xβΒ² + xβΒ²)
A Β· B β Dot Product
β
Ξ£ aα΅’ Γ bα΅’
cos ΞΈ β Cosine Similarity
β
β
Live Gradient Descent on a Loss Surface
Watch gradient descent find the minimum of a simple loss function L(w) = (wβtarget)Β² + noise.
This is exactly what happens during ML training.
Final w
β
Final Loss
β
Iterations
β
Try this:
Set Ξ· = 0.9 β watch the path overshoot and oscillate (like a bad SCF mixing parameter).
Then set Ξ· = 0.05 β very slow but stable convergence.
Sweet spot: Ξ· β 0.1β0.3.
ML Metrics Calculator
Enter DFT values (true) and ML predictions β one per line. Computes MAE, RMSE, RΒ².
MAE (eV)
β
RMSE (eV)
β
RΒ²
β
Predicted vs True (parity plot)
1. Two material feature vectors have cosine similarity = 0.99. What does this mean?
2. Your gradient descent loss oscillates up and down and never converges. What should you do?
3. Which metric penalises large errors more heavily than small ones?