我正在尝试使用H2O.a的H2O-3 Automl算法在AWS SageMaker上使用控制台训练一个模型。
我的模型的目标是预测是否会根据年份、犯罪类型和地点进行逮捕。
我的数据有8列:
primary_type:enumdescription:enumlocation_description:enumarrest:enum (真/假),这是目标columndomestic:enum (true/false)year:numberlatitude:numberlongitude:number当我在AWS上使用SageMaker控制台并使用H2O-3 Automl算法创建一个新的培训作业时,我将primary_type、description、location_description和domestic列指定为绝对列。
然而,在培训作业的日志中,我总是看到以下两行:
Converting specified columns to categorical values:
[]这使我相信,categorical_columns超参数中的training属性没有被考虑在内。
我每次都尝试使用日志中相同输出的以下超参数:
{'classification': 'true', 'categorical_columns':'primary_type,description,location_description,domestic', 'target': 'arrest'}{'classification': 'true', 'categorical_columns':['primary_type','description','location_description','domestic'], 'target': 'arrest'}我以为分类列的列表应该用逗号分隔,然后用逗号分隔成一个列表。
我期望在日志中输出分类列名列表,而不是空列表,如下所示:
Converting specified columns to categorical values:
['primary_type','description','location_description','domestic']有人能帮我弄清楚如何让这些分类列应用到我的模型的培训中吗?
而且-我认为这是在我训练我的模型时运行的代码,但我还没有确认:https://github.com/h2oai/h2o3-sagemaker/blob/master/automl/automl_scripts/train#L93-L151
发布于 2020-02-28 16:33:41
这似乎是h2o包的一个bug。https://github.com/h2oai/h2o3-sagemaker/blob/master/automl/automl_scripts/train#L106中的代码显示它直接从超参数读取categorical_columns,而不是嵌套在训练字段下。然而,当将categorical_columns字段向上移动一个级别时,该算法无法识别它。所以解决不了这个问题。
发布于 2019-10-21 22:04:50
它似乎是基于下面的代码:https://github.com/h2oai/h2o3-sagemaker/blob/master/automl/automl_scripts/train#L106
该参数正在寻找逗号分隔的字符串。例如"cat,dog,bird"
我会尝试:"primary_type,description,location_description,domestic"作为输入参数,而不是['primary_type', 'description'... etc]
https://stackoverflow.com/questions/58469273
复制相似问题