<jupyter_start><jupyter_text>Using `numpy.vander` to calculate numerical polynomials<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
x = np.linspace(-15,15,400)
coeffs = np.array([0.0333, 0,-2.50, 0])
# if we use default state of vander, this starts with cubic coefficient
# and ends with the 0th power coefficient.
A = np.vander(x,4)
y = np.dot(A, coeffs)
plt.plot(x,y)
plt.grid()
X = np.array([x + np.random.normal(scale=0.5) for x in range(-15,15)])
#spaced about 1 apart with some jitter
Y = np.dot(np.vander(X,4), coeffs) 
Y += np.random.normal(scale = 5, size = np.shape(Y))
plt.plot(x,y)
plt.scatter(X,Y)
plt.grid()
?np.vander<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15329512893982808, 'fraction_numerical': 0.04011461318051576, 'mean_word_length': 5.185840707964601, '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': '287369', 'license': 'MIT', 'n_tokens_mistral': 303, 'n_tokens_neox': 285, 'n_words': 73, 'path': 'vander-poly.ipynb', 'repo_name': 'davidwcraig/mslicer', 'size': '698'}