<jupyter_start><jupyter_text>model=make_pipeline(PolynomialFeatures(3),reg)<jupyter_code>model=make_pipeline(PolynomialFeatures(3),reg)
model.fit(data,target)
pred=model.predict(data)
%matplotlib inline
plt.scatter(data,target,color='red')
plt.plot(data,pred,color='green')
plt.xlabel('lower income population')
plt.ylabel('cost of house')
plt.show()
#r2 matrix
from sklearn.metrics import r2_score<jupyter_output><empty_output><jupyter_text><jupyter_code>r2_score(pred,target)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14398422090729784, 'fraction_numerical': 0.009861932938856016, 'mean_word_length': 17.142857142857142, 'pattern_counts': {'":': 0, '<': 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': '401472', 'license': 'MIT', 'n_tokens_mistral': 198, 'n_tokens_neox': 192, 'n_words': 20, 'path': 'regression.ipynb', 'repo_name': 'Palurineelima/python.py', 'size': '507'}