【发布时间】:2018-01-07 17:12:22
【问题描述】:
我想使用 h2o.deeplearning 函数执行 DNN。为此,我们使用as.h2o 函数加载了数据。
我输入了以下代码来验证数据输入是否正确,结果只有十个观察值。数据共有 1,000 个观测值。
但是,当我使用as.h2o 函数加载数据时,只输入了十个数据。哪一部分错了?
这是我的 R 代码。
h2o.init(nthreads = -1, max_mem_size = "5G")
credit<-read.csv("http://freakonometrics.free.fr/german_credit.csv", header=TRUE)
deep_credit<-as.h2o(credit,destination_frame = "deep_credit")
h2o.str(deep_credit)
Class 'H2OFrame' <environment: 0x0000000035bb4ad8>
- attr(*, "op")= chr "Parse"
- attr(*, "id")= chr "deep_credit"
- attr(*, "eval")= logi FALSE
- attr(*, "nrow")= int 1000
- attr(*, "ncol")= int 21
- attr(*, "types")=List of 21
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
..$ : chr "int"
- attr(*, "data")='data.frame': 10 obs. of 21 variables:
..$ Creditability : num 1 1 1 1 1 1 1 1 1 1
..$ Account.Balance : num 1 1 2 1 1 1 1 1 4 2
..$ Duration.of.Credit..month. : num 18 9 12 12 12 10 8 6 18 24
..$ Payment.Status.of.Previous.Credit: num 4 4 2 4 4 4 4 4 4 2
..$ Purpose : num 2 0 9 0 0 0 0 0 3 3
..$ Credit.Amount : num 1049 2799 841 2122 2171 ...
..$ Value.Savings.Stocks : num 1 1 2 1 1 1 1 1 1 3
..$ Length.of.current.employment : num 2 3 4 3 3 2 4 2 1 1
..$ Instalment.per.cent : num 4 2 2 3 4 1 1 2 4 1
..$ Sex...Marital.Status : num 2 3 2 3 3 3 3 3 2 2
..$ Guarantors : num 1 1 1 1 1 1 1 1 1 1
..$ Duration.in.Current.address : num 4 2 4 2 4 3 4 4 4 4
..$ Most.valuable.available.asset : num 2 1 1 1 2 1 1 1 3 4
..$ Age..years. : num 21 36 23 39 38 48 39 40 65 23
..$ Concurrent.Credits : num 3 3 3 3 1 3 3 3 3 3
..$ Type.of.apartment : num 1 1 1 1 2 1 2 2 2 1
..$ No.of.Credits.at.this.Bank : num 1 2 1 2 2 2 2 1 2 1
..$ Occupation : num 3 3 2 2 2 2 2 2 1 1
..$ No.of.dependents : num 1 2 1 2 1 2 1 2 1 1
..$ Telephone : num 1 1 1 1 1 1 1 1 1 1
..$ Foreign.Worker : num 1 1 1 2 2 2 2 2 1 1
【问题讨论】:
标签: r deep-learning h2o