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] Linear Regression: Estimator predictions deviate from scikit-learn results for some inputs #4963

Open
csadorf opened this issue Nov 1, 2022 · 0 comments
Assignees
Labels
? - Needs Triage Need team to review and classify bug Something isn't working Linear Models

Comments

@csadorf
Copy link
Contributor

csadorf commented Nov 1, 2022

Describe the bug

The linear regression predictions between the cuml and the scikit-learn implementation deviate for certain input values.

Steps/Code to reproduce bug

  1. Download lg_cuml_sk_deviation_minimal_example_input.zip
  2. Execute:
import numpy as np
from sklearn.linear_model import LinearRegression
from cuml import LinearRegression as cuLinearRegression

npzfile = np.load("lg_cuml_sk_deviation_minimal_example_input.zip")
X_train, X_test, y_train, y_test = npzfile = [npzfile[f] for f in npzfile.files]

estimator = LinearRegression()
estimator.fit(X_train, y_train)
sk_predict = estimator.predict(X_test)

estimator = cuLinearRegression()
estimator.fit(X_train, y_train)
cu_predict = estimator.predict(X_test)

absolute_deviation = np.sum(np.abs((cu_predict - sk_predict)))
print(absolute_deviation)

Expected behavior

The deviation between regression predictions should be below the expected tolerance.

Environment details (please complete the following information):

  • Environment location: Docker
  • Linux Distro/Architecture: Ubuntu 20.04 amd64
  • GPU Model/Driver: V100-SMX2 495.29.05
  • CUDA: 11.5
  • Method of cuDF & cuML install: from source

Additional context

The issue was discovered as part of the extension of tests with hypothesis (#4952).

@csadorf csadorf added bug Something isn't working ? - Needs Triage Need team to review and classify Linear Models labels Nov 1, 2022
csadorf added a commit to csadorf/cuml that referenced this issue Nov 7, 2022
@csadorf csadorf self-assigned this Dec 14, 2022
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 Linear Models
Projects
None yet
Development

No branches or pull requests

1 participant