Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The variables validation_accuracy and train_accuracy in WQI.ipynb not defined #1

Open
aqArshad566 opened this issue Jul 28, 2021 · 0 comments

Comments

@aqArshad566
Copy link

aqArshad566 commented Jul 28, 2021

validation_accuracy in the function below is not defined.


`#` a simple report
for key in sorted(validation_accuracy.keys()):
    print("L2 penalty = %g" % key)
    print("train error = %s, validation_error = %s" % (train_error[key], validation_error[key]))
    print("--------------------------------------------------------------------------------")

train_accuracy is not defined

`# Ploting error on training and validation sets over choice of L2 penalty.
plt.rcParams['figure.figsize'] = 10, 6

sorted_list = sorted(train_accuracy.items(), key=lambda x:x[0])
plt.plot([p[0] for p in sorted_list], [p[1] for p in sorted_list], 'bo-', linewidth=4, label='Training error')
sorted_list = sorted(validation_accuracy.items(), key=lambda x:x[0])
plt.plot([p[0] for p in sorted_list], [p[1] for p in sorted_list], 'ro-', linewidth=4, label='Validation error')
plt.xscale('symlog')
plt.axis([0, 1e5, 2000, 8000])
plt.legend(loc='lower left')
plt.rcParams.update({'font.size': 18})
plt.tight_layout`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant