Today
-
QR decomposition.
-
Sweep operator.
-
Summary of linear regression.
Announcement
-
TA office hours change to Wed @ 11a-1p.
-
HW1 graded. Common issues: Q3 (llvm unroll the loop or not), Q4 (cancellation), Git issues (tagging, folder, commits, aux. files), Q5-Q7 needs mathematical proof not code.
You can amend your homework and get bonus points.
-
Use PyPlot
imshow
to display image in Jupyter notebook. -
My runtime of the NNMF example:
using BenchmarkTools, DelimitedFiles
# data matrix
X = readdlm("nnmf-2429-by-361-face.txt", ' ', Float64)
# provided start point
V0full = readdlm("V0.txt", ' ', Float64)
W0full = readdlm("W0.txt", ' ', Float64)
# benchmark
@benchmark nnmf(X, r; V=V0, W=W0) setup=(V0 = V0full[:, 1:r]; W0 = W0full[1:r, :])
gives benchmark result
BenchmarkTools.Trial:
memory estimate: 7.12 MiB
allocs estimate: 8
--------------
minimum time: 1.548 s (0.00% GC)
median time: 1.581 s (0.00% GC)
mean time: 1.582 s (0.17% GC)
maximum time: 1.620 s (0.00% GC)
--------------
samples: 4
evals/sample: 1
It took 394 iterations to converge. I expect similar runtime and memory allocation in your homework submission.