h2o

Subsetting in H2O R

别来无恙 提交于 2020-01-03 08:13:10
问题 I have a h2o object. The standard R for subset sub1<-trans[trans$Type==1,] I tried the same in h2o. It is not working sub1<-trans[trans$Type==1,] I also tried sub1<-h2o.exec(trans[trans$Type==1,]) note* trans is a h2o data Object. Any idea to do it in h2o? Thanks 回答1: I'm not sure if this is the most "hydrophilic" way to do this but: transType <- trans$Type sub1 <- trans[transType == 1,] Seems to work for me with no problem. For a more reproducible example, consider library(h2o) localH2O <-

How to run a prediction on GPU?

♀尐吖头ヾ 提交于 2020-01-03 03:46:09
问题 I am using h2o4gpu and the parameters which i have set are h2o4gpu.solvers.xgboost.RandomForestClassifier model. XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1, colsample_bytree=1.0, gamma=0, learning_rate=0.1, max_delta_step=0, max_depth=8, min_child_weight=1, missing=nan, n_estimators=100, n_gpus=1, n_jobs=-1, nthread=None, num_parallel_tree=1, num_round=1, objective='binary:logistic', predictor='gpu_predictor', random_state=123, reg_alpha=0, reg_lambda=1, scale_pos

Is there a supported way to get list of features used by a H2O model during its training?

扶醉桌前 提交于 2020-01-03 02:18:05
问题 This is my situation. I have over 400 features, many of which are probably useless and often zero. I would like to be able to: train an model with a subset of those features query that model for the features actually used to build that model build a H2OFrame containing just those features (I get a sparse list of non-zero values for each row I want to predict.) pass this newly constructed frame to H2OModel.predict() to get a prediction I am pretty sure what found is unsupported but works for

How to create a H2OFrame using H2O REST API

核能气质少年 提交于 2020-01-02 10:06:38
问题 Is it possible to create a H2OFrame using the H2O's REST API and if so how? My main objective is to utilize models stored inside H2O so as to make predictions on external H2OFrames. I need to be able to generate those H2OFrames externally from JSON (I suppose by calling an endpoint) I read the API documentation but couldn't find any clear explanation. I believe that the closest endpoints are /3/CreateFrame which creates random data and /3/ParseSetup but I couldn't find any reliable tutorial.

ValueError: Invalid header value 'H2O Python client/2.7.9 (default, Apr 2 2015, 15:33:21) \n[GCC 4.9.2]'

自闭症网瘾萝莉.ら 提交于 2020-01-01 20:51:30
问题 I am trying to initialize H2O from Python. I am using python 2.7.9. I followed the steps below to get h2o python module: pip install requests pip install tabulate # Remove any preexisiting H2O module. pip uninstall h2o # Next, use pip to install this version of the H2O Python module. pip install http://h2o-release.s3.amazonaws.com/h2o-dev/master/1109/Python/h2o-0.3.0.1109-py2.py3-none-any.whl I get this error when I call h2o.init(). No instance found at ip and port: localhost:54321. Trying to

h2o starting on YARN not working

☆樱花仙子☆ 提交于 2019-12-31 04:06:51
问题 When I start H2o on a cdh cluster I get the following error. I downloaded everything formt he wbesite and followed the tutorial. The command I ran was hadoop jar h2odriver.jar -nodes 2 -mapperXmx 1g -output hdfsOutputDirName It shows that containers are not being used. It's not clear what settings these would be on hadoop. I have given all settings memory. It's the 0.0 for memory that doesnt make sense, and why are the containers not using memory. Is the cluster even running now? ----- YARN

How to interpret the probabilities (p0, p1) of the result of h2o.predict()

喜欢而已 提交于 2019-12-30 10:08:12
问题 I would like to understand the meaning of the value (result) of h2o.predict() function from H2o R-package. I realized that in some cases when the predict column is 1 , the p1 column has a lower value than the column p0 . My interpretation of p0 and p1 columns refer to the probabilities for each event, so I expected when predict=1 the probability of p1 should be higher than the probability of the opposite event ( p0 ), but it doesn't occur always as I can show in the following example: using

Consisten results with Multiple runs of h2o deeplearning

早过忘川 提交于 2019-12-25 04:23:01
问题 For a certain combination of parameters in the deeplearning function of h2o, I get different results each time I run it. args <- list(list(hidden = c(200,200,200), loss = "CrossEntropy", hidden_dropout_ratio = c(0.1, 0.1,0.1), activation = "RectifierWithDropout", epochs = EPOCHS)) run <- function(extra_params) { model <- do.call(h2o.deeplearning, modifyList(list(x = columns, y = c("Response"), validation_frame = validation, distribution = "multinomial", l1 = 1e-5,balance_classes = TRUE,

Chinese Text for H2O DataFrame in Python

只谈情不闲聊 提交于 2019-12-25 03:23:00
问题 I have a utf-8 encoded csv file with Chinese text. When I tried to import as an h2o dataframe, the data is improperly displayed as gibberish. dataframe = h2o.import_file('test.csv') In the resulting dataframe, the column names are correct, but instead of Chinese text, it displays text like this: 在ç�¡è¦ºäº†ä½ 知é� I looked into h2o documentation and there doesn't seem to be any way to set an encoding option like in pandas when using import_file. Further, when running the following: testing

Reproduce predictions with MOJO file of a H2O GBM model

吃可爱长大的小学妹 提交于 2019-12-24 22:32:21
问题 I used H2O version 3.26.0.5 to train a GBM model in a binary problem, to predict the probability of positive class. I saved the model file as MOJO and used this file to generate predictions in new data: ## first, restart R session ## # load the model library(h2o) h2o.init(nthreads = -1) model <- h2o.import_mojo("path_to_mojo_file") # load the new data input input <- read_csv("path_to_new_data") input_h2o <- as.h2o(input) # predictions predictions <- predict(model, input_h2o) When I run this