docstr: This function trains a given estimator on the entire dataset including the
  holdout set.
  
  
  Example
  --------
  >>> from pycaret.datasets import get_data
  >>> boston = get_data('boston')
  >>> from pycaret.regression import *
  >>> exp_name = setup(data = boston,  target = 'medv')
  >>> lr = create_model('lr')
  >>> final_lr = finalize_model(lr)
  
  
  estimator: scikit-learn compatible object
      Trained model object
  
  
  fit_kwargs: dict, default = {} (empty dict)
      Dictionary of arguments passed to the fit method of the model.
  
  
  groups: str or array-like, with shape (n_samples,), default = None
      Optional group labels when GroupKFold is used for the cross validation.
      It takes an array with shape (n_samples, ) where n_samples is the number
      of rows in training dataset. When string is passed, it is interpreted as
      the column name in the dataset containing group labels.
  
  
  model_only : bool, default = False
      Whether to return the complete fitted pipeline or only the fitted model.
  
  
  experiment_custom_tags: dict, default = None
      Dictionary of tag_name: String -> value: (String, but will be string-ified if
      not) passed to the mlflow.set_tags to add new custom tags for the experiment.
  
  Returns:
      Trained pipeline or model object fitted on complete dataset.
docstr_tok: ["This","function","trains","a","given","estimator","on","the","entire","dataset","including","the","holdout","set",".","Example","--","--","--","--",">",">",">","from","pycaret.datasets","import","get_data",">",">",">","boston","=","get_data","(","'boston","'",")",">",">",">","from","pycaret.regression","import","*",">",">",">","exp_name","=","setup","(","data","=","boston",",","target","=","'medv","'",")",">",">",">","lr","=","create_model","(","'lr","'",")",">",">",">","final_lr","=","finalize_model","(","lr",")","estimator",":","scikit-learn","compatible","object","Trained","model","object","fit_kwargs",":","dict",",","default","=","{","}","(","empty","dict",")","Dictionary","of","arguments","passed","to","the","fit","method","of","the","model",".","groups",":","str","or","array-like",",","with","shape","(","n_samples",",",")",",","default","=","None","Optional","group","labels","when","GroupKFold","is","used","for","the","cross","validation",".","It","takes","an","array","with","shape","(","n_samples",",",")","where","n_samples","is","the","number","of","rows","in","training","dataset",".","When","string","is","passed",",","it","is","interpreted","as","the","column","name","in","the","dataset","containing","group","labels",".","model_only",":","bool",",","default","=","False","Whether","to","return","the","complete","fitted","pipeline","or","only","the","fitted","model",".","experiment_custom_tags",":","dict",",","default","=","None","Dictionary","of","tag_name",":","String","-",">","value",":","(","String",",","but","will","be","string-ified","if","not",")","passed","to","the","mlflow.set_tags","to","add","new","custom","tags","for","the","experiment",".","Returns",":","Trained","pipeline","or","model","object","fitted","on","complete","dataset","."]
code: def finalize_model(
      self,
      estimator,
      fit_kwargs: Optional[dict] = None,
      groups: Optional[Union[str, Any]] = None,
      model_only: bool = False,
      experiment_custom_tags: Optional[Dict[str, Any]] = None,
  ) -> Any:
      """
      This function trains a given estimator on the entire dataset including the
      holdout set.
  
  
      Example
      --------
      >>> from pycaret.datasets import get_data
      >>> boston = get_data('boston')
      >>> from pycaret.regression import *
      >>> exp_name = setup(data = boston,  target = 'medv')
      >>> lr = create_model('lr')
      >>> final_lr = finalize_model(lr)
  
  
      estimator: scikit-learn compatible object
          Trained model object
  
  
      fit_kwargs: dict, default = {} (empty dict)
          Dictionary of arguments passed to the fit method of the model.
  
  
      groups: str or array-like, with shape (n_samples,), default = None
          Optional group labels when GroupKFold is used for the cross validation.
          It takes an array with shape (n_samples, ) where n_samples is the number
          of rows in training dataset. When string is passed, it is interpreted as
          the column name in the dataset containing group labels.
  
  
      model_only : bool, default = False
          Whether to return the complete fitted pipeline or only the fitted model.
  
  
      experiment_custom_tags: dict, default = None
          Dictionary of tag_name: String -> value: (String, but will be string-ified if
          not) passed to the mlflow.set_tags to add new custom tags for the experiment.
  
      Returns:
          Trained pipeline or model object fitted on complete dataset.
  
      """
  
      return super().finalize_model(
          estimator=estimator,
          fit_kwargs=fit_kwargs,
          groups=groups,
          model_only=model_only,
          experiment_custom_tags=experiment_custom_tags,
      )
  
imports: import logging
  import re
  import time
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from joblib.memory import Memory
  from pycaret.containers.metrics.regression import get_all_metric_containers
  from pycaret.containers.models.regression import ALL_ALLOWED_ENGINES, get_all_model_containers, get_container_default_engines
  from pycaret.internal.display import CommonDisplay
  from pycaret.internal.logging import get_logger
  from pycaret.internal.parallel.parallel_backend import ParallelBackend
  from pycaret.internal.pipeline import Pipeline
  from pycaret.internal.preprocess.preprocessor import Preprocessor
  from pycaret.internal.pycaret_experiment.non_ts_supervised_experiment import _NonTSSupervisedExperiment
  from pycaret.loggers.base_logger import BaseLogger
  from pycaret.utils.constants import DATAFRAME_LIKE, SEQUENCE_LIKE, TARGET_LIKE
  from pycaret.utils.generic import MLUsecase, highlight_setup
label_desc: Use image node_id 16 for calling the RegressionExperiment obj's underlying member method code with example usage: obj.finalize_model(estimator, fit_kwargs, groups, model_only, experiment_custom_tags) and returns: super