hparam_optim#
- caf.brain.ml.hparam_optim(model_choice, data, output_path, target, is_time_series=None, weight=None, classification_prediction=None)[source]#
Hyperparameter optimisation for your selected algorithm.
Algorithm must be part of the Models enum class.
- Parameters:
model_choice (Models) – List or one algorithm to use as the base of the model. Available algorithms can be seen in _ml_inputs.py or __info__.py.
is_time_series (bool | None) – If true then data must be time series. Time series based characteristics are taken into consideration during function execution.
data (DataFrame) – Pandas Dataframe of your data. Structured or semi-structured tabular format.
target (str) – Column in your data that is the target variable (Y, dependent variable), what you want to predict.
weight (str | None) – Optional string column value to be used as weight.
classification_prediction (tuple[int, ...] | None) – List of integers that correspond to the target column. The value(s) to predict in a classification problem.
- Return type:
Initialised model with the best combination of hyperparameters.