Skip to content

Commit

Permalink
progres?
Browse files Browse the repository at this point in the history
  • Loading branch information
Parvfect committed Apr 3, 2024
1 parent 88c7ff1 commit 1ef4eb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions distracted_coupon_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def simulate_reads(C, symbols, read_length, P, n_motifs, n_picks):

return likelihood_arr

def decoding_errors_fer(k, n, dv, dc, P, H, G, GF, graph, C, symbols, n_motifs, n_picks, decoder=None, decoding_failures_parameter=10, max_iterations=50, iterations=50, uncoded=False, bec_decoder=False, label=None, code_class="", read_lengths=np.arange(1,20)):
def decoding_errors_fer(k, n, dv, dc, P, H, G, GF, graph, C, symbols, n_motifs, n_picks, decoder=None, decoding_failures_parameter=20, max_iterations=50, iterations=50, uncoded=False, bec_decoder=False, label=None, code_class="", read_lengths=np.arange(1,20)):

frame_error_rate = []
max_iterations = max_iterations
Expand Down Expand Up @@ -269,8 +269,8 @@ def run_fer(n_motifs, n_picks, dv, dc, k, n, L, M, ffdim, P, code_class="", iter
with Profile() as prof:
n_motifs, n_picks = 8, 4
dv, dc, ffdim, P = 3, 9, 67, 2 * 0.038860387943791645
k, n = 180, 270
L, M = 12, 36
k, n = 22, 33
L, M = 12, 51
read_length = 6
read_lengths = np.arange(7, 13)

Expand Down
6 changes: 3 additions & 3 deletions tanner_qspa.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize_vn_links(self, P):
for vn in self.vns:
vn_index = vn.identifier
for cn_index in vn.links:
self.vn_links[(cn_index, vn_index)] = P[vn_index]
self.vn_links[(cn_index, vn_index)] = P[vn_index].copy()

def initialize_cn_links(self):
""" Initializes CN Links"""
Expand All @@ -24,7 +24,7 @@ def initialize_cn_links(self):
for vn_index in cn.links:
self.cn_links[(cn_index, vn_index)] = np.zeros(67)

def qspa_decode(self, symbol_likelihood_arr, H, GF, max_iterations=5):
def qspa_decode(self, symbol_likelihood_arr, H, GF, max_iterations=20):
"""Decodes using QSPA """

self.GF = GF
Expand Down Expand Up @@ -64,7 +64,7 @@ def qspa_decode(self, symbol_likelihood_arr, H, GF, max_iterations=5):
prev_max_prob_codeword = max_prob_codeword

iterations+=1
print(f"Iteration {iterations}")
#print(f"Iteration {iterations}")

print("Decoding does not converge")
return max_prob_codeword
Expand Down

0 comments on commit 1ef4eb0

Please sign in to comment.