@@ -93,10 +93,11 @@ def __init__(
9393 n_jobs : Optional [int ] = None ,
9494 max_memory_mb : Optional [int ] = None ,
9595 verbosity : int = logging .WARNING ,
96- search : BaseSearch = AsyncEA () ,
97- post_processing : BasePostProcessing = BestFitPostProcessing () ,
96+ search : Optional [ BaseSearch ] = None ,
97+ post_processing : Optional [ BasePostProcessing ] = None ,
9898 output_directory : Optional [str ] = None ,
9999 store : str = "logs" ,
100+ goal : str = "simplicity" ,
100101 ):
101102 """
102103
@@ -148,12 +149,14 @@ def __init__(
148149 verbosity: int (default=logging.WARNING)
149150 Sets the level of log messages to be automatically output to terminal.
150151
151- search: BaseSearch (default=AsyncEA())
152+ search: BaseSearch, optional
152153 Search method to use to find good pipelines. Should be instantiated.
154+ Default depends on ``goal``.
153155
154- post_processing: BasePostProcessing (default=BestFitPostProcessing())
156+ post_processing: BasePostProcessing, optional
155157 Post-processing method to create a model after the search phase.
156158 Should be an instantiated subclass of BasePostProcessing.
159+ Default depends on ``goal``.
157160
158161 output_directory: str, optional (default=None)
159162 Directory to use to save GAMA output. This includes both intermediate
@@ -166,7 +169,24 @@ def __init__(
166169 - 'models': keep only cache with models and predictions
167170 - 'logs': keep only the logs
168171 - 'all': keep logs and cache with models and predictions
172+
173+ goal: str (default='simplicity')
174+ Determines the steps of the AutoML pipeline when they are not
175+ provided explicitly, based on the given goal.
176+ One of:
177+ - simplicity: Create a simple pipeline with good performance.
178+ - performance: Try to get the best performing model.
169179 """
180+ if search is None :
181+ search = AsyncEA ()
182+ if post_processing is None :
183+ if goal == 'simplicity' :
184+ post_processing = BestFitPostProcessing ()
185+ elif goal == 'performance' :
186+ post_processing = EnsemblePostProcessing ()
187+ else :
188+ raise ValueError (f"Unknown value for `goal`: '{ goal } '" )
189+
170190 if not output_directory :
171191 output_directory = f"gama_{ str (uuid .uuid4 ())} "
172192 self .output_directory = os .path .abspath (os .path .expanduser (output_directory ))
0 commit comments