Simulating more parameters for proximal decoding; Changed theme
This commit is contained in:
parent
dcb78a3963
commit
296feaf1fb
15
sw/main.py
15
sw/main.py
@ -21,12 +21,19 @@ def main():
|
||||
[0, 1, 1, 0, 0, 1, 1],
|
||||
[0, 0, 0, 1, 1, 1, 1]])
|
||||
|
||||
R = np.array([[0, 0, 1, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 1, 0, 0],
|
||||
[0, 0, 0, 0, 0, 1, 0],
|
||||
[0, 0, 0, 0, 0, 0, 1]])
|
||||
|
||||
# Define encoder and decoders
|
||||
|
||||
encoder = channel.Encoder(G)
|
||||
|
||||
decoders = {"naive_soft_decision": naive_soft_decision.SoftDecisionDecoder(G, H),
|
||||
# "proximal": proximal.ProximalDecoder(H, K=100, gamma=0.01),
|
||||
decoders = {"naive_soft_decision": naive_soft_decision.SoftDecisionDecoder(G, H, R),
|
||||
"proximal_0_01": proximal.ProximalDecoder(H, R, K=100, gamma=0.01),
|
||||
"proximal_0_05": proximal.ProximalDecoder(H, R, K=100, gamma=0.05),
|
||||
"proximal_0_15": proximal.ProximalDecoder(H, R, K=100, gamma=0.15),
|
||||
}
|
||||
|
||||
# Test decoders
|
||||
@ -34,7 +41,7 @@ def main():
|
||||
k, n = G.shape
|
||||
d = np.zeros(k) # All-zeros assumption
|
||||
|
||||
SNRs = np.linspace(1, 7, 9)
|
||||
SNRs = np.linspace(1, 8, 9)
|
||||
data = pd.DataFrame({"SNR": SNRs})
|
||||
|
||||
for decoder_name in decoders:
|
||||
@ -48,6 +55,8 @@ def main():
|
||||
|
||||
# Plot results
|
||||
|
||||
sns.set_theme()
|
||||
|
||||
fig, axes = plt.subplots(1, 1)
|
||||
fig.suptitle("Bit-Error-Rates of various decoders")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user