Skip to content

Commit

Permalink
Update libmultilabel/linear/tree.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chih-Jen Lin <[email protected]>
  • Loading branch information
ericliu8168 and cjlin1 authored Oct 6, 2024
1 parent 03c4f48 commit 35fe26f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmultilabel/linear/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def collect_stat(node: Node):
root.dfs(collect_stat)

# 16 is because when storing sparse matrices, indices (int64) require 8 bytes and floats require 8 bytes
# 2/3 is because that dual coordinate descent method can further get a sparse model vector to save space
# Our study showed that among the used features of every binary classification problem, on average no more than 2/3 of weights obtained by the dual coordinate descent method are non-zeros.
return total_num_weights * 16 * 2/3


Expand Down

0 comments on commit 35fe26f

Please sign in to comment.