Skip to content

Commit 1db376a

Browse files
committed
change the defaut optimizer to l2 cddual in EUR-lex config
1 parent 6e955f7 commit 1db376a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

example_config/EUR-Lex/tree_l2svm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data_name: EUR-Lex
66
# train
77
seed: 1337
88
linear: true
9-
liblinear_options: "-s 2 -B 1 -e 0.0001 -q"
9+
liblinear_options: "-s 1 -B 1 -e 0.0001 -q"
1010
linear_technique: tree
1111

1212
# eval

libmultilabel/linear/tree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ def collect_stat(node: Node):
225225
root.dfs(collect_stat)
226226

227227
# 16 is because when storing sparse matrices, indices (int64) require 8 bytes and floats require 8 bytes
228-
return total_num_weights * 16
228+
# 2/3 is because that dual coordinate descent method can further get a sparse model vector to save space
229+
return total_num_weights * 16 * 2/3
229230

230231

231232
def _train_node(y: sparse.csr_matrix, x: sparse.csr_matrix, options: str, node: Node):

0 commit comments

Comments
 (0)