1.官网下载最新稳定版,https://www.h2o.ai/download/ ,如果点击下载无反应,请使用ie浏览器

2.解压h2o-3.18.0.10.zip到目录h2o-3.18.0.10

3.执行命令

cd h2o-3.18.0.10
java -jar h2o.jar -name clusterName

选项参考http://docs.h2o.ai/h2o/latest-stable/h2o-docs/starting-h2o.html#h2o-options

[root@eureka- h2o-3.18.0.10]# java -jar h2o.jar -name clusterName
- ::43.010 192.168.0.80: main INFO: Found XGBoost backend with library: xgboost4j_gpu
- ::43.020 192.168.0.80: main INFO: XGBoost supported backends: [WITH_GPU, WITH_OMP]
- ::43.020 192.168.0.80: main INFO: ----- H2O started -----
- ::43.020 192.168.0.80: main INFO: Build git branch: rel-wolpert
- ::43.020 192.168.0.80: main INFO: Build git hash: b26ef10d0f1b4dd26b8227c1672ee47e0e893fec
- ::43.020 192.168.0.80: main INFO: Build git describe: jenkins-3.18.0.9--gb26ef10
- ::43.021 192.168.0.80: main INFO: Build age: days, hours and minutes
- ::43.021 192.168.0.80: main INFO: Built by: 'jenkins'
- ::43.021 192.168.0.80: main INFO: Built on: '2018-05-22 08:13:35'
- ::43.021 192.168.0.80: main INFO: Watchdog Build git branch: (unknown)
- ::43.021 192.168.0.80: main INFO: Watchdog Build git hash: (unknown)
- ::43.021 192.168.0.80: main INFO: Watchdog Build git describe: (unknown)
- ::43.021 192.168.0.80: main INFO: Watchdog Build project version: (unknown)
- ::43.021 192.168.0.80: main INFO: Watchdog Built by: (unknown)
- ::43.021 192.168.0.80: main INFO: Watchdog Built on: (unknown)
- ::43.021 192.168.0.80: main INFO: XGBoost Build git branch: (unknown)
- ::43.022 192.168.0.80: main INFO: XGBoost Build git hash: (unknown)
- ::43.022 192.168.0.80: main INFO: XGBoost Build git describe: (unknown)
- ::43.022 192.168.0.80: main INFO: XGBoost Build project version: (unknown)
- ::43.022 192.168.0.80: main INFO: XGBoost Built by: (unknown)
- ::43.022 192.168.0.80: main INFO: XGBoost Built on: (unknown)
- ::43.022 192.168.0.80: main INFO: KrbStandalone Build git branch: (unknown)
- ::43.022 192.168.0.80: main INFO: KrbStandalone Build git hash: (unknown)
- ::43.022 192.168.0.80: main INFO: KrbStandalone Build git describe: (unknown)
- ::43.022 192.168.0.80: main INFO: KrbStandalone Build project version: (unknown)
- ::43.022 192.168.0.80: main INFO: KrbStandalone Built by: (unknown)
- ::43.023 192.168.0.80: main INFO: KrbStandalone Built on: (unknown)
- ::43.023 192.168.0.80: main INFO: Processed H2O arguments: [-name, clusterName]
- ::43.023 192.168.0.80: main INFO: Java availableProcessors:
- ::43.023 192.168.0.80: main INFO: Java heap totalMemory: 964.5 MB
- ::43.023 192.168.0.80: main INFO: Java heap maxMemory: 13.95 GB
- ::43.023 192.168.0.80: main INFO: Java version: Java 1.8.0_121 (from Oracle Corporation)
- ::43.023 192.168.0.80: main INFO: JVM launch parameters: []
- ::43.023 192.168.0.80: main INFO: OS version: Linux 3.10.-.el7.x86_64 (amd64)
- ::43.023 192.168.0.80: main INFO: Machine physical memory: 62.76 GB
- ::43.023 192.168.0.80: main INFO: X-h2o-cluster-id:
- ::43.023 192.168.0.80: main INFO: User name: 'root'
- ::43.023 192.168.0.80: main INFO: IPv6 stack selected: false
- ::43.024 192.168.0.80: main INFO: Possible IP Address: ens160 (ens160), fe80::::df23:d65d:4aa8:62f5%ens160
- ::43.024 192.168.0.80: main INFO: Possible IP Address: ens160 (ens160), 192.168.0.80
- ::43.024 192.168.0.80: main INFO: Possible IP Address: lo (lo), :::::::%lo
- ::43.024 192.168.0.80: main INFO: Possible IP Address: lo (lo), 127.0.0.1
- ::43.024 192.168.0.80: main INFO: H2O node running in unencrypted mode.
- ::43.026 192.168.0.80: main INFO: Internal communication uses port:
- ::43.026 192.168.0.80: main INFO: Listening for HTTP and REST traffic on http://192.168.0.80:54321/
- ::43.027 192.168.0.80: main INFO: H2O cloud name: 'clusterName' on /192.168.0.80:, static configuration based on -flatfile null
- ::43.027 192.168.0.80: main INFO: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port ):
- ::43.027 192.168.0.80: main INFO: . Open a terminal and run 'ssh -L 55555:localhost:54321 [email protected]'
- ::43.027 192.168.0.80: main INFO: . Point your browser to http://localhost:55555
- ::43.735 192.168.0.80: main INFO: Log dir: '/tmp/h2o-root/h2ologs'
- ::43.736 192.168.0.80: main INFO: Cur dir: '/opt/software/h2o-3.18.0.10'
- ::43.740 192.168.0.80: main INFO: HDFS subsystem successfully initialized
- ::43.743 192.168.0.80: main INFO: S3 subsystem successfully initialized
- ::43.743 192.168.0.80: main INFO: Flow dir: '/root/h2oflows'
- ::43.757 192.168.0.80: main INFO: Cloud of size formed [/192.168.0.80:]
- ::43.770 192.168.0.80: main INFO: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV]
- ::43.770 192.168.0.80: main INFO: Watchdog extension initialized
- ::43.770 192.168.0.80: main INFO: XGBoost extension initialized
- ::43.770 192.168.0.80: main INFO: KrbStandalone extension initialized
- ::43.770 192.168.0.80: main INFO: Registered core extensions in: 256ms
- ::43.770 192.168.0.80: main INFO: Registered H2O core extensions: [Watchdog, XGBoost, KrbStandalone]
- ::44.035 192.168.0.80: main INFO: Registered: REST APIs in: 264ms
- ::44.035 192.168.0.80: main INFO: Registered REST API extensions: [XGBoost, Algos, AutoML, Core V3, Core V4]
- ::44.149 192.168.0.80: main INFO: Registered: schemas in 113ms
- ::44.150 192.168.0.80: main INFO: H2O started in 1691ms
- ::44.150 192.168.0.80: main INFO:
- ::44.150 192.168.0.80: main INFO: Open H2O Flow in your web browser: http://192.168.0.80:54321
- ::44.150 192.168.0.80: main INFO:

