h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.86k stars 2k forks source link

H2o.GLM - Setting intercept=F cause unimplemented error #10719

Open exalate-issue-sync[bot] opened 1 year ago

exalate-issue-sync[bot] commented 1 year ago

Here is the code snippet:

hl2 = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"), training_frame = prostate.hex, family = "binomial", nfolds = 0, alpha = 0.5, lambda_search = FALSE, compute_p_values=T , lambda = 0, intercept=T, seed = 11) |=========================================================| 100%

hl2 = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"), training_frame = prostate.hex, family = "binomial", nfolds = 0, alpha = 0.5, lambda_search = FALSE, compute_p_values=T , lambda = 0, intercept=F, seed = 11) | | 0%

water.exceptions.H2OIllegalArgumentException: unimplemented

water.exceptions.H2OIllegalArgumentException: unimplemented at water.H2O.unimpl(H2O.java:942) at hex.glm.GLM$GLMDriver.ADMM_solve(GLM.java:569) at hex.glm.GLM$GLMDriver.solveGram(GLM.java:564) at hex.glm.GLM$GLMDriver.fitIRLSM(GLM.java:668) at hex.glm.GLM$GLMDriver.fitModel(GLM.java:930) at hex.glm.GLM$GLMDriver.computeSubmodel(GLM.java:999) at hex.glm.GLM$GLMDriver.computeImpl(GLM.java:1068) at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:169) at hex.glm.GLM$GLMDriver.compute2(GLM.java:536) at water.H2O$H2OCountedCompleter.compute(H2O.java:1217) at jsr166y.CountedCompleter.exec(CountedCompleter.java:468) at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263) at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974) at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477) at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)

Looking at the code private double[] ADMM_solve(Gram gram, double [] xy) { if(_parms._remove_collinear_columns || _parms._compute_p_values) { if(!_parms._intercept) throw H2O.unimpl();

Reference: https://community.h2o.ai/questions/1206/glm-with-compute-p-valuest-and-interceptf-not-impl.html

h2o-ops commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-3822 Assignee: New H2O Bugs Reporter: Avkash Chauhan State: Open Fix Version: N/A Attachments: N/A Development PRs: N/A