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.9k stars 2k forks source link

GLM param, class_sampling_factors ''[0.2]" gets exception msg in model_builders: [F cannot be cast to [Ljava.lang.Object; #13527

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

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

that's the exception. Not really informative enough if I'm doing something wrong Supposedly class_sampling_factors takes '[float]' so I gave it '[0.2]' dataset is covtype20k.data. Maybe I'm supposed to have a list of values equal to the # of classes? or ??

The test munges covtype20k.data so col 54 is 0/1 (int) 0/1 int is legal for GLM binomial...doesn't have to be enum. If I remove the class_sampling_factors from the parameter dict for the test, it runs.

to run cd h2o-dev/py2/testdir_single_jvm python test_GLM_error1.py

add -uc if you want to connect to existing h2o.jar localhost:54321

Session WARN: Caught exception: [F cannot be cast to [Ljava.lang.Object;; Stacktrace: [water.api.Schema.parse(Schema.java:492), water.api.Schema.fillFromParms(Schema.java:401), hex.schemas.ModelBuilderSchema.fillFromParms(ModelBuilderSchema.java:70), hex.schemas.ModelBuilderSchema.fillFromParms(ModelBuilderSchema.java:20), water.api.Handler.handle(Handler.java:49), water.api.RequestServer.handle(RequestServer.java:629), water.api.RequestServer.serve(RequestServer.java:587), water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:434), java.lang.Thread.run(Thread.java:745)]

here's what the test did ..you can see the GLM params

2015-03-12 22:54:32.144596 -- Start http://192.168.0.34:54321/2/ImportFiles.json?path=/home/kevin/h2o-dev/smalldata/covtype 2015-03-12 22:54:32.149794 -- Start http://192.168.0.34:54321/2/ParseSetup.json # {'source_keys': u"['nfs://home/kevin/h2o-dev/smalldata/covtype/covtype.20k.data']"}; 2015-03-12 22:54:32.295118 -- Start http://192.168.0.34:54321/2/Parse.json # {'destination_key': 'covtype20k.b.hex', 'single_quotes': False, 'parse_type': u'CSV', 'number_columns': 55, 'chunk_size': 65536, 'column_types': u"['Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric','Numeric']", 'check_header': 1, 'blocking': None, 'column_names': None, 'delete_on_done': None, 'na_strings': None, 'source_keys': u"['nfs://home/kevin/h2o-dev/smalldata/covtype/covtype.20k.data']", 'separator': 44}; 2015-03-12 22:54:32.301235 -- Start http://192.168.0.34:54321/3/Jobs.json/$0301c0a8002232d4ffffffff$_8af2d7b651399e265a152e5a90be44d7? 2015-03-12 22:54:32.806641 -- Start http://192.168.0.34:54321/3/Jobs.json/$0301c0a8002232d4ffffffff$_8af2d7b651399e265a152e5a90be44d7? 2015-03-12 22:54:32.811440 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.b.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:32.848217 -- Start http://192.168.0.34:54321/3/Rapids.json # {'funs': None, 'ast': '(= ([ %covtype20k.hex "null" #54) (- ([ %covtype20k.hex "null" #54) #1))'}; 2015-03-12 22:54:32.945260 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:32.968214 -- Start http://192.168.0.34:54321/3/Rapids.json # {'funs': None, 'ast': '(= ([ %covtype20k.hex "null" #54) (N ([ %covtype20k.hex "null" #54) #0))'}; 2015-03-12 22:54:33.005055 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:33.031105 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.b.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:33.056017 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.b.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:33.082251 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.b.hex/columns/C55/summary? 2015-03-12 22:54:33.096352 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:33.118893 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.hex/columns/C55/summary? 2015-03-12 22:54:33.128635 -- Start http://192.168.0.34:54321/3/ModelBuilders.json? 2015-03-12 22:54:33.246644 -- Start http://192.168.0.34:54321/3/Frames.json/covtype20k.hex?row_offset=0&find_compatible_models=0&row_count=5 2015-03-12 22:54:33.261712 -- Start http://192.168.0.34:54321/3/ModelBuilders.json/glm # {'response_column': 'C55', 'destination_key': 'rand_glm.hex', 'ignored_columns': '[1]', 'max_iter': 3, 'n_folds': 0, 'alpha': '[0.1]', 'max_after_balance_size': 1000.0, 'use_all_factor_levels': None, 'training_frame': 'covtype20k.hex', 'solver': 'L_BFGS', 'prior1': 1, 'tweedie_variance_power': 0, 'beta_eps': 0.0001, 'class_sampling_factors': '[0.2]', 'lambda': '[0]'}; 2015-03-12 22:54:33.286641 -- Start http://192.168.0.34:54321/2/Shutdown.json # None;

v

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

Tomas Nykodym commented: Class sampling factors is not supported at all for glm. We should fix the api to not to show irrelevant inherited params.

DinukaH2O commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-544 Assignee: Raymond Peck Reporter: Kevin Normoyle State: Open Fix Version: N/A Attachments: N/A Development PRs: N/A