rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.17k stars 528 forks source link

[FEA] Multiple regression targets in LinearRegression #3850

Open tfeher opened 3 years ago

tfeher commented 3 years ago

Is your feature request related to a problem? Please describe.

Currently cuML's LinearRegression only support a single regression target, in other words y has to have only one column. In contrast, scikit-learn supports multiple regression targets.

Describe the solution you'd like Support multiple regression targets. The example below generates such a dataset:

import cuml
from sklearn.datasets import make_regression

X, y = make_regression(n_samples=100, n_features=100, n_informative=10, n_targets=2, random_state=137)

# cuML linear regression using multiple targets
clf = cuml.linear_model.LinearRegression()
clf.fit(X, y)

Currently cuML throws ValueError: Expected 1 columns but got 2 columns.

Describe alternatives you've considered Loop through all the regression target. This is used in the single cell genomics notebooks. This is slow when the number of columns are large.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.