Skip to content

Commit 2934289

Browse files
authored
Add normalization and randomized test for Kaczmarz
1 parent c8ea2e5 commit 2934289

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/testKaczmarz.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ Random.seed!(12345)
118118
x_approx = Array(solve!(S, arrayType(b)))
119119
@test norm(x - x_approx) / norm(x) 0 atol = 0.1
120120
end
121+
122+
# Normalization
123+
for strategy in [SystemMatrixBasedNormalization(), MeasurementBasedNormalization()]
124+
l2 = L2Regularization(0.1)
125+
S = createLinearSolver(solver, arrayType(A), iterations=200, randomized=true, reg = l2, normalizeReg = strategy)
126+
x_approx = Array(solve!(S, arrayType(b)))
127+
@test norm(x - x_approx) / norm(x) 0 atol = 0.1
128+
end
129+
121130
end
122131
end
123132
end

0 commit comments

Comments
 (0)