4.找另一台机器或者重新打开一个shell命令窗口,再次输入命令

java -jar h2o.jar -name clusterName

会自动根据-name选项查找存在的集群

- ::22.648 192.168.0.166:     main      INFO: Found XGBoost backend with library: xgboost4j_gpu
- ::22.661 192.168.0.166: main INFO: XGBoost supported backends: [WITH_GPU, WITH_OMP]
- ::22.661 192.168.0.166: main INFO: ----- H2O started -----
- ::22.661 192.168.0.166: main INFO: Build git branch: rel-wolpert
- ::22.661 192.168.0.166: main INFO: Build git hash: b26ef10d0f1b4dd26b8227c1672ee47e0e893fec
- ::22.661 192.168.0.166: main INFO: Build git describe: jenkins-3.18.0.9--gb26ef10
- ::22.661 192.168.0.166: main INFO: Build age: days, hours and minutes
- ::22.661 192.168.0.166: main INFO: Built by: 'jenkins'
- ::22.662 192.168.0.166: main INFO: Built on: '2018-05-22 08:13:35'
- ::22.662 192.168.0.166: main INFO: Watchdog Build git branch: (unknown)
- ::22.662 192.168.0.166: main INFO: Watchdog Build git hash: (unknown)
- ::22.662 192.168.0.166: main INFO: Watchdog Build git describe: (unknown)
- ::22.662 192.168.0.166: main INFO: Watchdog Build project version: (unknown)
- ::22.662 192.168.0.166: main INFO: Watchdog Built by: (unknown)
- ::22.662 192.168.0.166: main INFO: Watchdog Built on: (unknown)
- ::22.662 192.168.0.166: main INFO: XGBoost Build git branch: (unknown)
- ::22.662 192.168.0.166: main INFO: XGBoost Build git hash: (unknown)
- ::22.663 192.168.0.166: main INFO: XGBoost Build git describe: (unknown)
- ::22.663 192.168.0.166: main INFO: XGBoost Build project version: (unknown)
- ::22.663 192.168.0.166: main INFO: XGBoost Built by: (unknown)
- ::22.663 192.168.0.166: main INFO: XGBoost Built on: (unknown)
- ::22.663 192.168.0.166: main INFO: KrbStandalone Build git branch: (unknown)
- ::22.663 192.168.0.166: main INFO: KrbStandalone Build git hash: (unknown)
- ::22.663 192.168.0.166: main INFO: KrbStandalone Build git describe: (unknown)
- ::22.663 192.168.0.166: main INFO: KrbStandalone Build project version: (unknown)
- ::22.663 192.168.0.166: main INFO: KrbStandalone Built by: (unknown)
- ::22.664 192.168.0.166: main INFO: KrbStandalone Built on: (unknown)
- ::22.664 192.168.0.166: main INFO: Processed H2O arguments: [-name, clusterName]
- ::22.664 192.168.0.166: main INFO: Java availableProcessors:
- ::22.664 192.168.0.166: main INFO: Java heap totalMemory: 88.5 MB
- ::22.664 192.168.0.166: main INFO: Java heap maxMemory: 1.27 GB
- ::22.664 192.168.0.166: main INFO: Java version: Java 1.8.0_77 (from Oracle Corporation)
- ::22.664 192.168.0.166: main INFO: JVM launch parameters: []
- ::22.664 192.168.0.166: main INFO: OS version: Linux 2.6.-.el6.x86_64 (amd64)
- ::22.664 192.168.0.166: main INFO: Machine physical memory: 5.72 GB
- ::22.665 192.168.0.166: main INFO: X-h2o-cluster-id:
- ::22.665 192.168.0.166: main INFO: User name: 'root'
- ::22.665 192.168.0.166: main INFO: IPv6 stack selected: false
- ::22.665 192.168.0.166: main INFO: Possible IP Address: eth1 (eth1), fe80::::20c:29ff:fe29:d906%eth1
- ::22.665 192.168.0.166: main INFO: Possible IP Address: eth1 (eth1), 192.168.0.166
- ::22.665 192.168.0.166: main INFO: Possible IP Address: lo (lo), :::::::%lo
- ::22.665 192.168.0.166: main INFO: Possible IP Address: lo (lo), 127.0.0.1
- ::22.665 192.168.0.166: main INFO: H2O node running in unencrypted mode.
- ::22.668 192.168.0.166: main INFO: Internal communication uses port:
- ::22.668 192.168.0.166: main INFO: Listening for HTTP and REST traffic on http://192.168.0.166:54323/
- ::22.669 192.168.0.166: main INFO: H2O cloud name: 'clusterName' on /192.168.0.166:, static configuration based on -flatfile null
- ::22.669 192.168.0.166: main INFO: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port ):
- ::22.669 192.168.0.166: main INFO: . Open a terminal and run 'ssh -L 55555:localhost:54323 [email protected]'
- ::22.669 192.168.0.166: main INFO: . Point your browser to http://localhost:55555
- ::23.457 192.168.0.166: main INFO: Log dir: '/tmp/h2o-root/h2ologs'
- ::23.458 192.168.0.166: main INFO: Cur dir: '/opt/software'
- ::23.462 192.168.0.166: main INFO: HDFS subsystem successfully initialized
- ::23.466 192.168.0.166: main INFO: S3 subsystem successfully initialized
- ::23.466 192.168.0.166: main INFO: Flow dir: '/root/h2oflows'
- ::23.481 192.168.0.166: main INFO: Cloud of size formed [/192.168.0.166:]
- ::23.518 192.168.0.166: main INFO: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV]
- ::23.519 192.168.0.166: main INFO: Watchdog extension initialized
- ::23.519 192.168.0.166: main INFO: XGBoost extension initialized
- ::23.519 192.168.0.166: main INFO: KrbStandalone extension initialized
- ::23.519 192.168.0.166: main INFO: Registered core extensions in: 269ms
- ::23.519 192.168.0.166: main INFO: Registered H2O core extensions: [Watchdog, XGBoost, KrbStandalone]
- ::23.972 192.168.0.166: main INFO: Registered: REST APIs in: 452ms
- ::23.980 192.168.0.166: main INFO: Registered REST API extensions: [XGBoost, Algos, AutoML, Core V3, Core V4]
- ::24.391 192.168.0.166: main INFO: Registered: schemas in 410ms
- ::24.391 192.168.0.166: main INFO: H2O started in 2369ms
- ::24.391 192.168.0.166: main INFO:
- ::24.400 192.168.0.166: main INFO: Open H2O Flow in your web browser: http://192.168.0.166:54323
- ::24.400 192.168.0.166: main INFO:
- ::26.961 192.168.0.166: FJ-- INFO: Cloud of size formed [/192.168.0.80:, /192.168.0.166:]

