Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to override the default threshold at model import / to use optimal at eval #267

Conversation

paulhenricalas-dku
Copy link

To be completed by the according PR on DIP

import_mlflow_version_from_managed_folder and import_mlflow_version_from_path take an optional binary_classification_threshold parameter. In bidimensional classification models, it allows the user to override its 0.5 value.

evaluatetakes an optional use_optimal_threshold parameter, set by default to False. It allows the user to evaluate according to the previously computed optimal threshold at training, depending on the metric set in the saved model.

for example:

settings = saved_model.get_settings()
settings.prediction_metrics_settings['thresholdOptimizationMetric'] = 'ACCURACY'
settings.save()

# ...
model_version = saved_model.import_mlflow_version_from_path("v0", model_dir, binary_classification_threshold=0.2)
# ...

# will evaluate using the optimal threshold according to accuracy
model_version.evaluate("DATASET", use_optimal_threshold=True) 

# will evaluate using a threshold set to 0.2
model_version.evaluate("DATASET") 

…mlflow_version functions

Add optional use_optimal_threshold (default False) to evaluate
@lpenet lpenet added this to the V 11.2.0 milestone Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-mielpops Team MieL pOps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants