Skip to content

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