<jupyter_start><jupyter_text>Without restarting<jupyter_code>experiment = Experiment(model.log, model.obj, values=model.value_log)
k = 6
%%time
experiment.run_method("VLT", h_algorithm, k+1, method_kwargs={"k": k, "type": "t"})
%%time
experiment.run_method("VLU", h_algorithm, k+1, method_kwargs={"k": k, "type": "u"})
%%time
experiment.run_method("VLV", h_algorithm, k+2, method_kwargs={"k": k, "type": "v"})
%%time
experiment.run_method("VLT2", levin_transform, k+1, method_kwargs={"k": k, "type": "t"})
%%time
experiment.run_method("VLU2", levin_transform, k+1, method_kwargs={"k": k, "type": "u"})
%%time
experiment.run_method("VLV2", levin_transform, k+2, method_kwargs={"k": k, "type": "v"})
%%time
experiment.run_method("SLT", e_algorithm, k+1, method_kwargs={"k": k, "type": "t"})
%%time
experiment.run_method("SLU", e_algorithm, k+1, method_kwargs={"k": k, "type": "u"})
%%time
experiment.run_method("SLV", e_algorithm, k+2, method_kwargs={"k": k, "type": "v"})
%%time
experiment.run_method("RRE+QR", RRE, k, method_kwargs={"qr": True})
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000)
plt.ylim(50, 80)
plt.legend()
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000)
plt.legend()
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000, methods=["VLT", "VLU", "VLV", "RRE+QR"])
plt.ylim(50, 80)
plt.legend()         
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000, methods=["VLT", "VLU", "VLV", "RRE+QR"])
plt.legend()    
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000, methods=["VLT2", "VLU2", "VLV2", "RRE+QR"])
plt.ylim(50, 80)
plt.legend()         
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000, methods=["VLT2", "VLU2", "VLV2", "RRE+QR"])
plt.legend()    
model.theta = experiment.best_x
preds = model.predict(X_test)
torch.mean((preds == y_test).double())
df = experiment.value_df()
df.to_csv("results/sonar-levin.csv")<jupyter_output><empty_output><jupyter_text>With restarting<jupyter_code>experiment = RestartingExperiment(model)
k = 6
experiment.run_method("VLT", h_algorithm, k+1, 5000, method_kwargs={"k": k, "type": "t"})
experiment.run_method("VLU", h_algorithm, k+1, 5000, method_kwargs={"k": k, "type": "u"})
experiment.run_method("VLV", h_algorithm, k+2, 5000, method_kwargs={"k": k, "type": "v"})
experiment.run_method("VLT2", levin_transform, k+1, 5000, method_kwargs={"k": k, "type": "t"})
experiment.run_method("VLU2", levin_transform, k+1, 5000, method_kwargs={"k": k, "type": "u"})
experiment.run_method("VLV2", levin_transform, k+2, 5000, method_kwargs={"k": k, "type": "v"})
experiment.run_method("SLT", e_algorithm, k+1, 5000, method_kwargs={"k": k, "type": "t"})
experiment.run_method("SLU", e_algorithm, k+1, 5000, method_kwargs={"k": k, "type": "u"})
experiment.run_method("SLV", e_algorithm, k+2, 5000, method_kwargs={"k": k, "type": "v"})
experiment.run_method("RRE+QR", RRE, k, 5000, method_kwargs={"qr": True})
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000)
plt.ylim(50, 80)
plt.legend()
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000)
plt.legend()
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000, methods=["VLT", "VLU", "VLV", "RRE+QR"])
plt.ylim(50, 80)
plt.legend()         
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000, methods=["VLT", "VLU", "VLV", "RRE+QR"])
plt.legend()    
plt.figure(figsize=(14, 8))
experiment.plot_values(n=10000, methods=["VLT2", "VLU2", "VLV2", "RRE+QR"])
plt.ylim(50, 80)
plt.legend()         
plt.figure(figsize=(14, 8))
experiment.plot_log_diff(n=10000, methods=["VLT2", "VLU2", "VLV2", "RRE+QR"])
plt.legend()    
model.theta = experiment.best_x
preds = model.predict(X_test)
torch.mean((preds == y_test).double())
df = experiment.value_df()
df.to_csv("results/sonar-levin-restarts.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22260094389092816, 'fraction_numerical': 0.0519140010487677, 'mean_word_length': 7.934426229508197, 'pattern_counts': {'":': 38, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '452784', 'license': 'MIT', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1565, 'n_words': 277, 'path': 'notebooks/logistic regression/Sonar-Levin.ipynb', 'repo_name': 'JaworWr/MLAcceleration', 'size': '3814'}