精华内容
下载资源
问答
  • H2O

    2013-03-20 11:47:29
    [img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/27.gif][/img] 喃们懂的
  • H2O聚会和演讲 联席会议的演示文稿也托管在。 请的加入我们! H2O World 2018 即将推出的演示文稿的链接。 H2O World 2017 加利福尼亚山景城 即将到来的演示文稿的链接。 H2O AutoML-路线图 MXNet深度学习简介 ...
  • h2o平台上的示例笔记本
  • h2o api java_h2o 准备

    2021-03-13 16:12:00
    然后你可以在R中使用install.packages(h2o) 进行安装h2o,之后就是library(h2o),然后初始化h2o平台h2o.init()你也可以在python中安装h2o:pip install - U h2oimport h2oh2o.init()做一个简短的开始h2o.init()irish2...

    首先,你需要下载R,下载python,之后还需要加载java。然后你可以在R中使用

    install.packages(h2o) 进行安装h2o,之后就是library(h2o),然后初始化h2o平台h2o.init()

    你也可以在python中安装h2o:

    pip install - U h2o

    import h2o

    h2o.init()

    做一个简短的开始

    h2o.init()

    irish2o % filter(Species !='setosa'))

    y

    x

    parts

    train

    test

    ----------------------------------------------------------------------

    Your next step is to start H2O:

    > h2o.init()

    For H2O package documentation, ask for help:

    > ??h2o

    After starting H2O, you can use the Web UI at http://localhost:54321

    For more information visit http://docs.h2o.ai

    ----------------------------------------------------------------------

    载入程辑包:‘h2o’

    The following objects are masked from ‘package:stats’:

    cor, sd, var

    The following objects are masked from ‘package:base’:

    &&, %*%, %in%, ||, apply, as.factor, as.numeric, colnames,

    colnames

    log, log10, log1p, log2, round, signif, trunc

    > h2o.init()

    H2O is not running yet, starting it now...

    Note: In case of errors look at the following log files:

    /var/folders/jz/qf7zhsc97f71slzzf59mvs2w0000gn/T//RtmpujsoRp/h2o_milin_started_from_r.out

    /var/folders/jz/qf7zhsc97f71slzzf59mvs2w0000gn/T//RtmpujsoRp/h2o_milin_started_from_r.err

    java version "10.0.1" 2018-04-17

    Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)

    Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

    Starting H2O JVM and connecting: ... Connection successful!

    R is connected to the H2O cluster:

    H2O cluster uptime: 3 seconds 560 milliseconds

    H2O cluster timezone: Asia/Shanghai

    H2O data parsing timezone: UTC

    H2O cluster version: 3.20.0.8

    H2O cluster version age: 1 month and 20 days

    H2O cluster name: H2O_started_from_R_milin_jhc047

    H2O cluster total nodes: 1

    H2O cluster total memory: 2.00 GB

    H2O cluster total cores: 4

    H2O cluster allowed cores: 4

    H2O cluster healthy: TRUE

    H2O Connection ip: localhost

    H2O Connection port: 54321

    H2O Connection proxy: NA

    H2O Internal Security: FALSE

    H2O API Extensions: XGBoost, Algos, AutoML, Core V3, Core V4

    R Version: R version 3.4.3 (2017-11-30)

    m

    |=============================================================| 100%

    > m

    Model Details:

    ==============

    H2OBinomialModel: drf

    Model ID: DRF_model_R_1541858573921_1

    Model Summary:

    number_of_trees number_of_internal_trees model_size_in_bytes

    1 50 50 6827

    min_depth max_depth mean_depth min_leaves max_leaves mean_leaves

    1 2 5 3.34000 3 10 5.88000

    H2OBinomialMetrics: drf

    ** Reported on training data. **

    ** Metrics reported on Out-Of-Bag training samples **

    MSE: 0.05615946

    RMSE: 0.2369799

    LogLoss: 0.2136178

    Mean Per-Class Error: 0.05441176

    AUC: 0.9779412

    Gini: 0.9558824

    Confusion Matrix (vertical: actual; across: predicted) for F1-optimal threshold:

    versicolor virginica Error Rate

    versicolor 38 2 0.050000 =2/40

    virginica 2 32 0.058824 =2/34

    Totals 40 34 0.054054 =4/74

    Maximum Metrics: Maximum metrics at their respective thresholds

    metric threshold value idx

    1 max f1 0.476190 0.941176 30

    2 max f2 0.260952 0.953757 33

    3 max f0point5 0.937500 0.966667 25

    4 max accuracy 0.476190 0.945946 30

    5 max precision 1.000000 1.000000 0

    6 max recall 0.004662 1.000000 49

    7 max specificity 1.000000 1.000000 0

    8 max absolute_mcc 0.476190 0.891176 30

    9 max min_per_class_accuracy 0.476190 0.941176 30

    10 max mean_per_class_accuracy 0.476190 0.945588 30

    Gains/Lift Table: Extract with `h2o.gainsLift(, )` or `h2o.gainsLift(, valid=, xval=)`

    > p

    |=============================================================| 100%

    > p

    predict versicolor virginica

    1 versicolor 0.9679487 0.032051282

    2 versicolor 0.8779487 0.122051282

    3 versicolor 0.9979487 0.002051282

    4 versicolor 0.9679487 0.032051282

    5 versicolor 0.9979487 0.002051282

    6 versicolor 0.9979487 0.002051282

    [26 rows x 3 columns]

    >

    performance Versus Predictions

    h2o.performance(m,test)

    H2OMultinomialMetrics: drf

    Test Set Metrics:

    =====================

    MSE: (Extract with `h2o.mse`) 0.08837984

    RMSE: (Extract with `h2o.rmse`) 0.2972875

    Logloss: (Extract with `h2o.logloss`) 0.2452472

    Mean Per-Class Error: 0.1623932

    Confusion Matrix: Extract with `h2o.confusionMatrix(, )`)

    =========================================================================

    Confusion Matrix: Row labels: Actual class; Column labels: Predicted class

    setosa versicolor virginica Error Rate

    setosa 6 0 0 0.0000 = 0 / 6

    versicolor 0 11 2 0.1538 = 2 / 13

    virginica 0 3 6 0.3333 = 3 / 9

    Totals 6 14 8 0.1786 = 5 / 28

    Hit Ratio Table: Extract with `h2o.hit_ratio_table(, )`

    =======================================================================

    Top-3 Hit Ratios:

    k hit_ratio

    1 1 0.821429

    2 2 1.000000

    3 3 1.000000

    >

    h2o flow

    h2o flow 是h2o 的一个网页的接口,你可以直接上传或者下载数据,你可以查看你所建立的所有模型,你可以直接的创建模型,也可以直接的进行预测。

    有几种方式打开h2o flow ,首先,第一种是在你的R或者python中初始化h2o,然后在你的网页打开:http://127.0.0.1:54321

    另外一种是你要在服务器部署h2o,然后打开

    1.Download H2O. This is a zip file that contains everything you need to get started.

    2.

    cd ~/Downloads

    unzip h2o-3.22.0.1.zip

    cd h2o-3.22.0.1

    java -jar h2o.jar

    3. Point your browser to [http://你的主机地址:54321]

    展开全文
  • nghttp2 h2o_H2O教程

    2020-09-21 08:52:51
    nghttp2 h2o H2O教程 (H2O Tutorial) PDF Version Quick Guide Resources Job Search Discussion PDF版本 快速指南 资源资源 求职 讨论区 H2O is an open source Machine Learning framework with full-...
    nghttp2 h2o

    nghttp2 h2o

    H2O Tutorial

    H2O教程 (H2O Tutorial)

    H2O is an open source Machine Learning framework with full-tested implementations of several widely-accepted ML algorithms. You just have to pick up the algorithm from its huge repository and apply it to your dataset. It contains the most widely used statistical and ML algorithms.

    H2O是一个开放源代码的机器学习框架,其中包含对几种广为接受的ML算法进行全面测试的实现。 您只需要从庞大的存储库中提取算法并将其应用于数据集即可。 它包含使用最广泛的统计和ML算法。

    H2O provides an easy-to-use open source platform for applying different ML algorithms on a given dataset. It provides several statistical and ML algorithms including deep learning.

    H2O提供了一个易于使用的开源平台,可以在给定的数据集上应用不同的ML算法。 它提供了包括深度学习在内的几种统计和ML算法。

    In this tutorial, we will consider examples and understand how to go about working with H2O.

    在本教程中,我们将考虑示例并了解如何使用H2O。

    听众 (Audience)

    This tutorial is designed to help all those learners who are aiming to develop a Machine Learning model on a huge database.

    本教程旨在帮助所有旨在在大型数据库上开发机器学习模型的学习者。

    先决条件 (Prerequisites)

    It is assumed that the learner has a basic understanding of Machine Learning and is familiar with Python.

    假定学习者对机器学习有基本的了解,并且熟悉Python。

    翻译自: https://www.tutorialspoint.com/h2o/index.htm

    nghttp2 h2o

    展开全文
  • h2o管理系统 从零架构,结构清晰,逻辑清晰 主要技术 vue@2.0 + vuex + vue路由器+ axios +元素+ scss + websocket 项目预览 连接文档 h2o商城移动端 h2o预设节点代码 私信 有任何问题或者技术可以找我沟通,加我QQ...
  • windows 安装h2o_H2O-安装

    2020-09-23 07:22:47
    windows 安装h2o H2O-安装 (H2O - Installation) Advertisements 广告 Previous Page 上一页 Next Page 下一页 H2O can be configured and used with five different options as listed below − ...
    windows 安装h2o

    windows 安装h2o

    H2O-安装 (H2O - Installation)

    H2O can be configured and used with five different options as listed below −

    可以配置H2O并使用以下五个不同的选项-

    • Install in Python

      在Python中安装

    • Install in R

      在R中安装

    • Web-based Flow GUI

      基于Web的Flow GUI

    • Hadoop

      Hadoop

    • Anaconda Cloud

      Python云

    In our subsequent sections, you will see the instructions for installation of H2O based on the options available. You are likely to use one of the options.

    在我们的后续章节中,您将根据可用选项查看安装H2O的说明。 您可能会使用其中一个选项。

    在Python中安装 (Install in Python)

    To run H2O with Python, the installation requires several dependencies. So let us start installing the minimum set of dependencies to run H2O.

    要使用Python运行H2O,安装需要几个依赖项。 因此,让我们开始安装最小的依赖关系集以运行H2O。

    安装依赖项 (Installing Dependencies)

    To install a dependency, execute the following pip command −

    要安装依赖项,请执行以下pip命令-

    
    $ pip install requests
    
    

    Open your console window and type the above command to install the requests package. The following screenshot shows the execution of the above command on our Mac machine −

    打开控制台窗口,然后键入以上命令以安装请求包。 以下屏幕截图显示了在Mac机器上执行上述命令的过程-

    Installing Dependencies

    After installing requests, you need to install three more packages as shown below −

    安装请求后,您需要再安装三个软件包,如下所示:

    
    $ pip install tabulate
    $ pip install "colorama >= 0.3.8"
    $ pip install future
    
    

    The most updated list of dependencies is available on H2O GitHub page. At the time of this writing, the following dependencies are listed on the page.

    H2O GitHub页面上提供了最新的依赖关系列表。 在撰写本文时,页面上列出了以下依赖项。

    
    python 2. H2O — Installation
    pip >= 9.0.1
    setuptools
    colorama >= 0.3.7
    future >= 0.15.2
    
    

    删除旧版本 (Removing Older Versions)

    After installing the above dependencies, you need to remove any existing H2O installation. To do so, run the following command −

    安装以上依赖项后,您需要删除所有现有的H2O安装。 为此,请运行以下命令-

    
    $ pip uninstall h2o
    
    

    安装最新版本 (Installing the Latest Version)

    Now, let us install the latest version of H2O using the following command −

    现在,让我们使用以下命令安装最新版本的H2O-

    
    $ pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o
    
    

    After successful installation, you should see the following message display on the screen −

    成功安装后,您应该在屏幕上看到以下消息显示-

    
    Installing collected packages: h2o
    Successfully installed h2o-3.26.0.1
    
    

    测试安装 (Testing the Installation)

    To test the installation, we will run one of the sample applications provided in the H2O installation. First start the Python prompt by typing the following command −

    为了测试安装,我们将运行H2O安装中提供的示例应用程序之一。 首先通过键入以下命令来启动Python提示符-

    
    $ Python3
    
    

    Once the Python interpreter starts, type the following Python statement on the Python command prompt −

    Python解释器启动后,在Python命令提示符下键入以下Python语句-

    
    >>>import h2o
    
    

    The above command imports the H2O package in your program. Next, initialize the H2O system using the following command −

    上面的命令将H2O软件包导入程序中。 接下来,使用以下命令初始化H2O系统-

    
    >>>h2o.init()
    
    

    Your screen would show the cluster information and should look the following at this stage −

    您的屏幕将显示集群信息,并且在此阶段应显示以下内容:

    Testing Installation

    Now, you are ready to run the sample code. Type the following command on the Python prompt and execute it.

    现在,您可以运行示例代码了。 在Python提示符下键入以下命令并执行它。

    
    >>>h2o.demo("glm")
    
    

    The demo consists of a Python notebook with a series of commands. After executing each command, its output is shown immediately on the screen and you will be asked to hit the key to continue with the next step. The partial screenshot on executing the last statement in the notebook is shown here −

    该演示由一个带有一系列命令的Python笔记本组成。 执行完每个命令后,其输出将立即显示在屏幕上,并且将要求您按一下键以继续下一步。 在此处显示有关在笔记本中执行最后一条语句的部分屏幕截图-

    Python notebook

    At this stage your Python installation is complete and you are ready for your own experimentation.

    在这一阶段,您的Python安装已完成,并且可以进行自己的实验了。

    在R中安装 (Install in R)

    Installing H2O for R development is very much similar to installing it for Python, except that you would be using R prompt for the installation.

    为R开发安装H2O与为Python安装非常相似,除了您将使用R提示符进行安装。

    启动R Console (Starting R Console)

    Start R console by clicking on the R application icon on your machine. The console screen would appear as shown in the following screenshot −

    通过单击计算机上的R应用程序图标来启动R控制台。 控制台屏幕将出现,如以下屏幕截图所示-

    Starting R Console

    Your H2O installation would be done on the above R prompt. If you prefer using RStudio, type the commands in the R console subwindow.

    您的H2O安装将在上述R提示符下完成。 如果您更喜欢使用RStudio,请在R控制台子窗口中键入命令。

    删除旧版本 (Removing Older Versions)

    To begin with, remove older versions using the following command on the R prompt −

    首先,在R提示符下使用以下命令删除旧版本-

    
    > if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
    > if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
    
    

    下载依赖项 (Downloading Dependencies)

    Download the dependencies for H2O using the following code −

    使用以下代码下载H2O的依赖关系-

    
    > pkgs <- c("RCurl","jsonlite")
    for (pkg in pkgs) {
       if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
    }
    
    

    安装水 (Installing H2O)

    Install H2O by typing the following command on the R prompt −

    通过在R提示符下键入以下命令来安装H2O-

    
    > install.packages("h2o", type = "source", repos = (c("http://h2o-release.s3.amazonaws.com/h2o/latest_stable_R")))
    
    

    The following screenshot shows the expected output −

    以下屏幕截图显示了预期的输出-

    Installing H2O

    There is another way of installing H2O in R.

    还有另一种在R中安装H2O的方法。

    从CRAN在R中安装 (Install in R from CRAN)

    To install R from CRAN, use the following command on R prompt −

    要从CRAN安装R,请在R提示符下使用以下命令-

    
    > install.packages("h2o")
    
    

    You will be asked to select the mirror −

    您将被要求选择镜子-

    
    --- Please select a CRAN mirror for use in this session ---
    
    
    Install CRAN

    A dialog box displaying the list of mirror sites is shown on your screen. Select the nearest location or the mirror of your choice.

    屏幕上会显示一个对话框,其中显示了镜像站点列表。 选择最近的位置或您选择的镜子。

    测试安装 (Testing Installation)

    On the R prompt, type and run the following code −

    在R提示符下,键入并运行以下代码-

    
    > library(h2o)
    > localH2O = h2o.init()
    > demo(h2o.kmeans)
    
    

    The output generated will be as shown in the following screenshot −

    生成的输出将如以下屏幕截图所示-

    Prompt Type

    Your H2O installation in R is complete now.

    R中的H2O安装现已完成。

    安装Web GUI流 (Installing Web GUI Flow)

    To install GUI Flow download the installation file from the H20 site. Unzip the downloaded file in your preferred folder. Note the presence of h2o.jar file in the installation. Run this file in a command window using the following command −

    要安装GUI Flow,请从H20站点下载安装文件。 将下载的文件解压缩到您的首选文件夹中。 请注意在安装中存在h2o.jar文件。 使用以下命令在命令窗口中运行此文件-

    
    $ java -jar h2o.jar
    
    

    After a while, the following will appear in your console window.

    一段时间后,以下内容将出现在控制台窗口中。

    
    07-24 16:06:37.304 192.168.1.18:54321 3294 main INFO: H2O started in 7725ms
    07-24 16:06:37.304 192.168.1.18:54321 3294 main INFO:
    07-24 16:06:37.305 192.168.1.18:54321 3294 main INFO: Open H2O Flow in your web browser: http://192.168.1.18:54321
    07-24 16:06:37.305 192.168.1.18:54321 3294 main INFO:
    
    

    To start the Flow, open the given URL http://localhost:54321 in your browser. The following screen will appear −

    要启动流,请在浏览器中打开给定的URL http:// localhost:54321 。 将出现以下屏幕-

    Web GUI Flow

    At this stage, your Flow installation is complete.

    至此,您的Flow安装完成。

    在Hadoop / Anaconda Cloud上安装 (Install on Hadoop / Anaconda Cloud)

    Unless you are a seasoned developer, you would not think of using H2O on Big Data. It is sufficient to say here that H2O models run efficiently on huge databases of several terabytes. If your data is on your Hadoop installation or in the Cloud, follow the steps given on H2O site to install it for your respective database.

    除非您是经验丰富的开发人员,否则您不会考虑在大数据上使用H2O。 在这里足以说H2O模型可以在数TB的大型数据库上高效运行。 如果您的数据在Hadoop安装中或在Cloud中,请按照H2O站点上给出的步骤为各自的数据库安装数据。

    Now that you have successfully installed and tested H2O on your machine, you are ready for real development. First, we will see the development from a Command prompt. In our subsequent lessons, we will learn how to do model testing in H2O Flow.

    既然您已经在计算机上成功安装并测试了H2O,那么就可以进行实际开发了。 首先,我们将在Command提示符下看到开发情况。 在接下来的课程中,我们将学习如何在H2O Flow中进行模型测试。

    在命令提示符下进行开发 (Developing in Command Prompt)

    Let us now consider using H2O to classify plants of the well-known iris dataset that is freely available for developing Machine Learning applications.

    现在让我们考虑使用H2O对可免费用于开发机器学习应用程序的著名虹膜数据集的植物进行分类。

    Start the Python interpreter by typing the following command in your shell window −

    通过在您的shell窗口中键入以下命令来启动Python解释器-

    
    $ Python3
    
    

    This starts the Python interpreter. Import h2o platform using the following command −

    这将启动Python解释器。 使用以下命令导入h2o平台-

    
    >>> import h2o
    
    

    We will use Random Forest algorithm for classification. This is provided in the H2ORandomForestEstimator package. We import this package using the import statement as follows −

    我们将使用随机森林算法进行分类。 这在H2ORandomForestEstimator包中提供。 我们使用import语句如下导入这个包:

    
    >>> from h2o.estimators import H2ORandomForestEstimator
    
    

    We initialize the H2o environment by calling its init method.

    我们通过调用其init方法来初始化H2o环境。

    
    >>> h2o.init()
    
    

    On successful initialization, you should see the following message on the console along with the cluster information.

    成功初始化后,您应该在控制台上看到以下消息以及集群信息。

    
    Checking whether there is an H2O instance running at http://localhost:54321 . connected.
    
    

    Now, we will import the iris data using the import_file method in H2O.

    现在,我们将在H2O中使用import_file方法导入虹膜数据。

    
    >>> data = h2o.import_file('iris.csv')
    
    

    The progress will display as shown in the following screenshot −

    进度将显示,如以下屏幕截图所示-

    Developing Command Prompt

    After the file is loaded in the memory, you can verify this by displaying the first 10 rows of the loaded table. You use the head method to do so −

    将文件加载到内存中后,您可以通过显示已加载表的前10行来验证这一点。 您使用head方法这样做-

    
    >>> data.head()
    
    

    You will see the following output in tabular format.

    您将以表格格式看到以下输出。

    tabular format

    The table also displays the column names. We will use the first four columns as the features for our ML algorithm and the last column class as the predicted output. We specify this in the call to our ML algorithm by first creating the following two variables.

    该表还显示列名。 我们将使用前四列作为ML算法的功能,并使用最后一列类作为预测的输出。 通过首先创建以下两个变量,我们在ML算法的调用中指定了这一点。

    
    >>> features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
    >>> output = 'class'
    
    

    Next, we split the data into training and testing by calling the split_frame method.

    接下来,我们通过调用split_frame方法将数据分为训练和测试。

    
    >>> train, test = data.split_frame(ratios = [0.8])
    
    

    The data is split in the 80:20 ratio. We use 80% data for training and 20% for testing.

    数据以80:20的比例分割。 我们将80%的数据用于培训,将20%的数据用于测试。

    Now, we load the built-in Random Forest model into the system.

    现在,我们将内置的随机森林模型加载到系统中。

    
    >>> model = H2ORandomForestEstimator(ntrees = 50, max_depth = 20, nfolds = 10)
    
    

    In the above call, we set the number of trees to 50, the maximum depth for the tree to 20 and number of folds for cross validation to 10. We now need to train the model. We do so by calling the train method as follows −

    在上面的调用中,我们将树的数量设置为50,将树的最大深度设置为20,将交叉验证的折叠数设置为10。现在,我们需要训练模型。 我们通过如下调用train方法来做到这一点-

    
    >>> model.train(x = features, y = output, training_frame = train)
    
    

    The train method receives the features and the output that we created earlier as first two parameters. The training dataset is set to train, which is the 80% of our full dataset. During training, you will see the progress as shown here −

    训练方法接收特征和我们之前创建的输出作为前两个参数。 训练数据集设置为训练,这是我们完整数据集的80%。 在训练期间,您将看到如下所示的进度-

    Now, as the model building process is over, it is time to test the model. We do this by calling the model_performance method on the trained model object.

    现在,随着模型构建过程的结束,是时候测试模型了。 我们通过在训练好的模型对象上调用model_performance方法来实现。

    
    >>> performance = model.model_performance(test_data=test)
    
    

    In the above method call, we sent test data as our parameter.

    在上述方法调用中,我们发送了测试数据作为参数。

    It is time now to see the output, which is the performance of our model. You do this by simply printing the performance.

    现在是时候看到输出了,这是我们模型的性能。 您可以通过简单地打印演奏来做到这一点。

    
    >>> print (performance)
    
    

    This will give you the following output −

    这将为您提供以下输出-

    Model Building Process

    The output shows the Mean Square Error (MSE), Root Mean Square Error (RMSE), LogLoss and even the Confusion Matrix.

    输出显示均方误差(MSE),均方根误差(RMSE),LogLoss甚至混淆矩阵。

    在Jupyter中运行 (Running in Jupyter)

    We have seen the execution from the command and also understood the purpose of each line of code. You may run the entire code in a Jupyter environment, either line by line or the whole program at a time. The complete listing is given here −

    我们已经从命令中看到了执行过程,并且也了解了每一行代码的用途。 您可以在Jupyter环境中逐行或一次运行整个程序来运行整个代码。 完整的清单在这里给出-

    
    import h2o
    from h2o.estimators import H2ORandomForestEstimator
    h2o.init()
    data = h2o.import_file('iris.csv')
    features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
    output = 'class'
    train, test = data.split_frame(ratios=[0.8])
    model = H2ORandomForestEstimator(ntrees = 50, max_depth = 20, nfolds = 10)
    model.train(x = features, y = output, training_frame = train)
    performance = model.model_performance(test_data=test)
    print (performance)
    
    

    Run the code and observe the output. You can now appreciate how easy it is to apply and test a Random Forest algorithm on your dataset. The power of H20 goes far beyond this capability. What if you want to try another model on the same dataset to see if you can get better performance. This is explained in our subsequent section.

    运行代码并观察输出。 现在,您可以了解在数据集上应用和测试随机森林算法有多么容易。 H20的功能远远超出了此功能。 如果要在同一数据集上尝试另一个模型,看看是否可以获得更好的性能该怎么办。 这将在我们的后续部分中进行解释。

    应用不同的算法 (Applying a Different Algorithm)

    Now, we will learn how to apply a Gradient Boosting algorithm to our earlier dataset to see how it performs. In the above full listing, you will need to make only two minor changes as highlighted in the code below −

    现在,我们将学习如何将梯度增强算法应用于我们之前的数据集,以了解其性能。 在上面的完整清单中,您只需要进行两个较小的更改,如下面的代码中突出显示的那样:

    
    import h2o 
    from h2o.estimators import H2OGradientBoostingEstimator
    h2o.init()
    data = h2o.import_file('iris.csv')
    features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
    output = 'class'
    train, test = data.split_frame(ratios = [0.8]) 
    model = H2OGradientBoostingEstimator
    (ntrees = 50, max_depth = 20, nfolds = 10)
    model.train(x = features, y = output, training_frame = train)
    performance = model.model_performance(test_data = test)
    print (performance)
    
    

    Run the code and you will get the following output −

    运行代码,您将获得以下输出-

    Different Algorithm

    Just compare the results like MSE, RMSE, Confusion Matrix, etc. with the previous output and decide on which one to use for production deployment. As a matter of fact, you can apply several different algorithms to decide on the best one that meets your purpose.

    只需将MSE,RMSE,Confusion Matrix等结果与之前的输出进行比较,然后决定使用哪一个进行生产部署即可。 实际上,您可以应用几种不同的算法来确定最适合您目的的算法。

    翻译自: https://www.tutorialspoint.com/h2o/h2o_installation.htm

    windows 安装h2o

    展开全文
  • h2o java_h2o steam

    2021-03-17 14:52:10
    steam工具主要包括两个功能war的生成服务的管理war的生成h2o主要是java 开发,最终的模型文件也是一个java文件,所以模型上线的方式是以服务的方式.可以部署在tomcat,jetty等容器中.当然模型的java文件也可以嵌入到...

    steam工具主要包括两个功能

    war的生成

    服务的管理

    war的生成

    h2o主要是java 开发,最终的模型文件也是一个java文件,所以模型上线的方式是以服务的方式.可以部署在tomcat,jetty等容器中.

    当然模型的java文件也可以嵌入到自己的项目中,实现stream方式的线上打分.比如放到flink或者storm中.

    war的生成需要启动另外一个服务(打包服务),在下载的文件中有一个ROOT.war的文件.这个打包的war部署在容器中,默认端口是55000,服务界面如下,注意到左侧是可以上传预处理逻辑的python文件或者java文件.右侧中的pojo文件和h2o jar,是必须的,pojo是你离线训练的模型.h2o jar 中在你官网下载的文件包中就存在的.

    c158c4826c5d

    image.png

    以为一种就是不使用web界面,而是命令行的方式.需要的参数和web界面上看到的一样.

    curl -X POST \

    --form pojo=@gbm_cf6fdeef_cad1_4e85_b644_6358166076ca.java \

    --form jar=@lib/h2o-genmodel.jar \

    --form prejar=@pre.jar \

    --form preclass=PreProcess \

    localhost:55000/makewar > example.war

    服务的管理

    由于协议问题,服务稳定性问题等等,建议不使用steam的服务管理.通过编写docker file 完成自动的docker 容器部署方式实现ha ,负载等

    问题

    生成的war包没有日志的输出,每次需要自己将log4j配置进去.通过看源码增加上了日志的输出.

    1,git clone https://github.com/h2oai/steam

    2,cd prediction-service-builder

    3,增加 log4j.jar 和 slf4j-log4j12.jar到lib文件夹中,如下图

    4,在WEB-INF中增加log4j.property的配置文件

    c158c4826c5d

    image.png

    5,./gradlew build 打包生成ROOT.war文件.

    总结

    使用起来比较方便,通过HttpServlet的方式将模型发布成restful 接口的形式.将预处理逻辑和模型巧妙的结合在一起.提供一个完整的在线打分模式.

    使用python做预处理的使用,由于是python进程和jvm进程两个进程,需要过多的socket通信(服务启动后,会通过ProcessBuilder 新建一个python的子进程.),对于时效性要求比较高的场景,直接使用java做预处理比较好.

    展开全文
  • h2o api java_H2O框架简介

    2021-03-13 16:12:57
    H2O框架简介H2O是开源的,分布式的,基于内存的,可扩展的机器学习和预测分析框架,适合在企业环境中构建大规模机器学习模型。H2O核心代码使用Java编写,数据和模型通过分布式 Key/Value 存储在各个集群节点的内存中...
  • Modeltime H2O为Modeltime预测生态系统提供了H2O后端。 主要算法是H2O AutoML ,它是为速度和规模而构建的自动机器学习库。 # Install Development Version devtools :: install_github( " business-science/model...
  • H2O教程 本文档包含有关H2O-3的教程和培训材料。 如果您发现教程代码有任何问题,请在此存储库中打开一个问题。 对于一般的H2O问题,请发布到或加入以解决不适合Stack Overflow格式的问题。 在Github中查找教程资料...
  • 包含5个Mn离子的夹心型锑钨酸盐Na2[Mn2(H2O)10{Mn(H2O)3}2Mn(H2O)2W(H2O)2(B-β-SbW9O33)2]•9H2O•2HTMA的合成,表征及结构分析,陈宝旺,陈维林,本文,采用常规方法合成了新颖的多钨氧酸盐化合物Na2[Mn2(H2O)10{...
  • h2o automl_H2O-AutoML

    2020-09-23 08:02:31
    h2o automl H2O-AutoML (H2O - AutoML) Advertisements 广告 Previous Page 上一页 Next Page 下一页 To use AutoML, start a new Jupyter notebook and follow the steps shown below. 要使用Auto...
  • h2o tracking tkt

    2020-12-25 23:48:54
    <div><p>this was taken from h2o the webserver but I've seen these tmp folders not get created with other apps too - i work around it for now just by creating the tmp dir <pre><code> eyberg:~/h2/...
  • Machine_Learning_R_h2o:机器学习脚本,可用于生态学h2o
  • H2O 生成

    2020-08-07 16:13:48
    H2O 生成 下面这道题真的难到我了,看了解析后是用信号量机制去做了,看了半天看明白(平时没写过信号量????) 下面的信号量机制保证了O和H在资源获取不到时,去获取资源,在资源释放不掉时,就去释放资源 h....
  • H2O 网址

    2018-07-05 18:48:00
    使用pysparking的一个例子 http://docs.h2o.ai/h2o-tutorials/latest-stable/tutorials/sparkling-water/index.html ===================== 下载pysparkhttps://pypi.org/project/pyspark/ ================== ...
  • H2O-流量

    2020-09-23 08:22:45
    H2O-流量 (H2O - Flow) Advertisements 广告 Previous Page 上一页 Next Page 下一页 In the last lesson, you learned to create H2O based ML models using command line interface. H2O Flow ...
  • 加州圣何塞--(美国商业资讯)--H2O.ai宣布推出H2O AI混合云(H2O AI Hybrid Cloud),一种端到端人工智能平台,使企业能够快速构建、共享和使用人工智能模型及应用。 H2O人工智能混合云是一款全新的创新平台,可以...
  • anaconda安装h2o

    2019-01-22 14:38:38
    conda install h2o h2o-py
  • awesome-h2o:使用H2O机器学习平台构建的研究,应用和项目的精选清单
  • <div><p>One of the points it was discussed when it was decided to develop the h2o4gpu R API through RStudio's reticulate R package was to provide a function for installing the python environment ...
  • H2O-优化的HTTP服务器,支持HTTP / 1.x,HTTP / 2和HTTP / 3(实验性) 版权所有(C)2014-2019 ,,,, , ,,杰夫Marrison酒店,, ,, ,, ,,, ,,, , ,,,, H2O是新一代HTTP服务器。 与上一代的...
  • <div><p>Removed support for 1.5 due to #774 . Now fails with an ...<p>Updated h2o version. <p>Fixed test script.</p><p>该提问来源于开源项目:GoogleCloudDataproc/initialization-actions</p></div>
  • H2O支持中文

    2021-04-21 17:19:15
    H2O支持中文 原生H2O不支持中文参数说明,将后端中文返回前端页面显示过程中,显示乱码。H2O内置jetty容器处理前端发出的请求,修改jetty的配置文件使用utf-8作为编码方式。修改前端页面显示乱码的问题,添加charset...
  • Add h2o.

    2021-01-11 16:32:36
    </li><li>upstream <a href="https://github.com/h2o/h2o/issues/1977">contacted</a></li>[x] does it fit into one of the common categories? ("service", "language stack", "base ...
  • Mydocker-r-h2o-源码

    2021-03-31 15:32:35
    docker-r-h2o 消息 更新到R版本3.6.2 描述 用于在容器中运行任何R程序/脚本的图像模板 使用本课程了解如何了解此存储库 细节 -从rocker / r-base开始-包括Java-添加了包括h2o在内的几个软件包 用法 拉或建容器 拉 ...
  • H2O-简介

    2020-09-23 07:33:03
    H2O-简介 (H2O - Introduction) Advertisements 广告 Previous Page 上一页 Next Page 下一页 Have you ever been asked to develop a Machine Learning model on a huge database? Typically, the ...
  • H2O框架简介

    2019-06-12 12:21:00
    H2O框架简介H2O是开源的,分布式的,基于内存的,可扩展的机器学习和预测分析框架,适合在企业环境中构建大规模机器学习模型。 H2O核心代码使用Java编写,数据和模型通过分布式 Key/Value 存储在各个集群节点的内存...
  • 新鲜的H2O-101-源码

    2021-02-23 05:46:39
    新鲜的H2O-101

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,130
精华内容 852
热门标签
关键字:

h2o