watex.utils.mlutils.fetchModel#
- watex.utils.mlutils.fetchModel(file, *, default=True, name=None, storage='joblib')[source]#
Fetch your data/model saved using Python pickle or joblib module.
- Parameters:
file (str or Path-Like object) – dumped model file name saved using joblib or Python pickle module.
path (path-Like object ,) – Path to model dumped file =`modelfile`
default (bool,) – Model parameters by default are saved into a dictionary. When default is
True, returns a tuple of pair (the model and its best parameters). IfFalsereturn all values saved from ~.MultipleGridSearchstorage (str, default='joblib') – kind of module use to pickling the data
name (str) – Is the name of model to retreived from dumped file. If name is given get only the model and its best parameters.
- Returns:
- `data` – data composed of models, classes and params for ‘best_model’, ‘best_params_’ and ‘best_scores’ if default is
True, and model dumped and all parameters otherwise.- Return type:
Tuple (Dict, )
Example
>>> from watex.bases import fetch_model >>> my_model, = fetchModel ('SVC__LinearSVC__LogisticRegression.pkl', default =False, modname='SVC') >>> my_model