Add binary classification support via sigmoid_rmse fitness function#5
Open
Narden91 wants to merge 3 commits intoDALabNOVA:mainfrom
Open
Add binary classification support via sigmoid_rmse fitness function#5Narden91 wants to merge 3 commits intoDALabNOVA:mainfrom
Narden91 wants to merge 3 commits intoDALabNOVA:mainfrom
Conversation
… exclude additional log files
…h sigmoid RMSE fitness function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adapts SLIM_GSGP (and GP/GSGP) for binary classification following the approach of Bakurov et al. (2022).
It also fixes a
NameErrorpresent in the original README example and restructures the feature into a proper first-class API.Changes
New:
binary_classification/subpackage__init__.pyRe-exports:
sigmoid_rmsebinary_sign_transformThis allows convenient imports.
example_binary_classification.pyEnd-to-end working example using
load_breast_cancer.New fitness functions (
evaluators/fitness_functions.py)sigmoid_rmse(scaling_factor)Factory returning a fitness function that:
binary_sign_transform(y_pred)Converts raw outputs to binary labels at prediction time:
01Config registration
Files updated:
config/slim_config.pyconfig/gp_config.pyconfig/gsgp_config.pyChanges:
sigmoid_rmseadded tofitness_function_optionsin all algorithm configs.API parameter
Files updated:
main_slim.pymain_gp.pymain_gsgp.pyNew parameter added to:
slim()gp()gsgp()sigmoid_scaling_factor: float = 1.0
Purpose:
README.mdImprovements and fixes:
Replaced broken binary classification example:
binarizedvariablesklearnimportAdded clean working example
Fixed incorrect
log_pathdescriptions (previously all said "for slim")Removed duplicate
copy_parentbulletAdded
sigmoid_scaling_factorto arguments tableUpdated Python version requirement to match
setup.py(>=3.10)setup.pyAdded missing dependency:
dillUsage
Reference
Bakurov, I., et al. (2022).
General purpose optimization library (GPOL).
Swarm and Evolutionary Computation, 68, 101028.
https://doi.org/10.1016/j.swevo.2021.101028