本文整理汇总了Python中sklearn.linear_model.RidgeCV.parameter_names方法的典型用法代码示例。如果您正苦于以下问题:Python RidgeCV.parameter_names方法的具体用法?Python RidgeCV.parameter_names怎么用?Python RidgeCV.parameter_names使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sklearn.linear_model.RidgeCV
的用法示例。
在下文中一共展示了RidgeCV.parameter_names方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: list
# 需要导入模块: from sklearn.linear_model import RidgeCV [as 别名]
# 或者: from sklearn.linear_model.RidgeCV import parameter_names [as 别名]
Y_metadata=noise_dict))
info_dict[emo] = emo_dict
preds_list.append(preds.flatten())
vars_list.append(vars.flatten())
# Get parameters
if args.model == 'ridge':
info_dict['coefs'] = list(model.coef_)
info_dict['intercept'] = model.intercept_
info_dict['regularization'] = model.alpha_
elif args.model == 'svr':
info_dict['regularization'] = model.best_params_['C']
info_dict['epsilon'] = model.best_params_['epsilon']
info_dict['gamma'] = model.best_params_['gamma']
else:
param_names = model.parameter_names()
for p_name in param_names:
if p_name == 'ICM.B.W':
info_dict[p_name] = list([list(pars) for pars in model[p_name]])
else:
try:
info_dict[p_name] = float(model[p_name])
except TypeError: #ARD
info_dict[p_name] = list(model[p_name])
info_dict['log_likelihood'] = float(model.log_likelihood())
# elif args.model == 'rbf':
# info_dict['variance'] = float(model['ICM.rbf.variance'])
# info_dict['lengthscale'] = list(model['ICM.rbf.lengthscale'])
# info_dict['noise'] = list([float(noise) for noise in model['mixed_noise.*']])
# info_dict['log_likelihood'] = float(model.log_likelihood())
# elif args.model == 'mat32':