Open
Description
Hi, I'm using NGBoost for a project and I've just installed the last versions of numpy, pandas. I already worked with the library and I never had problems; however now I'm encountering a problem with the natural gradient. I get the following error:
Traceback (most recent call last):
File "/Users/michaelvitali/repos/predico/main.py", line 5, in <module>
ngb_model.main()
~~~~~~~~~~~~~~^^
File "/Users/michaelvitali/repos/predico/models/ngb_model.py", line 109, in main
model.fit(X_train_sc, y_train_sc.flatten())
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/predico/lib/python3.13/site-packages/ngboost/ngboost.py", line 236, in fit
grads = D.grad(Y_batch, natural=self.natural_gradient)
File "/opt/anaconda3/envs/predico/lib/python3.13/site-packages/ngboost/scores.py", line 12, in grad
grad = np.linalg.solve(metric, grad)
File "/opt/anaconda3/envs/predico/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 410, in solve
r = gufunc(a, b, signature=signature)
ValueError: solve: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (m,m),(m,n)->(m,n) (size 14400 is different from 2).
On the other side, when setting natural_gradient=False works.
Do you know how can I solve it?
Thank you in advance.
Metadata
Metadata
Assignees
Labels
No labels