<jupyter_start><jupyter_text>Now define the Elastic Net model<jupyter_code>r = 0.5
en = ElasticNet(alpha = 0.1, l1_ratio=r)
en.fit(x_train, y_train)
m = en.coef_
m
c = en.intercept_
c
pred = en.predict(x_test)
pred
fig, ax = plt.subplots(figsize=(13.5, 8))
#fig.set_facecolor(('black'))
ax.patch.set_facecolor(('black'))

plt.scatter(x_test, y_test, color='red')
plt.plot(x_test, pred, color='blue', linewidth=5)

plt.xlabel('Shots by a player', size=20)
plt.ylabel('Goals by a player', size=20)
plt.title("La Liga Goals Vs. Shots", size=20)
sns.displot((y_test - pred),bins=50, color = 'green')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1744, 'fraction_numerical': 0.0288, 'mean_word_length': 6.364705882352941, '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': '326882', 'license': 'MIT', 'n_tokens_mistral': 286, 'n_tokens_neox': 272, 'n_words': 55, 'path': 'Elastic Net Model to find out the relation between shots by a player and the goals scored.ipynb', 'repo_name': 'indrag49/football-analysis-project', 'size': '625'}