Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
col_names : List
Contains list of feature/column names.
target_name : String
Name of the Target column.
mining_imp_val : tuple
Contains the mining_attributes,mining_strategy, mining_impute_value.
categoric_values : tuple
Contains Categorical attribute names and its values
model_name : string
Name of the model
Returns
-------
Returns the MiningModel for the given LGB model
"""
model_kwargs = sklToPmml.get_model_kwargs(model, col_names, target_name, mining_imp_val,categoric_values)
mining_models = list()
mining_models.append(pml.MiningModel(
modelName=model_name if model_name else "LightGBModel",
Segmentation=get_outer_segmentation(model, derived_col_names, col_names, target_name, mining_imp_val,categoric_values,model_name),
**model_kwargs
))
return mining_models
Contains list of feature/column names.
target_name : String
Name of the Target column.
mining_imp_val : tuple
Contains the mining_attributes,mining_strategy, mining_impute_value.
categoric_values : tuple
Contains Categorical attribute names and its values
model_name : string
Name of the model
Returns
-------
mining_models :
Returns Nyoka's MiningModel object
"""
model_kwargs = sklToPmml.get_model_kwargs(model, col_names, target_name, mining_imp_val, categoric_values)
if 'XGBRegressor' in str(model.__class__):
model_kwargs['Targets'] = sklToPmml.get_targets(model, target_name)
mining_models = list()
mining_models.append(pml.MiningModel(
modelName=model_name if model_name else "XGBoostModel",
Segmentation=get_outer_segmentation(model, derived_col_names, col_names, target_name, mining_imp_val,categoric_values,model_name),
**model_kwargs
))
return mining_models