data_check_action_option ===================================================== .. py:module:: evalml.data_checks.data_check_action_option .. autoapi-nested-parse:: Recommended action returned by a DataCheck. Module Contents --------------- Classes Summary ~~~~~~~~~~~~~~~ .. autoapisummary:: evalml.data_checks.data_check_action_option.DataCheckActionOption evalml.data_checks.data_check_action_option.DCAOParameterAllowedValuesType evalml.data_checks.data_check_action_option.DCAOParameterType Contents ~~~~~~~~~~~~~~~~~~~ .. py:class:: DataCheckActionOption(action_code, data_check_name, parameters=None, metadata=None) A recommended action option returned by a DataCheck. It contains an action code that indicates what the action should be, a data check name that indicates what data check was used to generate the action, and parameters and metadata which can be used to further refine the action. :param action_code: Action code associated with the action option. :type action_code: DataCheckActionCode :param data_check_name: Name of the data check that produced this option. :type data_check_name: str :param parameters: Parameters associated with the action option. Defaults to None. :type parameters: dict :param metadata: Additional useful information associated with the action option. Defaults to None. :type metadata: dict, optional .. rubric:: Examples >>> parameters = { ... "global_parameter_name": { ... "parameter_type": "global", ... "type": "float", ... "default_value": 0.0, ... }, ... "column_parameter_name": { ... "parameter_type": "column", ... "columns": { ... "a": { ... "impute_strategy": { ... "categories": ["mean", "most_frequent"], ... "type": "category", ... "default_value": "mean", ... }, ... "constant_fill_value": {"type": "float", "default_value": 0}, ... }, ... }, ... }, ... } >>> data_check_action = DataCheckActionOption(DataCheckActionCode.DROP_COL, None, metadata={}, parameters=parameters) **Methods** .. autoapisummary:: :nosignatures: evalml.data_checks.data_check_action_option.DataCheckActionOption.convert_dict_to_option evalml.data_checks.data_check_action_option.DataCheckActionOption.get_action_from_defaults evalml.data_checks.data_check_action_option.DataCheckActionOption.to_dict .. py:method:: convert_dict_to_option(action_dict) :staticmethod: Convert a dictionary into a DataCheckActionOption. :param action_dict: Dictionary to convert into an action option. Should have keys "code", "data_check_name", and "metadata". :raises ValueError: If input dictionary does not have keys `code` and `metadata` and if the `metadata` dictionary does not have keys `columns` and `rows`. :returns: DataCheckActionOption object from the input dictionary. .. py:method:: get_action_from_defaults(self) Returns an action based on the defaults parameters. :returns: An based on the defaults parameters the option. :rtype: DataCheckAction .. py:method:: to_dict(self) Return a dictionary form of the data check action option. .. py:class:: DCAOParameterAllowedValuesType Enum for data check action option parameter allowed values type. **Attributes** .. list-table:: :widths: 15 85 :header-rows: 0 * - **CATEGORICAL** - Categorical allowed values type. Parameters that have a set of allowed values. * - **NUMERICAL** - Numerical allowed values type. Parameters that have a range of allowed values. **Methods** .. autoapisummary:: :nosignatures: evalml.data_checks.data_check_action_option.DCAOParameterAllowedValuesType.name evalml.data_checks.data_check_action_option.DCAOParameterAllowedValuesType.value .. py:method:: name(self) The name of the Enum member. .. py:method:: value(self) The value of the Enum member. .. py:class:: DCAOParameterType Enum for data check action option parameter type. **Attributes** .. list-table:: :widths: 15 85 :header-rows: 0 * - **COLUMN** - Column parameter type. Parameters that apply to a specific column in the data set. * - **GLOBAL** - Global parameter type. Parameters that apply to the entire data set. **Methods** .. autoapisummary:: :nosignatures: evalml.data_checks.data_check_action_option.DCAOParameterType.all_parameter_types evalml.data_checks.data_check_action_option.DCAOParameterType.handle_dcao_parameter_type evalml.data_checks.data_check_action_option.DCAOParameterType.name evalml.data_checks.data_check_action_option.DCAOParameterType.value .. py:method:: all_parameter_types(cls) Get a list of all defined parameter types. :returns: List of all defined parameter types. :rtype: list(DCAOParameterType) .. py:method:: handle_dcao_parameter_type(dcao_parameter_type) :staticmethod: Handles the data check action option parameter type by either returning the DCAOParameterType enum or converting from a str. :param dcao_parameter_type: Data check action option parameter type that needs to be handled. :type dcao_parameter_type: str or DCAOParameterType :returns: DCAOParameterType enum :raises KeyError: If input is not a valid DCAOParameterType enum value. :raises ValueError: If input is not a string or DCAOParameterType object. .. py:method:: name(self) The name of the Enum member. .. py:method:: value(self) The value of the Enum member.