我试图在Python中使用H2OAutoML来创建回归模型,但我找不到如何传递'weights_column'。
我尝试了两种方法:
# Create the AutoML model.
aml = H2OAutoML(
seed=0,
max_runtime_secs = None,
include_algos=['GBM', 'DRF'],
stopping_metric='RMSE',
exploitation_ratio=0.1,
weights_column='weight'
)
此代码引发TypeError
:TypeError: H2OAutoML got an unexpected keyword argument 'weights_column'
# Create the AutoML model.
aml = H2OAutoML(
seed=0,
max_runtime_secs = None,
include_algos=['GBM', 'DRF'],
stopping_metric='RMSE',
exploitation_ratio=0.1,
algo_parameters={'weights_column': 'weight'}
)
并且该代码在列车步骤上提出H2oResponseError
:
H2OResponseError: Server error water.exceptions.H2OIllegalValueException:
Error: Illegal value for field: algo_parameters: weights_column
有人能帮我使用这个参数吗?感谢
从.train()
方法调用weights_column
。例如:
aml.train(x=x, y=y, training_frame=train, weights_column='weight')