我最近开始使用azureml
Azure 机器学习工作室进行自动化实验和登录。
在一个实验中,我想将 a 的结果存储GridSearchCV
在一个表中。
run.log_table(name='Gridsearch results', value=search.cv_results_)
根据文档,value
应该是字典。就我而言,它看起来像这个问题底部的字典。但是,我收到以下错误:
Value of type <class 'list'> is not supported, supported types include [[<class 'float'>, <class 'str'>, <class 'bool'>, <class 'NoneType'>, <class 'int'>]]
甚至将其转换为类似于使用文档中给出的格式
run.log_table(name='Gridsearch results', value=pd.DataFrame(search.cv_results_).to_dict(orient="list"))
产生相同的错误。有任何想法吗?
{'mean_fit_time': array([ 4.44100904, 0.01762947, 12.24124289, 0.01914111]),
'std_fit_time': array([1.66466241e+00, 8.54067066e-04, 2.84891905e+00, 1.26775086e-03]),
'mean_score_time': array([0.00462735, 0.00775236, 0.00512046, 0.00737476]),
'std_score_time': array([0.00048182, 0.0004347 , 0.00092224, 0.00069597]),
'param_C': masked_array(data=[1, 1, 10, 10], mask=[False, False, False, False], fill_value='?', dtype=object),
'param_kernel': masked_array(data=['linear', 'rbf', 'linear', 'rbf'],
mask=[False, False, False, False],
fill_value='?',
dtype=object), 'params': [{'C': 1, 'kernel': 'linear'}, {'C': 1, 'kernel': 'rbf'}, {'C': 10, 'kernel': 'linear'}, {'C': 10, 'kernel': 'rbf'}], 'split0_test_score': array([0.81111111, 0.54444444, 0.81111111, 0.62222222]), 'split1_test_score': array([0.75555556, 0.61111111, 0.75555556, 0.64444444]), 'split2_test_score': array([0.80898876, 0.75280899, 0.80898876, 0.7752809 ]), 'split3_test_score': array([0.7752809 , 0.65168539, 0.7752809 , 0.69662921]), 'split4_test_score': array([0.78651685, 0.69662921, 0.78651685, 0.76404494]), 'split5_test_score': array([0.71910112, 0.68539326, 0.71910112, 0.70786517]), 'split6_test_score': array([0.79775281, 0.74157303, 0.79775281, 0.7752809 ]), 'split7_test_score': array([0.78651685, 0.6741573 , 0.78651685, 0.75280899]), 'mean_test_score': array([0.780103 , 0.66972534, 0.780103 , 0.7173221 ]), 'std_test_score': array([0.02858483, 0.06374784, 0.02858483, 0.0559392 ]), 'rank_test_score': array([1, 4, 1, 3])}