Skip to content

Pinball-loss: Unable to fit?Β #273

@tpanum

Description

@tpanum

Describe the bug

I am unable to fit a simple model using the experimental Pinball-loss.

Steps to reproduce

from skglm.experimental import Pinball, PDCD_WS
from skglm import GeneralizedLinearEstimator
from skglm.penalties import L1
from skglm.solvers import ProxNewton

estimator = GeneralizedLinearEstimator(
    datafit=Pinball(.2),
    penalty=L1(alpha=1.),
    solver=ProxNewton(),
)
estimator.fit(X, y)

yields

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Unknown attribute 'raw_grad' of type instance.jitclass.Pinball#371180a40<quantile_level:float64>

File "../../micromamba/envs/.../lib/python3.12/site-packages/skglm/solvers/prox_newton.py", line 430:
def _construct_grad(X, y, w, Xw, datafit, ws):
    <source elided>
    # recomputing raw_grad for every j, which is costly for logreg
    raw_grad = datafit.raw_grad(y, Xw)
    ^
    ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions