【发布时间】:2018-01-21 16:41:03
【问题描述】:
我正在像这样在 h2o 中训练模型:
import h2o
h2o.init()
trainFrame = h2o.import_file(path = "C:/train.csv")
train, test = trainFrame.split_frame([0.8])
x = ["A", "B", "C"]
y = "Target"
m = h2o.estimators.H2ORandomForestEstimator(model_id="RF_defaults")
m.train(x, y, train)
现在我想将这些结果保存到 pandas 数据框。
我正在尝试这样做:
m.as_data_frame(pandas = True)
但返回:
AttributeError: type object 'H2ORandomForestEstimator' has no attribute 'as_data_frame'
【问题讨论】:
-
嗯,是的。您必须在水框架上调用它,而不是模型。
标签: python python-2.7 pandas h2o