A collection of PriorParam instances, used to define the fitting region for a fitting function.
| Static Method | get |
Returns the argument names of the passed callable, if the callable has a "arg_names" attribute, returns that otherwise uses the inspect module. |
| Method | __getitem__ |
Retrieves a parameter by name or index |
| Method | __init__ |
Undocumented |
| Method | __len__ |
Undocumented |
| Method | __repr__ |
Undocumented |
| Method | append |
Adds a PriorParam to the set |
| Method | apply |
Given some callable acallable, that accepts arg_names. Call it with the values for those arguments provided in variable_param_values, const_param_values, defaults, not_found_value. Where that list is in order of preference (e... |
| Method | get |
Gets a linear transform from some input domain to some output domain for a set of parameter names |
| Method | wrap |
Put in a callable with some arguments callable(arg1, arg2, arg3,...), returns a callable that packs all variable params as the first argument, and all const params as the other arguments. |
| Method | wrap |
Put in a callable with some arguments callable(arg1, arg2, arg3,...), returns a callable that packs all params as the first argument. |
| Instance Variable | all |
Undocumented |
| Instance Variable | all |
Undocumented |
| Instance Variable | param |
Undocumented |
| Instance Variable | prior |
Undocumented |
| Property | all |
The names of all paramters |
| Property | constant |
The names of the constant parameters |
| Property | consts |
Returns a dictionary of the constant parameter names and values |
| Property | variable |
The names of the variable parameters |
def get_arg_names_of_callable(acallable:
Callable, arg_names: list[ str, ...] | None = None):
¶
Returns the argument names of the passed callable, if the callable has a "arg_names" attribute, returns that otherwise uses the inspect module.
- # ARGUMENTS #
- acallable : Callable
- Some callable to get the argument names of
- arg_names : None | list[str,...]
- If not None, returns this instead of doing any work. Useful if you know exactly what the argument names of the callable are.
Callable[ P, Any], variable_param_values: dict[ str, Any], const_param_values: dict[ str, Any], defaults: dict[ str, Any] = {}, not_found_value: Any = None, arg_names: list[ str, ...] | None = None):
¶
Given some callable acallable, that accepts arg_names. Call it with the values for those arguments provided in variable_param_values,
const_param_values, defaults, not_found_value. Where that list is in order of preference (e.g., an argument in both const_param_values and defaults
will have the value specified in const_param_values.
If arg_names is None, will try and infer the argument names of acallable via self.get_arg_names_of_callable().
tuple[ str] | list[ str], in_domain: tuple[ float, float] | list[ float, float] | np.ndarray[ [ 2, N], float]):
¶
Gets a linear transform from some input domain to some output domain for a set of parameter names
dict[ str, str] = {}, constant_params_as_defaults=True, arg_names: list[ str, ...] | None = None):
¶
Put in a callable with some arguments callable(arg1, arg2, arg3,...), returns a callable
that packs all variable params as the first argument, and all const params as the other arguments.
i.e., accepts callable:
callable(arg1, arg2, arg3, arg4, ...)
- returns callable:
callable((arg1,arg3,...), arg2, arg4, ...)- # RETURNS #
- new_callable
- A wrapper that accepts all variable parameters as the first argument, and all constant parameters as the other arguments
- var_params
- A list of the variable parameters in the first argument of
new_callable, in the order they are present in the first argument - const_params
- A list of the constant parameters that make up the rest of the arguments to
new_callable, in the order they are present in the argument list.
dict[ str, str] = {}):
¶
Put in a callable with some arguments callable(arg1, arg2, arg3,...), returns a callable
that packs all params as the first argument.
i.e., accepts callable:
callable(arg1, arg2, arg3, arg4, ...)
- returns callable:
- `callable(
- (arg1,arg3, arg2, arg4, ...)
)`
- # RETURNS #
- new_callable
- Wrapper that accepts arguments as a single tuple
- param_names
- Parameters names in the order they go into
new_callable