Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.ensemble import GradientBoostingRegressor
- # Create the model
- gradient_boosted = GradientBoostingRegressor()
- # Fit the model on the training data
- gradient_boosted.fit(X, y)
- # Make predictions on the test data
- predictions = gradient_boosted.predict(X_test)
- # Evaluate the model
- mae = np.mean(abs(predictions - y_test))
- print('Gradient Boosted Performance on the test set: MAE = %0.4f' % mae)
Add Comment
Please, Sign In to add comment