Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Invalid output from LogisticRegression decision_function. #5741

Open
trivialfis opened this issue Feb 1, 2024 · 0 comments · May be fixed by #6235
Open

[BUG] Invalid output from LogisticRegression decision_function. #5741

trivialfis opened this issue Feb 1, 2024 · 0 comments · May be fixed by #6235
Assignees
Labels
? - Needs Triage Need team to review and classify bug Something isn't working cuml-cpu

Comments

@trivialfis
Copy link
Member

Describe the bug
The output shape is incorrect.

Steps/Code to reproduce bug

from sklearn.linear_model import LogisticRegression as skllogitic
from sklearn.datasets import make_classification
from cuml.linear_model import LogisticRegression


def test_logistic_reg():
    X, y = make_classification(
        random_state=3, n_classes=5, n_features=8, n_informative=5
    )
    reg_skl = skllogitic()
    reg_skl.fit(X, y)
    d_skl = reg_skl.decision_function(X)

    reg = LogisticRegression()
    reg.fit(X, y)
    d_cu = reg.decision_function(X)

    print(d_skl.shape, d_cu.shape)
    # (100, 5), (5, 100)

test_logistic_reg()

Expected behavior
The output shape matches the one from sklearn.

Environment details (please complete the following information):

  • Environment location: Bare-metal
  • Linux Distro/Architecture: [Ubuntu 22.04 amd64]
  • CUDA: [12.0]
  • Method of cuDF & cuML install:
    • cuml: source 24.02
    • cudf: conda 24.02
@trivialfis trivialfis added bug Something isn't working ? - Needs Triage Need team to review and classify labels Feb 1, 2024
@jcrist jcrist linked a pull request Jan 17, 2025 that will close this issue
@jcrist jcrist self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working cuml-cpu
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants