h2o 模型不可订阅
h2o model not subscriptable
我认为这个问题很简单 - 我想了解如何从内置的水模型中提取各种元数据 python?
在 R 中,我可以运行以下内容来获取此类信息。
my_h2o_model@algorithm
my_h2o_model@parameters
my_performance = h2o.performance(my_h2o_model)
my_performance@metrics$thresholds_and_metric_scores # awesome see all classifier metrics at each threshold
在 python 如果我尝试
my_h2o_model['algorithm']
或
my_h2o_model[0]
perf=model_performance(my_h2o_model)
perf['metrics']['thresholds_and_metric_scores] # !!!!
TypeError: 'H2OGradientBoostingEstimator' object is not subscriptable
如何从 python 中的模型中获取此信息??
您有错字 -- thresholds_and_metric_scores
后缺少一个单引号。
perf['metrics']['thresholds_and_metric_scores']
使用 dir() 找到我需要的各种函数。
我认为这个问题很简单 - 我想了解如何从内置的水模型中提取各种元数据 python?
在 R 中,我可以运行以下内容来获取此类信息。
my_h2o_model@algorithm
my_h2o_model@parameters
my_performance = h2o.performance(my_h2o_model)
my_performance@metrics$thresholds_and_metric_scores # awesome see all classifier metrics at each threshold
在 python 如果我尝试
my_h2o_model['algorithm']
或
my_h2o_model[0]
perf=model_performance(my_h2o_model)
perf['metrics']['thresholds_and_metric_scores] # !!!!
TypeError: 'H2OGradientBoostingEstimator' object is not subscriptable
如何从 python 中的模型中获取此信息??
您有错字 -- thresholds_and_metric_scores
后缺少一个单引号。
perf['metrics']['thresholds_and_metric_scores']
使用 dir() 找到我需要的各种函数。