Skip to content

Commit

Permalink
minor fixes to split
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellszi committed May 15, 2024
1 parent 855e899 commit 7f0db0f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rna3db/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@ def split(
output[split_names[-1]]["component_0"] = cluster_json["component_0"]
lengths.pop("component_0")

# start with the smallest splits
# splits, split_names = zip(*sorted(zip(splits, split_names), reverse=True))

capacities = [int(total_repr_clusters * ratio) for ratio in splits]
capacities = [round(total_repr_clusters * ratio) for ratio in splits]
for name, capacity in zip(split_names, capacities):
components = find_optimal_components(lengths, capacity)
print(name, capacity, components)
for k in sorted(components):
lengths.pop(k)
output[name][k] = cluster_json[k]
Expand Down

0 comments on commit 7f0db0f

Please sign in to comment.