<jupyter_start><jupyter_text>Generating Random PolynomialsIdea: What if do sort of a visual functional analysis? Hard to simulate inf dim vector spaces, but could try to sample functions in L1, L2, L3, ..., Linf, C0, and this might give some ideas. Polynomials is a subspace of L2 so can do that. Sequence spaces would be easier to sample, could do so algorithmically too. Essentially, need a representative space for each characteristic:* Lp spaces* lp spaces* complete, not complete* separable, not separable* meagre, not (pretty sure polynomial is meager?)* For a dense subspace, show that it approximates an element. * hilbert, not hilbert* convex, not convex?* Check how to represent a metric, can use rejection sampling to sample sequences close to another sequence etc. * Another random function that could use (and then check the optimization of it?) x^T W x where W GOE. * Random operators? (random matrices generalized) * Generate random functions from stochastic processes? * dual spaces? for the lp ones its easy I think. * Sample functions in certain lp spaces through rejection sampling.  lp spaces:Could sample these, point per point, but cant go to infinity ofc. benefit of Lp is that you can sample from [0,1] and you already get infinity built in. Rejection sampling idea for lp: sample points, sum them and see if they're below a certain threshold by the sum of the nth point. Not sure if infinite convergence can be described this way tho. Might have to do it on paper lmao.<jupyter_code>import numpy as np
from sympy import *
import sympy as sym
from multipledispatch import dispatch
import matplotlib.pyplot as plt

# import wow
# from wow import *
x = sym.Symbol('x')
type(2 * x**2)
D = 4
poly = 0 * x
for p in range(D+1):
    poly += np.random.uniform(-1, 1) * (x**p)
poly
f = lambdify(x, poly, "math")
type(f)
f(np.array([1.0, 2.0]))
xx = np.linspace(-1, 1)
plt.plot(xx, f(xx), c='blue')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07936507936507936, 'fraction_numerical': 0.010240655401945725, 'mean_word_length': 4.598853868194842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '30883', 'license': 'MIT', 'n_tokens_mistral': 573, 'n_tokens_neox': 546, 'n_words': 295, 'path': 'notebooks/Random Polynomials.ipynb', 'repo_name': 'gabrielarpino/wow', 'size': '1953'}