-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major Refactor: SklearnOptimizer replace all old Optimizers
- Loading branch information
Showing
25 changed files
with
467 additions
and
623 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,7 +331,6 @@ dmypy.json | |
*testsdir | ||
*testsfile | ||
*testsfiles | ||
*test | ||
*testdir | ||
*testfile | ||
*testfiles | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
from .genoptimizer.meta import SklearnOptimizer | ||
from .genoptimizer import Hyperparam |
79 changes: 79 additions & 0 deletions
79
mloptimizer/conf/CustomXGBClassifier_default_HyperparamSpace.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
"base_score": 0.5, | ||
"booster": "gbtree", | ||
"eval_metric": "auc" | ||
}, | ||
"evolvable_hyperparams": { | ||
"eta": { | ||
"name": "eta", | ||
"min_value": 0, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"colsample_bytree": { | ||
"name": "colsample_bytree", | ||
"min_value": 3, | ||
"max_value": 10, | ||
"hyperparam_type": "float", | ||
"scale": 10 | ||
}, | ||
"alpha": { | ||
"name": "alpha", | ||
"min_value": 0, | ||
"max_value": 100, | ||
"hyperparam_type": "int" | ||
}, | ||
"lambda": { | ||
"name": "lambda", | ||
"min_value": 0, | ||
"max_value": 100, | ||
"hyperparam_type": "int" | ||
}, | ||
"gamma": { | ||
"name": "gamma", | ||
"min_value": 0, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"max_depth": { | ||
"name": "max_depth", | ||
"min_value": 2, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"n_estimators": { | ||
"name": "n_estimators", | ||
"min_value": 100, | ||
"max_value": 500, | ||
"hyperparam_type": "int" | ||
}, | ||
"subsample": { | ||
"name": "subsample", | ||
"min_value": 700, | ||
"max_value": 1000, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
}, | ||
"num_boost_round": { | ||
"name": "num_boost_round", | ||
"min_value": 2, | ||
"max_value": 100, | ||
"hyperparam_type": "int" | ||
}, | ||
"scale_pos_weight": { | ||
"name": "scale_pos_weight", | ||
"min_value": 15, | ||
"max_value": 40, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"min_child_weight": { | ||
"name": "min_child_weight", | ||
"min_value": 0, | ||
"max_value": 100, | ||
"hyperparam_type": "int" | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
mloptimizer/conf/ExtraTreesClassifier_default_HyperparamSpace.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
"class_weight": "balanced" | ||
}, | ||
"evolvable_hyperparams": { | ||
"max_features": { | ||
"name": "max_features", | ||
"min_value": 1, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"n_estimators": { | ||
"name": "n_estimators", | ||
"min_value": 5, | ||
"max_value": 250, | ||
"hyperparam_type": "int" | ||
}, | ||
"max_depth": { | ||
"name": "max_depth", | ||
"min_value": 2, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"min_impurity_decrease": { | ||
"name": "min_impurity_decrease", | ||
"min_value": 0, | ||
"max_value": 150, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
mloptimizer/conf/GradientBoostingClassifier_default_HyperparamSpace.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
}, | ||
"evolvable_hyperparams": { | ||
"max_features": { | ||
"name": "max_features", | ||
"min_value": 1, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"n_estimators": { | ||
"name": "n_estimators", | ||
"min_value": 5, | ||
"max_value": 250, | ||
"hyperparam_type": "int" | ||
}, | ||
"max_depth": { | ||
"name": "max_depth", | ||
"min_value": 2, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"min_impurity_decrease": { | ||
"name": "min_impurity_decrease", | ||
"min_value": 0, | ||
"max_value": 150, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
}, | ||
"learning_rate": { | ||
"name": "learning_rate", | ||
"min_value": 1, | ||
"max_value": 10000, | ||
"hyperparam_type": "float", | ||
"scale": 1000000 | ||
}, | ||
"subsample": { | ||
"name": "subsample", | ||
"min_value": 10, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
mloptimizer/conf/RandomForestClassifier_default_HyperparamSpace.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
"class_weight": "balanced" | ||
}, | ||
"evolvable_hyperparams": { | ||
"max_features": { | ||
"name": "max_features", | ||
"min_value": 1, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"n_estimators": { | ||
"name": "n_estimators", | ||
"min_value": 5, | ||
"max_value": 250, | ||
"hyperparam_type": "int" | ||
}, | ||
"max_samples": { | ||
"name": "max_samples", | ||
"min_value": 10, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
}, | ||
"max_depth": { | ||
"name": "max_depth", | ||
"min_value": 2, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"min_impurity_decrease": { | ||
"name": "min_impurity_decrease", | ||
"min_value": 0, | ||
"max_value": 150, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
}, | ||
"evolvable_hyperparams": { | ||
"C": { | ||
"name": "C", | ||
"min_value": 1, | ||
"max_value": 10000, | ||
"hyperparam_type": "float", | ||
"scale": 10 | ||
}, | ||
"degree": { | ||
"name": "degree", | ||
"min_value": 0, | ||
"max_value": 6, | ||
"hyperparam_type": "int" | ||
}, | ||
"gamma": { | ||
"name": "gamma", | ||
"min_value": 10, | ||
"max_value": 100000000, | ||
"hyperparam_type": "int" | ||
}, | ||
"max_iter": { | ||
"name": "max_iter", | ||
"min_value": 100, | ||
"max_value": 1000, | ||
"hyperparam_type": "int" | ||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
mloptimizer/conf/XGBClassifier_default_HyperparamSpace.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"fixed_hyperparams": { | ||
}, | ||
"evolvable_hyperparams": { | ||
"colsample_bytree": { | ||
"name": "colsample_bytree", | ||
"min_value": 3, | ||
"max_value": 10, | ||
"hyperparam_type": "float", | ||
"scale": 10 | ||
}, | ||
"gamma": { | ||
"name": "gamma", | ||
"min_value": 0, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"learning_rate": { | ||
"name": "learning_rate", | ||
"min_value": 1, | ||
"max_value": 100, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
}, | ||
"max_depth": { | ||
"name": "max_depth", | ||
"min_value": 2, | ||
"max_value": 20, | ||
"hyperparam_type": "int" | ||
}, | ||
"n_estimators": { | ||
"name": "n_estimators", | ||
"min_value": 100, | ||
"max_value": 500, | ||
"hyperparam_type": "int" | ||
}, | ||
"subsample": { | ||
"name": "subsample", | ||
"min_value": 700, | ||
"max_value": 1000, | ||
"hyperparam_type": "float", | ||
"scale": 1000 | ||
}, | ||
"scale_pos_weight": { | ||
"name": "scale_pos_weight", | ||
"min_value": 15, | ||
"max_value": 40, | ||
"hyperparam_type": "float", | ||
"scale": 100 | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"DecisionTreeClassifier": "DecisionTreeClassifier_default_HyperparamSpace.json", | ||
"RandomForestClassifier": "RandomForestClassifier_default_HyperparamSpace.json", | ||
"ExtraTreesClassifier": "ExtraTreesClassifier_default_HyperparamSpace.json", | ||
"GradientBoostingClassifier": "GradientBoostingClassifier_default_HyperparamSpace.json", | ||
"XGBClassifier": "XGBClassifier_default_HyperparamSpace.json", | ||
"CustomXGBClassifier": "CustomXGBClassifier_default_HyperparamSpace.json", | ||
"SVC": "SVC_default_HyperparamSpace.json" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
from .base import BaseOptimizer | ||
from .trees import TreeOptimizer, ForestOptimizer, ExtraTreesOptimizer, GradientBoostingOptimizer | ||
from .xgb import XGBClassifierOptimizer, CustomXGBClassifierOptimizer | ||
from .svc import SVCOptimizer | ||
from .keras import KerasClassifierOptimizer | ||
from .catboost import CatBoostClassifierOptimizer | ||
from .meta import SklearnOptimizer |
Oops, something went wrong.