minvime package¶
Submodules¶
minvime.estimator_classification module¶
Estimator Functions for estimating model performance requirements from business criteria
-
minvime.estimator_classification.calculate_auc(fprates, tprates)[source]¶ Calculate the AUC of given ROC curve (defined by vectors of FPR and TPR)
-
minvime.estimator_classification.calculate_peak_roi(fprates, tprates, tp, fp, tn, fn, num_pos, num_neg)[source]¶ Calculate the maximal ROI for a given ROC curve (defined by vectors of FPR and TPR)
-
minvime.estimator_classification.estimate_binary_model_requirements(tp, fp, tn, fn, cases, baserate, minroi=0)[source]¶ Determine the minimal performance characteristics of a binary classification model
- Parameters
tp (float, required) – The benefit of a True Positive Prediction
fp (float, required) – The cost of a False Positive Prediction
tn (float, required) – The benefit of a True Negative Prediction
fn (float, required) – The cost of a False Negative Prediction
cases (integer, required) – The number of events/cases that occur within the period of analysis.
baserate (float, required) – The rate at which the event being predicted occurs
minroi (float, optional) – The minimum required ROI for the model, defaults to 0.0
*Returns a tuple containing min_auc, min_precision, min_recall, fprates tprs
minvime.estimator_regression module¶
Performance Estimator for Regression Models Functions for estimating the required model performance requirements from business criteria
-
minvime.estimator_regression.calculate_candidate_roi(dist, candidate, pred_value, under_pred, under_pred_unit, over_pred, over_pred_unit)[source]¶
minvime.generator module¶
Distribution Generators for use in Performance Estimation for Regression Models
-
minvime.generator.extract_distribution_from_sample(filepath)[source]¶ Extract a sample of target values from a file on the given path
minvime.minvime module¶
MinViME is a flask application allowing users to estimate minimal viable models for machine learning projects.
-
minvime.minvime.analyse_intervention()[source]¶ Renders the intervention analysis page. Expects parameters from http session.
-
minvime.minvime.analyse_proportional()[source]¶ Renders the analysis of proportional regression problems page. Expects parameters from http session.
-
minvime.minvime.analyse_thresholded()[source]¶ Renders the thresholded regression problem analysis page. Expects parameters from http session.
-
minvime.minvime.intervention()[source]¶ Renders the intervention page. Expects parameters from http session.
-
minvime.minvime.main(port=5000, debug=False)[source]¶ Launch the minvime Flask application.
- Parameters
port (integer, optional) – The port to launch the app on, defaults to 5000
debug (boolean, optional)) – Enable debug mode – print errors to the console, defaults to False
-
minvime.minvime.payoff_matrix()[source]¶ Renders the payoff matrix page. Expects parameters from http session.