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

Increase speed/performance by roughly 10% #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bandjhughes
Copy link

use list comprehension
DRY refactor
Use enumerate
Reverse order in if statement to avoid math when possible
Remove unnecessary assignment
Remove unnecessary cast (when more efficient)
Remove unnecessary elif statement
Remove unnecessary variables passed to functions

use list comprehension
DRY refactor
Use enumerate
Reverse order in if statement to avoid math when possible
Remove unnecessary assignment
Remove unnecessary cast (when more efficient)
Remove unnecessary elif statement
Remove unnecessary variables passed to functions
@bandjhughes
Copy link
Author

No changes to functionality (at least not intentionally), just minor changes to improve runtime speed. Before changes were made, the random seed was set, and a (repeatable) confusion matrix was generated for a multi-class classifier as a baseline.

After the changes, the exact same confusion matrix is still produced, and the average runtime is reduced around 9-10 percent.

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

Successfully merging this pull request may close these issues.

1 participant