<jupyter_start><jupyter_text>Dataset Preparation<jupyter_code>x, y = generate_kernel_dataset()<jupyter_output><empty_output><jupyter_text>Dataset Plot<jupyter_code>plt.scatter(x[:, 0], x[:, 1], c=y)
plt.xlabel("$x_1$")
plt.ylabel("$x_2$")
plt.show()<jupyter_output><empty_output><jupyter_text>Kernel Trick<jupyter_code>def quadratic_kernel(x: np.ndarray) -> np.ndarray:
    x[:, 0] = x[:, 0]**2
    x[:, 1] = x[:, 1]**2
    return x
x_qk = quadratic_kernel(x)
plt.scatter(x_qk[:, 0], x_qk[:, 1], c=y)
plt.xlabel("$x_1$")
plt.ylabel("$x_2$")
plt.xlim(-1, 20)
plt.ylim(-1, 20)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21951219512195122, 'fraction_numerical': 0.032520325203252036, 'mean_word_length': 7.555555555555555, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '443055', 'license': 'MIT', 'n_tokens_mistral': 312, 'n_tokens_neox': 295, 'n_words': 40, 'path': 'Chapter11_SVM/SVMSklearn/SVMIntuition.ipynb', 'repo_name': 'hallerinos/UdemyML', 'size': '615'}