I need to Examine the evaluation results on testing data: MAE and RMSE. The correct answer suppose to be MAE: 4671, RMSE: 7734. Do I miss any code when I adding "kernel = poly, degree = 5"? When I change the value of C, the result is still the same. Could you please correct my code? Thank you # Build a SVM model with C = 10.0, kernel = poly, degree = 5 model_SVM10 = SVR(C=10, kernel = 'poly', degree = 5) model_SVM10.fit(predictors_train_insurance, target_train_insurance) # Make predictions on testing and training data predictions_on_test_insurance = model_SVM10.predict(predictors_test_insurance) # Examine the evaluation results on testing data: MAE and RMSE MAE = mean_absolute_error(target_test_insurance, predictions_on_test_insurance) RMSE = mean_squared_error(target_test_insurance, predictions_on_test_insurance, squared=False) print("MAE:", MAE) print("RMSE:", RMSE) MAE: 7259.965471230366 RMSE: 13035.30123325080
I need to Examine the evaluation results on testing data: MAE and RMSE. The correct answer suppose to be MAE: 4671, RMSE: 7734. Do I miss any code when I adding "kernel = poly, degree = 5"? When I change the value of C, the result is still the same. Could you please correct my code? Thank you
# Build a SVM model with C = 10.0, kernel = poly, degree = 5
model_SVM10 = SVR(C=10, kernel = 'poly', degree = 5)
model_SVM10.fit(predictors_train_insurance, target_train_insurance)
# Make predictions on testing and training data
predictions_on_test_insurance = model_SVM10.predict(predictors_test_insurance)
# Examine the evaluation results on testing data: MAE and RMSE
MAE = mean_absolute_error(target_test_insurance, predictions_on_test_insurance)
RMSE = mean_squared_error(target_test_insurance, predictions_on_test_insurance, squared=False)
print("MAE:", MAE)
print("RMSE:", RMSE)
MAE: 7259.965471230366
RMSE: 13035.301233250802
Step by step
Solved in 3 steps with 1 images