November 2017
Intermediate to advanced
374 pages
10h 19m
English
You might wonder if that is the best noise parameter, alpha=5? To figure this out, try some cross-validation.
from sklearn.model_selection import cross_val_score gpr5 = GaussianProcessRegressor(alpha=5, n_restarts_optimizer=20, kernel = mixed_kernel) scores_5 = (cross_val_score(gpr5, boston_X[train_set], boston_y[train_set], cv = 4, scoring = 'neg_mean_absolute_error'))
def score_mini_report(scores_list): print "List of scores: ", scores_list print "Mean of scores: ", ...
Read now
Unlock full access