pc.get_default_config
pc.get_default_config(dataset, targets=None, automl=False, hyperopt=False)
Get the default config used to create a model. Can be populated with basic defaults,
autoML defaults, or autoML with hyperopt defaults. This function can help as a good
starting point for building a model config instead of having to create one from scratch.
Parameters:
dataset: str
Dataset to generate default config from.
targets: Union[str, List[str]], default None
Target(s) in the dataset to use as output features.
hyperopt: bool, default False
Whether to generate the default config with autoML suggested parameters.
hyperopt: bool, default False
Whether to generate the default config with autoML suggested parameters and a hyperopt section.
Returns:
Config(dict)
Examples:
Generate a default config from a dataset.
config = pc.get_default_config(dataset, targets='Survived')
config
# > {'trainer': {'batch_size': 'auto',
# 'learning_rate': 'auto',
# 'learning_rate_scaling': 'sqrt',
# 'decay': True,
# 'decay_steps': 20000,
# 'decay_rate': 0.8,
# 'optimizer': {'type': 'adam'},
# 'tune_batch_size': {'type': 'bin_search', 'substitute_with_max': True}},
# 'input_features': [{'name': 'Pclass', 'column': 'Pclass', 'type': 'category'},
# {'name': 'Sex', 'column': 'Sex', 'type': 'category'},
# {'name': 'Age', 'column': 'Age', 'type': 'number'},
# {'name': 'SibSp', 'column': 'SibSp', 'type': 'number'},
# {'name': 'Parch', 'column': 'Parch', 'type': 'category'},
# {'name': 'Fare', 'column': 'Fare', 'type': 'number'},
# {'name': 'Cabin', 'column': 'Cabin', 'type': 'category'},
# {'name': 'Embarked', 'column': 'Embarked', 'type': 'category'}],
# 'output_features': [{'name': 'Survived',
# 'column': 'Survived',
# 'type': 'binary'}],
# 'combiner': {'type': 'tabnet'}}