| dc.description.abstract |
Judicial sentencing often faces challenges of inconsistency and disparity, undermining both fairness and public trust. Existing guidelines provide direction, but variations persist due to the subjective interpretation of cases. This research addressed this gap by developing a Case-Based Reasoning (CBR) model to optimize sentencing decisions in the Kenyan judiciary. The study developed a CBR model that leveraged historical judicial data to support judges in delivering more consistent and equitable sentences. The methodology employed a structured four-stage approach using cosine similarity and TF-IDF vectorization for case retrieval, ensemble methods (Random Forest, XGBoost, LightGBM) for prediction, k-fold cross-validation for validation, and hyperparameter tuning for optimization. The CBR model incorporated a structured four-stage approach: case retrieval, case adaptation, case validation, and case optimization. The model analyzed key case attributes, including defendant demographics, crime severity, mitigating and aggravating factors, and judicial reasoning in prior cases. It was trained with a dataset of 1,200 previous cases from Kenyan courts, historical judicial sentencing records sourced from public legal databases e.g., Supreme Court archives, national judicial sentencing datasets and other legal databases with anonymized sentencing data. The results showed that the CBR model achieved a prediction accuracy of 27.42% with an F1-score of 0.2752, indicating significant challenges in judicial predictive modeling due to case complexity. Despite moderate performance, fairness analysis revealed balanced treatment across demographic subgroups, with fairness scores above 0.85. Thus, this approach contributed to aligning sentencing with judicial guidelines and helped in maintaining transparency and accountability in legal decisions. |
en_US |