-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better legacy archive, prepare for later changes
- Loading branch information
Showing
7 changed files
with
394 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
""" | ||
File: _legacy.py | ||
Author: Panyi Dong | ||
GitHub: https://github.com/PanyiDong/ | ||
Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) | ||
Project: My_AutoML | ||
Latest Version: 0.2.0 | ||
Relative Path: /My_AutoML/_balancing/_legacy.py | ||
File Created: Friday, 8th April 2022 9:19:36 pm | ||
Author: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
Last Modified: Friday, 8th April 2022 9:19:56 pm | ||
Modified By: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
MIT License | ||
Copyright (c) 2022 - 2022, Panyi Dong | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
from ._over_sampling import SimpleRandomOverSampling, Smote | ||
from ._under_sampling import ( | ||
SimpleRandomUnderSampling, | ||
TomekLink, | ||
EditedNearestNeighbor, | ||
CondensedNearestNeighbor, | ||
OneSidedSelection, | ||
CNN_TomekLink, | ||
) | ||
from ._mixed_sampling import Smote_TomekLink, Smote_ENN | ||
from My_AutoML._base import no_processing | ||
|
||
balancings = { | ||
"no_processing": no_processing, | ||
"SimpleRandomOverSampling": SimpleRandomOverSampling, | ||
"SimpleRandomUnderSampling": SimpleRandomUnderSampling, | ||
"TomekLink": TomekLink, | ||
"EditedNearestNeighbor": EditedNearestNeighbor, | ||
"CondensedNearestNeighbor": CondensedNearestNeighbor, | ||
"OneSidedSelection": OneSidedSelection, | ||
"CNN_TomekLink": CNN_TomekLink, | ||
"Smote": Smote, | ||
"Smote_TomekLink": Smote_TomekLink, | ||
"Smote_ENN": Smote_ENN, | ||
} |
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,43 @@ | ||
""" | ||
File: _legacy.py | ||
Author: Panyi Dong | ||
GitHub: https://github.com/PanyiDong/ | ||
Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) | ||
Project: My_AutoML | ||
Latest Version: 0.2.0 | ||
Relative Path: /My_AutoML/_encoding/_legacy.py | ||
File Created: Friday, 8th April 2022 9:20:03 pm | ||
Author: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
Last Modified: Friday, 8th April 2022 9:20:14 pm | ||
Modified By: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
MIT License | ||
Copyright (c) 2022 - 2022, Panyi Dong | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
from ._encoding import DataEncoding | ||
|
||
encoders = {"DataEncoding": DataEncoding} |
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,74 @@ | ||
""" | ||
File: _legacy.py | ||
Author: Panyi Dong | ||
GitHub: https://github.com/PanyiDong/ | ||
Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) | ||
Project: My_AutoML | ||
Latest Version: 0.2.0 | ||
Relative Path: /My_AutoML/_feature_selection/_legacy.py | ||
File Created: Friday, 8th April 2022 9:20:27 pm | ||
Author: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
Last Modified: Friday, 8th April 2022 9:20:55 pm | ||
Modified By: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
MIT License | ||
Copyright (c) 2022 - 2022, Panyi Dong | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
from ._base import RBFSampler | ||
from ._advance import FeatureFilter, ASFFS, GeneticAlgorithm | ||
from My_AutoML._base import no_processing | ||
|
||
import autosklearn | ||
import autosklearn.pipeline.components.feature_preprocessing | ||
|
||
feature_selections = { | ||
"no_processing": no_processing, | ||
# "LDASelection": LDASelection, | ||
# "PCA_FeatureSelection": PCA_FeatureSelection, | ||
"RBFSampler": RBFSampler, | ||
"FeatureFilter": FeatureFilter, | ||
"ASFFS": ASFFS, | ||
"GeneticAlgorithm": GeneticAlgorithm, | ||
# 'densifier' : autosklearn.pipeline.components.feature_preprocessing.densifier.Densifier, # from autosklearn | ||
"extra_trees_preproc_for_classification": autosklearn.pipeline.components.feature_preprocessing.extra_trees_preproc_for_classification.ExtraTreesPreprocessorClassification, | ||
"extra_trees_preproc_for_regression": autosklearn.pipeline.components.feature_preprocessing.extra_trees_preproc_for_regression.ExtraTreesPreprocessorRegression, | ||
# "fast_ica": autosklearn.pipeline.components.feature_preprocessing.fast_ica.FastICA, | ||
# "feature_agglomeration": autosklearn.pipeline.components.feature_preprocessing.feature_agglomeration.FeatureAgglomeration, | ||
# "kernel_pca": autosklearn.pipeline.components.feature_preprocessing.kernel_pca.KernelPCA, | ||
# "kitchen_sinks": autosklearn.pipeline.components.feature_preprocessing.kitchen_sinks.RandomKitchenSinks, | ||
"liblinear_svc_preprocessor": autosklearn.pipeline.components.feature_preprocessing.liblinear_svc_preprocessor.LibLinear_Preprocessor, | ||
# "nystroem_sampler": autosklearn.pipeline.components.feature_preprocessing.nystroem_sampler.Nystroem, | ||
# "pca": autosklearn.pipeline.components.feature_preprocessing.pca.PCA, | ||
"polynomial": autosklearn.pipeline.components.feature_preprocessing.polynomial.PolynomialFeatures, | ||
# "random_trees_embedding": autosklearn.pipeline.components.feature_preprocessing.random_trees_embedding.RandomTreesEmbedding, | ||
# 'select_percentile' : autosklearn.pipeline.components.feature_preprocessing.select_percentile.SelectPercentileBase, | ||
"select_percentile_classification": autosklearn.pipeline.components.feature_preprocessing.select_percentile_classification.SelectPercentileClassification, | ||
"select_percentile_regression": autosklearn.pipeline.components.feature_preprocessing.select_percentile_regression.SelectPercentileRegression, | ||
"select_rates_classification": autosklearn.pipeline.components.feature_preprocessing.select_rates_classification.SelectClassificationRates, | ||
"select_rates_regression": autosklearn.pipeline.components.feature_preprocessing.select_rates_regression.SelectRegressionRates, | ||
"truncatedSVD": autosklearn.pipeline.components.feature_preprocessing.truncatedSVD.TruncatedSVD, | ||
} |
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,54 @@ | ||
""" | ||
File: _legacy.py | ||
Author: Panyi Dong | ||
GitHub: https://github.com/PanyiDong/ | ||
Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) | ||
Project: My_AutoML | ||
Latest Version: 0.2.0 | ||
Relative Path: /My_AutoML/_imputation/_legacy.py | ||
File Created: Friday, 8th April 2022 9:21:08 pm | ||
Author: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
Last Modified: Friday, 8th April 2022 9:21:33 pm | ||
Modified By: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
MIT License | ||
Copyright (c) 2022 - 2022, Panyi Dong | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
from ._base import SimpleImputer, DummyImputer, JointImputer | ||
from ._multiple import ExpectationMaximization, KNNImputer, MissForestImputer, MICE | ||
from ._nn import GAIN | ||
|
||
imputers = { | ||
"SimpleImputer": SimpleImputer, | ||
# 'DummyImputer' : DummyImputer, | ||
"JointImputer": JointImputer, | ||
"ExpectationMaximization": ExpectationMaximization, | ||
"KNNImputer": KNNImputer, | ||
"MissForestImputer": MissForestImputer, | ||
"MICE": MICE, | ||
"GAIN": GAIN, | ||
} |
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,90 @@ | ||
""" | ||
File: _legacy.py | ||
Author: Panyi Dong | ||
GitHub: https://github.com/PanyiDong/ | ||
Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) | ||
Project: My_AutoML | ||
Latest Version: 0.2.0 | ||
Relative Path: /My_AutoML/_model/_legacy.py | ||
File Created: Friday, 8th April 2022 9:18:08 pm | ||
Author: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
Last Modified: Friday, 8th April 2022 9:18:53 pm | ||
Modified By: Panyi Dong (panyid2@illinois.edu) | ||
----- | ||
MIT License | ||
Copyright (c) 2022 - 2022, Panyi Dong | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
import autosklearn.pipeline.components.classification | ||
import autosklearn.pipeline.components.regression | ||
|
||
#################################################################################################### | ||
# classifiers | ||
|
||
classifiers = { | ||
# classification models from autosklearn | ||
"AdaboostClassifier": autosklearn.pipeline.components.classification.adaboost.AdaboostClassifier, | ||
"BernoulliNB": autosklearn.pipeline.components.classification.bernoulli_nb.BernoulliNB, | ||
"DecisionTree": autosklearn.pipeline.components.classification.decision_tree.DecisionTree, | ||
"ExtraTreesClassifier": autosklearn.pipeline.components.classification.extra_trees.ExtraTreesClassifier, | ||
"GaussianNB": autosklearn.pipeline.components.classification.gaussian_nb.GaussianNB, | ||
"GradientBoostingClassifier": autosklearn.pipeline.components.classification.gradient_boosting.GradientBoostingClassifier, | ||
"KNearestNeighborsClassifier": autosklearn.pipeline.components.classification.k_nearest_neighbors.KNearestNeighborsClassifier, | ||
"LDA": autosklearn.pipeline.components.classification.lda.LDA, | ||
"LibLinear_SVC": autosklearn.pipeline.components.classification.liblinear_svc.LibLinear_SVC, | ||
"LibSVM_SVC": autosklearn.pipeline.components.classification.libsvm_svc.LibSVM_SVC, | ||
"MLPClassifier": autosklearn.pipeline.components.classification.mlp.MLPClassifier, | ||
"MultinomialNB": autosklearn.pipeline.components.classification.multinomial_nb.MultinomialNB, | ||
"PassiveAggressive": autosklearn.pipeline.components.classification.passive_aggressive.PassiveAggressive, | ||
"QDA": autosklearn.pipeline.components.classification.qda.QDA, | ||
"RandomForest": autosklearn.pipeline.components.classification.random_forest.RandomForest, | ||
"SGD": autosklearn.pipeline.components.classification.sgd.SGD, | ||
} | ||
|
||
# regressors | ||
regressors = { | ||
# regression models from autosklearn | ||
"AdaboostRegressor": autosklearn.pipeline.components.regression.adaboost.AdaboostRegressor, | ||
"ARDRegression": autosklearn.pipeline.components.regression.ard_regression.ARDRegression, | ||
"DecisionTree": autosklearn.pipeline.components.regression.decision_tree.DecisionTree, | ||
"ExtraTreesRegressor": autosklearn.pipeline.components.regression.extra_trees.ExtraTreesRegressor, | ||
"GaussianProcess": autosklearn.pipeline.components.regression.gaussian_process.GaussianProcess, | ||
"GradientBoosting": autosklearn.pipeline.components.regression.gradient_boosting.GradientBoosting, | ||
"KNearestNeighborsRegressor": autosklearn.pipeline.components.regression.k_nearest_neighbors.KNearestNeighborsRegressor, | ||
"LibLinear_SVR": autosklearn.pipeline.components.regression.liblinear_svr.LibLinear_SVR, | ||
"LibSVM_SVR": autosklearn.pipeline.components.regression.libsvm_svr.LibSVM_SVR, | ||
"MLPRegressor": autosklearn.pipeline.components.regression.mlp.MLPRegressor, | ||
"RandomForest": autosklearn.pipeline.components.regression.random_forest.RandomForest, | ||
"SGD": autosklearn.pipeline.components.regression.sgd.SGD, | ||
} | ||
|
||
|
||
""" | ||
LibSVM_SVR, MLP and SGD have problems of requiring inverse_transform | ||
of StandardScaler while having 1D array | ||
https://github.com/automl/auto-sklearn/issues/1297 | ||
problem solved | ||
""" |
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
Oops, something went wrong.