You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the fit(X,y) method of the GOSDT python class, I consistently get the following error message (trace shortened):
Traceback (most recent call last):
...
File ".../gosdt.py", line 95, in fit
self.__python_train__(X, y)
File ".../gosdt.py", line 273, in __python_train__
leaves_c, pred_c, dic, nleaves, m, n, totaltime, time_c, R_c, COUNT, C_c, accu, best_is_cart, clf = bbound(
File ".../imbalance/osdt_imb_v9.py", line 1875, in bbound
root_leaf = CacheLeaf(name, n, P, N, (), x, y, y_mpz, z_mpz, make_all_ones(n + 1),
File ".../imbalance/osdt_imb_v9.py", line 1676, in __init__
self.pred = bound.leaf_predict(self.p, self.n, w)
File ".../imbalance/osdt_imb_v9.py", line 1344, in leaf_predict
if w * p <= n:
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
When printing the variables w, p and n prior to the last call (line 1344 in osdt_imb_v9.py) I can see that w is None, the other two are not.
It seems to me that using the F1-score is impossible, because in gosdt.py the configuration entry for w is set to None whenever F1 should be used. Unless w is altered somewhere the operation in osdt_imb_v9.py consequently has to fail. File gosdt.py, lines 85-87:
Running the algorithm without specifying the objective and with other objectives like acc, bacc or wacc works perfectly fine. How can I use F1?
Is the C++ implementation able to optimize for an F1 objective function?
The text was updated successfully, but these errors were encountered:
wolpl
changed the title
Cannot use F1 objective, because w is set to None
Cannot use F1 objective, because w is set to None
Sep 9, 2020
When running the
fit(X,y)
method of theGOSDT
python class, I consistently get the following error message (trace shortened):When printing the variables
w
,p
andn
prior to the last call (line 1344 inosdt_imb_v9.py
) I can see thatw
is None, the other two are not.It seems to me that using the F1-score is impossible, because in
gosdt.py
the configuration entry forw
is set toNone
whenever F1 should be used. Unless w is altered somewhere the operation inosdt_imb_v9.py
consequently has to fail. Filegosdt.py
, lines 85-87:Running the algorithm without specifying the objective and with other objectives like acc, bacc or wacc works perfectly fine. How can I use F1?
Is the C++ implementation able to optimize for an F1 objective function?
The text was updated successfully, but these errors were encountered: