mlm_insights.builder.utils package

Submodules

mlm_insights.builder.utils.builder_utils module

mlm_insights.builder.utils.builder_utils.get_feature_list(transformed_schema: Schema) List[str]
mlm_insights.builder.utils.builder_utils.get_transformed_input_schema(input_schema: Dict[str, FeatureType], transformers: List[Transformer]) Schema
mlm_insights.builder.utils.builder_utils.validate_feature_schema(transformed_schema: Schema) None

This method validates the transformed schema to ensure the schema doesn’t have any discrepancies

mlm_insights.builder.utils.builder_utils.validate_metrics(transformed_schema: Schema, metrics: MetricDetail) None
mlm_insights.builder.utils.builder_utils.validate_required_components(input_schema: Dict[str, FeatureType], reader: DataReader | None, data_frame: Any) None

mlm_insights.builder.utils.generate_input_schema_utils module

mlm_insights.builder.utils.generate_input_schema_utils.classify_variable_type(data: DataFrame, columns: List[str], dtype: str) Dict[str, Any]

Classify the variable_type of feature based on dtype

Parameters

data: DataFrame columns: List[str]

List of feature name

dtype: List[str]

List of dtype_types for each feature

Returns

Dict[str, Any]

mlm_insights.builder.utils.generate_input_schema_utils.convert_column_type(column: str, target_features: List[str], prediction_features: List[str], prediction_score_features: List[str]) ColumnType

Convert column_type of feature

Parameters

column: str

Name of feature

target_features: List[str]

List of target_features name

prediction_features: List[str]

List of prediction_features name

prediction_score_features: List[str]

List of prediction_score_features name

Returns

ColumnType

mlm_insights.builder.utils.generate_input_schema_utils.convert_data_type(dtype: str) DataType

Convert dtype of feature

Parameters

dtype: str data type of feature

Returns

DataType

mlm_insights.builder.utils.generate_input_schema_utils.convert_variable_type(variable_type: str) VariableType

Convert variable_type of feature

Parameters

variable_type: str variable_type of feature

Returns

VariableType

mlm_insights.builder.utils.generate_input_schema_utils.create_output_schema(column_names: List[str], inferred_types: List[str], variable_type: Dict[str, Any], target_features: List[str], prediction_features: List[str], prediction_score_features: List[str]) Dict[str, Any]

Create input_schema

Parameters

column_names: List[str]

List of column_names name

inferred_types: List[str]

List of inferred_types for each feature

variable_type: List[str]

List of variable_type for each feature

target_features: List[str]

List of target_features name

prediction_features: List[str]

List of prediction_features name

prediction_score_features: List[str]

List of prediction_score_features name

Returns

input_schema: Dict[str, Any]

mlm_insights.builder.utils.generate_input_schema_utils.generate_input_schema_using_dataset(file_location: str, target_features: List[str], prediction_features: List[str], prediction_score_features: List[str]) Dict[str, Any]

Method to generate the approximated input_schema based on the dataset .

Parameters

file_locationstr

Sample dataset location

target_featuresList[str]

List of target_features names

prediction_featuresList[str]

List of target_features names

prediction_score_featuresList[str]

List of target_features names

Returns

input_schema : Dict[str, Any]

Module contents