<jupyter_start><jupyter_text>\begin{tabular}{ |c|c|c| }  \hline cell1 & cell2 & cell3 \\  cell4 & cell5 & cell6 \\  cell7 & cell8 & cell9 \\  \hline\end{tabular}<jupyter_code>##################################################
#2980.9579870417283, 0.14956861922263512, 2.0611536224385579e-09
#numbers from separate grid search
m.integral.variance = 2980.957
m.integral.lengthscale = 0.149#0.223 #0.149
m.Gaussian_noise = 2.061e-09
m_simple.kern.variance = 0.00012340980408667956
m_simple.kern.lengthscale = 0.149#0.22313016014842982
m_simple.Gaussian_noise = 4.1399377187851668e-08

#m_simple.optimize()
means_simple, _ = m_simple.predict_noiseless(testX_simple)

preds = means_simple/(10**4)/np.prod(stepsizes)+outmean
print("Simple Method: %0.2f" % meanabserror(preds,testY))

#m.optimize()
means, _ = m.predict_noiseless(testX)
preds = means+outmean
print("Integral Method: %0.2f" % meanabserror(preds,testY))

#400 points
#3x3x3x3->484/489
#9x9x9x9->593/392
#9x9x9x9=>480/387 (shorter lengthscale)
np.set_printoptions(suppress=True,precision=4)
var_options = np.exp(np.arange(8,16,1.5))
lengthscale_options = np.exp(np.arange(-4,0.5,0.7))
noise_options = np.exp(np.arange(-20,7,4))

results_m = {}
for var in var_options:
    for ls in lengthscale_options:
        for noise in noise_options:
            m.kern.variance = var
            m.kern.lengthscale = ls
            m.Gaussian_noise = noise
            means, _ = m.predict_noiseless(testX)
            preds = means+outmean
            mae = meanabserror(preds,testY)
            results_m[(var,ls,noise)] = {'predmeans':preds, 'mae':mae}
#import pickle
#pickle.dump(results_m,open('results_m.p','wb'))
lowest = np.Inf
best_result = None
for res in results_m:
    preds = results_m[res]['predmeans']
    mae = meanabserror(preds,testY)
    print(mae)
    if mae<lowest:
        lowest = mae
        best_result = res
    plt.scatter(np.log(res[0]),mae,alpha=0.2,color='k')
print(best_result)
best_result, lowest
var_options = np.exp(np.arange(-9,0,1))
lengthscale_options = np.exp(np.arange(-4,1,0.5))
noise_options = np.exp(np.arange(-20,7,3))

results_msimple = {}
for var in var_options:
    print(".",end="")
    for ls in lengthscale_options:
        for noise in noise_options:
            m_simple.kern.variance = var
            m_simple.kern.lengthscale = ls
            m_simple.Gaussian_noise = noise
            means_simple, _ = m_simple.predict_noiseless(testX_simple)
            preds = means_simple/(10**4)/np.prod(stepsizes)+outmean
            results_msimple[(var,ls,noise)] = {'predmeans':preds, 'mae':meanabserror(preds,testY)}
lowest = np.Inf
best_result = None
for res in results_msimple:
    if results_msimple[res]['mae']<lowest:
        lowest = results_msimple[res]['mae']
        best_result = res
    #plt.scatter(np.log(res[2]),results_msimple[res]['mae'],alpha=0.2,color='k')
best_result, lowest
np.log(0.00555)
m_simple.kern.lengthscale<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15665091154625252, 'fraction_numerical': 0.07798784604996624, 'mean_word_length': 4.0563139931740615, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '343179', 'license': 'Apache-2.0', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1129, 'n_words': 172, 'path': 'Paper Results Citibike.ipynb', 'repo_name': 'lionfish0/integral_kernel', 'size': '2962'}