h2o

线程协作工具之Semaphore、CountDownLatch、CyclicBarrier

点点圈 提交于 2019-12-20 15:26:58
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 各种线程协作工具 常见线程协作工具: 读写锁ReadWriteLock 信号量Semaphore 倒计时门栓CountDownLatch 循环栅栏CyclicBarrier 线程本地变量ThreadLocal 主要讲信号量Semaphore,倒计时门栓CountDownLatch, 循环栅栏CyclicBarrier 然后根据两个LeetCode题目来应用一下。 第一题: 三个不同的线程将会共用一个 Foo 实例。 线程 A 将会调用 one() 方法 线程 B 将会调用 two() 方法 线程 C 将会调用 three() 方法 请设计修改程序,以确保 two() 方法在 one() 方法之后被执行,three() 方法在 two() 方法之后被执行。 原生解法 应用场景及用法 基于notify/wait,所有的线程间通信类似通知的机制本质上都是notifyAll,多能用这个来实现。 class Foo { private static AtomicInteger flag = new AtomicInteger(0); private static Object Lock1 = new Object(); public Foo() { } public void first(Runnable

Using MOJOS in H2O Steam Prediction Service Builder

做~自己de王妃 提交于 2019-12-20 05:23:35
问题 In h2o 's documentation for the Steam Prediction Service Builder, here, it says that the service builder can compile both h2o pojo s (.java files) and mojo s (downloaded from h2o flow in my case as a .zip (version 3.10.5.2), which I have been using in the manner shown here). However, doing something like this: gives this error: Problem accessing /makewar. Reason: Compilation of pojo failed exit value 1 warning: [options] bootstrap class path not set in conjunction with -source 1.6 error:

How to directly plot ROC of h2o model object in R

半城伤御伤魂 提交于 2019-12-20 02:13:39
问题 My apologies if I'm missing something obvious. I've been thoroughly enjoying working with h2o in the last few days using R interface. I would like to evaluate my model, say a random forest, by plotting an ROC. The documentation seems to suggest that there is a straightforward way to do that: Interpreting a DRF Model By default, the following output displays: Model parameters (hidden) A graph of the scoring history (number of trees vs. training MSE) A graph of the ROC curve (TPR vs. FPR) A

Improve h2o DRF runtime on a multi-node cluster

大城市里の小女人 提交于 2019-12-19 10:51:07
问题 I am currently running h2o 's DRF algorithm an a 3-node EC2 cluster (the h2o server spans across all 3 nodes). My data set has 1m rows and 41 columns (40 predictors and 1 response). I use the R bindings to control the cluster and the RF call is as follows model=h2o.randomForest(x=x, y=y, ignore_const_cols=TRUE, training_frame=train_data, seed=1234, mtries=7, ntrees=2000, max_depth=15, min_rows=50, stopping_rounds=3, stopping_metric="MSE", stopping_tolerance=2e-5) For the 3-node cluster (c4

Implementing custom stopping metrics to optimize during training in H2O model directly from R

好久不见. 提交于 2019-12-18 16:59:35
问题 I'm trying to implement the FBeta_Score() of the MLmetrics R package: FBeta_Score <- function(y_true, y_pred, positive = NULL, beta = 1) { Confusion_DF <- ConfusionDF(y_pred, y_true) if (is.null(positive) == TRUE) positive <- as.character(Confusion_DF[1,1]) Precision <- Precision(y_true, y_pred, positive) Recall <- Recall(y_true, y_pred, positive) Fbeta_Score <- (1 + beta^2) * (Precision * Recall) / (beta^2 * Precision + Recall) return(Fbeta_Score) } in the H2O distributed random forest model

Error when starting h2o.init() in R

拈花ヽ惹草 提交于 2019-12-13 15:33:00
问题 I am getting an error when trying to start h2o. Running the following start-up commands: library(h2o) localH2O = h2o.init(ip = "localhost", port = 54321, startH2O = TRUE) Gives the following error: Error in system2(command, "-version", stdout = TRUE, stderr = TRUE) : '""' not found It's not particularly enlightning. Does anyone have a hint as to what is the problem? Java is installed on the system, but unlike the question here I do not get any Java warnings. Running system("java -version")

h2o Cluster total memory unexpectedly low

时光毁灭记忆、已成空白 提交于 2019-12-13 08:06:07
问题 I'm working on a remote server with 196 GB of ram but when I use h2o.init(nthreads = -1) it says that the total cluster memory is .96 GB. Furthermore, when I try to use max_mem_size = "2g" I get an error saying that the JVM could not be created. Now, the server is using a 32 bit Java version and I do not have admin access. What do I need to do to get more cluster memory? Thanks 回答1: Now, the server is using a 32 bit Java version and I do not have admin access. What do I need to do to get more

h2o deeplearning error when specifying nfolds for cross validation

回眸只為那壹抹淺笑 提交于 2019-12-13 05:01:10
问题 has this issue been resolved by now? I encounter the same error message. Usecase: I am doing binary classification using h2o's deeplearning() function. Below, I provide randomly generated data the same size as my actual usecase. System specs: # R version 3.3.2 (2016-10-31) # Platform: x86_64-w64-mingw32/x64 (64-bit) # Running under: Windows >= 8 x64 (build 9200) # h2o version h2o_3.20.0.2 I am currently learning how to use h2o, so I have played with that function quite a bit. Everything runs

How to visualize H2O Tree?

蓝咒 提交于 2019-12-13 04:27:05
问题 I have df data_categorical and a model model . I converted my df to h2o frame with data = h2o.H2OFrame(data_categorical) and trained my model with model = H2ORandomForestEstimator(ntrees=1, max_depth=20, nfolds=10) # Train model model.train(x=training_columns, y=response_column, training_frame=train) I'm trying to visualize the tree that is created (note that I only need one tree) but I can't seem to do that. I downloaded the mojo file with model.download_mojo(path,get_genmodel_jar=True) But

h2o model list dtypes for each feature

拈花ヽ惹草 提交于 2019-12-13 02:15:50
问题 Is there a way to list the expected data type for each feature for an existing h2o model, without looking at the training data? Similar to the output of h2o_frame.types, but without looking at the training data just looking at the model object. In this case I have a saved model file (the generic type that can be imported back into h2o, not mojo/pojo). The algorithm is gbm. 回答1: This functionality is not currently available in H2O, but I've created a jira ticket to request it as a new feature,