5. 打开浏览器,输入网址

http://192.168.0.166:54323
会看到h2o的flow ui界面

H2O.ai初步使用-LMLPHP

6. 页面使用

6.1数据导入
选择左侧帮助部分的导入数据,importFiles

H2O.ai初步使用-LMLPHP

  页面下方会显示出导入数据的界面,在search文本框上输入服务器上文件的路径,点击右侧的搜索按钮,页面会列出所有查到到的文件。然后点击Add all,没问题后点击import按钮

H2O.ai初步使用-LMLPHP

H2O.ai初步使用-LMLPHP

H2O.ai初步使用-LMLPHP

6.2 导入本地客户端数据

如果服务器上不存在要分析的文件,你可以选择上传自己的文件

H2O.ai初步使用-LMLPHP

6.3 解析导入的数据

如果你页面刷新了或者页面数据太乱了,你可以在getFrames里找到你刚才导入的数据集

H2O.ai初步使用-LMLPHP

找到我们刚才导入的数据集,点击parse按钮,

H2O.ai初步使用-LMLPHP

H2O.ai初步使用-LMLPHP

你可以自己输入列名,选择数据类型及其他修改,最后点击parse完成数据集的格式处理

H2O.ai初步使用-LMLPHP

点击上图中的view按钮,会显示下图,然后点击下图中的view data,会进行数据预览

H2O.ai初步使用-LMLPHP

数据预览查看:

H2O.ai初步使用-LMLPHP

parse完数据之后,你会发现数据集的扩展名已经由我们的.csv转为.hex,刷新一下页面,点击getFrames,

H2O.ai初步使用-LMLPHP

6.4 拆分数据集,

点击进入数据集,点击split按钮,

H2O.ai初步使用-LMLPHP

选择输入拆分比例,会拆分成多个数据集

H2O.ai初步使用-LMLPHP

6.5创建模型

点击顶菜单的'model --  k-meas'

选择算法,这里选择k-means,输入训练集training_frame和验证集validation_frame,或调整其他参数。

H2O.ai初步使用-LMLPHP

点击底部的create model按钮,会生成一个job,

H2O.ai初步使用-LMLPHP

点击view按钮,可查看模型的详细情况,如下图。

H2O.ai初步使用-LMLPHP

点击预测predict按钮,会显示下图,选择要预测的数据集,点击预测按钮即可查看结果。

H2O.ai初步使用-LMLPHP

05-11 13:42