AssessmentSpec#

class scikitplot.feature_selection.AssessmentSpec(provider, params=(), enabled=True)[source]#

Which provider answers one assessment question, with which parameters.

Parameters:
providerstr

Name of a registered provider (see list_assessment_providers).

paramsmapping of str to scalar or list of scalars, default=()

Provider parameters; unknown names are refused when profiling. A None value means “use the provider default” and is not stored, so every format (TOML has no null) holds the same spec.

enabledbool, default=True

False switches the assessment off without removing it.

Parameters:

Notes

Developer note. params is stored as a sorted tuple of (name, value) pairs so the spec stays hashable; use params_dict to read it as a mapping.

enabled: bool = True#
classmethod from_value(value, *, field='assessment')[source]#

Build a spec from its config form.

Parameters:
valuemapping or AssessmentSpec

{"provider": ..., "params": {...}, "enabled": ...}.

fieldstr, default=”assessment”

Name used in error messages.

Returns:
AssessmentSpec

The spec.

Parameters:
Return type:

AssessmentSpec

params: tuple[tuple[str, Any], ...] = ()#
property params_dict: dict[str, Any]#

The parameters as a mapping (tuples stay tuples).

Type:

dict

provider: str[source]#
to_dict()[source]#

Return the config form.

Return type:

dict[str, Any]