Old config utils
This file is part of the TPOT library.
The current version of TPOT was developed at Cedars-Sinai by: - Pedro Henrique Ribeiro (https://github.com/perib, https://www.linkedin.com/in/pedro-ribeiro/) - Anil Saini (anil.saini@cshs.org) - Jose Hernandez (jgh9094@gmail.com) - Jay Moran (jay.moran@cshs.org) - Nicholas Matsumoto (nicholas.matsumoto@cshs.org) - Hyunjun Choi (hyunjun.choi@cshs.org) - Miguel E. Hernandez (miguel.e.hernandez@cshs.org) - Jason Moore (moorejh28@gmail.com)
The original version of TPOT was primarily developed at the University of Pennsylvania by: - Randal S. Olson (rso@randalolson.com) - Weixuan Fu (weixuanf@upenn.edu) - Daniel Angell (dpa34@drexel.edu) - Jason Moore (moorejh28@gmail.com) - and many more generous open-source contributors
TPOT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
TPOT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with TPOT. If not, see http://www.gnu.org/licenses/.
convert_config_dict_to_choicepipeline(config_dict)
¶
Takes in a TPOT2 config dictionary and returns a ChoicePipeline search space that represents the config_dict. This space will sample from all included modules in the config_dict.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_dict |
dict
|
The dictionary representation of the TPOT2 config. |
required |
Returns:
Type | Description |
---|---|
ChoicePipeline
|
A ChoicePipeline search space that represents the config_dict. |
Source code in tpot2/old_config_utils/old_config_utils.py
convert_config_dict_to_graphpipeline(config_dict)
¶
Takes in a TPOT2 config dictionary and returns a GraphSearchPipeline search space that represents the config_dict. This space will sample from all included modules in the config_dict. It will also identify classifiers/regressors to set the search space for the root node.
Note doesn't convert estimators so they passthrough inputs like in TPOT1
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_dict |
dict
|
The dictionary representation of the TPOT2 config. |
required |
Returns:
Type | Description |
---|---|
GraphSearchPipeline
|
A GraphSearchPipeline search space that represents the config_dict. |
Source code in tpot2/old_config_utils/old_config_utils.py
convert_config_dict_to_linearpipeline(config_dict)
¶
Takes in a TPOT2 config dictionary and returns a GraphSearchPipeline search space that represents the config_dict. This space will sample from all included modules in the config_dict. It will also identify classifiers/regressors to set the search space for the root node.
Note doesn't convert estimators so they passthrough inputs like in TPOT1
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_dict |
dict
|
The dictionary representation of the TPOT2 config. |
required |
Returns:
Type | Description |
---|---|
GraphSearchPipeline
|
A GraphSearchPipeline search space that represents the config_dict. |
Source code in tpot2/old_config_utils/old_config_utils.py
convert_config_dict_to_list(config_dict)
¶
Takes in a TPOT2 config dictionary and returns a list of search spaces (EstimatorNode, WrapperPipeline)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_dict |
dict
|
The dictionary representation of the TPOT2 config. |
required |
Returns:
Type | Description |
---|---|
list
|
A list of search spaces (EstimatorNode, WrapperPipeline) that represent the config_dict. |
Source code in tpot2/old_config_utils/old_config_utils.py
get_node_space(module_string, params)
¶
Create the search space for a single node in the TPOT2 config.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module_string |
str
|
The string representation of the module and class to load. E.g. 'sklearn.ensemble.RandomForestClassifier' |
required |
params |
dict
|
The dictionary representation of the hyperparameter search space for the module_string. |
required |
Returns:
Type | Description |
---|---|
EstimatorNode or WrapperPipeline
|
|
Source code in tpot2/old_config_utils/old_config_utils.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
load_get_module_from_string(module_string)
¶
Takes a string in the form of 'module.submodule.class' and returns the class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module_string |
str
|
The string representation of the module and class to load. |
required |
Returns:
Type | Description |
---|---|
class
|
The class that was loaded from the module string. |