def mae_loss_func(weights):
''' scipy minimize will pass the weights as a numpy array '''
final_prediction = 0
for weight, prediction in zip(weights, predictions):
final_prediction += prediction * weight
return mean_absolute_error(actual.loss, final_prediction)
评论列表
文章目录