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
If True only mandatory parameters are set.
- ignore_var_keywordboolean
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 inspect package.
- kwargskwargs
All parameters that could be used for calling f_callable.
- Returns
- called object