Skip to content
Snippets Groups Projects
Unverified Commit cdbe5576 authored by Benjamin Loison's avatar Benjamin Loison
Browse files

Get rid of `k` computation comment to open #11

parent 5c562f17
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ def Dissolve(m, k, C, previous_score, previous_ℓ):
CStarScore = score(CStar, )
if (IS_EPSILON_TARGET_DEFINITION and (previous_score - CStarScore) >= sanityTargetDifferenceThreshold) or (not IS_EPSILON_TARGET_DEFINITION and CStarScore < previous_score):
print(f'score decreasing! previous: {previous_score}, newest: {CStarScore}')
#exit(2)
exit(2)
χ = C[-k:]
return (D, , χ, CStarScore)
......@@ -146,7 +146,7 @@ if args.headers != config.HEADERS_FILE_PATH:
print(args)
# Mining in Logarithmic Space parameters
k = args.unstable_part_length # TODO: be able to redo Loïc computation
k = args.unstable_part_length
m = 3 * k
debugging = args.debugging
......@@ -205,9 +205,17 @@ for height in range(headersNumber):
if args.verify_online_property:
C += [b]
Π_online, previous_score_online, previous_ℓ_online = Compress(m, k, C, previous_score_online, previous_ℓ_online)
if Π != Π_online:
if True:#Π != Π_online:
print("Online property doesn't hold!")
exit(1)
for id_, Π, previous_score, previous_ℓ in [
['Iterative', Π, previous_score, previous_ℓ],
#['All of a sudden', Π_online, previous_score_online, previous_ℓ_online]
]:
(D, , χ, previous_score) = Dissolve(m, k, Π, previous_score, previous_ℓ)
for μ in D:
print(f'{id_}: ' + bcolors.WARNING + f'μ: {μ}' + bcolors.ENDC + f', len(Π): {len(Π)}, ' + bcolors.OKGREEN + f'len(D[μ]): {len(D[μ])}' + bcolors.ENDC + f' ({[f"{b.height} ({b.level_min} - {b.level}, {round(b.score, 4)})" for b in D[μ]]})')
break
#exit(1)
#if ℓ == 2:
# break
if args.break_at:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment