What set of parameters should I choose for Naive bayes and GBM models so that it creates minimal fitting error?

I understand that different set of parameters has to be chosen for each model so as to avoid under or over fitting. But is there is a 'safe set' of parameters which can be used for the widest range of data? The fit and predicitions might not be accurate if we use the same parameters for all data files but which set of parameters will help minimise the fitting error. Thanks in advance.

• No. (extra text to satisfy limit) – Matthew Drury Sep 11 '17 at 22:18
• (less succinctly than @MatthewDrury) In general, those who wrote the code did some testing and put in reasonable defaults that will apply to a wide variety of situations -- but not necessarily your situations. – zbicyclist Sep 12 '17 at 2:32
• Thanks @zbicyclist, I was posting from the bus :) I don't think all the defaults are sensible though, in sklearn the default subsample rate for gradient boosting is 1.0, which is afaik, always wrong. – Matthew Drury Sep 12 '17 at 2:46
• Thanks a ton zbicyclist and @Matthew Drury for the response. I was trying to create a generalised set of parameters which will fit most datasets. I understand that it comes at the cost of accuracy of prediction. Could you help me understand what could be the range of error for a prediction made using a default parameter set. Could this error render the model predictions completly unusable considering a prediction with 20% error is acceptable? – Krishna Chandran Sep 12 '17 at 5:28
• @zbicyclist your thoughts? – Krishna Chandran Sep 14 '17 at 6:47