Published June 22, 2026 | Version v1.0.0

liangchh/Suicide_prediction: STB Risk Scoring v1.0.0 – Initial Release

Authors/Creators

Description

Release Notes – STB Risk Scoring v1.0

Overview

The STB Risk Scoring package provides an end-to-end scoring pipeline for predicting Suicide Thought and Behavior (STB) risk using a pre-trained ensemble of XGBoost models. The tool standardizes input data, generates risk scores, and assigns percentile-based risk groups to support downstream risk stratification and analysis.

Features

  • Automated scoring using pre-trained XGBoost models.
  • Built-in feature normalization using the scaler stored in model.pkl.
  • Automatic removal of model-excluded variables (dropvars).
  • Ensemble prediction with averaged risk scores across multiple models.
  • Percentile-based risk group assignment for easy interpretation.
  • Simple command-line execution with minimal configuration.

Included Files

  • run_score.py – Main scoring script.
  • model.pkl – Serialized model package containing trained models and normalization parameters.
  • dataset.csv – Input dataset template.
  • requirements.txt – Required Python dependencies.

Input Requirements

  • Input file must be named dataset.csv.
  • Dataset must contain an ID column.
  • Feature columns must match those expected by the trained model.

Output

The scoring process generates:

  • ID – Record identifier from the input dataset.
  • Y_score – Predicted STB risk score.
  • RISK_GRP – Percentile-based risk category.

Usage

Install dependencies:

pip install -r requirements.txt

Run scoring:

python run_score.py

Notes

  • Risk groups are assigned based on score percentiles, with the top percentile representing the highest predicted risk.
  • Users may optionally export results to a CSV file by adding:
df_score.to_csv('scored_output.csv', index=False)

Version 1.0

Initial release of the STB Risk Scoring pipeline.

Files

liangchh/Suicide_prediction-v1.0.0.zip

Files (127.6 kB)

Name Size
md5:66b4648f4962ec5f132cbce414421865
127.6 kB Preview Download

Additional details

Related works