skactiveml.utils.call_func#
- skactiveml.utils.call_func(f_callable, only_mandatory=False, ignore_var_keyword=False, **kwargs)[source]#
Calls a function with the given parameters given in kwargs, if they exist as parameters in f_callable.
- Parameters
- f_callablecallable
The function or object that is to be called.
- only_mandatoryboolean, default=False
If True, only mandatory parameters are set.
- ignore_var_keywordboolean, default=False
If False, all kwargs are passed when f_callable uses a parameter that is of kind Parameter.VAR_KEYWORD, i.e., **kwargs. For further reference see the inspect package.
- kwargskwargs
All parameters that could be used for calling f_callable.
- Returns
- f_callable_resultreturn type of f_callable
The return value of f_callable.