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

Elastic Net Regression in R #869

Open
prateeksasan1 opened this issue Jan 12, 2021 · 1 comment
Open

Elastic Net Regression in R #869

prateeksasan1 opened this issue Jan 12, 2021 · 1 comment

Comments

@prateeksasan1
Copy link

prateeksasan1 commented Jan 12, 2021

Hi,

I just downloaded the h2o4gpu package for R 4.0.2 and tried running the examples. While running the elastic net regression, i got the following error :

System Information :

R : 4.0.2
Cuda : 10.0.130
Python: 3.6
packageVersion(h2o4gpu): 0.3.2

Code :

train <- read.csv("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv")
test <- read.csv("https://s3.amazonaws.com/erin-data/higgs/higgs_test_5k.csv")

Create train & test sets (column 1 is the response)

x_train <- train[, -1]
y_train <- train[, 1]
x_test <- test[, -1]
y_test <- test[, 1]

model_enc <- h2o4gpu.elastic_net_classifier() %>% fit(x_train, y_train)

Error :

Error in py_call_impl(callable, dots$args, dots$keywords) :
ImportError: cannot import name 'signature'

Detailed traceback:
File "/users/PAS1316/prateeksasan/venv/h2o4gpu/lib64/python3.6/site-packages/h2o4gpu/solvers/elastic_net.py", line 1607, in get_params
return self.model.get_params()
File "/users/PAS1316/prateeksasan/venv/h2o4gpu/lib64/python3.6/site-packages/h2o4gpu/solvers/elastic_net.py", line 1259, in get_params
for key in self._get_param_names():
File "/users/PAS1316/prateeksasan/venv/h2o4gpu/lib64/python3.6/site-packages/h2o4gpu/solvers/elastic_net.py", line 1232, in _get_param_names
from ..utils.fixes import signature

@JBleher
Copy link

JBleher commented Nov 15, 2021

You need to substitute line 1232 in elastic_net.py with
from funcsigs import signature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants