Home
Ministry of LabourClient · project at CIARS

Public contracts: risk, duration and cost

Models estimate a public contract’s outcome, duration and cost.

Three tasks, three models

Built an outcome classifier and separate duration and cost regressors.

STACK

  • Python
  • scikit-learn
  • SVM
  • Random Forest
  • Extra Trees
  • pandas

From contract records to three analytical assessments

OUTCOME CLASSIFICATION · DURATION REGRESSION · COST REGRESSIONPan the diagram or select a stage below
From contract records to three analytical assessmentsClassification estimates outcome; two regressions estimate duration and cost. Each target has its own error and feature-importance analysis.01 / CONTRACT FEATURESProcurement & counterpartycategories · financial fieldsTask-specific preparationencoding · missing valuesModel featuresstandardization02 / OUTCOME: CLASS QUALITY AND SCORE BEHAVIORClassifier comparisonLogistic regressionDecision tree · SVMClass and score scaleAccuracy: class qualityRisk-score distributionOutcome assessmentCompleted / terminatedNumerical risk scoretarget: contract statusspread ≠ calibrations(x) ∈ [0, 1]03 / TWO REGRESSIONS AND THE EXPERIMENT SEQUENCENumerical targetsDuration in daysend − startContract costBaseline modelsLinear · SVR · treeError diagnosisR² · RMSE · MAPERefined comparisonIQR on durationRandom ForestExtra TreesBoosting modelsTwo estimatesDurationCostevaluate again04 / GLOBAL IMPORTANCE FOR EACH TARGETFinancial fieldsProcurement attributesCost-related fieldsInput rolesin the modelsFeature importance describes model-wide behavior.

Classification estimates outcome; two regressions estimate duration and cost. Each target has its own error and feature-importance analysis.

DIAGRAM NOTE

Status means contract completion or termination. A wider spread of risk scores does not by itself establish probability calibration.

Scroll diagram ↔
Tools by task

DATA

Python · pandas

Contract-table preparation, type handling, category encoding, missing values and date-based duration calculation.

CLASSIFICATION

scikit-learn · Logistic regression · Decision tree · SVM

Comparison of execution-outcome models using accuracy and risk-score distributions.

REGRESSION

Linear regression · SVR · Random Forest · Extra Trees · Boosting

Baseline models, outlier diagnosis and regressor comparison for duration and cost.

ANALYSIS

Jupyter Notebook · Matplotlib · scikit-learn metrics

Target and score distributions, held-out evaluation and global feature importance.

Architecture, step by stepHighlighted data flow and technical walkthrough

Contracts: data preparation, model selection and assessment review

Scroll to highlight each stage and its data flow.

01 / 05
Contracts: data preparation, model selection and assessment review01 / DATA AND FEATURES02 / EXECUTION OUTCOME03 / REGRESSIONS: BASELINES → DIAGNOSIS → ENSEMBLES04 / RESULT INTERPRETATIONContract recordsprocurement · counterparty ·financeTypes and missing valuesencoding · imputationModel featuresstandardizationExecution outcomecompleted / terminatedClassifier comparisonlogistic regression · tree ·SVMRisk-score reviewaccuracy · distributionRiskclass + scoreNumerical targetsduration · costBaseline regressionslinear · SVR · treeError diagnosisR² · RMSE · MAPEIQR filterduration outliersRegressor comparisonRF · Extra Trees · boostingDurationdate difference → daysCostseparate regressionGlobal feature importancefeature roles in each modelAnalytical modulesestimates · errors · importance

Pan to explore the diagram ↔

DataModelStateEvaluation

Prepare procurement and counterparty data

01

Prepare procurement and counterparty data

Categorical fields, financial indicators and missing values are transformed into a representation for comparing different model families.

02

Assess execution outcome and risk-score behavior

The classification target is contract completion or termination. Accuracy is considered alongside the score distributions of logistic regression, a decision tree and SVM.

03

Start regressions with separate targets and diagnosis

Duration is derived from start and end dates; cost becomes the second numerical target. Baseline regressions are checked against held-out errors.

04

Evaluate ensembles after outlier analysis

An interquartile-range filter limits duration outliers. Ensembles are compared on the prepared sample, with separate regression estimates for duration and cost.

05

Review the role of features in each task

Global feature importance supports comparison of financial, procurement and cost-related fields. Model estimates are accompanied by quality and feature analysis.