Reputation: 713
I was trying use H2OAutoML in Python to create a regression model, but I can't find how to pass 'weights_column'.
I try this two ways:
# 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'
)
This code raise an 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'}
)
And this code raise H2oResponseError
on train step:
H2OResponseError: Server error water.exceptions.H2OIllegalValueException:
Error: Illegal value for field: algo_parameters: weights_column
Can Someone help me to use this parameter? thanks
Upvotes: 1
Views: 361
Reputation: 930
You call the weights_column
from the .train()
method. For example:
aml.train(x=x, y=y, training_frame=train, weights_column='weight')
Upvotes: 2