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

GLM getGLMRegularizationPath errors out if standardize = False #7068

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 3 comments
Closed

GLM getGLMRegularizationPath errors out if standardize = False #7068

exalate-issue-sync bot opened this issue May 11, 2023 · 3 comments
Assignees

Comments

@exalate-issue-sync
Copy link

No description provided.

@exalate-issue-sync
Copy link
Author

Wendy Wong commented: [~accountid:5fa438f822f3990076aa232d] notified me of the following problem:

{noformat}import h2o
from h2o.estimators.glm import H2OGeneralizedLinearEstimator as glm
h2o.init()

import the boston dataset:

this dataset looks at features of the boston suburbs and predicts median housing prices

the original dataset can be found at https://archive.ics.uci.edu/ml/datasets/Housing

boston = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/gbm_test/BostonHousing.csv")

set the predictor names and the response column name

predictors = boston.columns[:-1]

set the response column to "medv", the median value of owner-occupied homes in $1000's

response = "medv"

convert the chas column to a factor (chas = Charles River dummy variable (= 1 if tract bounds river; 0 otherwise))

boston['chas'] = boston['chas'].asfactor()

split into train and validation sets

train, valid = boston.split_frame(ratios = [.8])

try using the standardize parameter:

initialize the estimator then train the model

boston_glm = H2OGeneralizedLinearEstimator(standardize = False)
boston_glm.train(x = predictors, y = response, training_frame = train, validation_frame = valid)

r = glm.getGLMRegularizationPath(boston_glm){noformat}

Thank you Arun.

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Details

Jira Issue: PUBDEV-8602
Assignee: Wendy Wong
Reporter: Wendy Wong
State: Resolved
Fix Version: 3.36.1.1
Attachments: N/A
Development PRs: Available

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

Linked PRs from JIRA

#6098

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

No branches or pull requests

2 participants