I'm doing a project and I needed to estimate the density function of a distribution. So I used GridSearchCV:
param_grid = {'kernel': ['gaussian', 'epanechnikov', 'exponential', 'linear', 'tophat', 'cosine'], 'bandwidth': np.linspace (0.01, .5, 1000)}
grid = GridSearchCV (
estimator = KernelDensity (),
param_grid = param_grid,
n_jobs = -1,
cv = 2,
verbose = 0,
)
I printed print(grid.best_params_, ":", grid.best_score_)
But best_score gives me values between 16 with cv = 2 or 800 with cv = 50. I really don't understand what best_score_ means because in the library it says that:
best_score_float
Mean cross-validated score of the best_estimator
How is it really calculated? Do we look for large or small values of best_estimator to have a better fit?
Thank you